From 54be3d96bfa191bd404f3b0aa5b95fed3ebc4e64 Mon Sep 17 00:00:00 2001 From: Elizabeth Samuel Date: Mon, 22 Oct 2018 19:01:52 -0700 Subject: [PATCH 1/3] office-js: Outlook October updates --- types/office-js/index.d.ts | 375 +++++++++++++++++++++++++++++++++---- 1 file changed, 340 insertions(+), 35 deletions(-) diff --git a/types/office-js/index.d.ts b/types/office-js/index.d.ts index 0f2d005973..0b6186eb8c 100644 --- a/types/office-js/index.d.ts +++ b/types/office-js/index.d.ts @@ -1822,6 +1822,12 @@ declare namespace Office { * [Api set: Mailbox 1.7] */ AppointmentTimeChanged, + /** + * Triggers when an attachment is added to or removed from an item. + * + * [Api set: Mailbox Preview] + */ + AttachmentsChanged, /** * Occurs when data within the binding is changed. * To add an event handler for the BindingDataChanged event of a binding, use the addHandlerAsync method of the Binding object. @@ -7340,6 +7346,62 @@ declare namespace Office { declare namespace Office { namespace MailboxEnums { + /** + * Specifies which string formatting to apply to an attachment's content. + * + * [Api set: Mailbox Preview] + * + * @remarks + *
+ * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode} + * Compose or read
+ * + * @beta + */ + enum AttachmentContentFormat { + /** + * The content of the attachment is returned as a base64-encoded string. + */ + Base64 = "base64", + + /** + * The content of the attachment is returned as a string representing a url. + */ + Url = "url", + + /** + * The content of the attachment is returned as a string representing an .eml formatted file. + */ + Eml = "eml", + + /** + * The content of the attachment is returned as a string representing an .ical formatted file. + */ + ICal + } + /** + * Specifies whether an attachment was added to or removed from an item. + * + * [Api set: Mailbox Preview] + * + * @remarks + *
+ * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode} + * Compose or read
+ * + * @beta + */ + enum AttachmentStatus { + /** + * An attachment was added to the item. + */ + Added = "added", + + /** + * An attachment was removed from the item. + */ + Removed = "removed" + } /** * Specifies an attachment's type. * @@ -8494,6 +8556,30 @@ declare namespace Office { */ subject: string; } + /** + * Represents the content of an attachment on a message or appointment item. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + interface AttachmentContent { + /** + * The content of an attachment in a string format. + */ + content: string; + /** + * The string format to use for an attachment's content. + * For file attachments, the formatting is a base64-encoded string. + * For item attachments that represent messages, the formatting is a string representing an .eml formatted file. + * For item attachments that represent calendar items, the formatting is an .ical file. + * For cloud attachments, the formatting is a url string. + */ + format: Office.MailboxEnums.AttachmentContentFormat; + } /** * Represents an attachment on an item from the server. Read mode only. * @@ -9279,6 +9365,102 @@ declare namespace Office { getAsync(callback?: (result: AsyncResult) => void): void; } + /** + * The InternetHeaders object represents properties that are preserved after the item leaves Exchange and converted to a MIME message. + * These properties are stored as x-headers in the MIME message. + * + * InternetHeaders are stored as key/value pairs on a per-item basis. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * @beta + */ + export interface InternetHeaders { + /** + * Given an array of internet header names, this method returns a dictionary containing those internet headers and their values. + * If the add-in requests an x-header that is not available, that x-header will not be returned in the results. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * In addition to this signature, this method also has the following signature: + * + * `getAsync(coerciontype: Office.CoercionType, callback: (result: AsyncResult) => void): void;` + * + * @param names The names of the internet headers to be returned. + * @param options Optional. An object literal that contains one or more of the following properties: + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + * + * @beta + */ + getAsync(names: string[], options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Given an array of internet header names, this method removes the specified headers from the internet header collection. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
+ * + * In addition to this signature, this method also has the following signature: + * + * `getAsync(coerciontype: Office.CoercionType, callback: (result: AsyncResult) => void): void;` + * + * @param names The names of the internet headers to be removed. + * @param options Optional. An object literal that contains one or more of the following properties: + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + * + * @beta + */ + removeAsync(names: string[], options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Sets the specified internet headers to the specified values. + * + * The setAsync method creates a new header if the specified header does not already exist; otherwise, the existing value is replaced with + * the new value. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsDataExceedsMaximumSize - The data parameter is longer than 1,000,000 characters.
InvalidFormatError - The options.coercionType parameter is set to Office.CoercionType.Html and the message body is in plain text.
+ * + * In addition to this signature, this method also has the following signatures: + * + * `setAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions): void;` + * + * `setAsync(data: string, callback: (result: AsyncResult) => void): void;` + * + * `setAsync(data: string): void;` + * + * @param headers The names and corresponding values of the headers to be set. Should be a dictionary object with keys being the names of the + * internet headers and values being the values of the internet headers. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of type Office.AsyncResult. + * Any errors encountered will be provided in the asyncResult.error property. + */ + setAsync(headers: Object, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + } + /** * Represents the appointment organizer, even if an alias or a delegate was used to create the appointment. * This object provides a method to get the organizer value of an appointment in an Outlook add-in. @@ -9669,7 +9851,8 @@ declare namespace Office { /** * Adds an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.AttachmentsChanged` (Preview), + * `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. * * [Api set: Mailbox 1.7] * @@ -9695,8 +9878,8 @@ declare namespace Office { /** * Adds an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.AttachmentsChanged` (Preview), + * `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. * * [Api set: Mailbox 1.7] * @@ -9855,6 +10038,26 @@ declare namespace Office { * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer */ close(): void; + /** + * Gets an array of attachments for the item. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
+ * + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. If the call fails, the asyncResult.error property will contain and error code with the reason for + * the failure. + * + * @beta + */ + getAttachmentsAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Gets initialization data passed when the add-in is activated by an actionable message. * @@ -10066,8 +10269,8 @@ declare namespace Office { /** * Removes an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.AttachmentsChanged` (Preview), + * `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. * * [Api set: Mailbox 1.7] * @@ -10093,7 +10296,8 @@ declare namespace Office { /** * Removes an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.AttachmentsChanged` (Preview), + * `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. * * [Api set: Mailbox 1.7] * @@ -10681,8 +10885,8 @@ declare namespace Office { /** * Adds an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.AttachmentsChanged` (Preview), + * `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. * * [Api set: Mailbox 1.7] * @@ -10709,8 +10913,8 @@ declare namespace Office { /** * Adds an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.AttachmentsChanged` (Preview), + * `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. * * [Api set: Mailbox 1.7] * @@ -11062,8 +11266,8 @@ declare namespace Office { /** * Removes an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.AttachmentsChanged` (Preview), + * `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. * * [Api set: Mailbox 1.7] * @@ -11089,8 +11293,8 @@ declare namespace Office { /** * Removes an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.AttachmentsChanged` (Preview), + * `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. * * [Api set: Mailbox 1.7] * @@ -11237,7 +11441,8 @@ declare namespace Office { /** * Adds an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.AttachmentsChanged` (Preview), + * `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. * * [Api set: Mailbox 1.7] * @@ -11264,7 +11469,8 @@ declare namespace Office { /** * Adds an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.AttachmentsChanged` (Preview), + * `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. * * [Api set: Mailbox 1.7] * @@ -11281,6 +11487,36 @@ declare namespace Office { * asyncResult, which is an Office.AsyncResult object. */ addHandlerAsync(eventType: Office.EventType, handler: any, callback?: (result: AsyncResult) => void): void; + + /** + * Gets an attachment from a message or appointment and returns it as an Office.AttachmentContent object. + * + * The getAttachmentContentAsync method gets the attachment with the specified identifier from the item. As a best practice, you should use + * the identifier to retrieve an attachment in the same session that the attachmentIds were retrieved with the `getAttachmentsAsync` or + * `item.attachments` call. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. A session + * is over when the user closes the app, or if the user starts composing an inline form and subsequently pops out the line form to continue + * in separate window. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
ErrorsInvalidAttachmentId - The attachment identifier does not exist.
+ * + * @param attachmentId The identifier of the attachment you want to get. The maximum length of the string is 100 characters. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. If the call fails, the asyncResult.error property will contain and error code + * with the reason for the failure. + * + * @beta + */ + getAttachmentContentAsync(attachmentId: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Gets initialization data passed when the add-in is {@link https://docs.microsoft.com/outlook/actionable-messages/invoke-add-in-from-actionable-message | activated by an actionable message}. @@ -11383,8 +11619,8 @@ declare namespace Office { /** * Removes an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.AttachmentsChanged` (Preview), + * `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. * * [Api set: Mailbox 1.7] * @@ -11411,8 +11647,8 @@ declare namespace Office { /** * Removes an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.AttachmentsChanged` (Preview), + * `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. * * [Api set: Mailbox 1.7] * @@ -11732,6 +11968,26 @@ declare namespace Office { * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose */ close(): void; + /** + * Gets an array of attachments for the item. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
+ * + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. If the call fails, the asyncResult.error property will contain and error code with the reason for + * the failure. + * + * @beta + */ + getAttachmentsAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Gets initialization data passed when the add-in is activated by an actionable message. * @@ -12740,6 +12996,20 @@ declare namespace Office { * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose */ from: Office.From; + /** + * Sets the internet headers of a message. + * + * The internetHeaders property returns an InternetHeaders object that provides methods to set internet headers on the message. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
+ */ + internetHeaders: Office.InternetHeaders; /** * Gets the type of item that an instance represents. * @@ -12978,7 +13248,8 @@ declare namespace Office { /** * Adds an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.AttachmentsChanged` (Preview), + * `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. * * [Api set: Mailbox 1.7] * @@ -13004,8 +13275,8 @@ declare namespace Office { /** * Adds an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.AttachmentsChanged` (Preview), + * `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. * * [Api set: Mailbox 1.7] * @@ -13166,6 +13437,26 @@ declare namespace Office { * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose */ close(): void; + /** + * Gets an array of attachments for the item. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
+ * + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. If the call fails, the asyncResult.error property will contain and error code with the reason for + * the failure. + * + * @beta + */ + getAttachmentsAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Gets initialization data passed when the add-in is activated by an actionable message. * @@ -13381,8 +13672,8 @@ declare namespace Office { /** * Removes an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.AttachmentsChanged` (Preview), + * `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. * * [Api set: Mailbox 1.7] * @@ -13408,8 +13699,8 @@ declare namespace Office { /** * Removes an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.AttachmentsChanged` (Preview), + * `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. * * [Api set: Mailbox 1.7] * @@ -13802,6 +14093,20 @@ declare namespace Office { * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Read */ from: EmailAddressDetails; + /** + * Gets the internet headers of a message. + * + * The internetHeaders property returns an InternetHeaders object that provides a method to get the internet headers on the message. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Read
+ */ + internetHeaders: Office.InternetHeaders; /** * Gets the Internet message identifier for an email message. * @@ -14013,8 +14318,8 @@ declare namespace Office { /** * Adds an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.AttachmentsChanged` (Preview), + * `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. * * [Api set: Mailbox 1.7] * @@ -14041,8 +14346,8 @@ declare namespace Office { /** * Adds an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.AttachmentsChanged` (Preview), + * `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. * * [Api set: Mailbox 1.7] * @@ -14398,8 +14703,8 @@ declare namespace Office { /** * Removes an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.AttachmentsChanged` (Preview), + * `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. * * [Api set: Mailbox 1.7] * @@ -14425,8 +14730,8 @@ declare namespace Office { /** * Removes an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.AttachmentsChanged` (Preview), + * `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. * * [Api set: Mailbox 1.7] * From b31dbf5fbfee2b2d9777946ad6a85348908c7691 Mon Sep 17 00:00:00 2001 From: Elizabeth Samuel Date: Thu, 25 Oct 2018 09:23:26 -0700 Subject: [PATCH 2/3] add beta tags --- types/office-js/index.d.ts | 92 ++++++++++++++++++++++++++++++++++---- 1 file changed, 83 insertions(+), 9 deletions(-) diff --git a/types/office-js/index.d.ts b/types/office-js/index.d.ts index 0b6186eb8c..90c4583e67 100644 --- a/types/office-js/index.d.ts +++ b/types/office-js/index.d.ts @@ -1826,6 +1826,8 @@ declare namespace Office { * Triggers when an attachment is added to or removed from an item. * * [Api set: Mailbox Preview] + * + * @beta */ AttachmentsChanged, /** @@ -1924,6 +1926,8 @@ declare namespace Office { * Triggers when the OfficeTheme is changed in Outlook. * * [Api set: Mailbox Preview] + * + * @beta */ OfficeThemeChanged, /** @@ -8565,6 +8569,8 @@ declare namespace Office { * * *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * @beta */ interface AttachmentContent { /** @@ -9394,7 +9400,7 @@ declare namespace Office { * * In addition to this signature, this method also has the following signature: * - * `getAsync(coerciontype: Office.CoercionType, callback: (result: AsyncResult) => void): void;` + * `getAsync(names: string[], callback: (result: AsyncResult) => void): void;` * * @param names The names of the internet headers to be returned. * @param options Optional. An object literal that contains one or more of the following properties: @@ -9405,6 +9411,28 @@ declare namespace Office { * @beta */ getAsync(names: string[], options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Given an array of internet header names, this method returns a dictionary containing those internet headers and their values. + * If the add-in requests an x-header that is not available, that x-header will not be returned in the results. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * In addition to this signature, this method also has the following signature: + * + * `getAsync(names: string[], options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void;` + * + * @param names The names of the internet headers to be returned. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + * + * @beta + */ + getAsync(names: string[], callback?: (result: AsyncResult) => void): void; /** * Given an array of internet header names, this method removes the specified headers from the internet header collection. * @@ -9417,7 +9445,7 @@ declare namespace Office { * * In addition to this signature, this method also has the following signature: * - * `getAsync(coerciontype: Office.CoercionType, callback: (result: AsyncResult) => void): void;` + * `removeAsync(names: string[], callback: (result: AsyncResult) => void): void;` * * @param names The names of the internet headers to be removed. * @param options Optional. An object literal that contains one or more of the following properties: @@ -9428,6 +9456,27 @@ declare namespace Office { * @beta */ removeAsync(names: string[], options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Given an array of internet header names, this method removes the specified headers from the internet header collection. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
+ * + * In addition to this signature, this method also has the following signature: + * + * `removeAsync(names: string[], options?: Office.AsyncContextOptions, callback: (result: AsyncResult) => void): void;` + * + * @param names The names of the internet headers to be removed. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + * + * @beta + */ + removeAsync(names: string[], callback?: (result: AsyncResult) => void): void; /** * Sets the specified internet headers to the specified values. * @@ -9441,24 +9490,45 @@ declare namespace Office { * * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose * - * ErrorsDataExceedsMaximumSize - The data parameter is longer than 1,000,000 characters.InvalidFormatError - The options.coercionType parameter is set to Office.CoercionType.Html and the message body is in plain text. - * * In addition to this signature, this method also has the following signatures: * - * `setAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions): void;` + * `setAsync(headers: string, callback: (result: AsyncResult) => void): void;` * - * `setAsync(data: string, callback: (result: AsyncResult) => void): void;` - * - * `setAsync(data: string): void;` - * * @param headers The names and corresponding values of the headers to be set. Should be a dictionary object with keys being the names of the * internet headers and values being the values of the internet headers. * @param options Optional. An object literal that contains one or more of the following properties. * asyncContext: Developers can provide any object they wish to access in the callback method. * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of type Office.AsyncResult. * Any errors encountered will be provided in the asyncResult.error property. + * + * @beta */ setAsync(headers: Object, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Sets the specified internet headers to the specified values. + * + * The setAsync method creates a new header if the specified header does not already exist; otherwise, the existing value is replaced with + * the new value. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + * + * + * In addition to this signature, this method also has the following signatures: + * + * `setAsync(headers: string, options?: Office.AsyncContextOptions, callback: (result: AsyncResult) => void): void;` + * + * @param headers The names and corresponding values of the headers to be set. Should be a dictionary object with keys being the names of the + * internet headers and values being the values of the internet headers. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of type Office.AsyncResult. + * Any errors encountered will be provided in the asyncResult.error property. + * + * @beta + */ + setAsync(headers: Object, callback?: (result: AsyncResult) => void): void; } /** @@ -13008,6 +13078,8 @@ declare namespace Office { *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
* *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
+ * + * @beta */ internetHeaders: Office.InternetHeaders; /** @@ -14105,6 +14177,8 @@ declare namespace Office { * * *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Read
+ * + * @beta */ internetHeaders: Office.InternetHeaders; /** From e4ae10fa65fb1fe473517b02ab1b3e018531fcb8 Mon Sep 17 00:00:00 2001 From: Elizabeth Samuel Date: Thu, 25 Oct 2018 11:17:01 -0700 Subject: [PATCH 3/3] updates based on feedback --- types/office-js/index.d.ts | 182 +++++++++++++++++-------------------- 1 file changed, 82 insertions(+), 100 deletions(-) diff --git a/types/office-js/index.d.ts b/types/office-js/index.d.ts index 90c4583e67..11a14752ca 100644 --- a/types/office-js/index.d.ts +++ b/types/office-js/index.d.ts @@ -7369,19 +7369,14 @@ declare namespace Office { Base64 = "base64", /** - * The content of the attachment is returned as a string representing a url. + * The content of the attachment is returned as a string representing a URL. */ Url = "url", /** * The content of the attachment is returned as a string representing an .eml formatted file. */ - Eml = "eml", - - /** - * The content of the attachment is returned as a string representing an .ical formatted file. - */ - ICal + Eml = "eml" } /** * Specifies whether an attachment was added to or removed from an item. @@ -8574,15 +8569,14 @@ declare namespace Office { */ interface AttachmentContent { /** - * The content of an attachment in a string format. + * The content of an attachment as a string. */ content: string; /** * The string format to use for an attachment's content. * For file attachments, the formatting is a base64-encoded string. * For item attachments that represent messages, the formatting is a string representing an .eml formatted file. - * For item attachments that represent calendar items, the formatting is an .ical file. - * For cloud attachments, the formatting is a url string. + * For cloud attachments, the formatting is a URL string. */ format: Office.MailboxEnums.AttachmentContentFormat; } @@ -9422,10 +9416,6 @@ declare namespace Office { * * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read * - * In addition to this signature, this method also has the following signature: - * - * `getAsync(names: string[], options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void;` - * * @param names The names of the internet headers to be returned. * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, * asyncResult, which is an Office.AsyncResult object. @@ -9466,10 +9456,6 @@ declare namespace Office { * * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose * - * In addition to this signature, this method also has the following signature: - * - * `removeAsync(names: string[], options?: Office.AsyncContextOptions, callback: (result: AsyncResult) => void): void;` - * * @param names The names of the internet headers to be removed. * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, * asyncResult, which is an Office.AsyncResult object. @@ -9517,10 +9503,6 @@ declare namespace Office { * * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose * - * In addition to this signature, this method also has the following signatures: - * - * `setAsync(headers: string, options?: Office.AsyncContextOptions, callback: (result: AsyncResult) => void): void;` - * * @param headers The names and corresponding values of the headers to be set. Should be a dictionary object with keys being the names of the * internet headers and values being the values of the internet headers. * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of type Office.AsyncResult. @@ -9921,8 +9903,8 @@ declare namespace Office { /** * Adds an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.AttachmentsChanged` (Preview), - * `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -9948,8 +9930,8 @@ declare namespace Office { /** * Adds an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.AttachmentsChanged` (Preview), - * `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -10109,7 +10091,7 @@ declare namespace Office { */ close(): void; /** - * Gets an array of attachments for the item. + * Gets the item's attachments as an array. * * [Api set: Mailbox Preview] * @@ -10236,8 +10218,8 @@ declare namespace Office { * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. - * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form - * to continue in a separate window. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. * * [Api set: Mailbox 1.1] * @@ -10270,8 +10252,8 @@ declare namespace Office { * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. - * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form - * to continue in a separate window. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. * * [Api set: Mailbox 1.1] * @@ -10292,8 +10274,8 @@ declare namespace Office { * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. - * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form - * to continue in a separate window. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. * * [Api set: Mailbox 1.1] * @@ -10317,8 +10299,8 @@ declare namespace Office { * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment * in the same session. * In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. - * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form - * to continue in a separate window. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. * * [Api set: Mailbox 1.1] * @@ -10339,8 +10321,8 @@ declare namespace Office { /** * Removes an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.AttachmentsChanged` (Preview), - * `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -10366,8 +10348,8 @@ declare namespace Office { /** * Removes an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.AttachmentsChanged` (Preview), - * `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -10652,7 +10634,7 @@ declare namespace Office { */ interface AppointmentRead extends Appointment, ItemRead { /** - * Gets an array of attachments for the item. + * Gets the item's attachments as an array. * * [Api set: Mailbox 1.0] * @@ -10955,8 +10937,8 @@ declare namespace Office { /** * Adds an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.AttachmentsChanged` (Preview), - * `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -10983,8 +10965,8 @@ declare namespace Office { /** * Adds an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.AttachmentsChanged` (Preview), - * `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -11336,8 +11318,8 @@ declare namespace Office { /** * Removes an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.AttachmentsChanged` (Preview), - * `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -11363,8 +11345,8 @@ declare namespace Office { /** * Removes an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.AttachmentsChanged` (Preview), - * `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -11511,8 +11493,8 @@ declare namespace Office { /** * Adds an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.AttachmentsChanged` (Preview), - * `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -11539,8 +11521,8 @@ declare namespace Office { /** * Adds an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.AttachmentsChanged` (Preview), - * `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -11559,13 +11541,13 @@ declare namespace Office { addHandlerAsync(eventType: Office.EventType, handler: any, callback?: (result: AsyncResult) => void): void; /** - * Gets an attachment from a message or appointment and returns it as an Office.AttachmentContent object. + * Gets an attachment from a message or appointment and returns it as an `Office.AttachmentContent` object. * - * The getAttachmentContentAsync method gets the attachment with the specified identifier from the item. As a best practice, you should use + * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should use * the identifier to retrieve an attachment in the same session that the attachmentIds were retrieved with the `getAttachmentsAsync` or - * `item.attachments` call. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. A session - * is over when the user closes the app, or if the user starts composing an inline form and subsequently pops out the line form to continue - * in separate window. + * `item.attachments` call. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. * * [Api set: Mailbox Preview] * @@ -11689,8 +11671,8 @@ declare namespace Office { /** * Removes an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.AttachmentsChanged` (Preview), - * `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -11717,8 +11699,8 @@ declare namespace Office { /** * Removes an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.AttachmentsChanged` (Preview), - * `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -12039,7 +12021,7 @@ declare namespace Office { */ close(): void; /** - * Gets an array of attachments for the item. + * Gets the item's attachments as an array. * * [Api set: Mailbox Preview] * @@ -12144,8 +12126,8 @@ declare namespace Office { * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. - * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form - * to continue in a separate window. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. * * [Api set: Mailbox 1.1] * @@ -12179,8 +12161,8 @@ declare namespace Office { * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. - * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form - * to continue in a separate window. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. * * [Api set: Mailbox 1.1] * @@ -12201,8 +12183,8 @@ declare namespace Office { * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. - * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form - * to continue in a separate window. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. * * [Api set: Mailbox 1.1] * @@ -12225,8 +12207,8 @@ declare namespace Office { * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. - * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form - * to continue in a separate window. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. * * [Api set: Mailbox 1.1] * @@ -12518,7 +12500,7 @@ declare namespace Office { */ interface ItemRead extends Item { /** - * Gets an array of attachments for the item. + * Gets the item's attachments as an array. * * [Api set: Mailbox 1.0] * @@ -13069,7 +13051,7 @@ declare namespace Office { /** * Sets the internet headers of a message. * - * The internetHeaders property returns an InternetHeaders object that provides methods to set internet headers on the message. + * The internetHeaders property returns an InternetHeaders object that provides methods to manage the internet headers on the message. * * [Api set: Mailbox Preview] * @@ -13320,8 +13302,8 @@ declare namespace Office { /** * Adds an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.AttachmentsChanged` (Preview), - * `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -13347,8 +13329,8 @@ declare namespace Office { /** * Adds an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.AttachmentsChanged` (Preview), - * `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -13510,7 +13492,7 @@ declare namespace Office { */ close(): void; /** - * Gets an array of attachments for the item. + * Gets the item's attachments as an array. * * [Api set: Mailbox Preview] * @@ -13641,8 +13623,8 @@ declare namespace Office { * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. - * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form - * to continue in a separate window. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. * * [Api set: Mailbox 1.1] * @@ -13676,8 +13658,8 @@ declare namespace Office { * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. - * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form - * to continue in a separate window. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. * * [Api set: Mailbox 1.1] * @@ -13698,8 +13680,8 @@ declare namespace Office { * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. - * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form - * to continue in a separate window. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. * * [Api set: Mailbox 1.1] * @@ -13722,8 +13704,8 @@ declare namespace Office { * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. - * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form - * to continue in a separate window. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. * * [Api set: Mailbox 1.1] * @@ -13744,8 +13726,8 @@ declare namespace Office { /** * Removes an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.AttachmentsChanged` (Preview), - * `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -13771,8 +13753,8 @@ declare namespace Office { /** * Removes an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.AttachmentsChanged` (Preview), - * `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -14057,7 +14039,7 @@ declare namespace Office { */ interface MessageRead extends Message, ItemRead { /** - * Gets an array of attachments for the item. + * Gets the item's attachments as an array. * * [Api set: Mailbox 1.0] * @@ -14168,7 +14150,7 @@ declare namespace Office { /** * Gets the internet headers of a message. * - * The internetHeaders property returns an InternetHeaders object that provides a method to get the internet headers on the message. + * The internetHeaders property returns an InternetHeaders object that provides methods to manage the internet headers on the message. * * [Api set: Mailbox Preview] * @@ -14392,8 +14374,8 @@ declare namespace Office { /** * Adds an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.AttachmentsChanged` (Preview), - * `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -14420,8 +14402,8 @@ declare namespace Office { /** * Adds an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.AttachmentsChanged` (Preview), - * `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -14777,8 +14759,8 @@ declare namespace Office { /** * Removes an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.AttachmentsChanged` (Preview), - * `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -14804,8 +14786,8 @@ declare namespace Office { /** * Removes an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.AttachmentsChanged` (Preview), - * `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -16823,7 +16805,7 @@ declare namespace Office { */ owner: String; /** - * The remote REST url related to the owner’s mailbox. + * The remote REST URL related to the owner’s mailbox. */ restUrl: String; /**