@types/office-js-preview 1.0.648 → 1.0.649

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.
@@ -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: Tue, 07 Oct 2025 21:32:25 GMT
11
+ * Last updated: Thu, 09 Oct 2025 19:02:28 GMT
12
12
  * Dependencies: none
13
13
 
14
14
  # Credits
@@ -12985,7 +12985,9 @@ declare namespace Office {
12985
12985
  *
12986
12986
  * **Important**:
12987
12987
  *
12988
- * - The `contentId` property is only supported in Outlook on the web and the new Outlook on Windows.
12988
+ * - The `contentId` property is only supported in Outlook on the web and Outlook on Windows (new and classic (preview)).
12989
+ * To preview the `contentId` property in classic Outlook on Windows, your Outlook client must run Version 2510 (Build 19312.20000)
12990
+ * or later and must be on the Beta Channel. For more information, see {@link https://aka.ms/Msft365InsiderProgram | Microsoft 365 Insider Program}.
12989
12991
  *
12990
12992
  * - Starting November 15, 2025, changes to how inline images are represented in the HTML body of Outlook emails in
12991
12993
  * Outlook on the web and the new Outlook on Windows will begin rolling out to production users.
@@ -14249,6 +14251,164 @@ declare namespace Office {
14249
14251
  */
14250
14252
  set(name: string, value: string): void;
14251
14253
  }
14254
+ /**
14255
+ * Represents an attachment in a decrypted message.
14256
+ *
14257
+ * @remarks
14258
+ *
14259
+ * [Api set: Mailbox preview]
14260
+ *
14261
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
14262
+ *
14263
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read
14264
+ *
14265
+ * To learn how to develop an encryption add-in in Outlook, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/encryption-decryption | Create an encryption Outlook add-in}.
14266
+ *
14267
+ * @beta
14268
+ */
14269
+ interface DecryptedMessageAttachment {
14270
+ /**
14271
+ * Specifies the type of attachment.
14272
+ *
14273
+ * @remarks
14274
+ *
14275
+ * [Api set: Mailbox preview]
14276
+ *
14277
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
14278
+ *
14279
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read
14280
+ *
14281
+ * @beta
14282
+ */
14283
+ attachmentType: MailboxEnums.AttachmentType;
14284
+ /**
14285
+ * Specifies the Base64-encoded content of the attachment.
14286
+ *
14287
+ * @remarks
14288
+ *
14289
+ * [Api set: Mailbox preview]
14290
+ *
14291
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
14292
+ *
14293
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read
14294
+ *
14295
+ * **Important**: The `content` property isn't supported by attachments of type `MailboxEnums.AttachmentType.Cloud`.
14296
+ *
14297
+ * @beta
14298
+ */
14299
+ content: string;
14300
+ /**
14301
+ * Specifies the content identifier of an inline attachment.
14302
+ *
14303
+ * The `contentId` property must be specified if `isInline` is set to `true`.
14304
+ *
14305
+ * @remarks
14306
+ *
14307
+ * [Api set: Mailbox preview]
14308
+ *
14309
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
14310
+ *
14311
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read
14312
+ *
14313
+ * **Important**: When images are added to a message as inline attachments, they're automatically assigned a content ID. In the body of a message, the content ID of an inline attachment is
14314
+ * specified in the `src` attribute of the `<img>` element (for example, `<img width=96 height=96 id="Picture_1" src="cid:image001.png@01DC1E6F.FC7C7410">`).
14315
+ * To easily identify and provide these inline attachments during decryption, we recommend saving the content IDs of inline attachments to the message header during encryption.
14316
+ * Call `Office.context.mailbox.item.getAttachmentsAsync` to get the content ID of an inline attachment. Then, call `Office.context.mailbox.item.internetHeaders.setAsync` to save the ID to the header of the message.
14317
+ *
14318
+ * @beta
14319
+ */
14320
+ contentId?: string;
14321
+ /**
14322
+ * If true, specifies that the decrypted attachment appears as an image in the body of the message instead of in the attachment list.
14323
+ * If the `isInline` property isn't specified, its value is set to false.
14324
+ *
14325
+ * @remarks
14326
+ *
14327
+ * [Api set: Mailbox preview]
14328
+ *
14329
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
14330
+ *
14331
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read
14332
+ *
14333
+ * @beta
14334
+ */
14335
+ isInline?: boolean;
14336
+ /**
14337
+ * Specifies the name of the attachment.
14338
+ *
14339
+ * @remarks
14340
+ *
14341
+ * [Api set: Mailbox preview]
14342
+ *
14343
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
14344
+ *
14345
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read
14346
+ *
14347
+ * @beta
14348
+ */
14349
+ name: string;
14350
+ /**
14351
+ * Specifies the URL reference path of the attachment if its type is `MailboxEnums.AttachmentType.Cloud`.
14352
+ * The `path` property must be specified for attachments of type `MailboxEnums.AttachmentType.Cloud`.
14353
+ *
14354
+ * @remarks
14355
+ *
14356
+ * [Api set: Mailbox preview]
14357
+ *
14358
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
14359
+ *
14360
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read
14361
+ *
14362
+ * @beta
14363
+ */
14364
+ path?: string;
14365
+ }
14366
+ /**
14367
+ * Represents the body of a decrypted message.
14368
+ *
14369
+ * @remarks
14370
+ *
14371
+ * [Api set: Mailbox preview]
14372
+ *
14373
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
14374
+ *
14375
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read
14376
+ *
14377
+ * To learn how to develop an encryption add-in in Outlook, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/encryption-decryption | Create an encryption Outlook add-in}.
14378
+ *
14379
+ * @beta
14380
+ */
14381
+ interface DecryptedMessageBody {
14382
+ /**
14383
+ * Specifies the format of the body of a message.
14384
+ * The body of a message can be formatted as `Office.CoercionType.Html` or `Office.CoercionType.Text`.
14385
+ *
14386
+ * @remarks
14387
+ *
14388
+ * [Api set: Mailbox preview]
14389
+ *
14390
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
14391
+ *
14392
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read
14393
+ *
14394
+ * @beta
14395
+ */
14396
+ coercionType: Office.CoercionType;
14397
+ /**
14398
+ * Specifies the content displayed in the body of the message.
14399
+ *
14400
+ * @remarks
14401
+ *
14402
+ * [Api set: Mailbox preview]
14403
+ *
14404
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
14405
+ *
14406
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read
14407
+ *
14408
+ * @beta
14409
+ */
14410
+ content: string;
14411
+ }
14252
14412
  /**
14253
14413
  * The `DelayDeliveryTime` object enables you to manage the delayed delivery date and time of a message.
14254
14414
  *
@@ -18760,8 +18920,9 @@ declare namespace Office {
18760
18920
  /**
18761
18921
  * The `MailboxEvent` object is passed as an argument to the event handler of an add-in that implements
18762
18922
  * {@link https://learn.microsoft.com/office/dev/add-ins/develop/event-based-activation | event-based activation}, including
18763
- * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/onmessagesend-onappointmentsend-events | Smart Alerts},
18764
- * or the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting | integrated spam-reporting feature}.
18923
+ * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/onmessagesend-onappointmentsend-events | Smart Alerts}, the
18924
+ * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting | integrated spam-reporting feature}, or
18925
+ * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/encryption-decryption | decryption} (preview).
18765
18926
  * It allows the add-in to signify to the Outlook client that it has completed processing an event.
18766
18927
  *
18767
18928
  * @remarks
@@ -18783,7 +18944,7 @@ declare namespace Office {
18783
18944
  */
18784
18945
  interface MailboxEvent {
18785
18946
  /**
18786
- * Indicates that the event-based or spam-reporting add-in has completed processing an event.
18947
+ * Indicates that the event-based, spam-reporting, or decryption (preview) add-in has completed processing an event.
18787
18948
  *
18788
18949
  * @remarks
18789
18950
  * [Api set: Mailbox 1.10]
@@ -18798,9 +18959,9 @@ declare namespace Office {
18798
18959
  *
18799
18960
  * - Support to assign a `SmartAlertsEventCompletedOptions` object to the `options` parameter was introduced in Mailbox 1.12.
18800
18961
  *
18801
- * @param options - Optional. An object that specifies the behavior of an event-based or spam-reporting add-in when it completes processing an event.
18962
+ * @param options - Optional. An object that specifies the behavior of an event-based, spam-reporting, or decryption add-in when it completes processing an event.
18802
18963
  */
18803
- completed(options?: SmartAlertsEventCompletedOptions | SpamReportingEventCompletedOptions): void;
18964
+ completed(options?: SmartAlertsEventCompletedOptions | SpamReportingEventCompletedOptions | MessageDecryptEventCompletedOptions): void;
18804
18965
  }
18805
18966
  /**
18806
18967
  * Represents the categories master list on the mailbox.
@@ -20681,6 +20842,91 @@ declare namespace Office {
20681
20842
  */
20682
20843
  setSelectedDataAsync(data: string, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
20683
20844
  }
20845
+ /**
20846
+ * Specifies the behavior of an {@link https://learn.microsoft.com/office/dev/add-ins/outlook/encryption-decryption | encryption add-in} after it completes processing an
20847
+ * {@link https://learn.microsoft.com/javascript/api/office/office.eventtype#fields | OnMessageRead} event.
20848
+ *
20849
+ * @remarks
20850
+ *
20851
+ * [Api set: Mailbox preview]
20852
+ *
20853
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
20854
+ *
20855
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read
20856
+ *
20857
+ * @beta
20858
+ */
20859
+ interface MessageDecryptEventCompletedOptions {
20860
+ /**
20861
+ * 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,
20862
+ * this value indicates if the `OnMessageRead` event should continue to run or be canceled. If the `allowEvent` property is set to `true`, the decrypted contents of the message is displayed.
20863
+ *
20864
+ * @remarks
20865
+ *
20866
+ * [Api set: Mailbox preview]
20867
+ *
20868
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
20869
+ *
20870
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read
20871
+ *
20872
+ * @beta
20873
+ */
20874
+ allowEvent: boolean;
20875
+ /**
20876
+ * 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
20877
+ * and set its `allowEvent` property to `true`, this property sets the decrypted attachments of the message.
20878
+ *
20879
+ * @remarks
20880
+ *
20881
+ * [Api set: Mailbox preview]
20882
+ *
20883
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
20884
+ *
20885
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read
20886
+ *
20887
+ * @beta
20888
+ */
20889
+ attachments?: DecryptedMessageAttachment[];
20890
+ /**
20891
+ * 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
20892
+ * and set its `allowEvent` property to `true`, this property specifies any JSON data passed to the add-in for processing.
20893
+ *
20894
+ * @remarks
20895
+ *
20896
+ * [Api set: Mailbox preview]
20897
+ *
20898
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
20899
+ *
20900
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read
20901
+ *
20902
+ * **Important**:
20903
+ *
20904
+ * - To retrieve the value of the `contextData` property, you must call `Office.context.mailbox.item.getInitializationContextAsync`.
20905
+ * If you create a JSON string using `JSON.stringify()` and assign it to the `contextData` property, you must parse the string using `JSON.parse()` once you retrieve it.
20906
+ *
20907
+ * - You can use the `contextData` property to store custom internet headers to decrypt messages in reply and forward scenarios.
20908
+ *
20909
+ * @beta
20910
+ */
20911
+ contextData?: any;
20912
+ /**
20913
+ * 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
20914
+ * and set its `allowEvent` property to `true`, this property sets the decrypted contents of the body of the message.
20915
+ *
20916
+ * @remarks
20917
+ *
20918
+ * [Api set: Mailbox preview]
20919
+ *
20920
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
20921
+ *
20922
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read
20923
+ *
20924
+ * **Important**: If the `emailBody` property isn't specified, an empty body is returned.
20925
+ *
20926
+ * @beta
20927
+ */
20928
+ emailBody?: DecryptedMessageBody;
20929
+ }
20684
20930
  /**
20685
20931
  * The message read mode of {@link Office.Item | Office.context.mailbox.item}.
20686
20932
  *
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/office-js-preview",
3
- "version": "1.0.648",
3
+ "version": "1.0.649",
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": "4897ee84b327c33cfd81a116cbacdf04d1010cadd3f540ae237af15f59f6cff4",
49
+ "typesPublisherContentHash": "46d32edb8dd26181a43252e9e3f3b45901e4b13aaab6bcf54c326e27c95629f5",
50
50
  "typeScriptVersion": "5.2",
51
51
  "nonNpm": true
52
52
  }