@fluidframework/odsp-driver-definitions 2.0.0-dev-rc.1.0.0.228517 → 2.0.0-dev-rc.2.0.0.245554
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/{.eslintrc.js → .eslintrc.cjs} +4 -1
- package/CHANGELOG.md +24 -0
- package/{api-extractor-esm.json → api-extractor-cjs.json} +5 -1
- package/api-extractor.json +1 -1
- package/api-report/odsp-driver-definitions.api.md +8 -24
- package/dist/errors.d.ts +1 -55
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +1 -56
- package/dist/errors.js.map +1 -1
- package/dist/factory.d.ts +11 -0
- package/dist/factory.d.ts.map +1 -1
- package/dist/factory.js.map +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -14
- package/dist/index.js.map +1 -1
- package/dist/odsp-driver-definitions-alpha.d.ts +26 -74
- package/dist/odsp-driver-definitions-beta.d.ts +9 -5
- package/dist/odsp-driver-definitions-public.d.ts +5 -4
- package/dist/odsp-driver-definitions-untrimmed.d.ts +32 -72
- package/dist/odspCache.d.ts +10 -1
- package/dist/odspCache.d.ts.map +1 -1
- package/dist/odspCache.js +10 -1
- package/dist/odspCache.js.map +1 -1
- package/dist/package.json +3 -0
- package/dist/resolvedUrl.d.ts +1 -16
- package/dist/resolvedUrl.d.ts.map +1 -1
- package/dist/resolvedUrl.js +1 -10
- package/dist/resolvedUrl.js.map +1 -1
- package/dist/sessionProvider.d.ts +6 -0
- package/dist/sessionProvider.d.ts.map +1 -1
- package/dist/sessionProvider.js.map +1 -1
- package/dist/tokenFetch.d.ts +4 -1
- package/dist/tokenFetch.d.ts.map +1 -1
- package/dist/tokenFetch.js.map +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/{errors.d.mts → errors.d.ts} +6 -56
- package/lib/errors.d.ts.map +1 -0
- package/lib/errors.js +52 -0
- package/lib/errors.js.map +1 -0
- package/lib/{factory.d.mts → factory.d.ts} +12 -1
- package/lib/factory.d.ts.map +1 -0
- package/lib/{factory.mjs → factory.js} +1 -1
- package/lib/factory.js.map +1 -0
- package/lib/{index.d.mts → index.d.ts} +7 -7
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +9 -0
- package/lib/index.js.map +1 -0
- package/lib/{odsp-driver-definitions-alpha.d.mts → odsp-driver-definitions-alpha.d.ts} +26 -74
- package/lib/{odsp-driver-definitions-beta.d.mts → odsp-driver-definitions-beta.d.ts} +9 -5
- package/lib/{odsp-driver-definitions-public.d.mts → odsp-driver-definitions-public.d.ts} +5 -4
- package/lib/{odsp-driver-definitions-untrimmed.d.mts → odsp-driver-definitions-untrimmed.d.ts} +32 -72
- package/lib/{odspCache.d.mts → odspCache.d.ts} +11 -2
- package/lib/odspCache.d.ts.map +1 -0
- package/lib/{odspCache.mjs → odspCache.js} +10 -1
- package/lib/odspCache.js.map +1 -0
- package/lib/{resolvedUrl.d.mts → resolvedUrl.d.ts} +2 -17
- package/lib/resolvedUrl.d.ts.map +1 -0
- package/lib/{resolvedUrl.mjs → resolvedUrl.js} +1 -10
- package/lib/resolvedUrl.js.map +1 -0
- package/lib/{sessionProvider.d.mts → sessionProvider.d.ts} +7 -1
- package/lib/sessionProvider.d.ts.map +1 -0
- package/lib/{sessionProvider.mjs → sessionProvider.js} +1 -1
- package/lib/sessionProvider.js.map +1 -0
- package/lib/{tokenFetch.d.mts → tokenFetch.d.ts} +5 -2
- package/lib/tokenFetch.d.ts.map +1 -0
- package/lib/{tokenFetch.mjs → tokenFetch.js} +1 -1
- package/lib/tokenFetch.js.map +1 -0
- package/package.json +42 -32
- package/src/errors.ts +1 -64
- package/src/factory.ts +10 -2
- package/src/index.ts +7 -13
- package/src/odspCache.ts +11 -1
- package/src/resolvedUrl.ts +1 -18
- package/src/sessionProvider.ts +7 -0
- package/src/tokenFetch.ts +4 -1
- package/tsconfig.cjs.json +7 -0
- package/tsconfig.json +2 -5
- package/lib/errors.d.mts.map +0 -1
- package/lib/errors.mjs +0 -103
- package/lib/errors.mjs.map +0 -1
- package/lib/factory.d.mts.map +0 -1
- package/lib/factory.mjs.map +0 -1
- package/lib/index.d.mts.map +0 -1
- package/lib/index.mjs +0 -9
- package/lib/index.mjs.map +0 -1
- package/lib/odspCache.d.mts.map +0 -1
- package/lib/odspCache.mjs.map +0 -1
- package/lib/resolvedUrl.d.mts.map +0 -1
- package/lib/resolvedUrl.mjs.map +0 -1
- package/lib/sessionProvider.d.mts.map +0 -1
- package/lib/sessionProvider.mjs.map +0 -1
- package/lib/tokenFetch.d.mts.map +0 -1
- package/lib/tokenFetch.mjs.map +0 -1
|
@@ -4,7 +4,10 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
module.exports = {
|
|
7
|
-
extends: [
|
|
7
|
+
extends: [
|
|
8
|
+
require.resolve("@fluidframework/eslint-config-fluid/minimal-deprecated"),
|
|
9
|
+
"prettier",
|
|
10
|
+
],
|
|
8
11
|
parserOptions: {
|
|
9
12
|
project: ["./tsconfig.json", "./src/test/tsconfig.json"],
|
|
10
13
|
},
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @fluidframework/odsp-driver-definitions
|
|
2
2
|
|
|
3
|
+
## 2.0.0-rc.2.0.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Deprecated error-related enums have been removed ([#19067](https://github.com/microsoft/FluidFramework/issues/19067)) [59793302e5](https://github.com/microsoft/FluidFramework/commits/59793302e56784cfb6ace0e6469345f3565b3312)
|
|
8
|
+
|
|
9
|
+
Error-related enums `ContainerErrorType`, `DriverErrorType`, `OdspErrorType` and `RouterliciousErrorType` were previously
|
|
10
|
+
deprecated and are now removed. There are replacement object-based enumerations of `ContainerErrorTypes`,
|
|
11
|
+
`DriverErrorTypes`, `OdspErrorTypes` and `RouterliciousErrorTypes`. Refer to the release notes of [Fluid Framework version
|
|
12
|
+
2.0.0-internal.7.0.0](https://github.com/microsoft/FluidFramework/releases/tag/client_v2.0.0-internal.7.0.0) for details
|
|
13
|
+
on the replacements.
|
|
14
|
+
|
|
15
|
+
- odsp-driver: Removed deprecated implementation of SingleRT feature ([#18690](https://github.com/microsoft/FluidFramework/issues/18690)) [430205cff1](https://github.com/microsoft/FluidFramework/commits/430205cff1ba8a1a7b13b4d42d12babaae596708)
|
|
16
|
+
|
|
17
|
+
Removed the deprecated logic of creating sharing-links with container attach (called SingleRT) which was enabled via enableShareLinkWithCreate flag in HostStoragePolicy. This change removes SharingLinkTypes interface definition, removes other deprecated properties from the odsp-driver's resolvedUrl object and also removes the enableShareLinkWithCreate flag. The newer version of SingleRT feature continues to exist, which can be enabled via enableSingleRequestForShareLinkWithCreate feature flag in HostStoragePolicy.
|
|
18
|
+
|
|
19
|
+
- container-definitions: Added containerMetadata prop on IContainer interface ([#19142](https://github.com/microsoft/FluidFramework/issues/19142)) [d0d77f3516](https://github.com/microsoft/FluidFramework/commits/d0d77f3516d67f3c9faedb47b20dbd4e309c3bc2)
|
|
20
|
+
|
|
21
|
+
Added `containerMetadata` prop on IContainer interface.
|
|
22
|
+
|
|
23
|
+
- runtime-definitions: Moved ISignalEnvelope interface to core-interfaces ([#19142](https://github.com/microsoft/FluidFramework/issues/19142)) [d0d77f3516](https://github.com/microsoft/FluidFramework/commits/d0d77f3516d67f3c9faedb47b20dbd4e309c3bc2)
|
|
24
|
+
|
|
25
|
+
The `ISignalEnvelope` interface has been moved to the @fluidframework/core-interfaces package.
|
|
26
|
+
|
|
3
27
|
## 2.0.0-rc.1.0.0
|
|
4
28
|
|
|
5
29
|
### Minor Changes
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
-
"extends": "../../../common/build/build-common/api-extractor-base
|
|
3
|
+
"extends": "../../../common/build/build-common/api-extractor-base.cjs.primary.json",
|
|
4
|
+
// CJS is actually secondary; so, no report.
|
|
5
|
+
"apiReport": {
|
|
6
|
+
"enabled": false
|
|
7
|
+
}
|
|
4
8
|
}
|
package/api-extractor.json
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
```ts
|
|
6
6
|
|
|
7
7
|
import { DriverError } from '@fluidframework/driver-definitions';
|
|
8
|
+
import { FiveDaysMs } from '@fluidframework/driver-definitions';
|
|
8
9
|
import { IDriverErrorBase } from '@fluidframework/driver-definitions';
|
|
9
10
|
import { IResolvedUrl } from '@fluidframework/driver-definitions';
|
|
10
11
|
|
|
@@ -21,6 +22,7 @@ export interface HostStoragePolicy {
|
|
|
21
22
|
// (undocumented)
|
|
22
23
|
concurrentOpsBatches?: number;
|
|
23
24
|
concurrentSnapshotFetch?: boolean;
|
|
25
|
+
disableRetriesOnStorageThrottlingError?: boolean;
|
|
24
26
|
// @deprecated (undocumented)
|
|
25
27
|
enableRedeemFallback?: boolean;
|
|
26
28
|
// @deprecated (undocumented)
|
|
@@ -70,7 +72,7 @@ export type InstrumentedStorageTokenFetcher = (options: TokenFetchOptions, name:
|
|
|
70
72
|
// @alpha
|
|
71
73
|
export interface IOdspError extends Omit<IDriverErrorBase, "errorType">, IOdspErrorAugmentations {
|
|
72
74
|
// (undocumented)
|
|
73
|
-
readonly errorType:
|
|
75
|
+
readonly errorType: OdspErrorTypes;
|
|
74
76
|
}
|
|
75
77
|
|
|
76
78
|
// @alpha (undocumented)
|
|
@@ -174,7 +176,6 @@ export interface ISnapshotOptions {
|
|
|
174
176
|
channels?: number;
|
|
175
177
|
// (undocumented)
|
|
176
178
|
deltas?: number;
|
|
177
|
-
// (undocumented)
|
|
178
179
|
mds?: number;
|
|
179
180
|
// (undocumented)
|
|
180
181
|
timeout?: number;
|
|
@@ -190,6 +191,7 @@ export interface ISocketStorageDiscovery {
|
|
|
190
191
|
refreshSessionDurationSeconds?: number;
|
|
191
192
|
// (undocumented)
|
|
192
193
|
runtimeTenantId?: string;
|
|
194
|
+
sensitivityLabelsInfo?: string;
|
|
193
195
|
// (undocumented)
|
|
194
196
|
snapshotStorageUrl: string;
|
|
195
197
|
socketToken?: string;
|
|
@@ -200,23 +202,12 @@ export interface ISocketStorageDiscovery {
|
|
|
200
202
|
// @internal
|
|
201
203
|
export const isTokenFromCache: (tokenResponse: string | TokenResponse | null) => boolean | undefined;
|
|
202
204
|
|
|
205
|
+
// @internal
|
|
206
|
+
export const maximumCacheDurationMs: FiveDaysMs;
|
|
207
|
+
|
|
203
208
|
// @alpha (undocumented)
|
|
204
209
|
export type OdspError = IOdspError | (DriverError & IOdspErrorAugmentations);
|
|
205
210
|
|
|
206
|
-
// @alpha @deprecated
|
|
207
|
-
export enum OdspErrorType {
|
|
208
|
-
blockedIPAddress = "blockedIPAddress",
|
|
209
|
-
cannotCatchUp = "cannotCatchUp",
|
|
210
|
-
fetchTimeout = "fetchTimeout",
|
|
211
|
-
// (undocumented)
|
|
212
|
-
fetchTokenError = "fetchTokenError",
|
|
213
|
-
fluidNotEnabled = "fluidNotEnabled",
|
|
214
|
-
invalidFileNameError = "invalidFileNameError",
|
|
215
|
-
outOfStorageError = "outOfStorageError",
|
|
216
|
-
serviceReadOnly = "serviceReadOnly",
|
|
217
|
-
snapshotTooBig = "snapshotTooBig"
|
|
218
|
-
}
|
|
219
|
-
|
|
220
211
|
// @alpha
|
|
221
212
|
export const OdspErrorTypes: {
|
|
222
213
|
readonly invalidFileNameError: "invalidFileNameError";
|
|
@@ -259,20 +250,13 @@ export interface OdspResourceTokenFetchOptions extends TokenFetchOptions {
|
|
|
259
250
|
// @alpha
|
|
260
251
|
export interface ShareLinkInfoType {
|
|
261
252
|
createLink?: {
|
|
262
|
-
|
|
263
|
-
link?: string | ISharingLink;
|
|
253
|
+
link?: ISharingLink;
|
|
264
254
|
error?: any;
|
|
265
255
|
shareId?: string;
|
|
266
256
|
};
|
|
267
257
|
sharingLinkToRedeem?: string;
|
|
268
258
|
}
|
|
269
259
|
|
|
270
|
-
// @alpha @deprecated (undocumented)
|
|
271
|
-
export enum ShareLinkTypes {
|
|
272
|
-
// (undocumented)
|
|
273
|
-
csl = "csl"
|
|
274
|
-
}
|
|
275
|
-
|
|
276
260
|
// @alpha
|
|
277
261
|
export enum SharingLinkRole {
|
|
278
262
|
// (undocumented)
|
package/dist/errors.d.ts
CHANGED
|
@@ -69,60 +69,6 @@ export declare const OdspErrorTypes: {
|
|
|
69
69
|
* @alpha
|
|
70
70
|
*/
|
|
71
71
|
export type OdspErrorTypes = (typeof OdspErrorTypes)[keyof typeof OdspErrorTypes];
|
|
72
|
-
/**
|
|
73
|
-
* ODSP Error types.
|
|
74
|
-
* Different error types that may be thrown by the ODSP driver.
|
|
75
|
-
*
|
|
76
|
-
* @deprecated Use {@link (OdspErrorTypes:variable)} instead.
|
|
77
|
-
* @alpha
|
|
78
|
-
*/
|
|
79
|
-
export declare enum OdspErrorType {
|
|
80
|
-
/**
|
|
81
|
-
* Storage is out of space
|
|
82
|
-
*/
|
|
83
|
-
outOfStorageError = "outOfStorageError",
|
|
84
|
-
/**
|
|
85
|
-
* Invalid file name (at creation of the file)
|
|
86
|
-
*/
|
|
87
|
-
invalidFileNameError = "invalidFileNameError",
|
|
88
|
-
/**
|
|
89
|
-
* Snapshot is too big. Host application specified limit for snapshot size, and snapshot was bigger
|
|
90
|
-
* that that limit, thus request failed. Hosting application is expected to have fall-back behavior for
|
|
91
|
-
* such case.
|
|
92
|
-
*/
|
|
93
|
-
snapshotTooBig = "snapshotTooBig",
|
|
94
|
-
/**
|
|
95
|
-
* Maximum time limit to fetch reached. Host application specified limit for fetching of snapshot, when
|
|
96
|
-
* that limit is reached, request fails. Hosting application is expected to have fall-back behavior for
|
|
97
|
-
* such case.
|
|
98
|
-
*/
|
|
99
|
-
fetchTimeout = "fetchTimeout",
|
|
100
|
-
/**
|
|
101
|
-
* SPO admin toggle: fluid service is not enabled.
|
|
102
|
-
*/
|
|
103
|
-
fluidNotEnabled = "fluidNotEnabled",
|
|
104
|
-
/**
|
|
105
|
-
* {@inheritDoc @fluidframework/driver-definitions#FluidErrorType.fetchTokenError}
|
|
106
|
-
*/
|
|
107
|
-
fetchTokenError = "fetchTokenError",
|
|
108
|
-
/**
|
|
109
|
-
* This error will be raised when client is too behind with no way to catch up.
|
|
110
|
-
* This condition will happen when user was offline for too long, resulting in old ops / blobs being deleted
|
|
111
|
-
* by storage, and thus removing an ability for client to catch up.
|
|
112
|
-
* This condition will result in any local changes being lost (i.e. only way to save state is by user
|
|
113
|
-
* copying it over manually)
|
|
114
|
-
*/
|
|
115
|
-
cannotCatchUp = "cannotCatchUp",
|
|
116
|
-
/**
|
|
117
|
-
* SPO can occasionally return 403 for r/w operations on document when there is a fail over to another data center.
|
|
118
|
-
* So to preserve integrity of the data, the data becomes readonly.
|
|
119
|
-
*/
|
|
120
|
-
serviceReadOnly = "serviceReadOnly",
|
|
121
|
-
/**
|
|
122
|
-
* Due to organizational policies, you can't access server resources from the current network location.
|
|
123
|
-
*/
|
|
124
|
-
blockedIPAddress = "blockedIPAddress"
|
|
125
|
-
}
|
|
126
72
|
/**
|
|
127
73
|
* @alpha
|
|
128
74
|
*/
|
|
@@ -148,7 +94,7 @@ export interface IOdspErrorAugmentations {
|
|
|
148
94
|
* @alpha
|
|
149
95
|
*/
|
|
150
96
|
export interface IOdspError extends Omit<IDriverErrorBase, "errorType">, IOdspErrorAugmentations {
|
|
151
|
-
readonly errorType:
|
|
97
|
+
readonly errorType: OdspErrorTypes;
|
|
152
98
|
}
|
|
153
99
|
/**
|
|
154
100
|
* @alpha
|
package/dist/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACN,WAAW,EACX,gBAAgB,EAEhB,MAAM,oCAAoC,CAAC;AAE5C;;;;GAIG;AACH,eAAO,MAAM,cAAc;IAI1B;;OAEG;;IAGH;;;;OAIG;;IAGH;;;;OAIG;;IAGH;;OAEG;;IAGH;;;;;;OAMG;;IAGH;;;OAGG;;IAGH;;OAEG;;;;;;;;;;;;;;;;;;;;CAEM,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAElF
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACN,WAAW,EACX,gBAAgB,EAEhB,MAAM,oCAAoC,CAAC;AAE5C;;;;GAIG;AACH,eAAO,MAAM,cAAc;IAI1B;;OAEG;;IAGH;;;;OAIG;;IAGH;;;;OAIG;;IAGH;;OAEG;;IAGH;;;;;;OAMG;;IAGH;;;OAGG;;IAGH;;OAEG;;;;;;;;;;;;;;;;;;;;CAEM,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAElF;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACvC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAED;;;;GAIG;AACH,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,gBAAgB,EAAE,WAAW,CAAC,EAAE,uBAAuB;IAC/F,QAAQ,CAAC,SAAS,EAAE,cAAc,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,CAAC,WAAW,GAAG,uBAAuB,CAAC,CAAC"}
|
package/dist/errors.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.OdspErrorTypes = void 0;
|
|
4
4
|
/*!
|
|
5
5
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
6
6
|
* Licensed under the MIT License.
|
|
@@ -52,59 +52,4 @@ exports.OdspErrorTypes = {
|
|
|
52
52
|
*/
|
|
53
53
|
blockedIPAddress: "blockedIPAddress",
|
|
54
54
|
};
|
|
55
|
-
/**
|
|
56
|
-
* ODSP Error types.
|
|
57
|
-
* Different error types that may be thrown by the ODSP driver.
|
|
58
|
-
*
|
|
59
|
-
* @deprecated Use {@link (OdspErrorTypes:variable)} instead.
|
|
60
|
-
* @alpha
|
|
61
|
-
*/
|
|
62
|
-
var OdspErrorType;
|
|
63
|
-
(function (OdspErrorType) {
|
|
64
|
-
/**
|
|
65
|
-
* Storage is out of space
|
|
66
|
-
*/
|
|
67
|
-
OdspErrorType["outOfStorageError"] = "outOfStorageError";
|
|
68
|
-
/**
|
|
69
|
-
* Invalid file name (at creation of the file)
|
|
70
|
-
*/
|
|
71
|
-
OdspErrorType["invalidFileNameError"] = "invalidFileNameError";
|
|
72
|
-
/**
|
|
73
|
-
* Snapshot is too big. Host application specified limit for snapshot size, and snapshot was bigger
|
|
74
|
-
* that that limit, thus request failed. Hosting application is expected to have fall-back behavior for
|
|
75
|
-
* such case.
|
|
76
|
-
*/
|
|
77
|
-
OdspErrorType["snapshotTooBig"] = "snapshotTooBig";
|
|
78
|
-
/**
|
|
79
|
-
* Maximum time limit to fetch reached. Host application specified limit for fetching of snapshot, when
|
|
80
|
-
* that limit is reached, request fails. Hosting application is expected to have fall-back behavior for
|
|
81
|
-
* such case.
|
|
82
|
-
*/
|
|
83
|
-
OdspErrorType["fetchTimeout"] = "fetchTimeout";
|
|
84
|
-
/**
|
|
85
|
-
* SPO admin toggle: fluid service is not enabled.
|
|
86
|
-
*/
|
|
87
|
-
OdspErrorType["fluidNotEnabled"] = "fluidNotEnabled";
|
|
88
|
-
/**
|
|
89
|
-
* {@inheritDoc @fluidframework/driver-definitions#FluidErrorType.fetchTokenError}
|
|
90
|
-
*/
|
|
91
|
-
OdspErrorType["fetchTokenError"] = "fetchTokenError";
|
|
92
|
-
/**
|
|
93
|
-
* This error will be raised when client is too behind with no way to catch up.
|
|
94
|
-
* This condition will happen when user was offline for too long, resulting in old ops / blobs being deleted
|
|
95
|
-
* by storage, and thus removing an ability for client to catch up.
|
|
96
|
-
* This condition will result in any local changes being lost (i.e. only way to save state is by user
|
|
97
|
-
* copying it over manually)
|
|
98
|
-
*/
|
|
99
|
-
OdspErrorType["cannotCatchUp"] = "cannotCatchUp";
|
|
100
|
-
/**
|
|
101
|
-
* SPO can occasionally return 403 for r/w operations on document when there is a fail over to another data center.
|
|
102
|
-
* So to preserve integrity of the data, the data becomes readonly.
|
|
103
|
-
*/
|
|
104
|
-
OdspErrorType["serviceReadOnly"] = "serviceReadOnly";
|
|
105
|
-
/**
|
|
106
|
-
* Due to organizational policies, you can't access server resources from the current network location.
|
|
107
|
-
*/
|
|
108
|
-
OdspErrorType["blockedIPAddress"] = "blockedIPAddress";
|
|
109
|
-
})(OdspErrorType || (exports.OdspErrorType = OdspErrorType = {}));
|
|
110
55
|
//# sourceMappingURL=errors.js.map
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,2EAI4C;AAE5C;;;;GAIG;AACU,QAAA,cAAc,GAAG;IAC7B,kCAAkC;IAClC,GAAG,qCAAgB;IAEnB;;OAEG;IACH,oBAAoB,EAAE,sBAAsB;IAE5C;;;;OAIG;IACH,cAAc,EAAE,gBAAgB;IAEhC;;;;OAIG;IACH,YAAY,EAAE,cAAc;IAE5B;;OAEG;IACH,eAAe,EAAE,iBAAiB;IAElC;;;;;;OAMG;IACH,aAAa,EAAE,eAAe;IAE9B;;;OAGG;IACH,eAAe,EAAE,iBAAiB;IAElC;;OAEG;IACH,gBAAgB,EAAE,kBAAkB;CAC3B,CAAC
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,2EAI4C;AAE5C;;;;GAIG;AACU,QAAA,cAAc,GAAG;IAC7B,kCAAkC;IAClC,GAAG,qCAAgB;IAEnB;;OAEG;IACH,oBAAoB,EAAE,sBAAsB;IAE5C;;;;OAIG;IACH,cAAc,EAAE,gBAAgB;IAEhC;;;;OAIG;IACH,YAAY,EAAE,cAAc;IAE5B;;OAEG;IACH,eAAe,EAAE,iBAAiB;IAElC;;;;;;OAMG;IACH,aAAa,EAAE,eAAe;IAE9B;;;OAGG;IACH,eAAe,EAAE,iBAAiB;IAElC;;OAEG;IACH,gBAAgB,EAAE,kBAAkB;CAC3B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport {\n\tDriverError,\n\tIDriverErrorBase,\n\tDriverErrorTypes,\n} from \"@fluidframework/driver-definitions\";\n\n/**\n * ODSP Error types.\n * Different error types that may be thrown by the ODSP driver.\n * @alpha\n */\nexport const OdspErrorTypes = {\n\t// Inherit base driver error types\n\t...DriverErrorTypes,\n\n\t/**\n\t * Invalid file name (at creation of the file)\n\t */\n\tinvalidFileNameError: \"invalidFileNameError\",\n\n\t/**\n\t * Snapshot is too big. Host application specified limit for snapshot size, and snapshot was bigger\n\t * that that limit, thus request failed. Hosting application is expected to have fall-back behavior for\n\t * such case.\n\t */\n\tsnapshotTooBig: \"snapshotTooBig\",\n\n\t/**\n\t * Maximum time limit to fetch reached. Host application specified limit for fetching of snapshot, when\n\t * that limit is reached, request fails. Hosting application is expected to have fall-back behavior for\n\t * such case.\n\t */\n\tfetchTimeout: \"fetchTimeout\",\n\n\t/**\n\t * SPO admin toggle: fluid service is not enabled.\n\t */\n\tfluidNotEnabled: \"fluidNotEnabled\",\n\n\t/**\n\t * This error will be raised when client is too behind with no way to catch up.\n\t * This condition will happen when user was offline for too long, resulting in old ops / blobs being deleted\n\t * by storage, and thus removing an ability for client to catch up.\n\t * This condition will result in any local changes being lost (i.e. only way to save state is by user\n\t * copying it over manually)\n\t */\n\tcannotCatchUp: \"cannotCatchUp\",\n\n\t/**\n\t * SPO can occasionally return 403 for r/w operations on document when there is a fail over to another data center.\n\t * So to preserve integrity of the data, the data becomes readonly.\n\t */\n\tserviceReadOnly: \"serviceReadOnly\",\n\n\t/**\n\t * Due to organizational policies, you can't access server resources from the current network location.\n\t */\n\tblockedIPAddress: \"blockedIPAddress\",\n} as const;\n/**\n * @alpha\n */\nexport type OdspErrorTypes = (typeof OdspErrorTypes)[keyof typeof OdspErrorTypes];\n\n/**\n * @alpha\n */\nexport interface IOdspErrorAugmentations {\n\t/**\n\t * Server epoch indicates when the file was last modified.\n\t * Used to detect modifications outside Fluid's services\n\t */\n\tserverEpoch?: string;\n\n\t/**\n\t * It is the redirection url at which the network call should have been made. It is due to change\n\t * in site domain of the file on server.\n\t */\n\tredirectLocation?: string;\n\n\t/**\n\t * It is array of error codes included in error response from server.\n\t */\n\tfacetCodes?: string[];\n}\n\n/**\n * Base interface for all errors and warnings\n * Superset of IDriverErrorBase, but with Odsp-specific errorType and properties\n * @alpha\n */\nexport interface IOdspError extends Omit<IDriverErrorBase, \"errorType\">, IOdspErrorAugmentations {\n\treadonly errorType: OdspErrorTypes;\n}\n\n/**\n * @alpha\n */\nexport type OdspError = IOdspError | (DriverError & IOdspErrorAugmentations);\n"]}
|
package/dist/factory.d.ts
CHANGED
|
@@ -9,6 +9,13 @@ export interface ISnapshotOptions {
|
|
|
9
9
|
blobs?: number;
|
|
10
10
|
deltas?: number;
|
|
11
11
|
channels?: number;
|
|
12
|
+
/**
|
|
13
|
+
* Maximum Data size (in bytes)
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* If specified, SPO will fail snapshot request with 413 error (see {@link @fluidframework/odsp-driver-definitions#(OdspErrorTypes:variable).snapshotTooBig})
|
|
17
|
+
* if snapshot is bigger in size than specified limit.
|
|
18
|
+
*/
|
|
12
19
|
mds?: number;
|
|
13
20
|
timeout?: number;
|
|
14
21
|
}
|
|
@@ -130,5 +137,9 @@ export interface HostStoragePolicy {
|
|
|
130
137
|
* as false. This is if the host wants to do some A/B testing.
|
|
131
138
|
*/
|
|
132
139
|
avoidPrefetchSnapshotCache?: boolean;
|
|
140
|
+
/**
|
|
141
|
+
* True if host does not want the storage service to perform retries when throttling errors occur in the service.
|
|
142
|
+
*/
|
|
143
|
+
disableRetriesOnStorageThrottlingError?: boolean;
|
|
133
144
|
}
|
|
134
145
|
//# sourceMappingURL=factory.d.ts.map
|
package/dist/factory.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;;OAMG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAOb,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IACjC;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACrC;;;OAGG;IACH,8BAA8B,CAAC,EAAE,MAAM,CAAC;IACxC;;;;;;;;;OASG;IACH,sCAAsC,CAAC,EAAE,OAAO,CAAC;CACjD;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IACjC,eAAe,CAAC,EAAE,gBAAgB,CAAC;IAEnC;;;;;;;;OAQG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAGlC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAE9B;;OAEG;IACH,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAE/B;;OAEG;IACH,cAAc,CAAC,EAAE,qBAAqB,CAAC;IAEvC;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;;OAGG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IAEpC;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B;;;;;;;;;OASG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IAEpC;;;;;;;OAOG;IACH,yCAAyC,CAAC,EAAE,OAAO,CAAC;IAEpD;;;OAGG;IACH,0BAA0B,CAAC,EAAE,OAAO,CAAC;IAErC;;OAEG;IACH,sCAAsC,CAAC,EAAE,OAAO,CAAC;CACjD"}
|
package/dist/factory.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @alpha\n */\nexport interface ISnapshotOptions {\n\tblobs?: number;\n\tdeltas?: number;\n\tchannels?: number;\n\t
|
|
1
|
+
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @alpha\n */\nexport interface ISnapshotOptions {\n\tblobs?: number;\n\tdeltas?: number;\n\tchannels?: number;\n\n\t/**\n\t * Maximum Data size (in bytes)\n\t *\n\t * @remarks\n\t * If specified, SPO will fail snapshot request with 413 error (see {@link @fluidframework/odsp-driver-definitions#(OdspErrorTypes:variable).snapshotTooBig})\n\t * if snapshot is bigger in size than specified limit.\n\t */\n\tmds?: number;\n\n\t/*\n\t * Maximum time limit to fetch snapshot (in seconds)\n\t * If specified, client will timeout the fetch request if it exceeds the time limit and\n\t * will try to fetch the snapshot without blobs.\n\t */\n\ttimeout?: number;\n}\n\n/**\n * @alpha\n */\nexport interface IOpsCachingPolicy {\n\t/**\n\t * Batch size. Controls how many ops are grouped together as single cache entry\n\t * The bigger the number, the more efficient it is (less reads & writes)\n\t * At the same time, big number means we wait for so many ops to accumulate, which\n\t * increases chances and number of trailing ops that would not be flushed to cache\n\t * when user closes tab\n\t * Use any number below 1 to disable caching\n\t * Default: 100\n\t */\n\tbatchSize?: number;\n\n\t/**\n\t * To reduce the problem of losing trailing ops when using big batch sizes, host\n\t * could specify how often driver should flush ops it has not flushed yet.\n\t * -1 means do not use timer.\n\t * Measured in ms.\n\t * Default: 5000\n\t */\n\ttimerGranularity?: number;\n\n\t/**\n\t * Total number of ops to cache. When we reach that number, ops caching stops\n\t * Default: 5000\n\t */\n\ttotalOpsToCache?: number;\n}\n\n/**\n * @alpha\n */\nexport interface ICollabSessionOptions {\n\t/**\n\t * Value indicating the display name for session that admits unauthenticated user.\n\t * This name will be used in attribution associated with edits made by such user.\n\t */\n\tunauthenticatedUserDisplayName?: string;\n\t/**\n\t * @deprecated Due to security reasons we will be passing the token via Authorization header only.\n\t * Value indicating session preference to always pass access token via Authorization header.\n\t * Default behavior is to pass access token via query parameter unless overall href string\n\t * length exceeds 2048 characters. Using query param is performance optimization which results\n\t * in ODSP XHR request being treated as 'simple' request which do not require OPTIONS call to\n\t * validate CORS. However, not all ODSP implementations understand this optimization.\n\t * For instance, auth layer on Converged stack will fail request with access token passed via\n\t * query param.\n\t */\n\tforceAccessTokenViaAuthorizationHeader?: boolean;\n}\n\n/**\n * @alpha\n */\nexport interface HostStoragePolicy {\n\tsnapshotOptions?: ISnapshotOptions;\n\n\t/**\n\t * If set to true, tells driver to concurrently fetch snapshot from storage (SPO) and cache\n\t * Container loads from whatever comes first in such case.\n\t * Snapshot fetched from storage is pushed to cache in either case.\n\t * If set to false, driver will first consult with cache. Only on cache miss (cache does not\n\t * return snapshot), driver will fetch snapshot from storage (and push it to cache), otherwise\n\t * it will load from cache and not reach out to storage.\n\t * Passing true results in faster loads and keeping cache more current, but it increases bandwidth consumption.\n\t */\n\tconcurrentSnapshotFetch?: boolean;\n\n\t// Options overwriting default ops fetching from storage.\n\topsBatchSize?: number;\n\tconcurrentOpsBatches?: number;\n\n\t/**\n\t * Policy controlling ops caching (leveraging IPersistedCache passed to driver factory)\n\t */\n\topsCaching?: IOpsCachingPolicy;\n\n\t/**\n\t * Policy controlling how collaboration session is established\n\t */\n\tsessionOptions?: ICollabSessionOptions;\n\n\t/**\n\t * @deprecated This field will be always set to true after removal.\n\t * True to have the sharing link redeem fallback in case the Trees Latest/Redeem 1RT call fails with redeem error.\n\t * During fallback it will first redeem the sharing link and then make the Trees latest call.\n\t */\n\tenableRedeemFallback?: boolean;\n\n\t/**\n\t * Policy controlling if we will cache initial summary when we create a document\n\t */\n\tcacheCreateNewSummary?: boolean;\n\n\t/**\n\t * @deprecated This will be replaced with feature gate snapshotFormatFetchType.\n\t * Policy controlling if we want to fetch binary format snapshot.\n\t */\n\tfetchBinarySnapshotFormat?: boolean;\n\n\t/**\n\t * If set to true, socket cache are per OdspDocumentService instead of shared across all instances\n\t */\n\tisolateSocketCache?: boolean;\n\n\t/**\n\t * @deprecated Switch to using the new feature gated by enableSingleRequestForShareLinkWithCreate\n\t * with 'createLinkScope' and 'createLinkRole' is requested to the odsp apis instead of 'createLinkType'.\n\t * It enables the creation of sharing link along with the creation of file by setting this value to true.\n\t * If the host provides a 'createLinkType' parameter in the request URL to the container.attach()\n\t * method, we will send the request to ODSP with the same (if the flag is enabled) so\n\t * that a share link can be created with the creation of file to save number for round trips made to ODSP.\n\t * (This flag works independently of enableSingleRequestForShareLinkWithCreate which is used for sharing link\n\t * requests where 'createLinkScope' is requested.)\n\t */\n\tenableShareLinkWithCreate?: boolean;\n\n\t/**\n\t * Enable creation of sharing link along with the creation of file by setting this value to true.\n\t * If the host provides a 'createLinkScope' parameter in the request URL to the container.attach()\n\t * method, we will send the request to ODSP with the same (if the flag is enabled) so\n\t * that a share link can be created with the creation of file to save number for round trips made to ODSP.\n\t * (This flag works independently of enableShareLinkWithCreate which was used for old sharing link requests\n\t * where 'createLinkType' was requested.)\n\t */\n\tenableSingleRequestForShareLinkWithCreate?: boolean;\n\n\t/**\n\t * True if host does not want the storage service to use the prefetch cache to get the snapshot. Undefined will be treated\n\t * as false. This is if the host wants to do some A/B testing.\n\t */\n\tavoidPrefetchSnapshotCache?: boolean;\n\n\t/**\n\t * True if host does not want the storage service to perform retries when throttling errors occur in the service.\n\t */\n\tdisableRetriesOnStorageThrottlingError?: boolean;\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
export { IOdspError, IOdspErrorAugmentations, OdspError,
|
|
6
|
-
export { HostStoragePolicy, ICollabSessionOptions, IOpsCachingPolicy, ISnapshotOptions, } from "./factory";
|
|
7
|
-
export { CacheContentType, getKeyForCacheEntry, ICacheEntry, IEntry, IFileEntry, IPersistedCache, snapshotKey, } from "./odspCache";
|
|
8
|
-
export { IOdspResolvedUrl, IOdspUrlParts, ISharingLink, ISharingLinkKind, ShareLinkInfoType,
|
|
9
|
-
export { IdentityType, InstrumentedStorageTokenFetcher, isTokenFromCache, OdspResourceTokenFetchOptions, TokenFetcher, TokenFetchOptions, tokenFromResponse, TokenResponse, } from "./tokenFetch";
|
|
10
|
-
export { IProvideSessionAwareDriverFactory, IRelaySessionAwareDriverFactory, ISocketStorageDiscovery, } from "./sessionProvider";
|
|
5
|
+
export { IOdspError, IOdspErrorAugmentations, OdspError, OdspErrorTypes } from "./errors.js";
|
|
6
|
+
export { HostStoragePolicy, ICollabSessionOptions, IOpsCachingPolicy, ISnapshotOptions, } from "./factory.js";
|
|
7
|
+
export { CacheContentType, maximumCacheDurationMs, getKeyForCacheEntry, ICacheEntry, IEntry, IFileEntry, IPersistedCache, snapshotKey, } from "./odspCache.js";
|
|
8
|
+
export { IOdspResolvedUrl, IOdspUrlParts, ISharingLink, ISharingLinkKind, ShareLinkInfoType, SharingLinkRole, SharingLinkScope, } from "./resolvedUrl.js";
|
|
9
|
+
export { IdentityType, InstrumentedStorageTokenFetcher, isTokenFromCache, OdspResourceTokenFetchOptions, TokenFetcher, TokenFetchOptions, tokenFromResponse, TokenResponse, } from "./tokenFetch.js";
|
|
10
|
+
export { IProvideSessionAwareDriverFactory, IRelaySessionAwareDriverFactory, ISocketStorageDiscovery, } from "./sessionProvider.js";
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,uBAAuB,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7F,OAAO,EACN,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,GAChB,MAAM,cAAc,CAAC;AACtB,OAAO,EACN,gBAAgB,EAChB,sBAAsB,EACtB,mBAAmB,EACnB,WAAW,EACX,MAAM,EACN,UAAU,EACV,eAAe,EACf,WAAW,GACX,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACN,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,gBAAgB,GAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACN,YAAY,EACZ,+BAA+B,EAC/B,gBAAgB,EAChB,6BAA6B,EAC7B,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,GACb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACN,iCAAiC,EACjC,+BAA+B,EAC/B,uBAAuB,GACvB,MAAM,sBAAsB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4,18 +4,17 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.tokenFromResponse = exports.isTokenFromCache = exports.SharingLinkScope = exports.SharingLinkRole = exports.
|
|
8
|
-
var
|
|
9
|
-
Object.defineProperty(exports, "
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
Object.defineProperty(exports, "getKeyForCacheEntry", { enumerable: true, get: function () { return
|
|
13
|
-
Object.defineProperty(exports, "snapshotKey", { enumerable: true, get: function () { return
|
|
14
|
-
var
|
|
15
|
-
Object.defineProperty(exports, "
|
|
16
|
-
Object.defineProperty(exports, "
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
Object.defineProperty(exports, "
|
|
20
|
-
Object.defineProperty(exports, "tokenFromResponse", { enumerable: true, get: function () { return tokenFetch_1.tokenFromResponse; } });
|
|
7
|
+
exports.tokenFromResponse = exports.isTokenFromCache = exports.SharingLinkScope = exports.SharingLinkRole = exports.snapshotKey = exports.getKeyForCacheEntry = exports.maximumCacheDurationMs = exports.OdspErrorTypes = void 0;
|
|
8
|
+
var errors_js_1 = require("./errors.js");
|
|
9
|
+
Object.defineProperty(exports, "OdspErrorTypes", { enumerable: true, get: function () { return errors_js_1.OdspErrorTypes; } });
|
|
10
|
+
var odspCache_js_1 = require("./odspCache.js");
|
|
11
|
+
Object.defineProperty(exports, "maximumCacheDurationMs", { enumerable: true, get: function () { return odspCache_js_1.maximumCacheDurationMs; } });
|
|
12
|
+
Object.defineProperty(exports, "getKeyForCacheEntry", { enumerable: true, get: function () { return odspCache_js_1.getKeyForCacheEntry; } });
|
|
13
|
+
Object.defineProperty(exports, "snapshotKey", { enumerable: true, get: function () { return odspCache_js_1.snapshotKey; } });
|
|
14
|
+
var resolvedUrl_js_1 = require("./resolvedUrl.js");
|
|
15
|
+
Object.defineProperty(exports, "SharingLinkRole", { enumerable: true, get: function () { return resolvedUrl_js_1.SharingLinkRole; } });
|
|
16
|
+
Object.defineProperty(exports, "SharingLinkScope", { enumerable: true, get: function () { return resolvedUrl_js_1.SharingLinkScope; } });
|
|
17
|
+
var tokenFetch_js_1 = require("./tokenFetch.js");
|
|
18
|
+
Object.defineProperty(exports, "isTokenFromCache", { enumerable: true, get: function () { return tokenFetch_js_1.isTokenFromCache; } });
|
|
19
|
+
Object.defineProperty(exports, "tokenFromResponse", { enumerable: true, get: function () { return tokenFetch_js_1.tokenFromResponse; } });
|
|
21
20
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,yCAA6F;AAApC,2GAAA,cAAc,OAAA;AAOvE,+CASwB;AAPvB,sHAAA,sBAAsB,OAAA;AACtB,mHAAA,mBAAmB,OAAA;AAKnB,2GAAA,WAAW,OAAA;AAEZ,mDAQ0B;AAFzB,iHAAA,eAAe,OAAA;AACf,kHAAA,gBAAgB,OAAA;AAEjB,iDASyB;AANxB,iHAAA,gBAAgB,OAAA;AAIhB,kHAAA,iBAAiB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { IOdspError, IOdspErrorAugmentations, OdspError, OdspErrorTypes } from \"./errors.js\";\nexport {\n\tHostStoragePolicy,\n\tICollabSessionOptions,\n\tIOpsCachingPolicy,\n\tISnapshotOptions,\n} from \"./factory.js\";\nexport {\n\tCacheContentType,\n\tmaximumCacheDurationMs,\n\tgetKeyForCacheEntry,\n\tICacheEntry,\n\tIEntry,\n\tIFileEntry,\n\tIPersistedCache,\n\tsnapshotKey,\n} from \"./odspCache.js\";\nexport {\n\tIOdspResolvedUrl,\n\tIOdspUrlParts,\n\tISharingLink,\n\tISharingLinkKind,\n\tShareLinkInfoType,\n\tSharingLinkRole,\n\tSharingLinkScope,\n} from \"./resolvedUrl.js\";\nexport {\n\tIdentityType,\n\tInstrumentedStorageTokenFetcher,\n\tisTokenFromCache,\n\tOdspResourceTokenFetchOptions,\n\tTokenFetcher,\n\tTokenFetchOptions,\n\ttokenFromResponse,\n\tTokenResponse,\n} from \"./tokenFetch.js\";\nexport {\n\tIProvideSessionAwareDriverFactory,\n\tIRelaySessionAwareDriverFactory,\n\tISocketStorageDiscovery,\n} from \"./sessionProvider.js\";\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DriverError } from '@fluidframework/driver-definitions';
|
|
2
|
+
import { FiveDaysMs } from '@fluidframework/driver-definitions';
|
|
2
3
|
import { IDriverErrorBase } from '@fluidframework/driver-definitions';
|
|
3
4
|
import { IResolvedUrl } from '@fluidframework/driver-definitions';
|
|
4
5
|
|
|
@@ -78,6 +79,10 @@ export declare interface HostStoragePolicy {
|
|
|
78
79
|
* as false. This is if the host wants to do some A/B testing.
|
|
79
80
|
*/
|
|
80
81
|
avoidPrefetchSnapshotCache?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* True if host does not want the storage service to perform retries when throttling errors occur in the service.
|
|
84
|
+
*/
|
|
85
|
+
disableRetriesOnStorageThrottlingError?: boolean;
|
|
81
86
|
}
|
|
82
87
|
|
|
83
88
|
/**
|
|
@@ -169,7 +174,7 @@ export declare interface IFileEntry {
|
|
|
169
174
|
* @alpha
|
|
170
175
|
*/
|
|
171
176
|
export declare interface IOdspError extends Omit<IDriverErrorBase, "errorType">, IOdspErrorAugmentations {
|
|
172
|
-
readonly errorType:
|
|
177
|
+
readonly errorType: OdspErrorTypes;
|
|
173
178
|
}
|
|
174
179
|
|
|
175
180
|
/**
|
|
@@ -333,6 +338,13 @@ export declare interface ISnapshotOptions {
|
|
|
333
338
|
blobs?: number;
|
|
334
339
|
deltas?: number;
|
|
335
340
|
channels?: number;
|
|
341
|
+
/**
|
|
342
|
+
* Maximum Data size (in bytes)
|
|
343
|
+
*
|
|
344
|
+
* @remarks
|
|
345
|
+
* If specified, SPO will fail snapshot request with 413 error (see {@link @fluidframework/odsp-driver-definitions#(OdspErrorTypes:variable).snapshotTooBig})
|
|
346
|
+
* if snapshot is bigger in size than specified limit.
|
|
347
|
+
*/
|
|
336
348
|
mds?: number;
|
|
337
349
|
timeout?: number;
|
|
338
350
|
}
|
|
@@ -362,69 +374,22 @@ export declare interface ISocketStorageDiscovery {
|
|
|
362
374
|
* This is the time within which client has to refresh the session on (ODSP) relay service.
|
|
363
375
|
*/
|
|
364
376
|
refreshSessionDurationSeconds?: number;
|
|
377
|
+
/**
|
|
378
|
+
* Represent the sensitivity labels info for the file. Keeping it optional for back-compat. The
|
|
379
|
+
* response will contain empty labels when the file has no labels, so this field will be there
|
|
380
|
+
* even if file has no labels when the service will implement this contract.
|
|
381
|
+
*/
|
|
382
|
+
sensitivityLabelsInfo?: string;
|
|
365
383
|
}
|
|
366
384
|
|
|
367
385
|
/* Excluded from this release type: isTokenFromCache */
|
|
368
386
|
|
|
369
|
-
|
|
370
|
-
* @alpha
|
|
371
|
-
*/
|
|
372
|
-
export declare type OdspError = IOdspError | (DriverError & IOdspErrorAugmentations);
|
|
387
|
+
/* Excluded from this release type: maximumCacheDurationMs */
|
|
373
388
|
|
|
374
389
|
/**
|
|
375
|
-
* ODSP Error types.
|
|
376
|
-
* Different error types that may be thrown by the ODSP driver.
|
|
377
|
-
*
|
|
378
|
-
* @deprecated Use {@link (OdspErrorTypes:variable)} instead.
|
|
379
390
|
* @alpha
|
|
380
391
|
*/
|
|
381
|
-
export declare
|
|
382
|
-
/**
|
|
383
|
-
* Storage is out of space
|
|
384
|
-
*/
|
|
385
|
-
outOfStorageError = "outOfStorageError",
|
|
386
|
-
/**
|
|
387
|
-
* Invalid file name (at creation of the file)
|
|
388
|
-
*/
|
|
389
|
-
invalidFileNameError = "invalidFileNameError",
|
|
390
|
-
/**
|
|
391
|
-
* Snapshot is too big. Host application specified limit for snapshot size, and snapshot was bigger
|
|
392
|
-
* that that limit, thus request failed. Hosting application is expected to have fall-back behavior for
|
|
393
|
-
* such case.
|
|
394
|
-
*/
|
|
395
|
-
snapshotTooBig = "snapshotTooBig",
|
|
396
|
-
/**
|
|
397
|
-
* Maximum time limit to fetch reached. Host application specified limit for fetching of snapshot, when
|
|
398
|
-
* that limit is reached, request fails. Hosting application is expected to have fall-back behavior for
|
|
399
|
-
* such case.
|
|
400
|
-
*/
|
|
401
|
-
fetchTimeout = "fetchTimeout",
|
|
402
|
-
/**
|
|
403
|
-
* SPO admin toggle: fluid service is not enabled.
|
|
404
|
-
*/
|
|
405
|
-
fluidNotEnabled = "fluidNotEnabled",
|
|
406
|
-
/**
|
|
407
|
-
* {@inheritDoc @fluidframework/driver-definitions#FluidErrorType.fetchTokenError}
|
|
408
|
-
*/
|
|
409
|
-
fetchTokenError = "fetchTokenError",
|
|
410
|
-
/**
|
|
411
|
-
* This error will be raised when client is too behind with no way to catch up.
|
|
412
|
-
* This condition will happen when user was offline for too long, resulting in old ops / blobs being deleted
|
|
413
|
-
* by storage, and thus removing an ability for client to catch up.
|
|
414
|
-
* This condition will result in any local changes being lost (i.e. only way to save state is by user
|
|
415
|
-
* copying it over manually)
|
|
416
|
-
*/
|
|
417
|
-
cannotCatchUp = "cannotCatchUp",
|
|
418
|
-
/**
|
|
419
|
-
* SPO can occasionally return 403 for r/w operations on document when there is a fail over to another data center.
|
|
420
|
-
* So to preserve integrity of the data, the data becomes readonly.
|
|
421
|
-
*/
|
|
422
|
-
serviceReadOnly = "serviceReadOnly",
|
|
423
|
-
/**
|
|
424
|
-
* Due to organizational policies, you can't access server resources from the current network location.
|
|
425
|
-
*/
|
|
426
|
-
blockedIPAddress = "blockedIPAddress"
|
|
427
|
-
}
|
|
392
|
+
export declare type OdspError = IOdspError | (DriverError & IOdspErrorAugmentations);
|
|
428
393
|
|
|
429
394
|
/**
|
|
430
395
|
* ODSP Error types.
|
|
@@ -522,17 +487,10 @@ export declare interface ShareLinkInfoType {
|
|
|
522
487
|
* from the /snapshot api response.
|
|
523
488
|
*/
|
|
524
489
|
createLink?: {
|
|
525
|
-
/**
|
|
526
|
-
* @deprecated
|
|
527
|
-
* Type of shareLink requested/created when creating the file for the first time. The 'type' property here
|
|
528
|
-
* represents the type of sharing link requested.
|
|
529
|
-
* Will be deprecated soon. Type of sharing link will be present in the link:ISharingLink property below.
|
|
530
|
-
*/
|
|
531
|
-
type?: ShareLinkTypes | ISharingLinkKind;
|
|
532
490
|
/**
|
|
533
491
|
* Share link created when the file is created for the first time with /snapshot api call.
|
|
534
492
|
*/
|
|
535
|
-
link?:
|
|
493
|
+
link?: ISharingLink;
|
|
536
494
|
/**
|
|
537
495
|
* Error message if creation of sharing link fails with /snapshot api call
|
|
538
496
|
*/
|
|
@@ -546,15 +504,6 @@ export declare interface ShareLinkInfoType {
|
|
|
546
504
|
sharingLinkToRedeem?: string;
|
|
547
505
|
}
|
|
548
506
|
|
|
549
|
-
/**
|
|
550
|
-
* @deprecated Use ISharingLinkKind type instead.
|
|
551
|
-
* Type of shareLink requested/created when creating the file for the first time.
|
|
552
|
-
* @alpha
|
|
553
|
-
*/
|
|
554
|
-
export declare enum ShareLinkTypes {
|
|
555
|
-
csl = "csl"
|
|
556
|
-
}
|
|
557
|
-
|
|
558
507
|
/**
|
|
559
508
|
* View/edit permission role for a sharing link.
|
|
560
509
|
* @alpha
|
|
@@ -619,7 +568,10 @@ export declare interface TokenFetchOptions {
|
|
|
619
568
|
export declare interface TokenResponse {
|
|
620
569
|
/** Token value */
|
|
621
570
|
token: string;
|
|
622
|
-
/**
|
|
571
|
+
/**
|
|
572
|
+
* Whether or not the token was obtained from local cache.
|
|
573
|
+
* @remarks `undefined` indicates that it could not be determined whether or not the token was obtained this way.
|
|
574
|
+
*/
|
|
623
575
|
fromCache?: boolean;
|
|
624
576
|
}
|
|
625
577
|
|