@fluidframework/odsp-driver-definitions 2.0.0-rc.2.0.2 → 2.0.0-rc.3.0.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.
Files changed (66) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/api-report/odsp-driver-definitions.api.md +7 -4
  3. package/beta.d.ts +11 -0
  4. package/dist/beta.d.ts +14 -0
  5. package/dist/errors.d.ts +2 -1
  6. package/dist/errors.d.ts.map +1 -1
  7. package/dist/errors.js +2 -2
  8. package/dist/errors.js.map +1 -1
  9. package/dist/index.d.ts +1 -1
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js.map +1 -1
  12. package/dist/legacy.d.ts +43 -0
  13. package/dist/odspCache.d.ts +1 -1
  14. package/dist/odspCache.d.ts.map +1 -1
  15. package/dist/odspCache.js.map +1 -1
  16. package/dist/public.d.ts +12 -0
  17. package/dist/resolvedUrl.d.ts +1 -1
  18. package/dist/resolvedUrl.d.ts.map +1 -1
  19. package/dist/resolvedUrl.js.map +1 -1
  20. package/dist/sessionProvider.d.ts +1 -1
  21. package/dist/sessionProvider.d.ts.map +1 -1
  22. package/dist/sessionProvider.js.map +1 -1
  23. package/dist/tokenFetch.d.ts +5 -1
  24. package/dist/tokenFetch.d.ts.map +1 -1
  25. package/dist/tokenFetch.js.map +1 -1
  26. package/internal.d.ts +11 -0
  27. package/legacy.d.ts +11 -0
  28. package/lib/beta.d.ts +14 -0
  29. package/lib/errors.d.ts +2 -1
  30. package/lib/errors.d.ts.map +1 -1
  31. package/lib/errors.js +1 -1
  32. package/lib/errors.js.map +1 -1
  33. package/lib/index.d.ts +1 -1
  34. package/lib/index.d.ts.map +1 -1
  35. package/lib/index.js.map +1 -1
  36. package/lib/legacy.d.ts +43 -0
  37. package/lib/odspCache.d.ts +1 -1
  38. package/lib/odspCache.d.ts.map +1 -1
  39. package/lib/odspCache.js.map +1 -1
  40. package/lib/public.d.ts +12 -0
  41. package/lib/resolvedUrl.d.ts +1 -1
  42. package/lib/resolvedUrl.d.ts.map +1 -1
  43. package/lib/resolvedUrl.js.map +1 -1
  44. package/lib/sessionProvider.d.ts +1 -1
  45. package/lib/sessionProvider.d.ts.map +1 -1
  46. package/lib/sessionProvider.js.map +1 -1
  47. package/lib/tokenFetch.d.ts +5 -1
  48. package/lib/tokenFetch.d.ts.map +1 -1
  49. package/lib/tokenFetch.js.map +1 -1
  50. package/package.json +27 -48
  51. package/src/errors.ts +3 -5
  52. package/src/index.ts +1 -0
  53. package/src/odspCache.ts +1 -1
  54. package/src/resolvedUrl.ts +1 -1
  55. package/src/sessionProvider.ts +1 -1
  56. package/src/tokenFetch.ts +9 -0
  57. package/api-extractor-cjs.json +0 -8
  58. package/dist/odsp-driver-definitions-alpha.d.ts +0 -574
  59. package/dist/odsp-driver-definitions-beta.d.ts +0 -92
  60. package/dist/odsp-driver-definitions-public.d.ts +0 -80
  61. package/dist/odsp-driver-definitions-untrimmed.d.ts +0 -608
  62. package/lib/odsp-driver-definitions-alpha.d.ts +0 -574
  63. package/lib/odsp-driver-definitions-beta.d.ts +0 -92
  64. package/lib/odsp-driver-definitions-public.d.ts +0 -80
  65. package/lib/odsp-driver-definitions-untrimmed.d.ts +0 -608
  66. /package/{dist → lib}/tsdoc-metadata.json +0 -0
