@types/office-js-preview 1.0.366 → 1.0.368

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,7 +8,7 @@ This package contains type definitions for Office.js (https://github.com/OfficeD
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/office-js-preview.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Tue, 10 Jan 2023 21:03:12 GMT
11
+ * Last updated: Thu, 19 Jan 2023 19:32:41 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `Excel`, `Office`, `OfficeCore`, `OfficeExtension`, `OneNote`, `PowerPoint`, `Visio`, `Word`
14
14
 
@@ -1002,6 +1002,19 @@ declare namespace Office {
1002
1002
  * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read
1003
1003
  */
1004
1004
  roamingSettings: Office.RoamingSettings;
1005
+ /**
1006
+ * Gets the object to check the status of the catalog of sensitivity labels in Outlook and retrieve all available
1007
+ * sensitivity labels if the catalog is enabled.
1008
+ *
1009
+ * @remarks
1010
+ *
1011
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
1012
+ *
1013
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
1014
+ *
1015
+ * @beta
1016
+ */
1017
+ sensitivityLabelsCatalog: Office.SensitivityLabelsCatalog;
1005
1018
  /**
1006
1019
  * Specifies whether the platform and device allows touch interaction.
1007
1020
  * True if the add-in is running on a touch device, such as an iPad; false otherwise.
@@ -2269,7 +2282,7 @@ declare namespace Office {
2269
2282
  ActiveViewChanged,
2270
2283
  /**
2271
2284
  * Occurs when any date or time of the selected appointment or series is changed in Outlook.
2272
- * **Important**: This event can only be handled in a task pane. It isn't supported in function commands.
2285
+ * **Important**: This event can only be handled in a task pane. It isn't supported by function commands.
2273
2286
  *
2274
2287
  * To add an event handler for the `AppointmentTimeChanged` event, use the `addHandlerAsync` method of the `Item` object.
2275
2288
  * The event handler receives an argument of type
@@ -2279,7 +2292,7 @@ declare namespace Office {
2279
2292
  */
2280
2293
  AppointmentTimeChanged,
2281
2294
  /**
2282
- * Occurs when an attachment is added to or removed from an item. **Important**: This event can only be handled in a task pane. It isn't supported in function commands.
2295
+ * Occurs when an attachment is added to or removed from an item. **Important**: This event can only be handled in a task pane. It isn't supported by function commands.
2283
2296
  *
2284
2297
  * To add an event handler for the `AttachmentsChanged` event, use the `addHandlerAsync` method of the `Item` object.
2285
2298
  * The event handler receives an argument of type
@@ -2328,7 +2341,7 @@ declare namespace Office {
2328
2341
  */
2329
2342
  DocumentSelectionChanged,
2330
2343
  /**
2331
- * Occurs when the appointment location is changed in Outlook. **Important**: This event can only be handled in a task pane. It isn't supported in function commands.
2344
+ * Occurs when the appointment location is changed in Outlook. **Important**: This event can only be handled in a task pane. It isn't supported by function commands.
2332
2345
  *
2333
2346
  * To add an event handler for the `EnhancedLocationsChanged` event, use the `addHandlerAsync` method of the `Item` object.
2334
2347
  * The event handler receives an argument of type
@@ -2342,7 +2355,7 @@ declare namespace Office {
2342
2355
  * {@link https://learn.microsoft.com/javascript/api/outlook/office.notificationmessagedetails#actions | custom action}.
2343
2356
  * Currently, "Dismiss" is the only supported action that fires this event.
2344
2357
  *
2345
- * **Important**: This event can only be handled in a task pane. It isn't supported in function commands.
2358
+ * **Important**: This event can only be handled in a task pane. It isn't supported by function commands.
2346
2359
  *
2347
2360
  * To add an event handler for the `InfobarClicked` event, use the `addHandlerAsync` method of the `Item` object.
2348
2361
  * The event handler receives an argument of type
@@ -2353,7 +2366,7 @@ declare namespace Office {
2353
2366
  InfobarClicked,
2354
2367
  /**
2355
2368
  * Occurs when a different Outlook item is selected for viewing while the task pane is pinned.
2356
- * **Important**: This event can only be handled in a task pane. It isn't supported in function commands.
2369
+ * **Important**: This event can only be handled in a task pane. It isn't supported by function commands.
2357
2370
  *
2358
2371
  * To add an event handler for the `ItemChanged` event, use the `addHandlerAsync` method of the `Mailbox` object.
2359
2372
  *
@@ -2373,7 +2386,7 @@ declare namespace Office {
2373
2386
  */
2374
2387
  NodeReplaced,
2375
2388
  /**
2376
- * Occurs when the OfficeTheme is changed in Outlook. **Important**: This event can only be handled in a task pane. It isn't supported in function commands.
2389
+ * Occurs when the OfficeTheme is changed in Outlook. **Important**: This event can only be handled in a task pane. It isn't supported by function commands.
2377
2390
  *
2378
2391
  * To add an event handler for the `OfficeThemeChanged` event, use the `addHandlerAsync` method of the `Mailbox` object.
2379
2392
  * The event handler receives an argument of type
@@ -2386,7 +2399,7 @@ declare namespace Office {
2386
2399
  OfficeThemeChanged,
2387
2400
  /**
2388
2401
  * Occurs when the recipient list of the selected item or the appointment location is changed in Outlook.
2389
- * **Important**: This event can only be handled in a task pane. It isn't supported in function commands.
2402
+ * **Important**: This event can only be handled in a task pane. It isn't supported by function commands.
2390
2403
  *
2391
2404
  * To add an event handler for the `RecipientsChanged` event, use the `addHandlerAsync` method of the `Item` object.
2392
2405
  * The event handler receives an argument of type
@@ -2397,7 +2410,7 @@ declare namespace Office {
2397
2410
  RecipientsChanged,
2398
2411
  /**
2399
2412
  * Occurs when the recurrence pattern of the selected series is changed in Outlook.
2400
- * **Important**: This event can only be handled in a task pane. It isn't supported in function commands.
2413
+ * **Important**: This event can only be handled in a task pane. It isn't supported by function commands.
2401
2414
  *
2402
2415
  * To add an event handler for the `RecurrenceChanged` event, use the `addHandlerAsync` method of the `Item` object.
2403
2416
  * The event handler receives an argument of type
@@ -2412,13 +2425,26 @@ declare namespace Office {
2412
2425
  ResourceSelectionChanged,
2413
2426
  /**
2414
2427
  * Occurs in Outlook when one or more messages are selected or deselected.
2415
- * **Important**: This event can only be handled in a task pane. It isn't supported in function commands.
2428
+ * **Important**: This event can only be handled in a task pane. It isn't supported by function commands.
2416
2429
  *
2417
2430
  * To add an event handler for the `SelectedItemsChanged` event, use the `addHandlerAsync` method of the `Mailbox` object.
2418
2431
  *
2419
2432
  * [Api set: Mailbox preview]
2420
2433
  */
2421
2434
  SelectedItemsChanged,
2435
+ /**
2436
+ * Occurs in Outlook when the sensitivity label of a message or appointment changes.
2437
+ * **Important**: This event can only be handled in a task pane. It isn't supported by function commands.
2438
+ *
2439
+ * To add an event handler for the `SensitivityLabelChanged` event, use the `addHandlerAsync` method of the `Item` object.
2440
+ * The event handler receives an argument of type
2441
+ * {@link https://learn.microsoft.com/javascript/api/outlook/office.sensitivitylabelchangedeventargs?view=outlook-js-preview | Office.SensitivityLabelChangedEventArgs}.
2442
+ *
2443
+ * [Api set: Mailbox preview]
2444
+ *
2445
+ * @beta
2446
+ */
2447
+ SensitivityLabelChanged,
2422
2448
  /**
2423
2449
  * A Settings.settingsChanged event was raised.
2424
2450
  *
@@ -8380,9 +8406,9 @@ declare namespace Office {
8380
8406
  ShowTaskPane = "showTaskPane"
8381
8407
  }
8382
8408
  /**
8383
- * Specifies the sensitivity type of an appointment.
8409
+ * Specifies the {@link Office.Sensitivity | sensitivity level} of an appointment.
8384
8410
  *
8385
- * @remarks
8411
+ * @remarks
8386
8412
  * [Api set: Mailbox preview]
8387
8413
  *
8388
8414
  * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read
@@ -9869,7 +9895,9 @@ declare namespace Office {
9869
9895
  */
9870
9896
  requiredAttendees: Recipients;
9871
9897
  /**
9872
- * Gets or sets the {@link Office.Sensitivity | sensitivity} of an appointment.
9898
+ * Gets or sets the {@link Office.Sensitivity | sensitivity level} of an appointment.
9899
+ * For information about sensitivity levels, see
9900
+ * {@link https://support.microsoft.com/office/4a76d05b-6c29-4a0d-9096-71784a6b12c1 | Mark your email as Normal, Personal, Private, or Confidential}.
9873
9901
  *
9874
9902
  * @remarks
9875
9903
  * [Api set: Mailbox preview]
@@ -9881,6 +9909,19 @@ declare namespace Office {
9881
9909
  * @beta
9882
9910
  */
9883
9911
  sensitivity: Sensitivity;
9912
+ /**
9913
+ * Gets the object to get or set the {@link Office.SensitivityLabel | sensitivity label} of an appointment.
9914
+ *
9915
+ * @remarks
9916
+ * [Api set: Mailbox preview]
9917
+ *
9918
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
9919
+ *
9920
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer
9921
+ *
9922
+ * @beta
9923
+ */
9924
+ sensitivityLabel: SensitivityLabel;
9884
9925
  /**
9885
9926
  * Gets the ID of the series that an instance belongs to.
9886
9927
  *
@@ -12370,6 +12411,89 @@ declare namespace Office {
12370
12411
  * of type `Office.AsyncResult`. Any errors encountered will be provided in the `asyncResult.error` property.
12371
12412
  */
12372
12413
  prependAsync(data: string, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
12414
+ /**
12415
+ * Prepends HTML or plain text to the beginning of a message or appointment body when the mail item is sent.
12416
+ *
12417
+ * To use `prependOnSendAsync`, you must specify a supplementary permission in the manifest. Details vary with the type of manifest. For guidance,
12418
+ * see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Understanding Outlook add-in permissions}.
12419
+ *
12420
+ * @remarks
12421
+ * [Api set: Mailbox preview]
12422
+ *
12423
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
12424
+ *
12425
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
12426
+ *
12427
+ * **Recommended**: Call `getTypeAsync`, then pass its returned value to the `options.coercionType` parameter.
12428
+ *
12429
+ * **Important**: When implementing `prependOnSendAsync`, keep the following in mind.
12430
+ *
12431
+ * - In a {@link https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough | Smart Alerts add-in},
12432
+ * the prepend-on-send feature runs first.
12433
+ *
12434
+ * - A new line is added after the prepended content.
12435
+ *
12436
+ * - If multiple active add-ins call `prependOnSendAsync`, the order of the inserted content depends on the order in which the add-in runs.
12437
+ * The content of the last run add-in appears above previously prepended content.
12438
+ *
12439
+ * - If the add-in attempts to insert HTML into a plain text body, the content won't be prepended. Conversely, plain text will be inserted into an HTML body.
12440
+ *
12441
+ * **Errors**:
12442
+ *
12443
+ * - `DataExceedsMaximumSize`: The `data` parameter exceeds 5,000 characters.
12444
+ *
12445
+ * - `InvalidFormatError`: The `options.coercionType` parameter is set to `Office.CoercionType.Html`, but the item body is in plain text format.
12446
+ *
12447
+ * @param data - The string to be prepended to the beginning of the message or appointment body. The string is limited to 5,000 characters.
12448
+ * @param options - An object literal that contains one or more of the following properties:-
12449
+ * `asyncContext`: Any object that can be accessed in the callback function.
12450
+ * `coercionType`: The desired format for the body. The string in the `data` parameter is converted to this format.
12451
+ * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter
12452
+ * of type `Office.AsyncResult`. Any errors encountered will be provided in the `asyncResult.error` property.
12453
+ *
12454
+ * @beta
12455
+ */
12456
+ prependOnSendAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
12457
+ /**
12458
+ * Prepends HTML or plain text to the beginning of a message or appointment body when the mail item is sent.
12459
+ *
12460
+ * To use `prependOnSendAsync`, you must specify a supplementary permission in the manifest. Details vary with the type of manifest. For guidance,
12461
+ * see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Understanding Outlook add-in permissions}.
12462
+ *
12463
+ * @remarks
12464
+ * [Api set: Mailbox preview]
12465
+ *
12466
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
12467
+ *
12468
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
12469
+ *
12470
+ * **Recommended**: Call `getTypeAsync`, then pass its returned value to the `options.coercionType` parameter.
12471
+ *
12472
+ * **Important**: When implementing `prependOnSendAsync`, keep the following in mind.
12473
+ *
12474
+ * - In a {@link https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough | Smart Alerts add-in},
12475
+ * the prepend-on-send feature runs first.
12476
+ *
12477
+ * - A new line is added after the prepended content.
12478
+ *
12479
+ * - If multiple active add-ins call `prependOnSendAsync`, the order of the inserted content depends on the order in which the add-in runs.
12480
+ * The content of the last run add-in appears above previously prepended content.
12481
+ *
12482
+ * - If the add-in attempts to insert HTML into a plain text body, the content won't be prepended. Conversely, plain text will be inserted into an HTML body.
12483
+ *
12484
+ * **Errors**:
12485
+ *
12486
+ * - `DataExceedsMaximumSize`: The `data` parameter exceeds 5,000 characters.
12487
+ *
12488
+ * - `InvalidFormatError`: The `options.coercionType` parameter is set to `Office.CoercionType.Html`, but the item body is in plain text format.
12489
+ *
12490
+ * @param data - The string to be prepended to the beginning of the message or appointment body. The string is limited to 5,000 characters.
12491
+ * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter
12492
+ * of type `Office.AsyncResult`. Any errors encountered will be provided in the `asyncResult.error` property.
12493
+ *
12494
+ * @beta
12495
+ */
12496
+ prependOnSendAsync(data: string, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
12373
12497
  /**
12374
12498
  * Replaces the entire body with the specified text.
12375
12499
  *
@@ -15110,6 +15234,19 @@ declare namespace Office {
15110
15234
  * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose
15111
15235
  */
15112
15236
  notificationMessages: NotificationMessages;
15237
+ /**
15238
+ * Gets the object to get or set the {@link Office.SensitivityLabel | sensitivity label} of a message.
15239
+ *
15240
+ * @remarks
15241
+ * [Api set: Mailbox preview]
15242
+ *
15243
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
15244
+ *
15245
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose
15246
+ *
15247
+ * @beta
15248
+ */
15249
+ sensitivityLabel: SensitivityLabel;
15113
15250
  /**
15114
15251
  * Gets the ID of the series that an instance belongs to.
15115
15252
  *
@@ -18333,7 +18470,8 @@ declare namespace Office {
18333
18470
  set(name: string, value: any): void;
18334
18471
  }
18335
18472
  /**
18336
- * Provides methods to get and set the appointment sensitivity of a meeting in an Outlook add-in.
18473
+ * Provides methods to get and set the sensitivity level of an appointment. To learn more about sensitivity levels, see
18474
+ * {@link https://support.microsoft.com/office/4a76d05b-6c29-4a0d-9096-71784a6b12c1 | Mark your email as Normal, Personal, Private, or Confidential}.
18337
18475
  *
18338
18476
  * @remarks
18339
18477
  * [Api set: Mailbox preview]
@@ -18346,7 +18484,7 @@ declare namespace Office {
18346
18484
  */
18347
18485
  interface Sensitivity {
18348
18486
  /**
18349
- * Gets the value of the appointment sensitivity.
18487
+ * Gets the sensitivity level of an appointment.
18350
18488
  *
18351
18489
  * @remarks
18352
18490
  * [Api set: Mailbox preview]
@@ -18357,17 +18495,17 @@ declare namespace Office {
18357
18495
  *
18358
18496
  * @param options - An object literal that contains one or more of the following properties:-
18359
18497
  * `asyncContext`: Developers can provide any object they wish to access in the callback function.
18360
- * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of
18361
- * type `Office.AsyncResult`.
18498
+ * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`,
18499
+ * which is an `Office.AsyncResult` object. The sensitivity level of the appointment is returned in the `asyncResult.value` property.
18362
18500
  *
18363
18501
  * @beta
18364
18502
  */
18365
18503
  getAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult<MailboxEnums.AppointmentSensitivityType>) => void): void;
18366
18504
  /**
18367
- * Gets the value of the appointment sensitivity.
18505
+ * Gets the sensitivity level of an appointment.
18368
18506
  *
18369
- * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of
18370
- * type `Office.AsyncResult`.
18507
+ * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`,
18508
+ * which is an `Office.AsyncResult` object. The sensitivity level of the appointment is returned in the `asyncResult.value` property.
18371
18509
  *
18372
18510
  * @remarks
18373
18511
  * [Api set: Mailbox preview]
@@ -18380,7 +18518,7 @@ declare namespace Office {
18380
18518
  */
18381
18519
  getAsync(callback: (asyncResult: Office.AsyncResult<MailboxEnums.AppointmentSensitivityType>) => void): void;
18382
18520
  /**
18383
- * Sets the value of the appointment sensitivity.
18521
+ * Sets the sensitivity level of an appointment.
18384
18522
  *
18385
18523
  * @remarks
18386
18524
  * [Api set: Mailbox preview]
@@ -18389,7 +18527,7 @@ declare namespace Office {
18389
18527
  *
18390
18528
  * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
18391
18529
  *
18392
- * @param sensitivity - The sensitivity value as enum or string.
18530
+ * @param sensitivity - The sensitivity level as an enum or string.
18393
18531
  * @param options - An object literal that contains one or more of the following properties:-
18394
18532
  * `asyncContext`: Developers can provide any object they wish to access in the callback function.
18395
18533
  * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter,
@@ -18399,7 +18537,7 @@ declare namespace Office {
18399
18537
  */
18400
18538
  setAsync(sensitivity: MailboxEnums.AppointmentSensitivityType | string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
18401
18539
  /**
18402
- * Sets the value of the appointment sensitivity.
18540
+ * Sets the sensitivity level of an appointment.
18403
18541
  *
18404
18542
  * @remarks
18405
18543
  * [Api set: Mailbox preview]
@@ -18408,7 +18546,7 @@ declare namespace Office {
18408
18546
  *
18409
18547
  * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
18410
18548
  *
18411
- * @param sensitivity - The sensitivity value as enum or string.
18549
+ * @param sensitivity - The sensitivity level as an enum or string.
18412
18550
  * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter,
18413
18551
  * `asyncResult`, which is an `Office.AsyncResult` object.
18414
18552
  *
@@ -18416,6 +18554,259 @@ declare namespace Office {
18416
18554
  */
18417
18555
  setAsync(sensitivity: MailboxEnums.AppointmentSensitivityType | string, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
18418
18556
  }
18557
+ /**
18558
+ * Provides methods to get or set the sensitivity label of a message or appointment. For more information on sensitivity labels, see
18559
+ * {@link https://learn.microsoft.com/microsoft-365/compliance/sensitivity-labels | Learn about sensitivity labels}.
18560
+ *
18561
+ * @remarks
18562
+ * [Api set: Mailbox preview]
18563
+ *
18564
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
18565
+ *
18566
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
18567
+ *
18568
+ * @beta
18569
+ */
18570
+ interface SensitivityLabel {
18571
+ /**
18572
+ * Gets the unique identifier (GUID) of the sensitivity label applied to a message or appointment being composed.
18573
+ *
18574
+ * @remarks
18575
+ * [Api set: Mailbox preview]
18576
+ *
18577
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
18578
+ *
18579
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
18580
+ *
18581
+ * @param options - An object literal that contains one or more of the following properties:-
18582
+ * `asyncContext`: Developers can provide any object they wish to access in the callback function.
18583
+ * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`,
18584
+ * which is an `Office.AsyncResult` object. The sensitivity label's GUID is returned in the
18585
+ * `asyncResult.value` property.
18586
+ *
18587
+ * @beta
18588
+ */
18589
+ getAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult<string>) => void): void;
18590
+ /**
18591
+ * Gets the unique identifier (GUID) of the sensitivity label applied to a message or appointment being composed.
18592
+ *
18593
+ * @remarks
18594
+ * [Api set: Mailbox preview]
18595
+ *
18596
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
18597
+ *
18598
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
18599
+ *
18600
+ * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`,
18601
+ * which is an `Office.AsyncResult` object. The sensitivity label's GUID is returned in the
18602
+ * `asyncResult.value` property.
18603
+ *
18604
+ * @beta
18605
+ */
18606
+ getAsync(callback: (asyncResult: Office.AsyncResult<string>) => void): void;
18607
+ /**
18608
+ * Applies the specified sensitivity label to the message or appointment being composed.
18609
+ *
18610
+ * @remarks
18611
+ * [Api set: Mailbox preview]
18612
+ *
18613
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
18614
+ *
18615
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
18616
+ *
18617
+ * **Tip**: To determine the sensitivity labels available for use, call the `Office.context.sensitivityLabelsCatalog.getAsync` method.
18618
+ *
18619
+ * @param sensitivityLabel - The sensitivity label to be applied to the message or appointment being composed. The parameter value can be a sensitivity label's
18620
+ * unique identifier (GUID) or a {@link Office.SensitivityLabelDetails | SensitivityLabelDetails} object.
18621
+ * @param options - An object literal that contains one or more of the following properties:-
18622
+ * `asyncContext`: Developers can provide any object they wish to access in the callback function.
18623
+ * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`,
18624
+ * which is an `Office.AsyncResult` object.
18625
+ *
18626
+ * @beta
18627
+ */
18628
+ setAsync(sensitivityLabel: string | SensitivityLabelDetails, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
18629
+ /**
18630
+ * Applies the specified sensitivity label to the message or appointment being composed.
18631
+ *
18632
+ * @remarks
18633
+ * [Api set: Mailbox preview]
18634
+ *
18635
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
18636
+ *
18637
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
18638
+ *
18639
+ * **Tip**: To determine the sensitivity labels available for use, call the `Office.context.sensitivityLabelsCatalog.getAsync` method.
18640
+ *
18641
+ * @param sensitivityLabel - The sensitivity label to be applied to the message or appointment being composed. The parameter value can be a sensitivity label's
18642
+ * unique identifier (GUID) or a {@link Office.SensitivityLabelDetails | SensitivityLabelDetails} object.
18643
+ * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`,
18644
+ * which is an `Office.AsyncResult` object.
18645
+ *
18646
+ * @beta
18647
+ */
18648
+ setAsync(sensitivityLabel: string | SensitivityLabelDetails, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
18649
+ }
18650
+ /**
18651
+ * Provides methods to check the status of the catalog of {@link https://learn.microsoft.com/microsoft-365/compliance/sensitivity-labels | sensitivity labels}
18652
+ * in Outlook and retrieve all available sensitivity labels if the catalog is enabled.
18653
+ *
18654
+ * @remarks
18655
+ * [Api set: Mailbox preview]
18656
+ *
18657
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
18658
+ *
18659
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
18660
+ *
18661
+ * @beta
18662
+ */
18663
+ export interface SensitivityLabelsCatalog {
18664
+ /**
18665
+ * Gets all the sensitivity labels that are enabled in Outlook.
18666
+ *
18667
+ * @remarks
18668
+ * [Api set: Mailbox preview]
18669
+ *
18670
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
18671
+ *
18672
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
18673
+ *
18674
+ * **Recommended**: To determine whether the catalog of sensitivity labels is enabled in Outlook, call `getIsEnabledAsync` before using `getAsync`.
18675
+ *
18676
+ * @param options - An object literal that contains one or more of the following properties:-
18677
+ * `asyncContext`: Developers can provide any object they wish to access in the callback function.
18678
+ * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`,
18679
+ * which is an `Office.AsyncResult` object. The available sensitivity labels and their properties are returned in the
18680
+ * `asyncResult.value` property.
18681
+ *
18682
+ * @beta
18683
+ */
18684
+ getAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult<SensitivityLabelDetails[]>) => void): void;
18685
+ /**
18686
+ * Gets all the sensitivity labels that are enabled in Outlook.
18687
+ *
18688
+ * @remarks
18689
+ * [Api set: Mailbox preview]
18690
+ *
18691
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
18692
+ *
18693
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
18694
+ *
18695
+ * **Recommended**: To determine whether the catalog of sensitivity labels is enabled in Outlook, call `getIsEnabledAsync` before using `getAsync`.
18696
+ *
18697
+ * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`,
18698
+ * which is an `Office.AsyncResult` object. The available sensitivity labels and their properties are returned in the
18699
+ * `asyncResult.value` property.
18700
+ *
18701
+ * @beta
18702
+ */
18703
+ getAsync(callback: (asyncResult: Office.AsyncResult<SensitivityLabelDetails[]>) => void): void;
18704
+ /**
18705
+ * Checks whether the catalog of sensitivity labels is enabled in Outlook.
18706
+ *
18707
+ * @remarks
18708
+ * [Api set: Mailbox preview]
18709
+ *
18710
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
18711
+ *
18712
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
18713
+ *
18714
+ * **Important**: The catalog of sensitivity labels is configured by an organization's administrator. For more information, see
18715
+ * {@link https://learn.microsoft.com/microsoft-365/compliance/get-started-with-sensitivity-labels | Get started with sensitivity labels}.
18716
+ *
18717
+ * @param options - An object literal that contains one or more of the following properties:-
18718
+ * `asyncContext`: Developers can provide any object they wish to access in the callback function.
18719
+ * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`,
18720
+ * which is an `Office.AsyncResult` object. The status of the catalog of sensitivity labels is returned in the `asyncResult.value` property.
18721
+ *
18722
+ * @beta
18723
+ */
18724
+ getIsEnabledAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult<boolean>) => void): void;
18725
+ /**
18726
+ * Checks whether the catalog of sensitivity labels is enabled in Outlook.
18727
+ *
18728
+ * @remarks
18729
+ * [Api set: Mailbox preview]
18730
+ *
18731
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
18732
+ *
18733
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
18734
+ *
18735
+ * **Important**: The catalog of sensitivity labels is configured by an organization's administrator. For more information, see
18736
+ * {@link https://learn.microsoft.com/microsoft-365/compliance/get-started-with-sensitivity-labels | Get started with sensitivity labels}.
18737
+ *
18738
+ * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`,
18739
+ * which is an `Office.AsyncResult` object. The status of the catalog of sensitivity labels is returned in the `asyncResult.value` property.
18740
+ *
18741
+ * @beta
18742
+ */
18743
+ getIsEnabledAsync(callback: (asyncResult: Office.AsyncResult<boolean>) => void): void;
18744
+ }
18745
+ /**
18746
+ * Provides the change status of the sensitivity label applied to a message or appointment in compose mode. This information is provided when the
18747
+ * `Office.EventType.SensitivityLabelChanged` event is raised.
18748
+ *
18749
+ * @remarks
18750
+ * [Api set: Mailbox preview]
18751
+ *
18752
+ * @beta
18753
+ */
18754
+ export interface SensitivityLabelChangedEventArgs {
18755
+ /**
18756
+ * The type of event that was raised. For details, refer to {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType}.
18757
+ *
18758
+ * @remarks
18759
+ * [Api set: Mailbox preview]
18760
+ *
18761
+ * @beta
18762
+ */
18763
+ type: "olkSensitivityLabelChanged";
18764
+ }
18765
+ /**
18766
+ * Represents the properties of available sensitivity labels in Outlook.
18767
+ *
18768
+ * @remarks
18769
+ * [Api set: Mailbox preview]
18770
+ *
18771
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item**
18772
+ *
18773
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
18774
+ *
18775
+ * @beta
18776
+ */
18777
+ interface SensitivityLabelDetails {
18778
+ /**
18779
+ * The color of the sensitivity label.
18780
+ *
18781
+ * @beta
18782
+ */
18783
+ color: string;
18784
+ /**
18785
+ * The {@link https://learn.microsoft.com/microsoft-365/compliance/sensitivity-labels#sublabels-grouping-labels | sublabels} of the sensitivity label.
18786
+ * Returns `null` if a label doesn't have any sublabels.
18787
+ *
18788
+ * @beta
18789
+ */
18790
+ children: SensitivityLabelDetails[];
18791
+ /**
18792
+ * The unique identifier (GUID) of the sensitivity label.
18793
+ *
18794
+ * @beta
18795
+ */
18796
+ id: string;
18797
+ /**
18798
+ * The name of the sensitivity label.
18799
+ *
18800
+ * @beta
18801
+ */
18802
+ name: string;
18803
+ /**
18804
+ * The description of the sensitivity label.
18805
+ *
18806
+ * @beta
18807
+ */
18808
+ tooltip: string;
18809
+ }
18419
18810
  /**
18420
18811
  * The `SeriesTime` object provides methods to get and set the dates and times of appointments in a recurring series and get the dates and times
18421
18812
  * of meeting requests in a recurring series.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/office-js-preview",
3
- "version": "1.0.366",
3
+ "version": "1.0.368",
4
4
  "description": "TypeScript definitions for Office.js",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/office-js-preview",
6
6
  "license": "MIT",
@@ -45,6 +45,6 @@
45
45
  },
46
46
  "scripts": {},
47
47
  "dependencies": {},
48
- "typesPublisherContentHash": "8e1d4c4a5ae3561f6b6d31931d05d3c61dff4d27ee7aacf346fb9af396e2fe43",
48
+ "typesPublisherContentHash": "2a6164b196b7e896b0a2a00b9fabee7af4ef32d0a064d74a9d8e472fd747cfda",
49
49
  "typeScriptVersion": "4.2"
50
50
  }