@types/office-js-preview 1.0.567 → 1.0.569
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 +383 -83
- 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, 11 Mar 2025 22:34:38 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
|
|
14
14
|
# Credits
|
office-js-preview/index.d.ts
CHANGED
|
@@ -241,6 +241,10 @@ declare namespace Office {
|
|
|
241
241
|
* Represents the Auth interface.
|
|
242
242
|
*/
|
|
243
243
|
const auth: Auth;
|
|
244
|
+
/**
|
|
245
|
+
* Represents the context menu object associated with the Office application.
|
|
246
|
+
*/
|
|
247
|
+
const contextMenu: ContextMenu;
|
|
244
248
|
/**
|
|
245
249
|
* Represents the Device Permission interface.
|
|
246
250
|
*/
|
|
@@ -648,6 +652,22 @@ declare namespace Office {
|
|
|
648
652
|
* [Api set: Mailbox 1.10]
|
|
649
653
|
*/
|
|
650
654
|
InfobarClicked,
|
|
655
|
+
/**
|
|
656
|
+
* Occurs in Outlook when an add-in's task pane is opened from an {@link https://learn.microsoft.com/outlook/actionable-messages | actionable message},
|
|
657
|
+
* {@link https://learn.microsoft.com/javascript/api/outlook/office.mailboxenums.itemnotificationmessagetype#fields | InsightMessage} notification,
|
|
658
|
+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/onmessagesend-onappointmentsend-events | Smart Alerts} dialog, or
|
|
659
|
+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting | integrated spam-reporting} dialog.
|
|
660
|
+
* This event prevents an add-in from relaunching if its task pane is already open in Outlook.
|
|
661
|
+
*
|
|
662
|
+
* **Important**: The `InitializationContextChanged` event can only be handled in a task pane. Function commands can't register a handler for this event.
|
|
663
|
+
*
|
|
664
|
+
* To add an event handler for the `InitializationContextChanged` event, use the `addHandlerAsync` method of the `Item` object.
|
|
665
|
+
* The event handler receives an argument of type
|
|
666
|
+
* {@link https://learn.microsoft.com/javascript/api/outlook/office.initializationcontextchangedeventargs?view=outlook-js-1.15 | Office.InitializationContextChangedEventArgs}.
|
|
667
|
+
*
|
|
668
|
+
* [Api set: Mailbox 1.15]
|
|
669
|
+
*/
|
|
670
|
+
InitializationContextChanged,
|
|
651
671
|
/**
|
|
652
672
|
* Occurs when a different Outlook item is selected for viewing while the task pane is pinned.
|
|
653
673
|
*
|
|
@@ -4796,12 +4816,71 @@ declare namespace Office {
|
|
|
4796
4816
|
*/
|
|
4797
4817
|
version: string;
|
|
4798
4818
|
}
|
|
4819
|
+
/**
|
|
4820
|
+
* Provides options to manage the state of the Office context menu.
|
|
4821
|
+
*
|
|
4822
|
+
* To learn more, see {@link https://learn.microsoft.com/office/dev/add-ins/design/disable-add-in-commands | Change the availability of add-in commands}.
|
|
4823
|
+
*
|
|
4824
|
+
* @remarks
|
|
4825
|
+
*
|
|
4826
|
+
* **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/context-menu-api-requirement-sets | ContextMenuApi 1.1}
|
|
4827
|
+
*/
|
|
4828
|
+
interface ContextMenu {
|
|
4829
|
+
/**
|
|
4830
|
+
* Sends a request to Office to update the context menu.
|
|
4831
|
+
*
|
|
4832
|
+
* @remarks
|
|
4833
|
+
*
|
|
4834
|
+
* **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/context-menu-api-requirement-sets | ContextMenuApi 1.1}
|
|
4835
|
+
*
|
|
4836
|
+
* **Important**: This API is only used to request an update. The actual UI update to the context menu is controlled by the Office application,
|
|
4837
|
+
* so the exact timing of the context menu update (or refresh) can't be determined by the completion of this API.
|
|
4838
|
+
*
|
|
4839
|
+
* @param input - Represents the updates to be made to the context menu controls. Only the changes specified in the `control` parameter are made.
|
|
4840
|
+
* Other context menu controls that aren't specified remain as is in the Office application.
|
|
4841
|
+
*/
|
|
4842
|
+
requestUpdate(input: ContextMenuUpdaterData): Promise<void>;
|
|
4843
|
+
}
|
|
4844
|
+
/**
|
|
4845
|
+
* Represents an individual context menu control and its state.
|
|
4846
|
+
*
|
|
4847
|
+
* To learn more, see {@link https://learn.microsoft.com/office/dev/add-ins/design/disable-add-in-commands | Change the availability of add-in commands}.
|
|
4848
|
+
*
|
|
4849
|
+
* @remarks
|
|
4850
|
+
*
|
|
4851
|
+
* **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/context-menu-api-requirement-sets | ContextMenuApi 1.1}
|
|
4852
|
+
*/
|
|
4853
|
+
interface ContextMenuControl {
|
|
4854
|
+
/**
|
|
4855
|
+
* Identifier of the context menu control as specified in the manifest.
|
|
4856
|
+
*/
|
|
4857
|
+
id: string;
|
|
4858
|
+
/**
|
|
4859
|
+
* Indicates whether the control is available on the context menu.
|
|
4860
|
+
*/
|
|
4861
|
+
enabled?: boolean;
|
|
4862
|
+
}
|
|
4863
|
+
/**
|
|
4864
|
+
* Represents the changes to the context menu.
|
|
4865
|
+
*
|
|
4866
|
+
* To learn more, see {@link https://learn.microsoft.com/office/dev/add-ins/design/disable-add-in-commands | Change the availability of add-in commands}.
|
|
4867
|
+
*
|
|
4868
|
+
* @remarks
|
|
4869
|
+
*
|
|
4870
|
+
* **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/context-menu-api-requirement-sets | ContextMenuApi 1.1}
|
|
4871
|
+
*/
|
|
4872
|
+
interface ContextMenuUpdaterData {
|
|
4873
|
+
/**
|
|
4874
|
+
* Collection of context menu controls whose state is set using `Office.contextMenu.requestUpdate`.
|
|
4875
|
+
*/
|
|
4876
|
+
controls: ContextMenuControl[];
|
|
4877
|
+
}
|
|
4799
4878
|
/**
|
|
4800
4879
|
* Represents an individual control or command and the state it should have.
|
|
4801
4880
|
*
|
|
4802
4881
|
* @remarks
|
|
4803
4882
|
*
|
|
4804
|
-
* For code samples showing how to use a `Control` object and its properties, see {@link https://learn.microsoft.com/office/dev/add-ins/design/disable-add-in-commands |
|
|
4883
|
+
* For code samples showing how to use a `Control` object and its properties, see {@link https://learn.microsoft.com/office/dev/add-ins/design/disable-add-in-commands | Change the availability of add-in commands} and {@link https://learn.microsoft.com/office/dev/add-ins/design/contextual-tabs | Create custom contextual tabs}.
|
|
4805
4884
|
*
|
|
4806
4885
|
* **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/ribbon-api-requirement-sets | RibbonApi 1.1}
|
|
4807
4886
|
*/
|
|
@@ -7241,7 +7320,7 @@ declare namespace Office {
|
|
|
7241
7320
|
*
|
|
7242
7321
|
* Note that this API is only to request an update. The actual UI update to the ribbon is controlled by the Office application and hence the exact timing of the ribbon update (or refresh) cannot be determined by the completion of this API.
|
|
7243
7322
|
*
|
|
7244
|
-
* For code examples, see
|
|
7323
|
+
* For code examples, see {@link https://learn.microsoft.com/office/dev/add-ins/design/disable-add-in-commands | Change the availability of add-in commands} and {@link https://learn.microsoft.com/office/dev/add-ins/design/contextual-tabs | Create custom contextual tabs}.
|
|
7245
7324
|
*
|
|
7246
7325
|
* @param input - Represents the updates to be made to the ribbon. Note that only the changes specified in the input parameter are made.
|
|
7247
7326
|
*/
|
|
@@ -7788,7 +7867,7 @@ declare namespace Office {
|
|
|
7788
7867
|
size: number;
|
|
7789
7868
|
}
|
|
7790
7869
|
/**
|
|
7791
|
-
* Represents an individual tab and the state it should have. For code examples, see
|
|
7870
|
+
* Represents an individual tab and the state it should have. For code examples, see {@link https://learn.microsoft.com/office/dev/add-ins/design/disable-add-in-commands | Change the availability of add-in commands} and {@link https://learn.microsoft.com/office/dev/add-ins/design/contextual-tabs | Create custom contextual tabs}.
|
|
7792
7871
|
*
|
|
7793
7872
|
* @remarks
|
|
7794
7873
|
*
|
|
@@ -8811,17 +8890,20 @@ declare namespace Office {
|
|
|
8811
8890
|
*
|
|
8812
8891
|
* @remarks
|
|
8813
8892
|
*
|
|
8893
|
+
* [Api set: Mailbox 1.1]
|
|
8894
|
+
*
|
|
8814
8895
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read
|
|
8815
8896
|
*/
|
|
8816
8897
|
enum AttachmentType {
|
|
8817
8898
|
/**
|
|
8818
|
-
* The attachment is a file.
|
|
8819
|
-
|
|
8820
|
-
|
|
8821
|
-
|
|
8822
|
-
*
|
|
8899
|
+
* The attachment is a Base64-encoded file.
|
|
8900
|
+
*
|
|
8901
|
+
* **Important**: The `base64` attachment type is only supported by the `displayReplyAllForm`, `displayReplyAllFormAsync`, `displayReplyForm`, and
|
|
8902
|
+
* `displayReplyFormAsync` methods.
|
|
8903
|
+
*
|
|
8904
|
+
* [Api set: Mailbox 1.15]
|
|
8823
8905
|
*/
|
|
8824
|
-
|
|
8906
|
+
Base64 = "base64",
|
|
8825
8907
|
/**
|
|
8826
8908
|
* The attachment is stored in a cloud location, such as OneDrive.
|
|
8827
8909
|
*
|
|
@@ -8829,8 +8911,19 @@ declare namespace Office {
|
|
|
8829
8911
|
* contains a URL to the file.
|
|
8830
8912
|
* From requirement set 1.8, the `url` property included in the attachment's {@link Office.AttachmentDetailsCompose | details} object
|
|
8831
8913
|
* contains a URL to the file in Compose mode.
|
|
8914
|
+
*
|
|
8915
|
+
* The `cloud` attachment type isn't supported by the `displayNewMessageForm`, `displayNewMessageFormAsync`, `displayReplyAllForm`, `displayReplyAllFormAsync`,
|
|
8916
|
+
* `displayReplyForm`, and `displayReplyFormAsync` methods.
|
|
8832
8917
|
*/
|
|
8833
|
-
Cloud = "cloud"
|
|
8918
|
+
Cloud = "cloud",
|
|
8919
|
+
/**
|
|
8920
|
+
* The attachment is a file.
|
|
8921
|
+
*/
|
|
8922
|
+
File = "file",
|
|
8923
|
+
/**
|
|
8924
|
+
* The attachment is an Exchange item.
|
|
8925
|
+
*/
|
|
8926
|
+
Item = "item"
|
|
8834
8927
|
}
|
|
8835
8928
|
/**
|
|
8836
8929
|
* Specifies the category color.
|
|
@@ -11393,6 +11486,74 @@ declare namespace Office {
|
|
|
11393
11486
|
* which is an `Office.AsyncResult` object. The EWS appointment ID is returned in the `asyncResult.value` property.
|
|
11394
11487
|
*/
|
|
11395
11488
|
saveAsync(callback: (asyncResult: Office.AsyncResult<string>) => void): void;
|
|
11489
|
+
/**
|
|
11490
|
+
* Sends the appointment being composed.
|
|
11491
|
+
*
|
|
11492
|
+
* @remarks
|
|
11493
|
+
* [Api set: Mailbox 1.15]
|
|
11494
|
+
*
|
|
11495
|
+
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox**
|
|
11496
|
+
*
|
|
11497
|
+
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer
|
|
11498
|
+
*
|
|
11499
|
+
* **Important**:
|
|
11500
|
+
*
|
|
11501
|
+
* - The `sendAsync` method is only supported in task pane and function command implementations. It isn't supported in
|
|
11502
|
+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/autolaunch | event-based handlers} or
|
|
11503
|
+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select | item multi-select scenarios}.
|
|
11504
|
+
*
|
|
11505
|
+
* - In a function command implementation, the value returned in `asyncResult.status` may not reflect whether the appointment being composed is successfully sent.
|
|
11506
|
+
* This is because the `sendAsync` method is an asynchronous API and events outside the add-in's control (for example, events handled by a separately installed
|
|
11507
|
+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/onmessagesend-onappointmentsend-events| Smart Alerts add-in}) could block the item from being sent.
|
|
11508
|
+
* Since you can't rely on the status returned in `asyncResult.status` to run certain operations, you should only call the
|
|
11509
|
+
* {@link https://learn.microsoft.com/javascript/api/office/office.addincommands.event#office-office-addincommands-event-completed-member(1) | event.completed }
|
|
11510
|
+
* method in the callback function. The `event.completed` call signals that the add-in has completed processing. Other than this call, other code in the callback function
|
|
11511
|
+
* isn't guaranteed to run. We recommend processing other operations before calling `sendAsync`.
|
|
11512
|
+
*
|
|
11513
|
+
* - In a task pane implementation, any code included to run when `asyncResult.status` is `Office.AsyncResultStatus.Success` isn't guaranteed to be processed.
|
|
11514
|
+
* This is because the item may have already been sent and the add-in has completed processing. We recommend processing other operations before calling `sendAsync`.
|
|
11515
|
+
*
|
|
11516
|
+
* - Any code included after the `sendAsync` call isn't guaranteed to run since the add-in completes processing after the `sendAsync` call.
|
|
11517
|
+
*
|
|
11518
|
+
* @param options - An object literal that contains the `asyncContext` property. Use the `asyncContext` property to specify any object you want to access in the
|
|
11519
|
+
* callback function.
|
|
11520
|
+
* @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`. The `asyncResult`
|
|
11521
|
+
* parameter is an `Office.AsyncResult` object.
|
|
11522
|
+
*/
|
|
11523
|
+
sendAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
|
|
11524
|
+
/**
|
|
11525
|
+
* Sends the appointment being composed.
|
|
11526
|
+
*
|
|
11527
|
+
* @remarks
|
|
11528
|
+
* [Api set: Mailbox 1.15]
|
|
11529
|
+
*
|
|
11530
|
+
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox**
|
|
11531
|
+
*
|
|
11532
|
+
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer
|
|
11533
|
+
*
|
|
11534
|
+
* **Important**:
|
|
11535
|
+
*
|
|
11536
|
+
* - The `sendAsync` method is only supported in task pane and function command implementations. It isn't supported in
|
|
11537
|
+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/autolaunch | event-based handlers} or
|
|
11538
|
+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select | item multi-select scenarios}.
|
|
11539
|
+
*
|
|
11540
|
+
* - In a function command implementation, the value returned in `asyncResult.status` may not reflect whether the appointment being composed is successfully sent.
|
|
11541
|
+
* This is because the `sendAsync` method is an asynchronous API and events outside the add-in's control (for example, events handled by a separately installed
|
|
11542
|
+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/onmessagesend-onappointmentsend-events| Smart Alerts add-in}) could block the item from being sent.
|
|
11543
|
+
* Since you can't rely on the status returned in `asyncResult.status` to run certain operations, you should only call the
|
|
11544
|
+
* {@link https://learn.microsoft.com/javascript/api/office/office.addincommands.event#office-office-addincommands-event-completed-member(1) | event.completed }
|
|
11545
|
+
* method in the callback function. The `event.completed` call signals that the add-in has completed processing. Other than this call, other code in the callback function
|
|
11546
|
+
* isn't guaranteed to run. We recommend processing other operations before calling `sendAsync`.
|
|
11547
|
+
*
|
|
11548
|
+
* - In a task pane implementation, any code included to run when `asyncResult.status` is `Office.AsyncResultStatus.Success` isn't guaranteed to be processed.
|
|
11549
|
+
* This is because the item may have already been sent and the add-in has completed processing. We recommend processing other operations before calling `sendAsync`.
|
|
11550
|
+
*
|
|
11551
|
+
* - Any code included after the `sendAsync` call isn't guaranteed to run since the add-in completes processing after the `sendAsync` call.
|
|
11552
|
+
*
|
|
11553
|
+
* @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`. The `asyncResult`
|
|
11554
|
+
* parameter is an `Office.AsyncResult` object.
|
|
11555
|
+
*/
|
|
11556
|
+
sendAsync(callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
|
|
11396
11557
|
/**
|
|
11397
11558
|
* Asynchronously inserts data into the body or subject of a message.
|
|
11398
11559
|
*
|
|
@@ -14674,6 +14835,33 @@ declare namespace Office {
|
|
|
14674
14835
|
*/
|
|
14675
14836
|
infobarType: MailboxEnums.InfobarType;
|
|
14676
14837
|
}
|
|
14838
|
+
/**
|
|
14839
|
+
* Provides data from an {@link https://learn.microsoft.com/outlook/actionable-messages | actionable message},
|
|
14840
|
+
* {@link https://learn.microsoft.com/javascript/api/outlook/office.mailboxenums.itemnotificationmessagetype#fields | InsightMessage} notification,
|
|
14841
|
+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/onmessagesend-onappointmentsend-events | Smart Alerts} dialog, or
|
|
14842
|
+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting | integrated spam-reporting} dialog when the
|
|
14843
|
+
* `Office.EventType.InitializationContextChanged` event occurs.
|
|
14844
|
+
*
|
|
14845
|
+
* @remarks
|
|
14846
|
+
* [Api set: Mailbox 1.15]
|
|
14847
|
+
*/
|
|
14848
|
+
export interface InitializationContextChangedEventArgs {
|
|
14849
|
+
/**
|
|
14850
|
+
* Represents the data to be passed to an add-in's task pane from an actionable message, notification message, Smart Alerts dialog, or integrated
|
|
14851
|
+
* spam-reporting dialog.
|
|
14852
|
+
*
|
|
14853
|
+
* @remarks
|
|
14854
|
+
* [Api set: Mailbox 1.15]
|
|
14855
|
+
*/
|
|
14856
|
+
initializationContextData: string;
|
|
14857
|
+
/**
|
|
14858
|
+
* Represents the type of the event. For details, refer to {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType}.
|
|
14859
|
+
*
|
|
14860
|
+
* @remarks
|
|
14861
|
+
* [Api set: Mailbox 1.15]
|
|
14862
|
+
*/
|
|
14863
|
+
type: "olkInitializationContextChanged";
|
|
14864
|
+
}
|
|
14677
14865
|
/**
|
|
14678
14866
|
* The `InternetHeaders` object represents custom internet headers that are preserved after the message item leaves Exchange
|
|
14679
14867
|
* and is converted to a MIME message.
|
|
@@ -14948,7 +15136,7 @@ declare namespace Office {
|
|
|
14948
15136
|
* A `LoadedMessageCompose` object is returned when `Office.context.mailbox.loadItemByIdAsync` is called on a message in compose mode.
|
|
14949
15137
|
*
|
|
14950
15138
|
* @remarks
|
|
14951
|
-
* [Api set: Mailbox
|
|
15139
|
+
* [Api set: Mailbox 1.15]
|
|
14952
15140
|
*
|
|
14953
15141
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
|
|
14954
15142
|
*
|
|
@@ -14962,8 +15150,6 @@ declare namespace Office {
|
|
|
14962
15150
|
*
|
|
14963
15151
|
* - Only one mail item can be loaded at a time. When you implement `loadItemByIdAsync`, you must call `unloadAsync` after processing the item.
|
|
14964
15152
|
* This must be done before calling `loadItemByIdAsync` on another item.
|
|
14965
|
-
*
|
|
14966
|
-
* @beta
|
|
14967
15153
|
*/
|
|
14968
15154
|
interface LoadedMessageCompose {
|
|
14969
15155
|
/**
|
|
@@ -15121,9 +15307,7 @@ declare namespace Office {
|
|
|
15121
15307
|
*
|
|
15122
15308
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose
|
|
15123
15309
|
*
|
|
15124
|
-
* **Important**:
|
|
15125
|
-
*
|
|
15126
|
-
* - Only the `getAllAsync` method of the NotificationMessages object is supported.
|
|
15310
|
+
* **Important**: Only the `getAllAsync` method of the NotificationMessages object is supported.
|
|
15127
15311
|
*/
|
|
15128
15312
|
notificationMessages: NotificationMessages;
|
|
15129
15313
|
/**
|
|
@@ -15833,7 +16017,7 @@ declare namespace Office {
|
|
|
15833
16017
|
* When multiple mail items are selected, closes the currently loaded item, so that another selected mail item can be loaded for processing.
|
|
15834
16018
|
*
|
|
15835
16019
|
* @remarks
|
|
15836
|
-
* [Api set: Mailbox
|
|
16020
|
+
* [Api set: Mailbox 1.15]
|
|
15837
16021
|
*
|
|
15838
16022
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
|
|
15839
16023
|
*
|
|
@@ -15850,15 +16034,13 @@ declare namespace Office {
|
|
|
15850
16034
|
* @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.
|
|
15851
16035
|
* @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, `asyncResult`,
|
|
15852
16036
|
* which is an `Office.AsyncResult` object.
|
|
15853
|
-
*
|
|
15854
|
-
* @beta
|
|
15855
16037
|
*/
|
|
15856
16038
|
unloadAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
|
|
15857
16039
|
/**
|
|
15858
16040
|
* When multiple mail items are selected, closes the currently loaded item, so that another selected mail item can be loaded for processing.
|
|
15859
16041
|
*
|
|
15860
16042
|
* @remarks
|
|
15861
|
-
* [Api set: Mailbox
|
|
16043
|
+
* [Api set: Mailbox 1.15]
|
|
15862
16044
|
*
|
|
15863
16045
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
|
|
15864
16046
|
*
|
|
@@ -15874,8 +16056,6 @@ declare namespace Office {
|
|
|
15874
16056
|
*
|
|
15875
16057
|
* @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, `asyncResult`,
|
|
15876
16058
|
* which is an `Office.AsyncResult` object.
|
|
15877
|
-
*
|
|
15878
|
-
* @beta
|
|
15879
16059
|
*/
|
|
15880
16060
|
unloadAsync(callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
|
|
15881
16061
|
}
|
|
@@ -15884,7 +16064,7 @@ declare namespace Office {
|
|
|
15884
16064
|
* A `LoadedMessageRead` object is returned when `Office.context.mailbox.loadItemByIdAsync` is called on a message in read mode.
|
|
15885
16065
|
*
|
|
15886
16066
|
* @remarks
|
|
15887
|
-
* [Api set: Mailbox
|
|
16067
|
+
* [Api set: Mailbox 1.15]
|
|
15888
16068
|
*
|
|
15889
16069
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
|
|
15890
16070
|
*
|
|
@@ -15898,8 +16078,6 @@ declare namespace Office {
|
|
|
15898
16078
|
*
|
|
15899
16079
|
* - Only one mail item can be loaded at a time. When you implement `loadItemByIdAsync`, you must call `unloadAsync` after processing the item.
|
|
15900
16080
|
* This must be done before calling `loadItemByIdAsync` on another item.
|
|
15901
|
-
*
|
|
15902
|
-
* @beta
|
|
15903
16081
|
*/
|
|
15904
16082
|
interface LoadedMessageRead {
|
|
15905
16083
|
/**
|
|
@@ -16744,7 +16922,7 @@ declare namespace Office {
|
|
|
16744
16922
|
* When multiple mail items are selected, closes the currently loaded item, so that another selected mail item can be loaded for processing.
|
|
16745
16923
|
*
|
|
16746
16924
|
* @remarks
|
|
16747
|
-
* [Api set: Mailbox
|
|
16925
|
+
* [Api set: Mailbox 1.15]
|
|
16748
16926
|
*
|
|
16749
16927
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
|
|
16750
16928
|
*
|
|
@@ -16761,15 +16939,13 @@ declare namespace Office {
|
|
|
16761
16939
|
* @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.
|
|
16762
16940
|
* @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, `asyncResult`,
|
|
16763
16941
|
* which is an `Office.AsyncResult` object.
|
|
16764
|
-
*
|
|
16765
|
-
* @beta
|
|
16766
16942
|
*/
|
|
16767
16943
|
unloadAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
|
|
16768
16944
|
/**
|
|
16769
16945
|
* When multiple mail items are selected, closes the currently loaded item, so that another selected mail item can be loaded for processing.
|
|
16770
16946
|
*
|
|
16771
16947
|
* @remarks
|
|
16772
|
-
* [Api set: Mailbox
|
|
16948
|
+
* [Api set: Mailbox 1.15]
|
|
16773
16949
|
*
|
|
16774
16950
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
|
|
16775
16951
|
*
|
|
@@ -16785,8 +16961,6 @@ declare namespace Office {
|
|
|
16785
16961
|
*
|
|
16786
16962
|
* @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, `asyncResult`,
|
|
16787
16963
|
* which is an `Office.AsyncResult` object.
|
|
16788
|
-
*
|
|
16789
|
-
* @beta
|
|
16790
16964
|
*/
|
|
16791
16965
|
unloadAsync(callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
|
|
16792
16966
|
}
|
|
@@ -17547,9 +17721,10 @@ declare namespace Office {
|
|
|
17547
17721
|
*
|
|
17548
17722
|
* `htmlBody`: The HTML body of the message. The body content is limited to a maximum size of 32 KB.
|
|
17549
17723
|
*
|
|
17550
|
-
* `attachments`: An array of JSON objects that are either file or item attachments.
|
|
17724
|
+
* `attachments`: An array of JSON objects that are either file or Exchange item attachments.
|
|
17551
17725
|
*
|
|
17552
|
-
* `attachments.type`: Indicates the type of attachment. Must be `
|
|
17726
|
+
* `attachments.type`: Indicates the type of attachment. Must be `Office.MailboxEnums.AttachmentType.File` for a file attachment or
|
|
17727
|
+
* `Office.MailboxEnums.AttachmentType.Item` for an Exchange item attachment.
|
|
17553
17728
|
*
|
|
17554
17729
|
* `attachments.name`: A string that contains the name of the attachment, up to 255 characters in length.
|
|
17555
17730
|
*
|
|
@@ -17594,9 +17769,10 @@ declare namespace Office {
|
|
|
17594
17769
|
*
|
|
17595
17770
|
* `htmlBody`: The HTML body of the message. The body content is limited to a maximum size of 32 KB.
|
|
17596
17771
|
*
|
|
17597
|
-
* `attachments`: An array of JSON objects that are either file or item attachments.
|
|
17772
|
+
* `attachments`: An array of JSON objects that are either file or Exchange item attachments.
|
|
17598
17773
|
*
|
|
17599
|
-
* `attachments.type`: Indicates the type of attachment. Must be `
|
|
17774
|
+
* `attachments.type`: Indicates the type of attachment. Must be `Office.MailboxEnums.AttachmentType.File` for a file attachment or
|
|
17775
|
+
* `Office.MailboxEnums.AttachmentType.Item` for an Exchange item attachment.
|
|
17600
17776
|
*
|
|
17601
17777
|
* `attachments.name`: A string that contains the name of the attachment, up to 255 characters in length.
|
|
17602
17778
|
*
|
|
@@ -17645,9 +17821,10 @@ declare namespace Office {
|
|
|
17645
17821
|
*
|
|
17646
17822
|
* `htmlBody`: The HTML body of the message. The body content is limited to a maximum size of 32 KB.
|
|
17647
17823
|
*
|
|
17648
|
-
* `attachments`: An array of JSON objects that are either file or item attachments.
|
|
17824
|
+
* `attachments`: An array of JSON objects that are either file or Exchange item attachments.
|
|
17649
17825
|
*
|
|
17650
|
-
* `attachments.type`: Indicates the type of attachment. Must be `
|
|
17826
|
+
* `attachments.type`: Indicates the type of attachment. Must be `Office.MailboxEnums.AttachmentType.File` for a file attachment or
|
|
17827
|
+
* `Office.MailboxEnums.AttachmentType.Item` for an Exchange item attachment.
|
|
17651
17828
|
*
|
|
17652
17829
|
* `attachments.name`: A string that contains the name of the attachment, up to 255 characters in length.
|
|
17653
17830
|
*
|
|
@@ -17999,12 +18176,12 @@ declare namespace Office {
|
|
|
17999
18176
|
* Then, gets an object that provides the properties and methods of the loaded item.
|
|
18000
18177
|
*
|
|
18001
18178
|
* @remarks
|
|
18002
|
-
* [Api set: Mailbox
|
|
18179
|
+
* [Api set: Mailbox 1.15]
|
|
18003
18180
|
*
|
|
18004
18181
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
|
|
18005
18182
|
*
|
|
18006
18183
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose, Read
|
|
18007
|
-
*
|
|
18184
|
+
*
|
|
18008
18185
|
* **Important**:
|
|
18009
18186
|
*
|
|
18010
18187
|
* - This method only applies to messages.
|
|
@@ -18020,14 +18197,12 @@ declare namespace Office {
|
|
|
18020
18197
|
*
|
|
18021
18198
|
* - The `loadItemByIdAsync` method can only be called on messages in the same mailbox.
|
|
18022
18199
|
*
|
|
18023
|
-
* @param itemId - The EWS ID of a
|
|
18200
|
+
* @param itemId - The EWS ID of a mail item.
|
|
18024
18201
|
* @param options - An object literal that contains the `asyncContext` property.
|
|
18025
18202
|
* In this property, provide any object you wish to access in the callback function.
|
|
18026
18203
|
* @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter,
|
|
18027
18204
|
* `asyncResult`, which is an `Office.AsyncResult` object. A `LoadedMessageCompose` or `LoadedMessageRead` object is returned
|
|
18028
|
-
* in the `asyncResult.value` property. This object provides the properties of the
|
|
18029
|
-
*
|
|
18030
|
-
* @beta
|
|
18205
|
+
* in the `asyncResult.value` property. This object provides the properties of the item that's currently loaded.
|
|
18031
18206
|
*/
|
|
18032
18207
|
loadItemByIdAsync(itemId: string, options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult<LoadedMessageCompose | LoadedMessageRead>) => void): void;
|
|
18033
18208
|
/**
|
|
@@ -18035,12 +18210,12 @@ declare namespace Office {
|
|
|
18035
18210
|
* Then, gets an object that provides the properties and methods of the loaded item.
|
|
18036
18211
|
*
|
|
18037
18212
|
* @remarks
|
|
18038
|
-
* [Api set: Mailbox
|
|
18213
|
+
* [Api set: Mailbox 1.15]
|
|
18039
18214
|
*
|
|
18040
18215
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
|
|
18041
18216
|
*
|
|
18042
18217
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose, Read
|
|
18043
|
-
*
|
|
18218
|
+
*
|
|
18044
18219
|
* **Important**:
|
|
18045
18220
|
*
|
|
18046
18221
|
* - This method only applies to messages.
|
|
@@ -18056,12 +18231,10 @@ declare namespace Office {
|
|
|
18056
18231
|
*
|
|
18057
18232
|
* - The `loadItemByIdAsync` method can only be called on messages in the same mailbox.
|
|
18058
18233
|
*
|
|
18059
|
-
* @param itemId - The EWS ID of a
|
|
18234
|
+
* @param itemId - The EWS ID of a mail item.
|
|
18060
18235
|
* @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter,
|
|
18061
18236
|
* `asyncResult`, which is an `Office.AsyncResult` object. A `LoadedMessageCompose` or `LoadedMessageRead` object is returned
|
|
18062
|
-
* in the `asyncResult.value` property. This object provides the properties of the
|
|
18063
|
-
*
|
|
18064
|
-
* @beta
|
|
18237
|
+
* in the `asyncResult.value` property. This object provides the properties of the item that's currently loaded.
|
|
18065
18238
|
*/
|
|
18066
18239
|
loadItemByIdAsync(itemId: string, callback: (asyncResult: Office.AsyncResult<LoadedMessageCompose | LoadedMessageRead>) => void): void;
|
|
18067
18240
|
/**
|
|
@@ -19019,6 +19192,10 @@ declare namespace Office {
|
|
|
19019
19192
|
*
|
|
19020
19193
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose
|
|
19021
19194
|
*
|
|
19195
|
+
* **Important**: The `closeAsync` method is only supported in task pane and function command implementations. It isn't supported in
|
|
19196
|
+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/autolaunch | event-based handlers} or
|
|
19197
|
+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select | item multi-select scenarios}.
|
|
19198
|
+
*
|
|
19022
19199
|
* **Errors**:
|
|
19023
19200
|
*
|
|
19024
19201
|
* - `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`.
|
|
@@ -19051,6 +19228,10 @@ declare namespace Office {
|
|
|
19051
19228
|
*
|
|
19052
19229
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose
|
|
19053
19230
|
*
|
|
19231
|
+
* **Important**: The `closeAsync` method is only supported in task pane and function command implementations. It isn't supported in
|
|
19232
|
+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/autolaunch | event-based handlers} or
|
|
19233
|
+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select | item multi-select scenarios}.
|
|
19234
|
+
*
|
|
19054
19235
|
* **Errors**:
|
|
19055
19236
|
*
|
|
19056
19237
|
* - `The operation was cancelled by the user`: The user selects **Cancel** from the save dialog.
|
|
@@ -19923,6 +20104,74 @@ declare namespace Office {
|
|
|
19923
20104
|
* which is an `Office.AsyncResult` object. The EWS message ID is returned in the `asyncResult.value` property.
|
|
19924
20105
|
*/
|
|
19925
20106
|
saveAsync(callback: (asyncResult: Office.AsyncResult<string>) => void): void;
|
|
20107
|
+
/**
|
|
20108
|
+
* Sends the message being composed.
|
|
20109
|
+
*
|
|
20110
|
+
* @remarks
|
|
20111
|
+
* [Api set: Mailbox 1.15]
|
|
20112
|
+
*
|
|
20113
|
+
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox**
|
|
20114
|
+
*
|
|
20115
|
+
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose
|
|
20116
|
+
*
|
|
20117
|
+
* **Important**:
|
|
20118
|
+
*
|
|
20119
|
+
* - The `sendAsync` method is only supported in task pane and function command implementations. It isn't supported in
|
|
20120
|
+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/autolaunch | event-based handlers} or
|
|
20121
|
+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select | item multi-select scenarios}.
|
|
20122
|
+
*
|
|
20123
|
+
* - In a function command implementation, the value returned in `asyncResult.status` may not reflect whether the appointment being composed is successfully sent.
|
|
20124
|
+
* This is because the `sendAsync` method is an asynchronous API and events outside the add-in's control (for example, events handled by a separately installed
|
|
20125
|
+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/onmessagesend-onappointmentsend-events| Smart Alerts add-in}) could block the item from being sent.
|
|
20126
|
+
* Since you can't rely on the status returned in `asyncResult.status` to run certain operations, you should only call the
|
|
20127
|
+
* {@link https://learn.microsoft.com/javascript/api/office/office.addincommands.event#office-office-addincommands-event-completed-member(1) | event.completed }
|
|
20128
|
+
* method in the callback function. The `event.completed` call signals that the add-in has completed processing. Other than this call, other code in the callback function
|
|
20129
|
+
* isn't guaranteed to run. We recommend processing other operations before calling `sendAsync`.
|
|
20130
|
+
*
|
|
20131
|
+
* - In a task pane implementation, any code included to run when `asyncResult.status` is `Office.AsyncResultStatus.Success` isn't guaranteed to be processed.
|
|
20132
|
+
* This is because the item may have already been sent and the add-in has completed processing. We recommend processing other operations before calling `sendAsync`.
|
|
20133
|
+
*
|
|
20134
|
+
* - Any code included after the `sendAsync` call isn't guaranteed to run since the add-in completes processing after the `sendAsync` call.
|
|
20135
|
+
*
|
|
20136
|
+
* @param options - An object literal that contains the `asyncContext` property. Use the `asyncContext` property to specify any object you want to access in the
|
|
20137
|
+
* callback function.
|
|
20138
|
+
* @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`. The `asyncResult`
|
|
20139
|
+
* parameter is an `Office.AsyncResult` object.
|
|
20140
|
+
*/
|
|
20141
|
+
sendAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
|
|
20142
|
+
/**
|
|
20143
|
+
* Sends the message being composed.
|
|
20144
|
+
*
|
|
20145
|
+
* @remarks
|
|
20146
|
+
* [Api set: Mailbox 1.15]
|
|
20147
|
+
*
|
|
20148
|
+
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox**
|
|
20149
|
+
*
|
|
20150
|
+
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose
|
|
20151
|
+
*
|
|
20152
|
+
* **Important**:
|
|
20153
|
+
*
|
|
20154
|
+
* - The `sendAsync` method is only supported in task pane and function command implementations. It isn't supported in
|
|
20155
|
+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/autolaunch | event-based handlers} or
|
|
20156
|
+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select | item multi-select scenarios}.
|
|
20157
|
+
*
|
|
20158
|
+
* - In a function command implementation, the value returned in `asyncResult.status` may not reflect whether the appointment being composed is successfully sent.
|
|
20159
|
+
* This is because the `sendAsync` method is an asynchronous API and events outside the add-in's control (for example, events handled by a separately installed
|
|
20160
|
+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/onmessagesend-onappointmentsend-events| Smart Alerts add-in}) could block the item from being sent.
|
|
20161
|
+
* Since you can't rely on the status returned in `asyncResult.status` to run certain operations, you should only call the
|
|
20162
|
+
* {@link https://learn.microsoft.com/javascript/api/office/office.addincommands.event#office-office-addincommands-event-completed-member(1) | event.completed }
|
|
20163
|
+
* method in the callback function. The `event.completed` call signals that the add-in has completed processing. Other than this call, other code in the callback function
|
|
20164
|
+
* isn't guaranteed to run. We recommend processing other operations before calling `sendAsync`.
|
|
20165
|
+
*
|
|
20166
|
+
* - In a task pane implementation, any code included to run when `asyncResult.status` is `Office.AsyncResultStatus.Success` isn't guaranteed to be processed.
|
|
20167
|
+
* This is because the item may have already been sent and the add-in has completed processing. We recommend processing other operations before calling `sendAsync`.
|
|
20168
|
+
*
|
|
20169
|
+
* - Any code included after the `sendAsync` call isn't guaranteed to run since the add-in completes processing after the `sendAsync` call.
|
|
20170
|
+
*
|
|
20171
|
+
* @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`. The `asyncResult`
|
|
20172
|
+
* parameter is an `Office.AsyncResult` object.
|
|
20173
|
+
*/
|
|
20174
|
+
sendAsync(callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
|
|
19926
20175
|
/**
|
|
19927
20176
|
* Asynchronously inserts data into the body or subject of a message.
|
|
19928
20177
|
*
|
|
@@ -22236,29 +22485,49 @@ declare namespace Office {
|
|
|
22236
22485
|
*/
|
|
22237
22486
|
interface ReplyFormAttachment {
|
|
22238
22487
|
/**
|
|
22239
|
-
* Indicates the type of attachment.
|
|
22488
|
+
* Indicates the type of attachment.
|
|
22489
|
+
*
|
|
22490
|
+
* @remarks
|
|
22491
|
+
*
|
|
22492
|
+
* **Important**:
|
|
22493
|
+
*
|
|
22494
|
+
* - The `base64` attachment type was introduced in Mailbox requirement set 1.15. It's only supported by the `displayReplyAllForm`, `displayReplyAllFormAsync`, `displayReplyForm`, and
|
|
22495
|
+
* `displayReplyFormAsync` methods.
|
|
22496
|
+
*
|
|
22497
|
+
* - The `cloud` attachment type isn't supported by the `displayNewMessageForm`, `displayNewMessageFormAsync`, `displayReplyAllForm`, `displayReplyAllFormAsync`,
|
|
22498
|
+
* `displayReplyForm`, and `displayReplyFormAsync` methods.
|
|
22240
22499
|
*/
|
|
22241
|
-
type:
|
|
22500
|
+
type: MailboxEnums.AttachmentType;
|
|
22242
22501
|
/**
|
|
22243
22502
|
* A string that contains the name of the attachment, up to 255 characters in length.
|
|
22244
22503
|
*/
|
|
22245
22504
|
name: string;
|
|
22246
22505
|
/**
|
|
22247
|
-
*
|
|
22506
|
+
* The URI of the location for the file. Only use if `type` is set to `file`.
|
|
22248
22507
|
*
|
|
22249
|
-
*
|
|
22508
|
+
* @remarks
|
|
22509
|
+
*
|
|
22510
|
+
* **Important**: This link must be publicly accessible without need for authentication by Exchange Online servers. However, with
|
|
22250
22511
|
* on-premises Exchange, the link can be accessible on a private network as long as it doesn't need further authentication.
|
|
22251
22512
|
*/
|
|
22252
22513
|
url?: string;
|
|
22253
22514
|
/**
|
|
22254
|
-
*
|
|
22255
|
-
*
|
|
22515
|
+
* If true, indicates that the attachment will be shown inline in the message body and shouldn't be displayed in the attachment list.
|
|
22516
|
+
* Only use if `type` is set to `file`.
|
|
22256
22517
|
*/
|
|
22257
22518
|
inLine?: boolean;
|
|
22258
22519
|
/**
|
|
22259
|
-
*
|
|
22520
|
+
* The EWS item ID of the attachment. This is a string up to 100 characters. Only use if `type` is set to `item`.
|
|
22260
22521
|
*/
|
|
22261
22522
|
itemId?: string;
|
|
22523
|
+
/**
|
|
22524
|
+
* The Base64-encoded string of the file to be attached. Only use if `type` is set to `base64`.
|
|
22525
|
+
*
|
|
22526
|
+
* @remarks
|
|
22527
|
+
*
|
|
22528
|
+
* [Api set: Mailbox 1.15]
|
|
22529
|
+
*/
|
|
22530
|
+
base64File?: string;
|
|
22262
22531
|
}
|
|
22263
22532
|
/**
|
|
22264
22533
|
* A ReplyFormData object that contains body or attachment data and a callback function. Used when displaying a reply form.
|
|
@@ -22269,7 +22538,7 @@ declare namespace Office {
|
|
|
22269
22538
|
*/
|
|
22270
22539
|
htmlBody?: string;
|
|
22271
22540
|
/**
|
|
22272
|
-
* An array of {@link Office.ReplyFormAttachment | ReplyFormAttachment} that are
|
|
22541
|
+
* An array of {@link Office.ReplyFormAttachment | ReplyFormAttachment} that are Base64-encoded files, Exchange items, or file attachments.
|
|
22273
22542
|
*/
|
|
22274
22543
|
attachments?: ReplyFormAttachment[];
|
|
22275
22544
|
/**
|
|
@@ -23247,10 +23516,10 @@ declare namespace Office {
|
|
|
23247
23516
|
allowEvent?: boolean;
|
|
23248
23517
|
/**
|
|
23249
23518
|
* 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 and set its `allowEvent` property to `false`,
|
|
23250
|
-
* this property customizes the text of
|
|
23519
|
+
* this property customizes the text of a button in the Smart Alerts dialog. Custom text must be 20 characters or less.
|
|
23251
23520
|
*
|
|
23252
23521
|
* For an example, see the
|
|
23253
|
-
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough#customize-the-
|
|
23522
|
+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough#customize-the-text-and-functionality-of-a-button-in-the-dialog-optional | Smart Alerts walkthrough}.
|
|
23254
23523
|
*
|
|
23255
23524
|
* @remarks
|
|
23256
23525
|
*
|
|
@@ -23259,14 +23528,29 @@ declare namespace Office {
|
|
|
23259
23528
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **restricted**
|
|
23260
23529
|
*
|
|
23261
23530
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
|
|
23531
|
+
*
|
|
23532
|
+
* **Important**:
|
|
23533
|
+
*
|
|
23534
|
+
* The customizable button in the Smart Alerts dialog varies depending on the Outlook client and its version.
|
|
23535
|
+
*
|
|
23536
|
+
* - In Outlook on the web, new Outlook on Windows, and classic Outlook on Windows starting in Version 2412 (Build 18324.20000), the `cancelLabel` property customizes the text of the **Take Action** button.
|
|
23537
|
+
* The **Take Action** button only appears on the Smart Alerts dialog if the `commandId` option is configured in the `event.completed` call. The option must be configured
|
|
23538
|
+
* if you want to customize the text of the dialog button. In this implementation, the **Don't Send** button cancels the item being sent. Its text and functionality can't be customized.
|
|
23539
|
+
* If you previously customized the text of the **Don't Send** button without assigning it a task pane or function command, your custom text won't take effect in the latest Outlook client versions.
|
|
23540
|
+
* If you previously assigned a task pane or function command to the **Don't Send** button, no additional action is needed to implement the **Take Action** button in the latest versions.
|
|
23541
|
+
* The default or customized **Take Action** button will automatically appear the next time a user receives a Smart Alerts dialog. Although no implementation changes are needed, we recommend notifying users of this updated experience.
|
|
23542
|
+
*
|
|
23543
|
+
* - In earlier supported versions of classic Outlook on Windows (versions prior to Version 2412 (Build 18324.20000) that support
|
|
23544
|
+
* {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets#version-support-for-requirement-sets-in-classic-outlook-on-windows | Mailbox requirement set 1.14}),
|
|
23545
|
+
* and Outlook on Mac (preview), the `cancelLabel` property customizes the text of the **Don't Send** button. The **Don't Send** button cancels the item being sent.
|
|
23262
23546
|
*/
|
|
23263
23547
|
cancelLabel?: string;
|
|
23264
23548
|
/**
|
|
23265
23549
|
* 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 and set its `allowEvent` property to `false`,
|
|
23266
|
-
* this property specifies the ID of the task pane or function that runs
|
|
23550
|
+
* this property specifies the ID of the task pane or function that runs from a button in the Smart Alerts dialog.
|
|
23267
23551
|
*
|
|
23268
23552
|
* For an example, see the
|
|
23269
|
-
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough#customize-the-
|
|
23553
|
+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough#customize-the-text-and-functionality-of-a-button-in-the-dialog-optional | Smart Alerts walkthrough}.
|
|
23270
23554
|
*
|
|
23271
23555
|
* @remarks
|
|
23272
23556
|
*
|
|
@@ -23285,13 +23569,29 @@ declare namespace Office {
|
|
|
23285
23569
|
*
|
|
23286
23570
|
* - **Unified manifest for Microsoft 365**: The "id" property of the task pane or function command in the "controls" array.
|
|
23287
23571
|
*
|
|
23572
|
+
* The button in the Smart Alerts dialog that opens a task pane or runs a function varies depending on the Outlook client and version.
|
|
23573
|
+
* In Outlook on the web, new Outlook on Windows, and classic Outlook on Windows starting in Version 2412 (Build 18324.20000), the **Take Action** button opens a
|
|
23574
|
+
* task pane or runs a function. In this implementation, the **Don't Send** button cancels the item being sent. Its text and functionality can't be customized.
|
|
23575
|
+
* In earlier supported versions of classic Outlook on Windows (versions prior to Version 2412 (Build 18324.20000) that support
|
|
23576
|
+
* {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets#version-support-for-requirement-sets-in-classic-outlook-on-windows | Mailbox requirement set 1.14}),
|
|
23577
|
+
* and Outlook on Mac (preview), the **Don't Send** button opens a task pane or runs a function.
|
|
23578
|
+
*
|
|
23579
|
+
* If you customized the text and functionality of the **Don't Send** button in your Smart Alerts add-in prior to Version 2412 (Build 18324.20000) of classic Outlook on Windows,
|
|
23580
|
+
* no additional action is needed to implement the **Take Action** button in the latest supported versions. The default or customized **Take Action** button will automatically appear the next time a user receives a Smart Alerts dialog.
|
|
23581
|
+
* Although no implementation changes are needed, we recommend notifying users of this updated experience.
|
|
23582
|
+
*
|
|
23583
|
+
* If you specify a command ID that doesn't exist, depending on your Outlook client, the **Take Action** or **Don't Send** button simply cancels the item being sent.
|
|
23584
|
+
*
|
|
23288
23585
|
* If you specify the `contextData` option in your `event.completed` call, you must also assign a task pane or function ID to the `commandId` option.
|
|
23289
23586
|
* Otherwise, the JSON data assigned to `contextData` is ignored.
|
|
23587
|
+
*
|
|
23588
|
+
* When you configure a button in the Smart Alerts dialog to run a function, a button for the function is also added to the ribbon or action bar of the Outlook client.
|
|
23589
|
+
* Use the `contextData` option to distinguish when a user runs the function from the Smart Alerts dialog.
|
|
23290
23590
|
*/
|
|
23291
23591
|
commandId?: string;
|
|
23292
23592
|
/**
|
|
23293
|
-
* When you use the {@link https://learn.microsoft.com/javascript/api/outlook/office.mailboxevent#outlook-office-mailboxevent-completed-member(1) | completed method} to
|
|
23294
|
-
* this property specifies any JSON data passed to the add-in for processing when the
|
|
23593
|
+
* When you use the {@link https://learn.microsoft.com/javascript/api/outlook/office.mailboxevent#outlook-office-mailboxevent-completed-member(1) | completed method} to
|
|
23594
|
+
* signal completion of an event handler and set its `allowEvent` property to `false`, this property specifies any JSON data passed to the add-in for processing when the applicable button is selected from the Smart Alerts dialog.
|
|
23295
23595
|
*
|
|
23296
23596
|
* @remarks
|
|
23297
23597
|
*
|
|
@@ -23306,12 +23606,18 @@ declare namespace Office {
|
|
|
23306
23606
|
* - In Outlook on Windows, the `any` type is supported starting in Version 2402 (Build 17308.20000). In earlier versions of Outlook on Windows, only the `string`
|
|
23307
23607
|
* type is supported.
|
|
23308
23608
|
*
|
|
23309
|
-
* - If you specify the `contextData` option in your `event.completed` call, you must also assign a task pane ID to the `commandId` option.
|
|
23609
|
+
* - If you specify the `contextData` option in your `event.completed` call, you must also assign a task pane or function ID to the `commandId` option.
|
|
23310
23610
|
* Otherwise, the JSON data assigned to `contextData` is ignored.
|
|
23311
23611
|
*
|
|
23612
|
+
* - The dialog button that passes the `contextData` value to the add-in varies depending on the Outlook client and its version. For more information, see
|
|
23613
|
+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough#customize-the-text-and-functionality-of-a-button-in-the-dialog-optional | Customize the text and functionality of a button in the dialog}.
|
|
23614
|
+
*
|
|
23312
23615
|
* - To retrieve the value of the `contextData` property, you must call `Office.context.mailbox.item.getInitializationContextAsync` in the JavaScript implementation
|
|
23313
23616
|
* of your task pane. If you create a JSON string using `JSON.stringify()` and assign it to the `contextData` property, you must parse the string using
|
|
23314
23617
|
* `JSON.parse()` once you retrieve it.
|
|
23618
|
+
*
|
|
23619
|
+
* - When you configure a button in the Smart Alerts dialog to run a function, a button for the function is also added to the ribbon or action bar of the Outlook client.
|
|
23620
|
+
* Use the `contextData` option to distinguish when a user runs the function from the Smart Alerts dialog.
|
|
23315
23621
|
*/
|
|
23316
23622
|
contextData?: any;
|
|
23317
23623
|
/**
|
|
@@ -23337,7 +23643,7 @@ declare namespace Office {
|
|
|
23337
23643
|
*
|
|
23338
23644
|
* @remarks
|
|
23339
23645
|
*
|
|
23340
|
-
* [Api set: Mailbox
|
|
23646
|
+
* [Api set: Mailbox 1.15]
|
|
23341
23647
|
*
|
|
23342
23648
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **restricted**
|
|
23343
23649
|
*
|
|
@@ -23352,8 +23658,6 @@ declare namespace Office {
|
|
|
23352
23658
|
*
|
|
23353
23659
|
* - 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.
|
|
23354
23660
|
* This ensures that the message is displayed properly in Outlook clients that don't support Markdown.
|
|
23355
|
-
*
|
|
23356
|
-
* @beta
|
|
23357
23661
|
*/
|
|
23358
23662
|
errorMessageMarkdown?: string;
|
|
23359
23663
|
/**
|
|
@@ -23441,7 +23745,7 @@ declare namespace Office {
|
|
|
23441
23745
|
*
|
|
23442
23746
|
* @remarks
|
|
23443
23747
|
*
|
|
23444
|
-
* [Api set: Mailbox
|
|
23748
|
+
* [Api set: Mailbox 1.15]
|
|
23445
23749
|
*
|
|
23446
23750
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **read item**
|
|
23447
23751
|
*
|
|
@@ -23449,11 +23753,8 @@ declare namespace Office {
|
|
|
23449
23753
|
*
|
|
23450
23754
|
* **Important**:
|
|
23451
23755
|
*
|
|
23452
|
-
* -
|
|
23453
|
-
*
|
|
23454
|
-
* {@link https://techcommunity.microsoft.com/blog/microsoft365insiderblog/join-the-microsoft-365-insider-program-on-windows/4206638 | Microsoft 365 Insider program}
|
|
23455
|
-
* and select the **Beta Channel** option. To learn how to implement this in your spam-reporting add-in, see
|
|
23456
|
-
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting#open-a-task-pane-after-reporting-a-message-preview | Open a task pane after reporting a message (preview)}.
|
|
23756
|
+
* - To learn how to implement the `commandId` property in your spam-reporting add-in, see
|
|
23757
|
+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting#open-a-task-pane-after-reporting-a-message | Open a task pane after reporting a message}.
|
|
23457
23758
|
*
|
|
23458
23759
|
* - The `commandId` value must match the task pane ID specified in the manifest of your add-in. In an add-in only manifest,
|
|
23459
23760
|
* the ID is specified in the `id` attribute of the {@link https://learn.microsoft.com/javascript/api/manifest/control | Control} element that represents the task pane.
|
|
@@ -23462,9 +23763,10 @@ declare namespace Office {
|
|
|
23462
23763
|
* - If you configure the `commandId` option in the `event.completed` call, a post-processing dialog isn't shown to the user
|
|
23463
23764
|
* even if the `showPostProcessingDialog` option is specified in the call.
|
|
23464
23765
|
*
|
|
23465
|
-
* -
|
|
23766
|
+
* - To ensure that the task pane of your spam-reporting add-in opens after a message is reported, you must set the `moveItemTo` option of the `event.completed` call to
|
|
23767
|
+
* `Office.MailboxEnums.MoveSpamItemTo.NoMove`.
|
|
23466
23768
|
*
|
|
23467
|
-
*
|
|
23769
|
+
* - If you implement a task pane to open after a reported message is processed, when the `event.completed` call occurs, any task pane that's open or pinned is closed.
|
|
23468
23770
|
*/
|
|
23469
23771
|
commandId?: string;
|
|
23470
23772
|
/**
|
|
@@ -23473,7 +23775,7 @@ declare namespace Office {
|
|
|
23473
23775
|
*
|
|
23474
23776
|
* @remarks
|
|
23475
23777
|
*
|
|
23476
|
-
* [Api set: Mailbox
|
|
23778
|
+
* [Api set: Mailbox 1.15]
|
|
23477
23779
|
*
|
|
23478
23780
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **read item**
|
|
23479
23781
|
*
|
|
@@ -23481,11 +23783,8 @@ declare namespace Office {
|
|
|
23481
23783
|
*
|
|
23482
23784
|
* **Important**:
|
|
23483
23785
|
*
|
|
23484
|
-
* -
|
|
23485
|
-
*
|
|
23486
|
-
* {@link https://techcommunity.microsoft.com/blog/microsoft365insiderblog/join-the-microsoft-365-insider-program-on-windows/4206638 | Microsoft 365 Insider program}
|
|
23487
|
-
* and select the **Beta Channel** option. To learn how to implement this in your spam-reporting add-in, see
|
|
23488
|
-
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting#open-a-task-pane-after-reporting-a-message-preview | Open a task pane after reporting a message (preview)}.
|
|
23786
|
+
* - To learn how to implement the `contextData` property in your spam-reporting add-in, see
|
|
23787
|
+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting#open-a-task-pane-after-reporting-a-message | Open a task pane after reporting a message}.
|
|
23489
23788
|
*
|
|
23490
23789
|
* - If you specify the `contextData` option in your `event.completed` call, you must also assign a task pane ID to the `commandId` option.
|
|
23491
23790
|
* Otherwise, the JSON data assigned to `contextData` is ignored.
|
|
@@ -23493,13 +23792,14 @@ declare namespace Office {
|
|
|
23493
23792
|
* - If you configure the `commandId` and `contextData` options in the `event.completed` call, a post-processing dialog isn't shown to the user
|
|
23494
23793
|
* even if the `showPostProcessingDialog` option is specified in the call.
|
|
23495
23794
|
*
|
|
23795
|
+
* - To ensure that the task pane of your spam-reporting add-in opens and receives context data after a message is reported, you must set the `moveItemTo` option of the `event.completed` call to
|
|
23796
|
+
* `Office.MailboxEnums.MoveSpamItemTo.NoMove`.
|
|
23797
|
+
*
|
|
23496
23798
|
* - If you implement a task pane to open after a reported message is processed, when the `event.completed` call occurs, any task pane that's open or pinned is closed.
|
|
23497
23799
|
*
|
|
23498
23800
|
* - To retrieve the value of the `contextData` property, you must call `Office.context.mailbox.item.getInitializationContextAsync` in the JavaScript implementation
|
|
23499
23801
|
* of your task pane. If you create a JSON string using `JSON.stringify()` and assign it to the `contextData` property, you must parse the string using
|
|
23500
23802
|
* `JSON.parse()` once you retrieve it.
|
|
23501
|
-
*
|
|
23502
|
-
* @beta
|
|
23503
23803
|
*/
|
|
23504
23804
|
contextData?: any;
|
|
23505
23805
|
/**
|
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.569",
|
|
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",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"scripts": {},
|
|
47
47
|
"dependencies": {},
|
|
48
48
|
"peerDependencies": {},
|
|
49
|
-
"typesPublisherContentHash": "
|
|
49
|
+
"typesPublisherContentHash": "5783370542d3d1ab090fea3d2b8adf0c1c60c64ac3610583b82ae27ec72de78c",
|
|
50
50
|
"typeScriptVersion": "5.0",
|
|
51
51
|
"nonNpm": true
|
|
52
52
|
}
|