@fluidframework/odsp-driver-definitions 1.2.3-83900 → 2.0.0-internal.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/dist/errors.d.ts +19 -9
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +0 -3
- package/dist/errors.js.map +1 -1
- package/dist/factory.d.ts +1 -1
- package/dist/factory.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.d.ts.map +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/lib/errors.d.ts +19 -9
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +0 -3
- package/lib/errors.js.map +1 -1
- package/lib/factory.d.ts +1 -1
- package/lib/factory.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.d.ts.map +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/package.json +17 -7
- package/src/errors.ts +21 -13
- package/src/factory.ts +1 -1
- package/src/packageVersion.ts +1 -1
package/dist/errors.d.ts
CHANGED
|
@@ -22,20 +22,30 @@ export declare enum OdspErrorType {
|
|
|
22
22
|
fluidNotEnabled = "fluidNotEnabled",
|
|
23
23
|
fetchTokenError = "fetchTokenError",
|
|
24
24
|
cannotCatchUp = "cannotCatchUp",
|
|
25
|
-
serviceReadOnly = "serviceReadOnly"
|
|
26
|
-
locationRedirection = "locationRedirection"
|
|
25
|
+
serviceReadOnly = "serviceReadOnly"
|
|
27
26
|
}
|
|
28
|
-
|
|
29
|
-
* Base interface for all errors and warnings
|
|
30
|
-
* Superset of IDriverErrorBase, but with Odsp-specific errorType
|
|
31
|
-
*/
|
|
32
|
-
export interface IOdspError extends Omit<IDriverErrorBase, "errorType"> {
|
|
33
|
-
readonly errorType: OdspErrorType;
|
|
27
|
+
export interface IOdspErrorAugmentations {
|
|
34
28
|
/**
|
|
35
29
|
* Server epoch indicates when the file was last modified.
|
|
36
30
|
* Used to detect modifications outside Fluid's services
|
|
37
31
|
*/
|
|
38
32
|
serverEpoch?: string;
|
|
33
|
+
/**
|
|
34
|
+
* It is the redirection url at which the network call should have been made. It is due to change
|
|
35
|
+
* in site domain of the file on server.
|
|
36
|
+
*/
|
|
37
|
+
redirectLocation?: string;
|
|
38
|
+
/**
|
|
39
|
+
* It is array of error codes included in error response from server.
|
|
40
|
+
*/
|
|
41
|
+
facetCodes?: string[];
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Base interface for all errors and warnings
|
|
45
|
+
* Superset of IDriverErrorBase, but with Odsp-specific errorType and properties
|
|
46
|
+
*/
|
|
47
|
+
export interface IOdspError extends Omit<IDriverErrorBase, "errorType">, IOdspErrorAugmentations {
|
|
48
|
+
readonly errorType: OdspErrorType;
|
|
39
49
|
}
|
|
40
|
-
export declare type OdspError =
|
|
50
|
+
export declare type OdspError = IOdspError | (DriverError & IOdspErrorAugmentations);
|
|
41
51
|
//# sourceMappingURL=errors.d.ts.map
|
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,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAEnF,oBAAY,aAAa;IACrB;;OAEG;IACH,iBAAiB,sBAAsB;IAEvC;;OAEG;IACH,oBAAoB,yBAAyB;IAE7C;;;;OAIG;IACH,cAAc,mBAAmB;IAOjC,YAAY,iBAAiB;IAK7B,eAAe,oBAAoB;IAEnC,eAAe,oBAAoB;IAOnC,aAAa,kBAAkB;IAI/B,eAAe,oBAAoB;
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAEnF,oBAAY,aAAa;IACrB;;OAEG;IACH,iBAAiB,sBAAsB;IAEvC;;OAEG;IACH,oBAAoB,yBAAyB;IAE7C;;;;OAIG;IACH,cAAc,mBAAmB;IAOjC,YAAY,iBAAiB;IAK7B,eAAe,oBAAoB;IAEnC,eAAe,oBAAoB;IAOnC,aAAa,kBAAkB;IAI/B,eAAe,oBAAoB;CACtC;AAED,MAAM,WAAW,uBAAuB;IACpC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED;;;GAGG;AACH,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,gBAAgB,EAAE,WAAW,CAAC,EAAE,uBAAuB;IAC5F,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAC;CACrC;AAED,oBAAY,SAAS,GAAG,UAAU,GAAG,CAAC,WAAW,GAAG,uBAAuB,CAAC,CAAC"}
|
package/dist/errors.js
CHANGED
|
@@ -37,8 +37,5 @@ var OdspErrorType;
|
|
|
37
37
|
// SPO can occasionally return 403 for r/w operations on document when there is a fail over to another data center.
|
|
38
38
|
// So to preserve integrity of the data, the data becomes readonly.
|
|
39
39
|
OdspErrorType["serviceReadOnly"] = "serviceReadOnly";
|
|
40
|
-
// The location of file can move on Spo. So if the file location moves and we try to access the older location, then
|
|
41
|
-
// this error is thrown by server to let the client know about the new redirect location.
|
|
42
|
-
OdspErrorType["locationRedirection"] = "locationRedirection";
|
|
43
40
|
})(OdspErrorType = exports.OdspErrorType || (exports.OdspErrorType = {}));
|
|
44
41
|
//# 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":";;;AAMA,IAAY,
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":";;;AAMA,IAAY,aA0CX;AA1CD,WAAY,aAAa;IACrB;;OAEG;IACH,wDAAuC,CAAA;IAEvC;;OAEG;IACH,8DAA6C,CAAA;IAE7C;;;;OAIG;IACH,kDAAiC,CAAA;IAEjC;;;;OAIG;IACH,8CAA6B,CAAA;IAE7B;;UAEM;IACN,oDAAmC,CAAA;IAEnC,oDAAmC,CAAA;IAEnC,+EAA+E;IAC/E,4GAA4G;IAC5G,mEAAmE;IACnE,qGAAqG;IACrG,4BAA4B;IAC5B,gDAA+B,CAAA;IAE/B,mHAAmH;IACnH,mEAAmE;IACnE,oDAAmC,CAAA;AACvC,CAAC,EA1CW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QA0CxB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { DriverError, IDriverErrorBase } from \"@fluidframework/driver-definitions\";\n\nexport enum OdspErrorType {\n /**\n * Storage is out of space\n */\n outOfStorageError = \"outOfStorageError\",\n\n /**\n * Invalid file name (at creation of the file)\n */\n invalidFileNameError = \"invalidFileNameError\",\n\n /**\n * Snapshot is too big. Host application specified limit for snapshot size, and snapshot was bigger\n * that that limit, thus request failed. Hosting application is expected to have fall-back behavior for\n * such case.\n */\n snapshotTooBig = \"snapshotTooBig\",\n\n /*\n * Maximum time limit to fetch reached. Host application specified limit for fetching of snapshot, when\n * that limit is reached, request fails. Hosting application is expected to have fall-back behavior for\n * such case.\n */\n fetchTimeout = \"fetchTimeout\",\n\n /*\n * SPO admin toggle: fluid service is not enabled.\n */\n fluidNotEnabled = \"fluidNotEnabled\",\n\n fetchTokenError = \"fetchTokenError\",\n\n // This error will be raised when client is too behind with no way to catch up.\n // This condition will happen when user was offline for too long, resulting in old ops / blobs being deleted\n // by storage, and thus removing an ability for client to catch up.\n // This condition will result in any local changes being lost (i.e. only way to save state is by user\n // copying it over manually)\n cannotCatchUp = \"cannotCatchUp\",\n\n // SPO can occasionally return 403 for r/w operations on document when there is a fail over to another data center.\n // So to preserve integrity of the data, the data becomes readonly.\n serviceReadOnly = \"serviceReadOnly\",\n}\n\nexport interface IOdspErrorAugmentations {\n /**\n * Server epoch indicates when the file was last modified.\n * Used to detect modifications outside Fluid's services\n */\n serverEpoch?: string;\n\n /**\n * It is the redirection url at which the network call should have been made. It is due to change\n * in site domain of the file on server.\n */\n redirectLocation?: string;\n\n /**\n * It is array of error codes included in error response from server.\n */\n facetCodes?: string[];\n}\n\n/**\n * Base interface for all errors and warnings\n * Superset of IDriverErrorBase, but with Odsp-specific errorType and properties\n */\nexport interface IOdspError extends Omit<IDriverErrorBase, \"errorType\">, IOdspErrorAugmentations {\n readonly errorType: OdspErrorType;\n}\n\nexport type OdspError = IOdspError | (DriverError & IOdspErrorAugmentations);\n"]}
|
package/dist/factory.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ export interface ICollabSessionOptions {
|
|
|
41
41
|
*/
|
|
42
42
|
unauthenticatedUserDisplayName?: string;
|
|
43
43
|
/**
|
|
44
|
-
* @deprecated - Due to security reasons we will passing the token via Authorization header only.
|
|
44
|
+
* @deprecated - Due to security reasons we will be passing the token via Authorization header only.
|
|
45
45
|
* Value indicating session preference to always pass access token via Authorization header.
|
|
46
46
|
* Default behavior is to pass access token via query parameter unless overall href string
|
|
47
47
|
* length exceeds 2048 characters. Using query param is performance optimization which results
|
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\nexport interface ISnapshotOptions {\n blobs?: number;\n deltas?: number;\n channels?: number;\n /*\n * Maximum Data size (in bytes)\n * If specified, SPO will fail snapshot request with 413 error (see OdspErrorType.snapshotTooBig)\n * if snapshot is bigger in size than specified limit.\n */\n mds?: number;\n\n /*\n * Maximum time limit to fetch snapshot (in seconds)\n * If specified, client will timeout the fetch request if it exceeds the time limit and\n * will try to fetch the snapshot without blobs.\n */\n timeout?: number;\n}\n\nexport interface IOpsCachingPolicy {\n /**\n * Batch size. Controls how many ops are grouped together as single cache entry\n * The bigger the number, the more efficient it is (less reads & writes)\n * At the same time, big number means we wait for so many ops to accumulate, which\n * increases chances and number of trailing ops that would not be flushed to cache\n * when user closes tab\n * Use any number below 1 to disable caching\n * Default: 100\n */\n batchSize?: number;\n\n /**\n * To reduce the problem of losing trailing ops when using big batch sizes, host\n * could specify how often driver should flush ops it has not flushed yet.\n * -1 means do not use timer.\n * Measured in ms.\n * Default: 5000\n */\n timerGranularity?: number;\n\n /**\n * Total number of ops to cache. When we reach that number, ops caching stops\n * Default: 5000\n */\n totalOpsToCache?: number;\n}\n\nexport interface ICollabSessionOptions {\n /**\n * Value indicating the display name for session that admits unauthenticated user.\n * This name will be used in attribution associated with edits made by such user.\n */\n unauthenticatedUserDisplayName?: string;\n /**\n * @deprecated - Due to security reasons we will passing the token via Authorization header only.\n * Value indicating session preference to always pass access token via Authorization header.\n * Default behavior is to pass access token via query parameter unless overall href string\n * length exceeds 2048 characters. Using query param is performance optimization which results\n * in ODSP XHR request being treated as 'simple' request which do not require OPTIONS call to\n * validate CORS. However, not all ODSP implementations understand this optimization.\n * For instance, auth layer on Converged stack will fail request with access token passed via\n * query param.\n */\n forceAccessTokenViaAuthorizationHeader?: boolean;\n}\n\nexport interface HostStoragePolicy {\n snapshotOptions?: ISnapshotOptions;\n\n /**\n * If set to true, tells driver to concurrently fetch snapshot from storage (SPO) and cache\n * Container loads from whatever comes first in such case.\n * Snapshot fetched from storage is pushed to cache in either case.\n * If set to false, driver will first consult with cache. Only on cache miss (cache does not\n * return snapshot), driver will fetch snapshot from storage (and push it to cache), otherwise\n * it will load from cache and not reach out to storage.\n * Passing true results in faster loads and keeping cache more current, but it increases bandwidth consumption.\n */\n concurrentSnapshotFetch?: boolean;\n\n // Options overwriting default ops fetching from storage.\n opsBatchSize?: number;\n concurrentOpsBatches?: number;\n\n /**\n * Policy controlling ops caching (leveraging IPersistedCache passed to driver factory)\n */\n opsCaching?: IOpsCachingPolicy;\n\n /**\n * Policy controlling how collaboration session is established\n */\n sessionOptions?: ICollabSessionOptions;\n\n /**\n * @deprecated - This field will be always set to true after removal.\n * True to have the sharing link redeem fallback in case the Trees Latest/Redeem 1RT call fails with redeem error.\n * During fallback it will first redeem the sharing link and then make the Trees latest call.\n */\n enableRedeemFallback?: boolean;\n\n /**\n * Policy controlling if we will cache initial summary when we create a document\n */\n cacheCreateNewSummary?: boolean;\n\n /**\n * @deprecated - This will be replaced with feature gate snapshotFormatFetchType.\n * Policy controlling if we want to fetch binary format snapshot.\n */\n fetchBinarySnapshotFormat?: boolean;\n\n /**\n * If set to true, socket cache are per OdspDocumentService instead of shared across all instances\n */\n isolateSocketCache?: boolean;\n\n /**\n * Enable creation of sharing link along with the creation of file by setting this value to true.\n * If the host provides a 'createLinkType' parameter in the request URL to the container.attach()\n * method, we will request for send the request to ODSP with the same (if the flag is enabled) so\n * that a sharing can be created with the creation of file to save number for round trips made to ODSP.\n */\n enableShareLinkWithCreate?: boolean;\n}\n"]}
|
|
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\nexport interface ISnapshotOptions {\n blobs?: number;\n deltas?: number;\n channels?: number;\n /*\n * Maximum Data size (in bytes)\n * If specified, SPO will fail snapshot request with 413 error (see OdspErrorType.snapshotTooBig)\n * if snapshot is bigger in size than specified limit.\n */\n mds?: number;\n\n /*\n * Maximum time limit to fetch snapshot (in seconds)\n * If specified, client will timeout the fetch request if it exceeds the time limit and\n * will try to fetch the snapshot without blobs.\n */\n timeout?: number;\n}\n\nexport interface IOpsCachingPolicy {\n /**\n * Batch size. Controls how many ops are grouped together as single cache entry\n * The bigger the number, the more efficient it is (less reads & writes)\n * At the same time, big number means we wait for so many ops to accumulate, which\n * increases chances and number of trailing ops that would not be flushed to cache\n * when user closes tab\n * Use any number below 1 to disable caching\n * Default: 100\n */\n batchSize?: number;\n\n /**\n * To reduce the problem of losing trailing ops when using big batch sizes, host\n * could specify how often driver should flush ops it has not flushed yet.\n * -1 means do not use timer.\n * Measured in ms.\n * Default: 5000\n */\n timerGranularity?: number;\n\n /**\n * Total number of ops to cache. When we reach that number, ops caching stops\n * Default: 5000\n */\n totalOpsToCache?: number;\n}\n\nexport interface ICollabSessionOptions {\n /**\n * Value indicating the display name for session that admits unauthenticated user.\n * This name will be used in attribution associated with edits made by such user.\n */\n unauthenticatedUserDisplayName?: string;\n /**\n * @deprecated - Due to security reasons we will be passing the token via Authorization header only.\n * Value indicating session preference to always pass access token via Authorization header.\n * Default behavior is to pass access token via query parameter unless overall href string\n * length exceeds 2048 characters. Using query param is performance optimization which results\n * in ODSP XHR request being treated as 'simple' request which do not require OPTIONS call to\n * validate CORS. However, not all ODSP implementations understand this optimization.\n * For instance, auth layer on Converged stack will fail request with access token passed via\n * query param.\n */\n forceAccessTokenViaAuthorizationHeader?: boolean;\n}\n\nexport interface HostStoragePolicy {\n snapshotOptions?: ISnapshotOptions;\n\n /**\n * If set to true, tells driver to concurrently fetch snapshot from storage (SPO) and cache\n * Container loads from whatever comes first in such case.\n * Snapshot fetched from storage is pushed to cache in either case.\n * If set to false, driver will first consult with cache. Only on cache miss (cache does not\n * return snapshot), driver will fetch snapshot from storage (and push it to cache), otherwise\n * it will load from cache and not reach out to storage.\n * Passing true results in faster loads and keeping cache more current, but it increases bandwidth consumption.\n */\n concurrentSnapshotFetch?: boolean;\n\n // Options overwriting default ops fetching from storage.\n opsBatchSize?: number;\n concurrentOpsBatches?: number;\n\n /**\n * Policy controlling ops caching (leveraging IPersistedCache passed to driver factory)\n */\n opsCaching?: IOpsCachingPolicy;\n\n /**\n * Policy controlling how collaboration session is established\n */\n sessionOptions?: ICollabSessionOptions;\n\n /**\n * @deprecated - This field will be always set to true after removal.\n * True to have the sharing link redeem fallback in case the Trees Latest/Redeem 1RT call fails with redeem error.\n * During fallback it will first redeem the sharing link and then make the Trees latest call.\n */\n enableRedeemFallback?: boolean;\n\n /**\n * Policy controlling if we will cache initial summary when we create a document\n */\n cacheCreateNewSummary?: boolean;\n\n /**\n * @deprecated - This will be replaced with feature gate snapshotFormatFetchType.\n * Policy controlling if we want to fetch binary format snapshot.\n */\n fetchBinarySnapshotFormat?: boolean;\n\n /**\n * If set to true, socket cache are per OdspDocumentService instead of shared across all instances\n */\n isolateSocketCache?: boolean;\n\n /**\n * Enable creation of sharing link along with the creation of file by setting this value to true.\n * If the host provides a 'createLinkType' parameter in the request URL to the container.attach()\n * method, we will request for send the request to ODSP with the same (if the flag is enabled) so\n * that a sharing can be created with the creation of file to save number for round trips made to ODSP.\n */\n enableShareLinkWithCreate?: boolean;\n}\n"]}
|
package/dist/packageVersion.d.ts
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
|
|
6
6
|
*/
|
|
7
7
|
export declare const pkgName = "@fluidframework/odsp-driver-definitions";
|
|
8
|
-
export declare const pkgVersion = "1.
|
|
8
|
+
export declare const pkgVersion = "2.0.0-internal.1.0.0";
|
|
9
9
|
//# sourceMappingURL=packageVersion.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,4CAA4C,CAAC;AACjE,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,4CAA4C,CAAC;AACjE,eAAO,MAAM,UAAU,yBAAyB,CAAC"}
|
package/dist/packageVersion.js
CHANGED
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.pkgVersion = exports.pkgName = void 0;
|
|
10
10
|
exports.pkgName = "@fluidframework/odsp-driver-definitions";
|
|
11
|
-
exports.pkgVersion = "1.
|
|
11
|
+
exports.pkgVersion = "2.0.0-internal.1.0.0";
|
|
12
12
|
//# sourceMappingURL=packageVersion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,yCAAyC,CAAC;AACpD,QAAA,UAAU,GAAG,
|
|
1
|
+
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,yCAAyC,CAAC;AACpD,QAAA,UAAU,GAAG,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/odsp-driver-definitions\";\nexport const pkgVersion = \"2.0.0-internal.1.0.0\";\n"]}
|
package/lib/errors.d.ts
CHANGED
|
@@ -22,20 +22,30 @@ export declare enum OdspErrorType {
|
|
|
22
22
|
fluidNotEnabled = "fluidNotEnabled",
|
|
23
23
|
fetchTokenError = "fetchTokenError",
|
|
24
24
|
cannotCatchUp = "cannotCatchUp",
|
|
25
|
-
serviceReadOnly = "serviceReadOnly"
|
|
26
|
-
locationRedirection = "locationRedirection"
|
|
25
|
+
serviceReadOnly = "serviceReadOnly"
|
|
27
26
|
}
|
|
28
|
-
|
|
29
|
-
* Base interface for all errors and warnings
|
|
30
|
-
* Superset of IDriverErrorBase, but with Odsp-specific errorType
|
|
31
|
-
*/
|
|
32
|
-
export interface IOdspError extends Omit<IDriverErrorBase, "errorType"> {
|
|
33
|
-
readonly errorType: OdspErrorType;
|
|
27
|
+
export interface IOdspErrorAugmentations {
|
|
34
28
|
/**
|
|
35
29
|
* Server epoch indicates when the file was last modified.
|
|
36
30
|
* Used to detect modifications outside Fluid's services
|
|
37
31
|
*/
|
|
38
32
|
serverEpoch?: string;
|
|
33
|
+
/**
|
|
34
|
+
* It is the redirection url at which the network call should have been made. It is due to change
|
|
35
|
+
* in site domain of the file on server.
|
|
36
|
+
*/
|
|
37
|
+
redirectLocation?: string;
|
|
38
|
+
/**
|
|
39
|
+
* It is array of error codes included in error response from server.
|
|
40
|
+
*/
|
|
41
|
+
facetCodes?: string[];
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Base interface for all errors and warnings
|
|
45
|
+
* Superset of IDriverErrorBase, but with Odsp-specific errorType and properties
|
|
46
|
+
*/
|
|
47
|
+
export interface IOdspError extends Omit<IDriverErrorBase, "errorType">, IOdspErrorAugmentations {
|
|
48
|
+
readonly errorType: OdspErrorType;
|
|
39
49
|
}
|
|
40
|
-
export declare type OdspError =
|
|
50
|
+
export declare type OdspError = IOdspError | (DriverError & IOdspErrorAugmentations);
|
|
41
51
|
//# sourceMappingURL=errors.d.ts.map
|
package/lib/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,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAEnF,oBAAY,aAAa;IACrB;;OAEG;IACH,iBAAiB,sBAAsB;IAEvC;;OAEG;IACH,oBAAoB,yBAAyB;IAE7C;;;;OAIG;IACH,cAAc,mBAAmB;IAOjC,YAAY,iBAAiB;IAK7B,eAAe,oBAAoB;IAEnC,eAAe,oBAAoB;IAOnC,aAAa,kBAAkB;IAI/B,eAAe,oBAAoB;
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAEnF,oBAAY,aAAa;IACrB;;OAEG;IACH,iBAAiB,sBAAsB;IAEvC;;OAEG;IACH,oBAAoB,yBAAyB;IAE7C;;;;OAIG;IACH,cAAc,mBAAmB;IAOjC,YAAY,iBAAiB;IAK7B,eAAe,oBAAoB;IAEnC,eAAe,oBAAoB;IAOnC,aAAa,kBAAkB;IAI/B,eAAe,oBAAoB;CACtC;AAED,MAAM,WAAW,uBAAuB;IACpC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED;;;GAGG;AACH,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,gBAAgB,EAAE,WAAW,CAAC,EAAE,uBAAuB;IAC5F,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAC;CACrC;AAED,oBAAY,SAAS,GAAG,UAAU,GAAG,CAAC,WAAW,GAAG,uBAAuB,CAAC,CAAC"}
|
package/lib/errors.js
CHANGED
|
@@ -34,8 +34,5 @@ export var OdspErrorType;
|
|
|
34
34
|
// SPO can occasionally return 403 for r/w operations on document when there is a fail over to another data center.
|
|
35
35
|
// So to preserve integrity of the data, the data becomes readonly.
|
|
36
36
|
OdspErrorType["serviceReadOnly"] = "serviceReadOnly";
|
|
37
|
-
// The location of file can move on Spo. So if the file location moves and we try to access the older location, then
|
|
38
|
-
// this error is thrown by server to let the client know about the new redirect location.
|
|
39
|
-
OdspErrorType["locationRedirection"] = "locationRedirection";
|
|
40
37
|
})(OdspErrorType || (OdspErrorType = {}));
|
|
41
38
|
//# sourceMappingURL=errors.js.map
|
package/lib/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAMA,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAMA,MAAM,CAAN,IAAY,aA0CX;AA1CD,WAAY,aAAa;IACrB;;OAEG;IACH,wDAAuC,CAAA;IAEvC;;OAEG;IACH,8DAA6C,CAAA;IAE7C;;;;OAIG;IACH,kDAAiC,CAAA;IAEjC;;;;OAIG;IACH,8CAA6B,CAAA;IAE7B;;UAEM;IACN,oDAAmC,CAAA;IAEnC,oDAAmC,CAAA;IAEnC,+EAA+E;IAC/E,4GAA4G;IAC5G,mEAAmE;IACnE,qGAAqG;IACrG,4BAA4B;IAC5B,gDAA+B,CAAA;IAE/B,mHAAmH;IACnH,mEAAmE;IACnE,oDAAmC,CAAA;AACvC,CAAC,EA1CW,aAAa,KAAb,aAAa,QA0CxB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { DriverError, IDriverErrorBase } from \"@fluidframework/driver-definitions\";\n\nexport enum OdspErrorType {\n /**\n * Storage is out of space\n */\n outOfStorageError = \"outOfStorageError\",\n\n /**\n * Invalid file name (at creation of the file)\n */\n invalidFileNameError = \"invalidFileNameError\",\n\n /**\n * Snapshot is too big. Host application specified limit for snapshot size, and snapshot was bigger\n * that that limit, thus request failed. Hosting application is expected to have fall-back behavior for\n * such case.\n */\n snapshotTooBig = \"snapshotTooBig\",\n\n /*\n * Maximum time limit to fetch reached. Host application specified limit for fetching of snapshot, when\n * that limit is reached, request fails. Hosting application is expected to have fall-back behavior for\n * such case.\n */\n fetchTimeout = \"fetchTimeout\",\n\n /*\n * SPO admin toggle: fluid service is not enabled.\n */\n fluidNotEnabled = \"fluidNotEnabled\",\n\n fetchTokenError = \"fetchTokenError\",\n\n // This error will be raised when client is too behind with no way to catch up.\n // This condition will happen when user was offline for too long, resulting in old ops / blobs being deleted\n // by storage, and thus removing an ability for client to catch up.\n // This condition will result in any local changes being lost (i.e. only way to save state is by user\n // copying it over manually)\n cannotCatchUp = \"cannotCatchUp\",\n\n // SPO can occasionally return 403 for r/w operations on document when there is a fail over to another data center.\n // So to preserve integrity of the data, the data becomes readonly.\n serviceReadOnly = \"serviceReadOnly\",\n}\n\nexport interface IOdspErrorAugmentations {\n /**\n * Server epoch indicates when the file was last modified.\n * Used to detect modifications outside Fluid's services\n */\n serverEpoch?: string;\n\n /**\n * It is the redirection url at which the network call should have been made. It is due to change\n * in site domain of the file on server.\n */\n redirectLocation?: string;\n\n /**\n * It is array of error codes included in error response from server.\n */\n facetCodes?: string[];\n}\n\n/**\n * Base interface for all errors and warnings\n * Superset of IDriverErrorBase, but with Odsp-specific errorType and properties\n */\nexport interface IOdspError extends Omit<IDriverErrorBase, \"errorType\">, IOdspErrorAugmentations {\n readonly errorType: OdspErrorType;\n}\n\nexport type OdspError = IOdspError | (DriverError & IOdspErrorAugmentations);\n"]}
|
package/lib/factory.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ export interface ICollabSessionOptions {
|
|
|
41
41
|
*/
|
|
42
42
|
unauthenticatedUserDisplayName?: string;
|
|
43
43
|
/**
|
|
44
|
-
* @deprecated - Due to security reasons we will passing the token via Authorization header only.
|
|
44
|
+
* @deprecated - Due to security reasons we will be passing the token via Authorization header only.
|
|
45
45
|
* Value indicating session preference to always pass access token via Authorization header.
|
|
46
46
|
* Default behavior is to pass access token via query parameter unless overall href string
|
|
47
47
|
* length exceeds 2048 characters. Using query param is performance optimization which results
|
package/lib/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\nexport interface ISnapshotOptions {\n blobs?: number;\n deltas?: number;\n channels?: number;\n /*\n * Maximum Data size (in bytes)\n * If specified, SPO will fail snapshot request with 413 error (see OdspErrorType.snapshotTooBig)\n * if snapshot is bigger in size than specified limit.\n */\n mds?: number;\n\n /*\n * Maximum time limit to fetch snapshot (in seconds)\n * If specified, client will timeout the fetch request if it exceeds the time limit and\n * will try to fetch the snapshot without blobs.\n */\n timeout?: number;\n}\n\nexport interface IOpsCachingPolicy {\n /**\n * Batch size. Controls how many ops are grouped together as single cache entry\n * The bigger the number, the more efficient it is (less reads & writes)\n * At the same time, big number means we wait for so many ops to accumulate, which\n * increases chances and number of trailing ops that would not be flushed to cache\n * when user closes tab\n * Use any number below 1 to disable caching\n * Default: 100\n */\n batchSize?: number;\n\n /**\n * To reduce the problem of losing trailing ops when using big batch sizes, host\n * could specify how often driver should flush ops it has not flushed yet.\n * -1 means do not use timer.\n * Measured in ms.\n * Default: 5000\n */\n timerGranularity?: number;\n\n /**\n * Total number of ops to cache. When we reach that number, ops caching stops\n * Default: 5000\n */\n totalOpsToCache?: number;\n}\n\nexport interface ICollabSessionOptions {\n /**\n * Value indicating the display name for session that admits unauthenticated user.\n * This name will be used in attribution associated with edits made by such user.\n */\n unauthenticatedUserDisplayName?: string;\n /**\n * @deprecated - Due to security reasons we will passing the token via Authorization header only.\n * Value indicating session preference to always pass access token via Authorization header.\n * Default behavior is to pass access token via query parameter unless overall href string\n * length exceeds 2048 characters. Using query param is performance optimization which results\n * in ODSP XHR request being treated as 'simple' request which do not require OPTIONS call to\n * validate CORS. However, not all ODSP implementations understand this optimization.\n * For instance, auth layer on Converged stack will fail request with access token passed via\n * query param.\n */\n forceAccessTokenViaAuthorizationHeader?: boolean;\n}\n\nexport interface HostStoragePolicy {\n snapshotOptions?: ISnapshotOptions;\n\n /**\n * If set to true, tells driver to concurrently fetch snapshot from storage (SPO) and cache\n * Container loads from whatever comes first in such case.\n * Snapshot fetched from storage is pushed to cache in either case.\n * If set to false, driver will first consult with cache. Only on cache miss (cache does not\n * return snapshot), driver will fetch snapshot from storage (and push it to cache), otherwise\n * it will load from cache and not reach out to storage.\n * Passing true results in faster loads and keeping cache more current, but it increases bandwidth consumption.\n */\n concurrentSnapshotFetch?: boolean;\n\n // Options overwriting default ops fetching from storage.\n opsBatchSize?: number;\n concurrentOpsBatches?: number;\n\n /**\n * Policy controlling ops caching (leveraging IPersistedCache passed to driver factory)\n */\n opsCaching?: IOpsCachingPolicy;\n\n /**\n * Policy controlling how collaboration session is established\n */\n sessionOptions?: ICollabSessionOptions;\n\n /**\n * @deprecated - This field will be always set to true after removal.\n * True to have the sharing link redeem fallback in case the Trees Latest/Redeem 1RT call fails with redeem error.\n * During fallback it will first redeem the sharing link and then make the Trees latest call.\n */\n enableRedeemFallback?: boolean;\n\n /**\n * Policy controlling if we will cache initial summary when we create a document\n */\n cacheCreateNewSummary?: boolean;\n\n /**\n * @deprecated - This will be replaced with feature gate snapshotFormatFetchType.\n * Policy controlling if we want to fetch binary format snapshot.\n */\n fetchBinarySnapshotFormat?: boolean;\n\n /**\n * If set to true, socket cache are per OdspDocumentService instead of shared across all instances\n */\n isolateSocketCache?: boolean;\n\n /**\n * Enable creation of sharing link along with the creation of file by setting this value to true.\n * If the host provides a 'createLinkType' parameter in the request URL to the container.attach()\n * method, we will request for send the request to ODSP with the same (if the flag is enabled) so\n * that a sharing can be created with the creation of file to save number for round trips made to ODSP.\n */\n enableShareLinkWithCreate?: boolean;\n}\n"]}
|
|
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\nexport interface ISnapshotOptions {\n blobs?: number;\n deltas?: number;\n channels?: number;\n /*\n * Maximum Data size (in bytes)\n * If specified, SPO will fail snapshot request with 413 error (see OdspErrorType.snapshotTooBig)\n * if snapshot is bigger in size than specified limit.\n */\n mds?: number;\n\n /*\n * Maximum time limit to fetch snapshot (in seconds)\n * If specified, client will timeout the fetch request if it exceeds the time limit and\n * will try to fetch the snapshot without blobs.\n */\n timeout?: number;\n}\n\nexport interface IOpsCachingPolicy {\n /**\n * Batch size. Controls how many ops are grouped together as single cache entry\n * The bigger the number, the more efficient it is (less reads & writes)\n * At the same time, big number means we wait for so many ops to accumulate, which\n * increases chances and number of trailing ops that would not be flushed to cache\n * when user closes tab\n * Use any number below 1 to disable caching\n * Default: 100\n */\n batchSize?: number;\n\n /**\n * To reduce the problem of losing trailing ops when using big batch sizes, host\n * could specify how often driver should flush ops it has not flushed yet.\n * -1 means do not use timer.\n * Measured in ms.\n * Default: 5000\n */\n timerGranularity?: number;\n\n /**\n * Total number of ops to cache. When we reach that number, ops caching stops\n * Default: 5000\n */\n totalOpsToCache?: number;\n}\n\nexport interface ICollabSessionOptions {\n /**\n * Value indicating the display name for session that admits unauthenticated user.\n * This name will be used in attribution associated with edits made by such user.\n */\n unauthenticatedUserDisplayName?: string;\n /**\n * @deprecated - Due to security reasons we will be passing the token via Authorization header only.\n * Value indicating session preference to always pass access token via Authorization header.\n * Default behavior is to pass access token via query parameter unless overall href string\n * length exceeds 2048 characters. Using query param is performance optimization which results\n * in ODSP XHR request being treated as 'simple' request which do not require OPTIONS call to\n * validate CORS. However, not all ODSP implementations understand this optimization.\n * For instance, auth layer on Converged stack will fail request with access token passed via\n * query param.\n */\n forceAccessTokenViaAuthorizationHeader?: boolean;\n}\n\nexport interface HostStoragePolicy {\n snapshotOptions?: ISnapshotOptions;\n\n /**\n * If set to true, tells driver to concurrently fetch snapshot from storage (SPO) and cache\n * Container loads from whatever comes first in such case.\n * Snapshot fetched from storage is pushed to cache in either case.\n * If set to false, driver will first consult with cache. Only on cache miss (cache does not\n * return snapshot), driver will fetch snapshot from storage (and push it to cache), otherwise\n * it will load from cache and not reach out to storage.\n * Passing true results in faster loads and keeping cache more current, but it increases bandwidth consumption.\n */\n concurrentSnapshotFetch?: boolean;\n\n // Options overwriting default ops fetching from storage.\n opsBatchSize?: number;\n concurrentOpsBatches?: number;\n\n /**\n * Policy controlling ops caching (leveraging IPersistedCache passed to driver factory)\n */\n opsCaching?: IOpsCachingPolicy;\n\n /**\n * Policy controlling how collaboration session is established\n */\n sessionOptions?: ICollabSessionOptions;\n\n /**\n * @deprecated - This field will be always set to true after removal.\n * True to have the sharing link redeem fallback in case the Trees Latest/Redeem 1RT call fails with redeem error.\n * During fallback it will first redeem the sharing link and then make the Trees latest call.\n */\n enableRedeemFallback?: boolean;\n\n /**\n * Policy controlling if we will cache initial summary when we create a document\n */\n cacheCreateNewSummary?: boolean;\n\n /**\n * @deprecated - This will be replaced with feature gate snapshotFormatFetchType.\n * Policy controlling if we want to fetch binary format snapshot.\n */\n fetchBinarySnapshotFormat?: boolean;\n\n /**\n * If set to true, socket cache are per OdspDocumentService instead of shared across all instances\n */\n isolateSocketCache?: boolean;\n\n /**\n * Enable creation of sharing link along with the creation of file by setting this value to true.\n * If the host provides a 'createLinkType' parameter in the request URL to the container.attach()\n * method, we will request for send the request to ODSP with the same (if the flag is enabled) so\n * that a sharing can be created with the creation of file to save number for round trips made to ODSP.\n */\n enableShareLinkWithCreate?: boolean;\n}\n"]}
|
package/lib/packageVersion.d.ts
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
|
|
6
6
|
*/
|
|
7
7
|
export declare const pkgName = "@fluidframework/odsp-driver-definitions";
|
|
8
|
-
export declare const pkgVersion = "1.
|
|
8
|
+
export declare const pkgVersion = "2.0.0-internal.1.0.0";
|
|
9
9
|
//# sourceMappingURL=packageVersion.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,4CAA4C,CAAC;AACjE,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,4CAA4C,CAAC;AACjE,eAAO,MAAM,UAAU,yBAAyB,CAAC"}
|
package/lib/packageVersion.js
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
|
|
6
6
|
*/
|
|
7
7
|
export const pkgName = "@fluidframework/odsp-driver-definitions";
|
|
8
|
-
export const pkgVersion = "1.
|
|
8
|
+
export const pkgVersion = "2.0.0-internal.1.0.0";
|
|
9
9
|
//# sourceMappingURL=packageVersion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,yCAAyC,CAAC;AACjE,MAAM,CAAC,MAAM,UAAU,GAAG,
|
|
1
|
+
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,yCAAyC,CAAC;AACjE,MAAM,CAAC,MAAM,UAAU,GAAG,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/odsp-driver-definitions\";\nexport const pkgVersion = \"2.0.0-internal.1.0.0\";\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/odsp-driver-definitions",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "2.0.0-internal.1.0.0",
|
|
4
4
|
"description": "Socket storage implementation for SPO and ODC",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -36,14 +36,14 @@
|
|
|
36
36
|
"typetests:gen": "fluid-type-validator -g -d ."
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@fluidframework/driver-definitions": "1.
|
|
39
|
+
"@fluidframework/driver-definitions": "^2.0.0-internal.1.0.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@fluidframework/build-common": "^0.24.0",
|
|
43
|
-
"@fluidframework/build-tools": "^0.
|
|
43
|
+
"@fluidframework/build-tools": "^0.3.1000",
|
|
44
44
|
"@fluidframework/eslint-config-fluid": "^0.28.2000",
|
|
45
|
-
"@fluidframework/odsp-driver-definitions-previous": "npm:@fluidframework/odsp-driver-definitions
|
|
46
|
-
"@fluidframework/protocol-definitions": "^0.
|
|
45
|
+
"@fluidframework/odsp-driver-definitions-previous": "npm:@fluidframework/odsp-driver-definitions@^1.0.0",
|
|
46
|
+
"@fluidframework/protocol-definitions": "^1.0.0",
|
|
47
47
|
"@microsoft/api-extractor": "^7.22.2",
|
|
48
48
|
"@rushstack/eslint-config": "^2.5.1",
|
|
49
49
|
"concurrently": "^6.2.0",
|
|
@@ -55,7 +55,17 @@
|
|
|
55
55
|
"typescript-formatter": "7.1.0"
|
|
56
56
|
},
|
|
57
57
|
"typeValidation": {
|
|
58
|
-
"version": "
|
|
59
|
-
"broken": {
|
|
58
|
+
"version": "2.0.0",
|
|
59
|
+
"broken": {
|
|
60
|
+
"TypeAliasDeclaration_OdspError": {
|
|
61
|
+
"forwardCompat": false
|
|
62
|
+
},
|
|
63
|
+
"InterfaceDeclaration_IOdspError": {
|
|
64
|
+
"forwardCompat": false
|
|
65
|
+
},
|
|
66
|
+
"EnumDeclaration_OdspErrorType": {
|
|
67
|
+
"forwardCompat": false
|
|
68
|
+
}
|
|
69
|
+
}
|
|
60
70
|
}
|
|
61
71
|
}
|
package/src/errors.ts
CHANGED
|
@@ -46,25 +46,33 @@ export enum OdspErrorType {
|
|
|
46
46
|
// SPO can occasionally return 403 for r/w operations on document when there is a fail over to another data center.
|
|
47
47
|
// So to preserve integrity of the data, the data becomes readonly.
|
|
48
48
|
serviceReadOnly = "serviceReadOnly",
|
|
49
|
-
|
|
50
|
-
// The location of file can move on Spo. So if the file location moves and we try to access the older location, then
|
|
51
|
-
// this error is thrown by server to let the client know about the new redirect location.
|
|
52
|
-
locationRedirection = "locationRedirection",
|
|
53
49
|
}
|
|
54
50
|
|
|
55
|
-
|
|
56
|
-
* Base interface for all errors and warnings
|
|
57
|
-
* Superset of IDriverErrorBase, but with Odsp-specific errorType
|
|
58
|
-
*/
|
|
59
|
-
export interface IOdspError extends Omit<IDriverErrorBase, "errorType"> {
|
|
60
|
-
readonly errorType: OdspErrorType;
|
|
51
|
+
export interface IOdspErrorAugmentations {
|
|
61
52
|
/**
|
|
62
53
|
* Server epoch indicates when the file was last modified.
|
|
63
54
|
* Used to detect modifications outside Fluid's services
|
|
64
55
|
*/
|
|
65
56
|
serverEpoch?: string;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* It is the redirection url at which the network call should have been made. It is due to change
|
|
60
|
+
* in site domain of the file on server.
|
|
61
|
+
*/
|
|
62
|
+
redirectLocation?: string;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* It is array of error codes included in error response from server.
|
|
66
|
+
*/
|
|
67
|
+
facetCodes?: string[];
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Base interface for all errors and warnings
|
|
72
|
+
* Superset of IDriverErrorBase, but with Odsp-specific errorType and properties
|
|
73
|
+
*/
|
|
74
|
+
export interface IOdspError extends Omit<IDriverErrorBase, "errorType">, IOdspErrorAugmentations {
|
|
75
|
+
readonly errorType: OdspErrorType;
|
|
66
76
|
}
|
|
67
77
|
|
|
68
|
-
export type OdspError =
|
|
69
|
-
| DriverError
|
|
70
|
-
| IOdspError;
|
|
78
|
+
export type OdspError = IOdspError | (DriverError & IOdspErrorAugmentations);
|
package/src/factory.ts
CHANGED
|
@@ -57,7 +57,7 @@ export interface ICollabSessionOptions {
|
|
|
57
57
|
*/
|
|
58
58
|
unauthenticatedUserDisplayName?: string;
|
|
59
59
|
/**
|
|
60
|
-
* @deprecated - Due to security reasons we will passing the token via Authorization header only.
|
|
60
|
+
* @deprecated - Due to security reasons we will be passing the token via Authorization header only.
|
|
61
61
|
* Value indicating session preference to always pass access token via Authorization header.
|
|
62
62
|
* Default behavior is to pass access token via query parameter unless overall href string
|
|
63
63
|
* length exceeds 2048 characters. Using query param is performance optimization which results
|
package/src/packageVersion.ts
CHANGED