@fluidframework/odsp-driver-definitions 0.49.0-39313 → 0.50.0-41365

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 CHANGED
@@ -26,12 +26,14 @@ export declare enum OdspErrorType {
26
26
  }
27
27
  /**
28
28
  * Base interface for all errors and warnings
29
+ * Superset of IDriverErrorBase, but with Odsp-specific errorType
29
30
  */
30
31
  export interface IOdspError {
31
32
  readonly errorType: OdspErrorType;
32
33
  readonly message: string;
33
34
  canRetry: boolean;
34
35
  online?: string;
36
+ serverEpoch?: string;
35
37
  }
36
38
  export declare type OdspError = DriverError | IOdspError;
37
39
  //# sourceMappingURL=errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAQ,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAElE,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;;GAEG;AACH,MAAM,WAAW,UAAU;IACvB,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,oBAAY,SAAS,GACf,WAAW,GACX,UAAU,CAAC"}
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAQ,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAElE,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;;;GAGG;AACH,MAAM,WAAW,UAAU;IACvB,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,oBAAY,SAAS,GACf,WAAW,GACX,UAAU,CAAC"}
@@ -1 +1 @@
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 } 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\n/**\n * Base interface for all errors and warnings\n */\nexport interface IOdspError {\n readonly errorType: OdspErrorType;\n readonly message: string;\n canRetry: boolean;\n online?: string;\n}\n\nexport type OdspError =\n | DriverError\n | IOdspError;\n"]}
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 } 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\n/**\n * Base interface for all errors and warnings\n * Superset of IDriverErrorBase, but with Odsp-specific errorType\n */\nexport interface IOdspError {\n readonly errorType: OdspErrorType;\n readonly message: string;\n canRetry: boolean;\n online?: string;\n serverEpoch?: string;\n}\n\nexport type OdspError =\n | DriverError\n | IOdspError;\n"]}
package/dist/factory.d.ts CHANGED
@@ -76,5 +76,12 @@ export interface HostStoragePolicy {
76
76
  * If set to true, socket cache are per OdspDocumentService instead of shared across all instances
77
77
  */
78
78
  isolateSocketCache?: boolean;
79
+ /**
80
+ * Enable creation of sharing link along with the creation of file by setting this value to true.
81
+ * If the host provides a 'createLinkType' parameter in the request URL to the container.attach()
82
+ * method, we will request for send the request to ODSP with the same (if the flag is enabled) so
83
+ * that a sharing can be created with the creation of file to save number for round trips made to ODSP.
84
+ */
85
+ enableShareLinkWithCreate?: boolean;
79
86
  }
80
87
  //# sourceMappingURL=factory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,gBAAgB;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAMlB,GAAG,CAAC,EAAE,MAAM,CAAC;IAOb,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAC9B;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,qBAAqB;IAClC;;;OAGG;IACH,8BAA8B,CAAC,EAAE,MAAM,CAAC;CAC3C;AAED,MAAM,WAAW,iBAAiB;IAC9B,eAAe,CAAC,EAAE,gBAAgB,CAAC;IAEnC;;;;;;;;OAQG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAGlC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAE9B;;OAEG;IACH,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAE/B;;OAEG;IACH,cAAc,CAAC,EAAE,qBAAqB,CAAC;IAIvC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC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AAA;CACvC"}
@@ -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\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 // 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 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 * 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"]}
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\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 // 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 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 * 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"]}
@@ -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 = "0.49.0-39313";
8
+ export declare const pkgVersion = "0.50.0-41365";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -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 = "0.49.0-39313";
11
+ exports.pkgVersion = "0.50.0-41365";
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,cAAc,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 = \"0.49.0-39313\";\n"]}
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,cAAc,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 = \"0.50.0-41365\";\n"]}
@@ -8,6 +8,50 @@ export interface IOdspUrlParts {
8
8
  driveId: string;
9
9
  itemId: string;
10
10
  }
