Adding details on the OfficeRuntime namespace which affects custom functions

This commit is contained in:
Michelle Scharlock
2018-08-30 12:24:41 -07:00
parent b3f56ef40c
commit 925480dba4
+95
View File
@@ -17200,6 +17200,101 @@ declare namespace OfficeExtension {
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
////////////////////// Begin OfficeRuntime /////////////////////
////////////////////////////////////////////////////////////////
declare namespace OfficeRuntime {
function displayWebDialog(url: string, options: DisplayWebDialogOptions): Promise<Dialog>;
const AsyncStorage: AsyncStorage;
// tslint:disable-next-line:interface-name
interface AsyncStorage {
getItem(key: string, callback?: (error?: Error, result?: string) => void): Promise<string>;
setItem(key: string, value: string, callback?: (error?: Error) => void): Promise<void>;
removeItem(key: string, callback?: (error?: Error) => void): Promise<void>;
clear(callback?: (error?: Error) => void): Promise<void>;
getAllKeys(callback?: (error?: Error, keys?: string[]) => void): Promise<string[]>;
multiSet(keyValuePairs: string[][], callback?: (errors?: Error[]) => void): Promise<void>;
multiRemove(keys: string[], callback?: (errors?: Error[]) => void): Promise<void>;
multiGet(keys: string[], callback?: (errors?: Error[], result?: string[][]) => void): Promise<string[][]>;
}
interface Dialog {
close(): Promise<void>;
}
// (copied from richapi/office-dialog/src/dialog.ts)
interface DisplayWebDialogOptions {
/**
*
* True if dialog opens in IFRAME
*
* [Api set: Dialog 1.2]
*/
displayInIFrame?: boolean;
/**
*
* The height of dialog as a percentage of window
*
* ex. '50%', '50'
*
* [Api set: Dialog 1.2]
*/
height?: string;
/**
*
* The width of dialog as a percentage of window
*
* ex. '50%', '50'
*
* [Api set: Dialog 1.2]
*/
width?: string;
/**
*
* True if title is hidden
*
* [Api set: Dialog 1.2]
*/
hideTitle?: boolean;
/**
*
* Callback that is run when the dialog sends a message to its parent
*
* [Api set: Dialog 1.X]
*/
onMessage?: (message: string, dialog?: Dialog) => void;
/**
*
* Callback that is run when the dialog is closed
*
* [Api set: Dialog 1.X]
*/
onClose?: () => void;
/**
*
* Callback that is run when the dialog sends an error
*
* [Api set: Dialog 1.X]
*/
onRuntimeError?: (error: Error, dialog?: Dialog) => void;
}
}
////////////////////////////////////////////////////////////////
////////////////////// End OfficeRuntime //////////////////////
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
////////////////////// Begin OfficeCore ////////////////////////