@types/office-js 1.0.326 → 1.0.328

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/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.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Fri, 19 May 2023 21:32:51 GMT
11
+ * Last updated: Tue, 06 Jun 2023 23:02:52 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `Excel`, `Office`, `OfficeCore`, `OfficeExtension`, `OneNote`, `PowerPoint`, `Visio`, `Word`
14
14
 
office-js/index.d.ts CHANGED
@@ -1541,11 +1541,15 @@ declare namespace Office {
1541
1541
  * @remarks
1542
1542
  *
1543
1543
  * **Applications**: Excel, OneNote, Outlook, PowerPoint, Word
1544
- *
1544
+ *
1545
1545
  * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/identity-api-requirement-sets | IdentityAPI 1.3}
1546
- *
1547
- * **Important**: In Outlook, this API isn't supported if the add-in is loaded in an Outlook.com or Gmail mailbox.
1548
- *
1546
+ *
1547
+ * **Important**: In Outlook, this API isn't supported in the following scenarios.
1548
+ *
1549
+ * - If the add-in is loaded in an Outlook.com or Gmail mailbox.
1550
+ *
1551
+ * - If the add-in is loaded in Outlook on the web in the Safari browser. This results in error 13001 ("The user is not signed into Office").
1552
+ *
1549
1553
  * **Note**: In an Outlook event-based activation add-in, this API is supported in Outlook on Windows starting from Version 2111 (Build 14701.20000).
1550
1554
  * To retrieve an access token in older builds, use
