@types/office-js-preview 1.0.402 → 1.0.403

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: Tue, 18 Jul 2023 19:32:54 GMT
11
+ * Last updated: Thu, 20 Jul 2023 21:02:47 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `Excel`, `Office`, `OfficeCore`, `OfficeExtension`, `OneNote`, `PowerPoint`, `Visio`, `Word`
14
14
 
@@ -231,7 +231,6 @@ declare namespace Office {
231
231
  */
232
232
  resolve(): Promise<void>;
233
233
  }
234
-
235
234
  /**
236
235
  * Gets the Context object that represents the runtime environment of the add-in and provides access to the top-level objects of the API.
237
236
  *
@@ -1063,7 +1062,6 @@ declare namespace Office {
1063
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.
1064
1063
  */
1065
1064
  source:Source;
1066
-
1067
1065
  /**
1068
1066
  * Indicates that the add-in has completed processing and will automatically be closed.
1069
1067
  *
@@ -1072,10 +1070,13 @@ declare namespace Office {
1072
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`).
1073
1071
  *
1074
1072
  * - An event defined in the {@link https://learn.microsoft.com/javascript/api/manifest/extensionpoint#launchevent | LaunchEvent extension point}.
1075
- * For example, an `OnMessageSend` event.
1073
+ * For example, an `OnMessageSend` event.
1076
1074
  *
1077
1075
  * - An {@link https://learn.microsoft.com/javascript/api/manifest/event | event} defined in the
1078
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)}.
1079
1080
  *
1080
1081
  * @remarks
1081
1082
  *
@@ -1091,18 +1092,19 @@ declare namespace Office {
1091
1092
  */
1092
1093
  completed(options?: EventCompletedOptions): void;
1093
1094
  }
1094
-
1095
1095
  /**
1096
1096
  * Specifies the behavior for when the event is completed.
1097
1097
  */
