@fluidframework/driver-definitions 2.62.0-356644 → 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/driver-definitions.legacy.beta.api.md +25 -0
- package/dist/cacheDefinitions.d.ts +89 -0
- package/dist/cacheDefinitions.d.ts.map +1 -0
- package/dist/cacheDefinitions.js +7 -0
- package/dist/cacheDefinitions.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/legacy.d.ts +4 -0
- package/lib/cacheDefinitions.d.ts +89 -0
- package/lib/cacheDefinitions.d.ts.map +1 -0
- package/lib/cacheDefinitions.js +6 -0
- package/lib/cacheDefinitions.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/legacy.d.ts +4 -0
- package/package.json +2 -2
- package/src/cacheDefinitions.ts +97 -0
- package/src/index.ts +7 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @fluidframework/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.
|
|
@@ -113,6 +113,11 @@ export interface IBranchOrigin {
|
|
|
113
113
|
sequenceNumber: number;
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
+
// @beta @legacy
|
|
117
|
+
export interface ICacheEntry extends IEntry {
|
|
118
|
+
file: IFileEntry;
|
|
119
|
+
}
|
|
120
|
+
|
|
116
121
|
// @public
|
|
117
122
|
export interface ICapabilities {
|
|
118
123
|
interactive: boolean;
|
|
@@ -319,6 +324,19 @@ export interface IDriverErrorBase {
|
|
|
319
324
|
online?: string;
|
|
320
325
|
}
|
|
321
326
|
|
|
327
|
+
// @beta @legacy
|
|
328
|
+
export interface IEntry {
|
|
329
|
+
key: string;
|
|
330
|
+
type: string;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
// @beta @legacy
|
|
334
|
+
export interface IFileEntry {
|
|
335
|
+
docId: string;
|
|
336
|
+
fileVersion?: string;
|
|
337
|
+
resolvedUrl: IResolvedUrl;
|
|
338
|
+
}
|
|
339
|
+
|
|
322
340
|
// @beta @legacy (undocumented)
|
|
323
341
|
export interface IGenericNetworkError extends IDriverErrorBase {
|
|
324
342
|
// (undocumented)
|
|
@@ -350,6 +368,13 @@ export interface INackContent {
|
|
|
350
368
|
type: NackErrorType;
|
|
351
369
|
}
|
|
352
370
|
|
|
371
|
+
// @beta @legacy
|
|
372
|
+
export interface IPersistedCache {
|
|
373
|
+
get(entry: ICacheEntry): Promise<unknown>;
|
|
374
|
+
put(entry: ICacheEntry, value: unknown): Promise<void>;
|
|
375
|
+
removeEntries(file: IFileEntry): Promise<void>;
|
|
376
|
+
}
|
|
377
|
+
|
|
353
378
|
// @beta @legacy (undocumented)
|
|
354
379
|
export interface IProcessMessageResult {
|
|
355
380
|
// (undocumented)
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
import type { IResolvedUrl } from "./urlResolver.js";
|
|
6
|
+
/**
|
|
7
|
+
* File / container identifier.
|
|
8
|
+
* There is overlapping information here - host can use all of it or parts
|
|
9
|
+
* to implement storage / identify files.
|
|
10
|
+
* @legacy @beta
|
|
11
|
+
*/
|
|
12
|
+
export interface IFileEntry {
|
|
13
|
+
/**
|
|
14
|
+
* Unique and stable ID of the document.
|
|
15
|
+
* Driver guarantees that docId is stable ID uniquely identifying document.
|
|
16
|
+
*/
|
|
17
|
+
docId: string;
|
|
18
|
+
/**
|
|
19
|
+
* Resolved URI is provided for additional versatility - host can use it to
|
|
20
|
+
* identify file in storage, and (as example) delete all cached entries for
|
|
21
|
+
* a file if user requests so.
|
|
22
|
+
* This is IOdspResolvedUrl in case of ODSP driver.
|
|
23
|
+
*/
|
|
24
|
+
resolvedUrl: IResolvedUrl;
|
|
25
|
+
/**
|
|
26
|
+
* Optional version of the file.
|
|
27
|
+
*/
|
|
28
|
+
fileVersion?: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Cache entry. Identifies file that this entry belongs to, and type of content stored in it.
|
|
32
|
+
* @legacy @beta
|
|
33
|
+
*/
|
|
34
|
+
export interface IEntry {
|
|
35
|
+
/**
|
|
36
|
+
* Identifies type of entry for a given file.
|
|
37
|
+
* Each file can have multiple types of entries associated with it.
|
|
38
|
+
* For example, it can be snapshot, blob, ops, etc.
|
|
39
|
+
*/
|
|
40
|
+
type: string;
|
|
41
|
+
/**
|
|
42
|
+
* Identifies individual entry for a given file and type.
|
|
43
|
+
* Each file can have multiple cache entries associated with it.
|
|
44
|
+
* This property identifies a particular instance of entry.
|
|
45
|
+
* For example, for blobs it will be unique ID of the blob in a file.
|
|
46
|
+
* For batch of ops, it can be starting op sequence number.
|
|
47
|
+
* For types that have only one entry (like snapshots), it will be empty string.
|
|
48
|
+
*/
|
|
49
|
+
key: string;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Cache entry. Identifies file that this entry belongs to, and type of content stored in it.
|
|
53
|
+
* @legacy @beta
|
|
54
|
+
*/
|
|
55
|
+
export interface ICacheEntry extends IEntry {
|
|
56
|
+
/**
|
|
57
|
+
* Identifies file in storage this cached entry is for
|
|
58
|
+
*/
|
|
59
|
+
file: IFileEntry;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Persistent cache. This interface can be implemented by the host to provide durable caching
|
|
63
|
+
* across sessions. If not provided at driver factory construction, factory will use in-memory
|
|
64
|
+
* cache implementation that does not survive across sessions. Snapshot entires stored in the
|
|
65
|
+
* IPersistedCache will be considered stale and removed after 2 days. Read the README for more
|
|
66
|
+
* information.
|
|
67
|
+
* @legacy @beta
|
|
68
|
+
*/
|
|
69
|
+
export interface IPersistedCache {
|
|
70
|
+
/**
|
|
71
|
+
* Get the cache value of the key
|
|
72
|
+
* @param entry - cache entry, identifies file and particular key for this file.
|
|
73
|
+
* @returns Cached value. undefined if nothing is cached.
|
|
74
|
+
*/
|
|
75
|
+
get(entry: ICacheEntry): Promise<unknown>;
|
|
76
|
+
/**
|
|
77
|
+
* Put the value into cache.
|
|
78
|
+
* Important - only serializable content is allowed since this cache may be persisted between sessions
|
|
79
|
+
* @param entry - cache entry.
|
|
80
|
+
* @param value - JSON-serializable content.
|
|
81
|
+
*/
|
|
82
|
+
put(entry: ICacheEntry, value: unknown): Promise<void>;
|
|
83
|
+
/**
|
|
84
|
+
* Removes the entries from the cache for given parameters.
|
|
85
|
+
* @param file - file entry to be deleted.
|
|
86
|
+
*/
|
|
87
|
+
removeEntries(file: IFileEntry): Promise<void>;
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=cacheDefinitions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cacheDefinitions.d.ts","sourceRoot":"","sources":["../src/cacheDefinitions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IAC1B;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,WAAW,EAAE,YAAY,CAAC;IAE1B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,MAAM;IACtB;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;;;;OAOG;IACH,GAAG,EAAE,MAAM,CAAC;CACZ;AAED;;;GAGG;AACH,MAAM,WAAW,WAAY,SAAQ,MAAM;IAC1C;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;CACjB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,eAAe;IAC/B;;;;OAIG;IACH,GAAG,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAE1C;;;;;OAKG;IACH,GAAG,CAAC,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvD;;;OAGG;IACH,aAAa,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cacheDefinitions.js","sourceRoot":"","sources":["../src/cacheDefinitions.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IResolvedUrl } from \"./urlResolver.js\";\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 * @legacy @beta\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\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 */\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: string;\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 */\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 */\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<unknown>;\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: unknown): 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/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
+
export type { ICacheEntry, IEntry, IFileEntry, IPersistedCache, } from "./cacheDefinitions.js";
|
|
5
6
|
export type { DriverError, IAnyDriverError, IAuthorizationError, IDriverErrorBase, IDriverBasicError, IGenericNetworkError, ILocationRedirectionError, IThrottlingWarning, } from "./driverError.js";
|
|
6
7
|
export { DriverErrorTypes } from "./driverError.js";
|
|
7
8
|
export type { FiveDaysMs, IDeltasFetchResult, IDeltaStorageService, IDocumentDeltaConnection, IDocumentDeltaConnectionEvents, IDocumentDeltaStorageService, IDocumentService, IDocumentServiceEvents, IDocumentServiceFactory, IDocumentServicePolicies, IDocumentStorageService, IDocumentStorageServicePolicies, ISnapshot, ISnapshotFetchOptions, IStream, IStreamResult, ISummaryContext, } from "./storage.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,YAAY,EACX,WAAW,EACX,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,yBAAyB,EACzB,kBAAkB,GAClB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,YAAY,EACX,UAAU,EACV,kBAAkB,EAClB,oBAAoB,EACpB,wBAAwB,EACxB,8BAA8B,EAC9B,4BAA4B,EAC5B,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,EACvB,+BAA+B,EAC/B,SAAS,EACT,qBAAqB,EACrB,OAAO,EACP,aAAa,EACb,eAAe,GACf,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAChE,YAAY,EACX,kBAAkB,EAClB,qBAAqB,EACrB,aAAa,EACb,YAAY,EACZ,YAAY,GACZ,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,YAAY,EACX,cAAc,EACd,iBAAiB,EACjB,WAAW,EACX,KAAK,EACL,aAAa,EACb,aAAa,EACb,OAAO,EACP,oBAAoB,EACpB,cAAc,EACd,WAAW,EACX,kBAAkB,EAClB,QAAQ,EACR,UAAU,EACV,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,sBAAsB,EACtB,KAAK,EACL,YAAY,EACZ,qBAAqB,EACrB,SAAS,EACT,cAAc,EACd,OAAO,EACP,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,kCAAkC,EAClC,yBAAyB,EACzB,qCAAqC,EACrC,+BAA+B,EAC/B,kBAAkB,EAClB,YAAY,EACZ,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,eAAe,EACf,OAAO,EACP,WAAW,EACX,kBAAkB,EAClB,YAAY,EACZ,eAAe,EACf,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,MAAM,EACN,KAAK,EACL,UAAU,EACV,uBAAuB,EACvB,KAAK,EACL,QAAQ,EACR,aAAa,EACb,WAAW,EACX,mBAAmB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACN,QAAQ,EACR,WAAW,EACX,aAAa,EACb,SAAS,EACT,UAAU,EACV,WAAW,EACX,SAAS,GACT,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACX,UAAU,EACV,QAAQ,EACR,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,EACnB,oBAAoB,EACpB,QAAQ,EACR,aAAa,GACb,MAAM,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,YAAY,EACX,WAAW,EACX,MAAM,EACN,UAAU,EACV,eAAe,GACf,MAAM,uBAAuB,CAAC;AAE/B,YAAY,EACX,WAAW,EACX,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,yBAAyB,EACzB,kBAAkB,GAClB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,YAAY,EACX,UAAU,EACV,kBAAkB,EAClB,oBAAoB,EACpB,wBAAwB,EACxB,8BAA8B,EAC9B,4BAA4B,EAC5B,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,EACvB,+BAA+B,EAC/B,SAAS,EACT,qBAAqB,EACrB,OAAO,EACP,aAAa,EACb,eAAe,GACf,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAChE,YAAY,EACX,kBAAkB,EAClB,qBAAqB,EACrB,aAAa,EACb,YAAY,EACZ,YAAY,GACZ,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,YAAY,EACX,cAAc,EACd,iBAAiB,EACjB,WAAW,EACX,KAAK,EACL,aAAa,EACb,aAAa,EACb,OAAO,EACP,oBAAoB,EACpB,cAAc,EACd,WAAW,EACX,kBAAkB,EAClB,QAAQ,EACR,UAAU,EACV,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,sBAAsB,EACtB,KAAK,EACL,YAAY,EACZ,qBAAqB,EACrB,SAAS,EACT,cAAc,EACd,OAAO,EACP,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,kCAAkC,EAClC,yBAAyB,EACzB,qCAAqC,EACrC,+BAA+B,EAC/B,kBAAkB,EAClB,YAAY,EACZ,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,eAAe,EACf,OAAO,EACP,WAAW,EACX,kBAAkB,EAClB,YAAY,EACZ,eAAe,EACf,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,MAAM,EACN,KAAK,EACL,UAAU,EACV,uBAAuB,EACvB,KAAK,EACL,QAAQ,EACR,aAAa,EACb,WAAW,EACX,mBAAmB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACN,QAAQ,EACR,WAAW,EACX,aAAa,EACb,SAAS,EACT,UAAU,EACV,WAAW,EACX,SAAS,GACT,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACX,UAAU,EACV,QAAQ,EACR,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,EACnB,oBAAoB,EACpB,QAAQ,EACR,aAAa,GACb,MAAM,gBAAgB,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAmBH,mDAAoD;AAA3C,kHAAA,gBAAgB,OAAA;AAoBzB,2CAAgE;AAAvD,yGAAA,WAAW,OAAA;AAAE,iHAAA,mBAAmB,OAAA;AAQzC,mDAAgD;AAAvC,8GAAA,YAAY,OAAA;AA6DrB,gDAQ6B;AAP5B,oGAAA,QAAQ,OAAA;AACR,uGAAA,WAAW,OAAA;AACX,yGAAA,aAAa,OAAA;AACb,qGAAA,SAAS,OAAA;AACT,sGAAA,UAAU,OAAA;AACV,uGAAA,WAAW,OAAA;AACX,qGAAA,SAAS,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport type {\n\tICacheEntry,\n\tIEntry,\n\tIFileEntry,\n\tIPersistedCache,\n} from \"./cacheDefinitions.js\";\n\nexport type {\n\tDriverError,\n\tIAnyDriverError,\n\tIAuthorizationError,\n\tIDriverErrorBase,\n\tIDriverBasicError,\n\tIGenericNetworkError,\n\tILocationRedirectionError,\n\tIThrottlingWarning,\n} from \"./driverError.js\";\nexport { DriverErrorTypes } from \"./driverError.js\";\nexport type {\n\tFiveDaysMs,\n\tIDeltasFetchResult,\n\tIDeltaStorageService,\n\tIDocumentDeltaConnection,\n\tIDocumentDeltaConnectionEvents,\n\tIDocumentDeltaStorageService,\n\tIDocumentService,\n\tIDocumentServiceEvents,\n\tIDocumentServiceFactory,\n\tIDocumentServicePolicies,\n\tIDocumentStorageService,\n\tIDocumentStorageServicePolicies,\n\tISnapshot,\n\tISnapshotFetchOptions,\n\tIStream,\n\tIStreamResult,\n\tISummaryContext,\n} from \"./storage.js\";\nexport { FetchSource, LoaderCachingPolicy } from \"./storage.js\";\nexport type {\n\tDriverPreCheckInfo,\n\tIContainerPackageInfo,\n\tIDriverHeader,\n\tIResolvedUrl,\n\tIUrlResolver,\n} from \"./urlResolver.js\";\nexport { DriverHeader } from \"./urlResolver.js\";\n\nexport type {\n\tConnectionMode,\n\tIApprovedProposal,\n\tIAttachment,\n\tIBlob,\n\tIBranchOrigin,\n\tICapabilities,\n\tIClient,\n\tIClientConfiguration,\n\tIClientDetails,\n\tIClientJoin,\n\tICommittedProposal,\n\tIConnect,\n\tIConnected,\n\tICreateBlobResponse,\n\tIDocumentAttributes,\n\tIDocumentMessage,\n\tIDocumentSystemMessage,\n\tINack,\n\tINackContent,\n\tIProcessMessageResult,\n\tIProposal,\n\tIProtocolState,\n\tIQuorum,\n\tIQuorumClients,\n\tIQuorumProposals,\n\tISentSignalMessage,\n\tISequencedClient,\n\tISequencedDocumentAugmentedMessage,\n\tISequencedDocumentMessage,\n\tISequencedDocumentMessageExperimental,\n\tISequencedDocumentSystemMessage,\n\tISequencedProposal,\n\tIServerError,\n\tISignalClient,\n\tISignalMessage,\n\tISignalMessageBase,\n\tISnapshotTree,\n\tISnapshotTreeEx,\n\tIsoDate,\n\tISummaryAck,\n\tISummaryAttachment,\n\tISummaryBlob,\n\tISummaryContent,\n\tISummaryHandle,\n\tISummaryNack,\n\tISummaryProposal,\n\tISummaryTree,\n\tITokenClaims,\n\tITrace,\n\tITree,\n\tITreeEntry,\n\tIUploadedSummaryDetails,\n\tIUser,\n\tIVersion,\n\tSummaryObject,\n\tSummaryTree,\n\tSummaryTypeNoHandle,\n} from \"./protocol/index.js\";\nexport {\n\tFileMode,\n\tMessageType,\n\tNackErrorType,\n\tScopeType,\n\tSignalType,\n\tSummaryType,\n\tTreeEntry,\n} from \"./protocol/index.js\";\nexport type {\n\tIGitAuthor,\n\tIGitBlob,\n\tIGitCommitDetails,\n\tIGitCommitHash,\n\tIGitCommitter,\n\tIGitCreateBlobParams,\n\tIGitCreateBlobResponse,\n\tIGitCreateTreeEntry,\n\tIGitCreateTreeParams,\n\tIGitTree,\n\tIGitTreeEntry,\n} from \"./git/index.js\";\n"]}
|
package/dist/legacy.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ export {
|
|
|
40
40
|
IAuthorizationError,
|
|
41
41
|
IBlob,
|
|
42
42
|
IBranchOrigin,
|
|
43
|
+
ICacheEntry,
|
|
43
44
|
IClientConfiguration,
|
|
44
45
|
ICommittedProposal,
|
|
45
46
|
IConnect,
|
|
@@ -59,10 +60,13 @@ export {
|
|
|
59
60
|
IDocumentStorageServicePolicies,
|
|
60
61
|
IDriverBasicError,
|
|
61
62
|
IDriverErrorBase,
|
|
63
|
+
IEntry,
|
|
64
|
+
IFileEntry,
|
|
62
65
|
IGenericNetworkError,
|
|
63
66
|
ILocationRedirectionError,
|
|
64
67
|
INack,
|
|
65
68
|
INackContent,
|
|
69
|
+
IPersistedCache,
|
|
66
70
|
IProcessMessageResult,
|
|
67
71
|
IProposal,
|
|
68
72
|
IQuorum,
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
import type { IResolvedUrl } from "./urlResolver.js";
|
|
6
|
+
/**
|
|
7
|
+
* File / container identifier.
|
|
8
|
+
* There is overlapping information here - host can use all of it or parts
|
|
9
|
+
* to implement storage / identify files.
|
|
10
|
+
* @legacy @beta
|
|
11
|
+
*/
|
|
12
|
+
export interface IFileEntry {
|
|
13
|
+
/**
|
|
14
|
+
* Unique and stable ID of the document.
|
|
15
|
+
* Driver guarantees that docId is stable ID uniquely identifying document.
|
|
16
|
+
*/
|
|
17
|
+
docId: string;
|
|
18
|
+
/**
|
|
19
|
+
* Resolved URI is provided for additional versatility - host can use it to
|
|
20
|
+
* identify file in storage, and (as example) delete all cached entries for
|
|
21
|
+
* a file if user requests so.
|
|
22
|
+
* This is IOdspResolvedUrl in case of ODSP driver.
|
|
23
|
+
*/
|
|
24
|
+
resolvedUrl: IResolvedUrl;
|
|
25
|
+
/**
|
|
26
|
+
* Optional version of the file.
|
|
27
|
+
*/
|
|
28
|
+
fileVersion?: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Cache entry. Identifies file that this entry belongs to, and type of content stored in it.
|
|
32
|
+
* @legacy @beta
|
|
33
|
+
*/
|
|
34
|
+
export interface IEntry {
|
|
35
|
+
/**
|
|
36
|
+
* Identifies type of entry for a given file.
|
|
37
|
+
* Each file can have multiple types of entries associated with it.
|
|
38
|
+
* For example, it can be snapshot, blob, ops, etc.
|
|
39
|
+
*/
|
|
40
|
+
type: string;
|
|
41
|
+
/**
|
|
42
|
+
* Identifies individual entry for a given file and type.
|
|
43
|
+
* Each file can have multiple cache entries associated with it.
|
|
44
|
+
* This property identifies a particular instance of entry.
|
|
45
|
+
* For example, for blobs it will be unique ID of the blob in a file.
|
|
46
|
+
* For batch of ops, it can be starting op sequence number.
|
|
47
|
+
* For types that have only one entry (like snapshots), it will be empty string.
|
|
48
|
+
*/
|
|
49
|
+
key: string;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Cache entry. Identifies file that this entry belongs to, and type of content stored in it.
|
|
53
|
+
* @legacy @beta
|
|
54
|
+
*/
|
|
55
|
+
export interface ICacheEntry extends IEntry {
|
|
56
|
+
/**
|
|
57
|
+
* Identifies file in storage this cached entry is for
|
|
58
|
+
*/
|
|
59
|
+
file: IFileEntry;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Persistent cache. This interface can be implemented by the host to provide durable caching
|
|
63
|
+
* across sessions. If not provided at driver factory construction, factory will use in-memory
|
|
64
|
+
* cache implementation that does not survive across sessions. Snapshot entires stored in the
|
|
65
|
+
* IPersistedCache will be considered stale and removed after 2 days. Read the README for more
|
|
66
|
+
* information.
|
|
67
|
+
* @legacy @beta
|
|
68
|
+
*/
|
|
69
|
+
export interface IPersistedCache {
|
|
70
|
+
/**
|
|
71
|
+
* Get the cache value of the key
|
|
72
|
+
* @param entry - cache entry, identifies file and particular key for this file.
|
|
73
|
+
* @returns Cached value. undefined if nothing is cached.
|
|
74
|
+
*/
|
|
75
|
+
get(entry: ICacheEntry): Promise<unknown>;
|
|
76
|
+
/**
|
|
77
|
+
* Put the value into cache.
|
|
78
|
+
* Important - only serializable content is allowed since this cache may be persisted between sessions
|
|
79
|
+
* @param entry - cache entry.
|
|
80
|
+
* @param value - JSON-serializable content.
|
|
81
|
+
*/
|
|
82
|
+
put(entry: ICacheEntry, value: unknown): Promise<void>;
|
|
83
|
+
/**
|
|
84
|
+
* Removes the entries from the cache for given parameters.
|
|
85
|
+
* @param file - file entry to be deleted.
|
|
86
|
+
*/
|
|
87
|
+
removeEntries(file: IFileEntry): Promise<void>;
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=cacheDefinitions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cacheDefinitions.d.ts","sourceRoot":"","sources":["../src/cacheDefinitions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IAC1B;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,WAAW,EAAE,YAAY,CAAC;IAE1B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,MAAM;IACtB;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;;;;OAOG;IACH,GAAG,EAAE,MAAM,CAAC;CACZ;AAED;;;GAGG;AACH,MAAM,WAAW,WAAY,SAAQ,MAAM;IAC1C;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;CACjB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,eAAe;IAC/B;;;;OAIG;IACH,GAAG,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAE1C;;;;;OAKG;IACH,GAAG,CAAC,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvD;;;OAGG;IACH,aAAa,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cacheDefinitions.js","sourceRoot":"","sources":["../src/cacheDefinitions.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IResolvedUrl } from \"./urlResolver.js\";\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 * @legacy @beta\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\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 */\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: string;\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 */\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 */\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<unknown>;\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: unknown): 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
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
+
export type { ICacheEntry, IEntry, IFileEntry, IPersistedCache, } from "./cacheDefinitions.js";
|
|
5
6
|
export type { DriverError, IAnyDriverError, IAuthorizationError, IDriverErrorBase, IDriverBasicError, IGenericNetworkError, ILocationRedirectionError, IThrottlingWarning, } from "./driverError.js";
|
|
6
7
|
export { DriverErrorTypes } from "./driverError.js";
|
|
7
8
|
export type { FiveDaysMs, IDeltasFetchResult, IDeltaStorageService, IDocumentDeltaConnection, IDocumentDeltaConnectionEvents, IDocumentDeltaStorageService, IDocumentService, IDocumentServiceEvents, IDocumentServiceFactory, IDocumentServicePolicies, IDocumentStorageService, IDocumentStorageServicePolicies, ISnapshot, ISnapshotFetchOptions, IStream, IStreamResult, ISummaryContext, } from "./storage.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,YAAY,EACX,WAAW,EACX,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,yBAAyB,EACzB,kBAAkB,GAClB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,YAAY,EACX,UAAU,EACV,kBAAkB,EAClB,oBAAoB,EACpB,wBAAwB,EACxB,8BAA8B,EAC9B,4BAA4B,EAC5B,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,EACvB,+BAA+B,EAC/B,SAAS,EACT,qBAAqB,EACrB,OAAO,EACP,aAAa,EACb,eAAe,GACf,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAChE,YAAY,EACX,kBAAkB,EAClB,qBAAqB,EACrB,aAAa,EACb,YAAY,EACZ,YAAY,GACZ,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,YAAY,EACX,cAAc,EACd,iBAAiB,EACjB,WAAW,EACX,KAAK,EACL,aAAa,EACb,aAAa,EACb,OAAO,EACP,oBAAoB,EACpB,cAAc,EACd,WAAW,EACX,kBAAkB,EAClB,QAAQ,EACR,UAAU,EACV,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,sBAAsB,EACtB,KAAK,EACL,YAAY,EACZ,qBAAqB,EACrB,SAAS,EACT,cAAc,EACd,OAAO,EACP,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,kCAAkC,EAClC,yBAAyB,EACzB,qCAAqC,EACrC,+BAA+B,EAC/B,kBAAkB,EAClB,YAAY,EACZ,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,eAAe,EACf,OAAO,EACP,WAAW,EACX,kBAAkB,EAClB,YAAY,EACZ,eAAe,EACf,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,MAAM,EACN,KAAK,EACL,UAAU,EACV,uBAAuB,EACvB,KAAK,EACL,QAAQ,EACR,aAAa,EACb,WAAW,EACX,mBAAmB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACN,QAAQ,EACR,WAAW,EACX,aAAa,EACb,SAAS,EACT,UAAU,EACV,WAAW,EACX,SAAS,GACT,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACX,UAAU,EACV,QAAQ,EACR,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,EACnB,oBAAoB,EACpB,QAAQ,EACR,aAAa,GACb,MAAM,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,YAAY,EACX,WAAW,EACX,MAAM,EACN,UAAU,EACV,eAAe,GACf,MAAM,uBAAuB,CAAC;AAE/B,YAAY,EACX,WAAW,EACX,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,yBAAyB,EACzB,kBAAkB,GAClB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,YAAY,EACX,UAAU,EACV,kBAAkB,EAClB,oBAAoB,EACpB,wBAAwB,EACxB,8BAA8B,EAC9B,4BAA4B,EAC5B,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,EACvB,+BAA+B,EAC/B,SAAS,EACT,qBAAqB,EACrB,OAAO,EACP,aAAa,EACb,eAAe,GACf,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAChE,YAAY,EACX,kBAAkB,EAClB,qBAAqB,EACrB,aAAa,EACb,YAAY,EACZ,YAAY,GACZ,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,YAAY,EACX,cAAc,EACd,iBAAiB,EACjB,WAAW,EACX,KAAK,EACL,aAAa,EACb,aAAa,EACb,OAAO,EACP,oBAAoB,EACpB,cAAc,EACd,WAAW,EACX,kBAAkB,EAClB,QAAQ,EACR,UAAU,EACV,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,sBAAsB,EACtB,KAAK,EACL,YAAY,EACZ,qBAAqB,EACrB,SAAS,EACT,cAAc,EACd,OAAO,EACP,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,kCAAkC,EAClC,yBAAyB,EACzB,qCAAqC,EACrC,+BAA+B,EAC/B,kBAAkB,EAClB,YAAY,EACZ,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,eAAe,EACf,OAAO,EACP,WAAW,EACX,kBAAkB,EAClB,YAAY,EACZ,eAAe,EACf,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,MAAM,EACN,KAAK,EACL,UAAU,EACV,uBAAuB,EACvB,KAAK,EACL,QAAQ,EACR,aAAa,EACb,WAAW,EACX,mBAAmB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACN,QAAQ,EACR,WAAW,EACX,aAAa,EACb,SAAS,EACT,UAAU,EACV,WAAW,EACX,SAAS,GACT,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACX,UAAU,EACV,QAAQ,EACR,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,EACnB,oBAAoB,EACpB,QAAQ,EACR,aAAa,GACb,MAAM,gBAAgB,CAAC"}
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAmBH,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAoBpD,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAQhE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AA6DhD,OAAO,EACN,QAAQ,EACR,WAAW,EACX,aAAa,EACb,SAAS,EACT,UAAU,EACV,WAAW,EACX,SAAS,GACT,MAAM,qBAAqB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport type {\n\tICacheEntry,\n\tIEntry,\n\tIFileEntry,\n\tIPersistedCache,\n} from \"./cacheDefinitions.js\";\n\nexport type {\n\tDriverError,\n\tIAnyDriverError,\n\tIAuthorizationError,\n\tIDriverErrorBase,\n\tIDriverBasicError,\n\tIGenericNetworkError,\n\tILocationRedirectionError,\n\tIThrottlingWarning,\n} from \"./driverError.js\";\nexport { DriverErrorTypes } from \"./driverError.js\";\nexport type {\n\tFiveDaysMs,\n\tIDeltasFetchResult,\n\tIDeltaStorageService,\n\tIDocumentDeltaConnection,\n\tIDocumentDeltaConnectionEvents,\n\tIDocumentDeltaStorageService,\n\tIDocumentService,\n\tIDocumentServiceEvents,\n\tIDocumentServiceFactory,\n\tIDocumentServicePolicies,\n\tIDocumentStorageService,\n\tIDocumentStorageServicePolicies,\n\tISnapshot,\n\tISnapshotFetchOptions,\n\tIStream,\n\tIStreamResult,\n\tISummaryContext,\n} from \"./storage.js\";\nexport { FetchSource, LoaderCachingPolicy } from \"./storage.js\";\nexport type {\n\tDriverPreCheckInfo,\n\tIContainerPackageInfo,\n\tIDriverHeader,\n\tIResolvedUrl,\n\tIUrlResolver,\n} from \"./urlResolver.js\";\nexport { DriverHeader } from \"./urlResolver.js\";\n\nexport type {\n\tConnectionMode,\n\tIApprovedProposal,\n\tIAttachment,\n\tIBlob,\n\tIBranchOrigin,\n\tICapabilities,\n\tIClient,\n\tIClientConfiguration,\n\tIClientDetails,\n\tIClientJoin,\n\tICommittedProposal,\n\tIConnect,\n\tIConnected,\n\tICreateBlobResponse,\n\tIDocumentAttributes,\n\tIDocumentMessage,\n\tIDocumentSystemMessage,\n\tINack,\n\tINackContent,\n\tIProcessMessageResult,\n\tIProposal,\n\tIProtocolState,\n\tIQuorum,\n\tIQuorumClients,\n\tIQuorumProposals,\n\tISentSignalMessage,\n\tISequencedClient,\n\tISequencedDocumentAugmentedMessage,\n\tISequencedDocumentMessage,\n\tISequencedDocumentMessageExperimental,\n\tISequencedDocumentSystemMessage,\n\tISequencedProposal,\n\tIServerError,\n\tISignalClient,\n\tISignalMessage,\n\tISignalMessageBase,\n\tISnapshotTree,\n\tISnapshotTreeEx,\n\tIsoDate,\n\tISummaryAck,\n\tISummaryAttachment,\n\tISummaryBlob,\n\tISummaryContent,\n\tISummaryHandle,\n\tISummaryNack,\n\tISummaryProposal,\n\tISummaryTree,\n\tITokenClaims,\n\tITrace,\n\tITree,\n\tITreeEntry,\n\tIUploadedSummaryDetails,\n\tIUser,\n\tIVersion,\n\tSummaryObject,\n\tSummaryTree,\n\tSummaryTypeNoHandle,\n} from \"./protocol/index.js\";\nexport {\n\tFileMode,\n\tMessageType,\n\tNackErrorType,\n\tScopeType,\n\tSignalType,\n\tSummaryType,\n\tTreeEntry,\n} from \"./protocol/index.js\";\nexport type {\n\tIGitAuthor,\n\tIGitBlob,\n\tIGitCommitDetails,\n\tIGitCommitHash,\n\tIGitCommitter,\n\tIGitCreateBlobParams,\n\tIGitCreateBlobResponse,\n\tIGitCreateTreeEntry,\n\tIGitCreateTreeParams,\n\tIGitTree,\n\tIGitTreeEntry,\n} from \"./git/index.js\";\n"]}
|
package/lib/legacy.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ export {
|
|
|
40
40
|
IAuthorizationError,
|
|
41
41
|
IBlob,
|
|
42
42
|
IBranchOrigin,
|
|
43
|
+
ICacheEntry,
|
|
43
44
|
IClientConfiguration,
|
|
44
45
|
ICommittedProposal,
|
|
45
46
|
IConnect,
|
|
@@ -59,10 +60,13 @@ export {
|
|
|
59
60
|
IDocumentStorageServicePolicies,
|
|
60
61
|
IDriverBasicError,
|
|
61
62
|
IDriverErrorBase,
|
|
63
|
+
IEntry,
|
|
64
|
+
IFileEntry,
|
|
62
65
|
IGenericNetworkError,
|
|
63
66
|
ILocationRedirectionError,
|
|
64
67
|
INack,
|
|
65
68
|
INackContent,
|
|
69
|
+
IPersistedCache,
|
|
66
70
|
IProcessMessageResult,
|
|
67
71
|
IProposal,
|
|
68
72
|
IQuorum,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/driver-definitions",
|
|
3
|
-
"version": "2.62.0
|
|
3
|
+
"version": "2.62.0",
|
|
4
4
|
"description": "Fluid driver definitions",
|
|
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/core-interfaces": "2.62.0
|
|
50
|
+
"@fluidframework/core-interfaces": "~2.62.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@arethetypeswrong/cli": "^0.17.1",
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { IResolvedUrl } from "./urlResolver.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* File / container identifier.
|
|
10
|
+
* There is overlapping information here - host can use all of it or parts
|
|
11
|
+
* to implement storage / identify files.
|
|
12
|
+
* @legacy @beta
|
|
13
|
+
*/
|
|
14
|
+
export interface IFileEntry {
|
|
15
|
+
/**
|
|
16
|
+
* Unique and stable ID of the document.
|
|
17
|
+
* Driver guarantees that docId is stable ID uniquely identifying document.
|
|
18
|
+
*/
|
|
19
|
+
docId: string;
|
|
20
|
+
/**
|
|
21
|
+
* Resolved URI is provided for additional versatility - host can use it to
|
|
22
|
+
* identify file in storage, and (as example) delete all cached entries for
|
|
23
|
+
* a file if user requests so.
|
|
24
|
+
* This is IOdspResolvedUrl in case of ODSP driver.
|
|
25
|
+
*/
|
|
26
|
+
resolvedUrl: IResolvedUrl;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Optional version of the file.
|
|
30
|
+
*/
|
|
31
|
+
fileVersion?: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Cache entry. Identifies file that this entry belongs to, and type of content stored in it.
|
|
36
|
+
* @legacy @beta
|
|
37
|
+
*/
|
|
38
|
+
export interface IEntry {
|
|
39
|
+
/**
|
|
40
|
+
* Identifies type of entry for a given file.
|
|
41
|
+
* Each file can have multiple types of entries associated with it.
|
|
42
|
+
* For example, it can be snapshot, blob, ops, etc.
|
|
43
|
+
*/
|
|
44
|
+
type: string;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Identifies individual entry for a given file and type.
|
|
48
|
+
* Each file can have multiple cache entries associated with it.
|
|
49
|
+
* This property identifies a particular instance of entry.
|
|
50
|
+
* For example, for blobs it will be unique ID of the blob in a file.
|
|
51
|
+
* For batch of ops, it can be starting op sequence number.
|
|
52
|
+
* For types that have only one entry (like snapshots), it will be empty string.
|
|
53
|
+
*/
|
|
54
|
+
key: string;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Cache entry. Identifies file that this entry belongs to, and type of content stored in it.
|
|
59
|
+
* @legacy @beta
|
|
60
|
+
*/
|
|
61
|
+
export interface ICacheEntry extends IEntry {
|
|
62
|
+
/**
|
|
63
|
+
* Identifies file in storage this cached entry is for
|
|
64
|
+
*/
|
|
65
|
+
file: IFileEntry;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Persistent cache. This interface can be implemented by the host to provide durable caching
|
|
70
|
+
* across sessions. If not provided at driver factory construction, factory will use in-memory
|
|
71
|
+
* cache implementation that does not survive across sessions. Snapshot entires stored in the
|
|
72
|
+
* IPersistedCache will be considered stale and removed after 2 days. Read the README for more
|
|
73
|
+
* information.
|
|
74
|
+
* @legacy @beta
|
|
75
|
+
*/
|
|
76
|
+
export interface IPersistedCache {
|
|
77
|
+
/**
|
|
78
|
+
* Get the cache value of the key
|
|
79
|
+
* @param entry - cache entry, identifies file and particular key for this file.
|
|
80
|
+
* @returns Cached value. undefined if nothing is cached.
|
|
81
|
+
*/
|
|
82
|
+
get(entry: ICacheEntry): Promise<unknown>;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Put the value into cache.
|
|
86
|
+
* Important - only serializable content is allowed since this cache may be persisted between sessions
|
|
87
|
+
* @param entry - cache entry.
|
|
88
|
+
* @param value - JSON-serializable content.
|
|
89
|
+
*/
|
|
90
|
+
put(entry: ICacheEntry, value: unknown): Promise<void>;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Removes the entries from the cache for given parameters.
|
|
94
|
+
* @param file - file entry to be deleted.
|
|
95
|
+
*/
|
|
96
|
+
removeEntries(file: IFileEntry): Promise<void>;
|
|
97
|
+
}
|