@types/office-js 1.0.444 → 1.0.446

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.
office-js/README.md CHANGED
@@ -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.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Tue, 12 Nov 2024 20:02:48 GMT
11
+ * Last updated: Mon, 18 Nov 2024 16:02:32 GMT
12
12
  * Dependencies: none
13
13
 
14
14
  # Credits
office-js/index.d.ts CHANGED
@@ -13030,7 +13030,7 @@ declare namespace Office {
13030
13030
  * - When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\<a\>) to "LPNoLP"
13031
13031
  * (see the **Examples** section for a sample).
13032
13032
  *
13033
- * - In Outlook on Windows and on Mac, the add-in user isn't able to revert this action with the **Undo** command.
13033
+ * - In Outlook on Windows (classic) and on Mac, the add-in user isn't able to revert this action with the **Undo** command.
13034
13034
  *
13035
13035
  * - In Outlook on Android and on iOS, this method isn't supported in the Message Compose mode. Only the Appointment Organizer mode is
13036
13036
  * supported. For more information on supported APIs in Outlook mobile, see
@@ -13081,7 +13081,7 @@ declare namespace Office {
13081
13081
  * - When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\<a\>) to "LPNoLP"
13082
13082
  * (see the **Examples** section for a sample).
13083
13083
  *
13084
- * - In Outlook on Windows and on Mac, the add-in user isn't able to revert this action with the **Undo** command.
13084
+ * - In Outlook on Windows (classic) and on Mac, the add-in user isn't able to revert this action with the **Undo** command.
13085
13085
  *
13086
13086
  * - In Outlook on Android and on iOS, this method isn't supported in the Message Compose mode. Only the Appointment Organizer mode is
13087
13087
  * supported. For more information on supported APIs in Outlook mobile, see
