@types/office-js-preview 1.0.267 → 1.0.271

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: Mon, 08 Nov 2021 22:01:42 GMT
11
+ * Last updated: Fri, 03 Dec 2021 19:01:09 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `Excel`, `Office`, `OfficeCore`, `OfficeExtension`, `OneNote`, `PowerPoint`, `Visio`, `Word`
14
14
 
@@ -607,12 +607,12 @@ declare namespace Office {
607
607
  */
608
608
  hide(): Promise<void>;
609
609
  /**
610
- * Adds a listener for the `onVisibilityModeChanged` event.
611
- * @param listener - The listener function that is called when the event is emitted. This function takes in a message for the receiving component.
612
- * @returns A promise that resolves to a function when the listener is added. Calling it removes the listener.
610
+ * Adds a handler for the `onVisibilityModeChanged` event.
611
+ * @param handler - The handler function that is called when the event is emitted. This function takes in a message for the receiving component.
612
+ * @returns A promise that resolves to a function when the handler is added. Calling it removes the handler.
613
613
  */
614
614
  onVisibilityModeChanged(
615
- listener: (message: VisibilityModeChangedMessage) => void,
615
+ handler: (message: VisibilityModeChangedMessage) => void,
616
616
  ): Promise<() => Promise<void>>;
617
617
 
618
618
  /**
@@ -657,7 +657,7 @@ declare namespace Office {
657
657
  * This event handler will be triggered if one of the following conditions is met:
658
658
  * 1. When the notification dialog is open, the end user clicks the **Don't close** button within the dialog, clicks the Close button in the upper right corner of the dialog, or presses the Esc key.
659
659
  * 2. When the add-in calls the `enable` method on the `BeforeDocumentCloseNotification` object.
660
- * @param listener The event handler that is called when the dialog is cancelled.
660
+ * @param handler The event handler that is called when the dialog is cancelled.
661
661
  * @returns A promise that resolves when the event handler is added.
662
662
  *
663
663
  * @remarks
@@ -665,7 +665,7 @@ declare namespace Office {
665
665
  * @beta
666
666
  */
667
667
  onCloseActionCancelled(
668
- listener: () => void
668
+ handler: () => void
669
669
  ): Promise<() => Promise<void>>;
670
670
  }
671
671
  /**
@@ -1078,10 +1078,24 @@ declare namespace Office {
1078
1078
  *
1079
1079
  * @param eventType Specifies the type of event to add. This must be `Office.EventType.DialogParentMessageReceived`.
1080
1080
  * @param handler The event handler function to add, whose only parameter is of type {@link Office.DialogParentMessageReceivedEventArgs}.
1081
- * @param options Optional. Provides an option for preserving context data of any type, unchanged, for use in a callback.
1081
+ * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback.
1082
1082
  * @param callback Optional. A function that is invoked when the handler registration returns, whose only parameter is of type {@link Office.AsyncResult}.
1083
1083
  */
