@types/office-js 1.0.433 → 1.0.435
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/README.md +1 -1
- office-js/index.d.ts +150 -81
- office-js/package.json +2 -2
office-js/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.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Thu, 17 Oct 2024 17:36:59 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
|
|
14
14
|
# Credits
|
office-js/index.d.ts
CHANGED
|
@@ -5473,6 +5473,8 @@ declare namespace Office {
|
|
|
5473
5473
|
*
|
|
5474
5474
|
* - If the `messageOptions` parameter is used, {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-origin-requirement-sets | DialogOrigin 1.1} is also required.
|
|
5475
5475
|
*
|
|
5476
|
+
* Although classic Outlook on Mac doesn't support Mailbox 1.9, it does support DialogApi 1.2.
|
|
5477
|
+
*
|
|
5476
5478
|
* @param message Accepts a message from the host page to deliver to the dialog. Anything that can be serialized to a string, including JSON and XML, can be sent.
|
|
5477
5479
|
* @param messageOptions Optional. Provides options for how to send the message.
|
|
5478
5480
|
*/
|
|
@@ -8630,18 +8632,22 @@ declare namespace Office {
|
|
|
8630
8632
|
*/
|
|
8631
8633
|
displayDialogAsync(startAddress: string, callback?: (result: AsyncResult<Dialog>) => void): void;
|
|
8632
8634
|
/**
|
|
8633
|
-
* Delivers a message from the dialog box to its parent/opener page.
|
|
8634
|
-
*
|
|
8635
|
+
* Delivers a message from the dialog box to its parent/opener page.
|
|
8636
|
+
*
|
|
8635
8637
|
* @remarks
|
|
8636
|
-
*
|
|
8637
|
-
* **
|
|
8638
|
-
*
|
|
8638
|
+
*
|
|
8639
|
+
* **Applications**: Excel, Outlook, PowerPoint, Word
|
|
8640
|
+
*
|
|
8641
|
+
* **Requirement sets**:
|
|
8642
|
+
*
|
|
8639
8643
|
* - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-api-requirement-sets | DialogApi}
|
|
8640
|
-
*
|
|
8644
|
+
*
|
|
8645
|
+
* - {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets | Mailbox 1.4}
|
|
8646
|
+
*
|
|
8641
8647
|
* - If the `messageOptions` parameter is used, {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-origin-requirement-sets | DialogOrigin 1.1} is also required.
|
|
8642
|
-
*
|
|
8643
|
-
* @param message Accepts a message from the dialog to deliver to the add-in. Anything that can serialized to a string including JSON and XML can be sent.
|
|
8644
|
-
* @param messageOptions Optional. Provides options for how to send the message.
|
|
8648
|
+
*
|
|
8649
|
+
* @param message Accepts a message from the dialog to deliver to the add-in. Anything that can serialized to a string including JSON and XML can be sent.
|
|
8650
|
+
* @param messageOptions Optional. Provides options for how to send the message.
|
|
8645
8651
|
*/
|
|
8646
8652
|
messageParent(message: string, messageOptions?: DialogMessageOptions): void;
|
|
8647
8653
|
/**
|
|
@@ -10033,6 +10039,12 @@ declare namespace Office {
|
|
|
10033
10039
|
* [Api set: Mailbox 1.3]
|
|
10034
10040
|
*
|
|
10035
10041
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read
|
|
10042
|
+
*
|
|
10043
|
+
* **Important**: The Outlook REST v2.0 and beta endpoints are now deprecated. However, privately released and AppSource-hosted add-ins are able to use the REST service
|
|
10044
|
+
* until extended support ends for Outlook 2019 on October 14, 2025. Traffic from these add-ins is automatically identified for exemption. This exemption also
|
|
10045
|
+
* applies to new add-ins developed after March 31, 2024. Although add-ins are able to use the REST service until 2025, we highly encourage you to migrate your
|
|
10046
|
+
* add-ins to use {@link https://learn.microsoft.com/outlook/rest#outlook-rest-api-via-microsoft-graph | Microsoft Graph}. For guidance, see
|
|
10047
|
+
* {@link https://learn.microsoft.com/outlook/rest/compare-graph | Compare Microsoft Graph and Outlook REST API endpoints}.
|
|
10036
10048
|
*/
|
|
10037
10049
|
enum RestVersion {
|
|
10038
10050
|
/**
|
|
@@ -10868,14 +10880,11 @@ declare namespace Office {
|
|
|
10868
10880
|
*/
|
|
10869
10881
|
getInitializationContextAsync(callback: (asyncResult: Office.AsyncResult<string>) => void): void;
|
|
10870
10882
|
/**
|
|
10871
|
-
* Asynchronously gets the
|
|
10883
|
+
* Asynchronously gets the {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | Exchange Web Services (EWS) item identifier}
|
|
10884
|
+
* of a saved item.
|
|
10872
10885
|
*
|
|
10873
10886
|
* When invoked, this method returns the item ID via the callback function.
|
|
10874
10887
|
*
|
|
10875
|
-
* **Note**: If your add-in calls `getItemIdAsync` on an item in compose mode (e.g., to get an `itemId` to use with EWS or the REST API),
|
|
10876
|
-
* be aware that when Outlook is in cached mode, it may take some time before the item is synced to the server.
|
|
10877
|
-
* Until the item is synced, the `itemId` is not recognized and using it returns an error.
|
|
10878
|
-
*
|
|
10879
10888
|
* @remarks
|
|
10880
10889
|
* [Api set: Mailbox 1.8]
|
|
10881
10890
|
*
|
|
@@ -10883,6 +10892,15 @@ declare namespace Office {
|
|
|
10883
10892
|
*
|
|
10884
10893
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer
|
|
10885
10894
|
*
|
|
10895
|
+
* **Important**:
|
|
10896
|
+
*
|
|
10897
|
+
* - The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API.
|
|
10898
|
+
* Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`.
|
|
10899
|
+
*
|
|
10900
|
+
* - If your add-in calls `getItemIdAsync` (for example, to get an item ID to use with EWS or the REST API),
|
|
10901
|
+
* be aware that when Outlook is in cached mode, it may take some time before the item is synced to the server.
|
|
10902
|
+
* Until the item is synced, the item ID isn't recognized and using it returns an error.
|
|
10903
|
+
*
|
|
10886
10904
|
* **Errors**:
|
|
10887
10905
|
*
|
|
10888
10906
|
* - `ItemNotSaved`: The ID can't be retrieved until the item is saved.
|
|
@@ -10890,18 +10908,15 @@ declare namespace Office {
|
|
|
10890
10908
|
* @param options - An object literal that contains one or more of the following properties:-
|
|
10891
10909
|
* `asyncContext`: Developers can provide any object they wish to access in the callback function.
|
|
10892
10910
|
* @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter
|
|
10893
|
-
* of type `Office.AsyncResult`.
|
|
10911
|
+
* of type `Office.AsyncResult`. The EWS item ID of the item is returned in the `asyncResult.value` property.
|
|
10894
10912
|
*/
|
|
10895
10913
|
getItemIdAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult<string>) => void): void;
|
|
10896
10914
|
/**
|
|
10897
|
-
* Asynchronously gets the
|
|
10915
|
+
* Asynchronously gets the {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | Exchange Web Services (EWS) item identifier}
|
|
10916
|
+
* of a saved item.
|
|
10898
10917
|
*
|
|
10899
10918
|
* When invoked, this method returns the item ID via the callback function.
|
|
10900
10919
|
*
|
|
10901
|
-
* **Note**: If your add-in calls `getItemIdAsync` on an item in compose mode (e.g., to get an `itemId` to use with EWS or the REST API),
|
|
10902
|
-
* be aware that when Outlook is in cached mode, it may take some time before the item is synced to the server.
|
|
10903
|
-
* Until the item is synced, the `itemId` is not recognized and using it returns an error.
|
|
10904
|
-
*
|
|
10905
10920
|
* @remarks
|
|
10906
10921
|
* [Api set: Mailbox 1.8]
|
|
10907
10922
|
*
|
|
@@ -10909,12 +10924,21 @@ declare namespace Office {
|
|
|
10909
10924
|
*
|
|
10910
10925
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer
|
|
10911
10926
|
*
|
|
10927
|
+
* **Important**:
|
|
10928
|
+
*
|
|
10929
|
+
* - The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API.
|
|
10930
|
+
* Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`.
|
|
10931
|
+
*
|
|
10932
|
+
* - If your add-in calls `getItemIdAsync` (for example, to get an item ID to use with EWS or the REST API),
|
|
10933
|
+
* be aware that when Outlook is in cached mode, it may take some time before the item is synced to the server.
|
|
10934
|
+
* Until the item is synced, the item ID isn't recognized and using it returns an error.
|
|
10935
|
+
*
|
|
10912
10936
|
* **Errors**:
|
|
10913
10937
|
*
|
|
10914
10938
|
* - `ItemNotSaved`: The ID can't be retrieved until the item is saved.
|
|
10915
10939
|
*
|
|
10916
10940
|
* @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter
|
|
10917
|
-
* of type `Office.AsyncResult`.
|
|
10941
|
+
* of type `Office.AsyncResult`. The EWS item ID of the item is returned in the `asyncResult.value` property.
|
|
10918
10942
|
*/
|
|
10919
10943
|
getItemIdAsync(callback: (asyncResult: Office.AsyncResult<string>) => void): void;
|
|
10920
10944
|
/**
|
|
@@ -11205,7 +11229,12 @@ declare namespace Office {
|
|
|
11205
11229
|
* - When working with HTML-formatted content, it's important to note that the Outlook client may modify the content. This means that
|
|
11206
11230
|
* subsequent calls to methods like `Body.getAsync`, `Body.setAsync`, and even `saveAsync` may not result in the same content.
|
|
11207
11231
|
*
|
|
11208
|
-
* -
|
|
11232
|
+
* - The identifier returned is the same as the
|
|
11233
|
+
* {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | Exchange Web Services (EWS) item identifier}.
|
|
11234
|
+
* The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API.
|
|
11235
|
+
* Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`.
|
|
11236
|
+
*
|
|
11237
|
+
* - If your add-in calls `saveAsync` to get an item ID to use with EWS or the REST API, be aware that
|
|
11209
11238
|
* when Outlook is in cached mode, it may take some time before the item is actually synced to the server.
|
|
11210
11239
|
* Until the item is synced, using the item ID will return an error.
|
|
11211
11240
|
*
|
|
@@ -11220,7 +11249,7 @@ declare namespace Office {
|
|
|
11220
11249
|
* @param options - An object literal that contains one or more of the following properties:-
|
|
11221
11250
|
* `asyncContext`: Developers can provide any object they wish to access in the callback function.
|
|
11222
11251
|
* @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`,
|
|
11223
|
-
* which is an `Office.AsyncResult` object. The appointment ID is returned in the `asyncResult.value` property.
|
|
11252
|
+
* which is an `Office.AsyncResult` object. The EWS appointment ID is returned in the `asyncResult.value` property.
|
|
11224
11253
|
*/
|
|
11225
11254
|
saveAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult<string>) => void): void;
|
|
11226
11255
|
/**
|
|
@@ -11245,7 +11274,12 @@ declare namespace Office {
|
|
|
11245
11274
|
* - When working with HTML-formatted content, it's important to note that the Outlook client may modify the content. This means that
|
|
11246
11275
|
* subsequent calls to methods like `Body.getAsync`, `Body.setAsync`, and even `saveAsync` may not result in the same content.
|
|
11247
11276
|
*
|
|
11248
|
-
* -
|
|
11277
|
+
* - The identifier returned is the same as the
|
|
11278
|
+
* {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | Exchange Web Services (EWS) item identifier}.
|
|
11279
|
+
* The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API.
|
|
11280
|
+
* Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`.
|
|
11281
|
+
*
|
|
11282
|
+
* - If your add-in calls `saveAsync` to get an item ID to use with EWS or the REST API, be aware that
|
|
11249
11283
|
* when Outlook is in cached mode, it may take some time before the item is actually synced to the server.
|
|
11250
11284
|
* Until the item is synced, using the item ID will return an error.
|
|
11251
11285
|
*
|
|
@@ -11258,7 +11292,7 @@ declare namespace Office {
|
|
|
11258
11292
|
* - `InvalidAttachmentId`: The attachment identifier does not exist.
|
|
11259
11293
|
*
|
|
11260
11294
|
* @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`,
|
|
11261
|
-
* which is an `Office.AsyncResult` object. The appointment ID is returned in the `asyncResult.value` property.
|
|
11295
|
+
* which is an `Office.AsyncResult` object. The EWS appointment ID is returned in the `asyncResult.value` property.
|
|
11262
11296
|
*/
|
|
11263
11297
|
saveAsync(callback: (asyncResult: Office.AsyncResult<string>) => void): void;
|
|
11264
11298
|
/**
|
|
@@ -11611,24 +11645,23 @@ declare namespace Office {
|
|
|
11611
11645
|
*/
|
|
11612
11646
|
itemClass: string;
|
|
11613
11647
|
/**
|
|
11614
|
-
* Gets the {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | Exchange Web Services item identifier}
|
|
11615
|
-
*
|
|
11616
|
-
*
|
|
11617
|
-
* The `itemId` property is not available in compose mode.
|
|
11618
|
-
* If an item identifier is required, the `saveAsync` method can be used to save the item to the store, which will return the item identifier
|
|
11619
|
-
* in the `asyncResult.value` parameter in the callback function.
|
|
11620
|
-
*
|
|
11621
|
-
* **Note**: The identifier returned by the `itemId` property is the same as the
|
|
11622
|
-
* {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | Exchange Web Services item identifier}.
|
|
11623
|
-
* The `itemId` property is not identical to the Outlook Entry ID or the ID used by the Outlook REST API.
|
|
11624
|
-
* Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`.
|
|
11625
|
-
* For more details, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-rest-api#get-the-item-id | Use the Outlook REST APIs from an Outlook add-in}.
|
|
11648
|
+
* Gets the {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | Exchange Web Services (EWS) item identifier}
|
|
11649
|
+
* of the current item.
|
|
11626
11650
|
*
|
|
11627
11651
|
* @remarks
|
|
11628
11652
|
*
|
|
11629
11653
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item**
|
|
11630
11654
|
*
|
|
11631
11655
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee
|
|
11656
|
+
*
|
|
11657
|
+
* **Important**:
|
|
11658
|
+
*
|
|
11659
|
+
* - The `itemId` property isn't available in compose mode.
|
|
11660
|
+
* If an item identifier is required, the `Office.context.mailbox.item.saveAsync` method can be used to save the item to the store, which will return the item identifier
|
|
11661
|
+
* in the `asyncResult.value` parameter in the callback function. If the item is already saved, you can call the `Office.context.mailbox.item.getItemIdAsync` method instead.
|
|
11662
|
+
*
|
|
11663
|
+
* - The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API.
|
|
11664
|
+
* Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`.
|
|
11632
11665
|
*/
|
|
11633
11666
|
itemId: string;
|
|
11634
11667
|
/**
|
|
@@ -14815,16 +14848,6 @@ declare namespace Office {
|
|
|
14815
14848
|
/**
|
|
14816
14849
|
* Gets the URL of the REST endpoint for this email account.
|
|
14817
14850
|
*
|
|
14818
|
-
* Your app must have the **read item** permission specified in its manifest to call the `restUrl` member in read mode.
|
|
14819
|
-
*
|
|
14820
|
-
* In compose mode you must call the `saveAsync` method before you can use the `restUrl` member.
|
|
14821
|
-
* Your app must have **read/write item** permissions to call the `saveAsync` method.
|
|
14822
|
-
*
|
|
14823
|
-
* However, in delegate or shared scenarios, you should instead use the `targetRestUrl` property of the
|
|
14824
|
-
* {@link https://learn.microsoft.com/javascript/api/outlook/office.sharedproperties?view=outlook-js-1.8 | SharedProperties} object
|
|
14825
|
-
* (introduced in requirement set 1.8). For more information, see the
|
|
14826
|
-
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | delegate access} article.
|
|
14827
|
-
*
|
|
14828
14851
|
* @remarks
|
|
14829
14852
|
* [Api set: Mailbox 1.5]
|
|
14830
14853
|
*
|
|
@@ -14832,7 +14855,21 @@ declare namespace Office {
|
|
|
14832
14855
|
*
|
|
14833
14856
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read
|
|
14834
14857
|
*
|
|
14835
|
-
*
|
|
14858
|
+
* **Important**:
|
|
14859
|
+
*
|
|
14860
|
+
* - The Outlook REST v2.0 and beta endpoints are now deprecated. However, privately released and AppSource-hosted add-ins are able to use the REST service
|
|
14861
|
+
* until extended support ends for Outlook 2019 on October 14, 2025. Traffic from these add-ins is automatically identified for exemption. This exemption also
|
|
14862
|
+
* applies to new add-ins developed after March 31, 2024. Although add-ins are able to use the REST service until 2025, we highly encourage you to migrate your
|
|
14863
|
+
* add-ins to use {@link https://learn.microsoft.com/outlook/rest#outlook-rest-api-via-microsoft-graph | Microsoft Graph}. For guidance, see
|
|
14864
|
+
* {@link https://learn.microsoft.com/outlook/rest/compare-graph | Compare Microsoft Graph and Outlook REST API endpoints}.
|
|
14865
|
+
*
|
|
14866
|
+
* - Your add-in must have the **read item** permission specified in its manifest to call the `restUrl` member in read mode.
|
|
14867
|
+
*
|
|
14868
|
+
* - In compose mode you must call the `saveAsync` method before you can use the `restUrl` member.
|
|
14869
|
+
* Your add-in must have **read/write item** permissions to call the `saveAsync` method.
|
|
14870
|
+
* However, in delegate or shared scenarios, you should instead use the `targetRestUrl` property of the
|
|
14871
|
+
* {@link Office.SharedProperties | SharedProperties} object (introduced in requirement set 1.8). For more information,
|
|
14872
|
+
* see the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | shared folders and shared mailbox} article.
|
|
14836
14873
|
*/
|
|
14837
14874
|
restUrl: string;
|
|
14838
14875
|
/**
|
|
@@ -14895,10 +14932,17 @@ declare namespace Office {
|
|
|
14895
14932
|
*
|
|
14896
14933
|
* **Important**:
|
|
14897
14934
|
*
|
|
14935
|
+
* - In October 2024, legacy Exchange {@link https://learn.microsoft.com/office/dev/add-ins/outlook/authentication#exchange-user-identity-token | user identity} and
|
|
14936
|
+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/authentication#callback-tokens | callback} tokens will be turned off by default for all Exchange Online tenants.
|
|
14937
|
+
* This is part of {@link https://blogs.microsoft.com/on-the-issues/2023/11/02/secure-future-initiative-sfi-cybersecurity-cyberattacks/ | Microsoft's Secure Future Initiative},
|
|
14938
|
+
* which gives organizations the tools needed to respond to the current threat landscape. Exchange user identity tokens will still work for Exchange on-premises.
|
|
14939
|
+
* Nested app authentication is the recommended approach for tokens going forward. For more information, see our {@link https://aka.ms/NAApreviewblog | blog post} and
|
|
14940
|
+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/faq-nested-app-auth-outlook-legacy-tokens | FAQ page}.
|
|
14941
|
+
*
|
|
14898
14942
|
* - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see
|
|
14899
14943
|
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}.
|
|
14900
14944
|
*
|
|
14901
|
-
* - Item IDs retrieved via a REST API (such as
|
|
14945
|
+
* - Item IDs retrieved via a REST API (such as {@link https://graph.microsoft.io/ | Microsoft Graph}) use a different format than the format used by EWS.
|
|
14902
14946
|
* The `convertToEwsId` method converts a REST-formatted ID into the proper format for EWS.
|
|
14903
14947
|
*
|
|
14904
14948
|
* @param id - The ID to be converted into EWS format. This string can be an item ID formatted for the Outlook REST APIs or a conversation ID retrieved from
|
|
@@ -14942,10 +14986,8 @@ declare namespace Office {
|
|
|
14942
14986
|
* - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see
|
|
14943
14987
|
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}.
|
|
14944
14988
|
*
|
|
14945
|
-
* - Item IDs retrieved via Exchange Web Services (EWS) or via the `itemId` property use a different format than the format used by REST APIs (such as
|
|
14946
|
-
* {@link https://
|
|
14947
|
-
* or the {@link https://graph.microsoft.io/ | Microsoft Graph}).
|
|
14948
|
-
* The `convertToRestId` method converts an EWS-formatted ID into the proper format for REST.
|
|
14989
|
+
* - Item IDs retrieved via Exchange Web Services (EWS) or via the `itemId` property use a different format than the format used by REST APIs (such as
|
|
14990
|
+
* {@link https://graph.microsoft.io/ | Microsoft Graph}). The `convertToRestId` method converts an EWS-formatted ID into the proper format for REST.
|
|
14949
14991
|
*
|
|
14950
14992
|
* @param id - The ID to be converted into REST format. This string can be an item ID formatted for EWS that's usually retrieved from
|
|
14951
14993
|
* `Office.context.mailbox.item.itemId`, a conversation ID retrieved from `Office.context.mailbox.item.conversationId`, or a
|
|
@@ -15414,6 +15456,12 @@ declare namespace Office {
|
|
|
15414
15456
|
* Nested app authentication is the recommended approach for tokens going forward. For more information, see our {@link https://aka.ms/NAApreviewblog | blog post} and
|
|
15415
15457
|
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/faq-nested-app-auth-outlook-legacy-tokens | FAQ page}.
|
|
15416
15458
|
*
|
|
15459
|
+
* - The Outlook REST v2.0 and beta endpoints are now deprecated. However, privately released and AppSource-hosted add-ins are able to use the REST service
|
|
15460
|
+
* until extended support ends for Outlook 2019 on October 14, 2025. Traffic from these add-ins is automatically identified for exemption. This exemption also
|
|
15461
|
+
* applies to new add-ins developed after March 31, 2024. Although add-ins are able to use the REST service until 2025, we highly encourage you to migrate your
|
|
15462
|
+
* add-ins to use {@link https://learn.microsoft.com/outlook/rest#outlook-rest-api-via-microsoft-graph | Microsoft Graph}. For guidance, see
|
|
15463
|
+
* {@link https://learn.microsoft.com/outlook/rest/compare-graph | Compare Microsoft Graph and Outlook REST API endpoints}.
|
|
15464
|
+
*
|
|
15417
15465
|
* - This method isn't supported if you load an add-in in an Outlook.com or Gmail mailbox.
|
|
15418
15466
|
*
|
|
15419
15467
|
* - This method is only supported in read mode in Outlook on Android and on iOS. For more information on supported APIs in Outlook mobile, see
|
|
@@ -16985,14 +17033,11 @@ declare namespace Office {
|
|
|
16985
17033
|
*/
|
|
16986
17034
|
getItemClassAsync(callback: (asyncResult: Office.AsyncResult<string>) => void): void;
|
|
16987
17035
|
/**
|
|
16988
|
-
* Asynchronously gets the
|
|
17036
|
+
* Asynchronously gets the {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | Exchange Web Services (EWS) item identifier}
|
|
17037
|
+
* of a saved item.
|
|
16989
17038
|
*
|
|
16990
17039
|
* When invoked, this method returns the item ID via the callback function.
|
|
16991
17040
|
*
|
|
16992
|
-
* **Note**: If your add-in calls `getItemIdAsync` on an item in compose mode (e.g., to get an `itemId` to use with EWS or the REST API),
|
|
16993
|
-
* be aware that when Outlook is in cached mode, it may take some time before the item is synced to the server.
|
|
16994
|
-
* Until the item is synced, the `itemId` is not recognized and using it returns an error.
|
|
16995
|
-
*
|
|
16996
17041
|
* @remarks
|
|
16997
17042
|
* [Api set: Mailbox 1.8]
|
|
16998
17043
|
*
|
|
@@ -17000,6 +17045,15 @@ declare namespace Office {
|
|
|
17000
17045
|
*
|
|
17001
17046
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose
|
|
17002
17047
|
*
|
|
17048
|
+
* **Important**:
|
|
17049
|
+
*
|
|
17050
|
+
* - The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API.
|
|
17051
|
+
* Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`.
|
|
17052
|
+
*
|
|
17053
|
+
* - If your add-in calls `getItemIdAsync` (for example, to get an item ID to use with EWS or the REST API),
|
|
17054
|
+
* be aware that when Outlook is in cached mode, it may take some time before the item is synced to the server.
|
|
17055
|
+
* Until the item is synced, the item ID isn't recognized and using it returns an error.
|
|
17056
|
+
*
|
|
17003
17057
|
* **Errors**:
|
|
17004
17058
|
*
|
|
17005
17059
|
* - `ItemNotSaved`: The ID can't be retrieved until the item is saved.
|
|
@@ -17007,18 +17061,15 @@ declare namespace Office {
|
|
|
17007
17061
|
* @param options - An object literal that contains one or more of the following properties:-
|
|
17008
17062
|
* `asyncContext`: Developers can provide any object they wish to access in the callback function.
|
|
17009
17063
|
* @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter
|
|
17010
|
-
* of type `Office.AsyncResult`.
|
|
17064
|
+
* of type `Office.AsyncResult`. The EWS item ID of the item is returned in the `asyncResult.value` property.
|
|
17011
17065
|
*/
|
|
17012
17066
|
getItemIdAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult<string>) => void): void;
|
|
17013
17067
|
/**
|
|
17014
|
-
* Asynchronously gets the
|
|
17068
|
+
* Asynchronously gets the {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | Exchange Web Services (EWS) item identifier}
|
|
17069
|
+
* of a saved item.
|
|
17015
17070
|
*
|
|
17016
17071
|
* When invoked, this method returns the item ID via the callback function.
|
|
17017
17072
|
*
|
|
17018
|
-
* **Note**: If your add-in calls `getItemIdAsync` on an item in compose mode (e.g., to get an `itemId` to use with EWS or the REST API),
|
|
17019
|
-
* be aware that when Outlook is in cached mode, it may take some time before the item is synced to the server.
|
|
17020
|
-
* Until the item is synced, the `itemId` is not recognized and using it returns an error.
|
|
17021
|
-
*
|
|
17022
17073
|
* @remarks
|
|
17023
17074
|
* [Api set: Mailbox 1.8]
|
|
17024
17075
|
*
|
|
@@ -17026,12 +17077,21 @@ declare namespace Office {
|
|
|
17026
17077
|
*
|
|
17027
17078
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose
|
|
17028
17079
|
*
|
|
17080
|
+
* **Important**:
|
|
17081
|
+
*
|
|
17082
|
+
* - The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API.
|
|
17083
|
+
* Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`.
|
|
17084
|
+
*
|
|
17085
|
+
* - If your add-in calls `getItemIdAsync` (for example, to get an item ID to use with EWS or the REST API),
|
|
17086
|
+
* be aware that when Outlook is in cached mode, it may take some time before the item is synced to the server.
|
|
17087
|
+
* Until the item is synced, the item ID isn't recognized and using it returns an error.
|
|
17088
|
+
*
|
|
17029
17089
|
* **Errors**:
|
|
17030
17090
|
*
|
|
17031
17091
|
* - `ItemNotSaved`: The ID can't be retrieved until the item is saved.
|
|
17032
17092
|
*
|
|
17033
17093
|
* @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter
|
|
17034
|
-
* of type `Office.AsyncResult`.
|
|
17094
|
+
* of type `Office.AsyncResult`. The EWS item ID of the item is returned in the `asyncResult.value` property.
|
|
17035
17095
|
*/
|
|
17036
17096
|
getItemIdAsync(callback: (asyncResult: Office.AsyncResult<string>) => void): void;
|
|
17037
17097
|
/**
|
|
@@ -17362,7 +17422,12 @@ declare namespace Office {
|
|
|
17362
17422
|
* - When working with HTML-formatted content, it's important to note that the Outlook client may modify the content. This means that
|
|
17363
17423
|
* subsequent calls to methods like `Body.getAsync`, `Body.setAsync`, and even `saveAsync` may not result in the same content.
|
|
17364
17424
|
*
|
|
17365
|
-
* -
|
|
17425
|
+
* - The identifier returned is the same as the
|
|
17426
|
+
* {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | Exchange Web Services (EWS) item identifier}.
|
|
17427
|
+
* The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API.
|
|
17428
|
+
* Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`.
|
|
17429
|
+
*
|
|
17430
|
+
* - If your add-in calls `saveAsync` to get an item ID to use with EWS or the REST API, be aware that
|
|
17366
17431
|
* when Outlook is in cached mode, it may take some time before the item is actually synced to the server.
|
|
17367
17432
|
* Until the item is synced, using the item ID will return an error.
|
|
17368
17433
|
*
|
|
@@ -17379,7 +17444,7 @@ declare namespace Office {
|
|
|
17379
17444
|
* @param options - An object literal that contains one or more of the following properties:-
|
|
17380
17445
|
* `asyncContext`: Developers can provide any object they wish to access in the callback function.
|
|
17381
17446
|
* @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`,
|
|
17382
|
-
* which is an `Office.AsyncResult` object. The message ID is returned in the `asyncResult.value` property.
|
|
17447
|
+
* which is an `Office.AsyncResult` object. The EWS message ID is returned in the `asyncResult.value` property.
|
|
17383
17448
|
*/
|
|
17384
17449
|
saveAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult<string>) => void): void;
|
|
17385
17450
|
/**
|
|
@@ -17400,7 +17465,12 @@ declare namespace Office {
|
|
|
17400
17465
|
* - When working with HTML-formatted content, it's important to note that the Outlook client may modify the content. This means that
|
|
17401
17466
|
* subsequent calls to methods like `Body.getAsync`, `Body.setAsync`, and even `saveAsync` may not result in the same content.
|
|
17402
17467
|
*
|
|
17403
|
-
* -
|
|
17468
|
+
* - The identifier returned is the same as the
|
|
17469
|
+
* {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | Exchange Web Services (EWS) item identifier}.
|
|
17470
|
+
* The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API.
|
|
17471
|
+
* Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`.
|
|
17472
|
+
*
|
|
17473
|
+
* - If your add-in calls `saveAsync` to get an item ID to use with EWS or the REST API, be aware that
|
|
17404
17474
|
* when Outlook is in cached mode, it may take some time before the item is actually synced to the server.
|
|
17405
17475
|
* Until the item is synced, using the item ID will return an error.
|
|
17406
17476
|
*
|
|
@@ -17415,7 +17485,7 @@ declare namespace Office {
|
|
|
17415
17485
|
* - `InvalidAttachmentId`: The attachment identifier does not exist.
|
|
17416
17486
|
*
|
|
17417
17487
|
* @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`,
|
|
17418
|
-
* which is an `Office.AsyncResult` object. The message ID is returned in the `asyncResult.value` property.
|
|
17488
|
+
* which is an `Office.AsyncResult` object. The EWS message ID is returned in the `asyncResult.value` property.
|
|
17419
17489
|
*/
|
|
17420
17490
|
saveAsync(callback: (asyncResult: Office.AsyncResult<string>) => void): void;
|
|
17421
17491
|
/**
|
|
@@ -17692,24 +17762,23 @@ declare namespace Office {
|
|
|
17692
17762
|
*/
|
|
17693
17763
|
itemClass: string;
|
|
17694
17764
|
/**
|
|
17695
|
-
* Gets the {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | Exchange Web Services item identifier}
|
|
17696
|
-
*
|
|
17697
|
-
*
|
|
17698
|
-
* The `itemId` property is not available in compose mode.
|
|
17699
|
-
* If an item identifier is required, the `saveAsync` method can be used to save the item to the store, which will return the item identifier
|
|
17700
|
-
* in the `asyncResult.value` parameter in the callback function.
|
|
17701
|
-
*
|
|
17702
|
-
* **Note**: The identifier returned by the `itemId` property is the same as the
|
|
17703
|
-
* {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | Exchange Web Services item identifier}.
|
|
17704
|
-
* The `itemId` property is not identical to the Outlook Entry ID or the ID used by the Outlook REST API.
|
|
17705
|
-
* Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`.
|
|
17706
|
-
* For more details, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-rest-api#get-the-item-id | Use the Outlook REST APIs from an Outlook add-in}.
|
|
17765
|
+
* Gets the {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | Exchange Web Services (EWS) item identifier}
|
|
17766
|
+
* of the current item.
|
|
17707
17767
|
*
|
|
17708
17768
|
* @remarks
|
|
17709
17769
|
*
|
|
17710
17770
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item**
|
|
17711
17771
|
*
|
|
17712
17772
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read
|
|
17773
|
+
*
|
|
17774
|
+
* **Important**:
|
|
17775
|
+
*
|
|
17776
|
+
* - The `itemId` property isn't available in compose mode.
|
|
17777
|
+
* If an item identifier is required, the `Office.context.mailbox.item.saveAsync` method can be used to save the item to the store, which will return the item identifier
|
|
17778
|
+
* in the `asyncResult.value` parameter in the callback function. If the item is already saved, you can call the `Office.context.mailbox.item.getItemIdAsync` method instead.
|
|
17779
|
+
*
|
|
17780
|
+
* - The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API.
|
|
17781
|
+
* Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`.
|
|
17713
17782
|
*/
|
|
17714
17783
|
itemId: string;
|
|
17715
17784
|
/**
|
office-js/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/office-js",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.435",
|
|
4
4
|
"description": "TypeScript definitions for office-js",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/office-js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -45,6 +45,6 @@
|
|
|
45
45
|
},
|
|
46
46
|
"scripts": {},
|
|
47
47
|
"dependencies": {},
|
|
48
|
-
"typesPublisherContentHash": "
|
|
48
|
+
"typesPublisherContentHash": "49c0807d889b1ac32d673c0a30376434f0a7fca3dca0b1c697883257f289d0bf",
|
|
49
49
|
"typeScriptVersion": "4.8"
|
|
50
50
|
}
|