@@ -16084,15 +16084,15 @@ declare namespace Office {
16084
16084
  /**
16085
16085
  * Gets an object that provides methods for managing the item's categories.
16086
16086
  *
16087
- * **Important**: In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows},
16088
- * you can't use the API to manage categories on a message in Compose mode.
16089
- *
16090
16087
  * @remarks
16091
16088
  * [Api set: Mailbox 1.8]
16092
16089
  *
16093
16090
  * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item**
16094
16091
  *
16095
16092
  * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose
16093
+ *
16094
+ * **Important**: In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows},
16095
+ * you can't use the API to manage categories on a message in Compose mode.
16096
16096
  */
16097
16097
  categories: Categories;
16098
16098
  /**
@@ -16240,20 +16240,20 @@ declare namespace Office {
16240
16240
  * the `seriesId` returns the Exchange Web Services (EWS) ID of the parent (series) item that this item belongs to.
16241
16241
  * However, in Outlook on Android and on iOS, the seriesId returns the REST ID of the parent item.
16242
16242
  *
16243
- * **Note**: The identifier returned by the `seriesId` property is the same as the Exchange Web Services item identifier.
16244
- * The `seriesId` property is not identical to the Outlook IDs used by the Outlook REST API.
16245
- * Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`.
16246
- * For more details, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-rest-api | Use the Outlook REST APIs from an Outlook add-in}.
16247
- *
16248
- * The `seriesId` property returns `null` for items that do not have parent items such as single appointments, series items, or meeting requests
16249
- * and returns `undefined` for any other items that are not meeting requests.
16250
- *
16251
16243
  * @remarks
16252
16244
  * [Api set: Mailbox 1.7]
16253
16245
  *
16254
16246
  * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item**
16255
16247
  *
16256
16248
  * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose
16249
+ *
16250
+ * **Important**: The identifier returned by the `seriesId` property is the same as the Exchange Web Services item identifier.
16251
+ * The `seriesId` property is not identical to the Outlook IDs used by the Outlook REST API.
16252
+ * Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`.
16253
+ * For more details, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-rest-api | Use the Outlook REST APIs from an Outlook add-in}.
16254
+ *
16255
+ * The `seriesId` property returns `null` for items that don't have parent items such as single appointments, series items, or meeting requests
16256
+ * and returns `undefined` for any other items that are not meeting requests.
16257
16257
  */
16258
16258
  seriesId: string;
16259
16259
  /**
@@ -17190,7 +17190,7 @@ declare namespace Office {
17190
17190
  *
17191
17191
  * 3. The delegate opens the draft from the shared folder then continues composing.
17192
17192
  *
17193
- * b. **Shared mailbox (applies to Outlook on Windows only)**
17193
+ * b. **Shared mailbox (applies to classic Outlook on Windows only)**
17194
17194
  *
17195
17195
  * 1. The shared mailbox user starts a message. This can be a new message, a reply, or a forward.
17196
17196
  *
@@ -17233,7 +17233,7 @@ declare namespace Office {
17233
17233
  *
17234
17234
  * 3. The delegate opens the draft from the shared folder then continues composing.
17235
17235
  *
17236
- * b. **Shared mailbox (applies to Outlook on Windows only)**
17236
+ * b. **Shared mailbox (applies to classic Outlook on Windows only)**
17237
17237
  *
17238
17238
  * 1. The shared mailbox user starts a message. This can be a new message, a reply, or a forward.
17239
17239
  *
@@ -86309,10 +86309,11 @@ declare namespace Word {
86309
86309
  * [Api set: WordApi 1.1]
86310
86310
  *
86311
86311
  * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7.
86312
+ * `DropDownList` and `ComboBox` support was added in WordApi 1.9.
86312
86313
  *
86313
- * @param contentControlType Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'.
86314
+ * @param contentControlType Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'.
86314
86315
  */
86315
- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl;
86316
+ insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl;
86316
86317
  /**
86317
86318
  * Inserts a document into the body at the specified location.
86318
86319
  *
@@ -87191,12 +87192,19 @@ declare namespace Word {
87191
87192
  /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */
87192
87193
  context: RequestContext;
87193
87194
  /**
87194
- * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise.
87195
+ * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise.
87195
87196
  *
87196
87197
  * @remarks
87197
87198
  * [Api set: WordApi 1.7]
87198
87199
  */
87199
87200
  readonly checkboxContentControl: Word.CheckboxContentControl;
87201
+ /**
87202
+ * Gets the data of the content control when its type is 'ComboBox'. It's `null` otherwise.
87203
+ *
87204
+ * @remarks
87205
+ * [Api set: WordApi 1.9]
87206
+ */
87207
+ readonly comboBoxContentControl: Word.ComboBoxContentControl;
87200
87208
  /**
87201
87209
  * Gets the collection of content control objects in the content control.
87202
87210
  *
@@ -87204,6 +87212,13 @@ declare namespace Word {
87204
87212
  * [Api set: WordApi 1.1]
87205
87213
  */
87206
87214
  readonly contentControls: Word.ContentControlCollection;
87215
+ /**
87216
+ * Gets the data of the content control when its type is 'DropDownList'. It's `null` otherwise.
87217
+ *
87218
+ * @remarks
87219
+ * [Api set: WordApi 1.9]
87220
+ */
87221
+ readonly dropDownListContentControl: Word.DropDownListContentControl;
87207
87222
  /**
87208
87223
  * Gets the collection of endnotes in the content control.
87209
87224
  *
@@ -87843,6 +87858,152 @@ declare namespace Word {
87843
87858
  */
87844
87859
  toJSON(): Word.Interfaces.ContentControlCollectionData;
87845
87860
  }
