From 42bf170d428e5cc5d1b5a89d80e45b6a8b4d58ff Mon Sep 17 00:00:00 2001 From: David Chesnut Date: Mon, 11 Nov 2019 10:53:30 -0800 Subject: [PATCH] Added requirement set info (#40225) * adding requirement set info * whitespace fix * fix whitespace * fix whitespace * fixed storage req set tags --- types/office-runtime/index.d.ts | 52 ++++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/types/office-runtime/index.d.ts b/types/office-runtime/index.d.ts index 70153c4adc..9f57bc4515 100644 --- a/types/office-runtime/index.d.ts +++ b/types/office-runtime/index.d.ts @@ -13,6 +13,9 @@ Copyright (c) Microsoft Corporation declare namespace OfficeRuntime { /** * Method that enables a pop up web dialog box. + * + * [Api set: CustomFunctionsRuntime 1.1] + * * @param url Must be a string. * @param options Optional parameter. Must be of type DisplayWebDialogOptions. */ @@ -23,6 +26,9 @@ declare namespace OfficeRuntime { const storage: Storage; /** * Asynchronous, global, and persistent key-value storage. + * + * [Api set: CustomFunctionsRuntime 1.1] + * * @remarks * Storage limit is 10 MB per domain, which may be shared by multiple add-ins. */ @@ -30,12 +36,18 @@ declare namespace OfficeRuntime { /** * Retrieves an item from storage based on its key. * Returns a Promise. In the event the Promise does not resolve, returns null. + * + * [Api set: CustomFunctionsRuntime 1.1] + * * @param key Key of item to be retrieved. Must be a string. */ getItem(key: string): Promise; /** * Sets a key-value pair into storage or updates an existing key-value pair. * Returns a Promise. + * + * [Api set: CustomFunctionsRuntime 1.1] + * * @param key Key of item to be set. Must be a string. * @param value Must be a string. */ @@ -43,36 +55,56 @@ declare namespace OfficeRuntime { /** * Removes an item from storage based on its key. * Returns a Promise. + * + * [Api set: CustomFunctionsRuntime 1.1] + * * @param key Key of item to be removed. Must be a string. */ removeItem(key: string): Promise; /** * Retrieves multiple items from storage based on their key. * Returns a Promise. In the event the Promise does not resolve, returns null. + * + * [Api set: CustomFunctionsRuntime 1.1] + * * @param keys Keys of items to be removed. Must be an array of strings. */ getItems(keys: string[]): Promise<{ [key: string]: string | null }>; /** * Sets multiple items into storage or updates multiple items within storage. * Returns a Promise. + * + * [Api set: CustomFunctionsRuntime 1.1] + * * @param keyValues Key-value pairs to be set. Must be strings. */ setItems(keyValues: { [key: string]: string }): Promise; /** * Removes multiple items from storage. * Returns a Promise. + * + * [Api set: CustomFunctionsRuntime 1.1] + * * @param keys Keys of items to be removed. Must be an array of strings. */ removeItems(keys: string[]): Promise; /** * Retrieves an array of all keys from storage. * Returns a Promise. + * + * [Api set: CustomFunctionsRuntime 1.1] + * */ getKeys(): Promise; } /** Object representing the dialog box. */ interface Dialog { - /** Method to close a dialog box. Returns a Promise. */ + /** + * Method to close a dialog box. Returns a Promise. + * + * [Api set: CustomFunctionsRuntime 1.1] + * + */ close(): Promise; } /** Provides display options and actions a dialog box may take. */ @@ -80,28 +112,46 @@ declare namespace OfficeRuntime { /** * Optional parameter that determines whether the dialog box displays as a popup (false) or within an IFrame (true). * This setting is only applicable to custom functions running on Excel Online. + * + * [Api set: CustomFunctionsRuntime 1.1] + * */ displayInIFrame?: boolean; /** * Optional parameter that defines the height of the dialog box as a percentage of the current display. * For example, accepts strings such as: '50%', '50'. + * + * [Api set: CustomFunctionsRuntime 1.1] + * */ height?: string; /** * Optional parameter that defines the width of dialog as a percentage of window. * For example, accepts strings such as: '50%', '50'. + * + * [Api set: CustomFunctionsRuntime 1.1] + * */ width?: string; /** * Optional callback that runs when the dialog box sends a message to its parent. + * + * [Api set: CustomFunctionsRuntime 1.1] + * */ onMessage?: (message: string, dialog?: Dialog) => void; /** * Optional callback that runs when the dialog box is closed. + * + * [Api set: CustomFunctionsRuntime 1.1] + * */ onClose?: () => void; /** * Optional callback that runs when the dialog box sends an error. + * + * [Api set: CustomFunctionsRuntime 1.1] + * */ onRuntimeError?: (error: Error, dialog?: Dialog) => void; }