We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Microsoft Teams
iOS
1.5
When I check the type for IAdaptiveCard['body'] I see this:
IAdaptiveCard['body']
export interface IAdaptiveCard extends ICardElement { // ...other properties body?: (ITextBlock | IImage | IImageSet | IFactSet | IColumnSet | IContainer)[]; }
I was trying to use Table for which there is no type definition. Same stand for msteams. Please suggest solution if I am missing something.
msteams
I should not have to define types for Table and msteams. At the moment I have this to solve my issue:
Table
import type { IAdaptiveCard } from 'adaptivecards'; import type { IOpenUrlAction, IShowCardAction, ISubmitAction, Spacing, TextColor, } from 'adaptivecards/lib/schema'; type TableColumn = { width?: number; }; type TableCell = { type: 'TableCell'; style?: TextColor; items: IAdaptiveCard['body']; }; export type TableRow = { type: 'TableRow'; style?: TextColor; cells: TableCell[]; }; type Table = { type: 'Table'; spacing?: Spacing; gridStyle?: 'default' | 'accent'; firstRowAsHeader?: boolean; showGridLines?: boolean; firstRowAsHeaders?: boolean; columns?: TableColumn[]; rows?: TableRow[]; }; type MsTeams = { entities: { type: 'mention'; text: string; mentioned: { id: string; name: string; }; }[]; }; type Body = NonNullable<IAdaptiveCard['body']>[number] | Table; type IAdaptiveCardWithoutBody = StripIndexSignature< Omit<IAdaptiveCard, 'body' | 'actions'> >; type ShowCardActionWithOutCard = Omit<IShowCardAction, 'card'>; type ShowCardActionWithCard = ShowCardActionWithOutCard & { card: AdaptiveCard; }; export type AdaptiveCard = Partial<IAdaptiveCardWithoutBody> & { body?: Body[]; actions?: (ISubmitAction | IOpenUrlAction | ShowCardActionWithCard)[]; }; export type MsTeamsContent = AdaptiveCard & { msteams: MsTeams };
I get this error without above changes:
Cannot share private data but I think it is irrelevant.
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Target Application
Microsoft Teams
Application Operating System
iOS
Schema Version
1.5
Problem Description
When I check the type for
IAdaptiveCard['body']
I see this:I was trying to use Table for which there is no type definition. Same stand for
msteams
. Please suggest solution if I am missing something.Expected Outcome
I should not have to define types for
Table
andmsteams
.At the moment I have this to solve my issue:
Actual Outcome
I get this error without above changes:
Card JSON
Cannot share private data but I think it is irrelevant.
Repro Steps
No response
The text was updated successfully, but these errors were encountered: