@types/office-js-preview 1.0.679 → 1.0.681

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-preview (https://github.com
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: Mon, 26 Jan 2026 19:06:55 GMT
11
+ * Last updated: Mon, 02 Feb 2026 23:47:21 GMT
12
12
  * Dependencies: none
13
13
 
14
14
  # Credits
@@ -40142,6 +40142,7 @@ declare namespace Excel {
40142
40142
  readonly calculationEngineVersion: number;
40143
40143
  /**
40144
40144
  * Returns the calculation mode used in the workbook, as defined by the constants in `Excel.CalculationMode`. Possible values are: `Automatic`, where Excel controls recalculation; `AutomaticExceptTables`, where Excel controls recalculation but ignores changes in tables; `Manual`, where calculation is done when the user requests it.
40145
+ * This is a runtime property. The `calculationMode` setting is not persisted in the workbook.
40145
40146
  *
40146
40147
  * @remarks
40147
40148
  * [Api set: ExcelApi 1.1 for get, 1.8 for set]
@@ -40815,13 +40816,12 @@ declare namespace Excel {
40815
40816
  * Inserts the specified worksheets from a source workbook into the current workbook.
40816
40817
 
40817
40818
  The `extensionHardening` Windows registry key affects this API. The file extension defined by the `base64File` param must match the real file type of the inserted file. If `extensionHardening` is set to deny mismatches and the file extension does not match the real file type, this API throws the following error: "This operation is not allowed due to the extension hardening policy."
40818
-
40819
- **Note**: This API is currently only supported for Office on Windows, Mac, and the web.
40820
40819
  *
40821
40820
  * @remarks
40822
40821
  * [Api set: ExcelApi 1.13]
40823
40822
  *
40824
40823
  * This API is currently only supported for Office on Windows, Mac, and the web.
40824
+ * In Excel on the web, this API doesn't support inserting charts, comments, PivotTables, or slicers.
40825
40825
  *
40826
40826
  * @param base64File Required. The Base64-encoded string representing the source workbook file.
40827
40827
  * @param options Optional. The options that define which worksheets to insert and where in the workbook the new worksheets will be inserted. By default, all the worksheets from the source workbook are inserted at the end of the current workbook.
@@ -41289,6 +41289,7 @@ declare namespace Excel {
41289
41289
  evaluate(name: string): OfficeExtension.ClientResult<any>;
41290
41290
  /**
41291
41291
  * Finds all occurrences of the given string based on the criteria specified and returns them as a `RangeAreas` object, comprising one or more rectangular ranges.
41292
+ * Content in hidden worksheets is not returned.
41292
41293
  *
41293
41294
  * @remarks
41294
41295
  * [Api set: ExcelApi 1.9]
@@ -41300,6 +41301,7 @@ declare namespace Excel {
41300
41301
  findAll(text: string, criteria: Excel.WorksheetSearchCriteria): Excel.RangeAreas;
41301
41302
  /**
41302
41303
  * Finds all occurrences of the given string based on the criteria specified and returns them as a `RangeAreas` object, comprising one or more rectangular ranges.
41304
+ * Content in hidden worksheets is not returned.
41303
41305
  *
41304
41306
  * @remarks
41305
41307
  * [Api set: ExcelApi 1.9]
@@ -74574,6 +74576,7 @@ declare namespace Excel {
74574
74576
  iterativeCalculation?: Excel.Interfaces.IterativeCalculationUpdateData;
74575
74577
  /**
74576
74578
  * Returns the calculation mode used in the workbook, as defined by the constants in `Excel.CalculationMode`. Possible values are: `Automatic`, where Excel controls recalculation; `AutomaticExceptTables`, where Excel controls recalculation but ignores changes in tables; `Manual`, where calculation is done when the user requests it.
74579
+ * This is a runtime property. The `calculationMode` setting is not persisted in the workbook.
74577
74580
  *
74578
74581
  * @remarks
74579
74582
  * [Api set: ExcelApi 1.1 for get, 1.8 for set]
@@ -80452,6 +80455,7 @@ declare namespace Excel {
80452
80455
  calculationEngineVersion?: number;
80453
80456
  /**
80454
80457
  * Returns the calculation mode used in the workbook, as defined by the constants in `Excel.CalculationMode`. Possible values are: `Automatic`, where Excel controls recalculation; `AutomaticExceptTables`, where Excel controls recalculation but ignores changes in tables; `Manual`, where calculation is done when the user requests it.
80458
+ * This is a runtime property. The `calculationMode` setting is not persisted in the workbook.
80455
80459
  *
80456
80460
  * @remarks
80457
80461
  * [Api set: ExcelApi 1.1 for get, 1.8 for set]
@@ -88620,6 +88624,7 @@ declare namespace Excel {
88620
88624
  calculationEngineVersion?: boolean;
88621
88625
  /**
88622
88626
  * Returns the calculation mode used in the workbook, as defined by the constants in `Excel.CalculationMode`. Possible values are: `Automatic`, where Excel controls recalculation; `AutomaticExceptTables`, where Excel controls recalculation but ignores changes in tables; `Manual`, where calculation is done when the user requests it.
88627
+ * This is a runtime property. The `calculationMode` setting is not persisted in the workbook.
88623
88628
  *
88624
88629
  * @remarks
88625
88630
  * [Api set: ExcelApi 1.1 for get, 1.8 for set]
@@ -187609,6 +187614,18 @@ declare namespace PowerPoint {
187609
187614
  select?: string;
187610
187615
  expand?: string;
187611
187616
  }): PowerPoint.Presentation;
187617
+ /**
187618
+ * Occurs when the selection of slides in the presentation changes.
187619
+ This event is raised when the user selects a different slide or changes the selection of slides.
187620
+ This event is not raised when the selection of the contents (for example, shapes) in the slide changes.
187621
+ *
187622
+ * @remarks
187623
+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
187624
+ *
187625
+ * @eventproperty
187626
+ * @beta
187627
+ */
187628
+ readonly onSlideSelectionChanged: OfficeExtension.EventHandlers<PowerPoint.SlideSelectionChangedEventArgs>;
187612
187629
  /**
187613
187630
  * 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's passed to it.)
187614
187631
  * Whereas the original `PowerPoint.Presentation` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.PresentationData`) that contains shallow copies of any loaded child properties from the original object.
@@ -187622,6 +187639,15 @@ declare namespace PowerPoint {
187622
187639
  * [Api set: PowerPointApi 1.3]
187623
187640
  */
187624
187641
  interface AddSlideOptions {
187642
+ /**
187643
+ * Specifies the 0-based index at which the new slide should be inserted.
187644
+ If not specified or if the specified index is out of bounds, the new slide will be added at the end of the presentation.
187645
+ *
187646
+ * @remarks
187647
+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
187648
+ * @beta
187649
+ */
187650
+ index?: number;
187625
187651
  /**
187626
187652
  * Specifies the ID of a Slide Layout to be used for the new slide.
187627
187653
  If no `layoutId` is provided, but a `slideMasterId` is provided, then the ID of the first layout from the specified Slide Master will be used.
@@ -187978,6 +188004,52 @@ declare namespace PowerPoint {
187978
188004
  */
187979
188005
  toJSON(): PowerPoint.Interfaces.CustomXmlPartCollectionData;
187980
188006
  }
188007
+ /**
188008
+ * Represents a graphic object in PowerPoint.
188009
+ *
188010
+ * @remarks
188011
+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
188012
+ * @beta
188013
+ */
188014
+ class Graphic extends OfficeExtension.ClientObject {
188015
+ /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */
188016
+ context: RequestContext;
188017
+ /**
188018
+ * Returns the `Shape` object associated with the graphic.
188019
+ *
188020
+ * @remarks
188021
+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
188022
+ * @beta
188023
+ */
188024
+ readonly shape: PowerPoint.Shape;
188025
+ convertToShape(): PowerPoint.ShapeScopedCollection;
188026
+ /**
188027
+ * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
188028
+ *
188029
+ * @param options Provides options for which properties of the object to load.
188030
+ */
188031
+ load(options?: PowerPoint.Interfaces.GraphicLoadOptions): PowerPoint.Graphic;
188032
+ /**
188033
+ * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
188034
+ *
188035
+ * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load.
188036
+ */
188037
+ load(propertyNames?: string | string[]): PowerPoint.Graphic;
188038
+ /**
188039
+ * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
188040
+ *
188041
+ * @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.
188042
+ */
188043
+ load(propertyNamesAndPaths?: {
188044
+ select?: string;
188045
+ expand?: string;
188046
+ }): PowerPoint.Graphic;
188047
+ /**
188048
+ * 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's passed to it.)
188049
+ * Whereas the original `PowerPoint.Graphic` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.GraphicData`) that contains shallow copies of any loaded child properties from the original object.
188050
+ */
188051
+ toJSON(): PowerPoint.Interfaces.GraphicData;
188052
+ }
187981
188053
  /**
187982
188054
  * Represents the available options when adding a {@link PowerPoint.Hyperlink}.
187983
188055
  *
@@ -190660,6 +190732,53 @@ declare namespace PowerPoint {
190660
190732
  */
190661
190733
  chartPlus = "ChartPlus",
190662
190734
  }
190735
+ /**
190736
+ * Represents the available options when adding a picture (represented by a {@link PowerPoint.Shape} object).
190737
+ *
190738
+ * @remarks
190739
+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
190740
+ * @beta
190741
+ */
190742
+ interface PictureAddOptions {
190743
+ /**
190744
+ * Specifies the height, in points, of the picture.
190745
+ When not provided, the default value is 72 points (1 inch).
190746
+ Throws an `InvalidArgument` exception when set with a negative value.
190747
+ *
190748
+ * @remarks
190749
+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
190750
+ * @beta
190751
+ */
190752
+ height?: number;
190753
+ /**
190754
+ * Specifies the distance, in points, from the left side of the picture to the left side of the slide.
190755
+ When not provided, the default value is 0.
190756
+ *
190757
+ * @remarks
190758
+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
190759
+ * @beta
190760
+ */
190761
+ left?: number;
190762
+ /**
190763
+ * Specifies the distance, in points, from the top edge of the picture to the top edge of the slide.
190764
+ When not provided, the default value is 0.
190765
+ *
190766
+ * @remarks
190767
+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
190768
+ * @beta
190769
+ */
190770
+ top?: number;
190771
+ /**
190772
+ * Specifies the width, in points, of the picture.
190773
+ When not provided, the default value is 72 points (1 inch).
190774
+ Throws an `InvalidArgument` exception when set with a negative value.
190775
+ *
190776
+ * @remarks
190777
+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
190778
+ * @beta
190779
+ */
190780
+ width?: number;
190781
+ }
190663
190782
  /**
190664
190783
  * Represents the available options when adding shapes.
190665
190784
  *
@@ -192874,6 +192993,18 @@ declare namespace PowerPoint {
192874
192993
  * @returns The newly inserted shape.
192875
192994
  */
192876
192995
  addLine(connectorType?: "Straight" | "Elbow" | "Curve", options?: PowerPoint.ShapeAddOptions): PowerPoint.Shape;
192996
+ /**
192997
+ * Adds a picture to the slide. Returns a `Shape` object that represents the new picture.
192998
+ *
192999
+ * @remarks
193000
+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
193001
+ * @beta
193002
+ *
193003
+ * @param base64EncodedImage The base64-encoded image data.
193004
+ * @param options Optional. Additional options such as the position of the picture.
193005
+ * @returns The newly inserted shape.
193006
+ */
193007
+ addPicture(base64EncodedImage: string, options?: PowerPoint.PictureAddOptions): PowerPoint.Shape;
192877
193008
  /**
192878
193009
  * Adds a table to the slide. Returns a `Shape` object that represents the new table.
192879
193010
  Use the `Shape.table` property to get the `Table` object for the shape.
@@ -194368,6 +194499,15 @@ declare namespace PowerPoint {
194368
194499
  * [Api set: PowerPointApi 1.8]
194369
194500
  */
194370
194501
  readonly type: PowerPoint.SlideLayoutType | "Blank" | "Chart" | "ChartAndText" | "ClipArtAndText" | "ClipArtAndVerticalText" | "Comparison" | "ContentWithCaption" | "Custom" | "FourObjects" | "LargeObject" | "MediaClipAndText" | "Mixed" | "Object" | "ObjectAndText" | "ObjectAndTwoObjects" | "ObjectOverText" | "OrganizationChart" | "PictureWithCaption" | "SectionHeader" | "Table" | "Text" | "TextAndChart" | "TextAndClipArt" | "TextAndMediaClip" | "TextAndObject" | "TextAndTwoObjects" | "TextOverObject" | "Title" | "TitleOnly" | "TwoColumnText" | "TwoObjects" | "TwoObjectsAndObject" | "TwoObjectsAndText" | "TwoObjectsOverText" | "VerticalText" | "VerticalTitleAndText" | "VerticalTitleAndTextOverChart";
194502
+ /**
194503
+ * Deletes the slide layout from the presentation. Does nothing if the slide layout doesn't exist.
194504
+ Throws the `GeneralException` error if the slide layout is in use.
194505
+ *
194506
+ * @remarks
194507
+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
194508
+ * @beta
194509
+ */
194510
+ delete(): void;
194371
194511
  /**
194372
194512
  * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
194373
194513
  *
@@ -194570,6 +194710,15 @@ declare namespace PowerPoint {
194570
194710
  * [Api set: PowerPointApi 1.3]
194571
194711
  */
194572
194712
  readonly name: string;
194713
+ /**
194714
+ * Deletes the slide master and all child layouts from the presentation. Does nothing if the slide master doesn't exist.
194715
+ Throws the `GeneralException` error if the slide master is in use.
194716
+ *
194717
+ * @remarks
194718
+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
194719
+ * @beta
194720
+ */
194721
+ delete(): void;
194573
194722
  /**
194574
194723
  * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
194575
194724
  *
@@ -195454,6 +195603,14 @@ declare namespace PowerPoint {
195454
195603
  * [Api set: PowerPointApi 1.3]
195455
195604
  */
195456
195605
  delete(): void;
195606
+ /**
195607
+ * Returns a {@link PowerPoint.Graphic} object if this shape is a {@link PowerPoint.ShapeType| ShapeType.graphic}. If this shape isn't a `Graphic`, an object with an `isNullObject` property set to `true` is returned. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}.
195608
+ *
195609
+ * @remarks
195610
+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
195611
+ * @beta
195612
+ */
195613
+ getGraphicOrNullObject(): PowerPoint.Graphic;
195457
195614
  /**
195458
195615
  * Renders an image of the shape.
195459
195616
  *
@@ -196348,6 +196505,23 @@ declare namespace PowerPoint {
196348
196505
  */
196349
196506
  toJSON(): PowerPoint.Interfaces.SlideScopedCollectionData;
196350
196507
  }
