UNPKG

@microsoft/teams-js

Version:

Microsoft Client SDK for building app for Microsoft hosts

50 lines (49 loc) 1.84 kB
import * as adaptiveCard from './adaptiveCard/adaptiveCard'; import * as update from './update'; import * as url from './url/url'; /** * Data Structure to represent the SDK response when dialog closes */ export interface ISdkResponse { /** * Error in case there is a failure before dialog submission */ err?: string; /** * Value provided in the `result` parameter by the dialog when the {@linkcode url.submit} function * was called. * If the dialog was closed by the user without submitting (e.g., using a control in the corner * of the dialog), this value will be `undefined` here. */ result?: string | object; } /** * Handler used to receive and process messages sent between a dialog and the app that launched it */ export type PostMessageChannel = (message: any) => void; /** * Handler used for receiving results when a dialog closes, either the value passed by {@linkcode url.submit} * or an error if the dialog was closed by the user. * * @see {@linkcode ISdkResponse} */ export type DialogSubmitHandler = (result: ISdkResponse) => void; /** * @hidden * Hide from docs because this function is only used during initialization * * Adds register handlers for messageForChild upon initialization and only in the tasks FrameContext. {@link FrameContexts.task} * Function is called during app initialization * @internal * Limited to Microsoft-internal use */ export declare function initialize(): void; /** * This function currently serves no purpose and should not be used. All functionality that used * to be covered by this method is now in subcapabilities and those isSupported methods should be * used directly. * * @hidden */ export declare function isSupported(): boolean; export { adaptiveCard, url, update };