UNPKG

@microsoft/teams.cards

Version:

<p> <a href="https://www.npmjs.com/package/@microsoft/teams.cards" target="_blank"> <img src="https://img.shields.io/npm/v/@microsoft/teams.cards" /> </a> <a href="https://www.npmjs.com/package/@microsoft/teams.cards?activeTab=code" ta

53 lines (50 loc) 2.15 kB
import { IAuthCardButton } from './auth-card-button.mjs'; import { ITokenExchangeResource } from './token-exchange-resource.mjs'; /** * Defines authentication information associated with a card. This maps to the OAuthCard type defined by the Bot Framework (https://docs.microsoft.com/dotnet/api/microsoft.bot.schema.oauthcard) */ interface IAuth { /** * Text that can be displayed to the end user when prompting them to authenticate. */ text?: string; /** * The identifier for registered OAuth connection setting information. */ connectionName?: string; /** * Provides information required to enable on-behalf-of single sign-on user authentication. */ tokenExchangeResource?: ITokenExchangeResource; /** * Buttons that should be displayed to the user when prompting for authentication. The array MUST contain one button of type “signin”. Other button types are not currently supported. */ buttons?: IAuthCardButton[]; } /** * Defines authentication information associated with a card. This maps to the OAuthCard type defined by the Bot Framework (https://docs.microsoft.com/dotnet/api/microsoft.bot.schema.oauthcard) */ declare class Auth implements IAuth { /** * Text that can be displayed to the end user when prompting them to authenticate. */ text?: string; /** * The identifier for registered OAuth connection setting information. */ connectionName?: string; /** * Provides information required to enable on-behalf-of single sign-on user authentication. */ tokenExchangeResource?: ITokenExchangeResource; /** * Buttons that should be displayed to the user when prompting for authentication. The array MUST contain one button of type “signin”. Other button types are not currently supported. */ buttons?: IAuthCardButton[]; constructor(options?: IAuth); withText(value: string): this; withConnectionName(value: string): this; withTokenExchangeResource(value: ITokenExchangeResource): this; addButtons(...value: IAuthCardButton[]): this; } export { Auth, type IAuth };