@fluidframework/odsp-driver-definitions 0.54.2 → 0.56.0-49831
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +1 -1
- package/README.md +3 -1
- package/dist/factory.d.ts +10 -0
- package/dist/factory.d.ts.map +1 -1
- package/dist/factory.js.map +1 -1
- package/dist/odspCache.d.ts +3 -1
- package/dist/odspCache.d.ts.map +1 -1
- package/dist/odspCache.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 +1 -4
- package/dist/resolvedUrl.d.ts.map +1 -1
- package/dist/resolvedUrl.js.map +1 -1
- package/lib/factory.d.ts +10 -0
- package/lib/factory.d.ts.map +1 -1
- package/lib/factory.js.map +1 -1
- package/lib/odspCache.d.ts +3 -1
- package/lib/odspCache.d.ts.map +1 -1
- package/lib/odspCache.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 +1 -4
- package/lib/resolvedUrl.d.ts.map +1 -1
- package/lib/resolvedUrl.js.map +1 -1
- package/package.json +12 -11
- package/src/factory.ts +10 -0
- package/src/odspCache.ts +3 -1
- package/src/packageVersion.ts +1 -1
- package/src/resolvedUrl.ts +3 -6
package/.eslintrc.js
CHANGED
package/README.md
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
# @fluidframework/odsp-driver-definitions
|
|
2
2
|
|
|
3
|
-
Definitions for @fluidframework/odsp-driver
|
|
3
|
+
Definitions for @fluidframework/odsp-driver package.
|
|
4
4
|
Currently it contains all the contracts for driver factory.
|
|
5
|
+
|
|
6
|
+
Though the host is responsible for implementing the IPersistedCache, snapshot cached entries will be disregarded if they are older than 2 days, which is based on `defaultCacheExpiryTimeoutMs`. The ODSP driver will delete all entries if it interacts with such a file.
|
package/dist/factory.d.ts
CHANGED
|
@@ -40,6 +40,16 @@ export interface ICollabSessionOptions {
|
|
|
40
40
|
* This name will be used in attribution associated with edits made by such user.
|
|
41
41
|
*/
|
|
42
42
|
unauthenticatedUserDisplayName?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Value indicating session preference to always pass access token via Authorization header.
|
|
45
|
+
* Default behavior is to pass access token via query parameter unless overall href string
|
|
46
|
+
* length exceeds 2048 characters. Using query param is performance optimization which results
|
|
47
|
+
* in ODSP XHR request being treated as 'simple' request which do not require OPTIONS call to
|
|
48
|
+
* validate CORS. However, not all ODSP implementations understand this optimization.
|
|
49
|
+
* For instance, auth layer on Converged stack will fail request with access token passed via
|
|
50
|
+
* query param.
|
|
51
|
+
*/
|
|
52
|
+
forceAccessTokenViaAuthorizationHeader?: boolean;
|
|
43
53
|
}
|
|
44
54
|
export interface HostStoragePolicy {
|
|
45
55
|
snapshotOptions?: ISnapshotOptions;
|
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;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;CACvC"}
|
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\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"]}
|
|
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 * 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 // 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"]}
|
package/dist/odspCache.d.ts
CHANGED
|
@@ -54,7 +54,9 @@ export interface ICacheEntry extends IEntry {
|
|
|
54
54
|
/**
|
|
55
55
|
* Persistent cache. This interface can be implemented by the host to provide durable caching
|
|
56
56
|
* across sessions. If not provided at driver factory construction, factory will use in-memory
|
|
57
|
-
* cache implementation that does not survive across sessions.
|
|
57
|
+
* cache implementation that does not survive across sessions. Snapshot entires stored in the
|
|
58
|
+
* IPersistedCache will be considered stale and removed after 2 days. Read the README for more
|
|
59
|
+
* information.
|
|
58
60
|
*/
|
|
59
61
|
export interface IPersistedCache {
|
|
60
62
|
/**
|
package/dist/odspCache.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odspCache.d.ts","sourceRoot":"","sources":["../src/odspCache.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAEvE;;GAEG;AACH,eAAO,MAAM,WAAW,aAAa,CAAC;AACtC,oBAAY,gBAAgB,GAAG,UAAU,GAAG,KAAK,CAAC;AAOlD,MAAM,WAAW,UAAU;IACvB;;;OA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,IAAI,CAAC,CAAC;CAClD"}
|
package/dist/odspCache.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odspCache.js","sourceRoot":"","sources":["../src/odspCache.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH;;GAEG;AACU,QAAA,WAAW,GAAG,UAAU,CAAC","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\n/**\n * Describes what kind of content is stored in cache entry.\n */\nexport const snapshotKey = \"snapshot\";\nexport type CacheContentType = \"snapshot\" | \"ops\";\n\n/*\n * File / container identifier.\n * There is overlapping information here - host can use all of it or parts\n * to implement storage / identify files.\n */\nexport interface IFileEntry {\n /**\n * Unique and stable ID of the document.\n * Driver guarantees that docId is stable ID uniquely identifying document.\n */\n docId: string;\n /**\n * Resolved URI is provided for additional versatility - host can use it to\n * identify file in storage, and (as example) delete all cached entries for\n * a file if user requests so.\n * This is IOdspResolvedUrl in case of ODSP driver.\n */\n resolvedUrl: IFluidResolvedUrl;\n}\n\n/**\n * Cache entry. Identifies file that this entry belongs to, and type of content stored in it.\n */\n export interface IEntry {\n /**\n * Identifies type of entry for a given file.\n * Each file can have multiple types of entries associated with it.\n * For example, it can be snapshot, blob, ops, etc.\n */\n type: CacheContentType;\n\n /**\n * Identifies individual entry for a given file and type.\n * Each file can have multiple cache entries associated with it.\n * This property identifies a particular instance of entry.\n * For example, for blobs it will be unique ID of the blob in a file.\n * For batch of ops, it can be starting op sequence number.\n * For types that have only one entry (like snapshots), it will be empty string.\n */\n key: string;\n}\n\n/**\n * Cache entry. Identifies file that this entry belongs to, and type of content stored in it.\n */\nexport interface ICacheEntry extends IEntry {\n /**\n * Identifies file in storage this cached entry is for\n */\n file: IFileEntry;\n}\n\n/**\n * Persistent cache. This interface can be implemented by the host to provide durable caching\n * across sessions. If not provided at driver factory construction, factory will use in-memory\n * cache implementation that does not survive across sessions.\n */\nexport interface IPersistedCache {\n /**\n * Get the cache value of the key\n * @param entry - cache entry, identifies file and particular key for this file.\n * @returns Cached value. undefined if nothing is cached.\n */\n get(entry: ICacheEntry): Promise<any>;\n\n /**\n * Put the value into cache.\n * Important - only serializable content is allowed since this cache may be persisted between sessions\n * @param entry - cache entry.\n * @param value - JSON-serializable content.\n */\n put(entry: ICacheEntry, value: any): Promise<void>;\n\n /**\n * Removes the entries from the cache for given parametres.\n * @param file - file entry to be deleted.\n */\n removeEntries(file: IFileEntry): Promise<void>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"odspCache.js","sourceRoot":"","sources":["../src/odspCache.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH;;GAEG;AACU,QAAA,WAAW,GAAG,UAAU,CAAC","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\n/**\n * Describes what kind of content is stored in cache entry.\n */\nexport const snapshotKey = \"snapshot\";\nexport type CacheContentType = \"snapshot\" | \"ops\";\n\n/*\n * File / container identifier.\n * There is overlapping information here - host can use all of it or parts\n * to implement storage / identify files.\n */\nexport interface IFileEntry {\n /**\n * Unique and stable ID of the document.\n * Driver guarantees that docId is stable ID uniquely identifying document.\n */\n docId: string;\n /**\n * Resolved URI is provided for additional versatility - host can use it to\n * identify file in storage, and (as example) delete all cached entries for\n * a file if user requests so.\n * This is IOdspResolvedUrl in case of ODSP driver.\n */\n resolvedUrl: IFluidResolvedUrl;\n}\n\n/**\n * Cache entry. Identifies file that this entry belongs to, and type of content stored in it.\n */\n export interface IEntry {\n /**\n * Identifies type of entry for a given file.\n * Each file can have multiple types of entries associated with it.\n * For example, it can be snapshot, blob, ops, etc.\n */\n type: CacheContentType;\n\n /**\n * Identifies individual entry for a given file and type.\n * Each file can have multiple cache entries associated with it.\n * This property identifies a particular instance of entry.\n * For example, for blobs it will be unique ID of the blob in a file.\n * For batch of ops, it can be starting op sequence number.\n * For types that have only one entry (like snapshots), it will be empty string.\n */\n key: string;\n}\n\n/**\n * Cache entry. Identifies file that this entry belongs to, and type of content stored in it.\n */\nexport interface ICacheEntry extends IEntry {\n /**\n * Identifies file in storage this cached entry is for\n */\n file: IFileEntry;\n}\n\n/**\n * Persistent cache. This interface can be implemented by the host to provide durable caching\n * across sessions. If not provided at driver factory construction, factory will use in-memory\n * cache implementation that does not survive across sessions. Snapshot entires stored in the\n * IPersistedCache will be considered stale and removed after 2 days. Read the README for more\n * information.\n */\nexport interface IPersistedCache {\n /**\n * Get the cache value of the key\n * @param entry - cache entry, identifies file and particular key for this file.\n * @returns Cached value. undefined if nothing is cached.\n */\n get(entry: ICacheEntry): Promise<any>;\n\n /**\n * Put the value into cache.\n * Important - only serializable content is allowed since this cache may be persisted between sessions\n * @param entry - cache entry.\n * @param value - JSON-serializable content.\n */\n put(entry: ICacheEntry, value: any): Promise<void>;\n\n /**\n * Removes the entries from the cache for given parametres.\n * @param file - file entry to be deleted.\n */\n removeEntries(file: IFileEntry): Promise<void>;\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 = "0.
|
|
8
|
+
export declare const pkgVersion = "0.56.0-49831";
|
|
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,iBAAiB,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 = "0.
|
|
11
|
+
exports.pkgVersion = "0.56.0-49831";
|
|
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,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.56.0-49831\";\n"]}
|
package/dist/resolvedUrl.d.ts
CHANGED
|
@@ -66,10 +66,6 @@ export interface IOdspResolvedUrl extends IFluidResolvedUrl, IOdspUrlParts {
|
|
|
66
66
|
tokens: {};
|
|
67
67
|
fileName: string;
|
|
68
68
|
summarizer: boolean;
|
|
69
|
-
/**
|
|
70
|
-
* @deprecated Use shareLinkInfo.sharingLinkToRedeem instead
|
|
71
|
-
*/
|
|
72
|
-
sharingLinkToRedeem?: string;
|
|
73
69
|
codeHint?: {
|
|
74
70
|
containerPackageName?: string;
|
|
75
71
|
};
|
|
@@ -80,5 +76,6 @@ export interface IOdspResolvedUrl extends IFluidResolvedUrl, IOdspUrlParts {
|
|
|
80
76
|
* a redeemable share link created when loading an existing file
|
|
81
77
|
*/
|
|
82
78
|
shareLinkInfo?: ShareLinkInfoType;
|
|
79
|
+
isClpCompliantApp?: boolean;
|
|
83
80
|
}
|
|
84
81
|
//# 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;;;;;EAKE;AACF,oBAAY,cAAc;IACtB,GAAG,QAAQ;CACd;AACD;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAE9B;;;;;OAKG;IACH,UAAU,CAAC,EAAE;QACT;;;;UAIE;QACF,IAAI,CAAC,EAAE,cAAc,CAAC;QAEtB;;;WAGG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;QAEd;;WAEG;QACH,KAAK,CAAC,EAAE,GAAG,CAAA;KACd,CAAA;IAED;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAChC;AACD,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,C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O,CAAC;IAEpB,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,CAAC;IAElC,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC/B"}
|
package/dist/resolvedUrl.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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
|
|
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 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
|
@@ -40,6 +40,16 @@ export interface ICollabSessionOptions {
|
|
|
40
40
|
* This name will be used in attribution associated with edits made by such user.
|
|
41
41
|
*/
|
|
42
42
|
unauthenticatedUserDisplayName?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Value indicating session preference to always pass access token via Authorization header.
|
|
45
|
+
* Default behavior is to pass access token via query parameter unless overall href string
|
|
46
|
+
* length exceeds 2048 characters. Using query param is performance optimization which results
|
|
47
|
+
* in ODSP XHR request being treated as 'simple' request which do not require OPTIONS call to
|
|
48
|
+
* validate CORS. However, not all ODSP implementations understand this optimization.
|
|
49
|
+
* For instance, auth layer on Converged stack will fail request with access token passed via
|
|
50
|
+
* query param.
|
|
51
|
+
*/
|
|
52
|
+
forceAccessTokenViaAuthorizationHeader?: boolean;
|
|
43
53
|
}
|
|
44
54
|
export interface HostStoragePolicy {
|
|
45
55
|
snapshotOptions?: ISnapshotOptions;
|
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;
|
|
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;;;;;;;;OAQG;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;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"}
|
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\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"]}
|
|
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 * 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 // 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"]}
|
package/lib/odspCache.d.ts
CHANGED
|
@@ -54,7 +54,9 @@ export interface ICacheEntry extends IEntry {
|
|
|
54
54
|
/**
|
|
55
55
|
* Persistent cache. This interface can be implemented by the host to provide durable caching
|
|
56
56
|
* across sessions. If not provided at driver factory construction, factory will use in-memory
|
|
57
|
-
* cache implementation that does not survive across sessions.
|
|
57
|
+
* cache implementation that does not survive across sessions. Snapshot entires stored in the
|
|
58
|
+
* IPersistedCache will be considered stale and removed after 2 days. Read the README for more
|
|
59
|
+
* information.
|
|
58
60
|
*/
|
|
59
61
|
export interface IPersistedCache {
|
|
60
62
|
/**
|
package/lib/odspCache.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odspCache.d.ts","sourceRoot":"","sources":["../src/odspCache.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAEvE;;GAEG;AACH,eAAO,MAAM,WAAW,aAAa,CAAC;AACtC,oBAAY,gBAAgB,GAAG,UAAU,GAAG,KAAK,CAAC;AAOlD,MAAM,WAAW,UAAU;IACvB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,WAAW,EAAE,iBAAiB,CAAC;CAClC;AAED;;GAEG;AACF,MAAM,WAAW,MAAM;IACpB;;;;OAIG;IACH,IAAI,EAAE,gBAAgB,CAAC;IAEvB;;;;;;;OAOG;IACH,GAAG,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,MAAM;IACvC;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;CACpB;AAED
|
|
1
|
+
{"version":3,"file":"odspCache.d.ts","sourceRoot":"","sources":["../src/odspCache.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAEvE;;GAEG;AACH,eAAO,MAAM,WAAW,aAAa,CAAC;AACtC,oBAAY,gBAAgB,GAAG,UAAU,GAAG,KAAK,CAAC;AAOlD,MAAM,WAAW,UAAU;IACvB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,WAAW,EAAE,iBAAiB,CAAC;CAClC;AAED;;GAEG;AACF,MAAM,WAAW,MAAM;IACpB;;;;OAIG;IACH,IAAI,EAAE,gBAAgB,CAAC;IAEvB;;;;;;;OAOG;IACH,GAAG,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,MAAM;IACvC;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;CACpB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC5B;;;;MAIE;IACF,GAAG,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IAEtC;;;;;OAKG;IACH,GAAG,CAAC,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnD;;;OAGG;IACH,aAAa,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAClD"}
|
package/lib/odspCache.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odspCache.js","sourceRoot":"","sources":["../src/odspCache.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,UAAU,CAAC","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\n/**\n * Describes what kind of content is stored in cache entry.\n */\nexport const snapshotKey = \"snapshot\";\nexport type CacheContentType = \"snapshot\" | \"ops\";\n\n/*\n * File / container identifier.\n * There is overlapping information here - host can use all of it or parts\n * to implement storage / identify files.\n */\nexport interface IFileEntry {\n /**\n * Unique and stable ID of the document.\n * Driver guarantees that docId is stable ID uniquely identifying document.\n */\n docId: string;\n /**\n * Resolved URI is provided for additional versatility - host can use it to\n * identify file in storage, and (as example) delete all cached entries for\n * a file if user requests so.\n * This is IOdspResolvedUrl in case of ODSP driver.\n */\n resolvedUrl: IFluidResolvedUrl;\n}\n\n/**\n * Cache entry. Identifies file that this entry belongs to, and type of content stored in it.\n */\n export interface IEntry {\n /**\n * Identifies type of entry for a given file.\n * Each file can have multiple types of entries associated with it.\n * For example, it can be snapshot, blob, ops, etc.\n */\n type: CacheContentType;\n\n /**\n * Identifies individual entry for a given file and type.\n * Each file can have multiple cache entries associated with it.\n * This property identifies a particular instance of entry.\n * For example, for blobs it will be unique ID of the blob in a file.\n * For batch of ops, it can be starting op sequence number.\n * For types that have only one entry (like snapshots), it will be empty string.\n */\n key: string;\n}\n\n/**\n * Cache entry. Identifies file that this entry belongs to, and type of content stored in it.\n */\nexport interface ICacheEntry extends IEntry {\n /**\n * Identifies file in storage this cached entry is for\n */\n file: IFileEntry;\n}\n\n/**\n * Persistent cache. This interface can be implemented by the host to provide durable caching\n * across sessions. If not provided at driver factory construction, factory will use in-memory\n * cache implementation that does not survive across sessions.\n */\nexport interface IPersistedCache {\n /**\n * Get the cache value of the key\n * @param entry - cache entry, identifies file and particular key for this file.\n * @returns Cached value. undefined if nothing is cached.\n */\n get(entry: ICacheEntry): Promise<any>;\n\n /**\n * Put the value into cache.\n * Important - only serializable content is allowed since this cache may be persisted between sessions\n * @param entry - cache entry.\n * @param value - JSON-serializable content.\n */\n put(entry: ICacheEntry, value: any): Promise<void>;\n\n /**\n * Removes the entries from the cache for given parametres.\n * @param file - file entry to be deleted.\n */\n removeEntries(file: IFileEntry): Promise<void>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"odspCache.js","sourceRoot":"","sources":["../src/odspCache.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,UAAU,CAAC","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\n/**\n * Describes what kind of content is stored in cache entry.\n */\nexport const snapshotKey = \"snapshot\";\nexport type CacheContentType = \"snapshot\" | \"ops\";\n\n/*\n * File / container identifier.\n * There is overlapping information here - host can use all of it or parts\n * to implement storage / identify files.\n */\nexport interface IFileEntry {\n /**\n * Unique and stable ID of the document.\n * Driver guarantees that docId is stable ID uniquely identifying document.\n */\n docId: string;\n /**\n * Resolved URI is provided for additional versatility - host can use it to\n * identify file in storage, and (as example) delete all cached entries for\n * a file if user requests so.\n * This is IOdspResolvedUrl in case of ODSP driver.\n */\n resolvedUrl: IFluidResolvedUrl;\n}\n\n/**\n * Cache entry. Identifies file that this entry belongs to, and type of content stored in it.\n */\n export interface IEntry {\n /**\n * Identifies type of entry for a given file.\n * Each file can have multiple types of entries associated with it.\n * For example, it can be snapshot, blob, ops, etc.\n */\n type: CacheContentType;\n\n /**\n * Identifies individual entry for a given file and type.\n * Each file can have multiple cache entries associated with it.\n * This property identifies a particular instance of entry.\n * For example, for blobs it will be unique ID of the blob in a file.\n * For batch of ops, it can be starting op sequence number.\n * For types that have only one entry (like snapshots), it will be empty string.\n */\n key: string;\n}\n\n/**\n * Cache entry. Identifies file that this entry belongs to, and type of content stored in it.\n */\nexport interface ICacheEntry extends IEntry {\n /**\n * Identifies file in storage this cached entry is for\n */\n file: IFileEntry;\n}\n\n/**\n * Persistent cache. This interface can be implemented by the host to provide durable caching\n * across sessions. If not provided at driver factory construction, factory will use in-memory\n * cache implementation that does not survive across sessions. Snapshot entires stored in the\n * IPersistedCache will be considered stale and removed after 2 days. Read the README for more\n * information.\n */\nexport interface IPersistedCache {\n /**\n * Get the cache value of the key\n * @param entry - cache entry, identifies file and particular key for this file.\n * @returns Cached value. undefined if nothing is cached.\n */\n get(entry: ICacheEntry): Promise<any>;\n\n /**\n * Put the value into cache.\n * Important - only serializable content is allowed since this cache may be persisted between sessions\n * @param entry - cache entry.\n * @param value - JSON-serializable content.\n */\n put(entry: ICacheEntry, value: any): Promise<void>;\n\n /**\n * Removes the entries from the cache for given parametres.\n * @param file - file entry to be deleted.\n */\n removeEntries(file: IFileEntry): Promise<void>;\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 = "0.
|
|
8
|
+
export declare const pkgVersion = "0.56.0-49831";
|
|
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,iBAAiB,CAAC"}
|
package/lib/packageVersion.js
CHANGED
|
@@ -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,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.56.0-49831\";\n"]}
|
package/lib/resolvedUrl.d.ts
CHANGED
|
@@ -66,10 +66,6 @@ export interface IOdspResolvedUrl extends IFluidResolvedUrl, IOdspUrlParts {
|
|
|
66
66
|
tokens: {};
|
|
67
67
|
fileName: string;
|
|
68
68
|
summarizer: boolean;
|
|
69
|
-
/**
|
|
70
|
-
* @deprecated Use shareLinkInfo.sharingLinkToRedeem instead
|
|
71
|
-
*/
|
|
72
|
-
sharingLinkToRedeem?: string;
|
|
73
69
|
codeHint?: {
|
|
74
70
|
containerPackageName?: string;
|
|
75
71
|
};
|
|
@@ -80,5 +76,6 @@ export interface IOdspResolvedUrl extends IFluidResolvedUrl, IOdspUrlParts {
|
|
|
80
76
|
* a redeemable share link created when loading an existing file
|
|
81
77
|
*/
|
|
82
78
|
shareLinkInfo?: ShareLinkInfoType;
|
|
79
|
+
isClpCompliantApp?: boolean;
|
|
83
80
|
}
|
|
84
81
|
//# sourceMappingURL=resolvedUrl.d.ts.map
|
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;;;;;EAKE;AACF,oBAAY,cAAc;IACtB,GAAG,QAAQ;CACd;AACD;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAE9B;;;;;OAKG;IACH,UAAU,CAAC,EAAE;QACT;;;;UAIE;QACF,IAAI,CAAC,EAAE,cAAc,CAAC;QAEtB;;;WAGG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;QAEd;;WAEG;QACH,KAAK,CAAC,EAAE,GAAG,CAAA;KACd,CAAA;IAED;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAChC;AACD,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;IAEpB
|
|
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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],"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
|
|
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 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": "0.
|
|
3
|
+
"version": "0.56.0-49831",
|
|
4
4
|
"description": "Socket storage implementation for SPO and ODC",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": "https://github.com/microsoft/FluidFramework",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"ci:build:docs": "api-extractor run --typescript-compiler-folder ../../../node_modules/typescript && copyfiles -u 1 ./_api-extractor-temp/* ../../../_api-extractor-temp/",
|
|
23
23
|
"clean": "rimraf dist lib *.tsbuildinfo *.build.log",
|
|
24
24
|
"eslint": "eslint --format stylish src",
|
|
25
|
-
"eslint:fix": "eslint --format stylish src --fix",
|
|
25
|
+
"eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
|
|
26
26
|
"lint": "npm run eslint",
|
|
27
27
|
"lint:fix": "npm run eslint:fix",
|
|
28
28
|
"tsc": "tsc",
|
|
@@ -30,25 +30,26 @@
|
|
|
30
30
|
"tsfmt:fix": "tsfmt --replace"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@fluidframework/driver-definitions": "^0.
|
|
33
|
+
"@fluidframework/driver-definitions": "^0.44.0-0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@fluidframework/build-common": "^0.23.0",
|
|
37
|
-
"@fluidframework/eslint-config-fluid": "^0.
|
|
37
|
+
"@fluidframework/eslint-config-fluid": "^0.25.0",
|
|
38
38
|
"@fluidframework/protocol-definitions": "^0.1026.0",
|
|
39
39
|
"@microsoft/api-extractor": "^7.16.1",
|
|
40
|
-
"@
|
|
41
|
-
"@typescript-eslint/
|
|
40
|
+
"@rushstack/eslint-config": "^2.5.1",
|
|
41
|
+
"@typescript-eslint/eslint-plugin": "~5.9.0",
|
|
42
|
+
"@typescript-eslint/parser": "~5.9.0",
|
|
42
43
|
"concurrently": "^6.2.0",
|
|
43
44
|
"copyfiles": "^2.1.0",
|
|
44
45
|
"cross-env": "^7.0.2",
|
|
45
|
-
"eslint": "~
|
|
46
|
+
"eslint": "~8.6.0",
|
|
47
|
+
"eslint-plugin-editorconfig": "~3.2.0",
|
|
46
48
|
"eslint-plugin-eslint-comments": "~3.2.0",
|
|
47
|
-
"eslint-plugin-import": "~2.
|
|
49
|
+
"eslint-plugin-import": "~2.25.4",
|
|
48
50
|
"eslint-plugin-no-null": "~1.0.2",
|
|
49
|
-
"eslint-plugin-
|
|
50
|
-
"eslint-plugin-
|
|
51
|
-
"eslint-plugin-unicorn": "~26.0.1",
|
|
51
|
+
"eslint-plugin-react": "~7.28.0",
|
|
52
|
+
"eslint-plugin-unicorn": "~40.0.0",
|
|
52
53
|
"rimraf": "^2.6.2",
|
|
53
54
|
"typescript": "~4.1.3",
|
|
54
55
|
"typescript-formatter": "7.1.0"
|
package/src/factory.ts
CHANGED
|
@@ -56,6 +56,16 @@ export interface ICollabSessionOptions {
|
|
|
56
56
|
* This name will be used in attribution associated with edits made by such user.
|
|
57
57
|
*/
|
|
58
58
|
unauthenticatedUserDisplayName?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Value indicating session preference to always pass access token via Authorization header.
|
|
61
|
+
* Default behavior is to pass access token via query parameter unless overall href string
|
|
62
|
+
* length exceeds 2048 characters. Using query param is performance optimization which results
|
|
63
|
+
* in ODSP XHR request being treated as 'simple' request which do not require OPTIONS call to
|
|
64
|
+
* validate CORS. However, not all ODSP implementations understand this optimization.
|
|
65
|
+
* For instance, auth layer on Converged stack will fail request with access token passed via
|
|
66
|
+
* query param.
|
|
67
|
+
*/
|
|
68
|
+
forceAccessTokenViaAuthorizationHeader?: boolean;
|
|
59
69
|
}
|
|
60
70
|
|
|
61
71
|
export interface HostStoragePolicy {
|
package/src/odspCache.ts
CHANGED
|
@@ -66,7 +66,9 @@ export interface ICacheEntry extends IEntry {
|
|
|
66
66
|
/**
|
|
67
67
|
* Persistent cache. This interface can be implemented by the host to provide durable caching
|
|
68
68
|
* across sessions. If not provided at driver factory construction, factory will use in-memory
|
|
69
|
-
* cache implementation that does not survive across sessions.
|
|
69
|
+
* cache implementation that does not survive across sessions. Snapshot entires stored in the
|
|
70
|
+
* IPersistedCache will be considered stale and removed after 2 days. Read the README for more
|
|
71
|
+
* information.
|
|
70
72
|
*/
|
|
71
73
|
export interface IPersistedCache {
|
|
72
74
|
/**
|
package/src/packageVersion.ts
CHANGED
package/src/resolvedUrl.ts
CHANGED
|
@@ -84,11 +84,6 @@ export interface IOdspResolvedUrl extends IFluidResolvedUrl, IOdspUrlParts {
|
|
|
84
84
|
|
|
85
85
|
summarizer: boolean;
|
|
86
86
|
|
|
87
|
-
/**
|
|
88
|
-
* @deprecated Use shareLinkInfo.sharingLinkToRedeem instead
|
|
89
|
-
*/
|
|
90
|
-
sharingLinkToRedeem?: string;
|
|
91
|
-
|
|
92
87
|
codeHint?: {
|
|
93
88
|
// containerPackageName is used for adding the package name to the request headers.
|
|
94
89
|
// This may be used for preloading the container package when loading Fluid content.
|
|
@@ -102,5 +97,7 @@ export interface IOdspResolvedUrl extends IFluidResolvedUrl, IOdspUrlParts {
|
|
|
102
97
|
* Contains information about either sharing link created while creating a new file or
|
|
103
98
|
* a redeemable share link created when loading an existing file
|
|
104
99
|
*/
|
|
105
|
-
shareLinkInfo?: ShareLinkInfoType
|
|
100
|
+
shareLinkInfo?: ShareLinkInfoType;
|
|
101
|
+
|
|
102
|
+
isClpCompliantApp?: boolean;
|
|
106
103
|
}
|