11
+ /**
12
+ * Type of shareLink requested/created when creating the file for the first time.
13
+ * At the time of adding this comment (Sept/2021) ODSP only supports creation of CSL links
14
+ * when provided as a request parameter with the /snapshot api call.
15
+ * In future, we can add more types here.
16
+ */
17
+ export declare enum ShareLinkTypes {
18
+ csl = "csl"
19
+ }
20
+ /**
21
+ * Sharing link data created for the ODSP item.
22
+ * Contains information about either sharing link created while creating a new file or
23
+ * a redeemable share link created when loading an existing file
24
+ */
25
+ export interface ShareLinkInfoType {
26
+ /**
27
+ * We create a new file in ODSP with the /snapshot api call. Applications then call separate apis to
28
+ * create a sharing link for that file. To reduce the number of api calls, ODSP now provides a feature
29
+ * where we can create a share link along with creating a file by passing a query parameter called
30
+ * createShareLink. createLink object below saves the data corresponding to this feature.
31
+ */
32
+ createLink?: {
33
+ /**
34
+ * Type of shareLink requested/created when creating the file for the first time.
35
+ * At the time of adding this comment (Sept/2021) ODSP only supports creation of CSL links
36
+ * when provided as a request parameter with the /snapshot api call.
37
+ */
38
+ type?: ShareLinkTypes;
39
+ /**
40
+ * Share link created when the file is created for the first time with /snapshot api call.
41
+ * This link does not require redemption.
42
+ */
43
+ link?: string;
44
+ /**
45
+ * Error message if creation of sharing link fails with /snapshot api call
46
+ */
47
+ error?: any;
48
+ };
49
+ /**
50
+ * This is used to save the network calls while doing trees/latest call as if the client does not have
51
+ * permission then this link can be redeemed for the permissions in the same network call.
52
+ */
53
+ sharingLinkToRedeem?: string;
54
+ }
11
55
  export interface IOdspResolvedUrl extends IFluidResolvedUrl, IOdspUrlParts {
12
56
  type: "fluid";
13
57
  odspResolvedUrl: true;
@@ -22,10 +66,19 @@ export interface IOdspResolvedUrl extends IFluidResolvedUrl, IOdspUrlParts {
22
66
  tokens: {};
23
67
  fileName: string;
24
68
  summarizer: boolean;
69
+ /**
70
+ * @deprecated Use shareLinkInfo.sharingLinkToRedeem instead
71
+ */
25
72
  sharingLinkToRedeem?: string;
26
73
  codeHint?: {
27
74
  containerPackageName?: string;
28
75
  };
29
76
  fileVersion: string | undefined;
77
+ /**
78
+ * Sharing link data created for the ODSP item.
79
+ * Contains information about either sharing link created while creating a new file or
80
+ * a redeemable share link created when loading an existing file
81
+ */
82
+ shareLinkInfo?: ShareLinkInfoType;
30
83
  }
31
84
  //# sourceMappingURL=resolvedUrl.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resolvedUrl.d.ts","sourceRoot":"","sources":["../src/resolvedUrl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAEvE,MAAM,WAAW,aAAa;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,gBAAiB,SAAQ,iBAAiB,EAAE,aAAa;IACtE,IAAI,EAAE,OAAO,CAAC;IACd,eAAe,EAAE,IAAI,CAAC;IAGtB,GAAG,EAAE,MAAM,CAAC;IAGZ,gBAAgB,EAAE,MAAM,CAAC;IAEzB,SAAS,EAAE;QACP,kBAAkB,EAAE,MAAM,CAAC;QAC3B,wBAAwB,EAAE,MAAM,CAAC;QACjC,uBAAuB,EAAE,MAAM,CAAC;QAChC,eAAe,EAAE,MAAM,CAAC;KAC3B,CAAC;IAIF,MAAM,EAAE,EAAE,CAAC;IAEX,QAAQ,EAAE,MAAM,CAAC;IAEjB,UAAU,EAAE,OAAO,CAAC;IAIpB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B,QAAQ,CAAC,EAAE;QAGP,oBAAoB,CAAC,EAAE,MAAM,CAAA;KAChC,CAAA;IAED,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;CACnC"}
1
+ {"version":3,"file":"resolvedUrl.d.ts","sourceRoot":"","sources":["../src/resolvedUrl.ts"],"names":[],"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
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.ShareLinkTypes = void 0;
8
+ /**
9
+ * Type of shareLink requested/created when creating the file for the first time.
10
+ * At the time of adding this comment (Sept/2021) ODSP only supports creation of CSL links
11
+ * when provided as a request parameter with the /snapshot api call.
12
+ * In future, we can add more types here.
13
+ */
14
+ var ShareLinkTypes;
15
+ (function (ShareLinkTypes) {
16
+ ShareLinkTypes["csl"] = "csl";
17
+ })(ShareLinkTypes = exports.ShareLinkTypes || (exports.ShareLinkTypes = {}));
7
18
  //# sourceMappingURL=resolvedUrl.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"resolvedUrl.js","sourceRoot":"","sources":["../src/resolvedUrl.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidResolvedUrl } from \"@fluidframework/driver-definitions\";\n\nexport interface IOdspUrlParts {\n siteUrl: string;\n driveId: string;\n itemId: string;\n}\n\nexport interface IOdspResolvedUrl extends IFluidResolvedUrl, IOdspUrlParts {\n type: \"fluid\";\n odspResolvedUrl: true;\n\n // URL to send to fluid, contains the documentId and the path\n url: string;\n\n // A hashed identifier that is unique to this document\n hashedDocumentId: string;\n\n endpoints: {\n snapshotStorageUrl: string;\n attachmentPOSTStorageUrl: string;\n attachmentGETStorageUrl: string;\n deltaStorageUrl: string,\n };\n\n // Tokens are not obtained by the ODSP driver using the resolve flow, the app must provide them.\n // eslint-disable-next-line @typescript-eslint/ban-types\n tokens: {};\n\n fileName: string;\n\n summarizer: boolean;\n\n // This is used to save the network calls while doing trees/latest call as if the client does not have permission\n // then this link can be redeemed for the permissions in the same network call.\n sharingLinkToRedeem?: string;\n\n codeHint?: {\n // containerPackageName is used for adding the package name to the request headers.\n // This may be used for preloading the container package when loading Fluid content.\n containerPackageName?: string\n }\n\n fileVersion: string | undefined;\n}\n"]}
1
+ {"version":3,"file":"resolvedUrl.js","sourceRoot":"","sources":["../src/resolvedUrl.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAUH;;;;;EAKE;AACF,IAAY,cAEX;AAFD,WAAY,cAAc;IACtB,6BAAW,CAAA;AACf,CAAC,EAFW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAEzB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidResolvedUrl } from \"@fluidframework/driver-definitions\";\n\nexport interface IOdspUrlParts {\n siteUrl: string;\n driveId: string;\n itemId: string;\n}\n\n/**\n * Type of shareLink requested/created when creating the file for the first time.\n * At the time of adding this comment (Sept/2021) ODSP only supports creation of CSL links\n * when provided as a request parameter with the /snapshot api call.\n * In future, we can add more types here.\n*/\nexport enum ShareLinkTypes {\n csl = \"csl\",\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 */\nexport interface ShareLinkInfoType {\n\n /**\n * We create a new file in ODSP with the /snapshot api call. Applications then call separate apis to\n * create a sharing link for that file. To reduce the number of api calls, ODSP now provides a feature\n * where we can create a share link along with creating a file by passing a query parameter called\n * createShareLink. createLink object below saves the data corresponding to this feature.\n */\n createLink?: {\n /**\n * Type of shareLink requested/created when creating the file for the first time.\n * At the time of adding this comment (Sept/2021) ODSP only supports creation of CSL links\n * when provided as a request parameter with the /snapshot api call.\n */\n type?: ShareLinkTypes,\n\n /**\n * Share link created when the file is created for the first time with /snapshot api call.\n * This link does not require redemption.\n */\n link?: string,\n\n /**\n * Error message if creation of sharing link fails with /snapshot api call\n */\n error?: any\n }\n\n /**\n * This is used to save the network calls while doing trees/latest call as if the client does not have\n * permission then this link can be redeemed for the permissions in the same network call.\n */\n sharingLinkToRedeem?: string,\n}\nexport interface IOdspResolvedUrl extends IFluidResolvedUrl, IOdspUrlParts {\n type: \"fluid\";\n odspResolvedUrl: true;\n\n // URL to send to fluid, contains the documentId and the path\n url: string;\n\n // A hashed identifier that is unique to this document\n hashedDocumentId: string;\n\n endpoints: {\n snapshotStorageUrl: string;\n attachmentPOSTStorageUrl: string;\n attachmentGETStorageUrl: string;\n deltaStorageUrl: string,\n };\n\n // Tokens are not obtained by the ODSP driver using the resolve flow, the app must provide them.\n // eslint-disable-next-line @typescript-eslint/ban-types\n tokens: {};\n\n fileName: string;\n\n summarizer: boolean;\n\n /**\n * @deprecated Use shareLinkInfo.sharingLinkToRedeem instead\n */\n sharingLinkToRedeem?: string;\n\n codeHint?: {\n // containerPackageName is used for adding the package name to the request headers.\n // This may be used for preloading the container package when loading Fluid content.\n containerPackageName?: string\n }\n\n fileVersion: string | undefined;\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 */\n shareLinkInfo?: ShareLinkInfoType\n}\n"]}
package/lib/errors.d.ts CHANGED
@@ -26,12 +26,14 @@ export declare enum OdspErrorType {
26
26
  }
27
27
  /**
28
28
  * Base interface for all errors and warnings
29
+ * Superset of IDriverErrorBase, but with Odsp-specific errorType
29
30
  */
30
31
  export interface IOdspError {
31
32
  readonly errorType: OdspErrorType;
32
33
  readonly message: string;
33
34
  canRetry: boolean;
34
35
  online?: string;
36
+ serverEpoch?: string;
35
37
  }
36
38
  export declare type OdspError = DriverError | IOdspError;
37
39
  //# sourceMappingURL=errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAQ,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAElE,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;;GAEG;AACH,MAAM,WAAW,UAAU;IACvB,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,oBAAY,SAAS,GACf,WAAW,GACX,UAAU,CAAC"}
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAQ,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAElE,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;;;GAGG;AACH,MAAM,WAAW,UAAU;IACvB,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,oBAAY,SAAS,GACf,WAAW,GACX,UAAU,CAAC"}
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,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 } 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\n/**\n * Base interface for all errors and warnings\n */\nexport interface IOdspError {\n readonly errorType: OdspErrorType;\n readonly message: string;\n canRetry: boolean;\n online?: string;\n}\n\nexport type OdspError =\n | DriverError\n | IOdspError;\n"]}
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 } 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\n/**\n * Base interface for all errors and warnings\n * Superset of IDriverErrorBase, but with Odsp-specific errorType\n */\nexport interface IOdspError {\n readonly errorType: OdspErrorType;\n readonly message: string;\n canRetry: boolean;\n online?: string;\n serverEpoch?: string;\n}\n\nexport type OdspError =\n | DriverError\n | IOdspError;\n"]}
package/lib/factory.d.ts CHANGED
@@ -76,5 +76,12 @@ export interface HostStoragePolicy {
76
76
  * If set to true, socket cache are per OdspDocumentService instead of shared across all instances
77
77
  */
78
78
  isolateSocketCache?: boolean;
79
+ /**
80
+ * Enable creation of sharing link along with the creation of file by setting this value to true.
81
+ * If the host provides a 'createLinkType' parameter in the request URL to the container.attach()
82
+ * method, we will request for send the request to ODSP with the same (if the flag is enabled) so
83
+ * that a sharing can be created with the creation of file to save number for round trips made to ODSP.
84
+ */
85
+ enableShareLinkWithCreate?: boolean;
79
86
  }
