UNPKG

@microsoft/teams.api

Version:

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

54 lines (51 loc) • 1.89 kB
import { IAdaptiveCard } from '@microsoft/teams.cards'; import { AnimationCard } from '../card/animation-card.mjs'; import { AudioCard } from '../card/audio-card.mjs'; import { HeroCard } from '../card/hero-card.mjs'; import { ThumbnailCard } from '../card/thumbnail-card.mjs'; import { VideoCard } from '../card/video-card.mjs'; import { OAuthCard } from '../oauth/oauth-card.mjs'; import { SigninCard } from '../sign-in/sign-in-card.mjs'; import '../card/card-action.mjs'; import '../card/media-url.mjs'; import '../card/thumbnail-url.mjs'; import '../card/card-image.mjs'; import '../token/token-post-resource.mjs'; import '../token-exchange/token-exchange-resource.mjs'; declare function cardAttachment<T extends CardAttachmentType>(type: T, content: CardAttachmentTypes[T]['content']): CardAttachmentTypes[T]; type CardAttachmentType = keyof CardAttachmentTypes; type CardAttachmentTypes = { adaptive: { contentType: 'application/vnd.microsoft.card.adaptive'; content: IAdaptiveCard; }; animation: { contentType: 'application/vnd.microsoft.card.animation'; content: AnimationCard; }; audio: { contentType: 'application/vnd.microsoft.card.audio'; content: AudioCard; }; hero: { contentType: 'application/vnd.microsoft.card.hero'; content: HeroCard; }; oauth: { contentType: 'application/vnd.microsoft.card.oauth'; content: OAuthCard; }; signin: { contentType: 'application/vnd.microsoft.card.signin'; content: SigninCard; }; thumbnail: { contentType: 'application/vnd.microsoft.card.thumbnail'; content: ThumbnailCard; }; video: { contentType: 'application/vnd.microsoft.card.video'; content: VideoCard; }; }; export { type CardAttachmentType, type CardAttachmentTypes, cardAttachment };