@@ -7666,7 +7666,13 @@ declare namespace Office {
7666
7666
*/
7667
7667
Item = "item",
7668
7668
/**
7669
- * The attachment is stored in a cloud location, such as OneDrive. The `id` property of the attachment contains a URL to the file.
7669
+ * The attachment is stored in a cloud location, such as OneDrive.
7670
+ *
7671
+ * **Important**: In Read mode, the `id` property of the attachment's {@link Office.AttachmentDetailsRead | details} object
7672
+ * contains a URL to the file.
7673
+ * From requirement set 1.8, the `url` property included in the attachment's
7674
+ * {@link https://docs.microsoft.com/javascript/api/outlook/office.attachmentdetailscompose?view=outlook-js-1.8 | details} object
7675
+ * contains a URL to the file in Compose mode.
7670
7676
*/
7671
7677
Cloud = "cloud"
7672
7678
}
@@ -9374,7 +9380,7 @@ declare namespace Office {
9374
9380
* type `Office.AsyncResult`. If the call fails, the `asyncResult.error` property will contain an error code with the reason for
9375
9381
* the failure.
9376
9382
*/
9377
- getAttachmentsAsync(options?: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult<AttachmentDetails []>) => void): void;
9383
+ getAttachmentsAsync(options?: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult<AttachmentDetailsCompose []>) => void): void;
9378
9384
/**
9379
9385
* Gets the item's attachments as an array.
9380
9386
*
@@ -9390,7 +9396,7 @@ declare namespace Office {
9390
9396
* type `Office.AsyncResult`. If the call fails, the `asyncResult.error` property will contain an error code with the reason for
9391
9397
* the failure.
9392
9398
*/
9393
- getAttachmentsAsync(callback?: (asyncResult: Office.AsyncResult<AttachmentDetails []>) => void): void;
9399
+ getAttachmentsAsync(callback?: (asyncResult: Office.AsyncResult<AttachmentDetailsCompose []>) => void): void;
9394
9400
/**
9395
9401
* Asynchronously gets the ID of a saved item.
9396
9402
*
@@ -9986,7 +9992,7 @@ declare namespace Office {
9986
9992
* {@link https://support.office.com/article/Blocked-attachments-in-Outlook-434752E1-02D3-4E90-9124-8B81E49A8519 | Blocked attachments in Outlook}.
9987
9993
*
9988
9994
*/
9989
- attachments: AttachmentDetails [];
9995
+ attachments: AttachmentDetailsRead [];
9990
9996
/**
9991
9997
* Gets an object that provides methods for manipulating the body of an item.
9992
9998
*
@@ -10779,30 +10785,73 @@ declare namespace Office {
10779
10785
*/
10780
10786
format: MailboxEnums.AttachmentContentFormat | string;
10781
10787
}
10788
+ /**
10789
+ * Represents an attachment on an item. Compose mode only.
10790
+ *
10791
+ * An array of `AttachmentDetailsCompose` objects is returned as the attachments property of an appointment or message item.
10792
+ *
10793
+ * [Api set: Mailbox 1.8]
10794
+ *
10795
+ * @remarks
10796
+ *
10797
+ * **{@link https://docs.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: `ReadItem`
10798
+ *
10799
+ * **{@link https://docs.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
10800
+ */
10801
+ interface AttachmentDetailsCompose {
10802
+ /**
10803
+ * Gets a value that indicates the type of an attachment.
10804
+ */
10805
+ attachmentType: MailboxEnums.AttachmentType | string;
10806
+ /**
10807
+ * Gets the index of the attachment.
10808
+ */
10809
+ id: string;
10810
+ /**
10811
+ * Gets a value that indicates whether the attachment should be displayed in the body of the item.
10812
+ */
10813
+ isInline: boolean;
10814
+ /**
10815
+ * Gets the name of the attachment.
10816
+ *
10817
+ * **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item",
10818
+ * `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or Windows.
10819
+ */
10820
+ name: string;
10821
+ /**
10822
+ * Gets the size of the attachment in bytes.
10823
+ */
10824
+ size: number;
10825
+ /**
10826
+ * Gets the url of the attachment if its type is `MailboxEnums.AttachmentType.Cloud`.
10827
+ */
10828
+ url: string;
10829
+ }
10782
10830
/**
10783
10831
* Represents an attachment on an item from the server. Read mode only.
10784
10832
*
10785
- * An array of `AttachmentDetails` objects is returned as the attachments property of an appointment or message item.
10833
+ * An array of `AttachmentDetailsRead` objects is returned as the attachments property of an appointment or message item.
10834
+ *
10835
+ * [Api set: Mailbox 1.1]
10786
10836
*
10787
10837
* @remarks
10788
- *
10838
+ *
10789
10839
* **{@link https://docs.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: `ReadItem`
10790
- *
10840
+ *
10791
10841
* **{@link https://docs.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Read
10792
10842
*/
10793
- interface AttachmentDetails {
10843
+ interface AttachmentDetailsRead {
10794
10844
/**
10795
10845
* Gets a value that indicates the type of an attachment.
10796
10846
*/
10797
10847
attachmentType: MailboxEnums.AttachmentType | string;
10798
10848
/**
10799
10849
* Gets the MIME content type of the attachment.
10800
- *
10801
- * This property is only available in Read mode.
10802
10850
*/
10803
10851
contentType: string;
10804
10852
/**
10805
10853
* Gets the Exchange attachment ID of the attachment.
10854
+ * However, if the attachment type is `MailboxEnums.AttachmentType.Cloud`, then a URL for the file is returned.
10806
10855
*/
10807
10856
id: string;
10808
10857
/**
@@ -10811,7 +10860,7 @@ declare namespace Office {
10811
10860
isInline: boolean;
10812
10861
/**
10813
10862
* Gets the name of the attachment.
10814
- *
10863
+ *
10815
10864
* **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item",
10816
10865
* `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or Windows.
10817
10866
*/
@@ -10820,12 +10869,6 @@ declare namespace Office {
10820
10869
* Gets the size of the attachment in bytes.
10821
10870
*/
10822
10871
size: number;
10823
- /**
10824
- * Gets the url of the attachment if its type is `MailboxEnums.AttachmentType.Cloud`.
10825
- *
10826
- * [Api set: Mailbox 1.8]
10827
- */
10828
- url: string;
10829
10872
}
10830
10873
/**
10831
10874
* Provides information about the attachments that raised the `Office.EventType.AttachmentsChanged` event.
@@ -10835,7 +10878,7 @@ declare namespace Office {
10835
10878
export interface AttachmentsChangedEventArgs {
10836
10879
/**
10837
10880
* Represents the set of attachments that were added or removed.
10838
- * For each such attachment, gets a subset of {@link Office.AttachmentDetails | AttachmentDetails} properties: `id`, `name`, `size`, and `attachmentType`.
10881
+ * For each such attachment, gets `id`, `name`, `size`, and `attachmentType` properties .
10839
10882
*
10840
10883
* [Api set: Mailbox 1.8]
10841
10884
*/
@@ -13515,7 +13558,7 @@ declare namespace Office {
13515
13558
* type `Office.AsyncResult`. If the call fails, the `asyncResult.error` property will contain an error code with the reason for
13516
13559
* the failure.
13517
13560
*/
13518
- getAttachmentsAsync(options?: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult<AttachmentDetails []>) => void): void;
13561
+ getAttachmentsAsync(options?: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult<AttachmentDetailsCompose []>) => void): void;
13519
13562
/**
13520
13563
* Gets the item's attachments as an array.
13521
13564
*
@@ -13531,7 +13574,7 @@ declare namespace Office {
13531
13574
* type `Office.AsyncResult`. If the call fails, the `asyncResult.error` property will contain an error code with the reason for
13532
13575
* the failure.
13533
13576
*/
13534
- getAttachmentsAsync(callback?: (asyncResult: Office.AsyncResult<AttachmentDetails []>) => void): void;
13577
+ getAttachmentsAsync(callback?: (asyncResult: Office.AsyncResult<AttachmentDetailsCompose []>) => void): void;
13535
13578
/**
13536
13579
* Asynchronously gets the ID of a saved item.
13537
13580
*
@@ -13942,7 +13985,7 @@ declare namespace Office {
13942
13985
* {@link https://support.office.com/article/Blocked-attachments-in-Outlook-434752E1-02D3-4E90-9124-8B81E49A8519 | Blocked attachments in Outlook}.
13943
13986
*
13944
13987
*/
13945
- attachments: AttachmentDetails [];
13988
+ attachments: AttachmentDetailsRead [];
13946
13989
/**
13947
13990
* Gets an object that provides methods for manipulating the body of an item.
13948
13991
*
0 commit comments