87861
+ /**
87862
+ * Represents a list item in a dropdown list or combo box content control.
87863
+ *
87864
+ * @remarks
87865
+ * [Api set: WordApi 1.9]
87866
+ */
87867
+ class ContentControlListItem extends OfficeExtension.ClientObject {
87868
+ /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */
87869
+ context: RequestContext;
87870
+ /**
87871
+ * Specifies the display text of a list item for a dropdown list or combo box content control.
87872
+ *
87873
+ * @remarks
87874
+ * [Api set: WordApi 1.9]
87875
+ */
87876
+ displayText: string;
87877
+ /**
87878
+ * Specifies the index location of a content control list item in the collection of list items.
87879
+ *
87880
+ * @remarks
87881
+ * [Api set: WordApi 1.9]
87882
+ */
87883
+ index: number;
87884
+ /**
87885
+ * Specifies the programmatic value of a list item for a dropdown list or combo box content control.
87886
+ *
87887
+ * @remarks
87888
+ * [Api set: WordApi 1.9]
87889
+ */
87890
+ value: string;
87891
+ /**
87892
+ * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type.
87893
+ * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called.
87894
+ * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties.
87895
+ */
87896
+ set(properties: Interfaces.ContentControlListItemUpdateData, options?: OfficeExtension.UpdateOptions): void;
87897
+ /** Sets multiple properties on the object at the same time, based on an existing loaded object. */
87898
+ set(properties: Word.ContentControlListItem): void;
87899
+ /**
87900
+ * Deletes the list item.
87901
+ *
87902
+ * @remarks
87903
+ * [Api set: WordApi 1.9]
87904
+ */
87905
+ delete(): void;
87906
+ /**
87907
+ * Selects the list item and sets the text of the content control to the value of the list item.
87908
+ *
87909
+ * @remarks
87910
+ * [Api set: WordApi 1.9]
87911
+ */
87912
+ select(): void;
87913
+ /**
87914
+ * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
87915
+ *
87916
+ * @param options Provides options for which properties of the object to load.
87917
+ */
87918
+ load(options?: Word.Interfaces.ContentControlListItemLoadOptions): Word.ContentControlListItem;
87919
+ /**
87920
+ * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
87921
+ *
87922
+ * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load.
87923
+ */
87924
+ load(propertyNames?: string | string[]): Word.ContentControlListItem;
87925
+ /**
87926
+ * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
87927
+ *
87928
+ * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load.
87929
+ */
87930
+ load(propertyNamesAndPaths?: {
87931
+ select?: string;
87932
+ expand?: string;
87933
+ }): Word.ContentControlListItem;
87934
+ /**
87935
+ * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection.
87936
+ */
87937
+ track(): Word.ContentControlListItem;
87938
+ /**
87939
+ * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect.
87940
+ */
87941
+ untrack(): Word.ContentControlListItem;
87942
+ /**
87943
+ * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.)
87944
+ * Whereas the original `Word.ContentControlListItem` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlListItemData`) that contains shallow copies of any loaded child properties from the original object.
87945
+ */
87946
+ toJSON(): Word.Interfaces.ContentControlListItemData;
87947
+ }
87948
+ /**
87949
+ * Contains a collection of {@link Word.ContentControlListItem} objects that represent the items in a dropdown list or combo box content control.
87950
+ *
87951
+ * @remarks
87952
+ * [Api set: WordApi 1.9]
87953
+ */
87954
+ class ContentControlListItemCollection extends OfficeExtension.ClientObject {
87955
+ /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */
87956
+ context: RequestContext;
87957
+ /** Gets the loaded child items in this collection. */
87958
+ readonly items: Word.ContentControlListItem[];
87959
+ /**
87960
+ * Gets the first list item in this collection. Throws an `ItemNotFound` error if this collection is empty.
87961
+ *
87962
+ * @remarks
87963
+ * [Api set: WordApi 1.9]
87964
+ */
87965
+ getFirst(): Word.ContentControlListItem;
87966
+ /**
87967
+ * Gets the first list item in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`.
87968
+ For further information,
87969
+ see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}.
87970
+ *
87971
+ * @remarks
87972
+ * [Api set: WordApi 1.9]
87973
+ */
87974
+ getFirstOrNullObject(): Word.ContentControlListItem;
87975
+ /**
87976
+ * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
87977
+ *
87978
+ * @param options Provides options for which properties of the object to load.
87979
+ */
87980
+ load(options?: Word.Interfaces.ContentControlListItemCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ContentControlListItemCollection;
87981
+ /**
87982
+ * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
87983
+ *
87984
+ * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load.
87985
+ */
87986
+ load(propertyNames?: string | string[]): Word.ContentControlListItemCollection;
87987
+ /**
87988
+ * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
87989
+ *
87990
+ * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load.
87991
+ */
87992
+ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ContentControlListItemCollection;
87993
+ /**
87994
+ * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection.
87995
+ */
87996
+ track(): Word.ContentControlListItemCollection;
87997
+ /**
87998
+ * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect.
87999
+ */
88000
+ untrack(): Word.ContentControlListItemCollection;
88001
+ /**
88002
+ * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.)
88003
+ * Whereas the original `Word.ContentControlListItemCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlListItemCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items.
88004
+ */
88005
+ toJSON(): Word.Interfaces.ContentControlListItemCollectionData;
88006
+ }
87846
88007
  /**
87847
88008
  * Specifies the options that define which content controls are returned.
87848
88009
  *
@@ -87851,12 +88012,13 @@ declare namespace Word {
87851
88012
  */
87852
88013
  interface ContentControlOptions {
87853
88014
  /**
87854
- * An array of content control types, item must be 'RichText', 'PlainText', or 'CheckBox'.
88015
+ * An array of content control types, item must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'.
87855
88016
  *
87856
88017
  * @remarks
87857
88018
  * [Api set: WordApi 1.5]
87858
88019
  *
87859
- * Note: `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7.
88020
+ * Note: 'PlainText' support was added in WordApi 1.5. 'CheckBox' support was added in WordApi 1.7.
88021
+ * 'DropDownList' and 'ComboBox' support was added in WordApi 1.9.
87860
88022
  */
87861
88023
  types: Word.ContentControlType[];
87862
88024
  }
@@ -88689,9 +88851,24 @@ declare namespace Word {
88689
88851
  * @remarks
88690
88852
  * [Api set: WordApi 1.6]
88691
88853
  *
88854
+ * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1.
88855
+ *
88692
88856
  * @param stylesJson Required. A JSON-formatted string representing the styles.
88857
+ * @param importedStylesConflictBehavior Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document.
88693
88858
  */
88694
- importStylesFromJson(stylesJson: string): OfficeExtension.ClientResult<string[]>;
88859
+ importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior): OfficeExtension.ClientResult<string[]>;
88860
+ /**
88861
+ * Import styles from a JSON-formatted string.
88862
+ *
88863
+ * @remarks
88864
+ * [Api set: WordApi 1.6]
88865
+ *
88866
+ * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1.
88867
+ *
88868
+ * @param stylesJson Required. A JSON-formatted string representing the styles.
88869
+ * @param importedStylesConflictBehavior Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document.
88870
+ */
88871
+ importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: "Ignore" | "Overwrite" | "CreateNew"): OfficeExtension.ClientResult<string[]>;
88695
88872
  /**
88696
88873
  * Inserts a document into the target document at a specific location with additional properties.
88697
88874
  Headers, footers, watermarks, and other section properties are copied by default.
@@ -89252,6 +89429,132 @@ declare namespace Word {
89252
89429
  */
