@fluidframework/odsp-driver-definitions 2.0.0-internal.1.0.0.84253 → 2.0.0-internal.1.1.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/factory.d.ts +16 -3
- package/dist/factory.d.ts.map +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/dist/resolvedUrl.d.ts +42 -12
- package/dist/resolvedUrl.d.ts.map +1 -1
- package/dist/resolvedUrl.js +20 -4
- package/dist/resolvedUrl.js.map +1 -1
- package/lib/factory.d.ts +16 -3
- package/lib/factory.d.ts.map +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/lib/resolvedUrl.d.ts +42 -12
- package/lib/resolvedUrl.d.ts.map +1 -1
- package/lib/resolvedUrl.js +19 -3
- package/lib/resolvedUrl.js.map +1 -1
- package/package.json +3 -3
- package/src/factory.ts +17 -3
- package/src/packageVersion.ts +1 -1
- package/src/resolvedUrl.ts +53 -12
package/dist/factory.d.ts
CHANGED
|
@@ -94,11 +94,24 @@ export interface HostStoragePolicy {
|
|
|
94
94
|
*/
|
|
95
95
|
isolateSocketCache?: boolean;
|
|
96
96
|
/**
|
|
97
|
-
*
|
|
97
|
+
* @deprecated Switch to using the new feature gated by enableSingleRequestForShareLinkWithCreate
|
|
98
|
+
* with 'createLinkScope' and 'createLinkRole' is requested to the odsp apis instead of 'createLinkType'.
|
|
99
|
+
* It enables the creation of sharing link along with the creation of file by setting this value to true.
|
|
98
100
|
* If the host provides a 'createLinkType' parameter in the request URL to the container.attach()
|
|
99
|
-
* method, we will
|
|
100
|
-
* that a
|
|
101
|
+
* method, we will send the request to ODSP with the same (if the flag is enabled) so
|
|
102
|
+
* that a share link can be created with the creation of file to save number for round trips made to ODSP.
|
|
103
|
+
* (This flag works independently of enableSingleRequestForShareLinkWithCreate which is used for sharing link
|
|
104
|
+
* requests where 'createLinkScope' is requested.)
|
|
101
105
|
*/
|
|
102
106
|
enableShareLinkWithCreate?: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* Enable creation of sharing link along with the creation of file by setting this value to true.
|
|
109
|
+
* If the host provides a 'createLinkScope' parameter in the request URL to the container.attach()
|
|
110
|
+
* method, we will send the request to ODSP with the same (if the flag is enabled) so
|
|
111
|
+
* that a share link can be created with the creation of file to save number for round trips made to ODSP.
|
|
112
|
+
* (This flag works independently of enableShareLinkWithCreate which was used for old sharing link requests
|
|
113
|
+
* where 'createLinkType' was requested.)
|
|
114
|
+
*/
|
|
115
|
+
enableSingleRequestForShareLinkWithCreate?: boolean;
|
|
103
116
|
}
|
|
104
117
|
//# sourceMappingURL=factory.d.ts.map
|
package/dist/factory.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,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;IACxC;;;;;;;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AAiB;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;IAEvC;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;;OAGG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IAEpC;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B;;;;;;;;;OASG;IACF,yBAAyB,CAAC,EAAE,OAAO,CAAC;IAErC;;;;;;;OAOG;IACH,yCAAyC,CAAC,EAAE,OAAO,CAAC;CACvD"}
|
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 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 *
|
|
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 * @deprecated Switch to using the new feature gated by enableSingleRequestForShareLinkWithCreate\n * with 'createLinkScope' and 'createLinkRole' is requested to the odsp apis instead of 'createLinkType'.\n * It enables the 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 send the request to ODSP with the same (if the flag is enabled) so\n * that a share link can be created with the creation of file to save number for round trips made to ODSP.\n * (This flag works independently of enableSingleRequestForShareLinkWithCreate which is used for sharing link\n * requests where 'createLinkScope' is requested.)\n */\n enableShareLinkWithCreate?: 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 'createLinkScope' parameter in the request URL to the container.attach()\n * method, we will send the request to ODSP with the same (if the flag is enabled) so\n * that a share link can be created with the creation of file to save number for round trips made to ODSP.\n * (This flag works independently of enableShareLinkWithCreate which was used for old sharing link requests\n * where 'createLinkType' was requested.)\n */\n enableSingleRequestForShareLinkWithCreate?: 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 = "2.0.0-internal.1.
|
|
8
|
+
export declare const pkgVersion = "2.0.0-internal.1.1.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 = "2.0.0-internal.1.
|
|
11
|
+
exports.pkgVersion = "2.0.0-internal.1.1.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.1.0\";\n"]}
|
package/dist/resolvedUrl.d.ts
CHANGED
|
@@ -9,14 +9,42 @@ export interface IOdspUrlParts {
|
|
|
9
9
|
itemId: string;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
|
+
* @deprecated Use ISharingLinkKind type instead.
|
|
12
13
|
* 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
14
|
*/
|
|
17
15
|
export declare enum ShareLinkTypes {
|
|
18
16
|
csl = "csl"
|
|
19
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Sharing scope of the share links created for a file.
|
|
20
|
+
*/
|
|
21
|
+
export declare enum SharingLinkScope {
|
|
22
|
+
organization = "organization",
|
|
23
|
+
users = "users",
|
|
24
|
+
anonymous = "anonymous",
|
|
25
|
+
default = "default"
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* View/edit permission role for a sharing link.
|
|
29
|
+
*/
|
|
30
|
+
export declare enum SharingLinkRole {
|
|
31
|
+
view = "view",
|
|
32
|
+
edit = "edit"
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Defines the permissions scope for a share link requested to be created during the creation the file in ODSP.
|
|
36
|
+
* Providing these properties to the /snapshot api will also create and return the requested kind of sharing link.
|
|
37
|
+
*/
|
|
38
|
+
export interface ISharingLinkKind {
|
|
39
|
+
scope: SharingLinkScope;
|
|
40
|
+
role?: SharingLinkRole;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Sharing link data received from the /snapshot api response.
|
|
44
|
+
*/
|
|
45
|
+
export interface ISharingLink extends ISharingLinkKind {
|
|
46
|
+
webUrl: string;
|
|
47
|
+
}
|
|
20
48
|
/**
|
|
21
49
|
* Sharing link data created for the ODSP item.
|
|
22
50
|
* Contains information about either sharing link created while creating a new file or
|
|
@@ -24,27 +52,29 @@ export declare enum ShareLinkTypes {
|
|
|
24
52
|
*/
|
|
25
53
|
export interface ShareLinkInfoType {
|
|
26
54
|
/**
|
|
27
|
-
* We create a new file in ODSP with the /snapshot api call. Applications then
|
|
28
|
-
* create a sharing link for that file. To reduce the number of
|
|
55
|
+
* We create a new file in ODSP with the /snapshot api call. Applications then need to make a separate apis call to
|
|
56
|
+
* create a sharing link for that file. To reduce the number of network calls, ODSP now provides a feature
|
|
29
57
|
* 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
|
|
58
|
+
* createShareLink (deprecated) or createLinkScope and createLinkRole. createLink object below saves the information
|
|
59
|
+
* from the /snapshot api response.
|
|
31
60
|
*/
|
|
32
61
|
createLink?: {
|
|
33
62
|
/**
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
63
|
+
* @deprecated
|
|
64
|
+
* Type of shareLink requested/created when creating the file for the first time. The 'type' property here
|
|
65
|
+
* represents the type of sharing link requested.
|
|
66
|
+
* Will be deprecated soon. Type of sharing link will be present in the link:ISharingLink property below.
|
|
37
67
|
*/
|
|
38
|
-
type?: ShareLinkTypes;
|
|
68
|
+
type?: ShareLinkTypes | ISharingLinkKind;
|
|
39
69
|
/**
|
|
40
70
|
* Share link created when the file is created for the first time with /snapshot api call.
|
|
41
|
-
* This link does not require redemption.
|
|
42
71
|
*/
|
|
43
|
-
link?: string;
|
|
72
|
+
link?: string | ISharingLink;
|
|
44
73
|
/**
|
|
45
74
|
* Error message if creation of sharing link fails with /snapshot api call
|
|
46
75
|
*/
|
|
47
76
|
error?: any;
|
|
77
|
+
shareId?: string;
|
|
48
78
|
};
|
|
49
79
|
/**
|
|
50
80
|
* This is used to save the network calls while doing trees/latest call as if the client does not have
|
|
@@ -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
|
|
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;I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3B,CAAC;IAIF,MAAM,EAAE,EAAE,CAAC;IAEX,QAAQ,EAAE,MAAM,CAAC;IAEjB,UAAU,EAAE,OAAO,CAAC;IAEpB,QAAQ,CAAC,EAAE;QAGP,oBAAoB,CAAC,EAAE,MAAM,CAAC;KACjC,CAAC;IAEF,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAEhC;;;;OAIG;IACH,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAElC,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC/B"}
|
package/dist/resolvedUrl.js
CHANGED
|
@@ -4,15 +4,31 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.ShareLinkTypes = void 0;
|
|
7
|
+
exports.SharingLinkRole = exports.SharingLinkScope = exports.ShareLinkTypes = void 0;
|
|
8
8
|
/**
|
|
9
|
+
* @deprecated Use ISharingLinkKind type instead.
|
|
9
10
|
* 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
11
|
*/
|
|
14
12
|
var ShareLinkTypes;
|
|
15
13
|
(function (ShareLinkTypes) {
|
|
16
14
|
ShareLinkTypes["csl"] = "csl";
|
|
17
15
|
})(ShareLinkTypes = exports.ShareLinkTypes || (exports.ShareLinkTypes = {}));
|
|
16
|
+
/**
|
|
17
|
+
* Sharing scope of the share links created for a file.
|
|
18
|
+
*/
|
|
19
|
+
var SharingLinkScope;
|
|
20
|
+
(function (SharingLinkScope) {
|
|
21
|
+
SharingLinkScope["organization"] = "organization";
|
|
22
|
+
SharingLinkScope["users"] = "users";
|
|
23
|
+
SharingLinkScope["anonymous"] = "anonymous";
|
|
24
|
+
SharingLinkScope["default"] = "default";
|
|
25
|
+
})(SharingLinkScope = exports.SharingLinkScope || (exports.SharingLinkScope = {}));
|
|
26
|
+
/**
|
|
27
|
+
* View/edit permission role for a sharing link.
|
|
28
|
+
*/
|
|
29
|
+
var SharingLinkRole;
|
|
30
|
+
(function (SharingLinkRole) {
|
|
31
|
+
SharingLinkRole["view"] = "view";
|
|
32
|
+
SharingLinkRole["edit"] = "edit";
|
|
33
|
+
})(SharingLinkRole = exports.SharingLinkRole || (exports.SharingLinkRole = {}));
|
|
18
34
|
//# sourceMappingURL=resolvedUrl.js.map
|
package/dist/resolvedUrl.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolvedUrl.js","sourceRoot":"","sources":["../src/resolvedUrl.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAUH
|
|
1
|
+
{"version":3,"file":"resolvedUrl.js","sourceRoot":"","sources":["../src/resolvedUrl.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAUH;;;EAGE;AACF,IAAY,cAEX;AAFD,WAAY,cAAc;IACtB,6BAAW,CAAA;AACf,CAAC,EAFW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAEzB;AAED;;EAEE;AACF,IAAY,gBAKX;AALD,WAAY,gBAAgB;IACxB,iDAA6B,CAAA;IAC7B,mCAAe,CAAA;IACf,2CAAuB,CAAA;IACvB,uCAAmB,CAAA;AACvB,CAAC,EALW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAK3B;AAED;;GAEG;AACH,IAAY,eAGX;AAHD,WAAY,eAAe;IACvB,gCAAa,CAAA;IACb,gCAAa,CAAA;AACjB,CAAC,EAHW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAG1B","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 * @deprecated Use ISharingLinkKind type instead.\n * Type of shareLink requested/created when creating the file for the first time.\n*/\nexport enum ShareLinkTypes {\n csl = \"csl\",\n}\n\n/**\n * Sharing scope of the share links created for a file.\n*/\nexport enum SharingLinkScope {\n organization = \"organization\",\n users = \"users\",\n anonymous = \"anonymous\",\n default = \"default\",\n}\n\n/**\n * View/edit permission role for a sharing link.\n */\nexport enum SharingLinkRole {\n view = \"view\",\n edit = \"edit\",\n}\n\n/**\n * Defines the permissions scope for a share link requested to be created during the creation the file in ODSP.\n * Providing these properties to the /snapshot api will also create and return the requested kind of sharing link.\n*/\nexport interface ISharingLinkKind {\n scope: SharingLinkScope;\n /*\n * If this parameter is not provided, the API will default to \"edit\" links (provided\n * a valid createLinkScope setting is given).\n */\n role?: SharingLinkRole;\n}\n\n/**\n * Sharing link data received from the /snapshot api response.\n */\nexport interface ISharingLink extends ISharingLinkKind {\n webUrl: string;\n}\n\n/**\n * Sharing link data created for the ODSP item.\n * Contains information about either sharing link created while creating a new file or\n * a redeemable share link created when loading an existing file\n */\nexport interface ShareLinkInfoType {\n\n /**\n * We create a new file in ODSP with the /snapshot api call. Applications then need to make a separate apis call to\n * create a sharing link for that file. To reduce the number of network 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 (deprecated) or createLinkScope and createLinkRole. createLink object below saves the information\n * from the /snapshot api response.\n */\n createLink?: {\n /**\n * @deprecated\n * Type of shareLink requested/created when creating the file for the first time. The 'type' property here\n * represents the type of sharing link requested.\n * Will be deprecated soon. Type of sharing link will be present in the link:ISharingLink property below.\n */\n type?: ShareLinkTypes | ISharingLinkKind;\n\n /**\n * Share link created when the file is created for the first time with /snapshot api call.\n */\n link?: string | ISharingLink;\n\n /**\n * Error message if creation of sharing link fails with /snapshot api call\n */\n error?: any;\n\n shareId?: string;\n\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 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 isClpCompliantApp?: boolean;\n}\n"]}
|
package/lib/factory.d.ts
CHANGED
|
@@ -94,11 +94,24 @@ export interface HostStoragePolicy {
|
|
|
94
94
|
*/
|
|
95
95
|
isolateSocketCache?: boolean;
|
|
96
96
|
/**
|
|
97
|
-
*
|
|
97
|
+
* @deprecated Switch to using the new feature gated by enableSingleRequestForShareLinkWithCreate
|
|
98
|
+
* with 'createLinkScope' and 'createLinkRole' is requested to the odsp apis instead of 'createLinkType'.
|
|
99
|
+
* It enables the creation of sharing link along with the creation of file by setting this value to true.
|
|
98
100
|
* If the host provides a 'createLinkType' parameter in the request URL to the container.attach()
|
|
99
|
-
* method, we will
|
|
100
|
-
* that a
|
|
101
|
+
* method, we will send the request to ODSP with the same (if the flag is enabled) so
|
|
102
|
+
* that a share link can be created with the creation of file to save number for round trips made to ODSP.
|
|
103
|
+
* (This flag works independently of enableSingleRequestForShareLinkWithCreate which is used for sharing link
|
|
104
|
+
* requests where 'createLinkScope' is requested.)
|
|
101
105
|
*/
|
|
102
106
|
enableShareLinkWithCreate?: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* Enable creation of sharing link along with the creation of file by setting this value to true.
|
|
109
|
+
* If the host provides a 'createLinkScope' parameter in the request URL to the container.attach()
|
|
110
|
+
* method, we will send the request to ODSP with the same (if the flag is enabled) so
|
|
111
|
+
* that a share link can be created with the creation of file to save number for round trips made to ODSP.
|
|
112
|
+
* (This flag works independently of enableShareLinkWithCreate which was used for old sharing link requests
|
|
113
|
+
* where 'createLinkType' was requested.)
|
|
114
|
+
*/
|
|
115
|
+
enableSingleRequestForShareLinkWithCreate?: boolean;
|
|
103
116
|
}
|
|
104
117
|
//# sourceMappingURL=factory.d.ts.map
|
package/lib/factory.d.ts.map
CHANGED
|
@@ -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;IACxC;;;;;;;;;OASG;IACH,sCAAsC,CAAC,EAAE,OAAO,CAAC;CACpD;AAED,MAAM,WAAW,iBAAiB;IAC9B,eAAe,CAAC,EAAE,gBAAgB,CAAC;IAEnC;;;;;;;;OAQG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAGlC,YAAY,CAAC,EAAE,MAAM,CAAC;IACt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E,iBAAiB,CAAC;IAE/B;;OAEG;IACH,cAAc,CAAC,EAAE,qBAAqB,CAAC;IAEvC;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;;OAGG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IAEpC;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B;;;;;;;;;OASG;IACF,yBAAyB,CAAC,EAAE,OAAO,CAAC;IAErC;;;;;;;OAOG;IACH,yCAAyC,CAAC,EAAE,OAAO,CAAC;CACvD"}
|
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 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 *
|
|
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 * @deprecated Switch to using the new feature gated by enableSingleRequestForShareLinkWithCreate\n * with 'createLinkScope' and 'createLinkRole' is requested to the odsp apis instead of 'createLinkType'.\n * It enables the 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 send the request to ODSP with the same (if the flag is enabled) so\n * that a share link can be created with the creation of file to save number for round trips made to ODSP.\n * (This flag works independently of enableSingleRequestForShareLinkWithCreate which is used for sharing link\n * requests where 'createLinkScope' is requested.)\n */\n enableShareLinkWithCreate?: 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 'createLinkScope' parameter in the request URL to the container.attach()\n * method, we will send the request to ODSP with the same (if the flag is enabled) so\n * that a share link can be created with the creation of file to save number for round trips made to ODSP.\n * (This flag works independently of enableShareLinkWithCreate which was used for old sharing link requests\n * where 'createLinkType' was requested.)\n */\n enableSingleRequestForShareLinkWithCreate?: 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 = "2.0.0-internal.1.
|
|
8
|
+
export declare const pkgVersion = "2.0.0-internal.1.1.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 = "2.0.0-internal.1.
|
|
8
|
+
export const pkgVersion = "2.0.0-internal.1.1.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.1.0\";\n"]}
|
package/lib/resolvedUrl.d.ts
CHANGED
|
@@ -9,14 +9,42 @@ export interface IOdspUrlParts {
|
|
|
9
9
|
itemId: string;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
|
+
* @deprecated Use ISharingLinkKind type instead.
|
|
12
13
|
* 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
14
|
*/
|
|
17
15
|
export declare enum ShareLinkTypes {
|
|
18
16
|
csl = "csl"
|
|
19
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Sharing scope of the share links created for a file.
|
|
20
|
+
*/
|
|
21
|
+
export declare enum SharingLinkScope {
|
|
22
|
+
organization = "organization",
|
|
23
|
+
users = "users",
|
|
24
|
+
anonymous = "anonymous",
|
|
25
|
+
default = "default"
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* View/edit permission role for a sharing link.
|
|
29
|
+
*/
|
|
30
|
+
export declare enum SharingLinkRole {
|
|
31
|
+
view = "view",
|
|
32
|
+
edit = "edit"
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Defines the permissions scope for a share link requested to be created during the creation the file in ODSP.
|
|
36
|
+
* Providing these properties to the /snapshot api will also create and return the requested kind of sharing link.
|
|
37
|
+
*/
|
|
38
|
+
export interface ISharingLinkKind {
|
|
39
|
+
scope: SharingLinkScope;
|
|
40
|
+
role?: SharingLinkRole;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Sharing link data received from the /snapshot api response.
|
|
44
|
+
*/
|
|
45
|
+
export interface ISharingLink extends ISharingLinkKind {
|
|
46
|
+
webUrl: string;
|
|
47
|
+
}
|
|
20
48
|
/**
|
|
21
49
|
* Sharing link data created for the ODSP item.
|
|
22
50
|
* Contains information about either sharing link created while creating a new file or
|
|
@@ -24,27 +52,29 @@ export declare enum ShareLinkTypes {
|
|
|
24
52
|
*/
|
|
25
53
|
export interface ShareLinkInfoType {
|
|
26
54
|
/**
|
|
27
|
-
* We create a new file in ODSP with the /snapshot api call. Applications then
|
|
28
|
-
* create a sharing link for that file. To reduce the number of
|
|
55
|
+
* We create a new file in ODSP with the /snapshot api call. Applications then need to make a separate apis call to
|
|
56
|
+
* create a sharing link for that file. To reduce the number of network calls, ODSP now provides a feature
|
|
29
57
|
* 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
|
|
58
|
+
* createShareLink (deprecated) or createLinkScope and createLinkRole. createLink object below saves the information
|
|
59
|
+
* from the /snapshot api response.
|
|
31
60
|
*/
|
|
32
61
|
createLink?: {
|
|
33
62
|
/**
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
63
|
+
* @deprecated
|
|
64
|
+
* Type of shareLink requested/created when creating the file for the first time. The 'type' property here
|
|
65
|
+
* represents the type of sharing link requested.
|
|
66
|
+
* Will be deprecated soon. Type of sharing link will be present in the link:ISharingLink property below.
|
|
37
67
|
*/
|
|
38
|
-
type?: ShareLinkTypes;
|
|
68
|
+
type?: ShareLinkTypes | ISharingLinkKind;
|
|
39
69
|
/**
|
|
40
70
|
* Share link created when the file is created for the first time with /snapshot api call.
|
|
41
|
-
* This link does not require redemption.
|
|
42
71
|
*/
|
|
43
|
-
link?: string;
|
|
72
|
+
link?: string | ISharingLink;
|
|
44
73
|
/**
|
|
45
74
|
* Error message if creation of sharing link fails with /snapshot api call
|
|
46
75
|
*/
|
|
47
76
|
error?: any;
|
|
77
|
+
shareId?: string;
|
|
48
78
|
};
|
|
49
79
|
/**
|
|
50
80
|
* This is used to save the network calls while doing trees/latest call as if the client does not have
|
package/lib/resolvedUrl.d.ts.map
CHANGED
|
@@ -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
|
|
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;;;EAGE;AACF,oBAAY,cAAc;IACtB,GAAG,QAAQ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AAC,EAAE,MAAM,CAAC;KACjC,CAAC;IAEF,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAEhC;;;;OAIG;IACH,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAElC,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC/B"}
|
package/lib/resolvedUrl.js
CHANGED
|
@@ -3,13 +3,29 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
+
* @deprecated Use ISharingLinkKind type instead.
|
|
6
7
|
* 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
8
|
*/
|
|
11
9
|
export var ShareLinkTypes;
|
|
12
10
|
(function (ShareLinkTypes) {
|
|
13
11
|
ShareLinkTypes["csl"] = "csl";
|
|
14
12
|
})(ShareLinkTypes || (ShareLinkTypes = {}));
|
|
13
|
+
/**
|
|
14
|
+
* Sharing scope of the share links created for a file.
|
|
15
|
+
*/
|
|
16
|
+
export var SharingLinkScope;
|
|
17
|
+
(function (SharingLinkScope) {
|
|
18
|
+
SharingLinkScope["organization"] = "organization";
|
|
19
|
+
SharingLinkScope["users"] = "users";
|
|
20
|
+
SharingLinkScope["anonymous"] = "anonymous";
|
|
21
|
+
SharingLinkScope["default"] = "default";
|
|
22
|
+
})(SharingLinkScope || (SharingLinkScope = {}));
|
|
23
|
+
/**
|
|
24
|
+
* View/edit permission role for a sharing link.
|
|
25
|
+
*/
|
|
26
|
+
export var SharingLinkRole;
|
|
27
|
+
(function (SharingLinkRole) {
|
|
28
|
+
SharingLinkRole["view"] = "view";
|
|
29
|
+
SharingLinkRole["edit"] = "edit";
|
|
30
|
+
})(SharingLinkRole || (SharingLinkRole = {}));
|
|
15
31
|
//# sourceMappingURL=resolvedUrl.js.map
|
package/lib/resolvedUrl.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolvedUrl.js","sourceRoot":"","sources":["../src/resolvedUrl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH
|
|
1
|
+
{"version":3,"file":"resolvedUrl.js","sourceRoot":"","sources":["../src/resolvedUrl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH;;;EAGE;AACF,MAAM,CAAN,IAAY,cAEX;AAFD,WAAY,cAAc;IACtB,6BAAW,CAAA;AACf,CAAC,EAFW,cAAc,KAAd,cAAc,QAEzB;AAED;;EAEE;AACF,MAAM,CAAN,IAAY,gBAKX;AALD,WAAY,gBAAgB;IACxB,iDAA6B,CAAA;IAC7B,mCAAe,CAAA;IACf,2CAAuB,CAAA;IACvB,uCAAmB,CAAA;AACvB,CAAC,EALW,gBAAgB,KAAhB,gBAAgB,QAK3B;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,eAGX;AAHD,WAAY,eAAe;IACvB,gCAAa,CAAA;IACb,gCAAa,CAAA;AACjB,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B","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 * @deprecated Use ISharingLinkKind type instead.\n * Type of shareLink requested/created when creating the file for the first time.\n*/\nexport enum ShareLinkTypes {\n csl = \"csl\",\n}\n\n/**\n * Sharing scope of the share links created for a file.\n*/\nexport enum SharingLinkScope {\n organization = \"organization\",\n users = \"users\",\n anonymous = \"anonymous\",\n default = \"default\",\n}\n\n/**\n * View/edit permission role for a sharing link.\n */\nexport enum SharingLinkRole {\n view = \"view\",\n edit = \"edit\",\n}\n\n/**\n * Defines the permissions scope for a share link requested to be created during the creation the file in ODSP.\n * Providing these properties to the /snapshot api will also create and return the requested kind of sharing link.\n*/\nexport interface ISharingLinkKind {\n scope: SharingLinkScope;\n /*\n * If this parameter is not provided, the API will default to \"edit\" links (provided\n * a valid createLinkScope setting is given).\n */\n role?: SharingLinkRole;\n}\n\n/**\n * Sharing link data received from the /snapshot api response.\n */\nexport interface ISharingLink extends ISharingLinkKind {\n webUrl: string;\n}\n\n/**\n * Sharing link data created for the ODSP item.\n * Contains information about either sharing link created while creating a new file or\n * a redeemable share link created when loading an existing file\n */\nexport interface ShareLinkInfoType {\n\n /**\n * We create a new file in ODSP with the /snapshot api call. Applications then need to make a separate apis call to\n * create a sharing link for that file. To reduce the number of network 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 (deprecated) or createLinkScope and createLinkRole. createLink object below saves the information\n * from the /snapshot api response.\n */\n createLink?: {\n /**\n * @deprecated\n * Type of shareLink requested/created when creating the file for the first time. The 'type' property here\n * represents the type of sharing link requested.\n * Will be deprecated soon. Type of sharing link will be present in the link:ISharingLink property below.\n */\n type?: ShareLinkTypes | ISharingLinkKind;\n\n /**\n * Share link created when the file is created for the first time with /snapshot api call.\n */\n link?: string | ISharingLink;\n\n /**\n * Error message if creation of sharing link fails with /snapshot api call\n */\n error?: any;\n\n shareId?: string;\n\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 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 isClpCompliantApp?: boolean;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/odsp-driver-definitions",
|
|
3
|
-
"version": "2.0.0-internal.1.
|
|
3
|
+
"version": "2.0.0-internal.1.1.0",
|
|
4
4
|
"description": "Socket storage implementation for SPO and ODC",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"typetests:gen": "fluid-type-validator -g -d ."
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@fluidframework/driver-definitions": "2.0.0-internal.1.
|
|
39
|
+
"@fluidframework/driver-definitions": "^2.0.0-internal.1.1.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@fluidframework/build-common": "^0.24.0",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@microsoft/api-extractor": "^7.22.2",
|
|
48
48
|
"@rushstack/eslint-config": "^2.5.1",
|
|
49
49
|
"concurrently": "^6.2.0",
|
|
50
|
-
"copyfiles": "^2.1
|
|
50
|
+
"copyfiles": "^2.4.1",
|
|
51
51
|
"cross-env": "^7.0.2",
|
|
52
52
|
"eslint": "~8.6.0",
|
|
53
53
|
"rimraf": "^2.6.2",
|
package/src/factory.ts
CHANGED
|
@@ -121,10 +121,24 @@ export interface HostStoragePolicy {
|
|
|
121
121
|
isolateSocketCache?: boolean;
|
|
122
122
|
|
|
123
123
|
/**
|
|
124
|
-
*
|
|
124
|
+
* @deprecated Switch to using the new feature gated by enableSingleRequestForShareLinkWithCreate
|
|
125
|
+
* with 'createLinkScope' and 'createLinkRole' is requested to the odsp apis instead of 'createLinkType'.
|
|
126
|
+
* It enables the creation of sharing link along with the creation of file by setting this value to true.
|
|
125
127
|
* If the host provides a 'createLinkType' parameter in the request URL to the container.attach()
|
|
126
|
-
* method, we will
|
|
127
|
-
* that a
|
|
128
|
+
* method, we will send the request to ODSP with the same (if the flag is enabled) so
|
|
129
|
+
* that a share link can be created with the creation of file to save number for round trips made to ODSP.
|
|
130
|
+
* (This flag works independently of enableSingleRequestForShareLinkWithCreate which is used for sharing link
|
|
131
|
+
* requests where 'createLinkScope' is requested.)
|
|
128
132
|
*/
|
|
129
133
|
enableShareLinkWithCreate?: boolean;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Enable creation of sharing link along with the creation of file by setting this value to true.
|
|
137
|
+
* If the host provides a 'createLinkScope' parameter in the request URL to the container.attach()
|
|
138
|
+
* method, we will send the request to ODSP with the same (if the flag is enabled) so
|
|
139
|
+
* that a share link can be created with the creation of file to save number for round trips made to ODSP.
|
|
140
|
+
* (This flag works independently of enableShareLinkWithCreate which was used for old sharing link requests
|
|
141
|
+
* where 'createLinkType' was requested.)
|
|
142
|
+
*/
|
|
143
|
+
enableSingleRequestForShareLinkWithCreate?: boolean;
|
|
130
144
|
}
|
package/src/packageVersion.ts
CHANGED
package/src/resolvedUrl.ts
CHANGED
|
@@ -12,14 +12,51 @@ export interface IOdspUrlParts {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
+
* @deprecated Use ISharingLinkKind type instead.
|
|
15
16
|
* 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
17
|
*/
|
|
20
18
|
export enum ShareLinkTypes {
|
|
21
19
|
csl = "csl",
|
|
22
20
|
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Sharing scope of the share links created for a file.
|
|
24
|
+
*/
|
|
25
|
+
export enum SharingLinkScope {
|
|
26
|
+
organization = "organization",
|
|
27
|
+
users = "users",
|
|
28
|
+
anonymous = "anonymous",
|
|
29
|
+
default = "default",
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* View/edit permission role for a sharing link.
|
|
34
|
+
*/
|
|
35
|
+
export enum SharingLinkRole {
|
|
36
|
+
view = "view",
|
|
37
|
+
edit = "edit",
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Defines the permissions scope for a share link requested to be created during the creation the file in ODSP.
|
|
42
|
+
* Providing these properties to the /snapshot api will also create and return the requested kind of sharing link.
|
|
43
|
+
*/
|
|
44
|
+
export interface ISharingLinkKind {
|
|
45
|
+
scope: SharingLinkScope;
|
|
46
|
+
/*
|
|
47
|
+
* If this parameter is not provided, the API will default to "edit" links (provided
|
|
48
|
+
* a valid createLinkScope setting is given).
|
|
49
|
+
*/
|
|
50
|
+
role?: SharingLinkRole;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Sharing link data received from the /snapshot api response.
|
|
55
|
+
*/
|
|
56
|
+
export interface ISharingLink extends ISharingLinkKind {
|
|
57
|
+
webUrl: string;
|
|
58
|
+
}
|
|
59
|
+
|
|
23
60
|
/**
|
|
24
61
|
* Sharing link data created for the ODSP item.
|
|
25
62
|
* Contains information about either sharing link created while creating a new file or
|
|
@@ -28,29 +65,33 @@ export enum ShareLinkTypes {
|
|
|
28
65
|
export interface ShareLinkInfoType {
|
|
29
66
|
|
|
30
67
|
/**
|
|
31
|
-
* We create a new file in ODSP with the /snapshot api call. Applications then
|
|
32
|
-
* create a sharing link for that file. To reduce the number of
|
|
68
|
+
* We create a new file in ODSP with the /snapshot api call. Applications then need to make a separate apis call to
|
|
69
|
+
* create a sharing link for that file. To reduce the number of network calls, ODSP now provides a feature
|
|
33
70
|
* 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
|
|
71
|
+
* createShareLink (deprecated) or createLinkScope and createLinkRole. createLink object below saves the information
|
|
72
|
+
* from the /snapshot api response.
|
|
35
73
|
*/
|
|
36
74
|
createLink?: {
|
|
37
75
|
/**
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
76
|
+
* @deprecated
|
|
77
|
+
* Type of shareLink requested/created when creating the file for the first time. The 'type' property here
|
|
78
|
+
* represents the type of sharing link requested.
|
|
79
|
+
* Will be deprecated soon. Type of sharing link will be present in the link:ISharingLink property below.
|
|
41
80
|
*/
|
|
42
|
-
type?: ShareLinkTypes;
|
|
81
|
+
type?: ShareLinkTypes | ISharingLinkKind;
|
|
43
82
|
|
|
44
83
|
/**
|
|
45
84
|
* Share link created when the file is created for the first time with /snapshot api call.
|
|
46
|
-
* This link does not require redemption.
|
|
47
85
|
*/
|
|
48
|
-
link?: string;
|
|
86
|
+
link?: string | ISharingLink;
|
|
49
87
|
|
|
50
88
|
/**
|
|
51
89
|
* Error message if creation of sharing link fails with /snapshot api call
|
|
52
90
|
*/
|
|
53
91
|
error?: any;
|
|
92
|
+
|
|
93
|
+
shareId?: string;
|
|
94
|
+
|
|
54
95
|
};
|
|
55
96
|
|
|
56
97
|
/**
|