80
87
  //# sourceMappingURL=factory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,gBAAgB;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAMlB,GAAG,CAAC,EAAE,MAAM,CAAC;IAOb,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAC9B;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,qBAAqB;IAClC;;;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B,CAAC,EAAE,OAAO,CAAC;IAGlC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAE9B;;OAEG;IACH,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAE/B;;OAEG;IACH,cAAc,CAAC,EAAE,qBAAqB,CAAC;IAIvC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;OAEG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IAEpC;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B;;;;;OAKG;IACF,yBAAyB,CAAC,EAAE,OAAO,CAAA;CACvC"}
@@ -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\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 // 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 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 * 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"]}
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\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 // 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 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 * 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"]}
@@ -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 = "0.49.0-39313";
8
+ export declare const pkgVersion = "0.50.0-41365";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -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 = "0.49.0-39313";
8
+ export const pkgVersion = "0.50.0-41365";
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,cAAc,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 = \"0.49.0-39313\";\n"]}
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,cAAc,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 = \"0.50.0-41365\";\n"]}
@@ -8,6 +8,50 @@ export interface IOdspUrlParts {
8
8
  driveId: string;
9
9
  itemId: string;
10
10
  }
11
+ /**
12
+ * Type of shareLink requested/created when creating the file for the first time.
13
+ * At the time of adding this comment (Sept/2021) ODSP only supports creation of CSL links
14
+ * when provided as a request parameter with the /snapshot api call.
15
+ * In future, we can add more types here.
16
+ */
17
+ export declare enum ShareLinkTypes {
18
+ csl = "csl"
19
+ }
20
+ /**
21
+ * Sharing link data created for the ODSP item.
22
+ * Contains information about either sharing link created while creating a new file or
23
+ * a redeemable share link created when loading an existing file
24
+ */
25
+ export interface ShareLinkInfoType {
26
+ /**
27
+ * We create a new file in ODSP with the /snapshot api call. Applications then call separate apis to
28
+ * create a sharing link for that file. To reduce the number of api calls, ODSP now provides a feature
29
+ * where we can create a share link along with creating a file by passing a query parameter called
30
+ * createShareLink. createLink object below saves the data corresponding to this feature.
31
+ */
32
+ createLink?: {
33
+ /**
34
+ * Type of shareLink requested/created when creating the file for the first time.
35
+ * At the time of adding this comment (Sept/2021) ODSP only supports creation of CSL links
36
+ * when provided as a request parameter with the /snapshot api call.
37
+ */
38
+ type?: ShareLinkTypes;
39
+ /**
40
+ * Share link created when the file is created for the first time with /snapshot api call.
41
+ * This link does not require redemption.
42
+ */
43
+ link?: string;
44
+ /**
45
+ * Error message if creation of sharing link fails with /snapshot api call
46
+ */
47
+ error?: any;
48
+ };
49
+ /**
50
+ * This is used to save the network calls while doing trees/latest call as if the client does not have
51
+ * permission then this link can be redeemed for the permissions in the same network call.
52
+ */
53
+ sharingLinkToRedeem?: string;
54
+ }
11
55
  export interface IOdspResolvedUrl extends IFluidResolvedUrl, IOdspUrlParts {
12
56
  type: "fluid";
13
57
  odspResolvedUrl: true;
@@ -22,10 +66,19 @@ export interface IOdspResolvedUrl extends IFluidResolvedUrl, IOdspUrlParts {
22
66
  tokens: {};
23
67
  fileName: string;
24
68
  summarizer: boolean;
69
+ /**
70
+ * @deprecated Use shareLinkInfo.sharingLinkToRedeem instead
71
+ */
25
72
  sharingLinkToRedeem?: string;
26
73
  codeHint?: {
27
74
  containerPackageName?: string;
28
75
  };
29
76
  fileVersion: string | undefined;
77
+ /**
78
+ * Sharing link data created for the ODSP item.
79
+ * Contains information about either sharing link created while creating a new file or
80
+ * a redeemable share link created when loading an existing file
81
+ */
82
+ shareLinkInfo?: ShareLinkInfoType;
30
83
  }
31
84
  //# sourceMappingURL=resolvedUrl.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resolvedUrl.d.ts","sourceRoot":"","sources":["../src/resolvedUrl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAEvE,MAAM,WAAW,aAAa;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,gBAAiB,SAAQ,iBAAiB,EAAE,aAAa;IACtE,IAAI,EAAE,OAAO,CAAC;IACd,eAAe,EAAE,IAAI,CAAC;IAGtB,GAAG,EAAE,MAAM,CAAC;IAGZ,gBAAgB,EAAE,MAAM,CAAC;IA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AE;QACP,kBAAkB,EAAE,MAAM,CAAC;QAC3B,wBAAwB,EAAE,MAAM,CAAC;QACjC,uBAAuB,EAAE,MAAM,CAAC;QAChC,eAAe,EAAE,MAAM,CAAC;KAC3B,CAAC;IAIF,MAAM,EAAE,EAAE,CAAC;IAEX,QAAQ,EAAE,MAAM,CAAC;IAEjB,UAAU,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B,QAAQ,CAAC,EAAE;QAGP,oBAAoB,CAAC,EAAE,MAAM,CAAA;KAChC,CAAA;IAED,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAEhC;;;;OAIG;IACH,aAAa,CAAC,EAAE,iBAAiB,CAAA;CACpC"}
@@ -2,5 +2,14 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- export {};
5
+ /**
6
+ * Type of shareLink requested/created when creating the file for the first time.
7
+ * At the time of adding this comment (Sept/2021) ODSP only supports creation of CSL links
8
+ * when provided as a request parameter with the /snapshot api call.
9
+ * In future, we can add more types here.
10
+ */
11
+ export var ShareLinkTypes;
12
+ (function (ShareLinkTypes) {
13
+ ShareLinkTypes["csl"] = "csl";
14
+ })(ShareLinkTypes || (ShareLinkTypes = {}));
6
15
  //# sourceMappingURL=resolvedUrl.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"resolvedUrl.js","sourceRoot":"","sources":["../src/resolvedUrl.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidResolvedUrl } from \"@fluidframework/driver-definitions\";\n\nexport interface IOdspUrlParts {\n siteUrl: string;\n driveId: string;\n itemId: string;\n}\n\nexport interface IOdspResolvedUrl extends IFluidResolvedUrl, IOdspUrlParts {\n type: \"fluid\";\n odspResolvedUrl: true;\n\n // URL to send to fluid, contains the documentId and the path\n url: string;\n\n // A hashed identifier that is unique to this document\n hashedDocumentId: string;\n\n endpoints: {\n snapshotStorageUrl: string;\n attachmentPOSTStorageUrl: string;\n attachmentGETStorageUrl: string;\n deltaStorageUrl: string,\n };\n\n // Tokens are not obtained by the ODSP driver using the resolve flow, the app must provide them.\n // eslint-disable-next-line @typescript-eslint/ban-types\n tokens: {};\n\n fileName: string;\n\n summarizer: boolean;\n\n // This is used to save the network calls while doing trees/latest call as if the client does not have permission\n // then this link can be redeemed for the permissions in the same network call.\n sharingLinkToRedeem?: string;\n\n codeHint?: {\n // containerPackageName is used for adding the package name to the request headers.\n // This may be used for preloading the container package when loading Fluid content.\n containerPackageName?: string\n }\n\n fileVersion: string | undefined;\n}\n"]}
1
+ {"version":3,"file":"resolvedUrl.js","sourceRoot":"","sources":["../src/resolvedUrl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH;;;;;EAKE;AACF,MAAM,CAAN,IAAY,cAEX;AAFD,WAAY,cAAc;IACtB,6BAAW,CAAA;AACf,CAAC,EAFW,cAAc,KAAd,cAAc,QAEzB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidResolvedUrl } from \"@fluidframework/driver-definitions\";\n\nexport interface IOdspUrlParts {\n siteUrl: string;\n driveId: string;\n itemId: string;\n}\n\n/**\n * Type of shareLink requested/created when creating the file for the first time.\n * At the time of adding this comment (Sept/2021) ODSP only supports creation of CSL links\n * when provided as a request parameter with the /snapshot api call.\n * In future, we can add more types here.\n*/\nexport enum ShareLinkTypes {\n csl = \"csl\",\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 */\nexport interface ShareLinkInfoType {\n\n /**\n * We create a new file in ODSP with the /snapshot api call. Applications then call separate apis to\n * create a sharing link for that file. To reduce the number of api calls, ODSP now provides a feature\n * where we can create a share link along with creating a file by passing a query parameter called\n * createShareLink. createLink object below saves the data corresponding to this feature.\n */\n createLink?: {\n /**\n * Type of shareLink requested/created when creating the file for the first time.\n * At the time of adding this comment (Sept/2021) ODSP only supports creation of CSL links\n * when provided as a request parameter with the /snapshot api call.\n */\n type?: ShareLinkTypes,\n\n /**\n * Share link created when the file is created for the first time with /snapshot api call.\n * This link does not require redemption.\n */\n link?: string,\n\n /**\n * Error message if creation of sharing link fails with /snapshot api call\n */\n error?: any\n }\n\n /**\n * This is used to save the network calls while doing trees/latest call as if the client does not have\n * permission then this link can be redeemed for the permissions in the same network call.\n */\n sharingLinkToRedeem?: string,\n}\nexport interface IOdspResolvedUrl extends IFluidResolvedUrl, IOdspUrlParts {\n type: \"fluid\";\n odspResolvedUrl: true;\n\n // URL to send to fluid, contains the documentId and the path\n url: string;\n\n // A hashed identifier that is unique to this document\n hashedDocumentId: string;\n\n endpoints: {\n snapshotStorageUrl: string;\n attachmentPOSTStorageUrl: string;\n attachmentGETStorageUrl: string;\n deltaStorageUrl: string,\n };\n\n // Tokens are not obtained by the ODSP driver using the resolve flow, the app must provide them.\n // eslint-disable-next-line @typescript-eslint/ban-types\n tokens: {};\n\n fileName: string;\n\n summarizer: boolean;\n\n /**\n * @deprecated Use shareLinkInfo.sharingLinkToRedeem instead\n */\n sharingLinkToRedeem?: string;\n\n codeHint?: {\n // containerPackageName is used for adding the package name to the request headers.\n // This may be used for preloading the container package when loading Fluid content.\n containerPackageName?: string\n }\n\n fileVersion: string | undefined;\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 */\n shareLinkInfo?: ShareLinkInfoType\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/odsp-driver-definitions",
3
- "version": "0.49.0-39313",
3
+ "version": "0.50.0-41365",
4
4
  "description": "Socket storage implementation for SPO and ODC",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": "https://github.com/microsoft/FluidFramework",
@@ -30,12 +30,12 @@
30
30
  "tsfmt:fix": "tsfmt --replace"
31
31
  },
32
32
  "dependencies": {
33
- "@fluidframework/driver-definitions": "^0.40.0-39010"
33
+ "@fluidframework/driver-definitions": "^0.40.0"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@fluidframework/build-common": "^0.23.0",
37
37
  "@fluidframework/eslint-config-fluid": "^0.23.0",
38
- "@fluidframework/protocol-definitions": "^0.1025.0-38844",
38
+ "@fluidframework/protocol-definitions": "^0.1025.0",
39
39
  "@microsoft/api-extractor": "^7.16.1",
40
40
  "@typescript-eslint/eslint-plugin": "~4.14.0",
41
41
  "@typescript-eslint/parser": "~4.14.0",
package/src/errors.ts CHANGED
@@ -50,12 +50,14 @@ export enum OdspErrorType {
50
50
 
51
51
  /**
52
52
  * Base interface for all errors and warnings
53
+ * Superset of IDriverErrorBase, but with Odsp-specific errorType
53
54
  */
54
55
  export interface IOdspError {
55
56
  readonly errorType: OdspErrorType;
56
57
  readonly message: string;
57
58
  canRetry: boolean;
58
59
  online?: string;
60
+ serverEpoch?: string;
59
61
  }
60
62
 
61
63
  export type OdspError =
package/src/factory.ts CHANGED
@@ -104,4 +104,12 @@ export interface HostStoragePolicy {
104
104
  * If set to true, socket cache are per OdspDocumentService instead of shared across all instances
105
105
  */
106
106
  isolateSocketCache?: boolean;
107
+
108
+ /**
109
+ * Enable creation of sharing link along with the creation of file by setting this value to true.
110
+ * If the host provides a 'createLinkType' parameter in the request URL to the container.attach()
111
+ * method, we will request for send the request to ODSP with the same (if the flag is enabled) so
112
+ * that a sharing can be created with the creation of file to save number for round trips made to ODSP.
113
+ */
114
+ enableShareLinkWithCreate?: boolean
107
115
  }
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/odsp-driver-definitions";
9
- export const pkgVersion = "0.49.0-39313";
9
+ export const pkgVersion = "0.50.0-41365";
@@ -11,6 +11,54 @@ export interface IOdspUrlParts {
11
11
  itemId: string;
12
12
  }
13
13
 
14
+ /**
15
+ * Type of shareLink requested/created when creating the file for the first time.
16
+ * At the time of adding this comment (Sept/2021) ODSP only supports creation of CSL links
17
+ * when provided as a request parameter with the /snapshot api call.
18
+ * In future, we can add more types here.
19
+ */
20
+ export enum ShareLinkTypes {
21
+ csl = "csl",
22
+ }
23
+ /**
24
+ * Sharing link data created for the ODSP item.
25
+ * Contains information about either sharing link created while creating a new file or
26
+ * a redeemable share link created when loading an existing file
27
+ */
28
+ export interface ShareLinkInfoType {
29
+
30
+ /**
31
+ * We create a new file in ODSP with the /snapshot api call. Applications then call separate apis to
32
+ * create a sharing link for that file. To reduce the number of api calls, ODSP now provides a feature
33
+ * where we can create a share link along with creating a file by passing a query parameter called
34
+ * createShareLink. createLink object below saves the data corresponding to this feature.
35
+ */
36
+ createLink?: {
37
+ /**
38
+ * Type of shareLink requested/created when creating the file for the first time.
39
+ * At the time of adding this comment (Sept/2021) ODSP only supports creation of CSL links
40
+ * when provided as a request parameter with the /snapshot api call.
41
+ */
42
+ type?: ShareLinkTypes,
43
+
44
+ /**
45
+ * Share link created when the file is created for the first time with /snapshot api call.
46
+ * This link does not require redemption.
47
+ */
48
+ link?: string,
49
+
50
+ /**
51
+ * Error message if creation of sharing link fails with /snapshot api call
52
+ */
53
+ error?: any
54
+ }
55
+
56
+ /**
57
+ * This is used to save the network calls while doing trees/latest call as if the client does not have
58
+ * permission then this link can be redeemed for the permissions in the same network call.
59
+ */
60
+ sharingLinkToRedeem?: string,
61
+ }
14
62
  export interface IOdspResolvedUrl extends IFluidResolvedUrl, IOdspUrlParts {
15
63
  type: "fluid";
16
64
  odspResolvedUrl: true;
@@ -36,8 +84,9 @@ export interface IOdspResolvedUrl extends IFluidResolvedUrl, IOdspUrlParts {
36
84
 
37
85
  summarizer: boolean;
38
86
 
39
- // This is used to save the network calls while doing trees/latest call as if the client does not have permission
40
- // then this link can be redeemed for the permissions in the same network call.
87
+ /**
88
+ * @deprecated Use shareLinkInfo.sharingLinkToRedeem instead
89
+ */
41
90
  sharingLinkToRedeem?: string;
42
91
 
43
92
  codeHint?: {
@@ -47,4 +96,11 @@ export interface IOdspResolvedUrl extends IFluidResolvedUrl, IOdspUrlParts {
47
96
  }
48
97
 
49
98
  fileVersion: string | undefined;
99
+
100
+ /**
101
+ * Sharing link data created for the ODSP item.
102
+ * Contains information about either sharing link created while creating a new file or
103
+ * a redeemable share link created when loading an existing file
104
+ */
105
+ shareLinkInfo?: ShareLinkInfoType
50
106
  }