1098
1098
  interface EventCompletedOptions {
1099
1099
  /**
1100
- * When the {@link https://learn.microsoft.com/javascript/api/office/office.addincommands.event#office-office-addincommands-event-completed-member(1) | completed method}
1101
- * is used to signal completion of an event handler, this value indicates if the handled event should continue execution or be canceled.
1100
+ * 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
1102
  * For example, an add-in that handles the `OnMessageSend` or `OnAppointmentSend` event can set `allowEvent` to `false` to cancel the
1103
1103
  * sending of an item. For a complete sample, see the
1104
1104
  * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough | Smart Alerts walkthrough}.
1105
1105
  *
1106
+ * **Important**: Only applicable to add-ins that implement {@link https://learn.microsoft.com/office/dev/add-ins/outlook/autolaunch | event-based activation}.
1107
+ *
1106
1108
  * @remarks
1107
1109
  *
1108
1110
  * [Api set: Mailbox 1.8]
@@ -1111,14 +1113,15 @@ declare namespace Office {
1111
1113
  *
1112
1114
  * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
1113
1115
  */
1114
- allowEvent: boolean;
1115
-
1116
+ allowEvent?: boolean;
1116
1117
  /**
1117
- * When the {@link https://learn.microsoft.com/javascript/api/office/office.addincommands.event#office-office-addincommands-event-completed-member(1) | completed method}
1118
- * is used to signal completion of an event handler and if the `allowEvent` option is set to `false`, this value sets the error message
1119
- * that will be displayed to the user. For an example, see the
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
1120
1121
  * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough | Smart Alerts walkthrough}.
1121
1122
  *
1123
+ * **Important**: Only applicable to add-ins that implement {@link https://learn.microsoft.com/office/dev/add-ins/outlook/autolaunch | event-based activation}.
1124
+ *
1122
1125
  * @remarks
1123
1126
  *
1124
1127
  * [Api set: Mailbox 1.12]
@@ -1128,8 +1131,98 @@ declare namespace Office {
1128
1131
  * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
1129
1132
  */
1130
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 set to `true`, deletes a reported message if an error occurs while the message is processed.
1161
+ * If this property is set to `false` or isn't specified in the
1162
+ * {@link https://learn.microsoft.com/javascript/api/office/office.addincommands.event#office-office-addincommands-event-completed-member(1) | completed method},
1163
+ * the reported message remains in its current mailbox folder.
1164
+ *
1165
+ * **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
+ *
1167
+ * @remarks
1168
+ *
1169
+ * [Api set: Mailbox preview]
1170
+ *
1171
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **read item**
1172
+ *
1173
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read
1174
+ *
1175
+ * @beta
1176
+ */
1177
+ onErrorDeleteItem?: boolean;
1178
+ /**
1179
+ * 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 next action to be performed on the message. The following post-processing actions are available:
1181
+ *
1182
+ * - `delete` - Deletes the reported message.
1183
+ *
1184
+ * - `moveToCustomFolder` - Moves the reported message to a specified folder. You must specify the name of the folder in the `folderName` property.
1185
+ *
1186
+ * - `moveToSpamFolder` - Moves the reported message to the Junk Email folder of the mailbox.
1187
+ *
1188
+ * - `noMove` - Leaves the reported message in its current folder.
1189
+ *
1190
+ * **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
+ *
1192
+ * @remarks
1193
+ *
1194
+ * [Api set: Mailbox preview]
1195
+ *
1196
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **read item**
1197
+ *
1198
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read
1199
+ *
1200
+ * **Important**: If the property is set to `moveToCustomFolder`, you must specify the name of the folder to which the message will be moved in the `folderName`
1201
+ * property of the `event.completed` call. Otherwise, the `postProcessingAction` property will default to `moveToSpamFolder` and move the reported message to the
1202
+ * Junk Email folder.
1203
+ *
1204
+ * @beta
1205
+ */
1206
+ postProcessingAction?: string;
1207
+ /**
1208
+ * When you use the {@link https://learn.microsoft.com/javascript/api/office/office.addincommands.event#office-office-addincommands-event-completed-member(1) | completed method}
1209
+ * 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
+ * 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
+ *
1212
+ * **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
+ *
1214
+ * @remarks
1215
+ *
1216
+ * [Api set: Mailbox preview]
1217
+ *
1218
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **read item**
1219
+ *
1220
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read
1221
+ *
1222
+ * @beta
1223
+ */
1224
+ showPostProcessingDialog?: object;
1131
1225
  }
1132
-
1133
1226
  /**
1134
1227
  * Encapsulates source data for add-in events.
1135
1228
  */
@@ -1427,7 +1520,6 @@ declare namespace Office {
1427
1520
  */
1428
1521
  openBrowserWindow(url: string): void;
1429
1522
  }
1430
-
1431
1523
  /**
1432
1524
  * Provides information about which Requirement Sets are supported in the current environment.
1433
1525
  */
@@ -1450,7 +1542,6 @@ declare namespace Office {
1450
1542
  */
1451
1543
  isSetSupported(name: string, minVersionNumber?: number): boolean;
1452
1544
  }
1453
-
1454
1545
  /**
1455
1546
  * Provides options for how a dialog is displayed.
1456
1547
  */
@@ -1482,7 +1573,6 @@ declare namespace Office {
1482
1573
  */
1483
1574
  asyncContext?: any
1484
1575
  }
1485
-
1486
1576
  /**
1487
1577
  * The Office Auth namespace, `Office.auth`, provides a method that allows the Office client application to obtain an access token to the add-in's web application.
1488
1578
  * Indirectly, this also enables the add-in to access the signed-in user's Microsoft Graph data without requiring the user to sign in a second time.
@@ -2074,7 +2164,6 @@ declare namespace Office {
2074
2164
  */
2075
2165
  sendMessage(name: string): void;
2076
2166
  }
2077
-
2078
2167
  /**
2079
2168
  * Returns a promise of an object described in the expression. Callback is invoked only if the function fails.
2080
2169
  *
@@ -2446,6 +2535,15 @@ declare namespace Office {
2446
2535
  * **Applications**: Excel, PowerPoint, Word
2447
2536
  */
2448
2537
  SettingsChanged,
2538
+ /**
2539
+ * Occurs in Outlook when an unsolicited message is reported. The event handler receives an argument of type
2540
+ * {@link https://learn.microsoft.com/javascript/api/outlook/office.spamreportingeventargs?view=outlook-js-preview&preserve-view=true | Office.SpamReportingEventArgs}.
2541
+ *
2542
+ * [Api set: Mailbox preview]
2543
+ *
2544
+ * @beta
2545
+ */
2546
+ SpamReporting,
2449
2547
  /**
2450
2548
  * Triggers when a Task selection happens in Project.
2451
2549
  */
@@ -3020,7 +3118,6 @@ declare namespace Office {
3020
3118
  */
3021
3119
  setDataAsync(data: TableData | any, callback?: (result: AsyncResult<void>) => void): void;
3022
3120
  }
3023
-
3024
3121
  /**
3025
3122
  * Provides information about the binding that raised the DataChanged event.
3026
3123
  */
@@ -3035,7 +3132,6 @@ declare namespace Office {
3035
3132
  */
3036
3133
  type: EventType;
3037
3134
  }
3038
-
3039
3135
  /**
3040
3136
  * Provides information about the binding that raised the SelectionChanged event.
3041
3137
  */
@@ -3089,7 +3185,6 @@ declare namespace Office {
3089
3185
  */
3090
3186
  type: EventType;
3091
3187
  }
3092
-
3093
3188
  /**
3094
3189
  * Represents the bindings the add-in has within the document.
3095
3190
  */
