@fluidframework/odsp-driver-definitions 2.0.0-internal.8.0.1 → 2.0.0-rc.1.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.
- package/CHANGELOG.md +34 -0
- package/README.md +0 -6
- package/api-extractor-esm.json +4 -0
- package/api-extractor-lint.json +1 -10
- package/api-extractor.json +1 -9
- package/api-report/odsp-driver-definitions.api.md +8 -8
- package/dist/errors.d.ts +6 -6
- package/dist/{errors.cjs → errors.js} +3 -3
- package/dist/errors.js.map +1 -0
- package/dist/{factory.cjs → factory.js} +1 -1
- package/dist/factory.js.map +1 -0
- package/dist/{index.cjs → index.js} +5 -5
- package/dist/index.js.map +1 -0
- package/dist/odsp-driver-definitions-alpha.d.ts +160 -9
- package/dist/odsp-driver-definitions-beta.d.ts +10 -3
- package/dist/odsp-driver-definitions-public.d.ts +0 -2
- package/dist/odsp-driver-definitions-untrimmed.d.ts +8 -8
- package/dist/{odspCache.cjs → odspCache.js} +1 -1
- package/dist/odspCache.js.map +1 -0
- package/dist/{resolvedUrl.cjs → resolvedUrl.js} +1 -1
- package/dist/resolvedUrl.js.map +1 -0
- package/dist/{sessionProvider.cjs → sessionProvider.js} +1 -1
- package/dist/sessionProvider.js.map +1 -0
- package/dist/tokenFetch.d.ts +2 -2
- package/dist/{tokenFetch.cjs → tokenFetch.js} +1 -1
- package/dist/tokenFetch.js.map +1 -0
- package/lib/{errors.d.ts → errors.d.mts} +7 -7
- package/lib/errors.d.mts.map +1 -0
- package/lib/errors.mjs +2 -2
- package/lib/errors.mjs.map +1 -1
- package/lib/{factory.d.ts → factory.d.mts} +1 -1
- package/lib/factory.d.mts.map +1 -0
- package/lib/{index.d.ts → index.d.mts} +1 -1
- package/lib/index.d.mts.map +1 -0
- package/lib/{odsp-driver-definitions-alpha.d.ts → odsp-driver-definitions-alpha.d.mts} +160 -9
- package/lib/{odsp-driver-definitions-public.d.ts → odsp-driver-definitions-beta.d.mts} +10 -3
- package/lib/{odsp-driver-definitions-beta.d.ts → odsp-driver-definitions-public.d.mts} +0 -2
- package/lib/{odsp-driver-definitions-untrimmed.d.ts → odsp-driver-definitions-untrimmed.d.mts} +8 -8
- package/lib/{odspCache.d.ts → odspCache.d.mts} +1 -1
- package/lib/odspCache.d.mts.map +1 -0
- package/lib/{resolvedUrl.d.ts → resolvedUrl.d.mts} +1 -1
- package/lib/resolvedUrl.d.mts.map +1 -0
- package/lib/{sessionProvider.d.ts → sessionProvider.d.mts} +1 -1
- package/lib/sessionProvider.d.mts.map +1 -0
- package/lib/{tokenFetch.d.ts → tokenFetch.d.mts} +3 -3
- package/lib/tokenFetch.d.mts.map +1 -0
- package/lib/tokenFetch.mjs.map +1 -1
- package/package.json +64 -12
- package/src/errors.ts +6 -6
- package/src/tokenFetch.ts +2 -2
- package/dist/errors.cjs.map +0 -1
- package/dist/factory.cjs.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/odspCache.cjs.map +0 -1
- package/dist/resolvedUrl.cjs.map +0 -1
- package/dist/sessionProvider.cjs.map +0 -1
- package/dist/tokenFetch.cjs.map +0 -1
- package/lib/errors.d.ts.map +0 -1
- package/lib/factory.d.ts.map +0 -1
- package/lib/index.d.ts.map +0 -1
- package/lib/odspCache.d.ts.map +0 -1
- package/lib/resolvedUrl.d.ts.map +0 -1
- package/lib/sessionProvider.d.ts.map +0 -1
- package/lib/tokenFetch.d.ts.map +0 -1
- package/tsc-multi.test.json +0 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# @fluidframework/odsp-driver-definitions
|
|
2
2
|
|
|
3
|
+
## 2.0.0-rc.1.0.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Updated server dependencies ([#19122](https://github.com/microsoft/FluidFramework/issues/19122)) [25366b4229](https://github.com/microsoft/FluidFramework/commits/25366b422918cb43685c5f328b50450749592902)
|
|
8
|
+
|
|
9
|
+
The following Fluid server dependencies have been updated to the latest version, 3.0.0. [See the full changelog.](https://github.com/microsoft/FluidFramework/releases/tag/server_v3.0.0)
|
|
10
|
+
|
|
11
|
+
- @fluidframework/gitresources
|
|
12
|
+
- @fluidframework/server-kafka-orderer
|
|
13
|
+
- @fluidframework/server-lambdas
|
|
14
|
+
- @fluidframework/server-lambdas-driver
|
|
15
|
+
- @fluidframework/server-local-server
|
|
16
|
+
- @fluidframework/server-memory-orderer
|
|
17
|
+
- @fluidframework/protocol-base
|
|
18
|
+
- @fluidframework/server-routerlicious
|
|
19
|
+
- @fluidframework/server-routerlicious-base
|
|
20
|
+
- @fluidframework/server-services
|
|
21
|
+
- @fluidframework/server-services-client
|
|
22
|
+
- @fluidframework/server-services-core
|
|
23
|
+
- @fluidframework/server-services-ordering-kafkanode
|
|
24
|
+
- @fluidframework/server-services-ordering-rdkafka
|
|
25
|
+
- @fluidframework/server-services-ordering-zookeeper
|
|
26
|
+
- @fluidframework/server-services-shared
|
|
27
|
+
- @fluidframework/server-services-telemetry
|
|
28
|
+
- @fluidframework/server-services-utils
|
|
29
|
+
- @fluidframework/server-test-utils
|
|
30
|
+
- tinylicious
|
|
31
|
+
|
|
32
|
+
- Updated @fluidframework/protocol-definitions ([#19122](https://github.com/microsoft/FluidFramework/issues/19122)) [25366b4229](https://github.com/microsoft/FluidFramework/commits/25366b422918cb43685c5f328b50450749592902)
|
|
33
|
+
|
|
34
|
+
The @fluidframework/protocol-definitions dependency has been upgraded to v3.1.0. [See the full
|
|
35
|
+
changelog.](https://github.com/microsoft/FluidFramework/blob/main/common/lib/protocol-definitions/CHANGELOG.md#310)
|
|
36
|
+
|
|
3
37
|
## 2.0.0-internal.8.0.0
|
|
4
38
|
|
|
5
39
|
Dependency updates only.
|
package/README.md
CHANGED
|
@@ -16,12 +16,6 @@ When taking a dependency on a Fluid Framework library, we recommend using a `^`
|
|
|
16
16
|
While Fluid Framework libraries may use different ranges with interdependencies between other Fluid Framework libraries,
|
|
17
17
|
library consumers should always prefer `^`.
|
|
18
18
|
|
|
19
|
-
Note that when depending on a library version of the form `2.0.0-internal.x.y.z`, called the Fluid internal version scheme,
|
|
20
|
-
you must use a `>= <` dependency range (such as `>=2.0.0-internal.x.y.z <2.0.0-internal.w.0.0` where `w` is `x+1`).
|
|
21
|
-
Standard `^` and `~` ranges will not work as expected.
|
|
22
|
-
See the [@fluid-tools/version-tools](https://github.com/microsoft/FluidFramework/blob/main/build-tools/packages/version-tools/README.md)
|
|
23
|
-
package for more information including tools to convert between version schemes.
|
|
24
|
-
|
|
25
19
|
<!-- prettier-ignore-end -->
|
|
26
20
|
|
|
27
21
|
<!-- AUTO-GENERATED-CONTENT:END -->
|
package/api-extractor-lint.json
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
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-lint.json"
|
|
4
|
-
"messages": {
|
|
5
|
-
"extractorMessageReporting": {
|
|
6
|
-
// TODO: remove once base config has this enabled as an error
|
|
7
|
-
"ae-incompatible-release-tags": {
|
|
8
|
-
"logLevel": "error",
|
|
9
|
-
"addToApiReportFile": false
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
}
|
|
3
|
+
"extends": "../../../common/build/build-common/api-extractor-lint.json"
|
|
13
4
|
}
|
package/api-extractor.json
CHANGED
|
@@ -1,12 +1,4 @@
|
|
|
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.json"
|
|
4
|
-
"messages": {
|
|
5
|
-
"extractorMessageReporting": {
|
|
6
|
-
// TODO: Add missing documentation and remove this rule override
|
|
7
|
-
"ae-undocumented": {
|
|
8
|
-
"logLevel": "none"
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
}
|
|
3
|
+
"extends": "../../../common/build/build-common/api-extractor-base.json"
|
|
12
4
|
}
|
|
@@ -49,7 +49,7 @@ export interface ICollabSessionOptions {
|
|
|
49
49
|
unauthenticatedUserDisplayName?: string;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
// @
|
|
52
|
+
// @alpha
|
|
53
53
|
export type IdentityType = "Consumer" | "Enterprise";
|
|
54
54
|
|
|
55
55
|
// @alpha
|
|
@@ -67,13 +67,13 @@ export interface IFileEntry {
|
|
|
67
67
|
// @internal (undocumented)
|
|
68
68
|
export type InstrumentedStorageTokenFetcher = (options: TokenFetchOptions, name: string, alwaysRecordTokenFetchTelemetry?: boolean) => Promise<string | null>;
|
|
69
69
|
|
|
70
|
-
// @
|
|
70
|
+
// @alpha
|
|
71
71
|
export interface IOdspError extends Omit<IDriverErrorBase, "errorType">, IOdspErrorAugmentations {
|
|
72
72
|
// (undocumented)
|
|
73
73
|
readonly errorType: OdspErrorType;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
// @
|
|
76
|
+
// @alpha (undocumented)
|
|
77
77
|
export interface IOdspErrorAugmentations {
|
|
78
78
|
facetCodes?: string[];
|
|
79
79
|
redirectLocation?: string;
|
|
@@ -200,10 +200,10 @@ export interface ISocketStorageDiscovery {
|
|
|
200
200
|
// @internal
|
|
201
201
|
export const isTokenFromCache: (tokenResponse: string | TokenResponse | null) => boolean | undefined;
|
|
202
202
|
|
|
203
|
-
// @
|
|
203
|
+
// @alpha (undocumented)
|
|
204
204
|
export type OdspError = IOdspError | (DriverError & IOdspErrorAugmentations);
|
|
205
205
|
|
|
206
|
-
// @
|
|
206
|
+
// @alpha @deprecated
|
|
207
207
|
export enum OdspErrorType {
|
|
208
208
|
blockedIPAddress = "blockedIPAddress",
|
|
209
209
|
cannotCatchUp = "cannotCatchUp",
|
|
@@ -217,7 +217,7 @@ export enum OdspErrorType {
|
|
|
217
217
|
snapshotTooBig = "snapshotTooBig"
|
|
218
218
|
}
|
|
219
219
|
|
|
220
|
-
// @
|
|
220
|
+
// @alpha
|
|
221
221
|
export const OdspErrorTypes: {
|
|
222
222
|
readonly invalidFileNameError: "invalidFileNameError";
|
|
223
223
|
readonly snapshotTooBig: "snapshotTooBig";
|
|
@@ -246,7 +246,7 @@ export const OdspErrorTypes: {
|
|
|
246
246
|
readonly usageError: "usageError";
|
|
247
247
|
};
|
|
248
248
|
|
|
249
|
-
// @
|
|
249
|
+
// @alpha (undocumented)
|
|
250
250
|
export type OdspErrorTypes = (typeof OdspErrorTypes)[keyof typeof OdspErrorTypes];
|
|
251
251
|
|
|
252
252
|
// @alpha
|
|
@@ -309,7 +309,7 @@ export interface TokenFetchOptions {
|
|
|
309
309
|
// @internal
|
|
310
310
|
export const tokenFromResponse: (tokenResponse: string | TokenResponse | null | undefined) => string | null;
|
|
311
311
|
|
|
312
|
-
// @
|
|
312
|
+
// @beta
|
|
313
313
|
export interface TokenResponse {
|
|
314
314
|
fromCache?: boolean;
|
|
315
315
|
token: string;
|
package/dist/errors.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { DriverError, IDriverErrorBase } from "@fluidframework/driver-definition
|
|
|
6
6
|
/**
|
|
7
7
|
* ODSP Error types.
|
|
8
8
|
* Different error types that may be thrown by the ODSP driver.
|
|
9
|
-
* @
|
|
9
|
+
* @alpha
|
|
10
10
|
*/
|
|
11
11
|
export declare const OdspErrorTypes: {
|
|
12
12
|
/**
|
|
@@ -66,7 +66,7 @@ export declare const OdspErrorTypes: {
|
|
|
66
66
|
readonly usageError: "usageError";
|
|
67
67
|
};
|
|
68
68
|
/**
|
|
69
|
-
* @
|
|
69
|
+
* @alpha
|
|
70
70
|
*/
|
|
71
71
|
export type OdspErrorTypes = (typeof OdspErrorTypes)[keyof typeof OdspErrorTypes];
|
|
72
72
|
/**
|
|
@@ -74,7 +74,7 @@ export type OdspErrorTypes = (typeof OdspErrorTypes)[keyof typeof OdspErrorTypes
|
|
|
74
74
|
* Different error types that may be thrown by the ODSP driver.
|
|
75
75
|
*
|
|
76
76
|
* @deprecated Use {@link (OdspErrorTypes:variable)} instead.
|
|
77
|
-
* @
|
|
77
|
+
* @alpha
|
|
78
78
|
*/
|
|
79
79
|
export declare enum OdspErrorType {
|
|
80
80
|
/**
|
|
@@ -124,7 +124,7 @@ export declare enum OdspErrorType {
|
|
|
124
124
|
blockedIPAddress = "blockedIPAddress"
|
|
125
125
|
}
|
|
126
126
|
/**
|
|
127
|
-
* @
|
|
127
|
+
* @alpha
|
|
128
128
|
*/
|
|
129
129
|
export interface IOdspErrorAugmentations {
|
|
130
130
|
/**
|
|
@@ -145,13 +145,13 @@ export interface IOdspErrorAugmentations {
|
|
|
145
145
|
/**
|
|
146
146
|
* Base interface for all errors and warnings
|
|
147
147
|
* Superset of IDriverErrorBase, but with Odsp-specific errorType and properties
|
|
148
|
-
* @
|
|
148
|
+
* @alpha
|
|
149
149
|
*/
|
|
150
150
|
export interface IOdspError extends Omit<IDriverErrorBase, "errorType">, IOdspErrorAugmentations {
|
|
151
151
|
readonly errorType: OdspErrorType;
|
|
152
152
|
}
|
|
153
153
|
/**
|
|
154
|
-
* @
|
|
154
|
+
* @alpha
|
|
155
155
|
*/
|
|
156
156
|
export type OdspError = IOdspError | (DriverError & IOdspErrorAugmentations);
|
|
157
157
|
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -9,7 +9,7 @@ const driver_definitions_1 = require("@fluidframework/driver-definitions");
|
|
|
9
9
|
/**
|
|
10
10
|
* ODSP Error types.
|
|
11
11
|
* Different error types that may be thrown by the ODSP driver.
|
|
12
|
-
* @
|
|
12
|
+
* @alpha
|
|
13
13
|
*/
|
|
14
14
|
exports.OdspErrorTypes = {
|
|
15
15
|
// Inherit base driver error types
|
|
@@ -57,7 +57,7 @@ exports.OdspErrorTypes = {
|
|
|
57
57
|
* Different error types that may be thrown by the ODSP driver.
|
|
58
58
|
*
|
|
59
59
|
* @deprecated Use {@link (OdspErrorTypes:variable)} instead.
|
|
60
|
-
* @
|
|
60
|
+
* @alpha
|
|
61
61
|
*/
|
|
62
62
|
var OdspErrorType;
|
|
63
63
|
(function (OdspErrorType) {
|
|
@@ -107,4 +107,4 @@ var OdspErrorType;
|
|
|
107
107
|
*/
|
|
108
108
|
OdspErrorType["blockedIPAddress"] = "blockedIPAddress";
|
|
109
109
|
})(OdspErrorType || (exports.OdspErrorType = OdspErrorType = {}));
|
|
110
|
-
//# sourceMappingURL=errors.
|
|
110
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +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;AAMX;;;;;;GAMG;AACH,IAAY,aAsDX;AAtDD,WAAY,aAAa;IACxB;;OAEG;IACH,wDAAuC,CAAA;IAEvC;;OAEG;IACH,8DAA6C,CAAA;IAE7C;;;;OAIG;IACH,kDAAiC,CAAA;IAEjC;;;;OAIG;IACH,8CAA6B,CAAA;IAE7B;;OAEG;IACH,oDAAmC,CAAA;IAEnC;;OAEG;IACH,oDAAmC,CAAA;IAEnC;;;;;;OAMG;IACH,gDAA+B,CAAA;IAE/B;;;OAGG;IACH,oDAAmC,CAAA;IAEnC;;OAEG;IACH,sDAAqC,CAAA;AACtC,CAAC,EAtDW,aAAa,6BAAb,aAAa,QAsDxB","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 * ODSP Error types.\n * Different error types that may be thrown by the ODSP driver.\n *\n * @deprecated Use {@link (OdspErrorTypes:variable)} instead.\n * @alpha\n */\nexport enum OdspErrorType {\n\t/**\n\t * Storage is out of space\n\t */\n\toutOfStorageError = \"outOfStorageError\",\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 * {@inheritDoc @fluidframework/driver-definitions#FluidErrorType.fetchTokenError}\n\t */\n\tfetchTokenError = \"fetchTokenError\",\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}\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: OdspErrorType;\n}\n\n/**\n * @alpha\n */\nexport type OdspError = IOdspError | (DriverError & IOdspErrorAugmentations);\n"]}
|
|
@@ -0,0 +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/*\n\t * Maximum Data size (in bytes)\n\t * If specified, SPO will fail snapshot request with 413 error (see OdspErrorType.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"]}
|
|
@@ -5,17 +5,17 @@
|
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.tokenFromResponse = exports.isTokenFromCache = exports.SharingLinkScope = exports.SharingLinkRole = exports.ShareLinkTypes = exports.snapshotKey = exports.getKeyForCacheEntry = exports.OdspErrorTypes = exports.OdspErrorType = void 0;
|
|
8
|
-
var errors_1 = require("./errors
|
|
8
|
+
var errors_1 = require("./errors");
|
|
9
9
|
Object.defineProperty(exports, "OdspErrorType", { enumerable: true, get: function () { return errors_1.OdspErrorType; } });
|
|
10
10
|
Object.defineProperty(exports, "OdspErrorTypes", { enumerable: true, get: function () { return errors_1.OdspErrorTypes; } });
|
|
11
|
-
var odspCache_1 = require("./odspCache
|
|
11
|
+
var odspCache_1 = require("./odspCache");
|
|
12
12
|
Object.defineProperty(exports, "getKeyForCacheEntry", { enumerable: true, get: function () { return odspCache_1.getKeyForCacheEntry; } });
|
|
13
13
|
Object.defineProperty(exports, "snapshotKey", { enumerable: true, get: function () { return odspCache_1.snapshotKey; } });
|
|
14
|
-
var resolvedUrl_1 = require("./resolvedUrl
|
|
14
|
+
var resolvedUrl_1 = require("./resolvedUrl");
|
|
15
15
|
Object.defineProperty(exports, "ShareLinkTypes", { enumerable: true, get: function () { return resolvedUrl_1.ShareLinkTypes; } });
|
|
16
16
|
Object.defineProperty(exports, "SharingLinkRole", { enumerable: true, get: function () { return resolvedUrl_1.SharingLinkRole; } });
|
|
17
17
|
Object.defineProperty(exports, "SharingLinkScope", { enumerable: true, get: function () { return resolvedUrl_1.SharingLinkScope; } });
|
|
18
|
-
var tokenFetch_1 = require("./tokenFetch
|
|
18
|
+
var tokenFetch_1 = require("./tokenFetch");
|
|
19
19
|
Object.defineProperty(exports, "isTokenFromCache", { enumerable: true, get: function () { return tokenFetch_1.isTokenFromCache; } });
|
|
20
20
|
Object.defineProperty(exports, "tokenFromResponse", { enumerable: true, get: function () { return tokenFetch_1.tokenFromResponse; } });
|
|
21
|
-
//# sourceMappingURL=index.
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,mCAMkB;AAFjB,uGAAA,aAAa,OAAA;AACb,wGAAA,cAAc,OAAA;AAQf,yCAQqB;AANpB,gHAAA,mBAAmB,OAAA;AAKnB,wGAAA,WAAW,OAAA;AAEZ,6CASuB;AAHtB,6GAAA,cAAc,OAAA;AACd,8GAAA,eAAe,OAAA;AACf,+GAAA,gBAAgB,OAAA;AAEjB,2CASsB;AANrB,8GAAA,gBAAgB,OAAA;AAIhB,+GAAA,iBAAiB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tIOdspError,\n\tIOdspErrorAugmentations,\n\tOdspError,\n\tOdspErrorType,\n\tOdspErrorTypes,\n} from \"./errors\";\nexport {\n\tHostStoragePolicy,\n\tICollabSessionOptions,\n\tIOpsCachingPolicy,\n\tISnapshotOptions,\n} from \"./factory\";\nexport {\n\tCacheContentType,\n\tgetKeyForCacheEntry,\n\tICacheEntry,\n\tIEntry,\n\tIFileEntry,\n\tIPersistedCache,\n\tsnapshotKey,\n} from \"./odspCache\";\nexport {\n\tIOdspResolvedUrl,\n\tIOdspUrlParts,\n\tISharingLink,\n\tISharingLinkKind,\n\tShareLinkInfoType,\n\tShareLinkTypes,\n\tSharingLinkRole,\n\tSharingLinkScope,\n} from \"./resolvedUrl\";\nexport {\n\tIdentityType,\n\tInstrumentedStorageTokenFetcher,\n\tisTokenFromCache,\n\tOdspResourceTokenFetchOptions,\n\tTokenFetcher,\n\tTokenFetchOptions,\n\ttokenFromResponse,\n\tTokenResponse,\n} from \"./tokenFetch\";\nexport {\n\tIProvideSessionAwareDriverFactory,\n\tIRelaySessionAwareDriverFactory,\n\tISocketStorageDiscovery,\n} from \"./sessionProvider\";\n"]}
|
|
@@ -7,8 +7,6 @@ import { IResolvedUrl } from '@fluidframework/driver-definitions';
|
|
|
7
7
|
*/
|
|
8
8
|
export declare type CacheContentType = "snapshot" | "ops";
|
|
9
9
|
|
|
10
|
-
/* Excluded from this release type: DriverError */
|
|
11
|
-
|
|
12
10
|
/* Excluded from this release type: getKeyForCacheEntry */
|
|
13
11
|
|
|
14
12
|
/**
|
|
@@ -115,7 +113,13 @@ export declare interface ICollabSessionOptions {
|
|
|
115
113
|
forceAccessTokenViaAuthorizationHeader?: boolean;
|
|
116
114
|
}
|
|
117
115
|
|
|
118
|
-
|
|
116
|
+
/**
|
|
117
|
+
* Identity types supported by ODSP driver.
|
|
118
|
+
* `Consumer` represents user authenticated with Microsoft Account (MSA).
|
|
119
|
+
* `Enterprise` represents user authenticated with M365 tenant account.
|
|
120
|
+
* @alpha
|
|
121
|
+
*/
|
|
122
|
+
export declare type IdentityType = "Consumer" | "Enterprise";
|
|
119
123
|
|
|
120
124
|
/**
|
|
121
125
|
* Cache entry. Identifies file that this entry belongs to, and type of content stored in it.
|
|
@@ -159,9 +163,34 @@ export declare interface IFileEntry {
|
|
|
159
163
|
|
|
160
164
|
/* Excluded from this release type: InstrumentedStorageTokenFetcher */
|
|
161
165
|
|
|
162
|
-
|
|
166
|
+
/**
|
|
167
|
+
* Base interface for all errors and warnings
|
|
168
|
+
* Superset of IDriverErrorBase, but with Odsp-specific errorType and properties
|
|
169
|
+
* @alpha
|
|
170
|
+
*/
|
|
171
|
+
export declare interface IOdspError extends Omit<IDriverErrorBase, "errorType">, IOdspErrorAugmentations {
|
|
172
|
+
readonly errorType: OdspErrorType;
|
|
173
|
+
}
|
|
163
174
|
|
|
164
|
-
|
|
175
|
+
/**
|
|
176
|
+
* @alpha
|
|
177
|
+
*/
|
|
178
|
+
export declare interface IOdspErrorAugmentations {
|
|
179
|
+
/**
|
|
180
|
+
* Server epoch indicates when the file was last modified.
|
|
181
|
+
* Used to detect modifications outside Fluid's services
|
|
182
|
+
*/
|
|
183
|
+
serverEpoch?: string;
|
|
184
|
+
/**
|
|
185
|
+
* It is the redirection url at which the network call should have been made. It is due to change
|
|
186
|
+
* in site domain of the file on server.
|
|
187
|
+
*/
|
|
188
|
+
redirectLocation?: string;
|
|
189
|
+
/**
|
|
190
|
+
* It is array of error codes included in error response from server.
|
|
191
|
+
*/
|
|
192
|
+
facetCodes?: string[];
|
|
193
|
+
}
|
|
165
194
|
|
|
166
195
|
/**
|
|
167
196
|
* @alpha
|
|
@@ -337,11 +366,133 @@ export declare interface ISocketStorageDiscovery {
|
|
|
337
366
|
|
|
338
367
|
/* Excluded from this release type: isTokenFromCache */
|
|
339
368
|
|
|
340
|
-
|
|
369
|
+
/**
|
|
370
|
+
* @alpha
|
|
371
|
+
*/
|
|
372
|
+
export declare type OdspError = IOdspError | (DriverError & IOdspErrorAugmentations);
|
|
341
373
|
|
|
342
|
-
|
|
374
|
+
/**
|
|
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
|
+
* @alpha
|
|
380
|
+
*/
|
|
381
|
+
export declare enum OdspErrorType {
|
|
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
|
+
}
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* ODSP Error types.
|
|
431
|
+
* Different error types that may be thrown by the ODSP driver.
|
|
432
|
+
* @alpha
|
|
433
|
+
*/
|
|
434
|
+
export declare const OdspErrorTypes: {
|
|
435
|
+
/**
|
|
436
|
+
* Invalid file name (at creation of the file)
|
|
437
|
+
*/
|
|
438
|
+
readonly invalidFileNameError: "invalidFileNameError";
|
|
439
|
+
/**
|
|
440
|
+
* Snapshot is too big. Host application specified limit for snapshot size, and snapshot was bigger
|
|
441
|
+
* that that limit, thus request failed. Hosting application is expected to have fall-back behavior for
|
|
442
|
+
* such case.
|
|
443
|
+
*/
|
|
444
|
+
readonly snapshotTooBig: "snapshotTooBig";
|
|
445
|
+
/**
|
|
446
|
+
* Maximum time limit to fetch reached. Host application specified limit for fetching of snapshot, when
|
|
447
|
+
* that limit is reached, request fails. Hosting application is expected to have fall-back behavior for
|
|
448
|
+
* such case.
|
|
449
|
+
*/
|
|
450
|
+
readonly fetchTimeout: "fetchTimeout";
|
|
451
|
+
/**
|
|
452
|
+
* SPO admin toggle: fluid service is not enabled.
|
|
453
|
+
*/
|
|
454
|
+
readonly fluidNotEnabled: "fluidNotEnabled";
|
|
455
|
+
/**
|
|
456
|
+
* This error will be raised when client is too behind with no way to catch up.
|
|
457
|
+
* This condition will happen when user was offline for too long, resulting in old ops / blobs being deleted
|
|
458
|
+
* by storage, and thus removing an ability for client to catch up.
|
|
459
|
+
* This condition will result in any local changes being lost (i.e. only way to save state is by user
|
|
460
|
+
* copying it over manually)
|
|
461
|
+
*/
|
|
462
|
+
readonly cannotCatchUp: "cannotCatchUp";
|
|
463
|
+
/**
|
|
464
|
+
* SPO can occasionally return 403 for r/w operations on document when there is a fail over to another data center.
|
|
465
|
+
* So to preserve integrity of the data, the data becomes readonly.
|
|
466
|
+
*/
|
|
467
|
+
readonly serviceReadOnly: "serviceReadOnly";
|
|
468
|
+
/**
|
|
469
|
+
* Due to organizational policies, you can't access server resources from the current network location.
|
|
470
|
+
*/
|
|
471
|
+
readonly blockedIPAddress: "blockedIPAddress";
|
|
472
|
+
readonly genericNetworkError: "genericNetworkError";
|
|
473
|
+
readonly authorizationError: "authorizationError";
|
|
474
|
+
readonly fileNotFoundOrAccessDeniedError: "fileNotFoundOrAccessDeniedError";
|
|
475
|
+
readonly offlineError: "offlineError";
|
|
476
|
+
readonly unsupportedClientProtocolVersion: "unsupportedClientProtocolVersion";
|
|
477
|
+
readonly writeError: "writeError";
|
|
478
|
+
readonly fetchFailure: "fetchFailure";
|
|
479
|
+
readonly fetchTokenError: "fetchTokenError";
|
|
480
|
+
readonly incorrectServerResponse: "incorrectServerResponse";
|
|
481
|
+
readonly fileOverwrittenInStorage: "fileOverwrittenInStorage";
|
|
482
|
+
readonly deltaStreamConnectionForbidden: "deltaStreamConnectionForbidden";
|
|
483
|
+
readonly locationRedirection: "locationRedirection";
|
|
484
|
+
readonly fluidInvalidSchema: "fluidInvalidSchema";
|
|
485
|
+
readonly fileIsLocked: "fileIsLocked";
|
|
486
|
+
readonly outOfStorageError: "outOfStorageError";
|
|
487
|
+
readonly genericError: "genericError";
|
|
488
|
+
readonly throttlingError: "throttlingError";
|
|
489
|
+
readonly usageError: "usageError";
|
|
490
|
+
};
|
|
343
491
|
|
|
344
|
-
|
|
492
|
+
/**
|
|
493
|
+
* @alpha
|
|
494
|
+
*/
|
|
495
|
+
export declare type OdspErrorTypes = (typeof OdspErrorTypes)[keyof typeof OdspErrorTypes];
|
|
345
496
|
|
|
346
497
|
/**
|
|
347
498
|
* Represents access token fetch options for ODSP resource
|
|
@@ -463,7 +614,7 @@ export declare interface TokenFetchOptions {
|
|
|
463
614
|
|
|
464
615
|
/**
|
|
465
616
|
* Represents token response
|
|
466
|
-
* @
|
|
617
|
+
* @beta
|
|
467
618
|
*/
|
|
468
619
|
export declare interface TokenResponse {
|
|
469
620
|
/** Token value */
|
|
@@ -16,8 +16,6 @@ import { IResolvedUrl } from '@fluidframework/driver-definitions';
|
|
|
16
16
|
|
|
17
17
|
/* Excluded from this release type: IdentityType */
|
|
18
18
|
|
|
19
|
-
/* Excluded from this release type: IDriverErrorBase */
|
|
20
|
-
|
|
21
19
|
/* Excluded from this release type: IEntry */
|
|
22
20
|
|
|
23
21
|
/* Excluded from this release type: IFileEntry */
|
|
@@ -76,6 +74,15 @@ import { IResolvedUrl } from '@fluidframework/driver-definitions';
|
|
|
76
74
|
|
|
77
75
|
/* Excluded from this release type: tokenFromResponse */
|
|
78
76
|
|
|
79
|
-
|
|
77
|
+
/**
|
|
78
|
+
* Represents token response
|
|
79
|
+
* @beta
|
|
80
|
+
*/
|
|
81
|
+
export declare interface TokenResponse {
|
|
82
|
+
/** Token value */
|
|
83
|
+
token: string;
|
|
84
|
+
/** Flag indicating whether token was obtained from local cache */
|
|
85
|
+
fromCache?: boolean;
|
|
86
|
+
}
|
|
80
87
|
|
|
81
88
|
export { }
|
|
@@ -16,8 +16,6 @@ import { IResolvedUrl } from '@fluidframework/driver-definitions';
|
|
|
16
16
|
|
|
17
17
|
/* Excluded from this release type: IdentityType */
|
|
18
18
|
|
|
19
|
-
/* Excluded from this release type: IDriverErrorBase */
|
|
20
|
-
|
|
21
19
|
/* Excluded from this release type: IEntry */
|
|
22
20
|
|
|
23
21
|
/* Excluded from this release type: IFileEntry */
|
|
@@ -123,7 +123,7 @@ export declare interface ICollabSessionOptions {
|
|
|
123
123
|
* Identity types supported by ODSP driver.
|
|
124
124
|
* `Consumer` represents user authenticated with Microsoft Account (MSA).
|
|
125
125
|
* `Enterprise` represents user authenticated with M365 tenant account.
|
|
126
|
-
* @
|
|
126
|
+
* @alpha
|
|
127
127
|
*/
|
|
128
128
|
export declare type IdentityType = "Consumer" | "Enterprise";
|
|
129
129
|
|
|
@@ -175,14 +175,14 @@ export declare type InstrumentedStorageTokenFetcher = (options: TokenFetchOption
|
|
|
175
175
|
/**
|
|
176
176
|
* Base interface for all errors and warnings
|
|
177
177
|
* Superset of IDriverErrorBase, but with Odsp-specific errorType and properties
|
|
178
|
-
* @
|
|
178
|
+
* @alpha
|
|
179
179
|
*/
|
|
180
180
|
export declare interface IOdspError extends Omit<IDriverErrorBase, "errorType">, IOdspErrorAugmentations {
|
|
181
181
|
readonly errorType: OdspErrorType;
|
|
182
182
|
}
|
|
183
183
|
|
|
184
184
|
/**
|
|
185
|
-
* @
|
|
185
|
+
* @alpha
|
|
186
186
|
*/
|
|
187
187
|
export declare interface IOdspErrorAugmentations {
|
|
188
188
|
/**
|
|
@@ -383,7 +383,7 @@ export declare interface ISocketStorageDiscovery {
|
|
|
383
383
|
export declare const isTokenFromCache: (tokenResponse: string | TokenResponse | null) => boolean | undefined;
|
|
384
384
|
|
|
385
385
|
/**
|
|
386
|
-
* @
|
|
386
|
+
* @alpha
|
|
387
387
|
*/
|
|
388
388
|
export declare type OdspError = IOdspError | (DriverError & IOdspErrorAugmentations);
|
|
389
389
|
|
|
@@ -392,7 +392,7 @@ export declare type OdspError = IOdspError | (DriverError & IOdspErrorAugmentati
|
|
|
392
392
|
* Different error types that may be thrown by the ODSP driver.
|
|
393
393
|
*
|
|
394
394
|
* @deprecated Use {@link (OdspErrorTypes:variable)} instead.
|
|
395
|
-
* @
|
|
395
|
+
* @alpha
|
|
396
396
|
*/
|
|
397
397
|
export declare enum OdspErrorType {
|
|
398
398
|
/**
|
|
@@ -445,7 +445,7 @@ export declare enum OdspErrorType {
|
|
|
445
445
|
/**
|
|
446
446
|
* ODSP Error types.
|
|
447
447
|
* Different error types that may be thrown by the ODSP driver.
|
|
448
|
-
* @
|
|
448
|
+
* @alpha
|
|
449
449
|
*/
|
|
450
450
|
export declare const OdspErrorTypes: {
|
|
451
451
|
/**
|
|
@@ -506,7 +506,7 @@ export declare const OdspErrorTypes: {
|
|
|
506
506
|
};
|
|
507
507
|
|
|
508
508
|
/**
|
|
509
|
-
* @
|
|
509
|
+
* @alpha
|
|
510
510
|
*/
|
|
511
511
|
export declare type OdspErrorTypes = (typeof OdspErrorTypes)[keyof typeof OdspErrorTypes];
|
|
512
512
|
|
|
@@ -640,7 +640,7 @@ export declare const tokenFromResponse: (tokenResponse: string | TokenResponse |
|
|
|
640
640
|
|
|
641
641
|
/**
|
|
642
642
|
* Represents token response
|
|
643
|
-
* @
|
|
643
|
+
* @beta
|
|
644
644
|
*/
|
|
645
645
|
export declare interface TokenResponse {
|
|
646
646
|
/** Token value */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"odspCache.js","sourceRoot":"","sources":["../src/odspCache.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH;;;GAGG;AACU,QAAA,WAAW,GAAG,UAAU,CAAC;AA8FtC;;;;;GAKG;AACH,SAAgB,mBAAmB,CAAC,KAAkB;IACrD,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,GAAG,EAAE,CAAC;AACzD,CAAC;AAFD,kDAEC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IResolvedUrl } from \"@fluidframework/driver-definitions\";\n\n/**\n * Describes what kind of content is stored in cache entry.\n * @internal\n */\nexport const snapshotKey = \"snapshot\";\n/**\n * @alpha\n */\nexport type CacheContentType = \"snapshot\" | \"ops\";\n\n/*\n * File / container identifier.\n * There is overlapping information here - host can use all of it or parts\n * to implement storage / identify files.\n */\n/**\n * @alpha\n */\nexport interface IFileEntry {\n\t/**\n\t * Unique and stable ID of the document.\n\t * Driver guarantees that docId is stable ID uniquely identifying document.\n\t */\n\tdocId: string;\n\t/**\n\t * Resolved URI is provided for additional versatility - host can use it to\n\t * identify file in storage, and (as example) delete all cached entries for\n\t * a file if user requests so.\n\t * This is IOdspResolvedUrl in case of ODSP driver.\n\t */\n\tresolvedUrl: IResolvedUrl;\n}\n\n/**\n * Cache entry. Identifies file that this entry belongs to, and type of content stored in it.\n * @alpha\n */\nexport interface IEntry {\n\t/**\n\t * Identifies type of entry for a given file.\n\t * Each file can have multiple types of entries associated with it.\n\t * For example, it can be snapshot, blob, ops, etc.\n\t */\n\ttype: CacheContentType;\n\n\t/**\n\t * Identifies individual entry for a given file and type.\n\t * Each file can have multiple cache entries associated with it.\n\t * This property identifies a particular instance of entry.\n\t * For example, for blobs it will be unique ID of the blob in a file.\n\t * For batch of ops, it can be starting op sequence number.\n\t * For types that have only one entry (like snapshots), it will be empty string.\n\t */\n\tkey: string;\n}\n\n/**\n * Cache entry. Identifies file that this entry belongs to, and type of content stored in it.\n * @alpha\n */\nexport interface ICacheEntry extends IEntry {\n\t/**\n\t * Identifies file in storage this cached entry is for\n\t */\n\tfile: IFileEntry;\n}\n\n/**\n * Persistent cache. This interface can be implemented by the host to provide durable caching\n * across sessions. If not provided at driver factory construction, factory will use in-memory\n * cache implementation that does not survive across sessions. Snapshot entires stored in the\n * IPersistedCache will be considered stale and removed after 2 days. Read the README for more\n * information.\n * @alpha\n */\nexport interface IPersistedCache {\n\t/**\n\t * Get the cache value of the key\n\t * @param entry - cache entry, identifies file and particular key for this file.\n\t * @returns Cached value. undefined if nothing is cached.\n\t */\n\tget(entry: ICacheEntry): Promise<any>;\n\n\t/**\n\t * Put the value into cache.\n\t * Important - only serializable content is allowed since this cache may be persisted between sessions\n\t * @param entry - cache entry.\n\t * @param value - JSON-serializable content.\n\t */\n\tput(entry: ICacheEntry, value: any): Promise<void>;\n\n\t/**\n\t * Removes the entries from the cache for given parametres.\n\t * @param file - file entry to be deleted.\n\t */\n\tremoveEntries(file: IFileEntry): Promise<void>;\n}\n\n/**\n * Api to generate a cache key from cache entry.\n * @param entry - cache entry from which a cache key is generated\n * @returns The key for cache.\n * @internal\n */\nexport function getKeyForCacheEntry(entry: ICacheEntry): string {\n\treturn `${entry.file.docId}_${entry.type}_${entry.key}`;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolvedUrl.js","sourceRoot":"","sources":["../src/resolvedUrl.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAaH;;;;GAIG;AACH,IAAY,cAEX;AAFD,WAAY,cAAc;IACzB,6BAAW,CAAA;AACZ,CAAC,EAFW,cAAc,8BAAd,cAAc,QAEzB;AAED;;;GAGG;AACH,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC3B,iDAA6B,CAAA;IAC7B,mCAAe,CAAA;IACf,2CAAuB,CAAA;IACvB,uCAAmB,CAAA;AACpB,CAAC,EALW,gBAAgB,gCAAhB,gBAAgB,QAK3B;AAED;;;GAGG;AACH,IAAY,eAGX;AAHD,WAAY,eAAe;IAC1B,gCAAa,CAAA;IACb,gCAAa,CAAA;AACd,CAAC,EAHW,eAAe,+BAAf,eAAe,QAG1B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IResolvedUrl } from \"@fluidframework/driver-definitions\";\n\n/**\n * @alpha\n */\nexport interface IOdspUrlParts {\n\tsiteUrl: string;\n\tdriveId: string;\n\titemId: string;\n}\n\n/**\n * @deprecated Use ISharingLinkKind type instead.\n * Type of shareLink requested/created when creating the file for the first time.\n * @alpha\n */\nexport enum ShareLinkTypes {\n\tcsl = \"csl\",\n}\n\n/**\n * Sharing scope of the share links created for a file.\n * @alpha\n */\nexport enum SharingLinkScope {\n\torganization = \"organization\",\n\tusers = \"users\",\n\tanonymous = \"anonymous\",\n\tdefault = \"default\",\n}\n\n/**\n * View/edit permission role for a sharing link.\n * @alpha\n */\nexport enum SharingLinkRole {\n\tview = \"view\",\n\tedit = \"edit\",\n}\n\n/**\n * Defines the permissions scope for a share link requested to be created during the creation the file in ODSP.\n * Providing these properties to the /snapshot api will also create and return the requested kind of sharing link.\n * @alpha\n */\nexport interface ISharingLinkKind {\n\tscope: SharingLinkScope;\n\t/*\n\t * If this parameter is not provided, the API will default to \"edit\" links (provided\n\t * a valid createLinkScope setting is given).\n\t */\n\trole?: SharingLinkRole;\n}\n\n/**\n * Sharing link data received from the /snapshot api response.\n * @alpha\n */\nexport interface ISharingLink extends ISharingLinkKind {\n\twebUrl: string;\n}\n\n/**\n * Sharing link data created for the ODSP item.\n * Contains information about either sharing link created while creating a new file or\n * a redeemable share link created when loading an existing file\n * @alpha\n */\nexport interface ShareLinkInfoType {\n\t/**\n\t * We create a new file in ODSP with the /snapshot api call. Applications then need to make a separate apis call to\n\t * create a sharing link for that file. To reduce the number of network calls, ODSP now provides a feature\n\t * where we can create a share link along with creating a file by passing a query parameter called\n\t * createShareLink (deprecated) or createLinkScope and createLinkRole. createLink object below saves the information\n\t * from the /snapshot api response.\n\t */\n\tcreateLink?: {\n\t\t/**\n\t\t * @deprecated\n\t\t * Type of shareLink requested/created when creating the file for the first time. The 'type' property here\n\t\t * represents the type of sharing link requested.\n\t\t * Will be deprecated soon. Type of sharing link will be present in the link:ISharingLink property below.\n\t\t */\n\t\ttype?: ShareLinkTypes | ISharingLinkKind;\n\n\t\t/**\n\t\t * Share link created when the file is created for the first time with /snapshot api call.\n\t\t */\n\t\tlink?: string | ISharingLink;\n\n\t\t/**\n\t\t * Error message if creation of sharing link fails with /snapshot api call\n\t\t */\n\t\terror?: any;\n\n\t\tshareId?: string;\n\t};\n\n\t/**\n\t * This is used to save the network calls while doing trees/latest call as if the client does not have\n\t * permission then this link can be redeemed for the permissions in the same network call.\n\t */\n\tsharingLinkToRedeem?: string;\n}\n/**\n * @alpha\n */\nexport interface IOdspResolvedUrl extends IResolvedUrl, IOdspUrlParts {\n\ttype: \"fluid\";\n\todspResolvedUrl: true;\n\n\t// URL to send to fluid, contains the documentId and the path\n\turl: string;\n\n\t// A hashed identifier that is unique to this document\n\thashedDocumentId: string;\n\n\tendpoints: {\n\t\tsnapshotStorageUrl: string;\n\t\tattachmentPOSTStorageUrl: string;\n\t\tattachmentGETStorageUrl: string;\n\t\tdeltaStorageUrl: string;\n\t};\n\n\t// Tokens are not obtained by the ODSP driver using the resolve flow, the app must provide them.\n\t// eslint-disable-next-line @typescript-eslint/ban-types\n\ttokens: {};\n\n\tfileName: string;\n\n\tsummarizer: boolean;\n\n\tcodeHint?: {\n\t\t// containerPackageName is used for adding the package name to the request headers.\n\t\t// This may be used for preloading the container package when loading Fluid content.\n\t\tcontainerPackageName?: string;\n\t};\n\n\tfileVersion: string | undefined;\n\n\tdataStorePath?: string;\n\n\t/**\n\t * Sharing link data created for the ODSP item.\n\t * Contains information about either sharing link created while creating a new file or\n\t * a redeemable share link created when loading an existing file\n\t */\n\tshareLinkInfo?: ShareLinkInfoType;\n\n\tisClpCompliantApp?: boolean;\n}\n"]}
|