@types/office-js-preview 1.0.480 → 1.0.482

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-preview (https://github.com
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, 24 Jun 2024 22:08:06 GMT
11
+ * Last updated: Thu, 27 Jun 2024 19:35:55 GMT
12
12
  * Dependencies: none
13
13
 
14
14
  # Credits
@@ -5331,6 +5331,13 @@ declare namespace Office {
5331
5331
  *
5332
5332
  * This method returns a promise. Use it with Excel, PowerPoint, and Word add-ins.
5333
5333
  *
5334
+ * If a user grants access to a device capability for the first time, the promise resolves with `true`.
5335
+ * You must then reload the add-in before you can run code that uses the device capability.
5336
+ * For example, you can call `window.location.reload()` to reload your add-in.
5337
+ * If a user had previously granted access to a device capability, the promise resolves with `false`.
5338
+ * You don't need to reload your add-in to run code that uses the device capability, as the permission is already set.
5339
+ * If a user denies access to a device capability, the promise rejects with a "User denied the permission request" error message.
5340
+ *
5334
5341
  * @remarks
5335
5342
  *
5336
5343
  * **Important**:
@@ -5341,9 +5348,6 @@ declare namespace Office {
5341
5348
  * Use {@link https://learn.microsoft.com/javascript/api/office/office.context#office-office-context-platform-member | Office.context.platform} and verify that it returns
5342
5349
  * `Office.PlatformType.OfficeOnline`. Otherwise, the `requestPermissions` call will return an error.
5343
5350
  *
5344
- * - If the user allows access to their camera or microphone, the add-in must be reloaded in the browser for the permissions to take effect.
5345
- * For example, you can call `window.location.reload()` to reload your add-in.
5346
- *
5347
5351
  * - If a user selects **Allow** from the dialog, the permission persists until the add-in is uninstalled or until the
5348
5352
  * cache of the browser on which the add-in is running is cleared. If a user wants to change an add-in’s access to their camera or microphone,
5349
5353
  * they must uninstall the add-in or clear their browser cache.
@@ -5371,9 +5375,6 @@ declare namespace Office {
5371
5375
  *
5372
5376
  * - For Excel, PowerPoint, and Word add-ins, use the `requestPermissions` method instead.
5373
5377
  *
5374
- * - If the user allows access to their camera, geolocation, or microphone, the add-in must be reloaded in the browser for the permissions to take effect.
5375
- * For example, you can call `window.location.reload()` to reload your add-in.
5376
- *
5377
5378
  * - If your add-in uses the same code for both Office on the web and Office desktop clients, verify the platform on which the add-in is running before calling `requestPermissionsAsync`.
5378
5379
  * Use {@link https://learn.microsoft.com/javascript/api/outlook/office.diagnostics#outlook-office-diagnostics-hostname-member | Office.context.mailbox.diagnostics.hostName}
5379
5380
  * and verify that it returns `OutlookWebApp`. Otherwise, the `requestPermissionsAsync` call will return an error.
@@ -5393,7 +5394,11 @@ declare namespace Office {
5393
5394
  * In Outlook on the web, an add-in can request access to a user's camera, geolocation, and microphone.
5394
5395
  * @param options An object literal that contains the `asyncContext` property. Assign any object you wish to access in the callback function to the `asyncContext` property.
5395
5396
  * @param callback When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, which is an `Office.AsyncResult` object.
5396
- * If the user grants permission to access the requested device capabilities, `true` is returned in the `asyncResult.value` property.
5397
+ * If the user grants permission to access the requested device capabilities, `true` is returned in the `asyncResult.value` property. You must then reload the add-in before you can
5398
+ * run code that uses the device capabilities. For example, you can call `window.location.reload()` to reload your add-in.
5399
+ * If the user had previously granted permission to access the requested device capabilities, `false` is returned in the `asyncResult.value` property. You don't need to
5400
+ * reload your add-in to run code that uses the device capability, as the permission is already set.
5401
+ * If a user denies access to the requested device capabilities, `Office.AsyncResultStatus.Failed` is returned in the `asyncResult.status` property.
5397
5402
  */
5398
5403
  requestPermissionsAsync(permissions: Office.DevicePermissionType[], options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult<boolean>) => void): void;
5399
5404
  /**
@@ -5410,9 +5415,6 @@ declare namespace Office {
5410
5415
  *
5411
5416
  * - For Excel, PowerPoint, and Word add-ins, use the `requestPermissions` method instead.
5412
5417
  *
5413
- * - If the user allows access to their camera, geolocation, or microphone, the add-in must be reloaded in the browser for the permissions to take effect.
5414
- * For example, you can call `window.location.reload()` to reload your add-in.
5415
- *
5416
5418
  * - If your add-in uses the same code for both Office on the web and Office desktop clients, verify the platform on which the add-in is running before calling `requestPermissionsAsync`.
5417
5419
  * Use {@link https://learn.microsoft.com/javascript/api/outlook/office.diagnostics#outlook-office-diagnostics-hostname-member | Office.context.mailbox.diagnostics.hostName}
5418
5420
  * and verify that it returns `OutlookWebApp`. Otherwise, the `requestPermissionsAsync` call will return an error.
@@ -5431,7 +5433,11 @@ declare namespace Office {
5431
5433
  * @param permissions An array of device capabilities to which an add-in is requesting access.
5432
5434
  * In Outlook on the web, an add-in can request access to a user's camera, geolocation, and microphone.
5433
5435
  * @param callback When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, which is an `Office.AsyncResult` object.
5434
- * If the user grants permission to access the requested device capabilities, `true` is returned in the `asyncResult.value` property.
5436
+ * If the user grants permission to access the requested device capabilities, `true` is returned in the `asyncResult.value` property. You must then reload the add-in before you can
5437
+ * run code that uses the device capabilities. For example, you can call `window.location.reload()` to reload your add-in.
5438
+ * If the user had previously granted permission to access the requested device capabilities, `false` is returned in the `asyncResult.value` property. You don't need to
5439
+ * reload your add-in to run code that uses the device capability, as the permission is already set.
5440
+ * If a user denies access to the requested device capabilities, `Office.AsyncResultStatus.Failed` is returned in the `asyncResult.status` property.
5435
5441
  */
5436
5442
  requestPermissionsAsync(permissions: Office.DevicePermissionType[], callback: (asyncResult: Office.AsyncResult<boolean>) => void): void;
5437
5443
  }
@@ -16179,7 +16185,11 @@ declare namespace Office {
16179
16185
  *
16180
16186
  * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose
16181
16187
  *
16182
- * **Important**: In Outlook on Windows, the `inReplyTo` value is maintained on all replies regardless of changes made by the user, such as changing the subject in a reply.
16188
+ * **Important**:
16189
+ *
16190
+ * - In Outlook on Windows, the `inReplyTo` value is maintained on all replies regardless of changes made by the user, such as changing the subject in a reply.
16191
+ *
16192
+ * - The `inReplyTo` property returns `null` for new or forwarded messages.
16183
16193
  */
16184
16194
  inReplyTo: string;
16185
16195
  /**
@@ -20805,6 +20815,32 @@ declare namespace Office {
20805
20815
  * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
20806
20816
  */
20807
20817
  errorMessage?: string;
20818
+ /**
20819
+ * When you use the {@link https://learn.microsoft.com/javascript/api/outlook/office.mailboxevent#outlook-office-mailboxevent-completed-member(1) | completed method} to signal completion of an event handler
20820
+ * and set its `allowEvent` property to `false`, this property sets the error message displayed to the user. The error message is formatted using Markdown. For an example, see the
20821
+ * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough | Smart Alerts walkthrough}.
20822
+ *
20823
+ * @remarks
20824
+ *
20825
+ * [Api set: Mailbox preview]
20826
+ *
20827
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **restricted**
20828
+ *
20829
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
20830
+ *
20831
+ * **Important**
20832
+ *
20833
+ * - The formatted error message must be 500 characters or less.
20834
+ *
20835
+ * - For guidance on supported Markdown elements, see
20836
+ * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/onmessagesend-onappointmentsend-events#limitations-to-formatting-the-dialog-message-using-markdown | Limitations to formatting the dialog message using Markdown}.
20837
+ *
20838
+ * - If you format the dialog message using the `errorMessageMarkdown` property, we recommend you also add a plaintext version of the message using the `errorMessage` property.
20839
+ * This ensures that the message is displayed properly in Outlook clients that don't support Markdown.
20840
+ *
20841
+ * @beta
20842
+ */
20843
+ errorMessageMarkdown?: string;
20808
20844
  /**
20809
20845
  * When you use the {@link https://learn.microsoft.com/javascript/api/outlook/office.mailboxevent#outlook-office-mailboxevent-completed-member(1) | completed method} to signal completion of an event handler
20810
20846
  * and set its `allowEvent` property to `false`, this property overrides the
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/office-js-preview",
3
- "version": "1.0.480",
3
+ "version": "1.0.482",
4
4
  "description": "TypeScript definitions for office-js-preview",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/office-js-preview",
6
6
  "license": "MIT",
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "scripts": {},
47
47
  "dependencies": {},
48
- "typesPublisherContentHash": "26c34f19ddc0e745cd7e95a25fd885755fa2135940062b76d1552105eb9f2a2c",
48
+ "typesPublisherContentHash": "a1821f0eb0ef132a4f2c0588cdbaa6c4cb4b1f5e03336a2ac071a3f8f9b9db41",
49
49
  "typeScriptVersion": "4.8",
50
50
  "nonNpm": true
51
51
  }