@types/office-runtime 1.0.19 → 1.0.23
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-runtime/README.md +2 -2
- office-runtime/index.d.ts +64 -23
- office-runtime/package.json +3 -8
office-runtime/README.md
CHANGED
|
@@ -8,9 +8,9 @@ This package contains type definitions for office-runtime (https://github.com/Of
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/office-runtime.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Fri, 05 Nov 2021 22:31:34 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `OfficeRuntime`
|
|
14
14
|
|
|
15
15
|
# Credits
|
|
16
|
-
These definitions were written by [OfficeDev](https://github.com/OfficeDev), [
|
|
16
|
+
These definitions were written by [OfficeDev](https://github.com/OfficeDev), [David Chesnut](https://github.com/davidchesnut), [Alex Jerabek](https://github.com/AlexJerabek), [Ricky Kirkham](https://github.com/rick-kirkham), and [Alison McKay](https://github.com/alison-mk).
|
office-runtime/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// Type definitions for non-npm package office-runtime 1.0
|
|
2
2
|
// Project: https://github.com/OfficeDev/office-js
|
|
3
3
|
// Definitions by: OfficeDev <https://github.com/OfficeDev>,
|
|
4
|
-
// Michelle Scharlock <https://github.com/mscharlock>,
|
|
5
4
|
// David Chesnut <https://github.com/davidchesnut>,
|
|
6
5
|
// Alex Jerabek <https://github.com/AlexJerabek>,
|
|
7
6
|
// Ricky Kirkham <https://github.com/rick-kirkham>,
|
|
@@ -34,9 +33,12 @@ declare namespace OfficeRuntime {
|
|
|
34
33
|
/**
|
|
35
34
|
* Asynchronous, global, and persistent key-value storage.
|
|
36
35
|
*
|
|
37
|
-
* [Api set: SharedRuntime 1.1]
|
|
38
|
-
*
|
|
39
36
|
* @remarks
|
|
37
|
+
* [Api set: SharedRuntime 1.1, Mailbox 1.10]
|
|
38
|
+
*
|
|
39
|
+
* **Important**: In Outlook, support is only available with
|
|
40
|
+
* {@link https://docs.microsoft.com/office/dev/add-ins/outlook/autolaunch | event-based activation}.
|
|
41
|
+
*
|
|
40
42
|
* Storage limit is 10 MB per domain, which may be shared by multiple add-ins.
|
|
41
43
|
*/
|
|
42
44
|
interface Storage {
|
|
@@ -44,7 +46,11 @@ declare namespace OfficeRuntime {
|
|
|
44
46
|
* Retrieves an item from storage based on its key.
|
|
45
47
|
* Returns a Promise. In the event the Promise does not resolve, returns null.
|
|
46
48
|
*
|
|
47
|
-
*
|
|
49
|
+
* @remarks
|
|
50
|
+
* [Api set: SharedRuntime 1.1, Mailbox 1.10]
|
|
51
|
+
*
|
|
52
|
+
* **Important**: In Outlook, support is only available with
|
|
53
|
+
* {@link https://docs.microsoft.com/office/dev/add-ins/outlook/autolaunch | event-based activation}.
|
|
48
54
|
*
|
|
49
55
|
* @param key Key of item to be retrieved. Must be a string.
|
|
50
56
|
*/
|
|
@@ -53,7 +59,11 @@ declare namespace OfficeRuntime {
|
|
|
53
59
|
* Sets a key-value pair into storage or updates an existing key-value pair.
|
|
54
60
|
* Returns a Promise.
|
|
55
61
|
*
|
|
56
|
-
*
|
|
62
|
+
* @remarks
|
|
63
|
+
* [Api set: SharedRuntime 1.1, Mailbox 1.10]
|
|
64
|
+
*
|
|
65
|
+
* **Important**: In Outlook, support is only available with
|
|
66
|
+
* {@link https://docs.microsoft.com/office/dev/add-ins/outlook/autolaunch | event-based activation}.
|
|
57
67
|
*
|
|
58
68
|
* @param key Key of item to be set. Must be a string.
|
|
59
69
|
* @param value Must be a string.
|
|
@@ -63,7 +73,11 @@ declare namespace OfficeRuntime {
|
|
|
63
73
|
* Removes an item from storage based on its key.
|
|
64
74
|
* Returns a Promise.
|
|
65
75
|
*
|
|
66
|
-
*
|
|
76
|
+
* @remarks
|
|
77
|
+
* [Api set: SharedRuntime 1.1, Mailbox 1.10]
|
|
78
|
+
*
|
|
79
|
+
* **Important**: In Outlook, support is only available with
|
|
80
|
+
* {@link https://docs.microsoft.com/office/dev/add-ins/outlook/autolaunch | event-based activation}.
|
|
67
81
|
*
|
|
68
82
|
* @param key Key of item to be removed. Must be a string.
|
|
69
83
|
*/
|
|
@@ -72,7 +86,11 @@ declare namespace OfficeRuntime {
|
|
|
72
86
|
* Retrieves multiple items from storage based on their key.
|
|
73
87
|
* Returns a Promise. In the event the Promise does not resolve, returns null.
|
|
74
88
|
*
|
|
75
|
-
*
|
|
89
|
+
* @remarks
|
|
90
|
+
* [Api set: SharedRuntime 1.1, Mailbox 1.10]
|
|
91
|
+
*
|
|
92
|
+
* **Important**: In Outlook, support is only available with
|
|
93
|
+
* {@link https://docs.microsoft.com/office/dev/add-ins/outlook/autolaunch | event-based activation}.
|
|
76
94
|
*
|
|
77
95
|
* @param keys Keys of items to be removed. Must be an array of strings.
|
|
78
96
|
*/
|
|
@@ -81,7 +99,11 @@ declare namespace OfficeRuntime {
|
|
|
81
99
|
* Sets multiple items into storage or updates multiple items within storage.
|
|
82
100
|
* Returns a Promise.
|
|
83
101
|
*
|
|
84
|
-
*
|
|
102
|
+
* @remarks
|
|
103
|
+
* [Api set: SharedRuntime 1.1, Mailbox 1.10]
|
|
104
|
+
*
|
|
105
|
+
* **Important**: In Outlook, support is only available with
|
|
106
|
+
* {@link https://docs.microsoft.com/office/dev/add-ins/outlook/autolaunch | event-based activation}.
|
|
85
107
|
*
|
|
86
108
|
* @param keyValues Key-value pairs to be set. Must be strings.
|
|
87
109
|
*/
|
|
@@ -90,17 +112,24 @@ declare namespace OfficeRuntime {
|
|
|
90
112
|
* Removes multiple items from storage.
|
|
91
113
|
* Returns a Promise.
|
|
92
114
|
*
|
|
93
|
-
*
|
|
115
|
+
* @remarks
|
|
116
|
+
* [Api set: SharedRuntime 1.1, Mailbox 1.10]
|
|
117
|
+
*
|
|
118
|
+
* **Important**: In Outlook, support is only available with
|
|
119
|
+
* {@link https://docs.microsoft.com/office/dev/add-ins/outlook/autolaunch | event-based activation}.
|
|
94
120
|
*
|
|
95
121
|
* @param keys Keys of items to be removed. Must be an array of strings.
|
|
96
122
|
*/
|
|
97
123
|
removeItems(keys: string[]): Promise<void>;
|
|
98
124
|
/**
|
|
99
125
|
* Retrieves an array of all keys from storage.
|
|
100
|
-
*
|
|
126
|
+
* Returns a Promise.
|
|
101
127
|
*
|
|
102
|
-
*
|
|
128
|
+
* @remarks
|
|
129
|
+
* [Api set: SharedRuntime 1.1, Mailbox 1.10]
|
|
103
130
|
*
|
|
131
|
+
* **Important**: In Outlook, support is only available with
|
|
132
|
+
* {@link https://docs.microsoft.com/office/dev/add-ins/outlook/autolaunch | event-based activation}.
|
|
104
133
|
*/
|
|
105
134
|
getKeys(): Promise<string[]>;
|
|
106
135
|
}
|
|
@@ -123,7 +152,7 @@ declare namespace OfficeRuntime {
|
|
|
123
152
|
* [Api set: SharedRuntime 1.1]
|
|
124
153
|
*
|
|
125
154
|
*/
|
|
126
|
-
displayInIFrame?: boolean
|
|
155
|
+
displayInIFrame?: boolean;
|
|
127
156
|
/**
|
|
128
157
|
* Optional parameter that defines the height of the dialog box as a percentage of the current display.
|
|
129
158
|
* For example, accepts strings such as: '50%', '50'.
|
|
@@ -131,7 +160,7 @@ declare namespace OfficeRuntime {
|
|
|
131
160
|
* [Api set: SharedRuntime 1.1]
|
|
132
161
|
*
|
|
133
162
|
*/
|
|
134
|
-
height?: string
|
|
163
|
+
height?: string;
|
|
135
164
|
/**
|
|
136
165
|
* Optional parameter that defines the width of dialog as a percentage of window.
|
|
137
166
|
* For example, accepts strings such as: '50%', '50'.
|
|
@@ -139,28 +168,28 @@ declare namespace OfficeRuntime {
|
|
|
139
168
|
* [Api set: SharedRuntime 1.1]
|
|
140
169
|
*
|
|
141
170
|
*/
|
|
142
|
-
width?: string
|
|
171
|
+
width?: string;
|
|
143
172
|
/**
|
|
144
173
|
* Optional callback that runs when the dialog box sends a message to its parent.
|
|
145
174
|
*
|
|
146
175
|
* [Api set: SharedRuntime 1.1]
|
|
147
176
|
*
|
|
148
177
|
*/
|
|
149
|
-
onMessage?: (
|
|
178
|
+
onMessage?: (message: string, dialog?: Dialog) => void;
|
|
150
179
|
/**
|
|
151
180
|
* Optional callback that runs when the dialog box is closed.
|
|
152
181
|
*
|
|
153
182
|
* [Api set: SharedRuntime 1.1]
|
|
154
183
|
*
|
|
155
184
|
*/
|
|
156
|
-
onClose?: (
|
|
185
|
+
onClose?: () => void;
|
|
157
186
|
/**
|
|
158
187
|
* Optional callback that runs when the dialog box sends an error.
|
|
159
188
|
*
|
|
160
189
|
* [Api set: SharedRuntime 1.1]
|
|
161
190
|
*
|
|
162
191
|
*/
|
|
163
|
-
onRuntimeError?: (
|
|
192
|
+
onRuntimeError?: (error: Error, dialog?: Dialog) => void;
|
|
164
193
|
}
|
|
165
194
|
/**
|
|
166
195
|
* Contains authorization related APIs.
|
|
@@ -168,6 +197,12 @@ declare namespace OfficeRuntime {
|
|
|
168
197
|
const auth: Auth;
|
|
169
198
|
/**
|
|
170
199
|
* Provides options for the user experience when Office obtains an access token to the add-in from AAD v. 2.0 with the `getAccessToken` method.
|
|
200
|
+
*
|
|
201
|
+
* @remarks
|
|
202
|
+
*
|
|
203
|
+
* The methods in this interface are equivalent to those in the `Office.AuthOptions` interface.
|
|
204
|
+
* If new authentication types are added in the future, they will only be added to the `Office.AuthOptions` interface.
|
|
205
|
+
* For simplicity, the code examples throughout the documentation use `Office.AuthOptions`.
|
|
171
206
|
*/
|
|
172
207
|
interface AuthOptions {
|
|
173
208
|
/**
|
|
@@ -176,26 +211,26 @@ declare namespace OfficeRuntime {
|
|
|
176
211
|
* If set to `true`, Office will show an interactive consent UI after it fails to silently get an access token.
|
|
177
212
|
* The prompt will only allow consent to the AAD profile scope, not to any Microsoft Graph scopes.
|
|
178
213
|
*/
|
|
179
|
-
allowConsentPrompt?: boolean
|
|
214
|
+
allowConsentPrompt?: boolean;
|
|
180
215
|
/**
|
|
181
216
|
* Allows Office to get an access token silently provided consent is present or show interactive UI to sign in the user. Default value is `false`.
|
|
182
217
|
* If set to `false`, Office will silently try to get an access token. If it fails to do so, Office will return a descriptive error.
|
|
183
218
|
* If set to `true`, Office will show an interactive sign-in UI after it fails to silently get an access token.
|
|
184
219
|
*/
|
|
185
|
-
allowSignInPrompt?: boolean
|
|
220
|
+
allowSignInPrompt?: boolean;
|
|
186
221
|
/**
|
|
187
222
|
* Prompts the user to add their Office account (or to switch to it, if it is already added). Default value is `false`.
|
|
188
223
|
*
|
|
189
224
|
* @deprecated Use `allowSignInPrompt` instead.
|
|
190
225
|
*/
|
|
191
|
-
forceAddAccount?: boolean
|
|
226
|
+
forceAddAccount?: boolean;
|
|
192
227
|
/**
|
|
193
228
|
* Causes Office to display the add-in consent experience. Useful if the add-in's Azure permissions have changed or if the user's consent has
|
|
194
229
|
* been revoked. Default value is `false`.
|
|
195
230
|
*
|
|
196
231
|
* @deprecated Use `allowConsentPrompt` instead.
|
|
197
232
|
*/
|
|
198
|
-
forceConsent?: boolean
|
|
233
|
+
forceConsent?: boolean;
|
|
199
234
|
/**
|
|
200
235
|
* Causes Office to prompt the user to provide the additional factor when the tenancy being targeted by Microsoft Graph requires multifactor
|
|
201
236
|
* authentication. The string value identifies the type of additional factor that is required. In most cases, you won't know at development
|
|
@@ -203,7 +238,7 @@ declare namespace OfficeRuntime {
|
|
|
203
238
|
* call of `getAccessToken` after Microsoft Graph has sent an error requesting the additional factor and containing the string that should
|
|
204
239
|
* be used with the `authChallenge` option.
|
|
205
240
|
*/
|
|
206
|
-
authChallenge?: string
|
|
241
|
+
authChallenge?: string;
|
|
207
242
|
/**
|
|
208
243
|
* A user-defined item of any type that is returned, unchanged, in the `asyncContext` property of the `AsyncResult` object that is passed to a callback.
|
|
209
244
|
*/
|
|
@@ -213,10 +248,16 @@ declare namespace OfficeRuntime {
|
|
|
213
248
|
* Office only supports consent to Graph scopes when the add-in has been deployed by a tenant admin. This information will not be available during development.
|
|
214
249
|
* Setting this option to `true` will cause Office to inform your add-in beforehand (by returning a descriptive error) if Graph access will fail.
|
|
215
250
|
*/
|
|
216
|
-
forMSGraphAccess?: boolean
|
|
251
|
+
forMSGraphAccess?: boolean;
|
|
217
252
|
}
|
|
218
253
|
/**
|
|
219
254
|
* Interface that contains authorization related APIs.
|
|
255
|
+
*
|
|
256
|
+
* @remarks
|
|
257
|
+
*
|
|
258
|
+
* The methods in this interface are equivalent to those in the `Office.auth` interface.
|
|
259
|
+
* If new authentication types are added in the future, they will only be added to the `Office.auth` interface.
|
|
260
|
+
* For simplicity, the code examples throughout the documentation use `Office.auth`.
|
|
220
261
|
*/
|
|
221
262
|
interface Auth {
|
|
222
263
|
/**
|
office-runtime/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/office-runtime",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.23",
|
|
4
4
|
"description": "TypeScript definitions for office-runtime",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/office-runtime",
|
|
6
6
|
"license": "MIT",
|
|
@@ -10,11 +10,6 @@
|
|
|
10
10
|
"url": "https://github.com/OfficeDev",
|
|
11
11
|
"githubUsername": "OfficeDev"
|
|
12
12
|
},
|
|
13
|
-
{
|
|
14
|
-
"name": "Michelle Scharlock",
|
|
15
|
-
"url": "https://github.com/mscharlock",
|
|
16
|
-
"githubUsername": "mscharlock"
|
|
17
|
-
},
|
|
18
13
|
{
|
|
19
14
|
"name": "David Chesnut",
|
|
20
15
|
"url": "https://github.com/davidchesnut",
|
|
@@ -45,6 +40,6 @@
|
|
|
45
40
|
},
|
|
46
41
|
"scripts": {},
|
|
47
42
|
"dependencies": {},
|
|
48
|
-
"typesPublisherContentHash": "
|
|
49
|
-
"typeScriptVersion": "3.
|
|
43
|
+
"typesPublisherContentHash": "c06f800870854a6de920aee4a8cad24e241d5a301e284b166484f0fbdae8357f",
|
|
44
|
+
"typeScriptVersion": "3.7"
|
|
50
45
|
}
|