@types/office-js-preview 1.0.480 → 1.0.481
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-preview/README.md +1 -1
- office-js-preview/index.d.ts +43 -11
- office-js-preview/package.json +2 -2
office-js-preview/README.md
CHANGED
|
@@ -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:
|
|
11
|
+
* Last updated: Tue, 25 Jun 2024 17:07:23 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
|
|
14
14
|
# Credits
|
office-js-preview/index.d.ts
CHANGED
|
@@ -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
|
}
|
|
@@ -20805,6 +20811,32 @@ declare namespace Office {
|
|
|
20805
20811
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
|
|
20806
20812
|
*/
|
|
20807
20813
|
errorMessage?: string;
|
|
20814
|
+
/**
|
|
20815
|
+
* 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
|
|
20816
|
+
* 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
|
|
20817
|
+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough | Smart Alerts walkthrough}.
|
|
20818
|
+
*
|
|
20819
|
+
* @remarks
|
|
20820
|
+
*
|
|
20821
|
+
* [Api set: Mailbox preview]
|
|
20822
|
+
*
|
|
20823
|
+
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **restricted**
|
|
20824
|
+
*
|
|
20825
|
+
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
|
|
20826
|
+
*
|
|
20827
|
+
* **Important**
|
|
20828
|
+
*
|
|
20829
|
+
* - The formatted error message must be 500 characters or less.
|
|
20830
|
+
*
|
|
20831
|
+
* - For guidance on supported Markdown elements, see
|
|
20832
|
+
* {@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}.
|
|
20833
|
+
*
|
|
20834
|
+
* - 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.
|
|
20835
|
+
* This ensures that the message is displayed properly in Outlook clients that don't support Markdown.
|
|
20836
|
+
*
|
|
20837
|
+
* @beta
|
|
20838
|
+
*/
|
|
20839
|
+
errorMessageMarkdown?: string;
|
|
20808
20840
|
/**
|
|
20809
20841
|
* 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
20842
|
* and set its `allowEvent` property to `false`, this property overrides the
|
office-js-preview/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/office-js-preview",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.481",
|
|
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": "
|
|
48
|
+
"typesPublisherContentHash": "006d9fc8b7e36f77d28348c499b68a1d4f2bd7cc1a501e8b8f3dff6e4f091d9b",
|
|
49
49
|
"typeScriptVersion": "4.8",
|
|
50
50
|
"nonNpm": true
|
|
51
51
|
}
|