@types/office-js-preview 1.0.679 → 1.0.680

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: Fri, 30 Jan 2026 22:02:12 GMT
12
12
  * Dependencies: none
13
13
 
14
14
  # Credits
@@ -187609,6 +187609,18 @@ declare namespace PowerPoint {
187609
187609
  select?: string;
187610
187610
  expand?: string;
187611
187611
  }): PowerPoint.Presentation;
187612
+ /**
187613
+ * Occurs when the selection of slides in the presentation changes.
187614
+ This event is raised when the user selects a different slide or changes the selection of slides.
187615
+ This event is not raised when the selection of the contents (for example, shapes) in the slide changes.
187616
+ *
187617
+ * @remarks
187618
+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
187619
+ *
187620
+ * @eventproperty
187621
+ * @beta
187622
+ */
187623
+ readonly onSlideSelectionChanged: OfficeExtension.EventHandlers<PowerPoint.SlideSelectionChangedEventArgs>;
187612
187624
  /**
187613
187625
  * 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
187626
  * 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 +187634,15 @@ declare namespace PowerPoint {
187622
187634
  * [Api set: PowerPointApi 1.3]
187623
187635
  */
187624
187636
  interface AddSlideOptions {
187637
+ /**
187638
+ * Specifies the 0-based index at which the new slide should be inserted.
187639
+ If not specified or if the specified index is out of bounds, the new slide will be added at the end of the presentation.
187640
+ *
187641
+ * @remarks
187642
+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
187643
+ * @beta
187644
+ */
187645
+ index?: number;
187625
187646
  /**
187626
187647
  * Specifies the ID of a Slide Layout to be used for the new slide.
187627
187648
  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 +187999,52 @@ declare namespace PowerPoint {
187978
187999
  */
187979
188000
  toJSON(): PowerPoint.Interfaces.CustomXmlPartCollectionData;
187980
188001
  }
188002
+ /**
188003
+ * Represents a graphic object in PowerPoint.
188004
+ *
188005
+ * @remarks
188006
+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
188007
+ * @beta
188008
+ */
188009
+ class Graphic extends OfficeExtension.ClientObject {
188010
+ /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */
188011
+ context: RequestContext;
188012
+ /**
188013
+ * Returns the `Shape` object associated with the graphic.
188014
+ *
188015
+ * @remarks
188016
+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
188017
+ * @beta
188018
+ */
188019
+ readonly shape: PowerPoint.Shape;
188020
+ convertToShape(): PowerPoint.ShapeScopedCollection;
188021
+ /**
188022
+ * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
188023
+ *
188024
+ * @param options Provides options for which properties of the object to load.
188025
+ */
188026
+ load(options?: PowerPoint.Interfaces.GraphicLoadOptions): PowerPoint.Graphic;
188027
+ /**
188028
+ * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
188029
+ *
188030
+ * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load.
188031
+ */
188032
+ load(propertyNames?: string | string[]): PowerPoint.Graphic;
188033
+ /**
188034
+ * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
188035
+ *
188036
+ * @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.
188037
+ */
188038
+ load(propertyNamesAndPaths?: {
188039
+ select?: string;
188040
+ expand?: string;
188041
+ }): PowerPoint.Graphic;
188042
+ /**
188043
+ * 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.)
188044
+ * 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.
188045
+ */
188046
+ toJSON(): PowerPoint.Interfaces.GraphicData;
188047
+ }
187981
188048
  /**
187982
188049
  * Represents the available options when adding a {@link PowerPoint.Hyperlink}.
187983
188050
  *
@@ -190660,6 +190727,53 @@ declare namespace PowerPoint {
190660
190727
  */
190661
190728
  chartPlus = "ChartPlus",
190662
190729
  }
190730
+ /**
190731
+ * Represents the available options when adding a picture (represented by a {@link PowerPoint.Shape} object).
190732
+ *
190733
+ * @remarks
190734
+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
190735
+ * @beta
190736
+ */
190737
+ interface PictureAddOptions {
190738
+ /**
190739
+ * Specifies the height, in points, of the picture.
190740
+ When not provided, the default value is 72 points (1 inch).
190741
+ Throws an `InvalidArgument` exception when set with a negative value.
190742
+ *
190743
+ * @remarks
190744
+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
190745
+ * @beta
190746
+ */
190747
+ height?: number;
190748
+ /**
190749
+ * Specifies the distance, in points, from the left side of the picture to the left side of the slide.
190750
+ When not provided, the default value is 0.
190751
+ *
190752
+ * @remarks
190753
+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
190754
+ * @beta
190755
+ */
190756
+ left?: number;
190757
+ /**
190758
+ * Specifies the distance, in points, from the top edge of the picture to the top edge of the slide.
190759
+ When not provided, the default value is 0.
190760
+ *
190761
+ * @remarks
190762
+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
190763
+ * @beta
190764
+ */
190765
+ top?: number;
190766
+ /**
190767
+ * Specifies the width, in points, of the picture.
190768
+ When not provided, the default value is 72 points (1 inch).
190769
+ Throws an `InvalidArgument` exception when set with a negative value.
190770
+ *
190771
+ * @remarks
190772
+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
190773
+ * @beta
190774
+ */
190775
+ width?: number;
190776
+ }
190663
190777
  /**
190664
190778
  * Represents the available options when adding shapes.
190665
190779
  *
@@ -192874,6 +192988,18 @@ declare namespace PowerPoint {
192874
192988
  * @returns The newly inserted shape.
192875
192989
  */
