@types/office-js-preview 1.0.381 → 1.0.382
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 +84 -12
- 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 (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:
|
|
11
|
+
* Last updated: Thu, 20 Apr 2023 20:32:48 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `Excel`, `Office`, `OfficeCore`, `OfficeExtension`, `OneNote`, `PowerPoint`, `Visio`, `Word`
|
|
14
14
|
|
office-js-preview/index.d.ts
CHANGED
|
@@ -10251,15 +10251,12 @@ declare namespace Office {
|
|
|
10251
10251
|
*/
|
|
10252
10252
|
addItemAttachmentAsync(itemId: any, attachmentName: string, callback?: (asyncResult: Office.AsyncResult<string>) => void): void;
|
|
10253
10253
|
/**
|
|
10254
|
-
* Closes the current item that is being composed
|
|
10254
|
+
* Closes the current item that is being composed.
|
|
10255
10255
|
*
|
|
10256
|
-
* The
|
|
10256
|
+
* The behavior of the `close` method depends on the current state of the item being composed.
|
|
10257
10257
|
* If the item has unsaved changes, the client prompts the user to save, discard, or close the action.
|
|
10258
10258
|
*
|
|
10259
|
-
* In the Outlook desktop client,
|
|
10260
|
-
*
|
|
10261
|
-
* **Note**: In Outlook on the web, if the item is an appointment and it has previously been saved using `saveAsync`, the user is prompted to save,
|
|
10262
|
-
* discard, or cancel even if no changes have occurred since the item was last saved.
|
|
10259
|
+
* In the Outlook desktop client, the `close` method has no effect on a reply in the Reading Pane.
|
|
10263
10260
|
*
|
|
10264
10261
|
* @remarks
|
|
10265
10262
|
* [Api set: Mailbox 1.3]
|
|
@@ -10267,6 +10264,9 @@ declare namespace Office {
|
|
|
10267
10264
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted**
|
|
10268
10265
|
*
|
|
10269
10266
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer
|
|
10267
|
+
*
|
|
10268
|
+
* **Important**: In Outlook on the web, if the item is an appointment and it has previously been saved using `saveAsync`, the user is prompted to save,
|
|
10269
|
+
* discard, or cancel even if no changes have occurred since the item was last saved.
|
|
10270
10270
|
*/
|
|
10271
10271
|
close(): void;
|
|
10272
10272
|
/**
|
|
@@ -15569,15 +15569,12 @@ declare namespace Office {
|
|
|
15569
15569
|
*/
|
|
15570
15570
|
addItemAttachmentAsync(itemId: any, attachmentName: string, callback?: (asyncResult: Office.AsyncResult<string>) => void): void;
|
|
15571
15571
|
/**
|
|
15572
|
-
* Closes the current item that is being composed
|
|
15572
|
+
* Closes the current item that is being composed.
|
|
15573
15573
|
*
|
|
15574
|
-
* The
|
|
15574
|
+
* The behavior of the `close` method depends on the current state of the item being composed.
|
|
15575
15575
|
* If the item has unsaved changes, the client prompts the user to save, discard, or close the action.
|
|
15576
15576
|
*
|
|
15577
|
-
* In the Outlook desktop client,
|
|
15578
|
-
*
|
|
15579
|
-
* **Note**: In Outlook on the web, if the item is an appointment and it has previously been saved using `saveAsync`, the user is prompted to save,
|
|
15580
|
-
* discard, or cancel even if no changes have occurred since the item was last saved.
|
|
15577
|
+
* In the Outlook desktop client, the `close` method has no effect on a reply in the Reading Pane.
|
|
15581
15578
|
*
|
|
15582
15579
|
* @remarks
|
|
15583
15580
|
* [Api set: Mailbox 1.3]
|
|
@@ -15585,8 +15582,83 @@ declare namespace Office {
|
|
|
15585
15582
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted**
|
|
15586
15583
|
*
|
|
15587
15584
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose
|
|
15585
|
+
*
|
|
15586
|
+
* **Important**: In Outlook on the web, if the item is an appointment and it has previously been saved using `saveAsync`, the user is prompted to save,
|
|
15587
|
+
* discard, or cancel even if no changes have occurred since the item was last saved.
|
|
15588
|
+
*
|
|
15589
|
+
* **Tip**: Use the
|
|
15590
|
+
* {@link https://learn.microsoft.com/javascript/api/outlook/office.messagecompose?view=outlook-js-preview&preserve-view=true#outlook-office-messagecompose-closeasync-member(1) | closeAsync}
|
|
15591
|
+
* method instead of the `close` method if you want your add-in to:
|
|
15592
|
+
*
|
|
15593
|
+
* - Automatically discard a message being composed without prompting the user with the save dialog.
|
|
15594
|
+
*
|
|
15595
|
+
* - Determine when a user cancels the save item dialog on a message being composed.
|
|
15596
|
+
*
|
|
15597
|
+
* - Close a reply in the Reading Pane or an existing draft from an Outlook desktop client.
|
|
15598
|
+
*
|
|
15588
15599
|
*/
|
|
15589
15600
|
close(): void;
|
|
15601
|
+
/**
|
|
15602
|
+
* Closes the current message being composed with the option to discard unsaved changes.
|
|
15603
|
+
* The message being composed can be a new message, reply, or an existing draft.
|
|
15604
|
+
*
|
|
15605
|
+
* @remarks
|
|
15606
|
+
* [Api set: Mailbox preview]
|
|
15607
|
+
*
|
|
15608
|
+
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
|
|
15609
|
+
*
|
|
15610
|
+
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose
|
|
15611
|
+
*
|
|
15612
|
+
* **Important**: The `closeAsync` method is in preview. It's only supported in Outlook on Windows at this time.
|
|
15613
|
+
*
|
|
15614
|
+
* **Errors**:
|
|
15615
|
+
*
|
|
15616
|
+
* - `The operation was cancelled by the user`: The user selects **Cancel** from the save dialog and the `discardItem` property isn't defined or is set to `false`.
|
|
15617
|
+
*
|
|
15618
|
+
* - `The operation is not supported`: The `closeAsync` method attempts to close a reply in the Reading Pane or an existing draft and the `discardItem` property isn't defined or
|
|
15619
|
+
* is set to `false`.
|
|
15620
|
+
*
|
|
15621
|
+
* @param options - An object literal that contains one or more of the following properties:-
|
|
15622
|
+
* `asyncContext`: Developers can provide any object they wish to access in the callback function.
|
|
15623
|
+
* `discardItem`: If `true`, the current message being composed is closed and unsaved changes are discarded. When the parameter isn't declared or is
|
|
15624
|
+
* set to `false`, a save dialog appears prompting the user to save a draft, discard changes, or cancel the operation. This behavior occurs for new messages and replies
|
|
15625
|
+
* popped out from the Reading Pane. If you want to close a reply in the Reading Pane or an existing draft, you must set `discardItem` to `true`. Otherwise, the call will
|
|
15626
|
+
* return an error. For more information on the error, see the Remarks section.
|
|
15627
|
+
*
|
|
15628
|
+
* @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter,
|
|
15629
|
+
* `asyncResult`, which is an `Office.AsyncResult` object.
|
|
15630
|
+
*
|
|
15631
|
+
* @beta
|
|
15632
|
+
*/
|
|
15633
|
+
closeAsync(options: Office.AsyncContextOptions & { discardItem: boolean }, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
|
|
15634
|
+
/**
|
|
15635
|
+
* Closes the current new message being composed.
|
|
15636
|
+
*
|
|
15637
|
+
* The behavior on a new message being composed depends on whether the message contains any unsaved changes. If no changes have been made, the message is
|
|
15638
|
+
* closed without a save dialog. On the other hand, if the message contains unsaved changes, a save dialog appears prompting the user to save a draft,
|
|
15639
|
+
* discard changes, or cancel the operation.
|
|
15640
|
+
*
|
|
15641
|
+
* @remarks
|
|
15642
|
+
* [Api set: Mailbox preview]
|
|
15643
|
+
*
|
|
15644
|
+
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
|
|
15645
|
+
*
|
|
15646
|
+
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose
|
|
15647
|
+
*
|
|
15648
|
+
* **Important**: The `closeAsync` method is in preview. It's only supported in Outlook on Windows at this time.
|
|
15649
|
+
*
|
|
15650
|
+
* **Errors**:
|
|
15651
|
+
*
|
|
15652
|
+
* - `The operation was cancelled by the user`: The user selects **Cancel** from the save dialog.
|
|
15653
|
+
*
|
|
15654
|
+
* - `The operation is not supported`: The `closeAsync` method attempts to close a reply in the Reading Pane or an existing draft.
|
|
15655
|
+
*
|
|
15656
|
+
* @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter,
|
|
15657
|
+
* `asyncResult`, which is an `Office.AsyncResult` object.
|
|
15658
|
+
*
|
|
15659
|
+
* @beta
|
|
15660
|
+
*/
|
|
15661
|
+
closeAsync(callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
|
|
15590
15662
|
/**
|
|
15591
15663
|
* Disables the Outlook client signature.
|
|
15592
15664
|
*
|
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.382",
|
|
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": "
|
|
48
|
+
"typesPublisherContentHash": "5c3dd824e151f0e637040843604f9fff0d8ca58bb2d12ea3c7ec56b9a377f1d8",
|
|
49
49
|
"typeScriptVersion": "4.3"
|
|
50
50
|
}
|