@microsoft/teams-js
Version:
Microsoft Client SDK for building app for Microsoft hosts
76 lines (75 loc) • 2.44 kB
TypeScript
/**
* @beta
* @hidden
* Module to delegate adaptive card action for Declarative Agents execution to the host
* @internal
* Limited to Microsoft-internal use
* @module
*/
import { DialogSize } from '../public';
import { AppId } from '../public';
import { ISerializable } from '../public/serializable.interface';
import { UUID } from '../public/uuidObject';
/**
* @beta
* @hidden
* Base interface for Dialog Information.
* @internal
* Limited to Microsoft-internal use
*
* @param title The title of the dialog.
* @param size The size of the dialog.
*/
export interface IDialogActionBase {
title: string;
size: DialogSize;
}
/**
* @beta
* @hidden
* Interface to define the Dialog info for Adaptive Card Action.OpenUrlDialog request.
* @internal
* Limited to Microsoft-internal use
*
* @param url The URL to open in the dialog.
*/
export interface IActionOpenUrlDialogInfo extends IDialogActionBase {
url: URL;
}
/**
* @beta
* @hidden
* Delegates an Adaptive Card Action.OpenUrlDialog request to the host for the application with the provided app ID
* @internal
* Limited to Microsoft-internal use
* @param appId ID of the application the request is intended for. This must be a UUID
* @param actionOpenUrlDialogInfo Information required to open the URL dialog
* @param traceId The trace identifier used for monitoring and live site investigations
* @returns Promise that resolves when the request is completed and rejects with ExternalAppError if the request fails
*/
export declare function processActionOpenUrlDialog(appId: AppId, actionOpenUrlDialogInfo: IActionOpenUrlDialogInfo, traceId: UUID): Promise<void>;
/**
* @beta
* @hidden
* Checks if the externalAppCardActions capability is supported by the host
* @returns boolean to represent whether externalAppCardActions capability is supported
*
* @throws Error if {@linkcode app.initialize} has not successfully completed
*
* @internal
* Limited to Microsoft-internal use
*/
export declare function isSupported(): boolean;
/**
* @beta
* @hidden
* Serializable class for ActionOpenUrlDialogInfo to send info to the host
*
* @internal
* Limited to Microsoft-internal use
*/
export declare class SerializableActionOpenUrlDialogInfo implements ISerializable {
private info;
constructor(info: IActionOpenUrlDialogInfo);
serialize(): object;
}