196508
+ /**
196509
+ * Provides information about the slide selection changed event.
196510
+ *
196511
+ * @remarks
196512
+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
196513
+ * @beta
196514
+ */
196515
+ interface SlideSelectionChangedEventArgs {
196516
+ /**
196517
+ * Gets the array of IDs of the currently selected slides.
196518
+ *
196519
+ * @remarks
196520
+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
196521
+ * @beta
196522
+ */
196523
+ slideIds: string[];
196524
+ }
196351
196525
  /**
196352
196526
  * Represents the collection of Slide Masters in the presentation.
196353
196527
  *
@@ -197346,6 +197520,9 @@ declare namespace PowerPoint {
197346
197520
  interface CustomXmlPartCollectionData {
197347
197521
  items?: PowerPoint.Interfaces.CustomXmlPartData[];
197348
197522
  }
197523
+ /** An interface describing the data returned by calling `graphic.toJSON()`. */
197524
+ interface GraphicData {
197525
+ }
197349
197526
  /** An interface describing the data returned by calling `hyperlinkScopedCollection.toJSON()`. */
197350
197527
  interface HyperlinkScopedCollectionData {
197351
197528
  items?: PowerPoint.Interfaces.HyperlinkData[];
@@ -198633,6 +198810,27 @@ declare namespace PowerPoint {
198633
198810
  */
198634
198811
  namespaceUri?: boolean;
198635
198812
  }
198813
+ /**
198814
+ * Represents a graphic object in PowerPoint.
198815
+ *
198816
+ * @remarks
198817
+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
198818
+ * @beta
198819
+ */
198820
+ interface GraphicLoadOptions {
198821
+ /**
198822
+ 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`).
198823
+ */
198824
+ $all?: boolean;
198825
+ /**
198826
+ * Returns the `Shape` object associated with the graphic.
198827
+ *
198828
+ * @remarks
198829
+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
198830
+ * @beta
198831
+ */
198832
+ shape?: PowerPoint.Interfaces.ShapeLoadOptions;
198833
+ }
198636
198834
  /**
198637
198835
  * Represents a scoped collection of hyperlinks.
198638
198836
  *
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/office-js-preview",
3
- "version": "1.0.679",
3
+ "version": "1.0.681",
4
4
  "description": "TypeScript definitions for office-js-preview",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/office-js-preview",
6
6
  "license": "MIT",
@@ -46,7 +46,7 @@
46
46
  "scripts": {},
47
47
  "dependencies": {},
48
48
  "peerDependencies": {},
49
- "typesPublisherContentHash": "886de1526a19d8a494e749b3f58478cd2bcfbc82105cc0b553c5a71f0ee0a5ab",
49
+ "typesPublisherContentHash": "f8860587beb87df9d5f8a7f0dbb2e9a77e11536701887e67f61a66867702e132",
50
50
  "typeScriptVersion": "5.2",
51
51
  "nonNpm": true
52
52
  }