192876
192990
  addLine(connectorType?: "Straight" | "Elbow" | "Curve", options?: PowerPoint.ShapeAddOptions): PowerPoint.Shape;
192991
+ /**
192992
+ * Adds a picture to the slide. Returns a `Shape` object that represents the new picture.
192993
+ *
192994
+ * @remarks
192995
+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
192996
+ * @beta
192997
+ *
192998
+ * @param base64EncodedImage The base64-encoded image data.
192999
+ * @param options Optional. Additional options such as the position of the picture.
193000
+ * @returns The newly inserted shape.
193001
+ */
193002
+ addPicture(base64EncodedImage: string, options?: PowerPoint.PictureAddOptions): PowerPoint.Shape;
192877
193003
  /**
192878
193004
  * Adds a table to the slide. Returns a `Shape` object that represents the new table.
192879
193005
  Use the `Shape.table` property to get the `Table` object for the shape.
@@ -194368,6 +194494,15 @@ declare namespace PowerPoint {
194368
194494
  * [Api set: PowerPointApi 1.8]
194369
194495
  */
194370
194496
  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";
194497
+ /**
194498
+ * Deletes the slide layout from the presentation. Does nothing if the slide layout doesn't exist.
194499
+ Throws the `GeneralException` error if the slide layout is in use.
194500
+ *
194501
+ * @remarks
194502
+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
194503
+ * @beta
194504
+ */
194505
+ delete(): void;
194371
194506
  /**
194372
194507
  * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
194373
194508
  *
@@ -194570,6 +194705,15 @@ declare namespace PowerPoint {
194570
194705
  * [Api set: PowerPointApi 1.3]
194571
194706
  */
194572
194707
  readonly name: string;
194708
+ /**
194709
+ * Deletes the slide master and all child layouts from the presentation. Does nothing if the slide master doesn't exist.
194710
+ Throws the `GeneralException` error if the slide master is in use.
194711
+ *
194712
+ * @remarks
194713
+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
194714
+ * @beta
194715
+ */
194716
+ delete(): void;
194573
194717
  /**
194574
194718
  * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
194575
194719
  *
@@ -195454,6 +195598,14 @@ declare namespace PowerPoint {
195454
195598
  * [Api set: PowerPointApi 1.3]
195455
195599
  */
195456
195600
  delete(): void;
195601
+ /**
195602
+ * 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}.
195603
+ *
195604
+ * @remarks
195605
+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
195606
+ * @beta
195607
+ */
195608
+ getGraphicOrNullObject(): PowerPoint.Graphic;
195457
195609
  /**
195458
195610
  * Renders an image of the shape.
195459
195611
  *
@@ -196348,6 +196500,23 @@ declare namespace PowerPoint {
196348
196500
  */
196349
196501
  toJSON(): PowerPoint.Interfaces.SlideScopedCollectionData;
196350
196502
  }
196503
+ /**
196504
+ * Provides information about the slide selection changed event.
196505
+ *
196506
+ * @remarks
196507
+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
196508
+ * @beta
196509
+ */
196510
+ interface SlideSelectionChangedEventArgs {
196511
+ /**
196512
+ * Gets the array of IDs of the currently selected slides.
196513
+ *
196514
+ * @remarks
196515
+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
196516
+ * @beta
196517
+ */
196518
+ slideIds: string[];
196519
+ }
196351
196520
  /**
196352
196521
  * Represents the collection of Slide Masters in the presentation.
196353
196522
  *
@@ -197346,6 +197515,9 @@ declare namespace PowerPoint {
197346
197515
  interface CustomXmlPartCollectionData {
197347
197516
  items?: PowerPoint.Interfaces.CustomXmlPartData[];
197348
197517
  }
197518
+ /** An interface describing the data returned by calling `graphic.toJSON()`. */
197519
+ interface GraphicData {
197520
+ }
197349
197521
  /** An interface describing the data returned by calling `hyperlinkScopedCollection.toJSON()`. */
197350
197522
  interface HyperlinkScopedCollectionData {
197351
197523
  items?: PowerPoint.Interfaces.HyperlinkData[];
@@ -198633,6 +198805,27 @@ declare namespace PowerPoint {
198633
198805
  */
198634
198806
  namespaceUri?: boolean;
198635
198807
  }
198808
+ /**
198809
+ * Represents a graphic object in PowerPoint.
198810
+ *
198811
+ * @remarks
198812
+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
198813
+ * @beta
198814
+ */
198815
+ interface GraphicLoadOptions {
198816
+ /**
198817
+ 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`).
198818
+ */
198819
+ $all?: boolean;
198820
+ /**
198821
+ * Returns the `Shape` object associated with the graphic.
198822
+ *
198823
+ * @remarks
198824
+ * [Api set: PowerPointApi BETA (PREVIEW ONLY)]
198825
+ * @beta
198826
+ */
198827
+ shape?: PowerPoint.Interfaces.ShapeLoadOptions;
198828
+ }
198636
198829
  /**
198637
198830
  * Represents a scoped collection of hyperlinks.
198638
198831
  *
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/office-js-preview",
3
- "version": "1.0.679",
3
+ "version": "1.0.680",
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": "a722d854f13fd821cfc8fdfed15d70787c913951d03a64684eda84a876c78f6f",
50
50
  "typeScriptVersion": "5.2",
51
51
  "nonNpm": true
52
52
  }