@@ -3705,7 +3800,6 @@ declare namespace Office {
3705
3800
  */
3706
3801
  removeHandlerAsync(eventType: Office.EventType, handler?: (result: any) => void, callback?: (result: AsyncResult<void>) => void): void;
3707
3802
  }
3708
-
3709
3803
  /**
3710
3804
  * Provides information about the deleted node that raised the nodeDeleted event.
3711
3805
  */
@@ -3726,7 +3820,6 @@ declare namespace Office {
3726
3820
  */
3727
3821
  oldNode: CustomXmlNode;
3728
3822
  }
3729
-
3730
3823
  /**
3731
3824
  * Provides information about the inserted node that raised the nodeInserted event.
3732
3825
  */
@@ -3742,7 +3835,6 @@ declare namespace Office {
3742
3835
  */
3743
3836
  newNode: CustomXmlNode;
3744
3837
  }
3745
-
3746
3838
  /**
3747
3839
  * Provides information about the replaced node that raised the nodeReplaced event.
3748
3840
  */
@@ -3765,7 +3857,6 @@ declare namespace Office {
3765
3857
  */
3766
3858
  oldNode: CustomXmlNode;
3767
3859
  }
3768
-
3769
3860
  /**
3770
3861
  * Represents a collection of CustomXmlPart objects.
3771
3862
  *
@@ -17244,6 +17335,42 @@ declare namespace Office {
17244
17335
  * If the call fails, the `asyncResult.error` property will contain an error code with the reason for the failure.
17245
17336
  */
17246
17337
  getAllInternetHeadersAsync(callback?: (asyncResult: Office.AsyncResult<string>) => void): void;
17338
+ /**
17339
+ * Gets the current message in EML format encoded in Base64.
17340
+ *
17341
+ * @remarks
17342
+ * [Api set: Mailbox preview]
17343
+ *
17344
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item**
17345
+ *
17346
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read
17347
+ *
17348
+ * @param options - An object literal that contains one or more of the following properties:-
17349
+ * `asyncContext`: Developers can provide any object they wish to access in the callback function.
17350
+ * @param callback - When the method completes, the function passed in the callback parameter is called with a single parameter, `asyncResult`, which is an
17351
+ * `Office.AsyncResult` object. The Base64-encoded EML format of the message is returned in the `asyncResult.value` property. Any errors encountered are
17352
+ * returned in the `asyncResult.error` property.
17353
+ *
17354
+ * @beta
17355
+ */
17356
+ getAsFileAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult<string>) => void): void;
17357
+ /**
17358
+ * Gets the current message in EML format encoded in Base64.
17359
+ *
17360
+ * @remarks
17361
+ * [Api set: Mailbox preview]
17362
+ *
17363
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item**
17364
+ *
17365
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read
17366
+ *
17367
+ * @param callback - When the method completes, the function passed in the callback parameter is called with a single parameter, `asyncResult`, which is an
17368
+ * `Office.AsyncResult` object. The Base64-encoded EML format of the message is returned in the `asyncResult.value` property. Any errors encountered are
17369
+ * returned in the `asyncResult.error` property.
17370
+ *
17371
+ * @beta
17372
+ */
17373
+ getAsFileAsync(callback: (asyncResult: Office.AsyncResult<string>) => void): void;
17247
17374
  /**
17248
17375
  * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object.
17249
17376
  *
@@ -19612,6 +19739,25 @@ declare namespace Office {
19612
19739
  */
19613
19740
  delegatePermissions: MailboxEnums.DelegatePermissions;
19614
19741
  }
19742
+ /**
19743
+ * Provides information about the `Office.EventType.SpamReporting` event that occurs when an unsolicited message is reported.
19744
+ *
19745
+ * @remarks
19746
+ * [Api set: Mailbox preview]
19747
+ *
19748
+ * @beta
19749
+ */
19750
+ export interface SpamReportingEventArgs {
19751
+ /**
19752
+ * The type of event that was raised. For details, see {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType}.
19753
+ *
19754
+ * @remarks
19755
+ * [Api set: Mailbox preview]
19756
+ *
19757
+ * @beta
19758
+ */
19759
+ type: "SpamReporting";
19760
+ }
19615
19761
  /**
19616
19762
  * Provides methods to get and set the subject of an appointment or message in an Outlook add-in.
19617
19763
  *
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/office-js-preview",
3
- "version": "1.0.402",
3
+ "version": "1.0.403",
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": "a3545d6007c97f7cee291d7c5d89d3ef78859764061d65765aa8e3283d407122",
48
+ "typesPublisherContentHash": "9ea48e89ef1e30419184fdfd11eaf309bb032b35463f9149de643190ae155d6a",
49
49
  "typeScriptVersion": "4.3"
50
50
  }