From 074bd375f554ac1472b9c41608e2c0afc0fa16b0 Mon Sep 17 00:00:00 2001 From: Elizabeth Samuel Date: Thu, 8 Aug 2019 15:44:51 -0700 Subject: [PATCH] [office-js] [office-js-preview] (Outlook) Remove AsyncResult links (#37449) --- types/office-js-preview/index.d.ts | 23 ++++++++++++----------- types/office-js/index.d.ts | 23 ++++++++++++----------- 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/types/office-js-preview/index.d.ts b/types/office-js-preview/index.d.ts index 8be4cbeb90..17135046a8 100644 --- a/types/office-js-preview/index.d.ts +++ b/types/office-js-preview/index.d.ts @@ -15341,6 +15341,8 @@ declare namespace Office { * The getCallbackTokenAsync method makes an asynchronous call to get an opaque token from the Exchange Server that hosts the user's mailbox. * The lifetime of the callback token is 5 minutes. * + * The token is returned as a string in the `asyncResult.value` property. + * * *REST Tokens* * * When a REST token is requested (options.isRest = true), the resulting token will not work to authenticate Exchange Web Services calls. @@ -15380,9 +15382,8 @@ declare namespace Office { * isRest: Determines if the token provided will be used for the Outlook REST APIs or Exchange Web Services. Default value is false. * asyncContext: Any state data that is passed to the asynchronous method. * @param callback - When the method completes, the function passed in the callback parameter is called with a single parameter of - * type Office.AsyncResult. The token is provided as a string in the `asyncResult.value` property. - * If there was an error, the `error` and `diagnostics` properties of the {@link Office.AsyncResult | `asyncResult`} object - * may provide additional information. + * type Office.AsyncResult. The token is returned as a string in the `asyncResult.value` property. + * If there was an error, the `asyncResult.error` and `asyncResult.diagnostics` properties may provide additional information. */ getCallbackTokenAsync(options: Office.AsyncContextOptions & { isRest?: boolean }, callback: (asyncResult: Office.AsyncResult) => void): void; /** @@ -15391,6 +15392,8 @@ declare namespace Office { * The getCallbackTokenAsync method makes an asynchronous call to get an opaque token from the Exchange Server that hosts the user's mailbox. * The lifetime of the callback token is 5 minutes. * + * The token is returned as a string in the `asyncResult.value` property. + * * You can pass the token and an attachment identifier or item identifier to a third-party system. * The third-party system uses the token as a bearer authorization token to call the Exchange Web Services (EWS) GetAttachment or * GetItem operation to return an attachment or item. For example, you can create a remote service to get attachments from the selected item. @@ -15400,7 +15403,7 @@ declare namespace Office { * In compose mode you must call the saveAsync method to get an item identifier to pass to the getCallbackTokenAsync method. * Your app must have ReadWriteItem permissions to call the saveAsync method. * - * [Api set: Mailbox 1.3] + * [Api set: Mailbox 1.0] * * @remarks * @@ -15417,16 +15420,15 @@ declare namespace Office { * **{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}**: Compose or Read * * @param callback - When the method completes, the function passed in the callback parameter is called with a single parameter of - * type Office.AsyncResult. The token is provided as a string in the `asyncResult.value` property. - * If there was an error, the `error` and `diagnostics` properties of the {@link Office.AsyncResult | `asyncResult`} object - * may provide additional information. + * type Office.AsyncResult. The token is returned as a string in the `asyncResult.value` property. + * If there was an error, the `asyncResult.error` and `asyncResult.diagnostics` properties may provide additional information. * @param userContext - Optional. Any state data that is passed to the asynchronous method. */ getCallbackTokenAsync(callback: (asyncResult: Office.AsyncResult) => void, userContext?: any): void; /** * Gets a token identifying the user and the Office Add-in. * - * The token is provided as a string in the asyncResult.value property. + * The token is returned as a string in the `asyncResult.value` property. * * [Api set: Mailbox 1.0] * @@ -15449,9 +15451,8 @@ declare namespace Office { * * @param callback - When the method completes, the function passed in the callback parameter is called with a single parameter of * type Office.AsyncResult. - * The token is provided as a string in the `asyncResult.value` property. - * If there was an error, the `error` and `diagnostics` properties of the {@link Office.AsyncResult | `asyncResult`} object - * may provide additional information. + * The token is returned as a string in the `asyncResult.value` property. + * If there was an error, the `asyncResult.error` and `asyncResult.diagnostics` properties may provide additional information. * @param userContext - Optional. Any state data that is passed to the asynchronous method. */ getUserIdentityTokenAsync(callback: (asyncResult: Office.AsyncResult) => void, userContext?: any): void; diff --git a/types/office-js/index.d.ts b/types/office-js/index.d.ts index beb3cf45e3..d4b8fcfbfd 100644 --- a/types/office-js/index.d.ts +++ b/types/office-js/index.d.ts @@ -13598,6 +13598,8 @@ declare namespace Office { * The getCallbackTokenAsync method makes an asynchronous call to get an opaque token from the Exchange Server that hosts the user's mailbox. * The lifetime of the callback token is 5 minutes. * + * The token is returned as a string in the `asyncResult.value` property. + * * *REST Tokens* * * When a REST token is requested (options.isRest = true), the resulting token will not work to authenticate Exchange Web Services calls. @@ -13637,9 +13639,8 @@ declare namespace Office { * isRest: Determines if the token provided will be used for the Outlook REST APIs or Exchange Web Services. Default value is false. * asyncContext: Any state data that is passed to the asynchronous method. * @param callback - When the method completes, the function passed in the callback parameter is called with a single parameter of - * type Office.AsyncResult. The token is provided as a string in the `asyncResult.value` property. - * If there was an error, the `error` and `diagnostics` properties of the {@link Office.AsyncResult | `asyncResult`} object - * may provide additional information. + * type Office.AsyncResult. The token is returned as a string in the `asyncResult.value` property. + * If there was an error, the `asyncResult.error` and `asyncResult.diagnostics` properties may provide additional information. */ getCallbackTokenAsync(options: Office.AsyncContextOptions & { isRest?: boolean }, callback: (asyncResult: Office.AsyncResult) => void): void; /** @@ -13648,6 +13649,8 @@ declare namespace Office { * The getCallbackTokenAsync method makes an asynchronous call to get an opaque token from the Exchange Server that hosts the user's mailbox. * The lifetime of the callback token is 5 minutes. * + * The token is returned as a string in the `asyncResult.value` property. + * * You can pass the token and an attachment identifier or item identifier to a third-party system. * The third-party system uses the token as a bearer authorization token to call the Exchange Web Services (EWS) GetAttachment or * GetItem operation to return an attachment or item. For example, you can create a remote service to get attachments from the selected item. @@ -13657,7 +13660,7 @@ declare namespace Office { * In compose mode you must call the saveAsync method to get an item identifier to pass to the getCallbackTokenAsync method. * Your app must have ReadWriteItem permissions to call the saveAsync method. * - * [Api set: Mailbox 1.3] + * [Api set: Mailbox 1.0] * * @remarks * @@ -13674,16 +13677,15 @@ declare namespace Office { * - NetworkError: The user is no longer connected to the network. Please check your network connection and try again. * * @param callback - When the method completes, the function passed in the callback parameter is called with a single parameter of - * type Office.AsyncResult. The token is provided as a string in the `asyncResult.value` property. - * If there was an error, the `error` and `diagnostics` properties of the {@link Office.AsyncResult | `asyncResult`} object - * may provide additional information. + * type Office.AsyncResult. The token is returned as a string in the `asyncResult.value` property. + * If there was an error, the `asyncResult.error` and `asyncResult.diagnostics` properties may provide additional information. * @param userContext - Optional. Any state data that is passed to the asynchronous method. */ getCallbackTokenAsync(callback: (asyncResult: Office.AsyncResult) => void, userContext?: any): void; /** * Gets a token identifying the user and the Office Add-in. * - * The token is provided as a string in the asyncResult.value property. + * The token is returned as a string in the `asyncResult.value` property. * * [Api set: Mailbox 1.0] * @@ -13706,9 +13708,8 @@ declare namespace Office { * * @param callback - When the method completes, the function passed in the callback parameter is called with a single parameter of * type Office.AsyncResult. - * The token is provided as a string in the `asyncResult.value` property. - * If there was an error, the `error` and `diagnostics` properties of the {@link Office.AsyncResult | `asyncResult`} object - * may provide additional information. + * The token is returned as a string in the `asyncResult.value` property. + * If there was an error, the `asyncResult.error` and `asyncResult.diagnostics` properties may provide additional information. * @param userContext - Optional. Any state data that is passed to the asynchronous method. */ getUserIdentityTokenAsync(callback: (asyncResult: Office.AsyncResult) => void, userContext?: any): void;