@fluidframework/odsp-driver-definitions 2.61.0 → 2.62.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/api-report/odsp-driver-definitions.legacy.beta.api.md +4 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -3
- package/dist/index.js.map +1 -1
- package/dist/odspCache.d.ts +6 -18
- package/dist/odspCache.d.ts.map +1 -1
- package/dist/odspCache.js +1 -20
- package/dist/odspCache.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/odspCache.d.ts +6 -18
- package/lib/odspCache.d.ts.map +1 -1
- package/lib/odspCache.js +0 -18
- package/lib/odspCache.js.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +4 -6
- package/src/odspCache.ts +6 -22
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @fluidframework/odsp-driver-definitions
|
|
2
2
|
|
|
3
|
+
## 2.62.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Move IPersistedCache types to driver-definitions ([#25518](https://github.com/microsoft/FluidFramework/pull/25518)) [54fca68d91](https://github.com/microsoft/FluidFramework/commit/54fca68d91aeb40bdef14b1fe8b8f3c28168b6de)
|
|
8
|
+
|
|
9
|
+
In an effort to decouple the driver web cache from the odsp driver a number of types have been moved from `@fluidframework/odsp-driver-definitions` to `@fluidframework/driver-definitions`. The moved types have been deprecated in `@fluidframework/odsp-driver-definitions`, and any usages should be moved to `@fluidframework/driver-definitions`.
|
|
10
|
+
|
|
11
|
+
The moved types are:
|
|
12
|
+
|
|
13
|
+
- `IEntry`
|
|
14
|
+
- `IFileEntry`
|
|
15
|
+
- `ICacheEntry`
|
|
16
|
+
- `IPersistedCache`
|
|
17
|
+
|
|
3
18
|
## 2.61.0
|
|
4
19
|
|
|
5
20
|
Dependency updates only.
|
|
@@ -30,7 +30,7 @@ export interface HostStoragePolicy {
|
|
|
30
30
|
snapshotOptions?: ISnapshotOptions;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
// @beta @legacy
|
|
33
|
+
// @beta @deprecated @legacy
|
|
34
34
|
export interface ICacheEntry extends IEntry {
|
|
35
35
|
file: IFileEntry;
|
|
36
36
|
}
|
|
@@ -47,13 +47,13 @@ export interface ICollabSessionOptions {
|
|
|
47
47
|
// @beta @legacy
|
|
48
48
|
export type IdentityType = "Consumer" | "Enterprise";
|
|
49
49
|
|
|
50
|
-
// @beta @legacy
|
|
50
|
+
// @beta @deprecated @legacy
|
|
51
51
|
export interface IEntry {
|
|
52
52
|
key: string;
|
|
53
53
|
type: CacheContentType;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
// @beta @legacy (undocumented)
|
|
56
|
+
// @beta @deprecated @legacy (undocumented)
|
|
57
57
|
export interface IFileEntry {
|
|
58
58
|
docId: string;
|
|
59
59
|
fileVersion?: string;
|
|
@@ -132,7 +132,7 @@ export interface IOpsCachingPolicy {
|
|
|
132
132
|
totalOpsToCache?: number;
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
// @beta @legacy
|
|
135
|
+
// @beta @deprecated @legacy
|
|
136
136
|
export interface IPersistedCache {
|
|
137
137
|
get(entry: ICacheEntry): Promise<any>;
|
|
138
138
|
put(entry: ICacheEntry, value: any): Promise<void>;
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export { IOdspError, IOdspErrorAugmentations, OdspError, OdspErrorTypes } from "./errors.js";
|
|
6
6
|
export { HostStoragePolicy, ICollabSessionOptions, IOpsCachingPolicy, ISnapshotOptions, } from "./factory.js";
|
|
7
|
-
export { CacheContentType,
|
|
7
|
+
export { CacheContentType, snapshotKey, snapshotWithLoadingGroupIdKey, ICacheEntry, IPersistedCache, IFileEntry, IEntry, } from "./odspCache.js";
|
|
8
8
|
export { IOdspResolvedUrl, IOdspUrlParts, ISharingLink, ISharingLinkKind, ShareLinkInfoType, SharingLinkRole, SharingLinkScope, } from "./resolvedUrl.js";
|
|
9
9
|
export { IdentityType, InstrumentedStorageTokenFetcher, InstrumentedTokenFetcher, isTokenFromCache, OdspResourceTokenFetchOptions, TokenFetcher, TokenFetchOptions, authHeaderFromTokenResponse, tokenFromResponse, TokenResponse, } from "./tokenFetch.js";
|
|
10
10
|
export { IProvideSessionAwareDriverFactory, IRelaySessionAwareDriverFactory, ISensitivityLabel, ISensitivityLabelsInfo, ISocketStorageDiscovery, } from "./sessionProvider.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,uBAAuB,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7F,OAAO,EACN,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,GAChB,MAAM,cAAc,CAAC;AACtB,OAAO,EACN,gBAAgB,EAChB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,uBAAuB,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7F,OAAO,EACN,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,GAChB,MAAM,cAAc,CAAC;AACtB,OAAO,EACN,gBAAgB,EAChB,WAAW,EACX,6BAA6B,EAC7B,WAAW,EACX,eAAe,EACf,UAAU,EACV,MAAM,GACN,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACN,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,gBAAgB,GAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACN,YAAY,EACZ,+BAA+B,EAC/B,wBAAwB,EACxB,gBAAgB,EAChB,6BAA6B,EAC7B,YAAY,EACZ,iBAAiB,EACjB,2BAA2B,EAC3B,iBAAiB,EACjB,aAAa,GACb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACN,iCAAiC,EACjC,+BAA+B,EAC/B,iBAAiB,EACjB,sBAAsB,EACtB,uBAAuB,GACvB,MAAM,sBAAsB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4,12 +4,10 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.tokenFromResponse = exports.authHeaderFromTokenResponse = exports.isTokenFromCache = exports.SharingLinkScope = exports.SharingLinkRole = exports.snapshotWithLoadingGroupIdKey = exports.snapshotKey = exports.
|
|
7
|
+
exports.tokenFromResponse = exports.authHeaderFromTokenResponse = exports.isTokenFromCache = exports.SharingLinkScope = exports.SharingLinkRole = exports.snapshotWithLoadingGroupIdKey = exports.snapshotKey = exports.OdspErrorTypes = void 0;
|
|
8
8
|
var errors_js_1 = require("./errors.js");
|
|
9
9
|
Object.defineProperty(exports, "OdspErrorTypes", { enumerable: true, get: function () { return errors_js_1.OdspErrorTypes; } });
|
|
10
10
|
var odspCache_js_1 = require("./odspCache.js");
|
|
11
|
-
Object.defineProperty(exports, "maximumCacheDurationMs", { enumerable: true, get: function () { return odspCache_js_1.maximumCacheDurationMs; } });
|
|
12
|
-
Object.defineProperty(exports, "getKeyForCacheEntry", { enumerable: true, get: function () { return odspCache_js_1.getKeyForCacheEntry; } });
|
|
13
11
|
Object.defineProperty(exports, "snapshotKey", { enumerable: true, get: function () { return odspCache_js_1.snapshotKey; } });
|
|
14
12
|
Object.defineProperty(exports, "snapshotWithLoadingGroupIdKey", { enumerable: true, get: function () { return odspCache_js_1.snapshotWithLoadingGroupIdKey; } });
|
|
15
13
|
var resolvedUrl_js_1 = require("./resolvedUrl.js");
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,yCAA6F;AAApC,2GAAA,cAAc,OAAA;AAOvE,+
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,yCAA6F;AAApC,2GAAA,cAAc,OAAA;AAOvE,+CAQwB;AANvB,2GAAA,WAAW,OAAA;AACX,6HAAA,6BAA6B,OAAA;AAM9B,mDAQ0B;AAFzB,iHAAA,eAAe,OAAA;AACf,kHAAA,gBAAgB,OAAA;AAEjB,iDAWyB;AAPxB,iHAAA,gBAAgB,OAAA;AAIhB,4HAAA,2BAA2B,OAAA;AAC3B,kHAAA,iBAAiB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { IOdspError, IOdspErrorAugmentations, OdspError, OdspErrorTypes } from \"./errors.js\";\nexport {\n\tHostStoragePolicy,\n\tICollabSessionOptions,\n\tIOpsCachingPolicy,\n\tISnapshotOptions,\n} from \"./factory.js\";\nexport {\n\tCacheContentType,\n\tsnapshotKey,\n\tsnapshotWithLoadingGroupIdKey,\n\tICacheEntry,\n\tIPersistedCache,\n\tIFileEntry,\n\tIEntry,\n} from \"./odspCache.js\";\nexport {\n\tIOdspResolvedUrl,\n\tIOdspUrlParts,\n\tISharingLink,\n\tISharingLinkKind,\n\tShareLinkInfoType,\n\tSharingLinkRole,\n\tSharingLinkScope,\n} from \"./resolvedUrl.js\";\nexport {\n\tIdentityType,\n\tInstrumentedStorageTokenFetcher,\n\tInstrumentedTokenFetcher,\n\tisTokenFromCache,\n\tOdspResourceTokenFetchOptions,\n\tTokenFetcher,\n\tTokenFetchOptions,\n\tauthHeaderFromTokenResponse,\n\ttokenFromResponse,\n\tTokenResponse,\n} from \"./tokenFetch.js\";\nexport {\n\tIProvideSessionAwareDriverFactory,\n\tIRelaySessionAwareDriverFactory,\n\tISensitivityLabel,\n\tISensitivityLabelsInfo,\n\tISocketStorageDiscovery,\n} from \"./sessionProvider.js\";\n"]}
|
package/dist/odspCache.d.ts
CHANGED
|
@@ -2,16 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
6
|
-
/**
|
|
7
|
-
* Must be less than IDocumentStorageServicePolicies.maximumCacheDurationMs policy of 5 days.
|
|
8
|
-
* That policy is the outward expression and this value is the implementation - using a larger value
|
|
9
|
-
* would violate that statement of the driver's behavior.
|
|
10
|
-
* Other parts of the system (such as Garbage Collection) depend on that policy being properly implemented.
|
|
11
|
-
*
|
|
12
|
-
* @internal
|
|
13
|
-
*/
|
|
14
|
-
export declare const maximumCacheDurationMs: FiveDaysMs;
|
|
5
|
+
import { IResolvedUrl } from "@fluidframework/driver-definitions/internal";
|
|
15
6
|
/**
|
|
16
7
|
* Describes what kind of content is stored in cache entry.
|
|
17
8
|
* @internal
|
|
@@ -28,6 +19,7 @@ export declare const snapshotWithLoadingGroupIdKey = "snapshotWithLoadingGroupId
|
|
|
28
19
|
export type CacheContentType = "snapshot" | "ops" | "snapshotWithLoadingGroupId";
|
|
29
20
|
/**
|
|
30
21
|
* @legacy @beta
|
|
22
|
+
* @deprecated This interface was move to `@fluidframework/driver-definitions`. Please update your references.
|
|
31
23
|
*/
|
|
32
24
|
export interface IFileEntry {
|
|
33
25
|
/**
|
|
@@ -50,6 +42,7 @@ export interface IFileEntry {
|
|
|
50
42
|
/**
|
|
51
43
|
* Cache entry. Identifies file that this entry belongs to, and type of content stored in it.
|
|
52
44
|
* @legacy @beta
|
|
45
|
+
* @deprecated This interface was move to `@fluidframework/driver-definitions`. Please update your references.
|
|
53
46
|
*/
|
|
54
47
|
export interface IEntry {
|
|
55
48
|
/**
|
|
@@ -71,6 +64,7 @@ export interface IEntry {
|
|
|
71
64
|
/**
|
|
72
65
|
* Cache entry. Identifies file that this entry belongs to, and type of content stored in it.
|
|
73
66
|
* @legacy @beta
|
|
67
|
+
* @deprecated This interface was move to `@fluidframework/driver-definitions`. Please update your references.
|
|
74
68
|
*/
|
|
75
69
|
export interface ICacheEntry extends IEntry {
|
|
76
70
|
/**
|
|
@@ -85,6 +79,7 @@ export interface ICacheEntry extends IEntry {
|
|
|
85
79
|
* IPersistedCache will be considered stale and removed after 2 days. Read the README for more
|
|
86
80
|
* information.
|
|
87
81
|
* @legacy @beta
|
|
82
|
+
* @deprecated This interface was move to `@fluidframework/driver-definitions`. Please update your references.
|
|
88
83
|
*/
|
|
89
84
|
export interface IPersistedCache {
|
|
90
85
|
/**
|
|
@@ -101,16 +96,9 @@ export interface IPersistedCache {
|
|
|
101
96
|
*/
|
|
102
97
|
put(entry: ICacheEntry, value: any): Promise<void>;
|
|
103
98
|
/**
|
|
104
|
-
* Removes the entries from the cache for given
|
|
99
|
+
* Removes the entries from the cache for given parameters.
|
|
105
100
|
* @param file - file entry to be deleted.
|
|
106
101
|
*/
|
|
107
102
|
removeEntries(file: IFileEntry): Promise<void>;
|
|
108
103
|
}
|
|
109
|
-
/**
|
|
110
|
-
* Api to generate a cache key from cache entry.
|
|
111
|
-
* @param entry - cache entry from which a cache key is generated
|
|
112
|
-
* @returns The key for cache.
|
|
113
|
-
* @internal
|
|
114
|
-
*/
|
|
115
|
-
export declare function getKeyForCacheEntry(entry: ICacheEntry): string;
|
|
116
104
|
//# sourceMappingURL=odspCache.d.ts.map
|
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,
|
|
1
|
+
{"version":3,"file":"odspCache.d.ts","sourceRoot":"","sources":["../src/odspCache.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAE3E;;;GAGG;AACH,eAAO,MAAM,WAAW,aAAa,CAAC;AAEtC;;;GAGG;AACH,eAAO,MAAM,6BAA6B,+BAA+B,CAAC;AAE1E;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,KAAK,GAAG,4BAA4B,CAAC;AAOjF;;;GAGG;AACH,MAAM,WAAW,UAAU;IAC1B;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,WAAW,EAAE,YAAY,CAAC;IAC1B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,MAAM;IACtB;;;;OAIG;IACH,IAAI,EAAE,gBAAgB,CAAC;IAEvB;;;;;;;OAOG;IACH,GAAG,EAAE,MAAM,CAAC;CACZ;AAED;;;;GAIG;AACH,MAAM,WAAW,WAAY,SAAQ,MAAM;IAC1C;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;CACjB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,eAAe;IAC/B;;;;OAIG;IACH,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;CAC/C"}
|
package/dist/odspCache.js
CHANGED
|
@@ -4,16 +4,7 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.
|
|
8
|
-
/**
|
|
9
|
-
* Must be less than IDocumentStorageServicePolicies.maximumCacheDurationMs policy of 5 days.
|
|
10
|
-
* That policy is the outward expression and this value is the implementation - using a larger value
|
|
11
|
-
* would violate that statement of the driver's behavior.
|
|
12
|
-
* Other parts of the system (such as Garbage Collection) depend on that policy being properly implemented.
|
|
13
|
-
*
|
|
14
|
-
* @internal
|
|
15
|
-
*/
|
|
16
|
-
exports.maximumCacheDurationMs = 432_000_000; // 5 days in ms
|
|
7
|
+
exports.snapshotWithLoadingGroupIdKey = exports.snapshotKey = void 0;
|
|
17
8
|
/**
|
|
18
9
|
* Describes what kind of content is stored in cache entry.
|
|
19
10
|
* @internal
|
|
@@ -24,14 +15,4 @@ exports.snapshotKey = "snapshot";
|
|
|
24
15
|
* @internal
|
|
25
16
|
*/
|
|
26
17
|
exports.snapshotWithLoadingGroupIdKey = "snapshotWithLoadingGroupId";
|
|
27
|
-
/**
|
|
28
|
-
* Api to generate a cache key from cache entry.
|
|
29
|
-
* @param entry - cache entry from which a cache key is generated
|
|
30
|
-
* @returns The key for cache.
|
|
31
|
-
* @internal
|
|
32
|
-
*/
|
|
33
|
-
function getKeyForCacheEntry(entry) {
|
|
34
|
-
return `${entry.file.docId}_${entry.type}_${entry.key}`;
|
|
35
|
-
}
|
|
36
|
-
exports.getKeyForCacheEntry = getKeyForCacheEntry;
|
|
37
18
|
//# sourceMappingURL=odspCache.js.map
|
package/dist/odspCache.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odspCache.js","sourceRoot":"","sources":["../src/odspCache.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH
|
|
1
|
+
{"version":3,"file":"odspCache.js","sourceRoot":"","sources":["../src/odspCache.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH;;;GAGG;AACU,QAAA,WAAW,GAAG,UAAU,CAAC;AAEtC;;;GAGG;AACU,QAAA,6BAA6B,GAAG,4BAA4B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IResolvedUrl } from \"@fluidframework/driver-definitions/internal\";\n\n/**\n * Describes what kind of content is stored in cache entry.\n * @internal\n */\nexport const snapshotKey = \"snapshot\";\n\n/**\n * Describes key for partial snapshot with loading GroupId in cache entry.\n * @internal\n */\nexport const snapshotWithLoadingGroupIdKey = \"snapshotWithLoadingGroupId\";\n\n/**\n * @legacy @beta\n */\nexport type CacheContentType = \"snapshot\" | \"ops\" | \"snapshotWithLoadingGroupId\";\n\n/*\n * File / container identifier.\n * There is overlapping information here - host can use all of it or parts\n * to implement storage / identify files.\n */\n/**\n * @legacy @beta\n * @deprecated This interface was move to `@fluidframework/driver-definitions`. Please update your references.\n */\nexport interface IFileEntry {\n\t/**\n\t * Unique and stable ID of the document.\n\t * Driver guarantees that docId is stable ID uniquely identifying document.\n\t */\n\tdocId: string;\n\t/**\n\t * Resolved URI is provided for additional versatility - host can use it to\n\t * identify file in storage, and (as example) delete all cached entries for\n\t * a file if user requests so.\n\t * This is IOdspResolvedUrl in case of ODSP driver.\n\t */\n\tresolvedUrl: IResolvedUrl;\n\t/**\n\t * Optional version of the file.\n\t */\n\tfileVersion?: string;\n}\n\n/**\n * Cache entry. Identifies file that this entry belongs to, and type of content stored in it.\n * @legacy @beta\n * @deprecated This interface was move to `@fluidframework/driver-definitions`. Please update your references.\n */\nexport interface IEntry {\n\t/**\n\t * Identifies type of entry for a given file.\n\t * Each file can have multiple types of entries associated with it.\n\t * For example, it can be snapshot, blob, ops, etc.\n\t */\n\ttype: CacheContentType;\n\n\t/**\n\t * Identifies individual entry for a given file and type.\n\t * Each file can have multiple cache entries associated with it.\n\t * This property identifies a particular instance of entry.\n\t * For example, for blobs it will be unique ID of the blob in a file.\n\t * For batch of ops, it can be starting op sequence number.\n\t * For types that have only one entry (like snapshots), it will be empty string.\n\t */\n\tkey: string;\n}\n\n/**\n * Cache entry. Identifies file that this entry belongs to, and type of content stored in it.\n * @legacy @beta\n * @deprecated This interface was move to `@fluidframework/driver-definitions`. Please update your references.\n */\nexport interface ICacheEntry extends IEntry {\n\t/**\n\t * Identifies file in storage this cached entry is for\n\t */\n\tfile: IFileEntry;\n}\n\n/**\n * Persistent cache. This interface can be implemented by the host to provide durable caching\n * across sessions. If not provided at driver factory construction, factory will use in-memory\n * cache implementation that does not survive across sessions. Snapshot entires stored in the\n * IPersistedCache will be considered stale and removed after 2 days. Read the README for more\n * information.\n * @legacy @beta\n * @deprecated This interface was move to `@fluidframework/driver-definitions`. Please update your references.\n */\nexport interface IPersistedCache {\n\t/**\n\t * Get the cache value of the key\n\t * @param entry - cache entry, identifies file and particular key for this file.\n\t * @returns Cached value. undefined if nothing is cached.\n\t */\n\tget(entry: ICacheEntry): Promise<any>;\n\n\t/**\n\t * Put the value into cache.\n\t * Important - only serializable content is allowed since this cache may be persisted between sessions\n\t * @param entry - cache entry.\n\t * @param value - JSON-serializable content.\n\t */\n\tput(entry: ICacheEntry, value: any): Promise<void>;\n\n\t/**\n\t * Removes the entries from the cache for given parameters.\n\t * @param file - file entry to be deleted.\n\t */\n\tremoveEntries(file: IFileEntry): Promise<void>;\n}\n"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export { IOdspError, IOdspErrorAugmentations, OdspError, OdspErrorTypes } from "./errors.js";
|
|
6
6
|
export { HostStoragePolicy, ICollabSessionOptions, IOpsCachingPolicy, ISnapshotOptions, } from "./factory.js";
|
|
7
|
-
export { CacheContentType,
|
|
7
|
+
export { CacheContentType, snapshotKey, snapshotWithLoadingGroupIdKey, ICacheEntry, IPersistedCache, IFileEntry, IEntry, } from "./odspCache.js";
|
|
8
8
|
export { IOdspResolvedUrl, IOdspUrlParts, ISharingLink, ISharingLinkKind, ShareLinkInfoType, SharingLinkRole, SharingLinkScope, } from "./resolvedUrl.js";
|
|
9
9
|
export { IdentityType, InstrumentedStorageTokenFetcher, InstrumentedTokenFetcher, isTokenFromCache, OdspResourceTokenFetchOptions, TokenFetcher, TokenFetchOptions, authHeaderFromTokenResponse, tokenFromResponse, TokenResponse, } from "./tokenFetch.js";
|
|
10
10
|
export { IProvideSessionAwareDriverFactory, IRelaySessionAwareDriverFactory, ISensitivityLabel, ISensitivityLabelsInfo, ISocketStorageDiscovery, } from "./sessionProvider.js";
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,uBAAuB,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7F,OAAO,EACN,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,GAChB,MAAM,cAAc,CAAC;AACtB,OAAO,EACN,gBAAgB,EAChB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,uBAAuB,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7F,OAAO,EACN,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,GAChB,MAAM,cAAc,CAAC;AACtB,OAAO,EACN,gBAAgB,EAChB,WAAW,EACX,6BAA6B,EAC7B,WAAW,EACX,eAAe,EACf,UAAU,EACV,MAAM,GACN,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACN,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,gBAAgB,GAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACN,YAAY,EACZ,+BAA+B,EAC/B,wBAAwB,EACxB,gBAAgB,EAChB,6BAA6B,EAC7B,YAAY,EACZ,iBAAiB,EACjB,2BAA2B,EAC3B,iBAAiB,EACjB,aAAa,GACb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACN,iCAAiC,EACjC,+BAA+B,EAC/B,iBAAiB,EACjB,sBAAsB,EACtB,uBAAuB,GACvB,MAAM,sBAAsB,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
export { OdspErrorTypes } from "./errors.js";
|
|
6
|
-
export {
|
|
6
|
+
export { snapshotKey, snapshotWithLoadingGroupIdKey, } from "./odspCache.js";
|
|
7
7
|
export { SharingLinkRole, SharingLinkScope, } from "./resolvedUrl.js";
|
|
8
8
|
export { isTokenFromCache, authHeaderFromTokenResponse, tokenFromResponse, } from "./tokenFetch.js";
|
|
9
9
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAkD,cAAc,EAAE,MAAM,aAAa,CAAC;AAO7F,OAAO,EAEN,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAkD,cAAc,EAAE,MAAM,aAAa,CAAC;AAO7F,OAAO,EAEN,WAAW,EACX,6BAA6B,GAK7B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAMN,eAAe,EACf,gBAAgB,GAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAIN,gBAAgB,EAIhB,2BAA2B,EAC3B,iBAAiB,GAEjB,MAAM,iBAAiB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { IOdspError, IOdspErrorAugmentations, OdspError, OdspErrorTypes } from \"./errors.js\";\nexport {\n\tHostStoragePolicy,\n\tICollabSessionOptions,\n\tIOpsCachingPolicy,\n\tISnapshotOptions,\n} from \"./factory.js\";\nexport {\n\tCacheContentType,\n\tsnapshotKey,\n\tsnapshotWithLoadingGroupIdKey,\n\tICacheEntry,\n\tIPersistedCache,\n\tIFileEntry,\n\tIEntry,\n} from \"./odspCache.js\";\nexport {\n\tIOdspResolvedUrl,\n\tIOdspUrlParts,\n\tISharingLink,\n\tISharingLinkKind,\n\tShareLinkInfoType,\n\tSharingLinkRole,\n\tSharingLinkScope,\n} from \"./resolvedUrl.js\";\nexport {\n\tIdentityType,\n\tInstrumentedStorageTokenFetcher,\n\tInstrumentedTokenFetcher,\n\tisTokenFromCache,\n\tOdspResourceTokenFetchOptions,\n\tTokenFetcher,\n\tTokenFetchOptions,\n\tauthHeaderFromTokenResponse,\n\ttokenFromResponse,\n\tTokenResponse,\n} from \"./tokenFetch.js\";\nexport {\n\tIProvideSessionAwareDriverFactory,\n\tIRelaySessionAwareDriverFactory,\n\tISensitivityLabel,\n\tISensitivityLabelsInfo,\n\tISocketStorageDiscovery,\n} from \"./sessionProvider.js\";\n"]}
|
package/lib/odspCache.d.ts
CHANGED
|
@@ -2,16 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
6
|
-
/**
|
|
7
|
-
* Must be less than IDocumentStorageServicePolicies.maximumCacheDurationMs policy of 5 days.
|
|
8
|
-
* That policy is the outward expression and this value is the implementation - using a larger value
|
|
9
|
-
* would violate that statement of the driver's behavior.
|
|
10
|
-
* Other parts of the system (such as Garbage Collection) depend on that policy being properly implemented.
|
|
11
|
-
*
|
|
12
|
-
* @internal
|
|
13
|
-
*/
|
|
14
|
-
export declare const maximumCacheDurationMs: FiveDaysMs;
|
|
5
|
+
import { IResolvedUrl } from "@fluidframework/driver-definitions/internal";
|
|
15
6
|
/**
|
|
16
7
|
* Describes what kind of content is stored in cache entry.
|
|
17
8
|
* @internal
|
|
@@ -28,6 +19,7 @@ export declare const snapshotWithLoadingGroupIdKey = "snapshotWithLoadingGroupId
|
|
|
28
19
|
export type CacheContentType = "snapshot" | "ops" | "snapshotWithLoadingGroupId";
|
|
29
20
|
/**
|
|
30
21
|
* @legacy @beta
|
|
22
|
+
* @deprecated This interface was move to `@fluidframework/driver-definitions`. Please update your references.
|
|
31
23
|
*/
|
|
32
24
|
export interface IFileEntry {
|
|
33
25
|
/**
|
|
@@ -50,6 +42,7 @@ export interface IFileEntry {
|
|
|
50
42
|
/**
|
|
51
43
|
* Cache entry. Identifies file that this entry belongs to, and type of content stored in it.
|
|
52
44
|
* @legacy @beta
|
|
45
|
+
* @deprecated This interface was move to `@fluidframework/driver-definitions`. Please update your references.
|
|
53
46
|
*/
|
|
54
47
|
export interface IEntry {
|
|
55
48
|
/**
|
|
@@ -71,6 +64,7 @@ export interface IEntry {
|
|
|
71
64
|
/**
|
|
72
65
|
* Cache entry. Identifies file that this entry belongs to, and type of content stored in it.
|
|
73
66
|
* @legacy @beta
|
|
67
|
+
* @deprecated This interface was move to `@fluidframework/driver-definitions`. Please update your references.
|
|
74
68
|
*/
|
|
75
69
|
export interface ICacheEntry extends IEntry {
|
|
76
70
|
/**
|
|
@@ -85,6 +79,7 @@ export interface ICacheEntry extends IEntry {
|
|
|
85
79
|
* IPersistedCache will be considered stale and removed after 2 days. Read the README for more
|
|
86
80
|
* information.
|
|
87
81
|
* @legacy @beta
|
|
82
|
+
* @deprecated This interface was move to `@fluidframework/driver-definitions`. Please update your references.
|
|
88
83
|
*/
|
|
89
84
|
export interface IPersistedCache {
|
|
90
85
|
/**
|
|
@@ -101,16 +96,9 @@ export interface IPersistedCache {
|
|
|
101
96
|
*/
|
|
102
97
|
put(entry: ICacheEntry, value: any): Promise<void>;
|
|
103
98
|
/**
|
|
104
|
-
* Removes the entries from the cache for given
|
|
99
|
+
* Removes the entries from the cache for given parameters.
|
|
105
100
|
* @param file - file entry to be deleted.
|
|
106
101
|
*/
|
|
107
102
|
removeEntries(file: IFileEntry): Promise<void>;
|
|
108
103
|
}
|
|
109
|
-
/**
|
|
110
|
-
* Api to generate a cache key from cache entry.
|
|
111
|
-
* @param entry - cache entry from which a cache key is generated
|
|
112
|
-
* @returns The key for cache.
|
|
113
|
-
* @internal
|
|
114
|
-
*/
|
|
115
|
-
export declare function getKeyForCacheEntry(entry: ICacheEntry): string;
|
|
116
104
|
//# sourceMappingURL=odspCache.d.ts.map
|
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,
|
|
1
|
+
{"version":3,"file":"odspCache.d.ts","sourceRoot":"","sources":["../src/odspCache.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAE3E;;;GAGG;AACH,eAAO,MAAM,WAAW,aAAa,CAAC;AAEtC;;;GAGG;AACH,eAAO,MAAM,6BAA6B,+BAA+B,CAAC;AAE1E;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,KAAK,GAAG,4BAA4B,CAAC;AAOjF;;;GAGG;AACH,MAAM,WAAW,UAAU;IAC1B;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,WAAW,EAAE,YAAY,CAAC;IAC1B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,MAAM;IACtB;;;;OAIG;IACH,IAAI,EAAE,gBAAgB,CAAC;IAEvB;;;;;;;OAOG;IACH,GAAG,EAAE,MAAM,CAAC;CACZ;AAED;;;;GAIG;AACH,MAAM,WAAW,WAAY,SAAQ,MAAM;IAC1C;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;CACjB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,eAAe;IAC/B;;;;OAIG;IACH,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;CAC/C"}
|
package/lib/odspCache.js
CHANGED
|
@@ -2,15 +2,6 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
/**
|
|
6
|
-
* Must be less than IDocumentStorageServicePolicies.maximumCacheDurationMs policy of 5 days.
|
|
7
|
-
* That policy is the outward expression and this value is the implementation - using a larger value
|
|
8
|
-
* would violate that statement of the driver's behavior.
|
|
9
|
-
* Other parts of the system (such as Garbage Collection) depend on that policy being properly implemented.
|
|
10
|
-
*
|
|
11
|
-
* @internal
|
|
12
|
-
*/
|
|
13
|
-
export const maximumCacheDurationMs = 432_000_000; // 5 days in ms
|
|
14
5
|
/**
|
|
15
6
|
* Describes what kind of content is stored in cache entry.
|
|
16
7
|
* @internal
|
|
@@ -21,13 +12,4 @@ export const snapshotKey = "snapshot";
|
|
|
21
12
|
* @internal
|
|
22
13
|
*/
|
|
23
14
|
export const snapshotWithLoadingGroupIdKey = "snapshotWithLoadingGroupId";
|
|
24
|
-
/**
|
|
25
|
-
* Api to generate a cache key from cache entry.
|
|
26
|
-
* @param entry - cache entry from which a cache key is generated
|
|
27
|
-
* @returns The key for cache.
|
|
28
|
-
* @internal
|
|
29
|
-
*/
|
|
30
|
-
export function getKeyForCacheEntry(entry) {
|
|
31
|
-
return `${entry.file.docId}_${entry.type}_${entry.key}`;
|
|
32
|
-
}
|
|
33
15
|
//# sourceMappingURL=odspCache.js.map
|
package/lib/odspCache.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odspCache.js","sourceRoot":"","sources":["../src/odspCache.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH
|
|
1
|
+
{"version":3,"file":"odspCache.js","sourceRoot":"","sources":["../src/odspCache.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,UAAU,CAAC;AAEtC;;;GAGG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,4BAA4B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IResolvedUrl } from \"@fluidframework/driver-definitions/internal\";\n\n/**\n * Describes what kind of content is stored in cache entry.\n * @internal\n */\nexport const snapshotKey = \"snapshot\";\n\n/**\n * Describes key for partial snapshot with loading GroupId in cache entry.\n * @internal\n */\nexport const snapshotWithLoadingGroupIdKey = \"snapshotWithLoadingGroupId\";\n\n/**\n * @legacy @beta\n */\nexport type CacheContentType = \"snapshot\" | \"ops\" | \"snapshotWithLoadingGroupId\";\n\n/*\n * File / container identifier.\n * There is overlapping information here - host can use all of it or parts\n * to implement storage / identify files.\n */\n/**\n * @legacy @beta\n * @deprecated This interface was move to `@fluidframework/driver-definitions`. Please update your references.\n */\nexport interface IFileEntry {\n\t/**\n\t * Unique and stable ID of the document.\n\t * Driver guarantees that docId is stable ID uniquely identifying document.\n\t */\n\tdocId: string;\n\t/**\n\t * Resolved URI is provided for additional versatility - host can use it to\n\t * identify file in storage, and (as example) delete all cached entries for\n\t * a file if user requests so.\n\t * This is IOdspResolvedUrl in case of ODSP driver.\n\t */\n\tresolvedUrl: IResolvedUrl;\n\t/**\n\t * Optional version of the file.\n\t */\n\tfileVersion?: string;\n}\n\n/**\n * Cache entry. Identifies file that this entry belongs to, and type of content stored in it.\n * @legacy @beta\n * @deprecated This interface was move to `@fluidframework/driver-definitions`. Please update your references.\n */\nexport interface IEntry {\n\t/**\n\t * Identifies type of entry for a given file.\n\t * Each file can have multiple types of entries associated with it.\n\t * For example, it can be snapshot, blob, ops, etc.\n\t */\n\ttype: CacheContentType;\n\n\t/**\n\t * Identifies individual entry for a given file and type.\n\t * Each file can have multiple cache entries associated with it.\n\t * This property identifies a particular instance of entry.\n\t * For example, for blobs it will be unique ID of the blob in a file.\n\t * For batch of ops, it can be starting op sequence number.\n\t * For types that have only one entry (like snapshots), it will be empty string.\n\t */\n\tkey: string;\n}\n\n/**\n * Cache entry. Identifies file that this entry belongs to, and type of content stored in it.\n * @legacy @beta\n * @deprecated This interface was move to `@fluidframework/driver-definitions`. Please update your references.\n */\nexport interface ICacheEntry extends IEntry {\n\t/**\n\t * Identifies file in storage this cached entry is for\n\t */\n\tfile: IFileEntry;\n}\n\n/**\n * Persistent cache. This interface can be implemented by the host to provide durable caching\n * across sessions. If not provided at driver factory construction, factory will use in-memory\n * cache implementation that does not survive across sessions. Snapshot entires stored in the\n * IPersistedCache will be considered stale and removed after 2 days. Read the README for more\n * information.\n * @legacy @beta\n * @deprecated This interface was move to `@fluidframework/driver-definitions`. Please update your references.\n */\nexport interface IPersistedCache {\n\t/**\n\t * Get the cache value of the key\n\t * @param entry - cache entry, identifies file and particular key for this file.\n\t * @returns Cached value. undefined if nothing is cached.\n\t */\n\tget(entry: ICacheEntry): Promise<any>;\n\n\t/**\n\t * Put the value into cache.\n\t * Important - only serializable content is allowed since this cache may be persisted between sessions\n\t * @param entry - cache entry.\n\t * @param value - JSON-serializable content.\n\t */\n\tput(entry: ICacheEntry, value: any): Promise<void>;\n\n\t/**\n\t * Removes the entries from the cache for given parameters.\n\t * @param file - file entry to be deleted.\n\t */\n\tremoveEntries(file: IFileEntry): Promise<void>;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/odsp-driver-definitions",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.62.0",
|
|
4
4
|
"description": "Socket storage implementation for SPO and ODC",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"main": "lib/index.js",
|
|
48
48
|
"types": "lib/public.d.ts",
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@fluidframework/driver-definitions": "~2.
|
|
50
|
+
"@fluidframework/driver-definitions": "~2.62.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@arethetypeswrong/cli": "^0.17.1",
|
package/src/index.ts
CHANGED
|
@@ -12,14 +12,12 @@ export {
|
|
|
12
12
|
} from "./factory.js";
|
|
13
13
|
export {
|
|
14
14
|
CacheContentType,
|
|
15
|
-
maximumCacheDurationMs,
|
|
16
|
-
getKeyForCacheEntry,
|
|
17
|
-
ICacheEntry,
|
|
18
|
-
IEntry,
|
|
19
|
-
IFileEntry,
|
|
20
|
-
IPersistedCache,
|
|
21
15
|
snapshotKey,
|
|
22
16
|
snapshotWithLoadingGroupIdKey,
|
|
17
|
+
ICacheEntry,
|
|
18
|
+
IPersistedCache,
|
|
19
|
+
IFileEntry,
|
|
20
|
+
IEntry,
|
|
23
21
|
} from "./odspCache.js";
|
|
24
22
|
export {
|
|
25
23
|
IOdspResolvedUrl,
|
package/src/odspCache.ts
CHANGED
|
@@ -3,17 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Must be less than IDocumentStorageServicePolicies.maximumCacheDurationMs policy of 5 days.
|
|
10
|
-
* That policy is the outward expression and this value is the implementation - using a larger value
|
|
11
|
-
* would violate that statement of the driver's behavior.
|
|
12
|
-
* Other parts of the system (such as Garbage Collection) depend on that policy being properly implemented.
|
|
13
|
-
*
|
|
14
|
-
* @internal
|
|
15
|
-
*/
|
|
16
|
-
export const maximumCacheDurationMs: FiveDaysMs = 432_000_000; // 5 days in ms
|
|
6
|
+
import { IResolvedUrl } from "@fluidframework/driver-definitions/internal";
|
|
17
7
|
|
|
18
8
|
/**
|
|
19
9
|
* Describes what kind of content is stored in cache entry.
|
|
@@ -39,6 +29,7 @@ export type CacheContentType = "snapshot" | "ops" | "snapshotWithLoadingGroupId"
|
|
|
39
29
|
*/
|
|
40
30
|
/**
|
|
41
31
|
* @legacy @beta
|
|
32
|
+
* @deprecated This interface was move to `@fluidframework/driver-definitions`. Please update your references.
|
|
42
33
|
*/
|
|
43
34
|
export interface IFileEntry {
|
|
44
35
|
/**
|
|
@@ -62,6 +53,7 @@ export interface IFileEntry {
|
|
|
62
53
|
/**
|
|
63
54
|
* Cache entry. Identifies file that this entry belongs to, and type of content stored in it.
|
|
64
55
|
* @legacy @beta
|
|
56
|
+
* @deprecated This interface was move to `@fluidframework/driver-definitions`. Please update your references.
|
|
65
57
|
*/
|
|
66
58
|
export interface IEntry {
|
|
67
59
|
/**
|
|
@@ -85,6 +77,7 @@ export interface IEntry {
|
|
|
85
77
|
/**
|
|
86
78
|
* Cache entry. Identifies file that this entry belongs to, and type of content stored in it.
|
|
87
79
|
* @legacy @beta
|
|
80
|
+
* @deprecated This interface was move to `@fluidframework/driver-definitions`. Please update your references.
|
|
88
81
|
*/
|
|
89
82
|
export interface ICacheEntry extends IEntry {
|
|
90
83
|
/**
|
|
@@ -100,6 +93,7 @@ export interface ICacheEntry extends IEntry {
|
|
|
100
93
|
* IPersistedCache will be considered stale and removed after 2 days. Read the README for more
|
|
101
94
|
* information.
|
|
102
95
|
* @legacy @beta
|
|
96
|
+
* @deprecated This interface was move to `@fluidframework/driver-definitions`. Please update your references.
|
|
103
97
|
*/
|
|
104
98
|
export interface IPersistedCache {
|
|
105
99
|
/**
|
|
@@ -118,18 +112,8 @@ export interface IPersistedCache {
|
|
|
118
112
|
put(entry: ICacheEntry, value: any): Promise<void>;
|
|
119
113
|
|
|
120
114
|
/**
|
|
121
|
-
* Removes the entries from the cache for given
|
|
115
|
+
* Removes the entries from the cache for given parameters.
|
|
122
116
|
* @param file - file entry to be deleted.
|
|
123
117
|
*/
|
|
124
118
|
removeEntries(file: IFileEntry): Promise<void>;
|
|
125
119
|
}
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* Api to generate a cache key from cache entry.
|
|
129
|
-
* @param entry - cache entry from which a cache key is generated
|
|
130
|
-
* @returns The key for cache.
|
|
131
|
-
* @internal
|
|
132
|
-
*/
|
|
133
|
-
export function getKeyForCacheEntry(entry: ICacheEntry): string {
|
|
134
|
-
return `${entry.file.docId}_${entry.type}_${entry.key}`;
|
|
135
|
-
}
|