89253
89430
  toJSON(): Word.Interfaces.DocumentPropertiesData;
89254
89431
  }
89432
+ /**
89433
+ * The data specific to content controls of type DropDownList.
89434
+ *
89435
+ * @remarks
89436
+ * [Api set: WordApi 1.9]
89437
+ */
89438
+ class DropDownListContentControl extends OfficeExtension.ClientObject {
89439
+ /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */
89440
+ context: RequestContext;
89441
+ /**
89442
+ * Gets the collection of list items in the dropdown list content control.
89443
+ *
89444
+ * @remarks
89445
+ * [Api set: WordApi 1.9]
89446
+ */
89447
+ readonly listItems: Word.ContentControlListItemCollection;
89448
+ /**
89449
+ * Adds a new list item to this dropdown list content control and returns a {@link Word.ContentControlListItem} object.
89450
+ *
89451
+ * @remarks
89452
+ * [Api set: WordApi 1.9]
89453
+ *
89454
+ * @param displayText Required. Display text of the list item.
89455
+ * @param value Optional. Value of the list item.
89456
+ * @param index Optional. Index location of the new item in the list. If an item exists at the position specified, the existing item is pushed down in the list. If omitted, the new item is added to the end of the list.
89457
+ */
89458
+ addListItem(displayText: string, value?: string, index?: number): Word.ContentControlListItem;
89459
+ /**
89460
+ * Deletes all list items in this dropdown list content control.
89461
+ *
89462
+ * @remarks
89463
+ * [Api set: WordApi 1.9]
89464
+ */
89465
+ deleteAllListItems(): void;
89466
+ /**
89467
+ * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
89468
+ *
89469
+ * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load.
89470
+ */
89471
+ load(propertyNames?: string | string[]): Word.DropDownListContentControl;
89472
+ /**
89473
+ * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
89474
+ *
89475
+ * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load.
89476
+ */
89477
+ load(propertyNamesAndPaths?: {
89478
+ select?: string;
89479
+ expand?: string;
89480
+ }): Word.DropDownListContentControl;
89481
+ /**
89482
+ * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection.
89483
+ */
89484
+ track(): Word.DropDownListContentControl;
89485
+ /**
89486
+ * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect.
89487
+ */
89488
+ untrack(): Word.DropDownListContentControl;
89489
+ /**
89490
+ * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.)
89491
+ * Whereas the original `Word.DropDownListContentControl` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.DropDownListContentControlData`) that contains shallow copies of any loaded child properties from the original object.
89492
+ */
89493
+ toJSON(): Word.Interfaces.DropDownListContentControlData;
89494
+ }
89495
+ /**
89496
+ * The data specific to content controls of type 'ComboBox'.
89497
+ *
89498
+ * @remarks
89499
+ * [Api set: WordApi 1.9]
89500
+ */
89501
+ class ComboBoxContentControl extends OfficeExtension.ClientObject {
89502
+ /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */
89503
+ context: RequestContext;
89504
+ /**
89505
+ * Gets the collection of list items in the combo box content control.
89506
+ *
89507
+ * @remarks
89508
+ * [Api set: WordApi 1.9]
89509
+ */
89510
+ readonly listItems: Word.ContentControlListItemCollection;
89511
+ /**
89512
+ * Adds a new list item to this combo box content control and returns a {@link Word.ContentControlListItem} object.
89513
+ *
89514
+ * @remarks
89515
+ * [Api set: WordApi 1.9]
89516
+ *
89517
+ * @param displayText Required. Display text of the list item.
89518
+ * @param value Optional. Value of the list item.
89519
+ * @param index Optional. Index location of the new item in the list. If an item exists at the position specified, the existing item is pushed down in the list. If omitted, the new item is added to the end of the list.
89520
+ */
89521
+ addListItem(displayText: string, value?: string, index?: number): Word.ContentControlListItem;
89522
+ /**
89523
+ * Deletes all list items in this combo box content control.
89524
+ *
89525
+ * @remarks
89526
+ * [Api set: WordApi 1.9]
89527
+ */
89528
+ deleteAllListItems(): void;
89529
+ /**
89530
+ * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
89531
+ *
89532
+ * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load.
89533
+ */
89534
+ load(propertyNames?: string | string[]): Word.ComboBoxContentControl;
89535
+ /**
89536
+ * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
89537
+ *
89538
+ * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load.
89539
+ */
89540
+ load(propertyNamesAndPaths?: {
89541
+ select?: string;
89542
+ expand?: string;
89543
+ }): Word.ComboBoxContentControl;
89544
+ /**
89545
+ * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection.
89546
+ */
89547
+ track(): Word.ComboBoxContentControl;
89548
+ /**
89549
+ * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect.
89550
+ */
89551
+ untrack(): Word.ComboBoxContentControl;
89552
+ /**
89553
+ * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.)
89554
+ * Whereas the original `Word.ComboBoxContentControl` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ComboBoxContentControlData`) that contains shallow copies of any loaded child properties from the original object.
89555
+ */
89556
+ toJSON(): Word.Interfaces.ComboBoxContentControlData;
89557
+ }
89255
89558
  /**
89256
89559
  * Represents a field.
89257
89560
  *
@@ -91249,10 +91552,11 @@ declare namespace Word {
91249
91552
  * [Api set: WordApi 1.1]
91250
91553
  *
91251
91554
  * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7.
91555
+ * `DropDownList` and `ComboBox` support was added in WordApi 1.9.
91252
91556
  *
91253
- * @param contentControlType Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'.
91557
+ * @param contentControlType Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'.
91254
91558
  */
