@microsoft/teams-js
Version:
Microsoft Client SDK for building app for Microsoft hosts
102 lines (101 loc) • 3.51 kB
TypeScript
import { Context } from '../public/app/app';
import { FrameContexts } from '../public/constants';
import { HostToAppPerformanceMetrics, LoadContext, ResumeContext } from '../public/interfaces';
/**
* @internal
* Limited to Microsoft-internal use
*/
export declare function initializeHandlers(): void;
/**
* @internal
* Limited to Microsoft-internal use
*/
export declare function uninitializeHandlers(): void;
/**
* @internal
* Limited to Microsoft-internal use
*/
export declare function callHandler(name: string, args?: unknown[]): [true, unknown] | [false, undefined];
/**
* @internal
* Limited to Microsoft-internal use
*/
export declare function registerHandler(apiVersionTag: string, name: string, handler: Function, sendMessage?: boolean, args?: unknown[]): void;
/**
* @internal
* Limited to Microsoft-internal use
*/
export declare function removeHandler(name: string): void;
/**
* @internal
* Limited to Microsoft-internal use
*/
export declare function doesHandlerExist(name: string): boolean;
/**
* @hidden
* Undocumented helper function with shared code between deprecated version and current version of register*Handler APIs
*
* @internal
* Limited to Microsoft-internal use
*
* @param apiVersionTag - The tag of the api version and name
* @param name - The name of the handler to register.
* @param handler - The handler to invoke.
* @param contexts - The context within which it is valid to register this handler.
* @param registrationHelper - The helper function containing logic pertaining to a specific version of the API.
*/
export declare function registerHandlerHelper(apiVersionTag: string, name: string, handler: Function, contexts: FrameContexts[], registrationHelper?: () => void): void;
/**
* @internal
* Limited to Microsoft-internal use
*/
export declare function registerOnThemeChangeHandler(apiVersionTag: string, handler: (theme: string) => void): void;
/**
* @internal
* Limited to Microsoft-internal use
*/
export declare function registerOnContextChangeHandler(apiVersionTag: string, handler: (context: Context) => void): void;
/**
* @internal
* Limited to Microsoft-internal use
*/
export declare function handleThemeChange(theme: string): void;
/**
* @internal
* Limited to Microsoft-internal use
*/
export declare function handleContextChange(context: Context): void;
/**
* @internal
* Limited to Microsoft-internal use
*/
export declare function registerHostToAppPerformanceMetricsHandler(handler: (metrics: HostToAppPerformanceMetrics) => void): void;
/**
* @internal
* Limited to Microsoft-internal use
*/
export declare function handleHostToAppPerformanceMetrics(metrics: HostToAppPerformanceMetrics): void;
/**
* @internal
* Limited to Microsoft-internal use
*
* @deprecated
*/
export declare function registerOnLoadHandler(apiVersionTag: string, handler: (context: LoadContext) => void): void;
/**
* @internal
* Limited to Microsoft-internal use
*
* @deprecated
*/
export declare function registerBeforeUnloadHandler(apiVersionTag: string, handler: (readyToUnload: () => void) => boolean): void;
/**
* @internal
* Limited to Microsoft-internal use
*/
export declare function registerBeforeSuspendOrTerminateHandler(handler: () => Promise<void>): void;
/**
* @internal
* Limited to Microsoft-internal use
*/
export declare function registerOnResumeHandler(handler: (context: ResumeContext) => void): void;