Skip to content

Commit 1cc6578

Browse files
[office-js][office-js-preview] (Outlook) Publish Mailbox 1.15 (DefinitelyTyped#71474)
1 parent 482ac70 commit 1cc6578

File tree

2 files changed

+2008
-81
lines changed

2 files changed

+2008
-81
lines changed

types/office-js-preview/index.d.ts

Lines changed: 28 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -15136,7 +15136,7 @@ declare namespace Office {
1513615136
* A `LoadedMessageCompose` object is returned when `Office.context.mailbox.loadItemByIdAsync` is called on a message in compose mode.
1513715137
*
1513815138
* @remarks
15139-
* [Api set: Mailbox preview]
15139+
* [Api set: Mailbox 1.15]
1514015140
*
1514115141
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
1514215142
*
@@ -15150,8 +15150,6 @@ declare namespace Office {
1515015150
*
1515115151
* - Only one mail item can be loaded at a time. When you implement `loadItemByIdAsync`, you must call `unloadAsync` after processing the item.
1515215152
* This must be done before calling `loadItemByIdAsync` on another item.
15153-
*
15154-
* @beta
1515515153
*/
1515615154
interface LoadedMessageCompose {
1515715155
/**
@@ -15309,9 +15307,7 @@ declare namespace Office {
1530915307
*
1531015308
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose
1531115309
*
15312-
* **Important**:
15313-
*
15314-
* - Only the `getAllAsync` method of the NotificationMessages object is supported.
15310+
* **Important**: Only the `getAllAsync` method of the NotificationMessages object is supported.
1531515311
*/
1531615312
notificationMessages: NotificationMessages;
1531715313
/**
@@ -16021,7 +16017,7 @@ declare namespace Office {
1602116017
* When multiple mail items are selected, closes the currently loaded item, so that another selected mail item can be loaded for processing.
1602216018
*
1602316019
* @remarks
16024-
* [Api set: Mailbox preview]
16020+
* [Api set: Mailbox 1.15]
1602516021
*
1602616022
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
1602716023
*
@@ -16038,15 +16034,13 @@ declare namespace Office {
1603816034
* @param options - An object literal that contains the `asyncContext` property. Assign any object you wish to access in the callback function to the `asyncContext` property.
1603916035
* @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, `asyncResult`,
1604016036
* which is an `Office.AsyncResult` object.
16041-
*
16042-
* @beta
1604316037
*/
1604416038
unloadAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
1604516039
/**
1604616040
* When multiple mail items are selected, closes the currently loaded item, so that another selected mail item can be loaded for processing.
1604716041
*
1604816042
* @remarks
16049-
* [Api set: Mailbox preview]
16043+
* [Api set: Mailbox 1.15]
1605016044
*
1605116045
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
1605216046
*
@@ -16062,8 +16056,6 @@ declare namespace Office {
1606216056
*
1606316057
* @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, `asyncResult`,
1606416058
* which is an `Office.AsyncResult` object.
16065-
*
16066-
* @beta
1606716059
*/
1606816060
unloadAsync(callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
1606916061
}
@@ -16072,7 +16064,7 @@ declare namespace Office {
1607216064
* A `LoadedMessageRead` object is returned when `Office.context.mailbox.loadItemByIdAsync` is called on a message in read mode.
1607316065
*
1607416066
* @remarks
16075-
* [Api set: Mailbox preview]
16067+
* [Api set: Mailbox 1.15]
1607616068
*
1607716069
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
1607816070
*
@@ -16086,8 +16078,6 @@ declare namespace Office {
1608616078
*
1608716079
* - Only one mail item can be loaded at a time. When you implement `loadItemByIdAsync`, you must call `unloadAsync` after processing the item.
1608816080
* This must be done before calling `loadItemByIdAsync` on another item.
16089-
*
16090-
* @beta
1609116081
*/
1609216082
interface LoadedMessageRead {
1609316083
/**
@@ -16932,7 +16922,7 @@ declare namespace Office {
1693216922
* When multiple mail items are selected, closes the currently loaded item, so that another selected mail item can be loaded for processing.
1693316923
*
1693416924
* @remarks
16935-
* [Api set: Mailbox preview]
16925+
* [Api set: Mailbox 1.15]
1693616926
*
1693716927
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
1693816928
*
@@ -16949,15 +16939,13 @@ declare namespace Office {
1694916939
* @param options - An object literal that contains the `asyncContext` property. Assign any object you wish to access in the callback function to the `asyncContext` property.
1695016940
* @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, `asyncResult`,
1695116941
* which is an `Office.AsyncResult` object.
16952-
*
16953-
* @beta
1695416942
*/
1695516943
unloadAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
1695616944
/**
1695716945
* When multiple mail items are selected, closes the currently loaded item, so that another selected mail item can be loaded for processing.
1695816946
*
1695916947
* @remarks
16960-
* [Api set: Mailbox preview]
16948+
* [Api set: Mailbox 1.15]
1696116949
*
1696216950
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
1696316951
*
@@ -16973,8 +16961,6 @@ declare namespace Office {
1697316961
*
1697416962
* @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, `asyncResult`,
1697516963
* which is an `Office.AsyncResult` object.
16976-
*
16977-
* @beta
1697816964
*/
1697916965
unloadAsync(callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
1698016966
}
@@ -18190,12 +18176,12 @@ declare namespace Office {
1819018176
* Then, gets an object that provides the properties and methods of the loaded item.
1819118177
*
1819218178
* @remarks
18193-
* [Api set: Mailbox preview]
18179+
* [Api set: Mailbox 1.15]
1819418180
*
1819518181
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
1819618182
*
1819718183
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose, Read
18198-
*
18184+
*
1819918185
* **Important**:
1820018186
*
1820118187
* - This method only applies to messages.
@@ -18211,27 +18197,25 @@ declare namespace Office {
1821118197
*
1821218198
* - The `loadItemByIdAsync` method can only be called on messages in the same mailbox.
1821318199
*
18214-
* @param itemId - The EWS ID of a selected item.
18200+
* @param itemId - The EWS ID of a mail item.
1821518201
* @param options - An object literal that contains the `asyncContext` property.
1821618202
* In this property, provide any object you wish to access in the callback function.
1821718203
* @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter,
1821818204
* `asyncResult`, which is an `Office.AsyncResult` object. A `LoadedMessageCompose` or `LoadedMessageRead` object is returned
18219-
* in the `asyncResult.value` property. This object provides the properties of the selected item that's currently loaded.
18220-
*
18221-
* @beta
18205+
* in the `asyncResult.value` property. This object provides the properties of the item that's currently loaded.
1822218206
*/
1822318207
loadItemByIdAsync(itemId: string, options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult<LoadedMessageCompose | LoadedMessageRead>) => void): void;
1822418208
/**
1822518209
* Loads a single mail item by its Exchange Web Services (EWS) ID.
1822618210
* Then, gets an object that provides the properties and methods of the loaded item.
1822718211
*
1822818212
* @remarks
18229-
* [Api set: Mailbox preview]
18213+
* [Api set: Mailbox 1.15]
1823018214
*
1823118215
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
1823218216
*
1823318217
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose, Read
18234-
*
18218+
*
1823518219
* **Important**:
1823618220
*
1823718221
* - This method only applies to messages.
@@ -18247,12 +18231,10 @@ declare namespace Office {
1824718231
*
1824818232
* - The `loadItemByIdAsync` method can only be called on messages in the same mailbox.
1824918233
*
18250-
* @param itemId - The EWS ID of a selected item.
18234+
* @param itemId - The EWS ID of a mail item.
1825118235
* @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter,
1825218236
* `asyncResult`, which is an `Office.AsyncResult` object. A `LoadedMessageCompose` or `LoadedMessageRead` object is returned
18253-
* in the `asyncResult.value` property. This object provides the properties of the selected item that's currently loaded.
18254-
*
18255-
* @beta
18237+
* in the `asyncResult.value` property. This object provides the properties of the item that's currently loaded.
1825618238
*/
1825718239
loadItemByIdAsync(itemId: string, callback: (asyncResult: Office.AsyncResult<LoadedMessageCompose | LoadedMessageRead>) => void): void;
1825818240
/**
@@ -23661,7 +23643,7 @@ declare namespace Office {
2366123643
*
2366223644
* @remarks
2366323645
*
23664-
* [Api set: Mailbox preview]
23646+
* [Api set: Mailbox 1.15]
2366523647
*
2366623648
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **restricted**
2366723649
*
@@ -23676,8 +23658,6 @@ declare namespace Office {
2367623658
*
2367723659
* - If you format the dialog message using the `errorMessageMarkdown` property, we recommend you also add a plaintext version of the message using the `errorMessage` property.
2367823660
* This ensures that the message is displayed properly in Outlook clients that don't support Markdown.
23679-
*
23680-
* @beta
2368123661
*/
2368223662
errorMessageMarkdown?: string;
2368323663
/**
@@ -23765,19 +23745,16 @@ declare namespace Office {
2376523745
*
2376623746
* @remarks
2376723747
*
23768-
* [Api set: Mailbox preview]
23748+
* [Api set: Mailbox 1.15]
2376923749
*
2377023750
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **read item**
2377123751
*
2377223752
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read
2377323753
*
2377423754
* **Important**:
2377523755
*
23776-
* - The `commandId` option is currently in preview in Outlook on the web and on Windows (new and classic). To preview this feature in classic Outlook on Windows,
23777-
* install Version 2411 (Build 18227.20034) or later. Then, join the
23778-
* {@link https://techcommunity.microsoft.com/blog/microsoft365insiderblog/join-the-microsoft-365-insider-program-on-windows/4206638 | Microsoft 365 Insider program}
23779-
* and select the **Beta Channel** option. To learn how to implement this in your spam-reporting add-in, see
23780-
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting#open-a-task-pane-after-reporting-a-message-preview | Open a task pane after reporting a message (preview)}.
23756+
* - To learn how to implement the `commandId` property in your spam-reporting add-in, see
23757+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting#open-a-task-pane-after-reporting-a-message | Open a task pane after reporting a message}.
2378123758
*
2378223759
* - The `commandId` value must match the task pane ID specified in the manifest of your add-in. In an add-in only manifest,
2378323760
* the ID is specified in the `id` attribute of the {@link https://learn.microsoft.com/javascript/api/manifest/control | Control} element that represents the task pane.
@@ -23786,9 +23763,10 @@ declare namespace Office {
2378623763
* - If you configure the `commandId` option in the `event.completed` call, a post-processing dialog isn't shown to the user
2378723764
* even if the `showPostProcessingDialog` option is specified in the call.
2378823765
*
23789-
* - If you implement a task pane to open after a reported message is processed, when the `event.completed` call occurs, any task pane that's open or pinned is closed.
23766+
* - To ensure that the task pane of your spam-reporting add-in opens after a message is reported, you must set the `moveItemTo` option of the `event.completed` call to
23767+
* `Office.MailboxEnums.MoveSpamItemTo.NoMove`.
2379023768
*
23791-
* @beta
23769+
* - If you implement a task pane to open after a reported message is processed, when the `event.completed` call occurs, any task pane that's open or pinned is closed.
2379223770
*/
2379323771
commandId?: string;
2379423772
/**
@@ -23797,33 +23775,31 @@ declare namespace Office {
2379723775
*
2379823776
* @remarks
2379923777
*
23800-
* [Api set: Mailbox preview]
23778+
* [Api set: Mailbox 1.15]
2380123779
*
2380223780
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **read item**
2380323781
*
2380423782
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read
2380523783
*
2380623784
* **Important**:
2380723785
*
23808-
* - The `contextData` option is currently in preview in Outlook on the web and on Windows (new and classic). To preview this feature in classic Outlook on Windows,
23809-
* install Version 2411 (Build 18227.20034) or later. Then, join the
23810-
* {@link https://techcommunity.microsoft.com/blog/microsoft365insiderblog/join-the-microsoft-365-insider-program-on-windows/4206638 | Microsoft 365 Insider program}
23811-
* and select the **Beta Channel** option. To learn how to implement this in your spam-reporting add-in, see
23812-
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting#open-a-task-pane-after-reporting-a-message-preview | Open a task pane after reporting a message (preview)}.
23786+
* - To learn how to implement the `contextData` property in your spam-reporting add-in, see
23787+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting#open-a-task-pane-after-reporting-a-message | Open a task pane after reporting a message}.
2381323788
*
2381423789
* - If you specify the `contextData` option in your `event.completed` call, you must also assign a task pane ID to the `commandId` option.
2381523790
* Otherwise, the JSON data assigned to `contextData` is ignored.
2381623791
*
2381723792
* - If you configure the `commandId` and `contextData` options in the `event.completed` call, a post-processing dialog isn't shown to the user
2381823793
* even if the `showPostProcessingDialog` option is specified in the call.
2381923794
*
23795+
* - To ensure that the task pane of your spam-reporting add-in opens and receives context data after a message is reported, you must set the `moveItemTo` option of the `event.completed` call to
23796+
* `Office.MailboxEnums.MoveSpamItemTo.NoMove`.
23797+
*
2382023798
* - If you implement a task pane to open after a reported message is processed, when the `event.completed` call occurs, any task pane that's open or pinned is closed.
2382123799
*
2382223800
* - To retrieve the value of the `contextData` property, you must call `Office.context.mailbox.item.getInitializationContextAsync` in the JavaScript implementation
2382323801
* of your task pane. If you create a JSON string using `JSON.stringify()` and assign it to the `contextData` property, you must parse the string using
2382423802
* `JSON.parse()` once you retrieve it.
23825-
*
23826-
* @beta
2382723803
*/
2382823804
contextData?: any;
2382923805
/**

0 commit comments

Comments
 (0)