91255
- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl;
91559
+ insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl;
91256
91560
  /**
91257
91561
  * Inserts a document into the paragraph at the specified location.
91258
91562
  *
@@ -92006,10 +92310,11 @@ declare namespace Word {
92006
92310
  * [Api set: WordApi 1.1]
92007
92311
  *
92008
92312
  * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7.
92313
+ * `DropDownList` and `ComboBox` support was added in WordApi 1.9.
92009
92314
  *
92010
- * @param contentControlType Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'.
92315
+ * @param contentControlType Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'.
92011
92316
  */
92012
- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl;
92317
+ insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl;
92013
92318
  /**
92014
92319
  * Inserts an endnote. The endnote reference is placed after the range.
92015
92320
  *
@@ -98543,6 +98848,32 @@ declare namespace Word {
98543
98848
  */
98544
98849
  compareTargetNew = "CompareTargetNew",
98545
98850
  }
98851
+ /**
98852
+ * Specifies how to handle any conflicts, that is, when imported styles have the same name as existing styles in the current document.
98853
+ *
98854
+ * @remarks
98855
+ * [Api set: WordApiDesktop 1.1]
98856
+ */
98857
+ enum ImportedStylesConflictBehavior {
98858
+ /**
98859
+ * Ignore conflicting imported styles and keep the existing version of those styles in the current document.
98860
+ * @remarks
98861
+ * [Api set: WordApiDesktop 1.1]
98862
+ */
98863
+ ignore = "Ignore",
98864
+ /**
98865
+ * Overwrite the existing styles in the current document.
98866
+ * @remarks
98867
+ * [Api set: WordApiDesktop 1.1]
98868
+ */
98869
+ overwrite = "Overwrite",
98870
+ /**
98871
+ * Rename conflicting imported styles so that both versions are kept in the current document. For example, if MyStyle already exists in the document, then the imported version could be added as MyStyle1.
98872
+ * @remarks
98873
+ * [Api set: WordApiDesktop 1.1]
98874
+ */
98875
+ createNew = "CreateNew",
98876
+ }
98546
98877
  enum ErrorCodes {
98547
98878
  accessDenied = "AccessDenied",
98548
98879
  generalException = "GeneralException",
@@ -98779,7 +99110,7 @@ declare namespace Word {
98779
99110
  /** An interface for updating data on the `ContentControl` object, for use in `contentControl.set({ ... })`. */
98780
99111
  interface ContentControlUpdateData {
98781
99112
  /**
98782
- * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise.
99113
+ * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise.
98783
99114
  *
98784
99115
  * @remarks
98785
99116
  * [Api set: WordApi 1.7]
@@ -98867,6 +99198,34 @@ declare namespace Word {
98867
99198
  interface ContentControlCollectionUpdateData {
98868
99199
  items?: Word.Interfaces.ContentControlData[];
98869
99200
  }
99201
+ /** An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... })`. */
99202
+ interface ContentControlListItemUpdateData {
99203
+ /**
99204
+ * Specifies the display text of a list item for a dropdown list or combo box content control.
99205
+ *
99206
+ * @remarks
99207
+ * [Api set: WordApi 1.9]
99208
+ */
99209
+ displayText?: string;
99210
+ /**
99211
+ * Specifies the index location of a content control list item in the collection of list items.
99212
+ *
99213
+ * @remarks
99214
+ * [Api set: WordApi 1.9]
99215
+ */
99216
+ index?: number;
99217
+ /**
99218
+ * Specifies the programmatic value of a list item for a dropdown list or combo box content control.
99219
+ *
99220
+ * @remarks
99221
+ * [Api set: WordApi 1.9]
99222
+ */
99223
+ value?: string;
99224
+ }
99225
+ /** An interface for updating data on the `ContentControlListItemCollection` object, for use in `contentControlListItemCollection.set({ ... })`. */
99226
+ interface ContentControlListItemCollectionUpdateData {
99227
+ items?: Word.Interfaces.ContentControlListItemData[];
99228
+ }
98870
99229
  /** An interface for updating data on the `CustomProperty` object, for use in `customProperty.set({ ... })`. */
98871
99230
  interface CustomPropertyUpdateData {
98872
99231
  /**
@@ -100374,12 +100733,19 @@ declare namespace Word {
100374
100733
  /** An interface describing the data returned by calling `contentControl.toJSON()`. */
100375
100734
  interface ContentControlData {
100376
100735
  /**
100377
- * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise.
100736
+ * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise.
100378
100737
  *
100379
100738
  * @remarks
100380
100739
  * [Api set: WordApi 1.7]
100381
100740
  */
100382
100741
  checkboxContentControl?: Word.Interfaces.CheckboxContentControlData;
100742
+ /**
100743
+ * Gets the data of the content control when its type is 'ComboBox'. It's `null` otherwise.
100744
+ *
100745
+ * @remarks
100746
+ * [Api set: WordApi 1.9]
100747
+ */
100748
+ comboBoxContentControl?: Word.Interfaces.ComboBoxContentControlData;
100383
100749
  /**
100384
100750
  * Gets the collection of content control objects in the content control.
100385
100751
  *
@@ -100387,6 +100753,13 @@ declare namespace Word {
100387
100753
  * [Api set: WordApi 1.1]
100388
100754
  */
100389
100755
  contentControls?: Word.Interfaces.ContentControlData[];
100756
+ /**
100757
+ * Gets the data of the content control when its type is 'DropDownList'. It's `null` otherwise.
100758
+ *
100759
+ * @remarks
100760
+ * [Api set: WordApi 1.9]
100761
+ */
100762
+ dropDownListContentControl?: Word.Interfaces.DropDownListContentControlData;
100390
100763
  /**
100391
100764
  * Gets the collection of field objects in the content control.
100392
100765
  *
@@ -100534,6 +100907,34 @@ declare namespace Word {
100534
100907
  interface ContentControlCollectionData {
100535
100908
  items?: Word.Interfaces.ContentControlData[];
100536
100909
  }
100910
+ /** An interface describing the data returned by calling `contentControlListItem.toJSON()`. */
100911
+ interface ContentControlListItemData {
100912
+ /**
100913
+ * Specifies the display text of a list item for a dropdown list or combo box content control.
100914
+ *
100915
+ * @remarks
100916
+ * [Api set: WordApi 1.9]
100917
+ */
100918
+ displayText?: string;
100919
+ /**
100920
+ * Specifies the index location of a content control list item in the collection of list items.
100921
+ *
100922
+ * @remarks
100923
+ * [Api set: WordApi 1.9]
100924
+ */
100925
+ index?: number;
100926
+ /**
100927
+ * Specifies the programmatic value of a list item for a dropdown list or combo box content control.
100928
+ *
100929
+ * @remarks
100930
+ * [Api set: WordApi 1.9]
100931
+ */
100932
+ value?: string;
100933
+ }
100934
+ /** An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. */
100935
+ interface ContentControlListItemCollectionData {
100936
+ items?: Word.Interfaces.ContentControlListItemData[];
100937
+ }
100537
100938
  /** An interface describing the data returned by calling `customProperty.toJSON()`. */
100538
100939
  interface CustomPropertyData {
100539
100940
  /**
@@ -100827,6 +101228,12 @@ declare namespace Word {
100827
101228
  */
100828
101229
  title?: string;
100829
101230
  }
101231
+ /** An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. */
101232
+ interface DropDownListContentControlData {
101233
+ }
101234
+ /** An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. */
101235
+ interface ComboBoxContentControlData {
101236
+ }
100830
101237
  /** An interface describing the data returned by calling `field.toJSON()`. */
100831
101238
  interface FieldData {
100832
101239
  /**
@@ -102803,7 +103210,7 @@ declare namespace Word {
102803
103210
  */
102804
103211
  $all?: boolean;
102805
103212
  /**
102806
- * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise.
103213
+ * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise.
102807
103214
  *
102808
103215
  * @remarks
102809
103216
  * [Api set: WordApi 1.7]
@@ -102976,7 +103383,7 @@ declare namespace Word {
102976
103383
  */
102977
103384
  $all?: boolean;
102978
103385
  /**
102979
- * For EACH ITEM in the collection: Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise.
103386
+ * For EACH ITEM in the collection: Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise.
102980
103387
  *
102981
103388
  * @remarks
102982
103389
  * [Api set: WordApi 1.7]
@@ -103137,6 +103544,72 @@ declare namespace Word {
103137
103544
  */
103138
103545
  type?: boolean;
103139
103546
  }
103547
+ /**
103548
+ * Represents a list item in a dropdown list or combo box content control.
103549
+ *
103550
+ * @remarks
103551
+ * [Api set: WordApi 1.9]
103552
+ */
103553
+ interface ContentControlListItemLoadOptions {
103554
+ /**
103555
+ Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`).
103556
+ */
103557
+ $all?: boolean;
103558
+ /**
103559
+ * Specifies the display text of a list item for a dropdown list or combo box content control.
103560
+ *
103561
+ * @remarks
103562
+ * [Api set: WordApi 1.9]
103563
+ */
103564
+ displayText?: boolean;
103565
+ /**
103566
+ * Specifies the index location of a content control list item in the collection of list items.
103567
+ *
103568
+ * @remarks
103569
+ * [Api set: WordApi 1.9]
103570
+ */
103571
+ index?: boolean;
103572
+ /**
103573
+ * Specifies the programmatic value of a list item for a dropdown list or combo box content control.
103574
+ *
103575
+ * @remarks
103576
+ * [Api set: WordApi 1.9]
103577
+ */
103578
+ value?: boolean;
103579
+ }
103580
+ /**
103581
+ * Contains a collection of {@link Word.ContentControlListItem} objects that represent the items in a dropdown list or combo box content control.
103582
+ *
103583
+ * @remarks
103584
+ * [Api set: WordApi 1.9]
103585
+ */
103586
+ interface ContentControlListItemCollectionLoadOptions {
103587
+ /**
103588
+ Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`).
103589
+ */
103590
+ $all?: boolean;
103591
+ /**
103592
+ * For EACH ITEM in the collection: Specifies the display text of a list item for a dropdown list or combo box content control.
103593
+ *
103594
+ * @remarks
103595
+ * [Api set: WordApi 1.9]
103596
+ */
103597
+ displayText?: boolean;
103598
+ /**
103599
+ * For EACH ITEM in the collection: Specifies the index location of a content control list item in the collection of list items.
103600
+ *
103601
+ * @remarks
103602
+ * [Api set: WordApi 1.9]
103603
+ */
103604
+ index?: boolean;
103605
+ /**
103606
+ * For EACH ITEM in the collection: Specifies the programmatic value of a list item for a dropdown list or combo box content control.
103607
+ *
103608
+ * @remarks
103609
+ * [Api set: WordApi 1.9]
103610
+ */
103611
+ value?: boolean;
103612
+ }
103140
103613
  /**
103141
103614
  * Represents a custom property.
103142
103615
  *
office-js/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/office-js",
3
- "version": "1.0.444",
3
+ "version": "1.0.446",
4
4
  "description": "TypeScript definitions for office-js",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/office-js",
6
6
  "license": "MIT",
@@ -46,6 +46,6 @@
46
46
  "scripts": {},
47
47
  "dependencies": {},
48
48
  "peerDependencies": {},
49
- "typesPublisherContentHash": "95d50f020a924de1ff6b75da51e78d7be9cec0556f41d13f97eeb8be212b24f2",
49
+ "typesPublisherContentHash": "02fcec30b6797cca18b4013fc9fa672f6fd25f544763b721e04b4210abbb86c7",
50
50
  "typeScriptVersion": "4.9"
51
51
  }