@types/office-js 1.0.516 → 1.0.517
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 +106 -20
- 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: Mon, 14 Jul 2025 19:33:55 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
|
|
14
14
|
# Credits
|
office-js/index.d.ts
CHANGED
|
@@ -7195,7 +7195,11 @@ declare namespace Office {
|
|
|
7195
7195
|
*
|
|
7196
7196
|
* @remarks
|
|
7197
7197
|
*
|
|
7198
|
-
* **Important**: The `isDarkTheme` property isn't
|
|
7198
|
+
* **Important**: The `isDarkTheme` property isn't supported in Outlook. To determine the current theme in Outlook,
|
|
7199
|
+
* use the `body*Color` and `control*Color` properties instead. To automatically detect theme changes, use the
|
|
7200
|
+
* {@link https://learn.microsoft.com/javascript/api/outlook/office.mailbox#outlook-office-mailbox-addhandlerasync-member(1) | addHandlerAsync}
|
|
7201
|
+
* method to create an event handler for the {@link https://learn.microsoft.com/javascript/api/office/office.eventtype#fields | OfficeThemeChanged}
|
|
7202
|
+
* event.
|
|
7199
7203
|
*/
|
|
7200
7204
|
isDarkTheme: boolean;
|
|
7201
7205
|
/**
|
|
@@ -7203,7 +7207,11 @@ declare namespace Office {
|
|
|
7203
7207
|
*
|
|
7204
7208
|
* @remarks
|
|
7205
7209
|
*
|
|
7206
|
-
* **Important**: The `themeId` property isn't
|
|
7210
|
+
* **Important**: The `themeId` property isn't supported in Outlook. To determine the current theme in Outlook,
|
|
7211
|
+
* use the `body*Color` and `control*Color` properties instead. To automatically detect theme changes, use the
|
|
7212
|
+
* {@link https://learn.microsoft.com/javascript/api/outlook/office.mailbox#outlook-office-mailbox-addhandlerasync-member(1) | addHandlerAsync}
|
|
7213
|
+
* method to create an event handler for the {@link https://learn.microsoft.com/javascript/api/office/office.eventtype#fields | OfficeThemeChanged}
|
|
7214
|
+
* event.
|
|
7207
7215
|
*/
|
|
7208
7216
|
themeId: ThemeId;
|
|
7209
7217
|
}
|
|
@@ -8905,6 +8913,36 @@ declare namespace Office {
|
|
|
8905
8913
|
*/
|
|
8906
8914
|
Item = "item"
|
|
8907
8915
|
}
|
|
8916
|
+
/**
|
|
8917
|
+
* Specifies the portion of a message's body displayed for replies to a conversation thread with more than one message.
|
|
8918
|
+
*
|
|
8919
|
+
* @remarks
|
|
8920
|
+
*
|
|
8921
|
+
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose
|
|
8922
|
+
*
|
|
8923
|
+
* **Important**: This enum is only supported in Outlook on the web and new Outlook on Windows. On these platforms, users can organize their messages as
|
|
8924
|
+
* conversations or individual messages in **Settings** > **Mail** > **Layout** > **Message organization**. This user setting affects the portion of the body of a message that's displayed.
|
|
8925
|
+
*
|
|
8926
|
+
* The `BodyMode` enum supports the following message organization settings.
|
|
8927
|
+
*
|
|
8928
|
+
* - Conversations: **Group messages by conversation** > **All messages from the selected conversation** or **Show email grouped by conversation** > **Newest on top**\/**Newest on bottom**
|
|
8929
|
+
*
|
|
8930
|
+
* - Individual messages: **Do not group messages** > **Only a single message** or **Show email as individual messages**
|
|
8931
|
+
*
|
|
8932
|
+
* For more information, see {@link https://support.microsoft.com/office/57fe0cd8-e90b-4b1b-91e4-a0ba658c0042 | Change how the message list is displayed in Outlook}.
|
|
8933
|
+
*/
|
|
8934
|
+
enum BodyMode {
|
|
8935
|
+
/**
|
|
8936
|
+
* The entire body of a message, including previous messages from the same conversation thread.
|
|
8937
|
+
*/
|
|
8938
|
+
FullBody = 0,
|
|
8939
|
+
/**
|
|
8940
|
+
* The body mode depends on the user's current setting for message organization (that is, messages are organized as conversations or individual messages).
|
|
8941
|
+
* If messages are organized by conversation, it specifies only the current body of the reply. Conversely, if messages are organized as individual
|
|
8942
|
+
* messages, it specifies the entire body of a message, including previous messages from the same conversation thread.
|
|
8943
|
+
*/
|
|
8944
|
+
HostConfig = 1
|
|
8945
|
+
}
|
|
8908
8946
|
/**
|
|
8909
8947
|
* Specifies the category color.
|
|
8910
8948
|
*
|
|
@@ -12931,6 +12969,9 @@ declare namespace Office {
|
|
|
12931
12969
|
* @remarks
|
|
12932
12970
|
* [Api set: Mailbox 1.1]
|
|
12933
12971
|
*
|
|
12972
|
+
* To learn how to get or set the body of a mail item, see
|
|
12973
|
+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/insert-data-in-the-body | Get or set the body of a message or appointment in Outlook}.
|
|
12974
|
+
*
|
|
12934
12975
|
* **Known issue with HTML table border colors**
|
|
12935
12976
|
*
|
|
12936
12977
|
* Outlook on Windows: If you're setting various cell borders to different colors in an HTML table in Compose mode, a cell's borders may not reflect
|
|
@@ -13033,9 +13074,7 @@ declare namespace Office {
|
|
|
13033
13074
|
*/
|
|
13034
13075
|
appendOnSendAsync(data: string, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
|
|
13035
13076
|
/**
|
|
13036
|
-
* Returns the current body in
|
|
13037
|
-
*
|
|
13038
|
-
* This method returns the entire current body in the format specified by `coercionType`.
|
|
13077
|
+
* Returns the entire current body in the format specified by `coercionType`.
|
|
13039
13078
|
*
|
|
13040
13079
|
* @remarks
|
|
13041
13080
|
* [Api set: Mailbox 1.3]
|
|
@@ -13054,17 +13093,28 @@ declare namespace Office {
|
|
|
13054
13093
|
* if the body contains formatted elements, such as tables, lists, and links, specify `Office.CoercionType.Html` in the `getAsync` call.
|
|
13055
13094
|
* Otherwise, you may receive an unexpected value, such as an empty string.
|
|
13056
13095
|
*
|
|
13096
|
+
* - In Outlook on the web and new Outlook on Windows, users can organize their messages as conversations or individual messages in **Settings** > **Mail** > **Layout** > **Message organization**
|
|
13097
|
+
* (see {@link https://support.microsoft.com/office/57fe0cd8-e90b-4b1b-91e4-a0ba658c0042 | Change how the message list is displayed in Outlook}).
|
|
13098
|
+
* This setting affects how much of a message's body is displayed to the user (that is, the entire conversation thread of a message or just the current message).
|
|
13099
|
+
* In Message Compose mode, particularly for replies to a conversation thread with more than one message, if you want the returned body to reflect the user's setting,
|
|
13100
|
+
* specify the `bodyMode: Office.MailboxEnums.BodyMode.HostConfig` parameter in your `getAsync` call. If messages are grouped by conversation,
|
|
13101
|
+
* only the body of the current reply is returned. Conversely, if messages are displayed individually, the entire conversation thread is returned.
|
|
13102
|
+
*
|
|
13103
|
+
* - The `bodyMode` option isn't supported on a message that's loaded using the `loadItemByIdAsync` method. For more information, see
|
|
13104
|
+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select | Activate your Outlook add-in on multiple messages}.
|
|
13105
|
+
*
|
|
13057
13106
|
* @param coercionType - The format for the returned body.
|
|
13058
|
-
* @param options - An object literal that contains one or more of the following properties
|
|
13059
|
-
* `asyncContext`:
|
|
13107
|
+
* @param options - An object literal that contains one or more of the following properties.
|
|
13108
|
+
* `asyncContext`: Any data you want to access in the callback function.
|
|
13109
|
+
* `bodyMode`: In Outlook on the web and new Outlook on Windows, specifies whether only the body of the current message or the entire body of a message conversation is returned.
|
|
13110
|
+
* If a value isn't specified, `bodyMode` defaults to `Office.MailboxEnums.BodyMode.FullBody`, which returns the entire body of a message conversation. The `bodyMode` property only
|
|
13111
|
+
* applies to replies on the Message Compose surface. It's ignored in Outlook on Windows (classic), on Mac, and on mobile devices.
|
|
13060
13112
|
* @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter
|
|
13061
|
-
*
|
|
13113
|
+
* of type Office.AsyncResult. The body is provided in the requested format in the `asyncResult.value` property.
|
|
13062
13114
|
*/
|
|
13063
|
-
getAsync(coercionType: Office.CoercionType | string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult<string>) => void): void;
|
|
13115
|
+
getAsync(coercionType: Office.CoercionType | string, options: Office.AsyncContextOptions & { bodyMode?: MailboxEnums.BodyMode }, callback?: (asyncResult: Office.AsyncResult<string>) => void): void;
|
|
13064
13116
|
/**
|
|
13065
|
-
* Returns the current body in
|
|
13066
|
-
*
|
|
13067
|
-
* This method returns the entire current body in the format specified by `coercionType`.
|
|
13117
|
+
* Returns the entire current body in the format specified by `coercionType`.
|
|
13068
13118
|
*
|
|
13069
13119
|
* @remarks
|
|
13070
13120
|
* [Api set: Mailbox 1.3]
|
|
@@ -13083,9 +13133,16 @@ declare namespace Office {
|
|
|
13083
13133
|
* if the body contains formatted elements, such as tables, lists, and links, specify `Office.CoercionType.Html` in the `getAsync` call.
|
|
13084
13134
|
* Otherwise, you may receive an unexpected value, such as an empty string.
|
|
13085
13135
|
*
|
|
13136
|
+
* - In Outlook on the web and new Outlook on Windows, users can organize their messages as conversations or individual messages in **Settings** > **Mail** > **Layout** > **Message organization**
|
|
13137
|
+
* (see {@link https://support.microsoft.com/office/57fe0cd8-e90b-4b1b-91e4-a0ba658c0042 | Change how the message list is displayed in Outlook}).
|
|
13138
|
+
* This setting affects how much of a message's body is displayed to the user (that is, the entire conversation thread of a message or just the current message).
|
|
13139
|
+
* In Message Compose mode, particularly for replies to a conversation thread with more than one message, if you want the returned body to reflect the user's setting,
|
|
13140
|
+
* specify the `bodyMode: Office.MailboxEnums.BodyMode.HostConfig` parameter in your `getAsync` call. If messages are grouped by conversation,
|
|
13141
|
+
* only the body of the current reply is returned. Conversely, if messages are displayed individually, the entire conversation thread is returned.
|
|
13142
|
+
*
|
|
13086
13143
|
* @param coercionType - The format for the returned body.
|
|
13087
13144
|
* @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter
|
|
13088
|
-
*
|
|
13145
|
+
* of type Office.AsyncResult. The body is provided in the requested format in the `asyncResult.value` property.
|
|
13089
13146
|
*/
|
|
13090
13147
|
getAsync(coercionType: Office.CoercionType | string, callback?: (asyncResult: Office.AsyncResult<string>) => void): void;
|
|
13091
13148
|
/**
|
|
@@ -13358,20 +13415,36 @@ declare namespace Office {
|
|
|
13358
13415
|
* - The `setAsync` method isn't supported on a message that's currently loaded using the `loadItemByIdAsync` method.
|
|
13359
13416
|
* For more information, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select | Activate your Outlook add-in on multiple messages}.
|
|
13360
13417
|
*
|
|
13418
|
+
* - In Outlook on the web and new Outlook on Windows, users can organize their messages as conversations or individual messages in **Settings** > **Mail** > **Layout** > **Message organization**
|
|
13419
|
+
* (see {@link https://support.microsoft.com/office/57fe0cd8-e90b-4b1b-91e4-a0ba658c0042 | Change how the message list is displayed in Outlook}).
|
|
13420
|
+
* This setting affects how much of a message's body is displayed to the user (that is, the entire conversation thread of a message or just the current message).
|
|
13421
|
+
* In Message Compose mode, particularly for replies to a conversation thread with more than one message, if you want to honor the user's settings when
|
|
13422
|
+
* setting the body of a message, specify the `bodyMode: Office.MailboxEnums.BodyMode.HostConfig` parameter in your `setAsync` call. If messages are grouped by conversation,
|
|
13423
|
+
* only the body of the current reply is set. Conversely, if messages are displayed individually, the entire body, including previous messages
|
|
13424
|
+
* in the conversation thread, is replaced.
|
|
13425
|
+
*
|
|
13426
|
+
* - In Outlook on the web and new Outlook on Windows, if the `bodyMode` property isn't specified or is set to `Office.MailboxEnums.BodyMode.FullBody`, the entire body of a message,
|
|
13427
|
+
* including previous messages from the conversation thread, is replaced. This applies even if a user's messages are organized by conversation. In this scenario, the user's
|
|
13428
|
+
* setting is temporarily changed to **Individual messages: Do not group messages** > **Only a single message** or **Show email as individual messages** during the `setAsync` call.
|
|
13429
|
+
* A notification is shown to the user to alert them to this change. Once the call completes, the user's setting is reinstated.
|
|
13430
|
+
*
|
|
13361
13431
|
* **Errors**:
|
|
13362
13432
|
*
|
|
13363
13433
|
* - `DataExceedsMaximumSize`: The data parameter is longer than 1,000,000 characters.
|
|
13364
13434
|
*
|
|
13365
13435
|
* - `InvalidFormatError`: The `options.coercionType` parameter is set to `Office.CoercionType.Html` and the message body is in plain text.
|
|
13366
13436
|
*
|
|
13367
|
-
* @param data - The string that
|
|
13368
|
-
* @param options - An object literal that contains one or more of the following properties
|
|
13369
|
-
* `asyncContext`:
|
|
13370
|
-
* `coercionType`: The desired format for the body. The string in the `data` parameter
|
|
13437
|
+
* @param data - The string that replaces the existing body. The string is limited to 1,000,000 characters.
|
|
13438
|
+
* @param options - An object literal that contains one or more of the following properties.
|
|
13439
|
+
* `asyncContext`: Any data you want to access in the callback function.
|
|
13440
|
+
* `coercionType`: The desired format for the body. The string in the `data` parameter is converted to this format.
|
|
13441
|
+
* `bodyMode`: In Outlook on the web and new Outlook on Windows, specifies whether only the body of the current message or the entire body of a message conversation is set.
|
|
13442
|
+
* If a value isn't specified, `bodyMode` defaults to `Office.MailboxEnums.BodyMode.FullBody`, which replaces the entire body, including previous messages in the conversation thread.
|
|
13443
|
+
* The `bodyMode` property only applies to replies on the Message Compose surface. It's ignored in Outlook on Windows (classic), on Mac, and on mobile devices.
|
|
13371
13444
|
* @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter
|
|
13372
|
-
*
|
|
13445
|
+
* of type Office.AsyncResult. Any errors encountered will be provided in the `asyncResult.error` property.
|
|
13373
13446
|
*/
|
|
13374
|
-
setAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
|
|
13447
|
+
setAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions & { bodyMode?: MailboxEnums.BodyMode }, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
|
|
13375
13448
|
/**
|
|
13376
13449
|
* Replaces the entire body with the specified text.
|
|
13377
13450
|
*
|
|
@@ -13412,6 +13485,19 @@ declare namespace Office {
|
|
|
13412
13485
|
* - The `setAsync` method isn't supported on a message that's currently loaded using the `loadItemByIdAsync` method.
|
|
13413
13486
|
* For more information, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select | Activate your Outlook add-in on multiple messages}.
|
|
13414
13487
|
*
|
|
13488
|
+
* - In Outlook on the web and new Outlook on Windows, users can organize their messages as conversations or individual messages in **Settings** > **Mail** > **Layout** > **Message organization**
|
|
13489
|
+
* (see {@link https://support.microsoft.com/office/57fe0cd8-e90b-4b1b-91e4-a0ba658c0042 | Change how the message list is displayed in Outlook}).
|
|
13490
|
+
* This setting affects how much of a message's body is displayed to the user (that is, the entire conversation thread of a message or just the current message).
|
|
13491
|
+
* In Message Compose mode, particularly for replies in a conversation thread with more than one message, if you want to honor the user's settings when
|
|
13492
|
+
* setting the body of a message, specify the `bodyMode: Office.MailboxEnums.BodyMode.HostConfig` parameter in your `setAsync` call. If messages are grouped by conversation,
|
|
13493
|
+
* only the body of the current reply is set. Conversely, if messages are displayed individually, the entire body, including previous messages
|
|
13494
|
+
* in the conversation thread, is replaced.
|
|
13495
|
+
*
|
|
13496
|
+
* - In Outlook on the web and new Outlook on Windows, if the `bodyMode` property isn't specified or is set to `Office.MailboxEnums.BodyMode.FullBody`, the entire body of a message,
|
|
13497
|
+
* including previous messages from the conversation thread, is replaced. This applies even if a user's messages are organized by conversation. In this scenario, the user's
|
|
13498
|
+
* setting is temporarily changed to **Individual messages: Do not group messages** > **Only a single message** or **Show email as individual messages** during the `setAsync` call.
|
|
13499
|
+
* A notification is shown to the user to alert them to this change. Once the call completes, the user's setting is reinstated.
|
|
13500
|
+
*
|
|
13415
13501
|
* **Errors**:
|
|
13416
13502
|
*
|
|
13417
13503
|
* - `DataExceedsMaximumSize`: The data parameter is longer than 1,000,000 characters.
|
|
@@ -13420,7 +13506,7 @@ declare namespace Office {
|
|
|
13420
13506
|
*
|
|
13421
13507
|
* @param data - The string that will replace the existing body. The string is limited to 1,000,000 characters.
|
|
13422
13508
|
* @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter
|
|
13423
|
-
*
|
|
13509
|
+
* of type Office.AsyncResult. Any errors encountered will be provided in the `asyncResult.error` property.
|
|
13424
13510
|
*/
|
|
13425
13511
|
setAsync(data: string, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
|
|
13426
13512
|
/**
|
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.517",
|
|
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",
|
|
@@ -46,6 +46,6 @@
|
|
|
46
46
|
"scripts": {},
|
|
47
47
|
"dependencies": {},
|
|
48
48
|
"peerDependencies": {},
|
|
49
|
-
"typesPublisherContentHash": "
|
|
49
|
+
"typesPublisherContentHash": "dee2461112d73f18e1d6982637623bf7743127e38b6d9ec57669c646f2e6abe7",
|
|
50
50
|
"typeScriptVersion": "5.1"
|
|
51
51
|
}
|