@types/office-js-preview 1.0.406 → 1.0.408
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- office-js-preview/README.md +1 -1
- office-js-preview/index.d.ts +158 -82
- office-js-preview/package.json +2 -2
office-js-preview/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package contains type definitions for Office.js (https://github.com/OfficeD
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/office-js-preview.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated: Thu,
|
|
11
|
+
* Last updated: Thu, 24 Aug 2023 19:33:02 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `Excel`, `Office`, `OfficeCore`, `OfficeExtension`, `OneNote`, `PowerPoint`, `Visio`, `Word`
|
|
14
14
|
|
office-js-preview/index.d.ts
CHANGED
|
@@ -1135,7 +1135,7 @@ declare namespace Office {
|
|
|
1135
1135
|
* When you use the {@link https://learn.microsoft.com/javascript/api/office/office.addincommands.event#office-office-addincommands-event-completed-member(1) | completed method}
|
|
1136
1136
|
* to signal that a reported message has finished processing, this property specifies the Outlook mailbox folder to which the message will be moved.
|
|
1137
1137
|
*
|
|
1138
|
-
* **Important**: Only applicable to add-ins that implement the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting | integrated spam
|
|
1138
|
+
* **Important**: Only applicable to add-ins that implement the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting | integrated spam-reporting feature}.
|
|
1139
1139
|
*
|
|
1140
1140
|
* @remarks
|
|
1141
1141
|
*
|
|
@@ -1156,13 +1156,40 @@ declare namespace Office {
|
|
|
1156
1156
|
* @beta
|
|
1157
1157
|
*/
|
|
1158
1158
|
folderName?: string;
|
|
1159
|
+
/**
|
|
1160
|
+
* When you use the {@link https://learn.microsoft.com/javascript/api/office/office.addincommands.event#office-office-addincommands-event-completed-member(1) | completed method}
|
|
1161
|
+
* to signal that a reported message has finished processing, this property specifies whether the message is moved to a different folder in the mailbox.
|
|
1162
|
+
*
|
|
1163
|
+
* **Important**: Only applicable to add-ins that implement the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting | integrated spam-reporting feature}.
|
|
1164
|
+
*
|
|
1165
|
+
* @remarks
|
|
1166
|
+
*
|
|
1167
|
+
* [Api set: Mailbox preview]
|
|
1168
|
+
*
|
|
1169
|
+
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **read item**
|
|
1170
|
+
*
|
|
1171
|
+
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read
|
|
1172
|
+
*
|
|
1173
|
+
* **Important**:
|
|
1174
|
+
*
|
|
1175
|
+
* In Outlook on Windows, you can only use this property in a spam-reporting add-in starting in Version 2308 (Build 16724.10000).
|
|
1176
|
+
* If you're using an earlier build that supports the integrated spam-reporting feature, use the `postProcessingAction`
|
|
1177
|
+
* property instead.
|
|
1178
|
+
*
|
|
1179
|
+
* If the property is set to `Office.MailboxEnums.MoveSpamItemTo.CustomFolder`, you must specify the name of the folder to which
|
|
1180
|
+
* the message will be moved in the `folderName` property of the `event.completed` call. Otherwise, the `moveItemTo` property will default to
|
|
1181
|
+
* `Office.MailboxEnums.MoveSpamItemTo.JunkFolder` and move the reported message to the **Junk Email** folder.
|
|
1182
|
+
*
|
|
1183
|
+
* @beta
|
|
1184
|
+
*/
|
|
1185
|
+
moveItemTo?: Office.MailboxEnums.MoveSpamItemTo;
|
|
1159
1186
|
/**
|
|
1160
1187
|
* When set to `true`, deletes a reported message if an error occurs while the message is processed.
|
|
1161
1188
|
* If this property is set to `false` or isn't specified in the
|
|
1162
1189
|
* {@link https://learn.microsoft.com/javascript/api/office/office.addincommands.event#office-office-addincommands-event-completed-member(1) | completed method},
|
|
1163
1190
|
* the reported message remains in its current mailbox folder.
|
|
1164
1191
|
*
|
|
1165
|
-
* **Important**: Only applicable to add-ins that implement the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting | integrated spam
|
|
1192
|
+
* **Important**: Only applicable to add-ins that implement the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting | integrated spam-reporting feature}.
|
|
1166
1193
|
*
|
|
1167
1194
|
* @remarks
|
|
1168
1195
|
*
|
|
@@ -1177,17 +1204,18 @@ declare namespace Office {
|
|
|
1177
1204
|
onErrorDeleteItem?: boolean;
|
|
1178
1205
|
/**
|
|
1179
1206
|
* When you use the {@link https://learn.microsoft.com/javascript/api/office/office.addincommands.event#office-office-addincommands-event-completed-member(1) | completed method}
|
|
1180
|
-
* to signal that a reported message has finished processing, this property specifies the
|
|
1207
|
+
* to signal that a reported message has finished processing, this property specifies whether the message is moved to a different folder in the mailbox.
|
|
1208
|
+
* The following post-processing actions are available.
|
|
1181
1209
|
*
|
|
1182
|
-
* - `delete` -
|
|
1210
|
+
* - `delete` - Moves the reported message to the **Deleted Items** folder of the mailbox.
|
|
1183
1211
|
*
|
|
1184
1212
|
* - `moveToCustomFolder` - Moves the reported message to a specified folder. You must specify the name of the folder in the `folderName` property.
|
|
1185
1213
|
*
|
|
1186
|
-
* - `moveToSpamFolder` - Moves the reported message to the Junk Email folder of the mailbox.
|
|
1214
|
+
* - `moveToSpamFolder` - Moves the reported message to the **Junk Email** folder of the mailbox.
|
|
1187
1215
|
*
|
|
1188
1216
|
* - `noMove` - Leaves the reported message in its current folder.
|
|
1189
1217
|
*
|
|
1190
|
-
* **Important**: Only applicable to add-ins that implement the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting | integrated spam
|
|
1218
|
+
* **Important**: Only applicable to add-ins that implement the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting | integrated spam-reporting feature}.
|
|
1191
1219
|
*
|
|
1192
1220
|
* @remarks
|
|
1193
1221
|
*
|
|
@@ -1197,9 +1225,14 @@ declare namespace Office {
|
|
|
1197
1225
|
*
|
|
1198
1226
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read
|
|
1199
1227
|
*
|
|
1200
|
-
* **Important**:
|
|
1201
|
-
*
|
|
1202
|
-
*
|
|
1228
|
+
* **Important**:
|
|
1229
|
+
*
|
|
1230
|
+
* In Outlook on Windows, you can only use this property in earlier builds that support the integrated spam-reporting feature.
|
|
1231
|
+
* If you're on Version 2308 (Build 16724.10000) or later, use the `moveItemTo` property instead.
|
|
1232
|
+
*
|
|
1233
|
+
* If the property is set to `moveToCustomFolder`, you must specify the name of the folder to which
|
|
1234
|
+
* the message will be moved in the `folderName` property of the `event.completed` call. Otherwise, the `postProcessingAction` property will default to
|
|
1235
|
+
* `moveToSpamFolder` and move the reported message to the **Junk Email** folder.
|
|
1203
1236
|
*
|
|
1204
1237
|
* @beta
|
|
1205
1238
|
*/
|
|
@@ -1209,7 +1242,7 @@ declare namespace Office {
|
|
|
1209
1242
|
* to signal that a reported message has finished processing, this property indicates if a post-processing dialog is shown to the user. The JSON object assigned to this property
|
|
1210
1243
|
* must contain a title and a description. If this property isn't specified, a dialog isn't shown to the user once their reported message is processed.
|
|
1211
1244
|
*
|
|
1212
|
-
* **Important**: Only applicable to add-ins that implement the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting | integrated spam
|
|
1245
|
+
* **Important**: Only applicable to add-ins that implement the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting | integrated spam-reporting feature}.
|
|
1213
1246
|
*
|
|
1214
1247
|
* @remarks
|
|
1215
1248
|
*
|
|
@@ -9038,6 +9071,44 @@ declare namespace Office {
|
|
|
9038
9071
|
*/
|
|
9039
9072
|
Dec = "dec"
|
|
9040
9073
|
}
|
|
9074
|
+
/**
|
|
9075
|
+
* Specifies the folder to which a reported spam or phishing message is moved once it's processed by a spam-reporting add-in.
|
|
9076
|
+
*
|
|
9077
|
+
* To learn more about the integrated spam-reporting feature, see
|
|
9078
|
+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting | Implement an integrated spam-reporting add-in (preview)}.
|
|
9079
|
+
*
|
|
9080
|
+
* @remarks
|
|
9081
|
+
* [Api set: Mailbox preview]
|
|
9082
|
+
*
|
|
9083
|
+
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read
|
|
9084
|
+
*
|
|
9085
|
+
* **Important**: This enum can only be used to assign values to the
|
|
9086
|
+
* {@link https://learn.microsoft.com/javascript/api/office/office.addincommands.eventcompletedoptions?view=outlook-js-preview&preserve-view=true#office-office-addincommands-eventcompletedoptions-moveitemto-member |
|
|
9087
|
+
* moveItemTo} property of the `event.completed` method. If you're on an Outlook on Windows version that only supports the `postProcessingAction` property,
|
|
9088
|
+
* you must assign it different string values. For a list of supported string values, see
|
|
9089
|
+
* {@link https://learn.microsoft.com/javascript/api/office/office.addincommands.eventcompletedoptions?view=outlook-js-preview&preserve-view=true#office-office-addincommands-eventcompletedoptions-postprocessingaction-member |
|
|
9090
|
+
* Office.AddinCommands.EventCompletedOptions.postProcessingAction}.
|
|
9091
|
+
*
|
|
9092
|
+
* @beta
|
|
9093
|
+
*/
|
|
9094
|
+
enum MoveSpamItemTo {
|
|
9095
|
+
/**
|
|
9096
|
+
* Specifies that a reported message is moved to a custom folder in the mailbox.
|
|
9097
|
+
*/
|
|
9098
|
+
CustomFolder = "customFolder",
|
|
9099
|
+
/**
|
|
9100
|
+
* Specifies that a reported message is moved to the **Deleted Items** folder of the mailbox.
|
|
9101
|
+
*/
|
|
9102
|
+
DeletedItemsFolder = "deletedItemsFolder",
|
|
9103
|
+
/**
|
|
9104
|
+
* Specifies that a reported message is moved to the **Junk Email** folder of the mailbox.
|
|
9105
|
+
*/
|
|
9106
|
+
JunkFolder = "junkFolder",
|
|
9107
|
+
/**
|
|
9108
|
+
* Specifies that a reported message remains in its current folder in the mailbox.
|
|
9109
|
+
*/
|
|
9110
|
+
NoMove = "noMove"
|
|
9111
|
+
}
|
|
9041
9112
|
/**
|
|
9042
9113
|
* Represents the current view of Outlook on the web.
|
|
9043
9114
|
*/
|
|
@@ -10843,76 +10914,77 @@ declare namespace Office {
|
|
|
10843
10914
|
/**
|
|
10844
10915
|
* Asynchronously saves an item.
|
|
10845
10916
|
*
|
|
10846
|
-
*
|
|
10847
|
-
*
|
|
10848
|
-
*
|
|
10917
|
+
* Since appointments have no draft state, if `saveAsync` is called on an appointment in compose mode, the item is saved as a normal
|
|
10918
|
+
* appointment on the user's calendar. For new appointments that haven't been saved before, no invitation is sent.
|
|
10919
|
+
* For existing appointments, an update is sent to added or removed attendees.
|
|
10849
10920
|
*
|
|
10850
|
-
*
|
|
10851
|
-
*
|
|
10852
|
-
* Saving an existing appointment will send an update to added or removed attendees.
|
|
10921
|
+
* @remarks
|
|
10922
|
+
* [Api set: Mailbox 1.3]
|
|
10853
10923
|
*
|
|
10854
|
-
*
|
|
10924
|
+
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
|
|
10925
|
+
*
|
|
10926
|
+
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer
|
|
10927
|
+
*
|
|
10928
|
+
* **Important**:
|
|
10929
|
+
*
|
|
10930
|
+
* - In Outlook on the web or Outlook in online mode, the item is saved to the server. In Outlook in cached mode, the item is saved to the local cache.
|
|
10931
|
+
*
|
|
10932
|
+
* - When working with HTML-formatted content, it's important to note that the Outlook client may modify the content. This means that
|
|
10855
10933
|
* subsequent calls to methods like `Body.getAsync`, `Body.setAsync`, and even `saveAsync` may not result in the same content.
|
|
10856
10934
|
*
|
|
10857
|
-
*
|
|
10858
|
-
*
|
|
10935
|
+
* - If your add-in calls `saveAsync` on an item in compose mode in order to get an item ID to use with EWS or the REST API, be aware that
|
|
10936
|
+
* when Outlook is in cached mode, it may take some time before the item is actually synced to the server.
|
|
10859
10937
|
* Until the item is synced, using the item ID will return an error.
|
|
10860
10938
|
*
|
|
10861
|
-
*
|
|
10939
|
+
* - In Outlook on Mac, only Build 16.35.308 or later supports saving a meeting.
|
|
10862
10940
|
* Otherwise, the `saveAsync` method fails when called from a meeting in compose mode.
|
|
10863
10941
|
* For a workaround, see {@link https://learn.microsoft.com/outlook/troubleshoot/calendars/cannot-save-meeting-as-draft-in-outlook-for-mac | Cannot save a meeting as a draft in Outlook for Mac by using Office JS API}.
|
|
10864
10942
|
*
|
|
10865
|
-
* @remarks
|
|
10866
|
-
* [Api set: Mailbox 1.3]
|
|
10867
|
-
*
|
|
10868
|
-
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
|
|
10869
|
-
*
|
|
10870
|
-
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer
|
|
10871
|
-
*
|
|
10872
10943
|
* **Errors**:
|
|
10873
10944
|
*
|
|
10874
10945
|
* - `InvalidAttachmentId`: The attachment identifier does not exist.
|
|
10875
10946
|
*
|
|
10876
10947
|
* @param options - An object literal that contains one or more of the following properties:-
|
|
10877
10948
|
* `asyncContext`: Developers can provide any object they wish to access in the callback function.
|
|
10878
|
-
* @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter
|
|
10879
|
-
*
|
|
10949
|
+
* @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`,
|
|
10950
|
+
* which is an `Office.AsyncResult` object. The appointment ID is returned in the `asyncResult.value` property.
|
|
10880
10951
|
*/
|
|
10881
10952
|
saveAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult<string>) => void): void;
|
|
10882
10953
|
/**
|
|
10883
10954
|
* Asynchronously saves an item.
|
|
10884
10955
|
*
|
|
10885
|
-
*
|
|
10886
|
-
*
|
|
10956
|
+
* Since appointments have no draft state, if `saveAsync` is called on an appointment in compose mode, the item is saved as a normal
|
|
10957
|
+
* appointment on the user's calendar. For new appointments that haven't been saved before, no invitation is sent.
|
|
10958
|
+
* For existing appointments, an update is sent to added or removed attendees.
|
|
10959
|
+
*
|
|
10960
|
+
* @remarks
|
|
10961
|
+
* [Api set: Mailbox 1.3]
|
|
10887
10962
|
*
|
|
10888
|
-
*
|
|
10889
|
-
* appointment on the user's calendar. For new appointments that have not been saved before, no invitation will be sent.
|
|
10890
|
-
* Saving an existing appointment will send an update to added or removed attendees.
|
|
10963
|
+
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
|
|
10891
10964
|
*
|
|
10892
|
-
*
|
|
10965
|
+
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer
|
|
10966
|
+
*
|
|
10967
|
+
* **Important**:
|
|
10968
|
+
*
|
|
10969
|
+
* - In Outlook on the web or Outlook in online mode, the item is saved to the server. In Outlook in cached mode, the item is saved to the local cache.
|
|
10970
|
+
*
|
|
10971
|
+
* - When working with HTML-formatted content, it's important to note that the Outlook client may modify the content. This means that
|
|
10893
10972
|
* subsequent calls to methods like `Body.getAsync`, `Body.setAsync`, and even `saveAsync` may not result in the same content.
|
|
10894
10973
|
*
|
|
10895
|
-
*
|
|
10974
|
+
* - If your add-in calls `saveAsync` on an item in compose mode in order to get an item ID to use with EWS or the REST API, be aware that
|
|
10896
10975
|
* when Outlook is in cached mode, it may take some time before the item is actually synced to the server.
|
|
10897
10976
|
* Until the item is synced, using the item ID will return an error.
|
|
10898
10977
|
*
|
|
10899
|
-
*
|
|
10978
|
+
* - In Outlook on Mac, only Build 16.35.308 or later supports saving a meeting.
|
|
10900
10979
|
* Otherwise, the `saveAsync` method fails when called from a meeting in compose mode.
|
|
10901
10980
|
* For a workaround, see {@link https://learn.microsoft.com/outlook/troubleshoot/calendars/cannot-save-meeting-as-draft-in-outlook-for-mac | Cannot save a meeting as a draft in Outlook for Mac by using Office JS API}.
|
|
10902
10981
|
*
|
|
10903
|
-
* @remarks
|
|
10904
|
-
* [Api set: Mailbox 1.3]
|
|
10905
|
-
*
|
|
10906
|
-
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
|
|
10907
|
-
*
|
|
10908
|
-
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer
|
|
10909
|
-
*
|
|
10910
10982
|
* **Errors**:
|
|
10911
10983
|
*
|
|
10912
10984
|
* - `InvalidAttachmentId`: The attachment identifier does not exist.
|
|
10913
10985
|
*
|
|
10914
|
-
* @param callback - When the method completes, the function passed in the callback parameter is called with a single parameter
|
|
10915
|
-
*
|
|
10986
|
+
* @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`,
|
|
10987
|
+
* which is an `Office.AsyncResult` object. The appointment ID is returned in the `asyncResult.value` property.
|
|
10916
10988
|
*/
|
|
10917
10989
|
saveAsync(callback: (asyncResult: Office.AsyncResult<string>) => void): void;
|
|
10918
10990
|
/**
|
|
@@ -16581,22 +16653,7 @@ declare namespace Office {
|
|
|
16581
16653
|
*/
|
|
16582
16654
|
removeHandlerAsync(eventType: Office.EventType | string, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
|
|
16583
16655
|
/**
|
|
16584
|
-
* Asynchronously saves
|
|
16585
|
-
*
|
|
16586
|
-
* When invoked, this method saves the current message as a draft and returns the item ID via the callback function.
|
|
16587
|
-
* In Outlook on the web or Outlook in online mode, the item is saved to the server.
|
|
16588
|
-
* In Outlook in cached mode, the item is saved to the local cache.
|
|
16589
|
-
*
|
|
16590
|
-
* Since appointments have no draft state, if `saveAsync` is called on an appointment in compose mode, the item will be saved as a normal
|
|
16591
|
-
* appointment on the user's calendar. For new appointments that have not been saved before, no invitation will be sent.
|
|
16592
|
-
* Saving an existing appointment will send an update to added or removed attendees.
|
|
16593
|
-
*
|
|
16594
|
-
* When working with HTML-formatted content, it's important to note that the Outlook client may modify the content. This means that
|
|
16595
|
-
* subsequent calls to methods like `Body.getAsync`, `Body.setAsync`, and even `saveAsync` may not result in the same content.
|
|
16596
|
-
*
|
|
16597
|
-
* **Note**: If your add-in calls `saveAsync` on an item in compose mode in order to get an item ID to use with EWS or the REST API, be aware
|
|
16598
|
-
* that when Outlook is in cached mode, it may take some time before the item is actually synced to the server.
|
|
16599
|
-
* Until the item is synced, using the itemId will return an error.
|
|
16656
|
+
* Asynchronously saves the current message as a draft.
|
|
16600
16657
|
*
|
|
16601
16658
|
* @remarks
|
|
16602
16659
|
* [Api set: Mailbox 1.3]
|
|
@@ -16605,33 +16662,35 @@ declare namespace Office {
|
|
|
16605
16662
|
*
|
|
16606
16663
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose
|
|
16607
16664
|
*
|
|
16665
|
+
* **Important**:
|
|
16666
|
+
*
|
|
16667
|
+
* - In Outlook on the web or Outlook in online mode, the item is saved to the server. In Outlook in cached mode, the item is saved to the local cache.
|
|
16668
|
+
*
|
|
16669
|
+
* - When working with HTML-formatted content, it's important to note that the Outlook client may modify the content. This means that
|
|
16670
|
+
* subsequent calls to methods like `Body.getAsync`, `Body.setAsync`, and even `saveAsync` may not result in the same content.
|
|
16671
|
+
*
|
|
16672
|
+
* - If your add-in calls `saveAsync` on an item in compose mode in order to get an item ID to use with EWS or the REST API, be aware that
|
|
16673
|
+
* when Outlook is in cached mode, it may take some time before the item is actually synced to the server.
|
|
16674
|
+
* Until the item is synced, using the item ID will return an error.
|
|
16675
|
+
*
|
|
16676
|
+
* - In Outlook on the web, the mailbox account to which a draft is saved varies when `saveAsync` is called on a message that will be sent
|
|
16677
|
+
* from a shared mailbox account. If the sender creates a new message from their personal mailbox and selects the shared mailbox account
|
|
16678
|
+
* in the **From** field, `saveAsync` saves the draft to the **Drafts** folder of the user's personal mailbox. If the sender opens the
|
|
16679
|
+
* shared mailbox account in a separate browser tab (through the **Open another mailbox** option, for example) and creates a new message
|
|
16680
|
+
* there, `saveAsync` saves the draft to the **Drafts** folder of the shared mailbox.
|
|
16681
|
+
*
|
|
16608
16682
|
* **Errors**:
|
|
16609
16683
|
*
|
|
16610
16684
|
* - `InvalidAttachmentId`: The attachment identifier does not exist.
|
|
16611
16685
|
*
|
|
16612
16686
|
* @param options - An object literal that contains one or more of the following properties:-
|
|
16613
16687
|
* `asyncContext`: Developers can provide any object they wish to access in the callback function.
|
|
16614
|
-
* @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter
|
|
16615
|
-
*
|
|
16688
|
+
* @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`,
|
|
16689
|
+
* which is an `Office.AsyncResult` object. The message ID is returned in the `asyncResult.value` property.
|
|
16616
16690
|
*/
|
|
16617
16691
|
saveAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult<string>) => void): void;
|
|
16618
16692
|
/**
|
|
16619
|
-
* Asynchronously saves
|
|
16620
|
-
*
|
|
16621
|
-
* When invoked, this method saves the current message as a draft and returns the item ID via the callback function.
|
|
16622
|
-
* In Outlook on the web or Outlook in online mode, the item is saved to the server.
|
|
16623
|
-
* In Outlook in cached mode, the item is saved to the local cache.
|
|
16624
|
-
*
|
|
16625
|
-
* Since appointments have no draft state, if `saveAsync` is called on an appointment in compose mode, the item will be saved as a normal
|
|
16626
|
-
* appointment on the user's calendar. For new appointments that have not been saved before, no invitation will be sent.
|
|
16627
|
-
* Saving an existing appointment will send an update to added or removed attendees.
|
|
16628
|
-
*
|
|
16629
|
-
* When working with HTML-formatted content, it's important to note that the Outlook client may modify the content. This means that
|
|
16630
|
-
* subsequent calls to methods like `Body.getAsync`, `Body.setAsync`, and even `saveAsync` may not result in the same content.
|
|
16631
|
-
*
|
|
16632
|
-
* **Note**: If your add-in calls `saveAsync` on an item in compose mode in order to get an item ID to use with EWS or the REST API, be aware
|
|
16633
|
-
* that when Outlook is in cached mode, it may take some time before the item is actually synced to the server.
|
|
16634
|
-
* Until the item is synced, using the `itemId` will return an error.
|
|
16693
|
+
* Asynchronously saves the current message as a draft.
|
|
16635
16694
|
*
|
|
16636
16695
|
* @remarks
|
|
16637
16696
|
* [Api set: Mailbox 1.3]
|
|
@@ -16640,12 +16699,29 @@ declare namespace Office {
|
|
|
16640
16699
|
*
|
|
16641
16700
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose
|
|
16642
16701
|
*
|
|
16702
|
+
* **Important**:
|
|
16703
|
+
*
|
|
16704
|
+
* - In Outlook on the web or Outlook in online mode, the item is saved to the server. In Outlook in cached mode, the item is saved to the local cache.
|
|
16705
|
+
*
|
|
16706
|
+
* - When working with HTML-formatted content, it's important to note that the Outlook client may modify the content. This means that
|
|
16707
|
+
* subsequent calls to methods like `Body.getAsync`, `Body.setAsync`, and even `saveAsync` may not result in the same content.
|
|
16708
|
+
*
|
|
16709
|
+
* - If your add-in calls `saveAsync` on an item in compose mode in order to get an item ID to use with EWS or the REST API, be aware that
|
|
16710
|
+
* when Outlook is in cached mode, it may take some time before the item is actually synced to the server.
|
|
16711
|
+
* Until the item is synced, using the item ID will return an error.
|
|
16712
|
+
*
|
|
16713
|
+
* - In Outlook on the web, the mailbox account to which a draft is saved varies when `saveAsync` is called on a message that will be sent
|
|
16714
|
+
* from a shared mailbox account. If the sender creates a new message from their personal mailbox and selects the shared mailbox account
|
|
16715
|
+
* in the **From** field, `saveAsync` saves the draft to the **Drafts** folder of the user's personal mailbox. If the sender opens the
|
|
16716
|
+
* shared mailbox account in a separate browser tab (through the **Open another mailbox** option, for example) and creates a new message
|
|
16717
|
+
* there, `saveAsync` saves the draft to the **Drafts** folder of the shared mailbox.
|
|
16718
|
+
*
|
|
16643
16719
|
* **Errors**:
|
|
16644
16720
|
*
|
|
16645
16721
|
* - `InvalidAttachmentId`: The attachment identifier does not exist.
|
|
16646
16722
|
*
|
|
16647
|
-
* @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter
|
|
16648
|
-
*
|
|
16723
|
+
* @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`,
|
|
16724
|
+
* which is an `Office.AsyncResult` object. The message ID is returned in the `asyncResult.value` property.
|
|
16649
16725
|
*/
|
|
16650
16726
|
saveAsync(callback: (asyncResult: Office.AsyncResult<string>) => void): void;
|
|
16651
16727
|
/**
|
office-js-preview/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/office-js-preview",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.408",
|
|
4
4
|
"description": "TypeScript definitions for Office.js",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/office-js-preview",
|
|
6
6
|
"license": "MIT",
|
|
@@ -45,6 +45,6 @@
|
|
|
45
45
|
},
|
|
46
46
|
"scripts": {},
|
|
47
47
|
"dependencies": {},
|
|
48
|
-
"typesPublisherContentHash": "
|
|
48
|
+
"typesPublisherContentHash": "f138bc7b98f3e21b6d6ab063d872521600d7837574544caf59e86db9dbb81959",
|
|
49
49
|
"typeScriptVersion": "4.3"
|
|
50
50
|
}
|