Skip to content

Commit 0259f62

Browse files
[office-js][office-js-preview] (Outlook) Improve location API documentation (DefinitelyTyped#73807)
1 parent e8c0c6c commit 0259f62

File tree

2 files changed

+104
-16
lines changed

2 files changed

+104
-16
lines changed

types/office-js-preview/index.d.ts

Lines changed: 52 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10467,6 +10467,10 @@ declare namespace Office {
1046710467
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item**
1046810468
*
1046910469
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer
10470+
*
10471+
* **Important**: To manage the locations of an appointment in Outlook clients that don't support Mailbox requirement set 1.8, use the `location` property instead.
10472+
* For guidance on selecting the right location API for your scenario, see
10473+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/get-or-set-the-location-of-an-appointment | Get or set the location when composing an appointmnt in Outlook}.
1047010474
*/
1047110475
enhancedLocation: EnhancedLocation;
1047210476
/**
@@ -10500,9 +10504,15 @@ declare namespace Office {
1050010504
*
1050110505
* @remarks
1050210506
*
10507+
* [Api set: Mailbox 1.1]
10508+
*
1050310509
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item**
1050410510
*
1050510511
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer
10512+
*
10513+
* **Important**: The `enhancedLocation` property was introduced in Mailbox requirement set 1.8. Use the `enhancedLocation` property to better identify and manage
10514+
* appointment locations, especially if you need to determine the location type. For guidance on selecting the right location API for your scenario, see
10515+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/get-or-set-the-location-of-an-appointment | Get or set the location when composing an appointmnt in Outlook}.
1050610516
*/
1050710517
location: Location;
1050810518
/**
@@ -12001,6 +12011,10 @@ declare namespace Office {
1200112011
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item**
1200212012
*
1200312013
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee
12014+
*
12015+
* **Important**: To manage the locations of an appointment in Outlook clients that don't support Mailbox requirement set 1.8, use the `location` property instead.
12016+
* For guidance on selecting the right location API for your scenario, see
12017+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/get-or-set-the-location-of-an-appointment | Get or set the location when composing an appointmnt in Outlook}.
1200412018
*/
1200512019
enhancedLocation: EnhancedLocation;
1200612020
/**
@@ -12069,9 +12083,15 @@ declare namespace Office {
1206912083
*
1207012084
* @remarks
1207112085
*
12086+
* [Api set: Mailbox 1.1]
12087+
*
1207212088
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item**
1207312089
*
1207412090
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee
12091+
*
12092+
* **Important**: The `enhancedLocation` property was introduced in Mailbox requirement set 1.8. Use the `enhancedLocation` property to better identify and manage
12093+
* appointment locations, especially if you need to determine the location type. For guidance on selecting the right location API for your scenario, see
12094+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/get-or-set-the-location-of-an-appointment | Get or set the location when composing an appointmnt in Outlook}.
1207512095
*/
1207612096
location: string;
1207712097
/**
@@ -14832,6 +14852,10 @@ declare namespace Office {
1483214852
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item**
1483314853
*
1483414854
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read
14855+
*
14856+
* **Important**: To manage the locations of an appointment in Outlook clients that don't support Mailbox requirement set 1.8, use the Office.Location API instead.
14857+
* For guidance on selecting the right location API for your scenario, see
14858+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/get-or-set-the-location-of-an-appointment | Get or set the location when composing an appointmnt in Outlook}.
1483514859
*/
1483614860
export interface EnhancedLocation {
1483714861
/**
@@ -14876,9 +14900,6 @@ declare namespace Office {
1487614900
addAsync(locationIdentifiers: LocationIdentifier[], callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
1487714901
/**
1487814902
* Gets the set of locations associated with the appointment.
14879-
*
14880-
* **Note**: {@link https://support.microsoft.com/office/88ff6c60-0a1d-4b54-8c9d-9e1a71bc3023 | Personal contact groups}
14881-
* added as appointment locations aren't returned by this method.
1488214903
*
1488314904
* @remarks
1488414905
* [Api set: Mailbox 1.8]
@@ -14887,27 +14908,40 @@ declare namespace Office {
1488714908
*
1488814909
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read
1488914910
*
14911+
* **Important**:
14912+
*
14913+
* - The `getAsync` method doesn't return {@link https://support.microsoft.com/office/88ff6c60-0a1d-4b54-8c9d-9e1a71bc3023 | personal contact groups} that
14914+
* were added to the **Location** field of an appointment.
14915+
*
14916+
* - If a location was added using `Office.context.mailbox.item.location.setAsync`, its location type is `Office.MailboxEnums.LocationType.Custom`.
14917+
*
1489014918
* @param options An object literal that contains one or more of the following properties:-
1489114919
* `asyncContext`: Developers can provide any object they wish to access in the callback function.
1489214920
* @param callback Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter,
14893-
* `asyncResult`, which is an `Office.AsyncResult` object.
14921+
* `asyncResult`, which is an `Office.AsyncResult` object. An array of `Office.LocationDetails` objects representing the locations of the
14922+
* appointment is returned in the `asyncResult.value` property.
1489414923
*/
1489514924
getAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult<LocationDetails[]>) => void): void;
1489614925
/**
1489714926
* Gets the set of locations associated with the appointment.
1489814927
*
14899-
* **Note**: {@link https://support.microsoft.com/office/88ff6c60-0a1d-4b54-8c9d-9e1a71bc3023 | Personal contact groups}
14900-
* added as appointment locations aren't returned by this method.
14901-
*
1490214928
* @remarks
1490314929
* [Api set: Mailbox 1.8]
1490414930
*
1490514931
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item**
1490614932
*
1490714933
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read
1490814934
*
14935+
* **Important**:
14936+
*
14937+
* - The `getAsync` method doesn't return {@link https://support.microsoft.com/office/88ff6c60-0a1d-4b54-8c9d-9e1a71bc3023 | personal contact groups} that
14938+
* were added to the **Location** field of an appointment.
14939+
*
14940+
* - If a location was added using `Office.context.mailbox.item.location.setAsync`, its location type is `Office.MailboxEnums.LocationType.Custom`.
14941+
*
1490914942
* @param callback Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter,
14910-
* `asyncResult`, which is an `Office.AsyncResult` object.
14943+
* `asyncResult`, which is an `Office.AsyncResult` object. An array of `Office.LocationDetails` objects representing the locations of the
14944+
* appointment is returned in the `asyncResult.value` property.
1491114945
*/
1491214946
getAsync(callback?: (asyncResult: Office.AsyncResult<LocationDetails[]>) => void): void;
1491314947
/**
@@ -17380,6 +17414,10 @@ declare namespace Office {
1738017414
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item**
1738117415
*
1738217416
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
17417+
*
17418+
* **Important**: The Office.EnhancedLocation API was introduced in Mailbox requirement set 1.8. Use the EnhancedLocation API to better identify and manage
17419+
* appointment locations, especially if you need to determine the location type. For guidance on selecting the right location API for your scenario, see
17420+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/get-or-set-the-location-of-an-appointment | Get or set the location when composing an appointmnt in Outlook}.
1738317421
*/
1738417422
interface Location {
1738517423
/**
@@ -17431,6 +17469,9 @@ declare namespace Office {
1743117469
*
1743217470
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
1743317471
*
17472+
* **Important**: To ensure that multiple locations resolve correctly in Outlook, separate them with a semicolon and a space. For example,
17473+
* "Conference Room 1; Conference Room 2".
17474+
*
1743417475
* **Errors**:
1743517476
*
1743617477
* - DataExceedsMaximumSize: The location parameter is longer than 255 characters.
@@ -17455,6 +17496,9 @@ declare namespace Office {
1745517496
*
1745617497
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
1745717498
*
17499+
* **Important**: To ensure that multiple locations resolve correctly in Outlook, separate them with a semicolon and a space. For example,
17500+
* "Conference Room 1; Conference Room 2".
17501+
*
1745817502
* **Errors**:
1745917503
*
1746017504
* - DataExceedsMaximumSize: The location parameter is longer than 255 characters.

0 commit comments

Comments
 (0)