@@ -1,80 +0,0 @@
1
- import { DriverError } from '@fluidframework/driver-definitions';
2
- import { FiveDaysMs } from '@fluidframework/driver-definitions';
3
- import { IDriverErrorBase } from '@fluidframework/driver-definitions';
4
- import { IResolvedUrl } from '@fluidframework/driver-definitions';
5
-
6
- /* Excluded from this release type: CacheContentType */
7
-
8
- /* Excluded from this release type: DriverError */
9
-
10
- /* Excluded from this release type: FiveDaysMs */
11
-
12
- /* Excluded from this release type: getKeyForCacheEntry */
13
-
14
- /* Excluded from this release type: HostStoragePolicy */
15
-
16
- /* Excluded from this release type: ICacheEntry */
17
-
18
- /* Excluded from this release type: ICollabSessionOptions */
19
-
20
- /* Excluded from this release type: IdentityType */
21
-
22
- /* Excluded from this release type: IEntry */
23
-
24
- /* Excluded from this release type: IFileEntry */
25
-
26
- /* Excluded from this release type: InstrumentedStorageTokenFetcher */
27
-
28
- /* Excluded from this release type: IOdspError */
29
-
30
- /* Excluded from this release type: IOdspErrorAugmentations */
31
-
32
- /* Excluded from this release type: IOdspResolvedUrl */
33
-
34
- /* Excluded from this release type: IOdspUrlParts */
35
-
36
- /* Excluded from this release type: IOpsCachingPolicy */
37
-
38
- /* Excluded from this release type: IPersistedCache */
39
-
40
- /* Excluded from this release type: IProvideSessionAwareDriverFactory */
41
-
42
- /* Excluded from this release type: IRelaySessionAwareDriverFactory */
43
-
44
- /* Excluded from this release type: IResolvedUrl */
45
-
46
- /* Excluded from this release type: ISharingLink */
47
-
48
- /* Excluded from this release type: ISharingLinkKind */
49
-
50
- /* Excluded from this release type: ISnapshotOptions */
51
-
52
- /* Excluded from this release type: ISocketStorageDiscovery */
53
-
54
- /* Excluded from this release type: isTokenFromCache */
55
-
56
- /* Excluded from this release type: maximumCacheDurationMs */
57
-
58
- /* Excluded from this release type: OdspError */
59
-
60
- /* Excluded from this release type: OdspErrorTypes */
61
-
62
- /* Excluded from this release type: OdspResourceTokenFetchOptions */
63
-
64
- /* Excluded from this release type: ShareLinkInfoType */
65
-
66
- /* Excluded from this release type: SharingLinkRole */
67
-
68
- /* Excluded from this release type: SharingLinkScope */
69
-
70
- /* Excluded from this release type: snapshotKey */
71
-
72
- /* Excluded from this release type: TokenFetcher */
73
-
74
- /* Excluded from this release type: TokenFetchOptions */
75
-
76
- /* Excluded from this release type: tokenFromResponse */
77
-
78
- /* Excluded from this release type: TokenResponse */
79
-
80
- export { }
@@ -1,608 +0,0 @@
1
- import { DriverError } from '@fluidframework/driver-definitions';
2
- import { FiveDaysMs } from '@fluidframework/driver-definitions';
3
- import { IDriverErrorBase } from '@fluidframework/driver-definitions';
4
- import { IResolvedUrl } from '@fluidframework/driver-definitions';
5
-
6
- /**
7
- * @alpha
8
- */
9
- export declare type CacheContentType = "snapshot" | "ops";
10
-
11
- /**
12
- * Api to generate a cache key from cache entry.
13
- * @param entry - cache entry from which a cache key is generated
14
- * @returns The key for cache.
15
- * @internal
16
- */
17
- export declare function getKeyForCacheEntry(entry: ICacheEntry): string;
18
-
19
- /**
20
- * @alpha
21
- */
22
- export declare interface HostStoragePolicy {
23
- snapshotOptions?: ISnapshotOptions;
24
- /**
25
- * If set to true, tells driver to concurrently fetch snapshot from storage (SPO) and cache
26
- * Container loads from whatever comes first in such case.
27
- * Snapshot fetched from storage is pushed to cache in either case.
28
- * If set to false, driver will first consult with cache. Only on cache miss (cache does not
29
- * return snapshot), driver will fetch snapshot from storage (and push it to cache), otherwise
30
- * it will load from cache and not reach out to storage.
31
- * Passing true results in faster loads and keeping cache more current, but it increases bandwidth consumption.
32
- */
33
- concurrentSnapshotFetch?: boolean;
34
- opsBatchSize?: number;
35
- concurrentOpsBatches?: number;
36
- /**
37
- * Policy controlling ops caching (leveraging IPersistedCache passed to driver factory)
38
- */
39
- opsCaching?: IOpsCachingPolicy;
40
- /**
41
- * Policy controlling how collaboration session is established
42
- */
43
- sessionOptions?: ICollabSessionOptions;
44
- /**
45
- * @deprecated This field will be always set to true after removal.
46
- * True to have the sharing link redeem fallback in case the Trees Latest/Redeem 1RT call fails with redeem error.
47
- * During fallback it will first redeem the sharing link and then make the Trees latest call.
48
- */
49
- enableRedeemFallback?: boolean;
50
- /**
51
- * Policy controlling if we will cache initial summary when we create a document
52
- */
53
- cacheCreateNewSummary?: boolean;
54
- /**
55
- * @deprecated This will be replaced with feature gate snapshotFormatFetchType.
56
- * Policy controlling if we want to fetch binary format snapshot.
57
- */
58
- fetchBinarySnapshotFormat?: boolean;
59
- /**
60
- * If set to true, socket cache are per OdspDocumentService instead of shared across all instances
61
- */
62
- isolateSocketCache?: boolean;
63
- /**
64
- * @deprecated Switch to using the new feature gated by enableSingleRequestForShareLinkWithCreate
65
- * with 'createLinkScope' and 'createLinkRole' is requested to the odsp apis instead of 'createLinkType'.
66
- * It enables the creation of sharing link along with the creation of file by setting this value to true.
67
- * If the host provides a 'createLinkType' parameter in the request URL to the container.attach()
68
- * method, we will send the request to ODSP with the same (if the flag is enabled) so
69
- * that a share link can be created with the creation of file to save number for round trips made to ODSP.
70
- * (This flag works independently of enableSingleRequestForShareLinkWithCreate which is used for sharing link
71
- * requests where 'createLinkScope' is requested.)
72
- */
73
- enableShareLinkWithCreate?: boolean;
74
- /**
75
- * Enable creation of sharing link along with the creation of file by setting this value to true.
76
- * If the host provides a 'createLinkScope' parameter in the request URL to the container.attach()
77
- * method, we will send the request to ODSP with the same (if the flag is enabled) so
78
- * that a share link can be created with the creation of file to save number for round trips made to ODSP.
79
- * (This flag works independently of enableShareLinkWithCreate which was used for old sharing link requests
80
- * where 'createLinkType' was requested.)
81
- */
82
- enableSingleRequestForShareLinkWithCreate?: boolean;
83
- /**
84
- * True if host does not want the storage service to use the prefetch cache to get the snapshot. Undefined will be treated
85
- * as false. This is if the host wants to do some A/B testing.
86
- */
87
- avoidPrefetchSnapshotCache?: boolean;
88
- }
89
-
90
- /**
91
- * Cache entry. Identifies file that this entry belongs to, and type of content stored in it.
92
- * @alpha
93
- */
94
- export declare interface ICacheEntry extends IEntry {
95
- /**
96
- * Identifies file in storage this cached entry is for
97
- */
98
- file: IFileEntry;
99
- }
100
-
101
- /**
102
- * @alpha
103
- */
104
- export declare interface ICollabSessionOptions {
105
- /**
106
- * Value indicating the display name for session that admits unauthenticated user.
107
- * This name will be used in attribution associated with edits made by such user.
108
- */
109
- unauthenticatedUserDisplayName?: string;
110
- /**
111
- * @deprecated Due to security reasons we will be passing the token via Authorization header only.
112
- * Value indicating session preference to always pass access token via Authorization header.
113
- * Default behavior is to pass access token via query parameter unless overall href string
114
- * length exceeds 2048 characters. Using query param is performance optimization which results
115
- * in ODSP XHR request being treated as 'simple' request which do not require OPTIONS call to
116
- * validate CORS. However, not all ODSP implementations understand this optimization.
117
- * For instance, auth layer on Converged stack will fail request with access token passed via
118
- * query param.
119
- */
120
- forceAccessTokenViaAuthorizationHeader?: boolean;
121
- }
122
-
123
- /**
124
- * Identity types supported by ODSP driver.
125
- * `Consumer` represents user authenticated with Microsoft Account (MSA).
126
- * `Enterprise` represents user authenticated with M365 tenant account.
127
- * @alpha
128
- */
129
- export declare type IdentityType = "Consumer" | "Enterprise";
130
-
131
- /**
132
- * Cache entry. Identifies file that this entry belongs to, and type of content stored in it.
133
- * @alpha
134
- */
135
- export declare interface IEntry {
136
- /**
137
- * Identifies type of entry for a given file.
138
- * Each file can have multiple types of entries associated with it.
139
- * For example, it can be snapshot, blob, ops, etc.
140
- */
141
- type: CacheContentType;
142
- /**
143
- * Identifies individual entry for a given file and type.
144
- * Each file can have multiple cache entries associated with it.
145
- * This property identifies a particular instance of entry.
146
- * For example, for blobs it will be unique ID of the blob in a file.
147
- * For batch of ops, it can be starting op sequence number.
148
- * For types that have only one entry (like snapshots), it will be empty string.
149
- */
150
- key: string;
151
- }
152
-
153
- /**
154
- * @alpha
155
- */
156
- export declare interface IFileEntry {
157
- /**
158
- * Unique and stable ID of the document.
159
- * Driver guarantees that docId is stable ID uniquely identifying document.
160
- */
161
- docId: string;
162
- /**
163
- * Resolved URI is provided for additional versatility - host can use it to
164
- * identify file in storage, and (as example) delete all cached entries for
165
- * a file if user requests so.
166
- * This is IOdspResolvedUrl in case of ODSP driver.
167
- */
168
- resolvedUrl: IResolvedUrl;
169
- }
170
-
171
- /**
172
- * @internal
173
- */
174
- export declare type InstrumentedStorageTokenFetcher = (options: TokenFetchOptions, name: string, alwaysRecordTokenFetchTelemetry?: boolean) => Promise<string | null>;
175
-
176
- /**
177
- * Base interface for all errors and warnings
178
- * Superset of IDriverErrorBase, but with Odsp-specific errorType and properties
179
- * @alpha
180
- */
181
- export declare interface IOdspError extends Omit<IDriverErrorBase, "errorType">, IOdspErrorAugmentations {
182
- readonly errorType: OdspErrorTypes;
183
- }
184
-
185
- /**
186
- * @alpha
187
- */
188
- export declare interface IOdspErrorAugmentations {
189
- /**
190
- * Server epoch indicates when the file was last modified.
191
- * Used to detect modifications outside Fluid's services
192
- */
193
- serverEpoch?: string;
194
- /**
195
- * It is the redirection url at which the network call should have been made. It is due to change
196
- * in site domain of the file on server.
197
- */
198
- redirectLocation?: string;
199
- /**
200
- * It is array of error codes included in error response from server.
201
- */
202
- facetCodes?: string[];
203
- }
204
-
205
- /**
206
- * @alpha
207
- */
208
- export declare interface IOdspResolvedUrl extends IResolvedUrl, IOdspUrlParts {
209
- type: "fluid";
210
- odspResolvedUrl: true;
211
- url: string;
212
- hashedDocumentId: string;
213
- endpoints: {
214
- snapshotStorageUrl: string;
215
- attachmentPOSTStorageUrl: string;
216
- attachmentGETStorageUrl: string;
217
- deltaStorageUrl: string;
218
- };
219
- tokens: {};
220
- fileName: string;
221
- summarizer: boolean;
222
- codeHint?: {
223
- containerPackageName?: string;
224
- };
225
- fileVersion: string | undefined;
226
- dataStorePath?: string;
227
- /**
228
- * Sharing link data created for the ODSP item.
229
- * Contains information about either sharing link created while creating a new file or
230
- * a redeemable share link created when loading an existing file
231
- */
232
- shareLinkInfo?: ShareLinkInfoType;
233
- isClpCompliantApp?: boolean;
234
- }
235
-
236
- /**
237
- * @alpha
238
- */
239
- export declare interface IOdspUrlParts {
240
- siteUrl: string;
241
- driveId: string;
242
- itemId: string;
243
- }
244
-
245
- /**
246
- * @alpha
247
- */
248
- export declare interface IOpsCachingPolicy {
249
- /**
250
- * Batch size. Controls how many ops are grouped together as single cache entry
251
- * The bigger the number, the more efficient it is (less reads & writes)
252
- * At the same time, big number means we wait for so many ops to accumulate, which
253
- * increases chances and number of trailing ops that would not be flushed to cache
254
- * when user closes tab
255
- * Use any number below 1 to disable caching
256
- * Default: 100
257
- */
258
- batchSize?: number;
259
- /**
260
- * To reduce the problem of losing trailing ops when using big batch sizes, host
261
- * could specify how often driver should flush ops it has not flushed yet.
262
- * -1 means do not use timer.
263
- * Measured in ms.
264
- * Default: 5000
265
- */
266
- timerGranularity?: number;
267
- /**
268
- * Total number of ops to cache. When we reach that number, ops caching stops
269
- * Default: 5000
270
- */
271
- totalOpsToCache?: number;
272
- }
273
-
274
- /**
275
- * Persistent cache. This interface can be implemented by the host to provide durable caching
276
- * across sessions. If not provided at driver factory construction, factory will use in-memory
277
- * cache implementation that does not survive across sessions. Snapshot entires stored in the
278
- * IPersistedCache will be considered stale and removed after 2 days. Read the README for more
279
- * information.
280
- * @alpha
281
- */
282
- export declare interface IPersistedCache {
283
- /**
284
- * Get the cache value of the key
285
- * @param entry - cache entry, identifies file and particular key for this file.
286
- * @returns Cached value. undefined if nothing is cached.
287
- */
288
- get(entry: ICacheEntry): Promise<any>;
289
- /**
290
- * Put the value into cache.
291
- * Important - only serializable content is allowed since this cache may be persisted between sessions
292
- * @param entry - cache entry.
293
- * @param value - JSON-serializable content.
294
- */
295
- put(entry: ICacheEntry, value: any): Promise<void>;
296
- /**
297
- * Removes the entries from the cache for given parametres.
298
- * @param file - file entry to be deleted.
299
- */
300
- removeEntries(file: IFileEntry): Promise<void>;
301
- }
302
-
303
- /**
304
- * An interface that allows a concrete instance of a driver factory to interrogate itself
305
- * to find out if it is session aware.
306
- * @alpha
307
- */
308
- export declare interface IProvideSessionAwareDriverFactory {
309
- readonly IRelaySessionAwareDriverFactory: IRelaySessionAwareDriverFactory;
310
- }
311
-
312
- /**
313
- * An interface that allows a concrete instance of a driver factory to call the `getRelayServiceSessionInfo`
314
- * function if it session aware.
315
- * @alpha
316
- */
317
- export declare interface IRelaySessionAwareDriverFactory extends IProvideSessionAwareDriverFactory {
318
- getRelayServiceSessionInfo(resolvedUrl: IResolvedUrl): Promise<ISocketStorageDiscovery | undefined>;
319
- }
320
-
321
- /**
322
- * Sharing link data received from the /snapshot api response.
323
- * @alpha
324
- */
325
- export declare interface ISharingLink extends ISharingLinkKind {
326
- webUrl: string;
327
- }
328
-
329
- /**
330
- * Defines the permissions scope for a share link requested to be created during the creation the file in ODSP.
331
- * Providing these properties to the /snapshot api will also create and return the requested kind of sharing link.
332
- * @alpha
333
- */
334
- export declare interface ISharingLinkKind {
335
- scope: SharingLinkScope;
336
- role?: SharingLinkRole;
337
- }
338
-
339
- /**
340
- * @alpha
341
- */
342
- export declare interface ISnapshotOptions {
343
- blobs?: number;
344
- deltas?: number;
345
- channels?: number;
346
- /**
347
- * Maximum Data size (in bytes)
348
- *
349
- * @remarks
350
- * If specified, SPO will fail snapshot request with 413 error (see {@link @fluidframework/odsp-driver-definitions#(OdspErrorTypes:variable).snapshotTooBig})
351
- * if snapshot is bigger in size than specified limit.
352
- */
353
- mds?: number;
354
- timeout?: number;
355
- }
356
-
357
- /**
358
- * Socket storage discovery api response
359
- * @alpha
360
- */
361
- export declare interface ISocketStorageDiscovery {
362
- id: string;
363
- runtimeTenantId?: string;
364
- tenantId: string;
365
- snapshotStorageUrl: string;
366
- deltaStorageUrl: string;
367
- /**
368
- * PUSH URL
369
- */
370
- deltaStreamSocketUrl: string;
371
- /**
372
- * The access token for PushChannel. Optionally returned, depending on implementation.
373
- * OneDrive for Consumer implementation returns it and OneDrive for Business implementation
374
- * does not return it and instead expects token to be returned via `getWebsocketToken` callback
375
- * passed as a parameter to `OdspDocumentService.create()` factory.
376
- */
377
- socketToken?: string;
378
- /**
379
- * This is the time within which client has to refresh the session on (ODSP) relay service.
380
- */
381
- refreshSessionDurationSeconds?: number;
382
- /**
383
- * Represent the sensitivity labels info for the file. Keeping it optional for back-compat. The
384
- * response will contain empty labels when the file has no labels, so this field will be there
385
- * even if file has no labels when the service will implement this contract.
386
- */
387
- sensitivityLabelsInfo?: string;
388
- }
389
-
390
- /**
391
- * Helper method which returns flag indicating whether token response comes from local cache
392
- * @param tokenResponse - return value for TokenFetcher method
393
- * @returns Value indicating whether response came from cache.
394
- * Undefined is returned when we could not determine the source of token.
395
- * @internal
396
- */
397
- export declare const isTokenFromCache: (tokenResponse: string | TokenResponse | null) => boolean | undefined;
398
-
399
- /**
400
- * Must be less than IDocumentStorageServicePolicies.maximumCacheDurationMs policy of 5 days.
401
- * That policy is the outward expression and this value is the implementation - using a larger value
402
- * would violate that statement of the driver's behavior.
403
- * Other parts of the system (such as Garbage Collection) depend on that policy being properly implemented.
404
- *
405
- * @internal
406
- */
407
- export declare const maximumCacheDurationMs: FiveDaysMs;
408
-
409
- /**
410
- * @alpha
411
- */
412
- export declare type OdspError = IOdspError | (DriverError & IOdspErrorAugmentations);
413
-
414
- /**
415
- * ODSP Error types.
416
- * Different error types that may be thrown by the ODSP driver.
417
- * @alpha
418
- */
419
- export declare const OdspErrorTypes: {
420
- /**
421
- * Invalid file name (at creation of the file)
422
- */
423
- readonly invalidFileNameError: "invalidFileNameError";
424
- /**
425
- * Snapshot is too big. Host application specified limit for snapshot size, and snapshot was bigger
426
- * that that limit, thus request failed. Hosting application is expected to have fall-back behavior for
427
- * such case.
428
- */
429
- readonly snapshotTooBig: "snapshotTooBig";
430
- /**
431
- * Maximum time limit to fetch reached. Host application specified limit for fetching of snapshot, when
432
- * that limit is reached, request fails. Hosting application is expected to have fall-back behavior for
433
- * such case.
434
- */
435
- readonly fetchTimeout: "fetchTimeout";
436
- /**
437
- * SPO admin toggle: fluid service is not enabled.
438
- */
439
- readonly fluidNotEnabled: "fluidNotEnabled";
440
- /**
441
- * This error will be raised when client is too behind with no way to catch up.
442
- * This condition will happen when user was offline for too long, resulting in old ops / blobs being deleted
443
- * by storage, and thus removing an ability for client to catch up.
444
- * This condition will result in any local changes being lost (i.e. only way to save state is by user
445
- * copying it over manually)
446
- */
447
- readonly cannotCatchUp: "cannotCatchUp";
448
- /**
449
- * SPO can occasionally return 403 for r/w operations on document when there is a fail over to another data center.
450
- * So to preserve integrity of the data, the data becomes readonly.
451
- */
452
- readonly serviceReadOnly: "serviceReadOnly";
453
- /**
454
- * Due to organizational policies, you can't access server resources from the current network location.
455
- */
456
- readonly blockedIPAddress: "blockedIPAddress";
457
- readonly genericNetworkError: "genericNetworkError";
458
- readonly authorizationError: "authorizationError";
459
- readonly fileNotFoundOrAccessDeniedError: "fileNotFoundOrAccessDeniedError";
460
- readonly offlineError: "offlineError";
461
- readonly unsupportedClientProtocolVersion: "unsupportedClientProtocolVersion";
462
- readonly writeError: "writeError";
463
- readonly fetchFailure: "fetchFailure";
464
- readonly fetchTokenError: "fetchTokenError";
465
- readonly incorrectServerResponse: "incorrectServerResponse";
466
- readonly fileOverwrittenInStorage: "fileOverwrittenInStorage";
467
- readonly deltaStreamConnectionForbidden: "deltaStreamConnectionForbidden";
468
- readonly locationRedirection: "locationRedirection";
469
- readonly fluidInvalidSchema: "fluidInvalidSchema";
470
- readonly fileIsLocked: "fileIsLocked";
471
- readonly outOfStorageError: "outOfStorageError";
472
- readonly genericError: "genericError";
473
- readonly throttlingError: "throttlingError";
474
- readonly usageError: "usageError";
475
- };
476
-
477
- /**
478
- * @alpha
479
- */
480
- export declare type OdspErrorTypes = (typeof OdspErrorTypes)[keyof typeof OdspErrorTypes];
481
-
482
- /**
483
- * Represents access token fetch options for ODSP resource
484
- * @alpha
485
- */
486
- export declare interface OdspResourceTokenFetchOptions extends TokenFetchOptions {
487
- /** Site url representing ODSP resource location */
488
- siteUrl: string;
489
- /** ODSP drive id where resource resides. Optional, used only when fetching token to access ODSP file */
490
- driveId?: string;
491
- /** ODSP item id representing resource. Optional, used only when fetching token to access ODSP file */
492
- itemId?: string;
493
- }
494
-
495
- /**
496
- * Sharing link data created for the ODSP item.
497
- * Contains information about either sharing link created while creating a new file or
498
- * a redeemable share link created when loading an existing file
499
- * @alpha
500
- */
501
- export declare interface ShareLinkInfoType {
502
- /**
503
- * We create a new file in ODSP with the /snapshot api call. Applications then need to make a separate apis call to
504
- * create a sharing link for that file. To reduce the number of network calls, ODSP now provides a feature
505
- * where we can create a share link along with creating a file by passing a query parameter called
506
- * createShareLink (deprecated) or createLinkScope and createLinkRole. createLink object below saves the information
507
- * from the /snapshot api response.
508
- */
509
- createLink?: {
510
- /**
511
- * Share link created when the file is created for the first time with /snapshot api call.
512
- */
513
- link?: ISharingLink;
514
- /**
515
- * Error message if creation of sharing link fails with /snapshot api call
516
- */
517
- error?: any;
518
- shareId?: string;
519
- };
520
- /**
521
- * This is used to save the network calls while doing trees/latest call as if the client does not have
522
- * permission then this link can be redeemed for the permissions in the same network call.
523
- */
524
- sharingLinkToRedeem?: string;
525
- }
526
-
527
- /**
528
- * View/edit permission role for a sharing link.
529
- * @alpha
530
- */
531
- export declare enum SharingLinkRole {
532
- view = "view",
533
- edit = "edit"
534
- }
535
-
536
- /**
537
- * Sharing scope of the share links created for a file.
538
- * @alpha
539
- */
540
- export declare enum SharingLinkScope {
541
- organization = "organization",
542
- users = "users",
543
- anonymous = "anonymous",
544
- default = "default"
545
- }
546
-
547
- /**
548
- * Describes what kind of content is stored in cache entry.
549
- * @internal
550
- */
551
- export declare const snapshotKey = "snapshot";
552
-
553
- /**
554
- * Method signature for callback method used to fetch access token
555
- * @param options - token fetch options
556
- * @returns If successful, TokenResponse object representing token value along with flag indicating
557
- * whether token came from cache. Legacy implementation may return a string for token value;
558
- * in this case it should be assumes that fromCache signal is undefined. Null is returned in case of failure.
559
- * @alpha
560
- */
561
- export declare type TokenFetcher<T> = (options: T) => Promise<string | TokenResponse | null>;
562
-
563
- /**
564
- * Represents access token fetch options
565
- * @alpha
566
- */
567
- export declare interface TokenFetchOptions {
568
- /**
569
- * Value indicating whether fresh token has to be returned.
570
- * If false then it is okay to return cached unexpired token if available.
571
- */
572
- refresh: boolean;
573
- /**
574
- * Claims that have to be passed with token fetch request.
575
- * These can be used to specify additional information that must be passed to token authority.
576
- */
577
- claims?: string;
578
- /**
579
- * Tenant id of authority that must be handling token fetch.
580
- * If it is not specified then it is up to token fetching logic to determine which tenant authority
581
- * to use to issue access token.
582
- */
583
- tenantId?: string;
584
- }
585
-
586
- /**
587
- * Helper method which transforms return value for TokenFetcher method to token string
588
- * @param tokenResponse - return value for TokenFetcher method
589
- * @returns Token value
590
- * @internal
591
- */
592
- export declare const tokenFromResponse: (tokenResponse: string | TokenResponse | null | undefined) => string | null;
593
-
594
- /**
595
- * Represents token response
596
- * @beta
597
- */
598
- export declare interface TokenResponse {
599
- /** Token value */
600
- token: string;
601
- /**
602
- * Whether or not the token was obtained from local cache.
603
- * @remarks `undefined` indicates that it could not be determined whether or not the token was obtained this way.
604
- */
605
- fromCache?: boolean;
606
- }
607
-
608
- export { }