@types/office-js-preview 1.0.409 → 1.0.411

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.
@@ -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: Fri, 25 Aug 2023 17:33:47 GMT
11
+ * Last updated: Thu, 31 Aug 2023 19:03:05 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `Excel`, `Office`, `OfficeCore`, `OfficeExtension`, `OneNote`, `PowerPoint`, `Visio`, `Word`
14
14
 
@@ -1047,6 +1047,13 @@ declare namespace Office {
1047
1047
  *
1048
1048
  * @remarks
1049
1049
  *
1050
+ * For information on support in Excel, Word, and PowerPoint, see
1051
+ * {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/add-in-commands-requirement-sets | Add-in commands requirement sets}.
1052
+ *
1053
+ * The following outlines support information for Outlook.
1054
+ *
1055
+ * [Api set: Mailbox 1.3]
1056
+ *
1050
1057
  * See {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/add-in-commands-requirement-sets | Add-in commands requirement sets} for more support information.
1051
1058
  *
1052
1059
  * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **restricted**
@@ -1059,7 +1066,13 @@ declare namespace Office {
1059
1066
  *
1060
1067
  * @remarks
1061
1068
  *
1062
- * This property is supported in Outlook only in {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets | requirement set} Mailbox 1.3 and later.
1069
+ * The following outlines support information for Outlook.
1070
+ *
1071
+ * [Api set: Mailbox 1.3]
1072
+ *
1073
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted**
1074
+ *
1075
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read
1063
1076
  */
1064
1077
  source:Source;
1065
1078
  /**
@@ -1067,202 +1080,90 @@ declare namespace Office {
1067
1080
  *
1068
1081
  * This method must be called at the end of a function which was invoked by the following:
1069
1082
  *
1070
- * - A function command button (that is, an add-in command defined with an `Action` element, where the `xsi:type` attribute is set to `ExecuteFunction`).
1083
+ * - A function command button (that is, an add-in command defined with an **\<Action\>** element, where the `xsi:type` attribute is set to `ExecuteFunction`).
1071
1084
  *
1072
- * - An event defined in the {@link https://learn.microsoft.com/javascript/api/manifest/extensionpoint#launchevent | LaunchEvent extension point}.
1073
- * For example, an `OnMessageSend` event.
1074
- *
1075
1085
  * - An {@link https://learn.microsoft.com/javascript/api/manifest/event | event} defined in the
1076
- * {@link https://learn.microsoft.com/javascript/api/manifest/extensionpoint#events | Events extension point}. For example, an `ItemSend` event.
1077
- *
1078
- * - An event defined in the
1079
- * {@link https://learn.microsoft.com/javascript/api/manifest/extensionpoint?view=outlook-js-preview&preserve-view=true#reportphishingcommandsurface-preview | ReportPhishingCommandSurface extension point (preview)}.
1086
+ * {@link https://learn.microsoft.com/javascript/api/manifest/extensionpoint#events | Events extension point} of an on-send add-in in Outlook.
1087
+ * For example, an `ItemSend` event.
1080
1088
  *
1081
1089
  * @remarks
1082
1090
  *
1091
+ * The following outlines support information for Outlook.
1092
+ *
1083
1093
  * [Api set: Mailbox 1.3]
1084
- *
1094
+ *
1085
1095
  * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted**
1086
1096
  *
1087
1097
  * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read
1088
1098
  *
1089
- * **Note**: The `options` parameter was introduced in Mailbox 1.8.
1099
+ * **Important**: The `options` parameter only applies to Outlook add-ins that implement the
1100
+ * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-on-send-addins | on-send feature}. It was introduced in Mailbox 1.8.
1090
1101
  *
1091
- * @param options Optional. An object that specifies behavior options for when the event is completed.
1102
+ * @param options Optional. An object that specifies the behavior of an on-send add-in in Outlook when it completes processing an `ItemSend` event.
1092
1103
  */
1093
1104
  completed(options?: EventCompletedOptions): void;
1094
1105
  }
1095
1106
  /**
1096
- * Specifies the behavior for when the event is completed.
1107
+ * Specifies the behavior of an {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-on-send-addins | on-send} add-in in Outlook
1108
+ * when it completes processing an `ItemSend` event.
1109
+ *
1110
+ * @remarks
1111
+ *
1112
+ * [Api set: Mailbox 1.8]
1113
+ *
1114
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted**
1115
+ *
1116
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
1097
1117
  */
1098
1118
  interface EventCompletedOptions {
1099
1119
  /**
1100
1120
  * When you use the {@link https://learn.microsoft.com/javascript/api/office/office.addincommands.event#office-office-addincommands-event-completed-member(1) | completed method}
1101
- * to signal completion of an event handler, this property indicates if the handled event should continue execution or be canceled.
1102
- * For example, an add-in that handles the `OnMessageSend` or `OnAppointmentSend` event can set `allowEvent` to `false` to cancel the
1103
- * sending of an item. For a complete sample, see the
1104
- * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough | Smart Alerts walkthrough}.
1105
- *
1106
- * **Important**: Only applicable to add-ins that implement {@link https://learn.microsoft.com/office/dev/add-ins/outlook/autolaunch | event-based activation}.
1121
+ * to signal completion of an event handler, this value indicates if the handled event should continue execution or be canceled.
1122
+ * For example, an on-send add-in that handles the `ItemSend` event can set `allowEvent` to `false` to cancel the sending of a message.
1107
1123
  *
1108
1124
  * @remarks
1109
1125
  *
1110
1126
  * [Api set: Mailbox 1.8]
1111
- *
1112
- * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **restricted**
1113
- *
1114
- * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
1115
- */
1116
- allowEvent?: boolean;
1117
- /**
1118
- * When you use the {@link https://learn.microsoft.com/javascript/api/office/office.addincommands.event#office-office-addincommands-event-completed-member(1) | completed method}
1119
- * to signal completion of an event handler and set its `allowEvent` property to `false`, this property sets the error message
1120
- * that will be displayed to the user. For an example, see the
1121
- * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough | Smart Alerts walkthrough}.
1122
1127
  *
1123
- * **Important**: Only applicable to add-ins that implement {@link https://learn.microsoft.com/office/dev/add-ins/outlook/autolaunch | event-based activation}.
1124
- *
1125
- * @remarks
1126
- *
1127
- * [Api set: Mailbox 1.12]
1128
- *
1129
1128
  * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **restricted**
1130
1129
  *
1131
1130
  * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
1132
1131
  */
1133
- errorMessage?: string;
1134
- /**
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
- * to signal that a reported message has finished processing, this property specifies the Outlook mailbox folder to which the message will be moved.
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-reporting feature}.
1139
- *
1140
- * @remarks
1141
- *
1142
- * [Api set: Mailbox preview]
1143
- *
1144
- * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **read item**
1145
- *
1146
- * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read
1147
- *
1148
- * **Important**:
1149
- *
1150
- * - If the specified folder doesn't exist yet, it will be created before the message is moved.
1151
- *
1152
- * - If the `postProcessingAction` property is set to `moveToCustomFolder`, the `folderName` property must be specified.
1153
- * Otherwise, the reported message is moved to the Junk Email folder of the mailbox. If `postProcessingAction` is set to another action other than `moveToCustomFolder`,
1154
- * the `folderName` property is ignored.
1155
- *
1156
- * @beta
1157
- */
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;
1186
- /**
1187
- * When set to `true`, deletes a reported message if an error occurs while the message is processed.
1188
- * If this property is set to `false` or isn't specified in the
1189
- * {@link https://learn.microsoft.com/javascript/api/office/office.addincommands.event#office-office-addincommands-event-completed-member(1) | completed method},
1190
- * the reported message remains in its current mailbox folder.
1191
- *
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}.
1193
- *
1194
- * @remarks
1195
- *
1196
- * [Api set: Mailbox preview]
1197
- *
1198
- * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **read item**
1199
- *
1200
- * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read
1201
- *
1202
- * @beta
1203
- */
1204
- onErrorDeleteItem?: boolean;
1132
+ allowEvent?: boolean;
1133
+ }
1134
+ /**
1135
+ * Encapsulates source data for add-in events.
1136
+ *
1137
+ * @remarks
1138
+ *
1139
+ * For information on support in Excel, Word, and PowerPoint, see
1140
+ * {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/add-in-commands-requirement-sets | Add-in commands requirement sets}.
1141
+ *
1142
+ * The following outlines support information for Outlook.
1143
+ *
1144
+ * [Api set: Mailbox 1.3]
1145
+ *
1146
+ * See {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/add-in-commands-requirement-sets | Add-in commands requirement sets} for more support information.
1147
+ *
1148
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **restricted**
1149
+ *
1150
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read
1151
+ */
1152
+ interface Source {
1205
1153
  /**
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}
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.
1209
- *
1210
- * - `delete` - Moves the reported message to the **Deleted Items** folder of the mailbox.
1211
- *
1212
- * - `moveToCustomFolder` - Moves the reported message to a specified folder. You must specify the name of the folder in the `folderName` property.
1213
- *
1214
- * - `moveToSpamFolder` - Moves the reported message to the **Junk Email** folder of the mailbox.
1215
- *
1216
- * - `noMove` - Leaves the reported message in its current folder.
1217
- *
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}.
1154
+ * The ID of the control that triggered calling this function. The ID comes from the manifest.
1219
1155
  *
1220
1156
  * @remarks
1221
1157
  *
1222
- * [Api set: Mailbox preview]
1223
- *
1224
- * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **read item**
1158
+ * The following outlines support information for Outlook.
1225
1159
  *
1226
- * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read
1227
- *
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.
1236
- *
1237
- * @beta
1238
- */
1239
- postProcessingAction?: string;
1240
- /**
1241
- * When you use the {@link https://learn.microsoft.com/javascript/api/office/office.addincommands.event#office-office-addincommands-event-completed-member(1) | completed method}
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
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.
1244
- *
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}.
1246
- *
1247
- * @remarks
1248
- *
1249
- * [Api set: Mailbox preview]
1160
+ * [Api set: Mailbox 1.3]
1250
1161
  *
1251
- * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **read item**
1162
+ * See {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/add-in-commands-requirement-sets | Add-in commands requirement sets} for more support information.
1252
1163
  *
1253
- * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read
1164
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **restricted**
1254
1165
  *
1255
- * @beta
1256
- */
1257
- showPostProcessingDialog?: object;
1258
- }
1259
- /**
1260
- * Encapsulates source data for add-in events.
1261
- */
1262
- interface Source {
1263
-
1264
- /**
1265
- * The ID of the control that triggered calling this function. The ID comes from the manifest.
1166
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read
1266
1167
  */
1267
1168
  id: string;
1268
1169
  }
@@ -9083,11 +8984,12 @@ declare namespace Office {
9083
8984
  * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read
9084
8985
  *
9085
8986
  * **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,
8987
+ * {@link https://learn.microsoft.com/javascript/api/outlook/office.spamreportingeventcompletedoptions?view=outlook-js-preview&preserve-view=true#outlook-office-spamreportingeventcompletedoptions-moveitemto-member | moveItemTo}
8988
+ * property of the {@link https://learn.microsoft.com/javascript/api/outlook/office.mailboxevent#outlook-office-mailboxevent-completed-member(1) | event.completed}
8989
+ * method. If you're on an Outlook on Windows version that only supports the `postProcessingAction` property,
9088
8990
  * 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}.
8991
+ * {@link https://learn.microsoft.com/javascript/api/outlook/office.spamreportingeventcompletedoptions?view=outlook-js-preview&preserve-view=true#outlook-office-spamreportingeventcompletedoptions-postprocessingaction-member |
8992
+ * Office.SpamReportingEventCompletedOptions.postProcessingAction}.
9091
8993
  *
9092
8994
  * @beta
9093
8995
  */
@@ -9809,6 +9711,29 @@ declare namespace Office {
9809
9711
  */
9810
9712
  Beta = "beta"
9811
9713
  }
9714
+ /**
9715
+ * Specifies the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough#available-send-mode-options | send mode option}
9716
+ * that overrides the option set in the manifest at runtime.
9717
+ *
9718
+ * For information on how to implement a Smart Alerts add-in, see
9719
+ * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough | Use Smart Alerts and the OnMessageSend and OnAppointmentSend events in your Outlook add-in}.
9720
+ *
9721
+ * @remarks
9722
+ * [Api set: Mailbox preview]
9723
+ *
9724
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
9725
+ *
9726
+ * @beta
9727
+ */
9728
+ enum SendModeOverride {
9729
+ /**
9730
+ * Provides the **Send Anyway** option in a Smart Alerts dialog when the mail item doesn't meet the conditions of the event-based add-in.
9731
+ * To learn more, see the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough#prompt-user | **prompt user** send mode option}.
9732
+ *
9733
+ * @beta
9734
+ */
9735
+ PromptUser = "promptUser"
9736
+ }
9812
9737
  /**
9813
9738
  * Specifies the source of the selected data in an item (see `Office.mailbox.item.getSelectedDataAsync` for details).
9814
9739
  *
@@ -15299,6 +15224,35 @@ declare namespace Office {
15299
15224
  */
15300
15225
  removeHandlerAsync(eventType: Office.EventType | string, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
15301
15226
  }
15227
+ /**
15228
+ * The `MailboxEvent` object is passed as an argument to the event handler of an add-in that implements
15229
+ * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/autolaunch | event-based activation}, including
15230
+ * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough | Smart Alerts},
15231
+ * or the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting | integrated spam-reporting feature}.
15232
+ * It allows the add-in to signify to the Outlook client that it has completed processing an event.
15233
+ *
15234
+ * @remarks
15235
+ * [Api set: Mailbox 1.10]
15236
+ *
15237
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted**
15238
+ *
15239
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read
15240
+ */
15241
+ interface MailboxEvent {
15242
+ /**
15243
+ * Indicates that the event-based or spam-reporting add-in has completed processing an event.
15244
+ *
15245
+ * @remarks
15246
+ * [Api set: Mailbox 1.10]
15247
+ *
15248
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted**
15249
+ *
15250
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read
15251
+ *
15252
+ * @param options - Optional. An object that specifies the behavior of an event-based or spam-reporting add-in when it completes processing an event.
15253
+ */
15254
+ completed(options?: SmartAlertsEventCompletedOptions | SpamReportingEventCompletedOptions): void;
15255
+ }
15302
15256
  /**
15303
15257
  * Represents the categories master list on the mailbox.
15304
15258
  *
@@ -19815,6 +19769,131 @@ declare namespace Office {
19815
19769
  */
19816
19770
  delegatePermissions: MailboxEnums.DelegatePermissions;
19817
19771
  }
19772
+ /**
19773
+ * Specifies the behavior of a {@link https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough | Smart Alerts add-in}
19774
+ * when it completes processing an `OnMessageSend` or `OnAppointmentSend` event.
19775
+ */
19776
+ interface SmartAlertsEventCompletedOptions {
19777
+ /**
19778
+ * When you use the {@link Office.MailboxEvent.completed | completed method} to signal completion of an event handler,
19779
+ * this value indicates if the handled event should continue execution or be canceled.
19780
+ * For example, an add-in that handles the `OnMessageSend` or `OnAppointmentSend` event can set `allowEvent` to `false` to cancel the sending of an item.
19781
+ * For a complete sample, see the
19782
+ * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough | Smart Alerts walkthrough}.
19783
+ *
19784
+ * @remarks
19785
+ *
19786
+ * [Api set: Mailbox 1.12]
19787
+ *
19788
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **restricted**
19789
+ *
19790
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
19791
+ */
19792
+ allowEvent?: boolean;
19793
+ /**
19794
+ * When you use the {@link Office.MailboxEvent.completed | completed method} to signal completion of an event handler and set its `allowEvent` property to `false`,
19795
+ * this property customizes the text of the **Don't Send** button in the Smart Alerts dialog. Custom text must be 20 characters or less.
19796
+ *
19797
+ * For an example, see the
19798
+ * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough#customize-the-dont-send-button-optional-preview | Smart Alerts walkthrough}.
19799
+ *
19800
+ * @remarks
19801
+ *
19802
+ * [Api set: Mailbox preview]
19803
+ *
19804
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **restricted**
19805
+ *
19806
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
19807
+ *
19808
+ * @beta
19809
+ */
19810
+ cancelLabel?: string;
19811
+ /**
19812
+ * When you use the {@link Office.MailboxEvent.completed | completed method} to signal completion of an event handler and set its `allowEvent` property to `false`,
19813
+ * this property specifies the ID of the task pane that opens when the **Don't Send** button is selected from the Smart Alerts dialog.
19814
+ *
19815
+ * For an example, see the
19816
+ * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough#customize-the-dont-send-button-optional-preview | Smart Alerts walkthrough}.
19817
+ *
19818
+ * @remarks
19819
+ *
19820
+ * [Api set: Mailbox preview]
19821
+ *
19822
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **restricted**
19823
+ *
19824
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
19825
+ *
19826
+ * **Important**:
19827
+ *
19828
+ * The `commandId` value must match the task pane ID specified in the manifest of your add-in. The markup depends on the type of manifest your
19829
+ * add-in uses.
19830
+ *
19831
+ * - **XML manifest**: The `id` attribute of the {@link https://learn.microsoft.com/javascript/api/manifest/control | Control} element representing the task pane.
19832
+ *
19833
+ * - **Unified manifest for Microsoft 365 (preview)**: The "id" property of the task pane command in the "controls" array.
19834
+ *
19835
+ * If you specify the `contextData` option in your `event.completed` call, you must also assign a task pane ID to the `commandId` option.
19836
+ * Otherwise, the JSON data assigned to `contextData` is ignored.
19837
+ *
19838
+ * @beta
19839
+ */
19840
+ commandId?: string;
19841
+ /**
19842
+ * When you use the {@link Office.MailboxEvent.completed | completed method} to signal completion of an event handler and set its `allowEvent` property to `false`,
19843
+ * this property specifies any JSON data passed to the add-in for processing when the **Don't Send** button is selected from the Smart Alerts dialog.
19844
+ *
19845
+ * @remarks
19846
+ *
19847
+ * [Api set: Mailbox preview]
19848
+ *
19849
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **restricted**
19850
+ *
19851
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
19852
+ *
19853
+ * **Important**: If you specify the `contextData` option in your `event.completed` call, you must also assign a task pane ID to the `commandId` option.
19854
+ * Otherwise, the JSON data assigned to `contextData` is ignored.
19855
+ *
19856
+ * @beta
19857
+ */
19858
+ contextData?: object;
19859
+ /**
19860
+ * When you use the {@link Office.MailboxEvent.completed | completed method} to signal completion of an event handler and set its `allowEvent` property
19861
+ * to `false`, this property sets the error message displayed to the user. For an example, see the
19862
+ * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough | Smart Alerts walkthrough}.
19863
+ *
19864
+ * @remarks
19865
+ *
19866
+ * [Api set: Mailbox 1.12]
19867
+ *
19868
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **restricted**
19869
+ *
19870
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
19871
+ */
19872
+ errorMessage?: string;
19873
+ /**
19874
+ * When you use the {@link Office.MailboxEvent.completed | completed method} to signal completion of an event handler
19875
+ * and set its `allowEvent` property to `false`, this property overrides the
19876
+ * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough#available-send-mode-options | send mode option}
19877
+ * specified in the manifest at runtime.
19878
+ *
19879
+ * For an example, see the
19880
+ * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough#override-the-send-mode-option-at-runtime-optional-preview | Smart Alerts walkthrough}.
19881
+ *
19882
+ * @remarks
19883
+ *
19884
+ * [Api set: Mailbox preview]
19885
+ *
19886
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **restricted**
19887
+ *
19888
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
19889
+ *
19890
+ * **Important**: Currently, `sendModeOverride` can only be set to the
19891
+ * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough#prompt-user | prompt user} option.
19892
+ *
19893
+ * @beta
19894
+ */
19895
+ sendModeOverride?: Office.MailboxEnums.SendModeOverride | string;
19896
+ }
19818
19897
  /**
19819
19898
  * Provides information about the `Office.EventType.SpamReporting` event that occurs when an unsolicited message is reported.
19820
19899
  *
@@ -19834,6 +19913,135 @@ declare namespace Office {
19834
19913
  */
19835
19914
  type: "SpamReporting";
19836
19915
  }
19916
+ /**
19917
+ * Specifies the behavior of an {@link https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting | integrated spam-reporting add-in}
19918
+ * after it completes processing a
19919
+ * {@link https://learn.microsoft.com/javascript/api/office/office.eventtype?view=outlook-js-preview&preserve-view=true#fields | SpamReporting} event.
19920
+ *
19921
+ * @remarks
19922
+ *
19923
+ * [Api set: Mailbox preview]
19924
+ *
19925
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item**
19926
+ *
19927
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read
19928
+ *
19929
+ * @beta
19930
+ */
19931
+ interface SpamReportingEventCompletedOptions {
19932
+ /**
19933
+ * When you use the {@link Office.MailboxEvent.completed | completed method} to signal that a reported message has finished processing,
19934
+ * this property specifies the Outlook mailbox folder to which the message will be moved.
19935
+ *
19936
+ * @remarks
19937
+ *
19938
+ * [Api set: Mailbox preview]
19939
+ *
19940
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **read item**
19941
+ *
19942
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read
19943
+ *
19944
+ * **Important**:
19945
+ *
19946
+ * - If the specified folder doesn't exist yet, it will be created before the message is moved.
19947
+ *
19948
+ * - If the `postProcessingAction` property is set to `moveToCustomFolder`, the `folderName` property must be specified.
19949
+ * Otherwise, the reported message is moved to the Junk Email folder of the mailbox. If `postProcessingAction` is set to another action other than `moveToCustomFolder`,
19950
+ * the `folderName` property is ignored.
19951
+ *
19952
+ * @beta
19953
+ */
19954
+ folderName?: string;
19955
+ /**
19956
+ * When you use the {@link Office.MailboxEvent.completed | completed method} to signal that a reported message has finished processing,
19957
+ * this property specifies whether the message is moved to a different folder in the mailbox.
19958
+ *
19959
+ * @remarks
19960
+ *
19961
+ * [Api set: Mailbox preview]
19962
+ *
19963
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **read item**
19964
+ *
19965
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read
19966
+ *
19967
+ * **Important**:
19968
+ *
19969
+ * In Outlook on Windows, you can only use this property in a spam-reporting add-in starting in Version 2308 (Build 16724.10000).
19970
+ * If you're using an earlier build that supports the integrated spam-reporting feature, use the `postProcessingAction`
19971
+ * property instead.
19972
+ *
19973
+ * If the property is set to `Office.MailboxEnums.MoveSpamItemTo.CustomFolder`, you must specify the name of the folder to which
19974
+ * the message will be moved in the `folderName` property of the `event.completed` call. Otherwise, the `moveItemTo` property will default to
19975
+ * `Office.MailboxEnums.MoveSpamItemTo.JunkFolder` and move the reported message to the **Junk Email** folder.
19976
+ *
19977
+ * @beta
19978
+ */
19979
+ moveItemTo?: Office.MailboxEnums.MoveSpamItemTo;
19980
+ /**
19981
+ * When set to `true`, deletes a reported message if an error occurs while the message is processed.
19982
+ * If this property is set to `false` or isn't specified in the {@link Office.MailboxEvent.completed | completed method},
19983
+ * the reported message remains in its current mailbox folder.
19984
+ *
19985
+ * @remarks
19986
+ *
19987
+ * [Api set: Mailbox preview]
19988
+ *
19989
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **read item**
19990
+ *
19991
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read
19992
+ *
19993
+ * @beta
19994
+ */
19995
+ onErrorDeleteItem?: boolean;
19996
+ /**
19997
+ * When you use the {@link Office.MailboxEvent.completed | completed method} to signal that a reported message has finished processing,
19998
+ * this property specifies whether the message is moved to a different folder in the mailbox. The following post-processing actions are available.
19999
+ *
20000
+ * - `delete` - Moves the reported message to the **Deleted Items** folder of the mailbox.
20001
+ *
20002
+ * - `moveToCustomFolder` - Moves the reported message to a specified folder. You must specify the name of the folder in the `folderName` property.
20003
+ *
20004
+ * - `moveToSpamFolder` - Moves the reported message to the **Junk Email** folder of the mailbox.
20005
+ *
20006
+ * - `noMove` - Leaves the reported message in its current folder.
20007
+ *
20008
+ * @remarks
20009
+ *
20010
+ * [Api set: Mailbox preview]
20011
+ *
20012
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **read item**
20013
+ *
20014
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read
20015
+ *
20016
+ * **Important**:
20017
+ *
20018
+ * In Outlook on Windows, you can only use this property in earlier builds that support the integrated spam-reporting feature.
20019
+ * If you're on Version 2308 (Build 16724.10000) or later, use the `moveItemTo` property instead.
20020
+ *
20021
+ * If the property is set to `moveToCustomFolder`, you must specify the name of the folder to which
20022
+ * the message will be moved in the `folderName` property of the `event.completed` call. Otherwise, the `postProcessingAction` property will default to
20023
+ * `moveToSpamFolder` and move the reported message to the **Junk Email** folder.
20024
+ *
20025
+ * @beta
20026
+ */
20027
+ postProcessingAction?: string;
20028
+ /**
20029
+ * When you use the {@link Office.MailboxEvent.completed | completed method} to signal that a reported message has finished processing,
20030
+ * this property indicates if a post-processing dialog is shown to the user. The JSON object assigned to this property must contain a title and a description.
20031
+ * If this property isn't specified, a dialog isn't shown to the user once their reported message is processed.
20032
+ *
20033
+ * @remarks
20034
+ *
20035
+ * [Api set: Mailbox preview]
20036
+ *
20037
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **read item**
20038
+ *
20039
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read
20040
+ *
20041
+ * @beta
20042
+ */
20043
+ showPostProcessingDialog?: object;
20044
+ }
19837
20045
  /**
19838
20046
  * Provides methods to get and set the subject of an appointment or message in an Outlook add-in.
19839
20047
  *
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/office-js-preview",
3
- "version": "1.0.409",
3
+ "version": "1.0.411",
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": "2f3fe95d1cc42e31b28d024a29ac81aaa7fd1cbe036f36f57fb1b10dbd92fb2e",
48
+ "typesPublisherContentHash": "fb9af49e6c8b0723529deee1945cd6cbe677b3b1b98e8ab59baae85d333ab9df",
49
49
  "typeScriptVersion": "4.3"
50
50
  }