@types/office-js 1.0.328 → 1.0.330
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 +39 -7
- 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: Tue,
|
|
11
|
+
* Last updated: Tue, 13 Jun 2023 23:02:49 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
|
@@ -1544,17 +1544,23 @@ declare namespace Office {
|
|
|
1544
1544
|
*
|
|
1545
1545
|
* **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/identity-api-requirement-sets | IdentityAPI 1.3}
|
|
1546
1546
|
*
|
|
1547
|
-
* **Important**:
|
|
1547
|
+
* **Important**:
|
|
1548
|
+
*
|
|
1549
|
+
* - In Outlook, this API isn't supported in the following scenarios.
|
|
1550
|
+
*
|
|
1551
|
+
* - If the add-in is loaded in an Outlook.com or Gmail mailbox.
|
|
1548
1552
|
*
|
|
1549
|
-
*
|
|
1553
|
+
* - If the add-in is loaded in Outlook on the web in the Safari browser. This results in error 13001 ("The user is not signed into Office").
|
|
1550
1554
|
*
|
|
1551
|
-
* -
|
|
1555
|
+
* - In Outlook on the web, if you use the
|
|
1556
|
+
* {@link https://learn.microsoft.com/javascript/api/office/office.ui#office-office-ui-displaydialogasync-member(1) | displayDialogAsync}
|
|
1557
|
+
* method to open a dialog, you must close the dialog before you can call `getAccessToken`.
|
|
1552
1558
|
*
|
|
1553
|
-
*
|
|
1559
|
+
* - In an Outlook event-based activation add-in, this API is supported in Outlook on Windows starting from Version 2111 (Build 14701.20000).
|
|
1554
1560
|
* To retrieve an access token in older builds, use
|
|
1555
|
-
* {@link https://learn.microsoft.com/javascript/api/office-runtime/officeruntime.auth?view=common-js#office-runtime-officeruntime-auth-getaccesstoken-member(1) |
|
|
1556
|
-
|
|
1557
|
-
|
|
1561
|
+
* {@link https://learn.microsoft.com/javascript/api/office-runtime/officeruntime.auth?view=common-js-preview#office-runtime-officeruntime-auth-getaccesstoken-member(1) |
|
|
1562
|
+
* OfficeRuntime.auth.getAccessToken} instead. For more information, see
|
|
1563
|
+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-sso-in-event-based-activation | Enable single sign-on (SSO) in Outlook add-ins that use event-based activation}.
|
|
1558
1564
|
*
|
|
1559
1565
|
* @param options - Optional. Accepts an `AuthOptions` object to define sign-on behaviors.
|
|
1560
1566
|
* @returns Promise to the access token.
|
|
@@ -19342,8 +19348,15 @@ declare namespace OfficeExtension {
|
|
|
19342
19348
|
readonly debugInfo: RequestContextDebugInfo;
|
|
19343
19349
|
}
|
|
19344
19350
|
|
|
19351
|
+
/**
|
|
19352
|
+
* Specifies options for a session of a Visio diagram embedded in a SharePoint page. Called by constructor of `EmbeddedSession`.
|
|
19353
|
+
* For more information, see {@link https://learn.microsoft.com/office/dev/add-ins/reference/overview/visio-javascript-reference-overview | Visio JavaScript API overview}.
|
|
19354
|
+
*/
|
|
19345
19355
|
interface EmbeddedOptions {
|
|
19346
19356
|
sessionKey?: string,
|
|
19357
|
+
/*
|
|
19358
|
+
* The iframe element that hosts the Visio diagram.
|
|
19359
|
+
*/
|
|
19347
19360
|
container?: HTMLElement,
|
|
19348
19361
|
id?: string;
|
|
19349
19362
|
timeoutInMilliseconds?: number;
|
|
@@ -19351,8 +19364,15 @@ declare namespace OfficeExtension {
|
|
|
19351
19364
|
width?: string;
|
|
19352
19365
|
}
|
|
19353
19366
|
|
|
19367
|
+
/**
|
|
19368
|
+
* Represents a session of a Visio diagram embedded in a SharePoint page.
|
|
19369
|
+
* For more information, see {@link https://learn.microsoft.com/office/dev/add-ins/reference/overview/visio-javascript-reference-overview | Visio JavaScript API overview}.
|
|
19370
|
+
*/
|
|
19354
19371
|
class EmbeddedSession {
|
|
19355
19372
|
constructor(url: string, options?: EmbeddedOptions);
|
|
19373
|
+
/**
|
|
19374
|
+
* Initializes the session.
|
|
19375
|
+
*/
|
|
19356
19376
|
public init(): Promise<any>;
|
|
19357
19377
|
}
|
|
19358
19378
|
|
|
@@ -19518,13 +19538,25 @@ declare namespace OfficeExtension {
|
|
|
19518
19538
|
remove(handler: (args: T) => Promise<any>): void;
|
|
19519
19539
|
}
|
|
19520
19540
|
|
|
19541
|
+
/**
|
|
19542
|
+
* Enables the removal of an event handler. Returned by the `EventHandlers.add` method.
|
|
19543
|
+
*
|
|
19544
|
+
* **Note**: The same {@link OfficeExtension.ClientRequestContext | RequestContext} object that the handler was added in must be used when removing the handler.
|
|
19545
|
+
* More information can be found in {@link https://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-events#remove-an-event-handler | Remove an event handler}.
|
|
19546
|
+
*/
|
|
19521
19547
|
class EventHandlerResult<T> {
|
|
19522
19548
|
constructor(context: ClientRequestContext, handlers: EventHandlers<T>, handler: (args: T) => Promise<any>);
|
|
19523
19549
|
/** The request context associated with the object */
|
|
19524
19550
|
context: ClientRequestContext;
|
|
19551
|
+
/*
|
|
19552
|
+
* Removes the handler from the event.
|
|
19553
|
+
*/
|
|
19525
19554
|
remove(): void;
|
|
19526
19555
|
}
|
|
19527
19556
|
|
|
19557
|
+
/**
|
|
19558
|
+
* Used by Office to construct event handlers. Do not call in your code.
|
|
19559
|
+
*/
|
|
19528
19560
|
interface EventInfo<T> {
|
|
19529
19561
|
registerFunc: (callback: (args: any) => void) => Promise<any>;
|
|
19530
19562
|
unregisterFunc: (callback: (args: any) => void) => Promise<any>;
|
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.330",
|
|
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": "964ad412f7aa9567890052670913dde4959ac0111bf4bd09072782388c86c511",
|
|
49
49
|
"typeScriptVersion": "4.3"
|
|
50
50
|
}
|