1084
- addHandlerAsync(eventType: Office.EventType, handler: (result: DialogParentMessageReceivedEventArgs) => void, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult<void>) => void): void;
1084
+ addHandlerAsync(eventType: Office.EventType, handler: (result: DialogParentMessageReceivedEventArgs) => void, options: Office.AsyncContextOptions, callback?: (result: AsyncResult<void>) => void): void;
1085
+ /**
1086
+ * Adds an event handler to the object using the specified event type.
1087
+ *
1088
+ * @remarks
1089
+ *
1090
+ * **Requirement set**: {@link https://docs.microsoft.com/office/dev/add-ins/reference/requirement-sets/dialog-api-requirement-sets | DialogApi 1.2}
1091
+ *
1092
+ * You can add multiple event handlers for the specified event type as long as the name of each event handler function is unique.
1093
+ *
1094
+ * @param eventType Specifies the type of event to add. This must be `Office.EventType.DialogParentMessageReceived`.
1095
+ * @param handler The event handler function to add, whose only parameter is of type {@link Office.DialogParentMessageReceivedEventArgs}.
1096
+ * @param callback Optional. A function that is invoked when the handler registration returns, whose only parameter is of type {@link Office.AsyncResult}.
1097
+ */
1098
+ addHandlerAsync(eventType: Office.EventType, handler: (result: DialogParentMessageReceivedEventArgs) => void, callback?: (result: AsyncResult<void>) => void): void;
1085
1099
  /**
1086
1100
  * Displays a dialog to show or collect information from the user or to facilitate Web navigation.
1087
1101
  *
@@ -9712,6 +9726,8 @@ declare namespace Office {
9712
9726
  /**
9713
9727
  * Manages the {@link Office.SessionData | SessionData} of an item in Compose mode.
9714
9728
  *
9729
+ * **Important**: The entire SessionData object is limited to 50,000 characters per add-in.
9730
+ *
9715
9731
  * @remarks
9716
9732
  * [Api set: Mailbox 1.11]
9717
9733
  *
@@ -10524,6 +10540,9 @@ declare namespace Office {
10524
10540
  * appointment on the user's calendar. For new appointments that have not been saved before, no invitation will be sent.
10525
10541
  * Saving an existing appointment will send an update to added or removed attendees.
10526
10542
  *
10543
+ * When working with HTML-formatted content, it's important to note that the Outlook client may modify the content. This means that
10544
+ * subsequent calls to methods like `Body.getAsync`, `Body.setAsync`, and even `saveAsync` may not result in the same content.
10545
+ *
10527
10546
  * **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
10528
10547
  * that when Outlook is in cached mode, it may take some time before the item is actually synced to the server.
10529
10548
  * Until the item is synced, using the item ID will return an error.
@@ -10559,6 +10578,9 @@ declare namespace Office {
10559
10578
  * appointment on the user's calendar. For new appointments that have not been saved before, no invitation will be sent.
10560
10579
  * Saving an existing appointment will send an update to added or removed attendees.
10561
10580
  *
10581
+ * When working with HTML-formatted content, it's important to note that the Outlook client may modify the content. This means that
10582
+ * subsequent calls to methods like `Body.getAsync`, `Body.setAsync`, and even `saveAsync` may not result in the same content.
10583
+ *
10562
10584
  * **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 that
10563
10585
  * when Outlook is in cached mode, it may take some time before the item is actually synced to the server.
10564
10586
  * Until the item is synced, using the item ID will return an error.
@@ -11962,6 +11984,8 @@ declare namespace Office {
11962
11984
  *
11963
11985
  * **Important**: To use `appendOnSendAsync`, the `ExtendedPermissions` manifest node must include the `AppendOnSend` extended permission.
11964
11986
  *
11987
+ * **Recommended**: Call `getTypeAsync` then pass the returned value to the `options.coercionType` parameter.
11988
+ *
11965
11989
  * **Note**: To clear data from a previous `appendOnSendAsync` call, you can call it again with the `data` parameter set to `null`.
11966
11990
  *
11967
11991
  * @remarks
@@ -11997,6 +12021,8 @@ declare namespace Office {
11997
12021
  *
11998
12022
  * **Important**: To use `appendOnSendAsync`, the `ExtendedPermissions` manifest node must include the `AppendOnSend` extended permission.
11999
12023
  *
12024
+ * **Recommended**: Call `getTypeAsync` then pass the returned value to the `options.coercionType` parameter.
12025
+ *
12000
12026
  * **Note**: To clear data from a previous `appendOnSendAsync` call, you can call it again with the `data` parameter set to `null`.
12001
12027
  *
12002
12028
  * @remarks
@@ -12106,6 +12132,8 @@ declare namespace Office {
12106
12132
  * When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\<a\>) to "LPNoLP"
12107
12133
  * (see the **Examples** section for a sample).
12108
12134
  *
12135
+ * **Recommended**: Call `getTypeAsync` then pass the returned value to the `options.coercionType` parameter.
12136
+ *
12109
12137
  * @remarks
12110
12138
  * [Api set: Mailbox 1.1]
12111
12139
  *
@@ -12138,6 +12166,8 @@ declare namespace Office {
12138
12166
  * When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\<a\>) to "LPNoLP"
12139
12167
  * (see the **Examples** section for a sample).
12140
12168
  *
12169
+ * **Recommended**: Call `getTypeAsync` then pass the returned value to the `options.coercionType` parameter.
12170
+ *
12141
12171
  * @remarks
12142
12172
  * [Api set: Mailbox 1.1]
12143
12173
  *
@@ -12164,6 +12194,10 @@ declare namespace Office {
12164
12194
  * When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\<a\>) to "LPNoLP"
12165
12195
  * (see the **Examples** section for a sample).
12166
12196
  *
12197
+ * **Recommended**: Call `getTypeAsync` then pass the returned value to the `options.coercionType` parameter.
12198
+ *
12199
+ * **Important**: In Outlook on Windows and on Mac, the add-in user won't be able to revert this action with the **Undo** command.
12200
+ *
12167
12201
  * @remarks
12168
12202
  * [Api set: Mailbox 1.3]
12169
12203
  *
@@ -12195,6 +12229,10 @@ declare namespace Office {
12195
12229
  * When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\<a\>) to "LPNoLP"
12196
12230
  * (see the **Examples** section for a sample).
12197
12231
  *
12232
+ * **Recommended**: Call `getTypeAsync` then pass the returned value to the `options.coercionType` parameter.
12233
+ *
12234
+ * **Important**: In Outlook on Windows and on Mac, the add-in user won't be able to revert this action with the **Undo** command.
12235
+ *
12198
12236
  * @remarks
12199
12237
  * [Api set: Mailbox 1.3]
12200
12238
  *
@@ -12223,6 +12261,8 @@ declare namespace Office {
12223
12261
  * When including links in HTML markup, you can disable online link preview by setting the id attribute on the anchor (\<a\>) to "LPNoLP"
12224
12262
  * (see the **Examples** section for a sample).
12225
12263
  *
12264
+ * **Recommended**: Call `getTypeAsync` then pass the returned value to the `options.coercionType` parameter.
12265
+ *
12226
12266
  * @remarks
12227
12267
  * [Api set: Mailbox 1.1]
12228
12268
  *
@@ -12254,6 +12294,8 @@ declare namespace Office {
12254
12294
  * When including links in HTML markup, you can disable online link preview by setting the id attribute on the anchor (\<a\>) to "LPNoLP"
12255
12295
  * (see the **Examples** section for a sample).
12256
12296
  *
12297
+ * **Recommended**: Call `getTypeAsync` then pass the returned value to the `options.coercionType` parameter.
12298
+ *
12257
12299
  * @remarks
12258
12300
  * [Api set: Mailbox 1.1]
12259
12301
  *
@@ -14784,6 +14826,8 @@ declare namespace Office {
14784
14826
  /**
14785
14827
  * Manages the {@link Office.SessionData | SessionData} of an item in Compose mode.
14786
14828
  *
14829
+ * **Important**: The entire SessionData object is limited to 50,000 characters per add-in.
14830
+ *
14787
14831
  * @remarks
14788
14832
  * [Api set: Mailbox 1.11]
14789
14833
  *
@@ -15664,6 +15708,9 @@ declare namespace Office {
15664
15708
  * appointment on the user's calendar. For new appointments that have not been saved before, no invitation will be sent.
15665
15709
  * Saving an existing appointment will send an update to added or removed attendees.
15666
15710
  *
15711
+ * When working with HTML-formatted content, it's important to note that the Outlook client may modify the content. This means that
15712
+ * subsequent calls to methods like `Body.getAsync`, `Body.setAsync`, and even `saveAsync` may not result in the same content.
15713
+ *
15667
15714
  * **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
15668
15715
  * that when Outlook is in cached mode, it may take some time before the item is actually synced to the server.
15669
15716
  * Until the item is synced, using the itemId will return an error.
@@ -15696,6 +15743,9 @@ declare namespace Office {
15696
15743
  * appointment on the user's calendar. For new appointments that have not been saved before, no invitation will be sent.
15697
15744
  * Saving an existing appointment will send an update to added or removed attendees.
15698
15745
  *
15746
+ * When working with HTML-formatted content, it's important to note that the Outlook client may modify the content. This means that
15747
+ * subsequent calls to methods like `Body.getAsync`, `Body.setAsync`, and even `saveAsync` may not result in the same content.
15748
+ *
15699
15749
  * **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
15700
15750
  * that when Outlook is in cached mode, it may take some time before the item is actually synced to the server.
15701
15751
  * Until the item is synced, using the `itemId` will return an error.
@@ -18193,7 +18243,9 @@ declare namespace Office {
18193
18243
  setStartTime(time: string): void;
18194
18244
  }
18195
18245
  /**
18196
- * Provides methods to manage an item's session data.
18246
+ * Provides methods to manage an item's session data.
18247
+ *
18248
+ * **Important**: The entire SessionData object is limited to 50,000 characters per add-in.
18197
18249
  *
18198
18250
  * @remarks
18199
18251
  * [Api set: Mailbox 1.11]
@@ -18297,6 +18349,8 @@ declare namespace Office {
18297
18349
  /**
18298
18350
  * Sets a session data key-value pair.
18299
18351
  *
18352
+ * **Important**: The entire SessionData object is limited to 50,000 characters per add-in.
18353
+ *
18300
18354
  * @remarks
18301
18355
  * [Api set: Mailbox 1.11]
18302
18356
  *
@@ -18315,6 +18369,8 @@ declare namespace Office {
18315
18369
  /**
18316
18370
  * Sets a session data key-value pair.
18317
18371
  *
18372
+ * **Important**: The entire SessionData object is limited to 50,000 characters per add-in.
18373
+ *
18318
18374
  * @remarks
18319
18375
  * [Api set: Mailbox 1.11]
18320
18376
  *
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/office-js-preview",
3
- "version": "1.0.267",
3
+ "version": "1.0.271",
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",
@@ -40,6 +40,6 @@
40
40
  },
41
41
  "scripts": {},
42
42
  "dependencies": {},
43
- "typesPublisherContentHash": "b0c3bbab29cdf1d5f7472e9b980a09b896e6fc80880ab136046b53e694430074",
44
- "typeScriptVersion": "3.7"
43
+ "typesPublisherContentHash": "de34b23aa02f883d8af3ad56cbecf1c9ae0fc4880eb6d7c677336e52912793fa",
44
+ "typeScriptVersion": "3.8"
45
45
  }