1551
1555
  * {@link https://learn.microsoft.com/javascript/api/office-runtime/officeruntime.auth?view=common-js#office-runtime-officeruntime-auth-getaccesstoken-member(1) |
@@ -12136,10 +12140,6 @@ declare namespace Office {
12136
12140
  *
12137
12141
  * This method returns the entire current body in the format specified by `coercionType`.
12138
12142
  *
12139
- * When working with HTML-formatted bodies, it is important to note that the `Body.getAsync` and `Body.setAsync` methods are not idempotent.
12140
- * The value returned from the `getAsync` method will not necessarily be exactly the same as the value that was passed in the `setAsync` method previously.
12141
- * The client may modify the value passed to `setAsync` in order to make it render efficiently with its rendering engine.
12142
- *
12143
12143
  * @remarks
12144
12144
  * [Api set: Mailbox 1.3]
12145
12145
  *
@@ -12147,6 +12147,10 @@ declare namespace Office {
12147
12147
  *
12148
12148
  * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read
12149
12149
  *
12150
+ * **Important**: When working with HTML-formatted bodies, it's important to note that the value returned by the `Body.getAsync` method won't necessarily
12151
+ * be the exact same value that was previously passed in the `Body.setAsync` method. The client may modify the value passed to `setAsync` to make it
12152
+ * render efficiently with its rendering engine.
12153
+ *
12150
12154
  * @param coercionType - The format for the returned body.
12151
12155
  * @param options - An object literal that contains one or more of the following properties:-
12152
12156
  * `asyncContext`: Developers can provide any object they wish to access in the callback function.
@@ -12159,10 +12163,6 @@ declare namespace Office {
12159
12163
  *
12160
12164
  * This method returns the entire current body in the format specified by `coercionType`.
12161
12165
  *
12162
- * When working with HTML-formatted bodies, it is important to note that the `Body.getAsync` and `Body.setAsync` methods are not idempotent.
12163
- * The value returned from the `getAsync` method will not necessarily be exactly the same as the value that was passed in the `setAsync` method previously.
12164
- * The client may modify the value passed to `setAsync` in order to make it render efficiently with its rendering engine.
12165
- *
12166
12166
  * @remarks
12167
12167
  * [Api set: Mailbox 1.3]
12168
12168
  *
@@ -12170,6 +12170,10 @@ declare namespace Office {
12170
12170
  *
12171
12171
  * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read
12172
12172
  *
12173
+ * **Important**: When working with HTML-formatted bodies, it's important to note that the value returned by the `Body.getAsync` method won't necessarily
12174
+ * be the exact same value that was previously passed in the `Body.setAsync` method. The client may modify the value passed to `setAsync` to make it
12175
+ * render efficiently with its rendering engine.
12176
+ *
12173
12177
  * @param coercionType - The format for the returned body.
12174
12178
  * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter
12175
12179
  * of type Office.AsyncResult. The body is provided in the requested format in the `asyncResult.value` property.
@@ -12210,18 +12214,6 @@ declare namespace Office {
12210
12214
  /**
12211
12215
  * Adds the specified content to the beginning of the item body.
12212
12216
  *
12213
- * The `prependAsync` method inserts the specified string at the beginning of the item body.
12214
- * After insertion, the cursor is returned to its original place, relative to the inserted content.
12215
- *
12216
- * When working with HTML-formatted bodies, it's important to note that the client may modify the value passed to `prependAsync` in order to
12217
- * make it render efficiently with its rendering engine. This means that the value returned from a subsequent call to the `Body.getAsync` method
12218
- * (introduced in Mailbox 1.3) will not necessarily exactly contain the value that was passed in the `prependAsync` method previously.
12219
- *
12220
- * When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\<a\>) to "LPNoLP"
12221
- * (see the **Examples** section for a sample).
12222
- *
12223
- * **Recommended**: Call `getTypeAsync` then pass the returned value to the `options.coercionType` parameter.
12224
- *
12225
12217
  * @remarks
12226
12218
  * [Api set: Mailbox 1.1]
12227
12219
  *
@@ -12229,6 +12221,25 @@ declare namespace Office {
12229
12221
  *
12230
12222
  * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
12231
12223
  *
12224
+ * **Important**:
12225
+ *
12226
+ * - After the content is prepended, the position of the cursor depends on which client the add-in is running.
12227
+ *
12228
+ * - **Windows, Web**: The cursor position remains the same in the pre-existing content of the body. For example, if the cursor was positioned at the beginning
12229
+ * of the body prior to the `prependAsync` call, it will appear between the prepended content and the pre-existing content of the body after the call.
12230
+ *
12231
+ * - **Mac**: The cursor position isn't preserved. The cursor disappears after the `prependAsync` call and only reappears when the user selects something in the
12232
+ * body of the mail item.
12233
+ *
12234
+ * - When working with HTML-formatted bodies, it's important to note that the client may modify the value passed to `prependAsync` to
12235
+ * make it render efficiently with its rendering engine. This means that the value returned from a subsequent call to the `Body.getAsync` method
12236
+ * (introduced in Mailbox 1.3) won't necessarily contain the exact value that was passed in the previous `prependAsync` call.
12237
+ *
12238
+ * - When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\<a\>) to "LPNoLP"
12239
+ * (see the **Examples** section for a sample).
12240
+ *
12241
+ * **Recommended**: Call `getTypeAsync`, then pass the returned value to the `options.coercionType` parameter.
12242
+ *
12232
12243
  * **Errors**:
12233
12244
  *
12234
12245
  * - `DataExceedsMaximumSize`: The data parameter is longer than 1,000,000 characters.
@@ -12244,18 +12255,6 @@ declare namespace Office {
12244
12255
  /**
12245
12256
  * Adds the specified content to the beginning of the item body.
12246
12257
  *
12247
- * The `prependAsync` method inserts the specified string at the beginning of the item body.
12248
- * After insertion, the cursor is returned to its original place, relative to the inserted content.
12249
- *
12250
- * When working with HTML-formatted bodies, it's important to note that the client may modify the value passed to `prependAsync` in order to
12251
- * make it render efficiently with its rendering engine. This means that the value returned from a subsequent call to the `Body.getAsync` method
12252
- * (introduced in Mailbox 1.3) will not necessarily exactly contain the value that was passed in the `prependAsync` method previously.
12253
- *
12254
- * When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\<a\>) to "LPNoLP"
12255
- * (see the **Examples** section for a sample).
12256
- *
12257
- * **Recommended**: Call `getTypeAsync` then pass the returned value to the `options.coercionType` parameter.
12258
- *
12259
12258
  * @remarks
12260
12259
  * [Api set: Mailbox 1.1]
12261
12260
  *
@@ -12263,6 +12262,25 @@ declare namespace Office {
12263
12262
  *
12264
12263
  * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
12265
12264
  *
12265
+ * **Important**:
12266
+ *
12267
+ * - After the content is prepended, the position of the cursor depends on which client the add-in is running.
12268
+ *
12269
+ * - **Windows, Web**: The cursor position remains the same in the pre-existing content of the body. For example, if the cursor was positioned at the beginning
12270
+ * of the body prior to the `prependAsync` call, it will appear between the prepended content and the pre-existing content of the body after the call.
12271
+ *
12272
+ * - **Mac**: The cursor position isn't preserved. The cursor disappears after the `prependAsync` call and only reappears when the user selects something in the
12273
+ * body of the mail item.
12274
+ *
12275
+ * - When working with HTML-formatted bodies, it's important to note that the client may modify the value passed to `prependAsync` to
12276
+ * make it render efficiently with its rendering engine. This means that the value returned from a subsequent call to the `Body.getAsync` method
12277
+ * (introduced in Mailbox 1.3) won't necessarily contain the exact value that was passed in the previous `prependAsync` call.
12278
+ *
12279
+ * - When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\<a\>) to "LPNoLP"
12280
+ * (see the **Examples** section for a sample).
12281
+ *
12282
+ * **Recommended**: Call `getTypeAsync`, then pass the returned value to the `options.coercionType` parameter.
12283
+ *
12266
12284
  * **Errors**:
12267
12285
  *
12268
12286
  * - `DataExceedsMaximumSize`: The data parameter is longer than 1,000,000 characters.
@@ -12354,17 +12372,6 @@ declare namespace Office {
12354
12372
  /**
12355
12373
  * Replaces the entire body with the specified text.
12356
12374
  *
12357
- * When working with HTML-formatted bodies, it is important to note that the `Body.getAsync` and `Body.setAsync` methods are not idempotent.
12358
- * The value returned from the `getAsync` method will not necessarily be exactly the same as the value that was passed in the `setAsync` method
12359
- * previously. The client may modify the value passed to `setAsync` in order to make it render efficiently with its rendering engine.
12360
- *
12361
- * When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\<a\>) to "LPNoLP"
12362
- * (see the **Examples** section for a sample).
12363
- *
12364
- * **Recommended**: Call `getTypeAsync` then pass the returned value to the `options.coercionType` parameter.
12365
- *
12366
- * **Important**: In Outlook on Windows and on Mac, the add-in user won't be able to revert this action with the **Undo** command.
12367
- *
12368
12375
  * @remarks
12369
12376
  * [Api set: Mailbox 1.3]
12370
12377
  *
@@ -12372,6 +12379,28 @@ declare namespace Office {
12372
12379
  *
12373
12380
  * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
12374
12381
  *
12382
+ * **Important**:
12383
+ *
12384
+ * - After the body is replaced with the specified content, the position of the cursor depends on which client the add-in is running.
12385
+ *
12386
+ * - **Windows**: The cursor appears at the beginning of the body of the mail item.
12387
+ *
12388
+ * - **Mac**: The cursor position isn't preserved. The cursor disappears after the `prependAsync` call and only reappears when the user selects something in the
12389
+ * body of the mail item.
12390
+ *
12391
+ * - **Web**: The cursor appears at the end of the body of the mail item.
12392
+ *
12393
+ * - When working with HTML-formatted bodies, it's important to note that the value returned by the `Body.getAsync` method won't necessarily
12394
+ * be the exact same value that was previously passed in the `Body.setAsync` method. The client may modify the value passed to `setAsync` to make it
12395
+ * render efficiently with its rendering engine.
12396
+ *
12397
+ * - When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\<a\>) to "LPNoLP"
12398
+ * (see the **Examples** section for a sample).
12399
+ *
12400
+ * - In Outlook on Windows and on Mac, the add-in user isn't able to revert this action with the **Undo** command.
12401
+ *
12402
+ * **Recommended**: Call `getTypeAsync`, then pass the returned value to the `options.coercionType` parameter.
12403
+ *
12375
12404
  * **Errors**:
12376
12405
  *
12377
12406
  * - `DataExceedsMaximumSize`: The data parameter is longer than 1,000,000 characters.
@@ -12389,17 +12418,6 @@ declare namespace Office {
12389
12418
  /**
12390
12419
  * Replaces the entire body with the specified text.
12391
12420
  *
12392
- * When working with HTML-formatted bodies, it is important to note that the `Body.getAsync` and `Body.setAsync` methods are not idempotent.
12393
- * The value returned from the `getAsync` method will not necessarily be exactly the same as the value that was passed in the `setAsync` method
12394
- * previously. The client may modify the value passed to `setAsync` in order to make it render efficiently with its rendering engine.
12395
- *
12396
- * When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\<a\>) to "LPNoLP"
12397
- * (see the **Examples** section for a sample).
12398
- *
12399
- * **Recommended**: Call `getTypeAsync` then pass the returned value to the `options.coercionType` parameter.
12400
- *
12401
- * **Important**: In Outlook on Windows and on Mac, the add-in user won't be able to revert this action with the **Undo** command.
12402
- *
12403
12421
  * @remarks
12404
12422
  * [Api set: Mailbox 1.3]
12405
12423
  *
@@ -12407,6 +12425,28 @@ declare namespace Office {
12407
12425
  *
12408
12426
  * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
12409
12427
  *
12428
+ * **Important**:
12429
+ *
12430
+ * - After the body is replaced with the specified content, the position of the cursor depends on which client the add-in is running.
12431
+ *
12432
+ * - **Windows**: The cursor appears at the beginning of the body of the mail item.
12433
+ *
12434
+ * - **Mac**: The cursor position isn't preserved. The cursor disappears after the `prependAsync` call and only reappears when the user selects something in the
12435
+ * body of the mail item.
12436
+ *
12437
+ * - **Web**: The cursor appears at the end of the body of the mail item.
12438
+ *
12439
+ * - When working with HTML-formatted bodies, it's important to note that the value returned by the `Body.getAsync` method won't necessarily
12440
+ * be the exact same value that was previously passed in the `Body.setAsync` method. The client may modify the value passed to `setAsync` to make it
12441
+ * render efficiently with its rendering engine.
12442
+ *
12443
+ * - When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\<a\>) to "LPNoLP"
12444
+ * (see the **Examples** section for a sample).
12445
+ *
12446
+ * - In Outlook on Windows and on Mac, the add-in user isn't able to revert this action with the **Undo** command.
12447
+ *
12448
+ * **Recommended**: Call `getTypeAsync`, then pass the returned value to the `options.coercionType` parameter.
12449
+ *
12410
12450
  * **Errors**:
12411
12451
  *
12412
12452
  * - `DataExceedsMaximumSize`: The data parameter is longer than 1,000,000 characters.
office-js/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/office-js",
3
- "version": "1.0.326",
3
+ "version": "1.0.328",
4
4
  "description": "TypeScript definitions for Office.js",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/office-js",
6
6
  "license": "MIT",
@@ -45,6 +45,6 @@
45
45
  },
46
46
  "scripts": {},
47
47
  "dependencies": {},
48
- "typesPublisherContentHash": "2c3dcff7de23fbd7f636ba92a42fc86f69d57d663630bc1770793ec5a1ed7833",
48
+ "typesPublisherContentHash": "241809be6e9b550afa2f9adbbac21123be3e724db8de4d44b354a261eddc0655",
49
49
  "typeScriptVersion": "4.3"
50
50
  }