17 lines
1.1 KiB
TypeScript
17 lines
1.1 KiB
TypeScript
import { ResponseSemanticsObject } from "@microsoft/teams-manifest";
|
|
import { AdaptiveCard, PreviewCardTemplate, WrappedAdaptiveCard } from "./interfaces";
|
|
export declare function wrapAdaptiveCard(card: AdaptiveCard, jsonPath: string): WrappedAdaptiveCard;
|
|
export declare function wrapResponseSemantics(card: AdaptiveCard, jsonPath: string): ResponseSemanticsObject;
|
|
/**
|
|
* Infers the preview card template from an Adaptive Card and a JSON path.
|
|
* The preview card template includes a title and an optional subtitle and image.
|
|
* It populates the preview card template with the first text block that matches
|
|
* each well-known name, in the order of title, subtitle, and image.
|
|
* If no text block matches the title or subtitle, it uses the first two text block as the title and subtitle.
|
|
* If the title is still empty and the subtitle is not empty, it uses subtitle as the title.
|
|
* @param card The Adaptive Card to infer the preview card template from.
|
|
* @param jsonPath The JSON path to the root object in the card body.
|
|
* @returns The inferred preview card template.
|
|
*/
|
|
export declare function inferPreviewCardTemplate(card: AdaptiveCard): PreviewCardTemplate;
|