@types/office-js-preview 1.0.388 → 1.0.390

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, 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
 
@@ -1549,9 +1549,13 @@ declare namespace Office {
1549
1549
  * **Applications**: Excel, OneNote, Outlook, PowerPoint, Word
1550
1550
  *
1551
1551
  * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/identity-api-requirement-sets | IdentityAPI 1.3}
1552
- *
1553
- * **Important**: In Outlook, this API isn't supported if the add-in is loaded in an Outlook.com or Gmail mailbox.
1554
- *
1552
+ *
1553
+ * **Important**: In Outlook, this API isn't supported in the following scenarios.
1554
+ *
1555
+ * - If the add-in is loaded in an Outlook.com or Gmail mailbox.
1556
+ *
1557
+ * - 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").
1558
+ *
1555
1559
  * **Note**: In an Outlook event-based activation add-in, this API is supported in Outlook on Windows starting from Version 2111 (Build 14701.20000).
1556
1560
  * To retrieve an access token in older builds, use
1557
1561
  * {@link https://learn.microsoft.com/javascript/api/office-runtime/officeruntime.auth?view=common-js-preview#office-runtime-officeruntime-auth-getaccesstoken-member(1) |
@@ -12265,10 +12269,6 @@ declare namespace Office {
12265
12269
  *
12266
12270
  * This method returns the entire current body in the format specified by `coercionType`.
12267
12271
  *
12268
- * When working with HTML-formatted bodies, it is important to note that the `Body.getAsync` and `Body.setAsync` methods are not idempotent.
12269
- * 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.
12270
- * The client may modify the value passed to `setAsync` in order to make it render efficiently with its rendering engine.
12271
- *
12272
12272
  * @remarks
12273
12273
  * [Api set: Mailbox 1.3]
12274
12274
  *
@@ -12276,6 +12276,10 @@ declare namespace Office {
12276
12276
  *
12277
12277
  * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read
12278
12278
  *
12279
+ * **Important**: When working with HTML-formatted bodies, it's important to note that the value returned by the `Body.getAsync` method won't necessarily
12280
+ * 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
12281
+ * render efficiently with its rendering engine.
12282
+ *
12279
12283
  * @param coercionType - The format for the returned body.
12280
12284
  * @param options - An object literal that contains one or more of the following properties:-
12281
12285
  * `asyncContext`: Developers can provide any object they wish to access in the callback function.
@@ -12288,10 +12292,6 @@ declare namespace Office {
12288
12292
  *
12289
12293
  * This method returns the entire current body in the format specified by `coercionType`.
12290
12294
  *
12291
- * When working with HTML-formatted bodies, it is important to note that the `Body.getAsync` and `Body.setAsync` methods are not idempotent.
12292
- * 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.
12293
- * The client may modify the value passed to `setAsync` in order to make it render efficiently with its rendering engine.
12294
- *
12295
12295
  * @remarks
12296
12296
  * [Api set: Mailbox 1.3]
12297
12297
  *
@@ -12299,6 +12299,10 @@ declare namespace Office {
12299
12299
  *
12300
12300
  * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read
12301
12301
  *
12302
+ * **Important**: When working with HTML-formatted bodies, it's important to note that the value returned by the `Body.getAsync` method won't necessarily
12303
+ * 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
12304
+ * render efficiently with its rendering engine.
12305
+ *
12302
12306
  * @param coercionType - The format for the returned body.
12303
12307
  * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter
12304
12308
  * of type Office.AsyncResult. The body is provided in the requested format in the `asyncResult.value` property.
@@ -12339,18 +12343,6 @@ declare namespace Office {
12339
12343
  /**
12340
12344
  * Adds the specified content to the beginning of the item body.
12341
12345
  *
12342
- * The `prependAsync` method inserts the specified string at the beginning of the item body.
12343
- * After insertion, the cursor is returned to its original place, relative to the inserted content.
12344
- *
12345
- * When working with HTML-formatted bodies, it's important to note that the client may modify the value passed to `prependAsync` in order to
12346
- * make it render efficiently with its rendering engine. This means that the value returned from a subsequent call to the `Body.getAsync` method
12347
- * (introduced in Mailbox 1.3) will not necessarily exactly contain the value that was passed in the `prependAsync` method previously.
12348
- *
12349
- * When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\<a\>) to "LPNoLP"
12350
- * (see the **Examples** section for a sample).
12351
- *
12352
- * **Recommended**: Call `getTypeAsync` then pass the returned value to the `options.coercionType` parameter.
12353
- *
12354
12346
  * @remarks
12355
12347
  * [Api set: Mailbox 1.1]
12356
12348
  *
@@ -12358,6 +12350,25 @@ declare namespace Office {
12358
12350
  *
12359
12351
  * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
12360
12352
  *
12353
+ * **Important**:
12354
+ *
12355
+ * - After the content is prepended, the position of the cursor depends on which client the add-in is running.
12356
+ *
12357
+ * - **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
12358
+ * 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.
12359
+ *
12360
+ * - **Mac**: The cursor position isn't preserved. The cursor disappears after the `prependAsync` call and only reappears when the user selects something in the
12361
+ * body of the mail item.
12362
+ *
12363
+ * - When working with HTML-formatted bodies, it's important to note that the client may modify the value passed to `prependAsync` to
12364
+ * make it render efficiently with its rendering engine. This means that the value returned from a subsequent call to the `Body.getAsync` method
12365
+ * (introduced in Mailbox 1.3) won't necessarily contain the exact value that was passed in the previous `prependAsync` call.
12366
+ *
12367
+ * - When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\<a\>) to "LPNoLP"
12368
+ * (see the **Examples** section for a sample).
12369
+ *
12370
+ * **Recommended**: Call `getTypeAsync`, then pass the returned value to the `options.coercionType` parameter.
12371
+ *
12361
12372
  * **Errors**:
12362
12373
  *
12363
12374
  * - `DataExceedsMaximumSize`: The data parameter is longer than 1,000,000 characters.
@@ -12373,18 +12384,6 @@ declare namespace Office {
12373
12384
  /**
12374
12385
  * Adds the specified content to the beginning of the item body.
12375
12386
  *
12376
- * The `prependAsync` method inserts the specified string at the beginning of the item body.
12377
- * After insertion, the cursor is returned to its original place, relative to the inserted content.
12378
- *
12379
- * When working with HTML-formatted bodies, it's important to note that the client may modify the value passed to `prependAsync` in order to
12380
- * make it render efficiently with its rendering engine. This means that the value returned from a subsequent call to the `Body.getAsync` method
12381
- * (introduced in Mailbox 1.3) will not necessarily exactly contain the value that was passed in the `prependAsync` method previously.
12382
- *
12383
- * When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\<a\>) to "LPNoLP"
12384
- * (see the **Examples** section for a sample).
12385
- *
12386
- * **Recommended**: Call `getTypeAsync` then pass the returned value to the `options.coercionType` parameter.
12387
- *
12388
12387
  * @remarks
12389
12388
  * [Api set: Mailbox 1.1]
12390
12389
  *
@@ -12392,6 +12391,25 @@ declare namespace Office {
12392
12391
  *
12393
12392
  * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
12394
12393
  *
12394
+ * **Important**:
12395
+ *
12396
+ * - After the content is prepended, the position of the cursor depends on which client the add-in is running.
12397
+ *
12398
+ * - **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
12399
+ * 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.
12400
+ *
12401
+ * - **Mac**: The cursor position isn't preserved. The cursor disappears after the `prependAsync` call and only reappears when the user selects something in the
12402
+ * body of the mail item.
12403
+ *
12404
+ * - When working with HTML-formatted bodies, it's important to note that the client may modify the value passed to `prependAsync` to
12405
+ * make it render efficiently with its rendering engine. This means that the value returned from a subsequent call to the `Body.getAsync` method
12406
+ * (introduced in Mailbox 1.3) won't necessarily contain the exact value that was passed in the previous `prependAsync` call.
12407
+ *
12408
+ * - When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\<a\>) to "LPNoLP"
12409
+ * (see the **Examples** section for a sample).
12410
+ *
12411
+ * **Recommended**: Call `getTypeAsync`, then pass the returned value to the `options.coercionType` parameter.
12412
+ *
12395
12413
  * **Errors**:
12396
12414
  *
12397
12415
  * - `DataExceedsMaximumSize`: The data parameter is longer than 1,000,000 characters.
@@ -12483,17 +12501,6 @@ declare namespace Office {
12483
12501
  /**
12484
12502
  * Replaces the entire body with the specified text.
12485
12503
  *
12486
- * When working with HTML-formatted bodies, it is important to note that the `Body.getAsync` and `Body.setAsync` methods are not idempotent.
12487
- * The value returned from the `getAsync` method will not necessarily be exactly the same as the value that was passed in the `setAsync` method
12488
- * previously. The client may modify the value passed to `setAsync` in order to make it render efficiently with its rendering engine.
12489
- *
12490
- * When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\<a\>) to "LPNoLP"
12491
- * (see the **Examples** section for a sample).
12492
- *
12493
- * **Recommended**: Call `getTypeAsync` then pass the returned value to the `options.coercionType` parameter.
12494
- *
12495
- * **Important**: In Outlook on Windows and on Mac, the add-in user won't be able to revert this action with the **Undo** command.
12496
- *
12497
12504
  * @remarks
12498
12505
  * [Api set: Mailbox 1.3]
12499
12506
  *
@@ -12501,6 +12508,28 @@ declare namespace Office {
12501
12508
  *
12502
12509
  * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
12503
12510
  *
12511
+ * **Important**:
12512
+ *
12513
+ * - After the body is replaced with the specified content, the position of the cursor depends on which client the add-in is running.
12514
+ *
12515
+ * - **Windows**: The cursor appears at the beginning of the body of the mail item.
12516
+ *
12517
+ * - **Mac**: The cursor position isn't preserved. The cursor disappears after the `prependAsync` call and only reappears when the user selects something in the
12518
+ * body of the mail item.
12519
+ *
12520
+ * - **Web**: The cursor appears at the end of the body of the mail item.
12521
+ *
12522
+ * - When working with HTML-formatted bodies, it's important to note that the value returned by the `Body.getAsync` method won't necessarily
12523
+ * 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
12524
+ * render efficiently with its rendering engine.
12525
+ *
12526
+ * - When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\<a\>) to "LPNoLP"
12527
+ * (see the **Examples** section for a sample).
12528
+ *
12529
+ * - In Outlook on Windows and on Mac, the add-in user isn't able to revert this action with the **Undo** command.
12530
+ *
12531
+ * **Recommended**: Call `getTypeAsync`, then pass the returned value to the `options.coercionType` parameter.
12532
+ *
12504
12533
  * **Errors**:
12505
12534
  *
12506
12535
  * - `DataExceedsMaximumSize`: The data parameter is longer than 1,000,000 characters.
@@ -12518,17 +12547,6 @@ declare namespace Office {
12518
12547
  /**
12519
12548
  * Replaces the entire body with the specified text.
12520
12549
  *
12521
- * When working with HTML-formatted bodies, it is important to note that the `Body.getAsync` and `Body.setAsync` methods are not idempotent.
12522
- * The value returned from the `getAsync` method will not necessarily be exactly the same as the value that was passed in the `setAsync` method
12523
- * previously. The client may modify the value passed to `setAsync` in order to make it render efficiently with its rendering engine.
12524
- *
12525
- * When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\<a\>) to "LPNoLP"
12526
- * (see the **Examples** section for a sample).
12527
- *
12528
- * **Recommended**: Call `getTypeAsync` then pass the returned value to the `options.coercionType` parameter.
12529
- *
12530
- * **Important**: In Outlook on Windows and on Mac, the add-in user won't be able to revert this action with the **Undo** command.
12531
- *
12532
12550
  * @remarks
12533
12551
  * [Api set: Mailbox 1.3]
12534
12552
  *
@@ -12536,6 +12554,28 @@ declare namespace Office {
12536
12554
  *
12537
12555
  * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
12538
12556
  *
12557
+ * **Important**:
12558
+ *
12559
+ * - After the body is replaced with the specified content, the position of the cursor depends on which client the add-in is running.
12560
+ *
12561
+ * - **Windows**: The cursor appears at the beginning of the body of the mail item.
12562
+ *
12563
+ * - **Mac**: The cursor position isn't preserved. The cursor disappears after the `prependAsync` call and only reappears when the user selects something in the
12564
+ * body of the mail item.
12565
+ *
12566
+ * - **Web**: The cursor appears at the end of the body of the mail item.
12567
+ *
12568
+ * - When working with HTML-formatted bodies, it's important to note that the value returned by the `Body.getAsync` method won't necessarily
12569
+ * 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
12570
+ * render efficiently with its rendering engine.
12571
+ *
12572
+ * - When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\<a\>) to "LPNoLP"
12573
+ * (see the **Examples** section for a sample).
12574
+ *
12575
+ * - In Outlook on Windows and on Mac, the add-in user isn't able to revert this action with the **Undo** command.
12576
+ *
12577
+ * **Recommended**: Call `getTypeAsync`, then pass the returned value to the `options.coercionType` parameter.
12578
+ *
12539
12579
  * **Errors**:
12540
12580
  *
12541
12581
  * - `DataExceedsMaximumSize`: The data parameter is longer than 1,000,000 characters.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/office-js-preview",
3
- "version": "1.0.388",
3
+ "version": "1.0.390",
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": "53769ff00719bae50867b728525a0bf711d059fc20232d7f238dc70282d84dd7",
48
+ "typesPublisherContentHash": "4132ee09f0f1aa62aff386a27be22dd3368ff1dd3ea773aaefacf70199b41ad0",
49
49
  "typeScriptVersion": "4.3"
50
50
  }