import { FilePreviewParameters, UserSettingTypes } from './interfaces'; export declare function uploadCustomApp(manifestBlob: Blob, onComplete?: (status: boolean, reason?: string) => void): void; /** * @deprecated Use {@link plugins.sendPluginMessage} with {@link plugins.registerPluginMessage} and a correlationId-based response pattern. * * @hidden * Sends a custom action MessageRequest to host or parent window * * @param actionName - Specifies name of the custom action to be sent * @param args - Specifies additional arguments passed to the action * @param callback - Optionally specify a callback to receive response parameters from the parent * @returns id of sent message * * @remarks * Prefer the plugin event model for new development. In that model, send a request message * with a unique `correlationId` and listen for a response event with the same `correlationId`. * * Example: * ```ts * // Request side * const correlationId = crypto.randomUUID(); * * plugins.registerPluginMessage((message) => { * if (message.func !== 'example.customAction.response') { * return; * } * if (message.correlationId !== correlationId) { * return; * } * * // This is the response for the request above. * const response = message.args; * console.log('Received response', response); * }); * * await plugins.sendPluginMessage({ * func: 'example.customAction.request', * args: { itemId: '12345' }, * correlationId, * }); * * // Host side contract example (conceptual): * // On receiving example.customAction.request, send back * // example.customAction.response with the same correlationId. * ``` * * @internal * Limited to Microsoft-internal use */ export declare function sendCustomMessage(actionName: string, args?: any[], callback?: (...args: any[]) => void): void; /** * @hidden * Sends a custom action MessageEvent to a child iframe/window. * * @param actionName - Specifies name of the custom action to be sent * @param args - Specifies additional arguments passed to the action * @returns id of sent message * * @internal * Limited to Microsoft-internal use */ export declare function sendCustomEvent(actionName: string, args?: any[]): void; /** * @hidden * Adds a handler for an action sent by a child window or parent window * * @param actionName - Specifies name of the action message to handle * @param customHandler - The callback to invoke when the action message is received. The return value is sent to the child * * @internal * Limited to Microsoft-internal use */ export declare function registerCustomHandler(actionName: string, customHandler: (...args: any[]) => any[]): void; /** * @hidden * register a handler to be called when a user setting changes. The changed setting type & value is provided in the callback. * * @param settingTypes - List of user setting changes to subscribe * @param handler - When a subscribed setting is updated this handler is called * * @internal * Limited to Microsoft-internal use */ export declare function registerUserSettingsChangeHandler(settingTypes: UserSettingTypes[], handler: (settingType: UserSettingTypes, value: any) => void): void; /** * @hidden * Opens a client-friendly preview of the specified file. * * @param file - The file to preview. * * @internal * Limited to Microsoft-internal use */ export declare function openFilePreview(filePreviewParameters: FilePreviewParameters): void;