@types/office-js 1.0.298 → 1.0.300
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 +1 -1
- office-js/index.d.ts +484 -25
- office-js/package.json +2 -2
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:
|
|
11
|
+
* Last updated: Mon, 14 Nov 2022 16:32:54 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `Excel`, `Office`, `OfficeCore`, `OfficeExtension`, `OneNote`, `PowerPoint`, `Visio`, `Word`
|
|
14
14
|
|
office-js/index.d.ts
CHANGED
|
@@ -13143,7 +13143,7 @@ declare namespace Office {
|
|
|
13143
13143
|
* The `InternetHeaders` object represents custom internet headers that are preserved after the message item leaves Exchange
|
|
13144
13144
|
* and is converted to a MIME message. These headers are stored as x-headers in the MIME message.
|
|
13145
13145
|
*
|
|
13146
|
-
* Internet headers are stored as key
|
|
13146
|
+
* Internet headers are stored as string key-value pairs on a per-item basis.
|
|
13147
13147
|
*
|
|
13148
13148
|
* **Note**: This object is intended for you to set and get your custom headers on a message item. To learn more, see
|
|
13149
13149
|
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/internet-headers | Get and set internet headers on a message in an Outlook add-in}.
|
|
@@ -13173,8 +13173,8 @@ declare namespace Office {
|
|
|
13173
13173
|
*/
|
|
13174
13174
|
interface InternetHeaders {
|
|
13175
13175
|
/**
|
|
13176
|
-
* Given an array of internet header names, this method returns a
|
|
13177
|
-
* If the add-in requests an x-header that
|
|
13176
|
+
* Given an array of internet header names, this method returns a record containing those internet headers and their values.
|
|
13177
|
+
* If the add-in requests an x-header that isn't available, that x-header will not be returned in the results.
|
|
13178
13178
|
*
|
|
13179
13179
|
* **Note**: This method is intended to return the values of the custom headers you set using the `setAsync` method.
|
|
13180
13180
|
*
|
|
@@ -13188,13 +13188,14 @@ declare namespace Office {
|
|
|
13188
13188
|
* @param names - The names of the internet headers to be returned.
|
|
13189
13189
|
* @param options - An object literal that contains one or more of the following properties:-
|
|
13190
13190
|
* `asyncContext`: Developers can provide any object they wish to access in the callback function.
|
|
13191
|
-
* @param callback -
|
|
13192
|
-
* `asyncResult`,
|
|
13191
|
+
* @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter,
|
|
13192
|
+
* `asyncResult`, of type `Office.AsyncResult`. The string key-value pairs of internet headers are returned in the
|
|
13193
|
+
* `asyncResult.value` property. Any errors encountered are provided in the `asyncResult.error` property.
|
|
13193
13194
|
*/
|
|
13194
|
-
getAsync(names: string[], options: Office.AsyncContextOptions, callback
|
|
13195
|
+
getAsync(names: string[], options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult<Record<string, string>>) => void): void;
|
|
13195
13196
|
/**
|
|
13196
|
-
* Given an array of internet header names, this method returns a
|
|
13197
|
-
* If the add-in requests an x-header that
|
|
13197
|
+
* Given an array of internet header names, this method returns a record containing those internet headers and their values.
|
|
13198
|
+
* If the add-in requests an x-header that isn't available, that x-header will not be returned in the results.
|
|
13198
13199
|
*
|
|
13199
13200
|
* **Note**: This method is intended to return the values of the custom headers you set using the `setAsync` method.
|
|
13200
13201
|
*
|
|
@@ -13206,10 +13207,11 @@ declare namespace Office {
|
|
|
13206
13207
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
|
|
13207
13208
|
*
|
|
13208
13209
|
* @param names - The names of the internet headers to be returned.
|
|
13209
|
-
* @param callback -
|
|
13210
|
-
* `asyncResult`,
|
|
13210
|
+
* @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter,
|
|
13211
|
+
* `asyncResult`, of type `Office.AsyncResult`. The string key-value pairs of internet headers are returned in the
|
|
13212
|
+
* `asyncResult.value` property. Any errors encountered are provided in the `asyncResult.error` property.
|
|
13211
13213
|
*/
|
|
13212
|
-
getAsync(names: string[], callback
|
|
13214
|
+
getAsync(names: string[], callback: (asyncResult: Office.AsyncResult<Record<string, string>>) => void): void;
|
|
13213
13215
|
/**
|
|
13214
13216
|
* Given an array of internet header names, this method removes the specified headers from the internet header collection.
|
|
13215
13217
|
*
|
|
@@ -13226,9 +13228,9 @@ declare namespace Office {
|
|
|
13226
13228
|
* @param options - An object literal that contains one or more of the following properties:-
|
|
13227
13229
|
* `asyncContext`: Developers can provide any object they wish to access in the callback function.
|
|
13228
13230
|
* @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter,
|
|
13229
|
-
* `asyncResult`,
|
|
13231
|
+
* `asyncResult`, of type `Office.AsyncResult`. Any errors encountered are provided in the `asyncResult.error` property.
|
|
13230
13232
|
*/
|
|
13231
|
-
removeAsync(names: string[], options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult<
|
|
13233
|
+
removeAsync(names: string[], options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
|
|
13232
13234
|
/**
|
|
13233
13235
|
* Given an array of internet header names, this method removes the specified headers from the internet header collection.
|
|
13234
13236
|
*
|
|
@@ -13243,9 +13245,9 @@ declare namespace Office {
|
|
|
13243
13245
|
*
|
|
13244
13246
|
* @param names - The names of the internet headers to be removed.
|
|
13245
13247
|
* @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter,
|
|
13246
|
-
* `asyncResult`,
|
|
13248
|
+
* `asyncResult`, of type `Office.AsyncResult`. Any errors encountered are provided in the `asyncResult.error` property.
|
|
13247
13249
|
*/
|
|
13248
|
-
removeAsync(names: string[], callback?: (asyncResult: Office.AsyncResult<
|
|
13250
|
+
removeAsync(names: string[], callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
|
|
13249
13251
|
/**
|
|
13250
13252
|
* Sets the specified internet headers to the specified values.
|
|
13251
13253
|
*
|
|
@@ -13267,14 +13269,14 @@ declare namespace Office {
|
|
|
13267
13269
|
*
|
|
13268
13270
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
|
|
13269
13271
|
*
|
|
13270
|
-
* @param headers - The names and corresponding values of the headers to be set.
|
|
13271
|
-
*
|
|
13272
|
+
* @param headers - The names and corresponding values of the headers to be set. This should be a record object with its keys being internet header names
|
|
13273
|
+
* and values being the corresponding header value strings.
|
|
13272
13274
|
* @param options - An object literal that contains one or more of the following properties:-
|
|
13273
13275
|
* `asyncContext`: Developers can provide any object they wish to access in the callback function.
|
|
13274
|
-
* @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter
|
|
13275
|
-
*
|
|
13276
|
+
* @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter,
|
|
13277
|
+
* `asyncResult`, of type `Office.AsyncResult`. Any errors encountered are provided in the `asyncResult.error` property.
|
|
13276
13278
|
*/
|
|
13277
|
-
setAsync(headers:
|
|
13279
|
+
setAsync(headers: Record<string, string>, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
|
|
13278
13280
|
/**
|
|
13279
13281
|
* Sets the specified internet headers to the specified values.
|
|
13280
13282
|
*
|
|
@@ -13296,12 +13298,12 @@ declare namespace Office {
|
|
|
13296
13298
|
*
|
|
13297
13299
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
|
|
13298
13300
|
*
|
|
13299
|
-
* @param headers - The names and corresponding values of the headers to be set.
|
|
13300
|
-
*
|
|
13301
|
-
* @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter
|
|
13302
|
-
*
|
|
13301
|
+
* @param headers - The names and corresponding values of the headers to be set. This should be a record object with its keys being internet header names
|
|
13302
|
+
* and values being the corresponding header value strings.
|
|
13303
|
+
* @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter,
|
|
13304
|
+
* `asyncResult`, of type `Office.AsyncResult`. Any errors encountered are provided in the `asyncResult.error` property.
|
|
13303
13305
|
*/
|
|
13304
|
-
setAsync(headers:
|
|
13306
|
+
setAsync(headers: Record<string, string>, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
|
|
13305
13307
|
}
|
|
13306
13308
|
/**
|
|
13307
13309
|
* The item namespace is used to access the currently selected message, meeting request, or appointment.
|
|
@@ -107352,6 +107354,39 @@ declare namespace PowerPoint {
|
|
|
107352
107354
|
*/
|
|
107353
107355
|
readonly tags: PowerPoint.TagCollection;
|
|
107354
107356
|
readonly title: string;
|
|
107357
|
+
/**
|
|
107358
|
+
* Returns the selected shapes in the current slide of the presentation.
|
|
107359
|
+
If no shapes are selected, an empty collection is returned.
|
|
107360
|
+
*
|
|
107361
|
+
* @remarks
|
|
107362
|
+
* [Api set: PowerPointApi 1.5]
|
|
107363
|
+
*/
|
|
107364
|
+
getSelectedShapes(): PowerPoint.ShapeScopedCollection;
|
|
107365
|
+
/**
|
|
107366
|
+
* Returns the selected slides in the current view of the presentation.
|
|
107367
|
+
The first item in the collection is the active slide that is visible in the editing area.
|
|
107368
|
+
If no slides are selected, an empty collection is returned.
|
|
107369
|
+
*
|
|
107370
|
+
* @remarks
|
|
107371
|
+
* [Api set: PowerPointApi 1.5]
|
|
107372
|
+
*/
|
|
107373
|
+
getSelectedSlides(): PowerPoint.SlideScopedCollection;
|
|
107374
|
+
/**
|
|
107375
|
+
* Returns the selected {@link PowerPoint.TextRange} in the current view of the presentation.
|
|
107376
|
+
Throws an exception if no text is selected.
|
|
107377
|
+
*
|
|
107378
|
+
* @remarks
|
|
107379
|
+
* [Api set: PowerPointApi 1.5]
|
|
107380
|
+
*/
|
|
107381
|
+
getSelectedTextRange(): PowerPoint.TextRange;
|
|
107382
|
+
/**
|
|
107383
|
+
* Returns the selected {@link PowerPoint.TextRange} in the current view of the presentation.
|
|
107384
|
+
If no text is selected, an object with an `isNullObject` property set to `true` is returned.
|
|
107385
|
+
*
|
|
107386
|
+
* @remarks
|
|
107387
|
+
* [Api set: PowerPointApi 1.5]
|
|
107388
|
+
*/
|
|
107389
|
+
getSelectedTextRangeOrNullObject(): PowerPoint.TextRange;
|
|
107355
107390
|
/**
|
|
107356
107391
|
* Inserts the specified slides from a presentation into the current presentation.
|
|
107357
107392
|
*
|
|
@@ -107362,6 +107397,15 @@ declare namespace PowerPoint {
|
|
|
107362
107397
|
* @param options The options that define which slides will be inserted, where the new slides will go, and which presentation's formatting will be used.
|
|
107363
107398
|
*/
|
|
107364
107399
|
insertSlidesFromBase64(base64File: string, options?: PowerPoint.InsertSlideOptions): void;
|
|
107400
|
+
/**
|
|
107401
|
+
* Selects the slides in the current view of the presentation. Existing slide selection is replaced with the new selection.
|
|
107402
|
+
*
|
|
107403
|
+
* @remarks
|
|
107404
|
+
* [Api set: PowerPointApi 1.5]
|
|
107405
|
+
*
|
|
107406
|
+
* @param slideIds List of slide IDs to select in the presentation. If the list is empty, selection is cleared.
|
|
107407
|
+
*/
|
|
107408
|
+
setSelectedSlides(slideIds: string[]): void;
|
|
107365
107409
|
/**
|
|
107366
107410
|
* Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
|
|
107367
107411
|
*
|
|
@@ -109268,6 +109312,15 @@ declare namespace PowerPoint {
|
|
|
109268
109312
|
* [Api set: PowerPointApi 1.2]
|
|
109269
109313
|
*/
|
|
109270
109314
|
delete(): void;
|
|
109315
|
+
/**
|
|
109316
|
+
* Selects the specified shapes. Existing shape selection is replaced with the new selection.
|
|
109317
|
+
*
|
|
109318
|
+
* @remarks
|
|
109319
|
+
* [Api set: PowerPointApi 1.5]
|
|
109320
|
+
*
|
|
109321
|
+
* @param shapeIds List of shape IDs to select in the slide. If the list is empty, the selection is cleared.
|
|
109322
|
+
*/
|
|
109323
|
+
setSelectedShapes(shapeIds: string[]): void;
|
|
109271
109324
|
/**
|
|
109272
109325
|
* Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
|
|
109273
109326
|
*
|
|
@@ -109935,6 +109988,22 @@ declare namespace PowerPoint {
|
|
|
109935
109988
|
* [Api set: PowerPointApi 1.4]
|
|
109936
109989
|
*/
|
|
109937
109990
|
readonly paragraphFormat: PowerPoint.ParagraphFormat;
|
|
109991
|
+
/**
|
|
109992
|
+
* Gets or sets the length of the range that this `TextRange` represents.
|
|
109993
|
+
Throws an `InvalidArgument` exception when set with a negative value or if the value is greater than the length of the available text from the starting point.
|
|
109994
|
+
*
|
|
109995
|
+
* @remarks
|
|
109996
|
+
* [Api set: PowerPointApi 1.5]
|
|
109997
|
+
*/
|
|
109998
|
+
length: number;
|
|
109999
|
+
/**
|
|
110000
|
+
* Gets or sets zero-based index, relative to the parent text frame, for the starting position of the range that this `TextRange` represents.
|
|
110001
|
+
Throws an `InvalidArgument` exception when set with a negative value or if the value is greater than the length of the text.
|
|
110002
|
+
*
|
|
110003
|
+
* @remarks
|
|
110004
|
+
* [Api set: PowerPointApi 1.5]
|
|
110005
|
+
*/
|
|
110006
|
+
start: number;
|
|
109938
110007
|
/**
|
|
109939
110008
|
* Represents the plain text content of the text range.
|
|
109940
110009
|
*
|
|
@@ -109942,6 +110011,13 @@ declare namespace PowerPoint {
|
|
|
109942
110011
|
* [Api set: PowerPointApi 1.4]
|
|
109943
110012
|
*/
|
|
109944
110013
|
text: string;
|
|
110014
|
+
/**
|
|
110015
|
+
* Returns the parent {@link PowerPoint.TextFrame} object that holds this `TextRange`.
|
|
110016
|
+
*
|
|
110017
|
+
* @remarks
|
|
110018
|
+
* [Api set: PowerPointApi 1.5]
|
|
110019
|
+
*/
|
|
110020
|
+
getParentTextFrame(): PowerPoint.TextFrame;
|
|
109945
110021
|
/**
|
|
109946
110022
|
* Returns a `TextRange` object for the substring in the given range.
|
|
109947
110023
|
*
|
|
@@ -109952,6 +110028,13 @@ declare namespace PowerPoint {
|
|
|
109952
110028
|
* @param length Optional. The number of characters to be returned in the new text range. If length is omitted, all the characters from start to the end of the text range's last paragraph will be returned.
|
|
109953
110029
|
*/
|
|
109954
110030
|
getSubstring(start: number, length?: number): PowerPoint.TextRange;
|
|
110031
|
+
/**
|
|
110032
|
+
* Selects this `TextRange` in the current view.
|
|
110033
|
+
*
|
|
110034
|
+
* @remarks
|
|
110035
|
+
* [Api set: PowerPointApi 1.5]
|
|
110036
|
+
*/
|
|
110037
|
+
setSelected(): void;
|
|
109955
110038
|
/**
|
|
109956
110039
|
* Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
|
|
109957
110040
|
*
|
|
@@ -110058,6 +110141,13 @@ declare namespace PowerPoint {
|
|
|
110058
110141
|
* [Api set: PowerPointApi 1.4]
|
|
110059
110142
|
*/
|
|
110060
110143
|
deleteText(): void;
|
|
110144
|
+
/**
|
|
110145
|
+
* Returns the parent {@link PowerPoint.Shape} object that holds this `TextFrame`.
|
|
110146
|
+
*
|
|
110147
|
+
* @remarks
|
|
110148
|
+
* [Api set: PowerPointApi 1.5]
|
|
110149
|
+
*/
|
|
110150
|
+
getParentShape(): PowerPoint.Shape;
|
|
110061
110151
|
/**
|
|
110062
110152
|
* Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
|
|
110063
110153
|
*
|
|
@@ -110178,6 +110268,48 @@ declare namespace PowerPoint {
|
|
|
110178
110268
|
* [Api set: PowerPointApi 1.3]
|
|
110179
110269
|
*/
|
|
110180
110270
|
delete(): void;
|
|
110271
|
+
/**
|
|
110272
|
+
* Returns the parent {@link PowerPoint.Slide} object that holds this `Shape`. Throws an exception if this shape does not belong to a `Slide`.
|
|
110273
|
+
*
|
|
110274
|
+
* @remarks
|
|
110275
|
+
* [Api set: PowerPointApi 1.5]
|
|
110276
|
+
*/
|
|
110277
|
+
getParentSlide(): PowerPoint.Slide;
|
|
110278
|
+
/**
|
|
110279
|
+
* Returns the parent {@link PowerPoint.SlideLayout} object that holds this `Shape`. Throws an exception if this shape does not belong to a `SlideLayout`.
|
|
110280
|
+
*
|
|
110281
|
+
* @remarks
|
|
110282
|
+
* [Api set: PowerPointApi 1.5]
|
|
110283
|
+
*/
|
|
110284
|
+
getParentSlideLayout(): PowerPoint.SlideLayout;
|
|
110285
|
+
/**
|
|
110286
|
+
* Returns the parent {@link PowerPoint.SlideLayout} object that holds this `Shape`. If this shape does not belong to a `SlideLayout`, an object with an `isNullObject` property set to `true` is returned.
|
|
110287
|
+
*
|
|
110288
|
+
* @remarks
|
|
110289
|
+
* [Api set: PowerPointApi 1.5]
|
|
110290
|
+
*/
|
|
110291
|
+
getParentSlideLayoutOrNullObject(): PowerPoint.SlideLayout;
|
|
110292
|
+
/**
|
|
110293
|
+
* Returns the parent {@link PowerPoint.SlideMaster} object that holds this `Shape`. Throws an exception if this shape does not belong to a `SlideMaster`.
|
|
110294
|
+
*
|
|
110295
|
+
* @remarks
|
|
110296
|
+
* [Api set: PowerPointApi 1.5]
|
|
110297
|
+
*/
|
|
110298
|
+
getParentSlideMaster(): PowerPoint.SlideMaster;
|
|
110299
|
+
/**
|
|
110300
|
+
* Returns the parent {@link PowerPoint.SlideMaster} object that holds this `Shape`. If this shape does not belong to a `SlideMaster`, an object with an `isNullObject` property set to `true` is returned.
|
|
110301
|
+
*
|
|
110302
|
+
* @remarks
|
|
110303
|
+
* [Api set: PowerPointApi 1.5]
|
|
110304
|
+
*/
|
|
110305
|
+
getParentSlideMasterOrNullObject(): PowerPoint.SlideMaster;
|
|
110306
|
+
/**
|
|
110307
|
+
* Returns the parent {@link PowerPoint.Slide} object that holds this `Shape`. If this shape does not belong to a `Slide`, an object with an `isNullObject` property set to `true` is returned.
|
|
110308
|
+
*
|
|
110309
|
+
* @remarks
|
|
110310
|
+
* [Api set: PowerPointApi 1.5]
|
|
110311
|
+
*/
|
|
110312
|
+
getParentSlideOrNullObject(): PowerPoint.Slide;
|
|
110181
110313
|
/**
|
|
110182
110314
|
* Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
|
|
110183
110315
|
*
|
|
@@ -110205,6 +110337,79 @@ declare namespace PowerPoint {
|
|
|
110205
110337
|
*/
|
|
110206
110338
|
toJSON(): PowerPoint.Interfaces.ShapeData;
|
|
110207
110339
|
}
|
|
110340
|
+
/**
|
|
110341
|
+
* Represents a collection of shapes.
|
|
110342
|
+
*
|
|
110343
|
+
* @remarks
|
|
110344
|
+
* [Api set: PowerPointApi 1.5]
|
|
110345
|
+
*/
|
|
110346
|
+
class ShapeScopedCollection extends OfficeExtension.ClientObject {
|
|
110347
|
+
/** The request context associated with the object. This connects the add-in's process to the Office host application's process. */
|
|
110348
|
+
context: RequestContext;
|
|
110349
|
+
/** Gets the loaded child items in this collection. */
|
|
110350
|
+
readonly items: PowerPoint.Shape[];
|
|
110351
|
+
/**
|
|
110352
|
+
* Gets the number of shapes in the collection.
|
|
110353
|
+
*
|
|
110354
|
+
* @remarks
|
|
110355
|
+
* [Api set: PowerPointApi 1.5]
|
|
110356
|
+
* @returns The number of shapes in the collection.
|
|
110357
|
+
*/
|
|
110358
|
+
getCount(): OfficeExtension.ClientResult<number>;
|
|
110359
|
+
/**
|
|
110360
|
+
* Gets a shape using its unique ID. An error is thrown if the shape does not exist.
|
|
110361
|
+
*
|
|
110362
|
+
* @remarks
|
|
110363
|
+
* [Api set: PowerPointApi 1.5]
|
|
110364
|
+
*
|
|
110365
|
+
* @param key The ID of the shape.
|
|
110366
|
+
* @returns The shape with the unique ID. If such a shape does not exist, an error is thrown.
|
|
110367
|
+
*/
|
|
110368
|
+
getItem(key: string): PowerPoint.Shape;
|
|
110369
|
+
/**
|
|
110370
|
+
* Gets a shape using its zero-based index in the collection. An error is thrown if the index is out of range.
|
|
110371
|
+
*
|
|
110372
|
+
* @remarks
|
|
110373
|
+
* [Api set: PowerPointApi 1.5]
|
|
110374
|
+
*
|
|
110375
|
+
* @param index The index of the shape in the collection.
|
|
110376
|
+
* @returns The shape at the given index. An error is thrown if index is out of range.
|
|
110377
|
+
*/
|
|
110378
|
+
getItemAt(index: number): PowerPoint.Shape;
|
|
110379
|
+
/**
|
|
110380
|
+
* Gets a shape using its unique ID. If such a shape does not exist, an object with an `isNullObject` property set to true is returned.
|
|
110381
|
+
*
|
|
110382
|
+
* @remarks
|
|
110383
|
+
* [Api set: PowerPointApi 1.5]
|
|
110384
|
+
*
|
|
110385
|
+
* @param id The ID of the shape.
|
|
110386
|
+
* @returns The shape with the unique ID. If such a shape does not exist, an object with an `isNullObject` property set to true is returned.
|
|
110387
|
+
*/
|
|
110388
|
+
getItemOrNullObject(id: string): PowerPoint.Shape;
|
|
110389
|
+
/**
|
|
110390
|
+
* Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
|
|
110391
|
+
*
|
|
110392
|
+
* @param options Provides options for which properties of the object to load.
|
|
110393
|
+
*/
|
|
110394
|
+
load(options?: PowerPoint.Interfaces.ShapeScopedCollectionLoadOptions & PowerPoint.Interfaces.CollectionLoadOptions): PowerPoint.ShapeScopedCollection;
|
|
110395
|
+
/**
|
|
110396
|
+
* Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
|
|
110397
|
+
*
|
|
110398
|
+
* @param propertyNames A comma-delimited string or an array of strings that specify the properties to load.
|
|
110399
|
+
*/
|
|
110400
|
+
load(propertyNames?: string | string[]): PowerPoint.ShapeScopedCollection;
|
|
110401
|
+
/**
|
|
110402
|
+
* Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
|
|
110403
|
+
*
|
|
110404
|
+
* @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.
|
|
110405
|
+
*/
|
|
110406
|
+
load(propertyNamesAndPaths?: OfficeExtension.LoadOption): PowerPoint.ShapeScopedCollection;
|
|
110407
|
+
/**
|
|
110408
|
+
* 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.)
|
|
110409
|
+
* Whereas the original `PowerPoint.ShapeScopedCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.ShapeScopedCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items.
|
|
110410
|
+
*/
|
|
110411
|
+
toJSON(): PowerPoint.Interfaces.ShapeScopedCollectionData;
|
|
110412
|
+
}
|
|
110208
110413
|
/**
|
|
110209
110414
|
* Represents the collection of slides in the presentation.
|
|
110210
110415
|
*
|
|
@@ -110290,6 +110495,81 @@ declare namespace PowerPoint {
|
|
|
110290
110495
|
*/
|
|
110291
110496
|
toJSON(): PowerPoint.Interfaces.SlideCollectionData;
|
|
110292
110497
|
}
|
|
110498
|
+
/**
|
|
110499
|
+
* Represents a collection of slides in the presentation.
|
|
110500
|
+
*
|
|
110501
|
+
* @remarks
|
|
110502
|
+
* [Api set: PowerPointApi 1.5]
|
|
110503
|
+
*/
|
|
110504
|
+
class SlideScopedCollection extends OfficeExtension.ClientObject {
|
|
110505
|
+
/** The request context associated with the object. This connects the add-in's process to the Office host application's process. */
|
|
110506
|
+
context: RequestContext;
|
|
110507
|
+
/** Gets the loaded child items in this collection. */
|
|
110508
|
+
readonly items: PowerPoint.Slide[];
|
|
110509
|
+
/**
|
|
110510
|
+
* Gets the number of slides in the collection.
|
|
110511
|
+
*
|
|
110512
|
+
* @remarks
|
|
110513
|
+
* [Api set: PowerPointApi 1.5]
|
|
110514
|
+
* @returns The number of slides in the collection.
|
|
110515
|
+
*/
|
|
110516
|
+
getCount(): OfficeExtension.ClientResult<number>;
|
|
110517
|
+
/**
|
|
110518
|
+
* Gets a slide using its unique ID.
|
|
110519
|
+
*
|
|
110520
|
+
* @remarks
|
|
110521
|
+
* [Api set: PowerPointApi 1.5]
|
|
110522
|
+
*
|
|
110523
|
+
* @param key The ID of the slide.
|
|
110524
|
+
* @returns The slide with the unique ID. If such a slide does not exist, an error is thrown.
|
|
110525
|
+
*/
|
|
110526
|
+
getItem(key: string): PowerPoint.Slide;
|
|
110527
|
+
/**
|
|
110528
|
+
* Gets a slide using its zero-based index in the collection.
|
|
110529
|
+
*
|
|
110530
|
+
* @remarks
|
|
110531
|
+
* [Api set: PowerPointApi 1.5]
|
|
110532
|
+
*
|
|
110533
|
+
* @param index The index of the slide in the collection.
|
|
110534
|
+
* @returns The slide at the given index. An error is thrown if index is out of range.
|
|
110535
|
+
*/
|
|
110536
|
+
getItemAt(index: number): PowerPoint.Slide;
|
|
110537
|
+
/**
|
|
110538
|
+
* Gets a slide using its unique ID. If such a slide does not exist, an object with an `isNullObject` property set to true is returned. For further information,
|
|
110539
|
+
see {@link https://docs.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods
|
|
110540
|
+
and properties}.
|
|
110541
|
+
*
|
|
110542
|
+
* @remarks
|
|
110543
|
+
* [Api set: PowerPointApi 1.5]
|
|
110544
|
+
*
|
|
110545
|
+
* @param id The ID of the slide.
|
|
110546
|
+
* @returns The slide with the unique ID.
|
|
110547
|
+
*/
|
|
110548
|
+
getItemOrNullObject(id: string): PowerPoint.Slide;
|
|
110549
|
+
/**
|
|
110550
|
+
* Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
|
|
110551
|
+
*
|
|
110552
|
+
* @param options Provides options for which properties of the object to load.
|
|
110553
|
+
*/
|
|
110554
|
+
load(options?: PowerPoint.Interfaces.SlideScopedCollectionLoadOptions & PowerPoint.Interfaces.CollectionLoadOptions): PowerPoint.SlideScopedCollection;
|
|
110555
|
+
/**
|
|
110556
|
+
* Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
|
|
110557
|
+
*
|
|
110558
|
+
* @param propertyNames A comma-delimited string or an array of strings that specify the properties to load.
|
|
110559
|
+
*/
|
|
110560
|
+
load(propertyNames?: string | string[]): PowerPoint.SlideScopedCollection;
|
|
110561
|
+
/**
|
|
110562
|
+
* Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
|
|
110563
|
+
*
|
|
110564
|
+
* @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.
|
|
110565
|
+
*/
|
|
110566
|
+
load(propertyNamesAndPaths?: OfficeExtension.LoadOption): PowerPoint.SlideScopedCollection;
|
|
110567
|
+
/**
|
|
110568
|
+
* 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.)
|
|
110569
|
+
* Whereas the original `PowerPoint.SlideScopedCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.SlideScopedCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items.
|
|
110570
|
+
*/
|
|
110571
|
+
toJSON(): PowerPoint.Interfaces.SlideScopedCollectionData;
|
|
110572
|
+
}
|
|
110293
110573
|
/**
|
|
110294
110574
|
* Represents the collection of Slide Masters in the presentation.
|
|
110295
110575
|
*
|
|
@@ -110532,6 +110812,22 @@ declare namespace PowerPoint {
|
|
|
110532
110812
|
}
|
|
110533
110813
|
/** An interface for updating data on the TextRange object, for use in `textRange.set({ ... })`. */
|
|
110534
110814
|
interface TextRangeUpdateData {
|
|
110815
|
+
/**
|
|
110816
|
+
* Gets or sets the length of the range that this `TextRange` represents.
|
|
110817
|
+
Throws an `InvalidArgument` exception when set with a negative value or if the value is greater than the length of the available text from the starting point.
|
|
110818
|
+
*
|
|
110819
|
+
* @remarks
|
|
110820
|
+
* [Api set: PowerPointApi 1.5]
|
|
110821
|
+
*/
|
|
110822
|
+
length?: number;
|
|
110823
|
+
/**
|
|
110824
|
+
* Gets or sets zero-based index, relative to the parent text frame, for the starting position of the range that this `TextRange` represents.
|
|
110825
|
+
Throws an `InvalidArgument` exception when set with a negative value or if the value is greater than the length of the text.
|
|
110826
|
+
*
|
|
110827
|
+
* @remarks
|
|
110828
|
+
* [Api set: PowerPointApi 1.5]
|
|
110829
|
+
*/
|
|
110830
|
+
start?: number;
|
|
110535
110831
|
/**
|
|
110536
110832
|
* Represents the plain text content of the text range.
|
|
110537
110833
|
*
|
|
@@ -110630,10 +110926,18 @@ declare namespace PowerPoint {
|
|
|
110630
110926
|
*/
|
|
110631
110927
|
width?: number;
|
|
110632
110928
|
}
|
|
110929
|
+
/** An interface for updating data on the ShapeScopedCollection object, for use in `shapeScopedCollection.set({ ... })`. */
|
|
110930
|
+
interface ShapeScopedCollectionUpdateData {
|
|
110931
|
+
items?: PowerPoint.Interfaces.ShapeData[];
|
|
110932
|
+
}
|
|
110633
110933
|
/** An interface for updating data on the SlideCollection object, for use in `slideCollection.set({ ... })`. */
|
|
110634
110934
|
interface SlideCollectionUpdateData {
|
|
110635
110935
|
items?: PowerPoint.Interfaces.SlideData[];
|
|
110636
110936
|
}
|
|
110937
|
+
/** An interface for updating data on the SlideScopedCollection object, for use in `slideScopedCollection.set({ ... })`. */
|
|
110938
|
+
interface SlideScopedCollectionUpdateData {
|
|
110939
|
+
items?: PowerPoint.Interfaces.SlideData[];
|
|
110940
|
+
}
|
|
110637
110941
|
/** An interface for updating data on the SlideMasterCollection object, for use in `slideMasterCollection.set({ ... })`. */
|
|
110638
110942
|
interface SlideMasterCollectionUpdateData {
|
|
110639
110943
|
items?: PowerPoint.Interfaces.SlideMasterData[];
|
|
@@ -110851,6 +111155,22 @@ declare namespace PowerPoint {
|
|
|
110851
111155
|
}
|
|
110852
111156
|
/** An interface describing the data returned by calling `textRange.toJSON()`. */
|
|
110853
111157
|
interface TextRangeData {
|
|
111158
|
+
/**
|
|
111159
|
+
* Gets or sets the length of the range that this `TextRange` represents.
|
|
111160
|
+
Throws an `InvalidArgument` exception when set with a negative value or if the value is greater than the length of the available text from the starting point.
|
|
111161
|
+
*
|
|
111162
|
+
* @remarks
|
|
111163
|
+
* [Api set: PowerPointApi 1.5]
|
|
111164
|
+
*/
|
|
111165
|
+
length?: number;
|
|
111166
|
+
/**
|
|
111167
|
+
* Gets or sets zero-based index, relative to the parent text frame, for the starting position of the range that this `TextRange` represents.
|
|
111168
|
+
Throws an `InvalidArgument` exception when set with a negative value or if the value is greater than the length of the text.
|
|
111169
|
+
*
|
|
111170
|
+
* @remarks
|
|
111171
|
+
* [Api set: PowerPointApi 1.5]
|
|
111172
|
+
*/
|
|
111173
|
+
start?: number;
|
|
110854
111174
|
/**
|
|
110855
111175
|
* Represents the plain text content of the text range.
|
|
110856
111176
|
*
|
|
@@ -110970,10 +111290,18 @@ declare namespace PowerPoint {
|
|
|
110970
111290
|
*/
|
|
110971
111291
|
width?: number;
|
|
110972
111292
|
}
|
|
111293
|
+
/** An interface describing the data returned by calling `shapeScopedCollection.toJSON()`. */
|
|
111294
|
+
interface ShapeScopedCollectionData {
|
|
111295
|
+
items?: PowerPoint.Interfaces.ShapeData[];
|
|
111296
|
+
}
|
|
110973
111297
|
/** An interface describing the data returned by calling `slideCollection.toJSON()`. */
|
|
110974
111298
|
interface SlideCollectionData {
|
|
110975
111299
|
items?: PowerPoint.Interfaces.SlideData[];
|
|
110976
111300
|
}
|
|
111301
|
+
/** An interface describing the data returned by calling `slideScopedCollection.toJSON()`. */
|
|
111302
|
+
interface SlideScopedCollectionData {
|
|
111303
|
+
items?: PowerPoint.Interfaces.SlideData[];
|
|
111304
|
+
}
|
|
110977
111305
|
/** An interface describing the data returned by calling `slideMasterCollection.toJSON()`. */
|
|
110978
111306
|
interface SlideMasterCollectionData {
|
|
110979
111307
|
items?: PowerPoint.Interfaces.SlideMasterData[];
|
|
@@ -111445,6 +111773,22 @@ declare namespace PowerPoint {
|
|
|
111445
111773
|
* [Api set: PowerPointApi 1.4]
|
|
111446
111774
|
*/
|
|
111447
111775
|
paragraphFormat?: PowerPoint.Interfaces.ParagraphFormatLoadOptions;
|
|
111776
|
+
/**
|
|
111777
|
+
* Gets or sets the length of the range that this `TextRange` represents.
|
|
111778
|
+
Throws an `InvalidArgument` exception when set with a negative value or if the value is greater than the length of the available text from the starting point.
|
|
111779
|
+
*
|
|
111780
|
+
* @remarks
|
|
111781
|
+
* [Api set: PowerPointApi 1.5]
|
|
111782
|
+
*/
|
|
111783
|
+
length?: boolean;
|
|
111784
|
+
/**
|
|
111785
|
+
* Gets or sets zero-based index, relative to the parent text frame, for the starting position of the range that this `TextRange` represents.
|
|
111786
|
+
Throws an `InvalidArgument` exception when set with a negative value or if the value is greater than the length of the text.
|
|
111787
|
+
*
|
|
111788
|
+
* @remarks
|
|
111789
|
+
* [Api set: PowerPointApi 1.5]
|
|
111790
|
+
*/
|
|
111791
|
+
start?: boolean;
|
|
111448
111792
|
/**
|
|
111449
111793
|
* Represents the plain text content of the text range.
|
|
111450
111794
|
*
|
|
@@ -111610,6 +111954,88 @@ declare namespace PowerPoint {
|
|
|
111610
111954
|
*/
|
|
111611
111955
|
width?: boolean;
|
|
111612
111956
|
}
|
|
111957
|
+
/**
|
|
111958
|
+
* Represents a collection of shapes.
|
|
111959
|
+
*
|
|
111960
|
+
* @remarks
|
|
111961
|
+
* [Api set: PowerPointApi 1.3]
|
|
111962
|
+
*/
|
|
111963
|
+
interface ShapeScopedCollectionLoadOptions {
|
|
111964
|
+
/**
|
|
111965
|
+
Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`).
|
|
111966
|
+
*/
|
|
111967
|
+
$all?: boolean;
|
|
111968
|
+
/**
|
|
111969
|
+
* For EACH ITEM in the collection: Returns the fill formatting of this shape.
|
|
111970
|
+
*
|
|
111971
|
+
* @remarks
|
|
111972
|
+
* [Api set: PowerPointApi 1.4]
|
|
111973
|
+
*/
|
|
111974
|
+
fill?: PowerPoint.Interfaces.ShapeFillLoadOptions;
|
|
111975
|
+
/**
|
|
111976
|
+
* For EACH ITEM in the collection: Returns the line formatting of this shape.
|
|
111977
|
+
*
|
|
111978
|
+
* @remarks
|
|
111979
|
+
* [Api set: PowerPointApi 1.4]
|
|
111980
|
+
*/
|
|
111981
|
+
lineFormat?: PowerPoint.Interfaces.ShapeLineFormatLoadOptions;
|
|
111982
|
+
/**
|
|
111983
|
+
* For EACH ITEM in the collection: Returns the text frame object of this shape.
|
|
111984
|
+
*
|
|
111985
|
+
* @remarks
|
|
111986
|
+
* [Api set: PowerPointApi 1.4]
|
|
111987
|
+
*/
|
|
111988
|
+
textFrame?: PowerPoint.Interfaces.TextFrameLoadOptions;
|
|
111989
|
+
/**
|
|
111990
|
+
* For EACH ITEM in the collection: Specifies the height, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value.
|
|
111991
|
+
*
|
|
111992
|
+
* @remarks
|
|
111993
|
+
* [Api set: PowerPointApi 1.4]
|
|
111994
|
+
*/
|
|
111995
|
+
height?: boolean;
|
|
111996
|
+
/**
|
|
111997
|
+
* For EACH ITEM in the collection: Gets the unique ID of the shape.
|
|
111998
|
+
*
|
|
111999
|
+
* @remarks
|
|
112000
|
+
* [Api set: PowerPointApi 1.3]
|
|
112001
|
+
*/
|
|
112002
|
+
id?: boolean;
|
|
112003
|
+
/**
|
|
112004
|
+
* For EACH ITEM in the collection: The distance, in points, from the left side of the shape to the left side of the slide.
|
|
112005
|
+
*
|
|
112006
|
+
* @remarks
|
|
112007
|
+
* [Api set: PowerPointApi 1.4]
|
|
112008
|
+
*/
|
|
112009
|
+
left?: boolean;
|
|
112010
|
+
/**
|
|
112011
|
+
* For EACH ITEM in the collection: Specifies the name of this shape.
|
|
112012
|
+
*
|
|
112013
|
+
* @remarks
|
|
112014
|
+
* [Api set: PowerPointApi 1.4]
|
|
112015
|
+
*/
|
|
112016
|
+
name?: boolean;
|
|
112017
|
+
/**
|
|
112018
|
+
* For EACH ITEM in the collection: The distance, in points, from the top edge of the shape to the top edge of the slide.
|
|
112019
|
+
*
|
|
112020
|
+
* @remarks
|
|
112021
|
+
* [Api set: PowerPointApi 1.4]
|
|
112022
|
+
*/
|
|
112023
|
+
top?: boolean;
|
|
112024
|
+
/**
|
|
112025
|
+
* For EACH ITEM in the collection: Returns the type of this shape. See {@link PowerPoint.ShapeType} for details.
|
|
112026
|
+
*
|
|
112027
|
+
* @remarks
|
|
112028
|
+
* [Api set: PowerPointApi 1.4]
|
|
112029
|
+
*/
|
|
112030
|
+
type?: boolean;
|
|
112031
|
+
/**
|
|
112032
|
+
* For EACH ITEM in the collection: Specifies the width, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value.
|
|
112033
|
+
*
|
|
112034
|
+
* @remarks
|
|
112035
|
+
* [Api set: PowerPointApi 1.4]
|
|
112036
|
+
*/
|
|
112037
|
+
width?: boolean;
|
|
112038
|
+
}
|
|
111613
112039
|
/**
|
|
111614
112040
|
* Represents the collection of slides in the presentation.
|
|
111615
112041
|
*
|
|
@@ -111643,6 +112069,39 @@ declare namespace PowerPoint {
|
|
|
111643
112069
|
*/
|
|
111644
112070
|
id?: boolean;
|
|
111645
112071
|
}
|
|
112072
|
+
/**
|
|
112073
|
+
* Represents a collection of slides in the presentation.
|
|
112074
|
+
*
|
|
112075
|
+
* @remarks
|
|
112076
|
+
* [Api set: PowerPointApi 1.2]
|
|
112077
|
+
*/
|
|
112078
|
+
interface SlideScopedCollectionLoadOptions {
|
|
112079
|
+
/**
|
|
112080
|
+
Specifying `$all` for the LoadOptions loads all the scalar properties (e.g.: `Range.address`) but not the navigational properties (e.g.: `Range.format.fill.color`).
|
|
112081
|
+
*/
|
|
112082
|
+
$all?: boolean;
|
|
112083
|
+
/**
|
|
112084
|
+
* For EACH ITEM in the collection: Gets the layout of the slide.
|
|
112085
|
+
*
|
|
112086
|
+
* @remarks
|
|
112087
|
+
* [Api set: PowerPointApi 1.3]
|
|
112088
|
+
*/
|
|
112089
|
+
layout?: PowerPoint.Interfaces.SlideLayoutLoadOptions;
|
|
112090
|
+
/**
|
|
112091
|
+
* For EACH ITEM in the collection: Gets the `SlideMaster` object that represents the slide's default content.
|
|
112092
|
+
*
|
|
112093
|
+
* @remarks
|
|
112094
|
+
* [Api set: PowerPointApi 1.3]
|
|
112095
|
+
*/
|
|
112096
|
+
slideMaster?: PowerPoint.Interfaces.SlideMasterLoadOptions;
|
|
112097
|
+
/**
|
|
112098
|
+
* For EACH ITEM in the collection: Gets the unique ID of the slide.
|
|
112099
|
+
*
|
|
112100
|
+
* @remarks
|
|
112101
|
+
* [Api set: PowerPointApi 1.2]
|
|
112102
|
+
*/
|
|
112103
|
+
id?: boolean;
|
|
112104
|
+
}
|
|
111646
112105
|
/**
|
|
111647
112106
|
* Represents the collection of Slide Masters in the presentation.
|
|
111648
112107
|
*
|
office-js/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/office-js",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.300",
|
|
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",
|
|
@@ -45,6 +45,6 @@
|
|
|
45
45
|
},
|
|
46
46
|
"scripts": {},
|
|
47
47
|
"dependencies": {},
|
|
48
|
-
"typesPublisherContentHash": "
|
|
48
|
+
"typesPublisherContentHash": "32d8fcf891e6875e382f4d6e9f7c71ea1539f43a67bd352b6c2081a1594be476",
|
|
49
49
|
"typeScriptVersion": "4.1"
|
|
50
50
|
}
|