@fluidframework/odsp-driver-definitions 2.0.0-internal.7.3.0 → 2.0.0-internal.7.4.0
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.
- package/CHANGELOG.md +4 -0
- package/api-extractor-lint.json +13 -0
- package/api-extractor.json +3 -3
- package/api-report/odsp-driver-definitions.api.md +36 -36
- package/dist/errors.cjs +2 -0
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.ts +12 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/factory.cjs.map +1 -1
- package/dist/factory.d.ts +12 -0
- package/dist/factory.d.ts.map +1 -1
- package/dist/odsp-driver-definitions-alpha.d.ts +475 -0
- package/dist/odsp-driver-definitions-beta.d.ts +81 -0
- package/dist/odsp-driver-definitions-public.d.ts +81 -0
- package/dist/odsp-driver-definitions-untrimmed.d.ts +652 -0
- package/dist/odspCache.cjs +2 -0
- package/dist/odspCache.cjs.map +1 -1
- package/dist/odspCache.d.ts +11 -0
- package/dist/odspCache.d.ts.map +1 -1
- package/dist/resolvedUrl.cjs +3 -0
- package/dist/resolvedUrl.cjs.map +1 -1
- package/dist/resolvedUrl.d.ts +12 -0
- package/dist/resolvedUrl.d.ts.map +1 -1
- package/dist/sessionProvider.cjs.map +1 -1
- package/dist/sessionProvider.d.ts +3 -0
- package/dist/sessionProvider.d.ts.map +1 -1
- package/dist/tokenFetch.cjs +2 -0
- package/dist/tokenFetch.cjs.map +1 -1
- package/dist/tokenFetch.d.ts +10 -0
- package/dist/tokenFetch.d.ts.map +1 -1
- package/lib/errors.d.ts +12 -4
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.mjs +2 -0
- package/lib/errors.mjs.map +1 -1
- package/lib/factory.d.ts +12 -0
- package/lib/factory.d.ts.map +1 -1
- package/lib/factory.mjs.map +1 -1
- package/lib/index.d.ts +6 -6
- package/lib/index.d.ts.map +1 -1
- package/lib/odsp-driver-definitions-alpha.d.ts +475 -0
- package/lib/odsp-driver-definitions-beta.d.ts +81 -0
- package/lib/odsp-driver-definitions-public.d.ts +81 -0
- package/lib/odsp-driver-definitions-untrimmed.d.ts +652 -0
- package/lib/odspCache.d.ts +11 -0
- package/lib/odspCache.d.ts.map +1 -1
- package/lib/odspCache.mjs +2 -0
- package/lib/odspCache.mjs.map +1 -1
- package/lib/resolvedUrl.d.ts +12 -0
- package/lib/resolvedUrl.d.ts.map +1 -1
- package/lib/resolvedUrl.mjs +3 -0
- package/lib/resolvedUrl.mjs.map +1 -1
- package/lib/sessionProvider.d.ts +3 -0
- package/lib/sessionProvider.d.ts.map +1 -1
- package/lib/sessionProvider.mjs.map +1 -1
- package/lib/tokenFetch.d.ts +10 -0
- package/lib/tokenFetch.d.ts.map +1 -1
- package/lib/tokenFetch.mjs +2 -0
- package/lib/tokenFetch.mjs.map +1 -1
- package/package.json +25 -6
- package/src/errors.ts +12 -0
- package/src/factory.ts +12 -0
- package/src/odspCache.ts +11 -0
- package/src/resolvedUrl.ts +12 -0
- package/src/sessionProvider.ts +3 -0
- package/src/tokenFetch.ts +10 -0
|
@@ -0,0 +1,475 @@
|
|
|
1
|
+
import { DriverError } from '@fluidframework/driver-definitions';
|
|
2
|
+
import { IDriverErrorBase } from '@fluidframework/driver-definitions';
|
|
3
|
+
import { IResolvedUrl } from '@fluidframework/driver-definitions';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @alpha
|
|
7
|
+
*/
|
|
8
|
+
export declare type CacheContentType = "snapshot" | "ops";
|
|
9
|
+
|
|
10
|
+
/* Excluded from this release type: DriverError */
|
|
11
|
+
|
|
12
|
+
/* Excluded from this release type: getKeyForCacheEntry */
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @alpha
|
|
16
|
+
*/
|
|
17
|
+
export declare interface HostStoragePolicy {
|
|
18
|
+
snapshotOptions?: ISnapshotOptions;
|
|
19
|
+
/**
|
|
20
|
+
* If set to true, tells driver to concurrently fetch snapshot from storage (SPO) and cache
|
|
21
|
+
* Container loads from whatever comes first in such case.
|
|
22
|
+
* Snapshot fetched from storage is pushed to cache in either case.
|
|
23
|
+
* If set to false, driver will first consult with cache. Only on cache miss (cache does not
|
|
24
|
+
* return snapshot), driver will fetch snapshot from storage (and push it to cache), otherwise
|
|
25
|
+
* it will load from cache and not reach out to storage.
|
|
26
|
+
* Passing true results in faster loads and keeping cache more current, but it increases bandwidth consumption.
|
|
27
|
+
*/
|
|
28
|
+
concurrentSnapshotFetch?: boolean;
|
|
29
|
+
opsBatchSize?: number;
|
|
30
|
+
concurrentOpsBatches?: number;
|
|
31
|
+
/**
|
|
32
|
+
* Policy controlling ops caching (leveraging IPersistedCache passed to driver factory)
|
|
33
|
+
*/
|
|
34
|
+
opsCaching?: IOpsCachingPolicy;
|
|
35
|
+
/**
|
|
36
|
+
* Policy controlling how collaboration session is established
|
|
37
|
+
*/
|
|
38
|
+
sessionOptions?: ICollabSessionOptions;
|
|
39
|
+
/**
|
|
40
|
+
* @deprecated This field will be always set to true after removal.
|
|
41
|
+
* True to have the sharing link redeem fallback in case the Trees Latest/Redeem 1RT call fails with redeem error.
|
|
42
|
+
* During fallback it will first redeem the sharing link and then make the Trees latest call.
|
|
43
|
+
*/
|
|
44
|
+
enableRedeemFallback?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Policy controlling if we will cache initial summary when we create a document
|
|
47
|
+
*/
|
|
48
|
+
cacheCreateNewSummary?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* @deprecated This will be replaced with feature gate snapshotFormatFetchType.
|
|
51
|
+
* Policy controlling if we want to fetch binary format snapshot.
|
|
52
|
+
*/
|
|
53
|
+
fetchBinarySnapshotFormat?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* If set to true, socket cache are per OdspDocumentService instead of shared across all instances
|
|
56
|
+
*/
|
|
57
|
+
isolateSocketCache?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* @deprecated Switch to using the new feature gated by enableSingleRequestForShareLinkWithCreate
|
|
60
|
+
* with 'createLinkScope' and 'createLinkRole' is requested to the odsp apis instead of 'createLinkType'.
|
|
61
|
+
* It enables the creation of sharing link along with the creation of file by setting this value to true.
|
|
62
|
+
* If the host provides a 'createLinkType' parameter in the request URL to the container.attach()
|
|
63
|
+
* method, we will send the request to ODSP with the same (if the flag is enabled) so
|
|
64
|
+
* that a share link can be created with the creation of file to save number for round trips made to ODSP.
|
|
65
|
+
* (This flag works independently of enableSingleRequestForShareLinkWithCreate which is used for sharing link
|
|
66
|
+
* requests where 'createLinkScope' is requested.)
|
|
67
|
+
*/
|
|
68
|
+
enableShareLinkWithCreate?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Enable creation of sharing link along with the creation of file by setting this value to true.
|
|
71
|
+
* If the host provides a 'createLinkScope' parameter in the request URL to the container.attach()
|
|
72
|
+
* method, we will send the request to ODSP with the same (if the flag is enabled) so
|
|
73
|
+
* that a share link can be created with the creation of file to save number for round trips made to ODSP.
|
|
74
|
+
* (This flag works independently of enableShareLinkWithCreate which was used for old sharing link requests
|
|
75
|
+
* where 'createLinkType' was requested.)
|
|
76
|
+
*/
|
|
77
|
+
enableSingleRequestForShareLinkWithCreate?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* True if host does not want the storage service to use the prefetch cache to get the snapshot. Undefined will be treated
|
|
80
|
+
* as false. This is if the host wants to do some A/B testing.
|
|
81
|
+
*/
|
|
82
|
+
avoidPrefetchSnapshotCache?: boolean;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Cache entry. Identifies file that this entry belongs to, and type of content stored in it.
|
|
87
|
+
* @alpha
|
|
88
|
+
*/
|
|
89
|
+
export declare interface ICacheEntry extends IEntry {
|
|
90
|
+
/**
|
|
91
|
+
* Identifies file in storage this cached entry is for
|
|
92
|
+
*/
|
|
93
|
+
file: IFileEntry;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* @alpha
|
|
98
|
+
*/
|
|
99
|
+
export declare interface ICollabSessionOptions {
|
|
100
|
+
/**
|
|
101
|
+
* Value indicating the display name for session that admits unauthenticated user.
|
|
102
|
+
* This name will be used in attribution associated with edits made by such user.
|
|
103
|
+
*/
|
|
104
|
+
unauthenticatedUserDisplayName?: string;
|
|
105
|
+
/**
|
|
106
|
+
* @deprecated Due to security reasons we will be passing the token via Authorization header only.
|
|
107
|
+
* Value indicating session preference to always pass access token via Authorization header.
|
|
108
|
+
* Default behavior is to pass access token via query parameter unless overall href string
|
|
109
|
+
* length exceeds 2048 characters. Using query param is performance optimization which results
|
|
110
|
+
* in ODSP XHR request being treated as 'simple' request which do not require OPTIONS call to
|
|
111
|
+
* validate CORS. However, not all ODSP implementations understand this optimization.
|
|
112
|
+
* For instance, auth layer on Converged stack will fail request with access token passed via
|
|
113
|
+
* query param.
|
|
114
|
+
*/
|
|
115
|
+
forceAccessTokenViaAuthorizationHeader?: boolean;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* Excluded from this release type: IdentityType */
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Cache entry. Identifies file that this entry belongs to, and type of content stored in it.
|
|
122
|
+
* @alpha
|
|
123
|
+
*/
|
|
124
|
+
export declare interface IEntry {
|
|
125
|
+
/**
|
|
126
|
+
* Identifies type of entry for a given file.
|
|
127
|
+
* Each file can have multiple types of entries associated with it.
|
|
128
|
+
* For example, it can be snapshot, blob, ops, etc.
|
|
129
|
+
*/
|
|
130
|
+
type: CacheContentType;
|
|
131
|
+
/**
|
|
132
|
+
* Identifies individual entry for a given file and type.
|
|
133
|
+
* Each file can have multiple cache entries associated with it.
|
|
134
|
+
* This property identifies a particular instance of entry.
|
|
135
|
+
* For example, for blobs it will be unique ID of the blob in a file.
|
|
136
|
+
* For batch of ops, it can be starting op sequence number.
|
|
137
|
+
* For types that have only one entry (like snapshots), it will be empty string.
|
|
138
|
+
*/
|
|
139
|
+
key: string;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* @alpha
|
|
144
|
+
*/
|
|
145
|
+
export declare interface IFileEntry {
|
|
146
|
+
/**
|
|
147
|
+
* Unique and stable ID of the document.
|
|
148
|
+
* Driver guarantees that docId is stable ID uniquely identifying document.
|
|
149
|
+
*/
|
|
150
|
+
docId: string;
|
|
151
|
+
/**
|
|
152
|
+
* Resolved URI is provided for additional versatility - host can use it to
|
|
153
|
+
* identify file in storage, and (as example) delete all cached entries for
|
|
154
|
+
* a file if user requests so.
|
|
155
|
+
* This is IOdspResolvedUrl in case of ODSP driver.
|
|
156
|
+
*/
|
|
157
|
+
resolvedUrl: IResolvedUrl;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/* Excluded from this release type: InstrumentedStorageTokenFetcher */
|
|
161
|
+
|
|
162
|
+
/* Excluded from this release type: IOdspError */
|
|
163
|
+
|
|
164
|
+
/* Excluded from this release type: IOdspErrorAugmentations */
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* @alpha
|
|
168
|
+
*/
|
|
169
|
+
export declare interface IOdspResolvedUrl extends IResolvedUrl, IOdspUrlParts {
|
|
170
|
+
type: "fluid";
|
|
171
|
+
odspResolvedUrl: true;
|
|
172
|
+
url: string;
|
|
173
|
+
hashedDocumentId: string;
|
|
174
|
+
endpoints: {
|
|
175
|
+
snapshotStorageUrl: string;
|
|
176
|
+
attachmentPOSTStorageUrl: string;
|
|
177
|
+
attachmentGETStorageUrl: string;
|
|
178
|
+
deltaStorageUrl: string;
|
|
179
|
+
};
|
|
180
|
+
tokens: {};
|
|
181
|
+
fileName: string;
|
|
182
|
+
summarizer: boolean;
|
|
183
|
+
codeHint?: {
|
|
184
|
+
containerPackageName?: string;
|
|
185
|
+
};
|
|
186
|
+
fileVersion: string | undefined;
|
|
187
|
+
dataStorePath?: string;
|
|
188
|
+
/**
|
|
189
|
+
* Sharing link data created for the ODSP item.
|
|
190
|
+
* Contains information about either sharing link created while creating a new file or
|
|
191
|
+
* a redeemable share link created when loading an existing file
|
|
192
|
+
*/
|
|
193
|
+
shareLinkInfo?: ShareLinkInfoType;
|
|
194
|
+
isClpCompliantApp?: boolean;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* @alpha
|
|
199
|
+
*/
|
|
200
|
+
export declare interface IOdspUrlParts {
|
|
201
|
+
siteUrl: string;
|
|
202
|
+
driveId: string;
|
|
203
|
+
itemId: string;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* @alpha
|
|
208
|
+
*/
|
|
209
|
+
export declare interface IOpsCachingPolicy {
|
|
210
|
+
/**
|
|
211
|
+
* Batch size. Controls how many ops are grouped together as single cache entry
|
|
212
|
+
* The bigger the number, the more efficient it is (less reads & writes)
|
|
213
|
+
* At the same time, big number means we wait for so many ops to accumulate, which
|
|
214
|
+
* increases chances and number of trailing ops that would not be flushed to cache
|
|
215
|
+
* when user closes tab
|
|
216
|
+
* Use any number below 1 to disable caching
|
|
217
|
+
* Default: 100
|
|
218
|
+
*/
|
|
219
|
+
batchSize?: number;
|
|
220
|
+
/**
|
|
221
|
+
* To reduce the problem of losing trailing ops when using big batch sizes, host
|
|
222
|
+
* could specify how often driver should flush ops it has not flushed yet.
|
|
223
|
+
* -1 means do not use timer.
|
|
224
|
+
* Measured in ms.
|
|
225
|
+
* Default: 5000
|
|
226
|
+
*/
|
|
227
|
+
timerGranularity?: number;
|
|
228
|
+
/**
|
|
229
|
+
* Total number of ops to cache. When we reach that number, ops caching stops
|
|
230
|
+
* Default: 5000
|
|
231
|
+
*/
|
|
232
|
+
totalOpsToCache?: number;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Persistent cache. This interface can be implemented by the host to provide durable caching
|
|
237
|
+
* across sessions. If not provided at driver factory construction, factory will use in-memory
|
|
238
|
+
* cache implementation that does not survive across sessions. Snapshot entires stored in the
|
|
239
|
+
* IPersistedCache will be considered stale and removed after 2 days. Read the README for more
|
|
240
|
+
* information.
|
|
241
|
+
* @alpha
|
|
242
|
+
*/
|
|
243
|
+
export declare interface IPersistedCache {
|
|
244
|
+
/**
|
|
245
|
+
* Get the cache value of the key
|
|
246
|
+
* @param entry - cache entry, identifies file and particular key for this file.
|
|
247
|
+
* @returns Cached value. undefined if nothing is cached.
|
|
248
|
+
*/
|
|
249
|
+
get(entry: ICacheEntry): Promise<any>;
|
|
250
|
+
/**
|
|
251
|
+
* Put the value into cache.
|
|
252
|
+
* Important - only serializable content is allowed since this cache may be persisted between sessions
|
|
253
|
+
* @param entry - cache entry.
|
|
254
|
+
* @param value - JSON-serializable content.
|
|
255
|
+
*/
|
|
256
|
+
put(entry: ICacheEntry, value: any): Promise<void>;
|
|
257
|
+
/**
|
|
258
|
+
* Removes the entries from the cache for given parametres.
|
|
259
|
+
* @param file - file entry to be deleted.
|
|
260
|
+
*/
|
|
261
|
+
removeEntries(file: IFileEntry): Promise<void>;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* An interface that allows a concrete instance of a driver factory to interrogate itself
|
|
266
|
+
* to find out if it is session aware.
|
|
267
|
+
* @alpha
|
|
268
|
+
*/
|
|
269
|
+
export declare interface IProvideSessionAwareDriverFactory {
|
|
270
|
+
readonly IRelaySessionAwareDriverFactory: IRelaySessionAwareDriverFactory;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* An interface that allows a concrete instance of a driver factory to call the `getRelayServiceSessionInfo`
|
|
275
|
+
* function if it session aware.
|
|
276
|
+
* @alpha
|
|
277
|
+
*/
|
|
278
|
+
export declare interface IRelaySessionAwareDriverFactory extends IProvideSessionAwareDriverFactory {
|
|
279
|
+
getRelayServiceSessionInfo(resolvedUrl: IResolvedUrl): Promise<ISocketStorageDiscovery | undefined>;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* Sharing link data received from the /snapshot api response.
|
|
284
|
+
* @alpha
|
|
285
|
+
*/
|
|
286
|
+
export declare interface ISharingLink extends ISharingLinkKind {
|
|
287
|
+
webUrl: string;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* Defines the permissions scope for a share link requested to be created during the creation the file in ODSP.
|
|
292
|
+
* Providing these properties to the /snapshot api will also create and return the requested kind of sharing link.
|
|
293
|
+
* @alpha
|
|
294
|
+
*/
|
|
295
|
+
export declare interface ISharingLinkKind {
|
|
296
|
+
scope: SharingLinkScope;
|
|
297
|
+
role?: SharingLinkRole;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* @alpha
|
|
302
|
+
*/
|
|
303
|
+
export declare interface ISnapshotOptions {
|
|
304
|
+
blobs?: number;
|
|
305
|
+
deltas?: number;
|
|
306
|
+
channels?: number;
|
|
307
|
+
mds?: number;
|
|
308
|
+
timeout?: number;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Socket storage discovery api response
|
|
313
|
+
* @alpha
|
|
314
|
+
*/
|
|
315
|
+
export declare interface ISocketStorageDiscovery {
|
|
316
|
+
id: string;
|
|
317
|
+
runtimeTenantId?: string;
|
|
318
|
+
tenantId: string;
|
|
319
|
+
snapshotStorageUrl: string;
|
|
320
|
+
deltaStorageUrl: string;
|
|
321
|
+
/**
|
|
322
|
+
* PUSH URL
|
|
323
|
+
*/
|
|
324
|
+
deltaStreamSocketUrl: string;
|
|
325
|
+
/**
|
|
326
|
+
* The access token for PushChannel. Optionally returned, depending on implementation.
|
|
327
|
+
* OneDrive for Consumer implementation returns it and OneDrive for Business implementation
|
|
328
|
+
* does not return it and instead expects token to be returned via `getWebsocketToken` callback
|
|
329
|
+
* passed as a parameter to `OdspDocumentService.create()` factory.
|
|
330
|
+
*/
|
|
331
|
+
socketToken?: string;
|
|
332
|
+
/**
|
|
333
|
+
* This is the time within which client has to refresh the session on (ODSP) relay service.
|
|
334
|
+
*/
|
|
335
|
+
refreshSessionDurationSeconds?: number;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/* Excluded from this release type: isTokenFromCache */
|
|
339
|
+
|
|
340
|
+
/* Excluded from this release type: OdspError */
|
|
341
|
+
|
|
342
|
+
/* Excluded from this release type: OdspErrorType */
|
|
343
|
+
|
|
344
|
+
/* Excluded from this release type: OdspErrorTypes */
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* Represents access token fetch options for ODSP resource
|
|
348
|
+
* @alpha
|
|
349
|
+
*/
|
|
350
|
+
export declare interface OdspResourceTokenFetchOptions extends TokenFetchOptions {
|
|
351
|
+
/** Site url representing ODSP resource location */
|
|
352
|
+
siteUrl: string;
|
|
353
|
+
/** ODSP drive id where resource resides. Optional, used only when fetching token to access ODSP file */
|
|
354
|
+
driveId?: string;
|
|
355
|
+
/** ODSP item id representing resource. Optional, used only when fetching token to access ODSP file */
|
|
356
|
+
itemId?: string;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* Sharing link data created for the ODSP item.
|
|
361
|
+
* Contains information about either sharing link created while creating a new file or
|
|
362
|
+
* a redeemable share link created when loading an existing file
|
|
363
|
+
* @alpha
|
|
364
|
+
*/
|
|
365
|
+
export declare interface ShareLinkInfoType {
|
|
366
|
+
/**
|
|
367
|
+
* We create a new file in ODSP with the /snapshot api call. Applications then need to make a separate apis call to
|
|
368
|
+
* create a sharing link for that file. To reduce the number of network calls, ODSP now provides a feature
|
|
369
|
+
* where we can create a share link along with creating a file by passing a query parameter called
|
|
370
|
+
* createShareLink (deprecated) or createLinkScope and createLinkRole. createLink object below saves the information
|
|
371
|
+
* from the /snapshot api response.
|
|
372
|
+
*/
|
|
373
|
+
createLink?: {
|
|
374
|
+
/**
|
|
375
|
+
* @deprecated
|
|
376
|
+
* Type of shareLink requested/created when creating the file for the first time. The 'type' property here
|
|
377
|
+
* represents the type of sharing link requested.
|
|
378
|
+
* Will be deprecated soon. Type of sharing link will be present in the link:ISharingLink property below.
|
|
379
|
+
*/
|
|
380
|
+
type?: ShareLinkTypes | ISharingLinkKind;
|
|
381
|
+
/**
|
|
382
|
+
* Share link created when the file is created for the first time with /snapshot api call.
|
|
383
|
+
*/
|
|
384
|
+
link?: string | ISharingLink;
|
|
385
|
+
/**
|
|
386
|
+
* Error message if creation of sharing link fails with /snapshot api call
|
|
387
|
+
*/
|
|
388
|
+
error?: any;
|
|
389
|
+
shareId?: string;
|
|
390
|
+
};
|
|
391
|
+
/**
|
|
392
|
+
* This is used to save the network calls while doing trees/latest call as if the client does not have
|
|
393
|
+
* permission then this link can be redeemed for the permissions in the same network call.
|
|
394
|
+
*/
|
|
395
|
+
sharingLinkToRedeem?: string;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* @deprecated Use ISharingLinkKind type instead.
|
|
400
|
+
* Type of shareLink requested/created when creating the file for the first time.
|
|
401
|
+
* @alpha
|
|
402
|
+
*/
|
|
403
|
+
export declare enum ShareLinkTypes {
|
|
404
|
+
csl = "csl"
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* View/edit permission role for a sharing link.
|
|
409
|
+
* @alpha
|
|
410
|
+
*/
|
|
411
|
+
export declare enum SharingLinkRole {
|
|
412
|
+
view = "view",
|
|
413
|
+
edit = "edit"
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* Sharing scope of the share links created for a file.
|
|
418
|
+
* @alpha
|
|
419
|
+
*/
|
|
420
|
+
export declare enum SharingLinkScope {
|
|
421
|
+
organization = "organization",
|
|
422
|
+
users = "users",
|
|
423
|
+
anonymous = "anonymous",
|
|
424
|
+
default = "default"
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
/* Excluded from this release type: snapshotKey */
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* Method signature for callback method used to fetch access token
|
|
431
|
+
* @param options - token fetch options
|
|
432
|
+
* @returns If successful, TokenResponse object representing token value along with flag indicating
|
|
433
|
+
* whether token came from cache. Legacy implementation may return a string for token value;
|
|
434
|
+
* in this case it should be assumes that fromCache signal is undefined. Null is returned in case of failure.
|
|
435
|
+
* @alpha
|
|
436
|
+
*/
|
|
437
|
+
export declare type TokenFetcher<T> = (options: T) => Promise<string | TokenResponse | null>;
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* Represents access token fetch options
|
|
441
|
+
* @alpha
|
|
442
|
+
*/
|
|
443
|
+
export declare interface TokenFetchOptions {
|
|
444
|
+
/**
|
|
445
|
+
* Value indicating whether fresh token has to be returned.
|
|
446
|
+
* If false then it is okay to return cached unexpired token if available.
|
|
447
|
+
*/
|
|
448
|
+
refresh: boolean;
|
|
449
|
+
/**
|
|
450
|
+
* Claims that have to be passed with token fetch request.
|
|
451
|
+
* These can be used to specify additional information that must be passed to token authority.
|
|
452
|
+
*/
|
|
453
|
+
claims?: string;
|
|
454
|
+
/**
|
|
455
|
+
* Tenant id of authority that must be handling token fetch.
|
|
456
|
+
* If it is not specified then it is up to token fetching logic to determine which tenant authority
|
|
457
|
+
* to use to issue access token.
|
|
458
|
+
*/
|
|
459
|
+
tenantId?: string;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
/* Excluded from this release type: tokenFromResponse */
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* Represents token response
|
|
466
|
+
* @alpha
|
|
467
|
+
*/
|
|
468
|
+
export declare interface TokenResponse {
|
|
469
|
+
/** Token value */
|
|
470
|
+
token: string;
|
|
471
|
+
/** Flag indicating whether token was obtained from local cache */
|
|
472
|
+
fromCache?: boolean;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
export { }
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { DriverError } from '@fluidframework/driver-definitions';
|
|
2
|
+
import { IDriverErrorBase } from '@fluidframework/driver-definitions';
|
|
3
|
+
import { IResolvedUrl } from '@fluidframework/driver-definitions';
|
|
4
|
+
|
|
5
|
+
/* Excluded from this release type: CacheContentType */
|
|
6
|
+
|
|
7
|
+
/* Excluded from this release type: DriverError */
|
|
8
|
+
|
|
9
|
+
/* Excluded from this release type: getKeyForCacheEntry */
|
|
10
|
+
|
|
11
|
+
/* Excluded from this release type: HostStoragePolicy */
|
|
12
|
+
|
|
13
|
+
/* Excluded from this release type: ICacheEntry */
|
|
14
|
+
|
|
15
|
+
/* Excluded from this release type: ICollabSessionOptions */
|
|
16
|
+
|
|
17
|
+
/* Excluded from this release type: IdentityType */
|
|
18
|
+
|
|
19
|
+
/* Excluded from this release type: IDriverErrorBase */
|
|
20
|
+
|
|
21
|
+
/* Excluded from this release type: IEntry */
|
|
22
|
+
|
|
23
|
+
/* Excluded from this release type: IFileEntry */
|
|
24
|
+
|
|
25
|
+
/* Excluded from this release type: InstrumentedStorageTokenFetcher */
|
|
26
|
+
|
|
27
|
+
/* Excluded from this release type: IOdspError */
|
|
28
|
+
|
|
29
|
+
/* Excluded from this release type: IOdspErrorAugmentations */
|
|
30
|
+
|
|
31
|
+
/* Excluded from this release type: IOdspResolvedUrl */
|
|
32
|
+
|
|
33
|
+
/* Excluded from this release type: IOdspUrlParts */
|
|
34
|
+
|
|
35
|
+
/* Excluded from this release type: IOpsCachingPolicy */
|
|
36
|
+
|
|
37
|
+
/* Excluded from this release type: IPersistedCache */
|
|
38
|
+
|
|
39
|
+
/* Excluded from this release type: IProvideSessionAwareDriverFactory */
|
|
40
|
+
|
|
41
|
+
/* Excluded from this release type: IRelaySessionAwareDriverFactory */
|
|
42
|
+
|
|
43
|
+
/* Excluded from this release type: IResolvedUrl */
|
|
44
|
+
|
|
45
|
+
/* Excluded from this release type: ISharingLink */
|
|
46
|
+
|
|
47
|
+
/* Excluded from this release type: ISharingLinkKind */
|
|
48
|
+
|
|
49
|
+
/* Excluded from this release type: ISnapshotOptions */
|
|
50
|
+
|
|
51
|
+
/* Excluded from this release type: ISocketStorageDiscovery */
|
|
52
|
+
|
|
53
|
+
/* Excluded from this release type: isTokenFromCache */
|
|
54
|
+
|
|
55
|
+
/* Excluded from this release type: OdspError */
|
|
56
|
+
|
|
57
|
+
/* Excluded from this release type: OdspErrorType */
|
|
58
|
+
|
|
59
|
+
/* Excluded from this release type: OdspErrorTypes */
|
|
60
|
+
|
|
61
|
+
/* Excluded from this release type: OdspResourceTokenFetchOptions */
|
|
62
|
+
|
|
63
|
+
/* Excluded from this release type: ShareLinkInfoType */
|
|
64
|
+
|
|
65
|
+
/* Excluded from this release type: ShareLinkTypes */
|
|
66
|
+
|
|
67
|
+
/* Excluded from this release type: SharingLinkRole */
|
|
68
|
+
|
|
69
|
+
/* Excluded from this release type: SharingLinkScope */
|
|
70
|
+
|
|
71
|
+
/* Excluded from this release type: snapshotKey */
|
|
72
|
+
|
|
73
|
+
/* Excluded from this release type: TokenFetcher */
|
|
74
|
+
|
|
75
|
+
/* Excluded from this release type: TokenFetchOptions */
|
|
76
|
+
|
|
77
|
+
/* Excluded from this release type: tokenFromResponse */
|
|
78
|
+
|
|
79
|
+
/* Excluded from this release type: TokenResponse */
|
|
80
|
+
|
|
81
|
+
export { }
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { DriverError } from '@fluidframework/driver-definitions';
|
|
2
|
+
import { IDriverErrorBase } from '@fluidframework/driver-definitions';
|
|
3
|
+
import { IResolvedUrl } from '@fluidframework/driver-definitions';
|
|
4
|
+
|
|
5
|
+
/* Excluded from this release type: CacheContentType */
|
|
6
|
+
|
|
7
|
+
/* Excluded from this release type: DriverError */
|
|
8
|
+
|
|
9
|
+
/* Excluded from this release type: getKeyForCacheEntry */
|
|
10
|
+
|
|
11
|
+
/* Excluded from this release type: HostStoragePolicy */
|
|
12
|
+
|
|
13
|
+
/* Excluded from this release type: ICacheEntry */
|
|
14
|
+
|
|
15
|
+
/* Excluded from this release type: ICollabSessionOptions */
|
|
16
|
+
|
|
17
|
+
/* Excluded from this release type: IdentityType */
|
|
18
|
+
|
|
19
|
+
/* Excluded from this release type: IDriverErrorBase */
|
|
20
|
+
|
|
21
|
+
/* Excluded from this release type: IEntry */
|
|
22
|
+
|
|
23
|
+
/* Excluded from this release type: IFileEntry */
|
|
24
|
+
|
|
25
|
+
/* Excluded from this release type: InstrumentedStorageTokenFetcher */
|
|
26
|
+
|
|
27
|
+
/* Excluded from this release type: IOdspError */
|
|
28
|
+
|
|
29
|
+
/* Excluded from this release type: IOdspErrorAugmentations */
|
|
30
|
+
|
|
31
|
+
/* Excluded from this release type: IOdspResolvedUrl */
|
|
32
|
+
|
|
33
|
+
/* Excluded from this release type: IOdspUrlParts */
|
|
34
|
+
|
|
35
|
+
/* Excluded from this release type: IOpsCachingPolicy */
|
|
36
|
+
|
|
37
|
+
/* Excluded from this release type: IPersistedCache */
|
|
38
|
+
|
|
39
|
+
/* Excluded from this release type: IProvideSessionAwareDriverFactory */
|
|
40
|
+
|
|
41
|
+
/* Excluded from this release type: IRelaySessionAwareDriverFactory */
|
|
42
|
+
|
|
43
|
+
/* Excluded from this release type: IResolvedUrl */
|
|
44
|
+
|
|
45
|
+
/* Excluded from this release type: ISharingLink */
|
|
46
|
+
|
|
47
|
+
/* Excluded from this release type: ISharingLinkKind */
|
|
48
|
+
|
|
49
|
+
/* Excluded from this release type: ISnapshotOptions */
|
|
50
|
+
|
|
51
|
+
/* Excluded from this release type: ISocketStorageDiscovery */
|
|
52
|
+
|
|
53
|
+
/* Excluded from this release type: isTokenFromCache */
|
|
54
|
+
|
|
55
|
+
/* Excluded from this release type: OdspError */
|
|
56
|
+
|
|
57
|
+
/* Excluded from this release type: OdspErrorType */
|
|
58
|
+
|
|
59
|
+
/* Excluded from this release type: OdspErrorTypes */
|
|
60
|
+
|
|
61
|
+
/* Excluded from this release type: OdspResourceTokenFetchOptions */
|
|
62
|
+
|
|
63
|
+
/* Excluded from this release type: ShareLinkInfoType */
|
|
64
|
+
|
|
65
|
+
/* Excluded from this release type: ShareLinkTypes */
|
|
66
|
+
|
|
67
|
+
/* Excluded from this release type: SharingLinkRole */
|
|
68
|
+
|
|
69
|
+
/* Excluded from this release type: SharingLinkScope */
|
|
70
|
+
|
|
71
|
+
/* Excluded from this release type: snapshotKey */
|
|
72
|
+
|
|
73
|
+
/* Excluded from this release type: TokenFetcher */
|
|
74
|
+
|
|
75
|
+
/* Excluded from this release type: TokenFetchOptions */
|
|
76
|
+
|
|
77
|
+
/* Excluded from this release type: tokenFromResponse */
|
|
78
|
+
|
|
79
|
+
/* Excluded from this release type: TokenResponse */
|
|
80
|
+
|
|
81
|
+
export { }
|