From 78928ae025f2b796abbd4042c0c70ee15b072080 Mon Sep 17 00:00:00 2001 From: Elizabeth Samuel Date: Mon, 28 Jan 2019 11:49:26 -0800 Subject: [PATCH 1/7] [office-js] Outlook preview updates --- types/office-js/index.d.ts | 283 +++++++++++++++++++++++++++++++++++++ 1 file changed, 283 insertions(+) diff --git a/types/office-js/index.d.ts b/types/office-js/index.d.ts index f0fee147ba..ea804993a1 100644 --- a/types/office-js/index.d.ts +++ b/types/office-js/index.d.ts @@ -7713,6 +7713,31 @@ declare namespace Office { */ Appointment = "appointment" } + /** + * Specifies an appointment's location type. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * @beta + */ + enum LocationType { + /** + * A custom location. + */ + Custom = "custom", + /** + * A conference room or similar resource. + */ + ConferenceRoom = "conferenceRoom" + } /** * Specifies the month. * @@ -9367,6 +9392,173 @@ declare namespace Office { */ emailAddress: string; } + /** + * Represents the set of locations on an appointment. + * + * [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 + */ + interface EnhancedLocation { + /** + * Adds to the set of locations associated with the appointment. + * + * @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 signatures: + * + * `addAsync(locationIds: LocationIdentifier[], callback?: (result: Office.AsyncResult) => void): void;` + * + * @param locationIds The locations to be added to the current list of locations. + * @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. + */ + addAsync(locationIds: LocationIdentifier[], options?: Office.AsyncContextOptions, callback?: (result: Office.AsyncResult) => void): void; + /** + * Adds to the set of locations associated with the appointment. + * + * @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
+ * + * @param locationIds The locations to be added to the current list of locations. + * @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. + */ + addAsync(locationIds: LocationIdentifier[], callback?: (result: Office.AsyncResult) => void): void; + /** + * Gets the set of locations associated with the appointment. + * + * @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
+ * + * In addition to this signature, this method also has the following signatures: + * + * `getAsync(callback?: (result: Office.AsyncResult) => void): void;` + * + * @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. + */ + getAsync(options?: Office.AsyncContextOptions, callback?: (result: Office.AsyncResult) => void): void; + /** + * Gets the set of locations associated with the appointment. + * + * @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 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. + */ + getAsync(callback?: (result: Office.AsyncResult) => void): void; + /** + * Removes the set of locations associated with the appointment. + * + * Any included conference rooms (i.e., in the `LocationDetails` object, the `type` is **ConferenceRoom** and there is an email address) + * should be removed from the locations and the resources lists. + * + * If there are multiple locations with the same name, all matching locations will be removed even if only one was specified in locationIds. + * + * @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 signatures: + * + * `removeAsync(locationIds: LocationIdentifier[], callback?: (result: Office.AsyncResult) => void): void;` + * + * @param locationIds The locations to be removed from the current list of locations. + * @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. + */ + removeAsync(locationIds: LocationIdentifier[], options?: Office.AsyncContextOptions, callback?: (result: Office.AsyncResult) => void): void; + /** + * Removes the set of locations associated with the appointment. + * + * Any included conference rooms (i.e., in the `LocationDetails` object, the `type` is **ConferenceRoom** and there is an email address) + * should be removed from the locations and the resources lists. + * + * If there are multiple locations with the same name, all matching locations will be removed even if only one was specified in locationIds. + * + * @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
+ * + * @param locationIds The locations to be removed from the current list of locations. + * @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. + */ + removeAsync(locationIds: LocationIdentifier[], callback?: (result: Office.AsyncResult) => void): void; + } /** * Represents a collection of entities found in an email message or appointment. Read mode only. * @@ -9632,6 +9824,54 @@ declare namespace Office { setAsync(headers: Object, callback?: (result: Office.AsyncResult) => void): void; } + /** + * Represents a location. Read only. + * + * [Api set: Mailbox Preview] + * + * @beta + */ + export interface LocationDetails { + /** + * The location's id. + */ + locationId: LocationIdentifier; + /** + * The location's display name. + */ + displayName: string; + /** + * The email address associated with the location. + */ + emailAddress: string; + /** + * Additional properties for the location. + */ + properties: any; + } + + /** + * Represents the id of a location. + * + * [Api set: Mailbox Preview] + * + * @beta + */ + interface LocationIdentifier { + /** + * The location's unique id. + * + * For **ConferenceRoom** type, it's the room's email address. + * + * For **Custom** type, it's the displayName. + */ + id: string; + /** + * The location's type. + */ + type: MailboxEnums.LocationType; + } + /** * 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. @@ -9733,6 +9973,28 @@ declare namespace Office { * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer */ end: Time; + /** + * Gets or sets the locations of the appointment. The `enhancedLocations` property returns an {@link EnhancedLocation} object that + * provides methods to get, remove, or add locations on an 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}Appointment Organizer
+ * + * @beta + */ + enhancedLocations: EnhancedLocation; /** * Gets the type of item that an instance represents. * @@ -10820,6 +11082,27 @@ declare namespace Office { * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Attendee */ end: Date; + /** + * Gets a set of LocationDetails objects that represents the locations of the appointment. + * + * [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}Appointment Attendee
+ * + * @beta + */ + enhancedLocations: LocationDetails[]; /** * Gets the Exchange Web Services item class of the selected item. * From e4e56293bb654185f89b49bcae4964068487b953 Mon Sep 17 00:00:00 2001 From: Elizabeth Samuel Date: Mon, 28 Jan 2019 16:10:49 -0800 Subject: [PATCH 2/7] Updates based on eng feedback --- types/office-js/index.d.ts | 65 +++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 36 deletions(-) diff --git a/types/office-js/index.d.ts b/types/office-js/index.d.ts index ea804993a1..1b3f3c447a 100644 --- a/types/office-js/index.d.ts +++ b/types/office-js/index.d.ts @@ -7736,7 +7736,7 @@ declare namespace Office { /** * A conference room or similar resource. */ - ConferenceRoom = "conferenceRoom" + Room = "room" } /** * Specifies the month. @@ -9429,15 +9429,15 @@ declare namespace Office { * * In addition to this signature, this method also has the following signatures: * - * `addAsync(locationIds: LocationIdentifier[], callback?: (result: Office.AsyncResult) => void): void;` + * `addAsync(locationIdentifiers: LocationIdentifier[], callback?: (result: Office.AsyncResultStatus) => void): void;` * - * @param locationIds The locations to be added to the current list of locations. + * @param locationIdentifiers The locations to be added to the current list of locations. * @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. + * asyncResult, which is an Office.AsyncResult object. Check the `status` property of asyncResult to determine if the call succeeded. */ - addAsync(locationIds: LocationIdentifier[], options?: Office.AsyncContextOptions, callback?: (result: Office.AsyncResult) => void): void; + addAsync(locationIdentifiers: LocationIdentifier[], options?: Office.AsyncContextOptions, callback?: (result: Office.AsyncResultStatus) => void): void; /** * Adds to the set of locations associated with the appointment. * @@ -9453,11 +9453,11 @@ declare namespace Office { * * * - * @param locationIds The locations to be added to the current list of locations. + * @param locationIdentifiers The locations to be added to the current list of locations. * @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. + * asyncResult, which is an Office.AsyncResult object. Check the `status` property of asyncResult to determine if the call succeeded. */ - addAsync(locationIds: LocationIdentifier[], callback?: (result: Office.AsyncResult) => void): void; + addAsync(locationIdentifiers: LocationIdentifier[], callback?: (result: Office.AsyncResultStatus) => void): void; /** * Gets the set of locations associated with the appointment. * @@ -9469,7 +9469,7 @@ declare namespace Office { * * * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode} - * Compose + * Compose or read * * * @@ -9494,7 +9494,7 @@ declare namespace Office { * * * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode} - * Compose + * Compose or read * * * @@ -9505,10 +9505,7 @@ declare namespace Office { /** * Removes the set of locations associated with the appointment. * - * Any included conference rooms (i.e., in the `LocationDetails` object, the `type` is **ConferenceRoom** and there is an email address) - * should be removed from the locations and the resources lists. - * - * If there are multiple locations with the same name, all matching locations will be removed even if only one was specified in locationIds. + * If there are multiple locations with the same name, all matching locations will be removed even if only one was specified in locationIdentifiers. * * @remarks * @@ -9524,22 +9521,19 @@ declare namespace Office { * * In addition to this signature, this method also has the following signatures: * - * `removeAsync(locationIds: LocationIdentifier[], callback?: (result: Office.AsyncResult) => void): void;` + * `removeAsync(locationIdentifiers: LocationIdentifier[], callback?: (result: Office.AsyncResultStatus) => void): void;` * - * @param locationIds The locations to be removed from the current list of locations. + * @param locationIdentifiers The locations to be removed from the current list of locations. * @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. + * asyncResult, which is an Office.AsyncResult object. Check the `status` property of asyncResult to determine if the call succeeded. */ - removeAsync(locationIds: LocationIdentifier[], options?: Office.AsyncContextOptions, callback?: (result: Office.AsyncResult) => void): void; + removeAsync(locationIdentifiers: LocationIdentifier[], options?: Office.AsyncContextOptions, callback?: (result: Office.AsyncResultStatus) => void): void; /** * Removes the set of locations associated with the appointment. * - * Any included conference rooms (i.e., in the `LocationDetails` object, the `type` is **ConferenceRoom** and there is an email address) - * should be removed from the locations and the resources lists. - * - * If there are multiple locations with the same name, all matching locations will be removed even if only one was specified in locationIds. + * If there are multiple locations with the same name, all matching locations will be removed even if only one was specified in locationIdentifiers. * * @remarks *
@@ -9553,11 +9547,11 @@ declare namespace Office { * *
* - * @param locationIds The locations to be removed from the current list of locations. + * @param locationIdentifiers The locations to be removed from the current list of locations. * @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. + * asyncResult, which is an Office.AsyncResult object. Check the `status` property of asyncResult to determine if the call succeeded. */ - removeAsync(locationIds: LocationIdentifier[], callback?: (result: Office.AsyncResult) => void): void; + removeAsync(locationIdentifiers: LocationIdentifier[], callback?: (result: Office.AsyncResultStatus) => void): void; } /** * Represents a collection of entities found in an email message or appointment. Read mode only. @@ -9833,9 +9827,9 @@ declare namespace Office { */ export interface LocationDetails { /** - * The location's id. + * The LocationIdentifier of the location. */ - locationId: LocationIdentifier; + locationIdentifier: LocationIdentifier; /** * The location's display name. */ @@ -9844,10 +9838,6 @@ declare namespace Office { * The email address associated with the location. */ emailAddress: string; - /** - * Additional properties for the location. - */ - properties: any; } /** @@ -9861,7 +9851,7 @@ declare namespace Office { /** * The location's unique id. * - * For **ConferenceRoom** type, it's the room's email address. + * For **Room** type, it's the room's email address. * * For **Custom** type, it's the displayName. */ @@ -9974,7 +9964,7 @@ declare namespace Office { */ end: Time; /** - * Gets or sets the locations of the appointment. The `enhancedLocations` property returns an {@link EnhancedLocation} object that + * Gets or sets the locations of the appointment. The `enhancedLocation` property returns an {@link EnhancedLocation} object that * provides methods to get, remove, or add locations on an item. * * [Api set: Mailbox Preview] @@ -9994,7 +9984,7 @@ declare namespace Office { * * @beta */ - enhancedLocations: EnhancedLocation; + enhancedLocation: EnhancedLocation; /** * Gets the type of item that an instance represents. * @@ -11083,7 +11073,10 @@ declare namespace Office { */ end: Date; /** - * Gets a set of LocationDetails objects that represents the locations of the appointment. + * Gets the locations of an appointment. + * + * The enhancedLocation property returns an {@link EnhancedLocation} object that allows you to get the set of locations (each represented by + * a {@link LocationDetails} object) associated with the appointment. * * [Api set: Mailbox Preview] * @@ -11102,7 +11095,7 @@ declare namespace Office { * * @beta */ - enhancedLocations: LocationDetails[]; + enhancedLocation: EnhancedLocation; /** * Gets the Exchange Web Services item class of the selected item. * From df207da292a73fe824132c9bfad06359705160c2 Mon Sep 17 00:00:00 2001 From: Elizabeth Samuel Date: Mon, 28 Jan 2019 16:26:28 -0800 Subject: [PATCH 3/7] Add changes to office-js-preview --- types/office-js-preview/index.d.ts | 276 +++++++++++++++++++++++++++++ 1 file changed, 276 insertions(+) diff --git a/types/office-js-preview/index.d.ts b/types/office-js-preview/index.d.ts index 75e9ed910f..e26ab7e8a0 100644 --- a/types/office-js-preview/index.d.ts +++ b/types/office-js-preview/index.d.ts @@ -7713,6 +7713,31 @@ declare namespace Office { */ Appointment = "appointment" } + /** + * Specifies an appointment's location type. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * @beta + */ + enum LocationType { + /** + * A custom location. + */ + Custom = "custom", + /** + * A conference room or similar resource. + */ + Room = "room" + } /** * Specifies the month. * @@ -9367,6 +9392,167 @@ declare namespace Office { */ emailAddress: string; } + /** + * Represents the set of locations on an appointment. + * + * [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 + */ + interface EnhancedLocation { + /** + * Adds to the set of locations associated with the appointment. + * + * @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 signatures: + * + * `addAsync(locationIdentifiers: LocationIdentifier[], callback?: (result: Office.AsyncResultStatus) => void): void;` + * + * @param locationIdentifiers The locations to be added to the current list of locations. + * @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. Check the `status` property of asyncResult to determine if the call succeeded. + */ + addAsync(locationIdentifiers: LocationIdentifier[], options?: Office.AsyncContextOptions, callback?: (result: Office.AsyncResultStatus) => void): void; + /** + * Adds to the set of locations associated with the appointment. + * + * @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
+ * + * @param locationIdentifiers The locations to be added to the current list of locations. + * @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. Check the `status` property of asyncResult to determine if the call succeeded. + */ + addAsync(locationIdentifiers: LocationIdentifier[], callback?: (result: Office.AsyncResultStatus) => void): void; + /** + * Gets the set of locations associated with the appointment. + * + * @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 signatures: + * + * `getAsync(callback?: (result: Office.AsyncResult) => void): void;` + * + * @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. + */ + getAsync(options?: Office.AsyncContextOptions, callback?: (result: Office.AsyncResult) => void): void; + /** + * Gets the set of locations associated with the appointment. + * + * @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
+ * + * @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. + */ + getAsync(callback?: (result: Office.AsyncResult) => void): void; + /** + * Removes the set of locations associated with the appointment. + * + * If there are multiple locations with the same name, all matching locations will be removed even if only one was specified in locationIdentifiers. + * + * @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 signatures: + * + * `removeAsync(locationIdentifiers: LocationIdentifier[], callback?: (result: Office.AsyncResultStatus) => void): void;` + * + * @param locationIdentifiers The locations to be removed from the current list of locations. + * @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. Check the `status` property of asyncResult to determine if the call succeeded. + */ + removeAsync(locationIdentifiers: LocationIdentifier[], options?: Office.AsyncContextOptions, callback?: (result: Office.AsyncResultStatus) => void): void; + /** + * Removes the set of locations associated with the appointment. + * + * If there are multiple locations with the same name, all matching locations will be removed even if only one was specified in locationIdentifiers. + * + * @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
+ * + * @param locationIdentifiers The locations to be removed from the current list of locations. + * @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. Check the `status` property of asyncResult to determine if the call succeeded. + */ + removeAsync(locationIdentifiers: LocationIdentifier[], callback?: (result: Office.AsyncResultStatus) => void): void; + } /** * Represents a collection of entities found in an email message or appointment. Read mode only. * @@ -9632,6 +9818,50 @@ declare namespace Office { setAsync(headers: Object, callback?: (result: Office.AsyncResult) => void): void; } + /** + * Represents a location. Read only. + * + * [Api set: Mailbox Preview] + * + * @beta + */ + export interface LocationDetails { + /** + * The LocationIdentifier of the location. + */ + locationIdentifier: LocationIdentifier; + /** + * The location's display name. + */ + displayName: string; + /** + * The email address associated with the location. + */ + emailAddress: string; + } + + /** + * Represents the id of a location. + * + * [Api set: Mailbox Preview] + * + * @beta + */ + interface LocationIdentifier { + /** + * The location's unique id. + * + * For **Room** type, it's the room's email address. + * + * For **Custom** type, it's the displayName. + */ + id: string; + /** + * The location's type. + */ + type: MailboxEnums.LocationType; + } + /** * 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. @@ -9733,6 +9963,28 @@ declare namespace Office { * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer */ end: Time; + /** + * Gets or sets the locations of the appointment. The `enhancedLocation` property returns an {@link EnhancedLocation} object that + * provides methods to get, remove, or add locations on an 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}Appointment Organizer
+ * + * @beta + */ + enhancedLocation: EnhancedLocation; /** * Gets the type of item that an instance represents. * @@ -10820,6 +11072,30 @@ declare namespace Office { * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Attendee */ end: Date; + /** + * Gets the locations of an appointment. + * + * The enhancedLocation property returns an {@link EnhancedLocation} object that allows you to get the set of locations (each represented by + * a {@link LocationDetails} object) associated with the appointment. + * + * [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}Appointment Attendee
+ * + * @beta + */ + enhancedLocation: EnhancedLocation; /** * Gets the Exchange Web Services item class of the selected item. * From bc8c6cabd0ce252a9f5e45011666ff3984b94e76 Mon Sep 17 00:00:00 2001 From: Elizabeth Samuel Date: Tue, 29 Jan 2019 16:04:09 -0800 Subject: [PATCH 4/7] Add beta tags to EnhancedLocation methods --- types/office-js-preview/index.d.ts | 32 ++++++++++++++++++++++++++---- types/office-js/index.d.ts | 32 ++++++++++++++++++++++++++---- 2 files changed, 56 insertions(+), 8 deletions(-) diff --git a/types/office-js-preview/index.d.ts b/types/office-js-preview/index.d.ts index e26ab7e8a0..56415c63cd 100644 --- a/types/office-js-preview/index.d.ts +++ b/types/office-js-preview/index.d.ts @@ -9411,10 +9411,12 @@ declare namespace Office { * * @beta */ - interface EnhancedLocation { + export interface EnhancedLocation { /** * Adds to the set of locations associated with the appointment. * + * [Api set: Mailbox Preview] + * * @remarks * * @@ -9436,11 +9438,15 @@ declare namespace Office { * 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. Check the `status` property of asyncResult to determine if the call succeeded. + * + * @beta */ addAsync(locationIdentifiers: LocationIdentifier[], options?: Office.AsyncContextOptions, callback?: (result: Office.AsyncResultStatus) => void): void; /** * Adds to the set of locations associated with the appointment. * + * [Api set: Mailbox Preview] + * * @remarks *
* @@ -9456,11 +9462,15 @@ declare namespace Office { * @param locationIdentifiers The locations to be added to the current list of locations. * @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. Check the `status` property of asyncResult to determine if the call succeeded. + * + * @beta */ addAsync(locationIdentifiers: LocationIdentifier[], callback?: (result: Office.AsyncResultStatus) => void): void; /** * Gets the set of locations associated with the appointment. * + * [Api set: Mailbox Preview] + * * @remarks *
* @@ -9481,11 +9491,15 @@ declare namespace Office { * 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(options?: Office.AsyncContextOptions, callback?: (result: Office.AsyncResult) => void): void; /** * Gets the set of locations associated with the appointment. * + * [Api set: Mailbox Preview] + * * @remarks *
* @@ -9500,6 +9514,8 @@ declare namespace Office { * * @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(callback?: (result: Office.AsyncResult) => void): void; /** @@ -9507,6 +9523,8 @@ declare namespace Office { * * If there are multiple locations with the same name, all matching locations will be removed even if only one was specified in locationIdentifiers. * + * [Api set: Mailbox Preview] + * * @remarks *
* @@ -9528,6 +9546,8 @@ declare namespace Office { * 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. Check the `status` property of asyncResult to determine if the call succeeded. + * + * @beta */ removeAsync(locationIdentifiers: LocationIdentifier[], options?: Office.AsyncContextOptions, callback?: (result: Office.AsyncResultStatus) => void): void; /** @@ -9535,6 +9555,8 @@ declare namespace Office { * * If there are multiple locations with the same name, all matching locations will be removed even if only one was specified in locationIdentifiers. * + * [Api set: Mailbox Preview] + * * @remarks *
* @@ -9550,6 +9572,8 @@ declare namespace Office { * @param locationIdentifiers The locations to be removed from the current list of locations. * @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. Check the `status` property of asyncResult to determine if the call succeeded. + * + * @beta */ removeAsync(locationIdentifiers: LocationIdentifier[], callback?: (result: Office.AsyncResultStatus) => void): void; } @@ -9964,7 +9988,7 @@ declare namespace Office { */ end: Time; /** - * Gets or sets the locations of the appointment. The `enhancedLocation` property returns an {@link EnhancedLocation} object that + * Gets or sets the locations of the appointment. The `enhancedLocation` property returns an {@link Office.EnhancedLocation} object that * provides methods to get, remove, or add locations on an item. * * [Api set: Mailbox Preview] @@ -11075,8 +11099,8 @@ declare namespace Office { /** * Gets the locations of an appointment. * - * The enhancedLocation property returns an {@link EnhancedLocation} object that allows you to get the set of locations (each represented by - * a {@link LocationDetails} object) associated with the appointment. + * The enhancedLocation property returns an {@link Office.EnhancedLocation} object that allows you to get the set of locations (each represented by + * a {@link Office.LocationDetails} object) associated with the appointment. * * [Api set: Mailbox Preview] * diff --git a/types/office-js/index.d.ts b/types/office-js/index.d.ts index 1b3f3c447a..1ff4d05df3 100644 --- a/types/office-js/index.d.ts +++ b/types/office-js/index.d.ts @@ -9411,10 +9411,12 @@ declare namespace Office { * * @beta */ - interface EnhancedLocation { + export interface EnhancedLocation { /** * Adds to the set of locations associated with the appointment. * + * [Api set: Mailbox Preview] + * * @remarks *
* @@ -9436,11 +9438,15 @@ declare namespace Office { * 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. Check the `status` property of asyncResult to determine if the call succeeded. + * + * @beta */ addAsync(locationIdentifiers: LocationIdentifier[], options?: Office.AsyncContextOptions, callback?: (result: Office.AsyncResultStatus) => void): void; /** * Adds to the set of locations associated with the appointment. * + * [Api set: Mailbox Preview] + * * @remarks *
* @@ -9456,11 +9462,15 @@ declare namespace Office { * @param locationIdentifiers The locations to be added to the current list of locations. * @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. Check the `status` property of asyncResult to determine if the call succeeded. + * + * @beta */ addAsync(locationIdentifiers: LocationIdentifier[], callback?: (result: Office.AsyncResultStatus) => void): void; /** * Gets the set of locations associated with the appointment. * + * [Api set: Mailbox Preview] + * * @remarks *
* @@ -9481,11 +9491,15 @@ declare namespace Office { * 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(options?: Office.AsyncContextOptions, callback?: (result: Office.AsyncResult) => void): void; /** * Gets the set of locations associated with the appointment. * + * [Api set: Mailbox Preview] + * * @remarks *
* @@ -9500,6 +9514,8 @@ declare namespace Office { * * @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(callback?: (result: Office.AsyncResult) => void): void; /** @@ -9507,6 +9523,8 @@ declare namespace Office { * * If there are multiple locations with the same name, all matching locations will be removed even if only one was specified in locationIdentifiers. * + * [Api set: Mailbox Preview] + * * @remarks *
* @@ -9528,6 +9546,8 @@ declare namespace Office { * 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. Check the `status` property of asyncResult to determine if the call succeeded. + * + * @beta */ removeAsync(locationIdentifiers: LocationIdentifier[], options?: Office.AsyncContextOptions, callback?: (result: Office.AsyncResultStatus) => void): void; /** @@ -9535,6 +9555,8 @@ declare namespace Office { * * If there are multiple locations with the same name, all matching locations will be removed even if only one was specified in locationIdentifiers. * + * [Api set: Mailbox Preview] + * * @remarks *
* @@ -9550,6 +9572,8 @@ declare namespace Office { * @param locationIdentifiers The locations to be removed from the current list of locations. * @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. Check the `status` property of asyncResult to determine if the call succeeded. + * + * @beta */ removeAsync(locationIdentifiers: LocationIdentifier[], callback?: (result: Office.AsyncResultStatus) => void): void; } @@ -9964,7 +9988,7 @@ declare namespace Office { */ end: Time; /** - * Gets or sets the locations of the appointment. The `enhancedLocation` property returns an {@link EnhancedLocation} object that + * Gets or sets the locations of the appointment. The `enhancedLocation` property returns an {@link Office.EnhancedLocation} object that * provides methods to get, remove, or add locations on an item. * * [Api set: Mailbox Preview] @@ -11075,8 +11099,8 @@ declare namespace Office { /** * Gets the locations of an appointment. * - * The enhancedLocation property returns an {@link EnhancedLocation} object that allows you to get the set of locations (each represented by - * a {@link LocationDetails} object) associated with the appointment. + * The enhancedLocation property returns an {@link Office.EnhancedLocation} object that allows you to get the set of locations (each represented by + * a {@link Office.LocationDetails} object) associated with the appointment. * * [Api set: Mailbox Preview] * From 66a5b40176945ee85e47661d4adc90cea168b681 Mon Sep 17 00:00:00 2001 From: Elizabeth Samuel Date: Wed, 30 Jan 2019 09:22:57 -0800 Subject: [PATCH 5/7] Note errors for EnhancedLocation.addAsync --- types/office-js-preview/index.d.ts | 8 ++++++++ types/office-js/index.d.ts | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/types/office-js-preview/index.d.ts b/types/office-js-preview/index.d.ts index 56415c63cd..0516d08034 100644 --- a/types/office-js-preview/index.d.ts +++ b/types/office-js-preview/index.d.ts @@ -9427,6 +9427,10 @@ declare namespace Office { * * * + * + * + * + * *
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsInvalidFormatError - The format of the specified data object is not valid.
* * In addition to this signature, this method also has the following signatures: @@ -9457,6 +9461,10 @@ declare namespace Office { * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode} * Compose * + * + * Errors + * InvalidFormatError - The format of the specified data object is not valid. + * * * * @param locationIdentifiers The locations to be added to the current list of locations. diff --git a/types/office-js/index.d.ts b/types/office-js/index.d.ts index 1ff4d05df3..eec0893859 100644 --- a/types/office-js/index.d.ts +++ b/types/office-js/index.d.ts @@ -9427,6 +9427,10 @@ declare namespace Office { * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode} * Compose * + * + * Errors + * InvalidFormatError - The format of the specified data object is not valid. + * * * * In addition to this signature, this method also has the following signatures: @@ -9457,6 +9461,10 @@ declare namespace Office { * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode} * Compose * + * + * Errors + * InvalidFormatError - The format of the specified data object is not valid. + * * * * @param locationIdentifiers The locations to be added to the current list of locations. From e58ab2b3b48facaf7b4d5f42591da8030f36df24 Mon Sep 17 00:00:00 2001 From: Elizabeth Samuel Date: Wed, 30 Jan 2019 09:51:46 -0800 Subject: [PATCH 6/7] Fix typos --- types/office-js-preview/index.d.ts | 6 +++--- types/office-js/index.d.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/types/office-js-preview/index.d.ts b/types/office-js-preview/index.d.ts index 0516d08034..a538a0f6c9 100644 --- a/types/office-js-preview/index.d.ts +++ b/types/office-js-preview/index.d.ts @@ -5181,7 +5181,7 @@ declare namespace Office { setTableOptionsAsync(tableOptions: any, callback?: (result: AsyncResult) => void): void; } /** - * Represents the data in a table or a {@link Office.TableBinding}. + * Represents the data in a table or an {@link Office.TableBinding}. * * @remarks * @@ -11108,7 +11108,7 @@ declare namespace Office { * Gets the locations of an appointment. * * The enhancedLocation property returns an {@link Office.EnhancedLocation} object that allows you to get the set of locations (each represented by - * a {@link Office.LocationDetails} object) associated with the appointment. + * an {@link Office.LocationDetails} object) associated with the appointment. * * [Api set: Mailbox Preview] * @@ -13389,7 +13389,7 @@ declare namespace Office { * Provides access to the Cc (carbon copy) recipients of a message. The type of object and level of access depends on the mode of the * current item. * - * The cc property returns a {@link Office.Recipients} object that provides methods to get or update the recipients on the Cc line of + * The cc property returns an {@link Office.Recipients} object that provides methods to get or update the recipients on the Cc line of * the message. * * [Api set: Mailbox 1.0] diff --git a/types/office-js/index.d.ts b/types/office-js/index.d.ts index eec0893859..139707e367 100644 --- a/types/office-js/index.d.ts +++ b/types/office-js/index.d.ts @@ -5181,7 +5181,7 @@ declare namespace Office { setTableOptionsAsync(tableOptions: any, callback?: (result: AsyncResult) => void): void; } /** - * Represents the data in a table or a {@link Office.TableBinding}. + * Represents the data in a table or an {@link Office.TableBinding}. * * @remarks *
HostsExcel, Word
@@ -11108,7 +11108,7 @@ declare namespace Office { * Gets the locations of an appointment. * * The enhancedLocation property returns an {@link Office.EnhancedLocation} object that allows you to get the set of locations (each represented by - * a {@link Office.LocationDetails} object) associated with the appointment. + * an {@link Office.LocationDetails} object) associated with the appointment. * * [Api set: Mailbox Preview] * @@ -13389,7 +13389,7 @@ declare namespace Office { * Provides access to the Cc (carbon copy) recipients of a message. The type of object and level of access depends on the mode of the * current item. * - * The cc property returns a {@link Office.Recipients} object that provides methods to get or update the recipients on the Cc line of + * The cc property returns an {@link Office.Recipients} object that provides methods to get or update the recipients on the Cc line of * the message. * * [Api set: Mailbox 1.0] From f5b254a3d564a4363b8106c4b4ca8f1d2f917036 Mon Sep 17 00:00:00 2001 From: Elizabeth Samuel Date: Wed, 30 Jan 2019 12:56:54 -0800 Subject: [PATCH 7/7] Tweak LocationType description --- types/office-js-preview/index.d.ts | 2 +- types/office-js/index.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/types/office-js-preview/index.d.ts b/types/office-js-preview/index.d.ts index a538a0f6c9..ea3a2d76f4 100644 --- a/types/office-js-preview/index.d.ts +++ b/types/office-js-preview/index.d.ts @@ -7714,7 +7714,7 @@ declare namespace Office { Appointment = "appointment" } /** - * Specifies an appointment's location type. + * Specifies an appointment location's type. * * [Api set: Mailbox Preview] * diff --git a/types/office-js/index.d.ts b/types/office-js/index.d.ts index 139707e367..f2616ffbef 100644 --- a/types/office-js/index.d.ts +++ b/types/office-js/index.d.ts @@ -7714,7 +7714,7 @@ declare namespace Office { Appointment = "appointment" } /** - * Specifies an appointment's location type. + * Specifies an appointment location's type. * * [Api set: Mailbox Preview] *
HostsExcel, Word