From 84e9ce549257b92cad0064ea2cd5bcbfa3f7d53b Mon Sep 17 00:00:00 2001 From: Elizabeth Samuel Date: Mon, 16 Mar 2020 09:40:36 -0700 Subject: [PATCH] [office-js-preview] (Outlook) Move signature APIs from Mailbox to item compose subclasses (#43127) --- types/office-js-preview/index.d.ts | 240 +++++++++++++++++++---------- 1 file changed, 160 insertions(+), 80 deletions(-) diff --git a/types/office-js-preview/index.d.ts b/types/office-js-preview/index.d.ts index 9b79945ec7..6b53311291 100644 --- a/types/office-js-preview/index.d.ts +++ b/types/office-js-preview/index.d.ts @@ -9585,6 +9585,44 @@ declare namespace Office { * **{@link https://docs.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer */ close(): void; + /** + * Disables the Outlook client signature. + * + * For Windows and Mac rich clients, this API sets the signature under the "New Message" and "Replies/Forwards" sections + * for the sending account to "(none)", effectively disabling the signature. + * For Outlook on the web, the API should disable the signature option for new mails, replies, and forwards. + * If the signature is selected, this API call should disable it. + * + * [Api set: Mailbox Preview] + * + * **{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}**: `ReadWriteItem` + * + * **{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * @param options - Optional. An object literal that contains one or more of the following properties. + * `asyncContext`: Developers can provide any object they wish to access in the callback method. + * @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + disableClientSignatureAsync(options?: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Disables the Outlook client signature. + * + * For Windows and Mac rich clients, this API sets the signature under the "New Message" and "Replies/Forwards" sections + * for the sending account to "(none)", effectively disabling the signature. + * For Outlook on the web, the API should disable the signature option for new mails, replies, and forwards. + * If the signature is selected, this API call should disable it. + * + * [Api set: Mailbox Preview] + * + * **{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}**: `ReadWriteItem` + * + * **{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + disableClientSignatureAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. * @@ -9877,6 +9915,48 @@ declare namespace Office { * The `value` property of the result is the properties of the shared item. */ getSharedPropertiesAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets if the client signature is enabled. + * + * For Windows and Mac rich clients, the API call should return `true` if the default signature for new messages, replies, or forwards is set + * to a template for the sending Outlook account. + * For Outlook on the web, the API call should return `true` if the signature is enabled for compose types `newMail`, `reply`, or `forward`. + * If the settings are set to "(none)" in Mac or Windows rich clients or disabled in Outlook on the Web, the API call should return `false`. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * **{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}**: `ReadItem` + * + * **{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * @param options - An object literal that contains one or more of the following properties. + * `asyncContext`: Developers can provide any object they wish to access in the callback method. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + isClientSignatureEnabledAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets if the client signature is enabled. + * + * For Windows and Mac rich clients, the API call should return `true` if the default signature for new messages, replies, or forwards is set + * to a template for the sending Outlook account. + * For Outlook on the web, the API call should return `true` if the signature is enabled for compose types `newMail`, `reply`, or `forward`. + * If the settings are set to "(none)" in Mac or Windows rich clients or disabled in Outlook on the Web, the API call should return `false`. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * **{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}**: `ReadItem` + * + * **{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + isClientSignatureEnabledAsync(callback: (asyncResult: Office.AsyncResult) => void): void; /** * Asynchronously loads custom properties for this add-in on the selected item. * @@ -12902,44 +12982,6 @@ declare namespace Office { * @param input - The local time value to convert. */ convertToUtcClientTime(input: LocalClientTime): Date; - /** - * Disables the Outlook client signature. - * - * For Windows and Mac rich clients, this API sets the signature under the "New Message" and "Replies/Forwards" sections - * for the sending account to "(none)", effectively disabling the signature. - * For Outlook on the web, the API should disable the signature option for new mails, replies, and forwards. - * If the signature is selected, this API call should disable it. - * - * [Api set: Mailbox Preview] - * - * **{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}**: `ReadWriteItem` - * - * **{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}**: Compose - * - * @param options - Optional. An object literal that contains one or more of the following properties. - * `asyncContext`: Developers can provide any object they wish to access in the callback method. - * @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, - * `asyncResult`, which is an `Office.AsyncResult` object. - */ - disableClientSignatureAsync(options?: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; - /** - * Disables the Outlook client signature. - * - * For Windows and Mac rich clients, this API sets the signature under the "New Message" and "Replies/Forwards" sections - * for the sending account to "(none)", effectively disabling the signature. - * For Outlook on the web, the API should disable the signature option for new mails, replies, and forwards. - * If the signature is selected, this API call should disable it. - * - * [Api set: Mailbox Preview] - * - * **{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}**: `ReadWriteItem` - * - * **{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}**: Compose - * - * @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, - * `asyncResult`, which is an `Office.AsyncResult` object. - */ - disableClientSignatureAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Displays an existing calendar appointment. * @@ -13207,48 +13249,6 @@ declare namespace Office { * @param userContext - Optional. Any state data that is passed to the asynchronous method. */ getUserIdentityTokenAsync(callback: (asyncResult: Office.AsyncResult) => void, userContext?: any): void; - /** - * Gets if the client signature is enabled. - * - * For Windows and Mac rich clients, the API call should return `true` if the default signature for new messages, replies, or forwards is set - * to a template for the sending Outlook account. - * For Outlook on the web, the API call should return `true` if the signature is enabled for compose types `newMail`, `reply`, or `forward`. - * If the settings are set to "(none)" in Mac or Windows rich clients or disabled in Outlook on the Web, the API call should return `false`. - * - * [Api set: Mailbox Preview] - * - * @remarks - * - * **{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}**: `ReadItem` - * - * **{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}**: Compose - * - * @param options - An object literal that contains one or more of the following properties. - * `asyncContext`: Developers can provide any object they wish to access in the callback method. - * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of - * type `Office.AsyncResult`. - */ - isClientSignatureEnabledAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; - /** - * Gets if the client signature is enabled. - * - * For Windows and Mac rich clients, the API call should return `true` if the default signature for new messages, replies, or forwards is set - * to a template for the sending Outlook account. - * For Outlook on the web, the API call should return `true` if the signature is enabled for compose types `newMail`, `reply`, or `forward`. - * If the settings are set to "(none)" in Mac or Windows rich clients or disabled in Outlook on the Web, the API call should return `false`. - * - * [Api set: Mailbox Preview] - * - * @remarks - * - * **{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}**: `ReadItem` - * - * **{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}**: Compose - * - * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of - * type `Office.AsyncResult`. - */ - isClientSignatureEnabledAsync(callback: (asyncResult: Office.AsyncResult) => void): void; /** * Makes an asynchronous request to an Exchange Web Services (EWS) service on the Exchange server that hosts the user's mailbox. * @@ -14009,6 +14009,44 @@ declare namespace Office { * **{@link https://docs.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose */ close(): void; + /** + * Disables the Outlook client signature. + * + * For Windows and Mac rich clients, this API sets the signature under the "New Message" and "Replies/Forwards" sections + * for the sending account to "(none)", effectively disabling the signature. + * For Outlook on the web, the API should disable the signature option for new mails, replies, and forwards. + * If the signature is selected, this API call should disable it. + * + * [Api set: Mailbox Preview] + * + * **{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}**: `ReadWriteItem` + * + * **{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}**: Message Compose + * + * @param options - Optional. An object literal that contains one or more of the following properties. + * `asyncContext`: Developers can provide any object they wish to access in the callback method. + * @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + disableClientSignatureAsync(options?: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Disables the Outlook client signature. + * + * For Windows and Mac rich clients, this API sets the signature under the "New Message" and "Replies/Forwards" sections + * for the sending account to "(none)", effectively disabling the signature. + * For Outlook on the web, the API should disable the signature option for new mails, replies, and forwards. + * If the signature is selected, this API call should disable it. + * + * [Api set: Mailbox Preview] + * + * **{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}**: `ReadWriteItem` + * + * **{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}**: Message Compose + * + * @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + disableClientSignatureAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; /** * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. * @@ -14339,6 +14377,48 @@ declare namespace Office { * type `Office.AsyncResult`. The `value` property of the result is the properties of the shared item. */ getSharedPropertiesAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets if the client signature is enabled. + * + * For Windows and Mac rich clients, the API call should return `true` if the default signature for new messages, replies, or forwards is set + * to a template for the sending Outlook account. + * For Outlook on the web, the API call should return `true` if the signature is enabled for compose types `newMail`, `reply`, or `forward`. + * If the settings are set to "(none)" in Mac or Windows rich clients or disabled in Outlook on the Web, the API call should return `false`. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * **{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}**: `ReadItem` + * + * **{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}**: Message Compose + * + * @param options - An object literal that contains one or more of the following properties. + * `asyncContext`: Developers can provide any object they wish to access in the callback method. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + isClientSignatureEnabledAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets if the client signature is enabled. + * + * For Windows and Mac rich clients, the API call should return `true` if the default signature for new messages, replies, or forwards is set + * to a template for the sending Outlook account. + * For Outlook on the web, the API call should return `true` if the signature is enabled for compose types `newMail`, `reply`, or `forward`. + * If the settings are set to "(none)" in Mac or Windows rich clients or disabled in Outlook on the Web, the API call should return `false`. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * **{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}**: `ReadItem` + * + * **{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}**: Message Compose + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + isClientSignatureEnabledAsync(callback: (asyncResult: Office.AsyncResult) => void): void; /** * Asynchronously loads custom properties for this add-in on the selected item. *