@fluidframework/register-collection 2.0.0-dev-rc.3.0.0.254513 → 2.0.0-dev-rc.3.0.0.254674

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.
@@ -0,0 +1,18 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluidframework/build-tools.
9
+ */
10
+ export {
11
+ // alpha APIs
12
+ ConsensusRegisterCollection,
13
+ ConsensusRegisterCollectionFactory,
14
+ IConsensusRegisterCollection,
15
+ IConsensusRegisterCollectionEvents,
16
+ IConsensusRegisterCollectionFactory,
17
+ ReadPolicy
18
+ } from "./index.js";
package/dist/beta.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluidframework/build-tools.
9
+ */
@@ -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/register-collection";
8
- export declare const pkgVersion = "2.0.0-dev-rc.3.0.0.254513";
8
+ export declare const pkgVersion = "2.0.0-dev-rc.3.0.0.254674";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -8,5 +8,5 @@
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.pkgVersion = exports.pkgName = void 0;
10
10
  exports.pkgName = "@fluidframework/register-collection";
11
- exports.pkgVersion = "2.0.0-dev-rc.3.0.0.254513";
11
+ exports.pkgVersion = "2.0.0-dev-rc.3.0.0.254674";
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,qCAAqC,CAAC;AAChD,QAAA,UAAU,GAAG,2BAA2B,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/register-collection\";\nexport const pkgVersion = \"2.0.0-dev-rc.3.0.0.254513\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,qCAAqC,CAAC;AAChD,QAAA,UAAU,GAAG,2BAA2B,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/register-collection\";\nexport const pkgVersion = \"2.0.0-dev-rc.3.0.0.254674\";\n"]}
@@ -0,0 +1,9 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluidframework/build-tools.
9
+ */
package/lib/alpha.d.ts ADDED
@@ -0,0 +1,18 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluidframework/build-tools.
9
+ */
10
+ export {
11
+ // alpha APIs
12
+ ConsensusRegisterCollection,
13
+ ConsensusRegisterCollectionFactory,
14
+ IConsensusRegisterCollection,
15
+ IConsensusRegisterCollectionEvents,
16
+ IConsensusRegisterCollectionFactory,
17
+ ReadPolicy
18
+ } from "./index.js";
package/lib/beta.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluidframework/build-tools.
9
+ */
@@ -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/register-collection";
8
- export declare const pkgVersion = "2.0.0-dev-rc.3.0.0.254513";
8
+ export declare const pkgVersion = "2.0.0-dev-rc.3.0.0.254674";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export const pkgName = "@fluidframework/register-collection";
8
- export const pkgVersion = "2.0.0-dev-rc.3.0.0.254513";
8
+ export const pkgVersion = "2.0.0-dev-rc.3.0.0.254674";
9
9
  //# sourceMappingURL=packageVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,qCAAqC,CAAC;AAC7D,MAAM,CAAC,MAAM,UAAU,GAAG,2BAA2B,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/register-collection\";\nexport const pkgVersion = \"2.0.0-dev-rc.3.0.0.254513\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,qCAAqC,CAAC;AAC7D,MAAM,CAAC,MAAM,UAAU,GAAG,2BAA2B,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/register-collection\";\nexport const pkgVersion = \"2.0.0-dev-rc.3.0.0.254674\";\n"]}
@@ -0,0 +1,9 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluidframework/build-tools.
9
+ */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/register-collection",
3
- "version": "2.0.0-dev-rc.3.0.0.254513",
3
+ "version": "2.0.0-dev-rc.3.0.0.254674",
4
4
  "description": "Consensus Register",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -15,21 +15,21 @@
15
15
  "exports": {
16
16
  ".": {
17
17
  "import": {
18
- "types": "./lib/register-collection-public.d.ts",
18
+ "types": "./lib/public.d.ts",
19
19
  "default": "./lib/index.js"
20
20
  },
21
21
  "require": {
22
- "types": "./dist/register-collection-public.d.ts",
22
+ "types": "./dist/public.d.ts",
23
23
  "default": "./dist/index.js"
24
24
  }
25
25
  },
26
26
  "./alpha": {
27
27
  "import": {
28
- "types": "./lib/register-collection-alpha.d.ts",
28
+ "types": "./lib/alpha.d.ts",
29
29
  "default": "./lib/index.js"
30
30
  },
31
31
  "require": {
32
- "types": "./dist/register-collection-alpha.d.ts",
32
+ "types": "./dist/alpha.d.ts",
33
33
  "default": "./dist/index.js"
34
34
  }
35
35
  },
@@ -45,7 +45,7 @@
45
45
  }
46
46
  },
47
47
  "main": "dist/index.js",
48
- "types": "./dist/register-collection-public.d.ts",
48
+ "types": "./dist/public.d.ts",
49
49
  "c8": {
50
50
  "all": true,
51
51
  "cache-dir": "nyc/.cache",
@@ -67,26 +67,26 @@
67
67
  "temp-directory": "nyc/.nyc_output"
68
68
  },
69
69
  "dependencies": {
70
- "@fluid-internal/client-utils": "2.0.0-dev-rc.3.0.0.254513",
71
- "@fluidframework/core-interfaces": "2.0.0-dev-rc.3.0.0.254513",
72
- "@fluidframework/core-utils": "2.0.0-dev-rc.3.0.0.254513",
73
- "@fluidframework/datastore-definitions": "2.0.0-dev-rc.3.0.0.254513",
74
- "@fluidframework/driver-utils": "2.0.0-dev-rc.3.0.0.254513",
70
+ "@fluid-internal/client-utils": "2.0.0-dev-rc.3.0.0.254674",
71
+ "@fluidframework/core-interfaces": "2.0.0-dev-rc.3.0.0.254674",
72
+ "@fluidframework/core-utils": "2.0.0-dev-rc.3.0.0.254674",
73
+ "@fluidframework/datastore-definitions": "2.0.0-dev-rc.3.0.0.254674",
74
+ "@fluidframework/driver-utils": "2.0.0-dev-rc.3.0.0.254674",
75
75
  "@fluidframework/protocol-definitions": "^3.2.0",
76
- "@fluidframework/runtime-definitions": "2.0.0-dev-rc.3.0.0.254513",
77
- "@fluidframework/shared-object-base": "2.0.0-dev-rc.3.0.0.254513"
76
+ "@fluidframework/runtime-definitions": "2.0.0-dev-rc.3.0.0.254674",
77
+ "@fluidframework/shared-object-base": "2.0.0-dev-rc.3.0.0.254674"
78
78
  },
79
79
  "devDependencies": {
80
80
  "@arethetypeswrong/cli": "^0.15.2",
81
81
  "@biomejs/biome": "^1.6.2",
82
- "@fluid-internal/mocha-test-setup": "2.0.0-dev-rc.3.0.0.254513",
83
- "@fluid-private/test-dds-utils": "2.0.0-dev-rc.3.0.0.254513",
82
+ "@fluid-internal/mocha-test-setup": "2.0.0-dev-rc.3.0.0.254674",
83
+ "@fluid-private/test-dds-utils": "2.0.0-dev-rc.3.0.0.254674",
84
84
  "@fluid-tools/build-cli": "^0.35.0",
85
85
  "@fluidframework/build-common": "^2.0.3",
86
86
  "@fluidframework/build-tools": "^0.35.0",
87
87
  "@fluidframework/eslint-config-fluid": "^5.1.0",
88
88
  "@fluidframework/register-collection-previous": "npm:@fluidframework/register-collection@2.0.0-internal.8.0.0",
89
- "@fluidframework/test-runtime-utils": "2.0.0-dev-rc.3.0.0.254513",
89
+ "@fluidframework/test-runtime-utils": "2.0.0-dev-rc.3.0.0.254674",
90
90
  "@microsoft/api-extractor": "^7.42.3",
91
91
  "@types/mocha": "^9.1.1",
92
92
  "@types/node": "^18.19.0",
@@ -103,29 +103,17 @@
103
103
  "rimraf": "^4.4.0",
104
104
  "typescript": "~5.1.6"
105
105
  },
106
- "fluidBuild": {
107
- "tasks": {
108
- "build:docs": {
109
- "dependsOn": [
110
- "...",
111
- "api-extractor:commonjs",
112
- "api-extractor:esnext"
113
- ],
114
- "script": false
115
- }
116
- }
117
- },
118
106
  "typeValidation": {
119
107
  "broken": {}
120
108
  },
121
109
  "scripts": {
122
110
  "api": "fluid-build . --task api",
123
- "api-extractor:commonjs": "api-extractor run --config ./api-extractor-cjs.json",
124
- "api-extractor:esnext": "api-extractor run --local",
111
+ "api-extractor:commonjs": "flub generate entrypoints --outDir ./dist",
112
+ "api-extractor:esnext": "flub generate entrypoints --outDir ./lib",
125
113
  "build": "fluid-build . --task build",
126
114
  "build:commonjs": "fluid-build . --task commonjs",
127
115
  "build:compile": "fluid-build . --task compile",
128
- "build:docs": "fluid-build . --task api",
116
+ "build:docs": "api-extractor run --local",
129
117
  "build:esnext": "tsc --project ./tsconfig.json",
130
118
  "build:genver": "gen-version",
131
119
  "build:test": "npm run build:test:esm && npm run build:test:cjs",
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/register-collection";
9
- export const pkgVersion = "2.0.0-dev-rc.3.0.0.254513";
9
+ export const pkgVersion = "2.0.0-dev-rc.3.0.0.254674";
@@ -1,8 +0,0 @@
1
- {
2
- "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
- "extends": "../../../common/build/build-common/api-extractor-base.cjs.primary.json",
4
- // CJS is actually secondary; so, no report.
5
- "apiReport": {
6
- "enabled": false
7
- }
8
- }
@@ -1,163 +0,0 @@
1
- import { IChannelAttributes } from '@fluidframework/datastore-definitions';
2
- import { IChannelFactory } from '@fluidframework/datastore-definitions';
3
- import { IChannelServices } from '@fluidframework/datastore-definitions';
4
- import { IChannelStorageService } from '@fluidframework/datastore-definitions';
5
- import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
6
- import { IFluidSerializer } from '@fluidframework/shared-object-base';
7
- import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
8
- import { ISharedObject } from '@fluidframework/shared-object-base';
9
- import { ISharedObjectEvents } from '@fluidframework/shared-object-base';
10
- import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
11
- import { SharedObject } from '@fluidframework/shared-object-base/internal';
12
-
13
- /**
14
- * {@inheritDoc IConsensusRegisterCollection}
15
- * @alpha
16
- */
17
- export declare class ConsensusRegisterCollection<T> extends SharedObject<IConsensusRegisterCollectionEvents> implements IConsensusRegisterCollection<T> {
18
- /**
19
- * Create a new consensus register collection
20
- *
21
- * @param runtime - data store runtime the new consensus register collection belongs to
22
- * @param id - optional name of the consensus register collection
23
- * @returns newly create consensus register collection (but not attached yet)
24
- */
25
- static create<T>(runtime: IFluidDataStoreRuntime, id?: string): ConsensusRegisterCollection<T>;
26
- /**
27
- * Get a factory for ConsensusRegisterCollection to register with the data store.
28
- *
29
- * @returns a factory that creates and load ConsensusRegisterCollection
30
- */
31
- static getFactory(): ConsensusRegisterCollectionFactory;
32
- private readonly data;
33
- /**
34
- * Constructs a new consensus register collection. If the object is non-local an id and service interfaces will
35
- * be provided
36
- */
37
- constructor(id: string, runtime: IFluidDataStoreRuntime, attributes: IChannelAttributes);
38
- /**
39
- * Creates a new register or writes a new value.
40
- * Returns a promise that will resolve when the write is acked.
41
- *
42
- * @returns Promise<true> if write was non-concurrent
43
- */
44
- write(key: string, value: T): Promise<boolean>;
45
- /**
46
- * Returns the most recent local value of a register.
47
- * @param key - The key to read
48
- * @param readPolicy - The ReadPolicy to apply. Defaults to Atomic.
49
- */
50
- read(key: string, readPolicy?: ReadPolicy): T | undefined;
51
- readVersions(key: string): T[] | undefined;
52
- keys(): string[];
53
- protected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats;
54
- /**
55
- * {@inheritDoc @fluidframework/shared-object-base#SharedObject.loadCore}
56
- */
57
- protected loadCore(storage: IChannelStorageService): Promise<void>;
58
- protected onDisconnect(): void;
59
- protected processCore(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void;
60
- private readAtomic;
61
- /**
62
- * Process an inbound write op
63
- * @param key - Key that was written to
64
- * @param value - Incoming value
65
- * @param refSeq - RefSeq at the time of write on the remote client
66
- * @param sequenceNumber - Sequence Number of this write op
67
- * @param local - Did this write originate on this client
68
- */
69
- private processInboundWrite;
70
- private stringify;
71
- private parse;
72
- protected applyStashedOp(): void;
73
- }
74
-
75
- /**
76
- * The factory that defines the consensus queue.
77
- * @alpha
78
- */
79
- export declare class ConsensusRegisterCollectionFactory implements IConsensusRegisterCollectionFactory {
80
- static Type: string;
81
- static readonly Attributes: IChannelAttributes;
82
- get type(): string;
83
- get attributes(): IChannelAttributes;
84
- /**
85
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}
86
- */
87
- load(runtime: IFluidDataStoreRuntime, id: string, services: IChannelServices, attributes: IChannelAttributes): Promise<IConsensusRegisterCollection>;
88
- create(document: IFluidDataStoreRuntime, id: string): IConsensusRegisterCollection;
89
- }
90
-
91
- /**
92
- * A distributed data structure that holds a set of registers with update
93
- * versions. On concurrent updates, a register internally stores all possible versions of a value by using reference
94
- * sequence number of the incoming update.
95
- *
96
- * Using all the stored versions, we can then distinguish amongst different read policies. Below are the policies
97
- * we support:
98
- *
99
- * Atomic: Atomicity requires a linearizable register. A linearizable register behaves as if there is only a single
100
- * copy of the data, and that every operation appears to take effect atomically at one point in time. This definition
101
- * implies that operations are executed in an well-defined order. On a concurrent update, we perform a compare-and-set
102
- * operation, where we compare a register sequence number with the incoming reference sequence number.
103
- * The earliest operation overwriting prior sequence numbers wins since every client reaches to an agreement on
104
- * the value. So we can safely return the first value.
105
- *
106
- * LWW: The last write to a key always wins.
107
- * @alpha
108
- */
109
- export declare interface IConsensusRegisterCollection<T = any> extends ISharedObject<IConsensusRegisterCollectionEvents> {
110
- /**
111
- * Attempts to write a register with a value. Returns a promise to indicate the roundtrip completion.
112
- * For a non existent register, it will attempt to create a new register with the specified value.
113
- *
114
- * @returns Promise<true> if write was non-concurrent
115
- */
116
- write(key: string, value: T): Promise<boolean>;
117
- /**
118
- * Retrieves the agreed upon value for the register based on policy. Returns undefined if not present.
119
- */
120
- read(key: string, policy?: ReadPolicy): T | undefined;
121
- /**
122
- * Retrives all concurrent versions. Undefined if not present.
123
- */
124
- readVersions(key: string): T[] | undefined;
125
- /**
126
- * Returns the keys.
127
- */
128
- keys(): string[];
129
- }
130
-
131
- /**
132
- * Events emitted by {@link IConsensusRegisterCollection}.
133
- * @alpha
134
- */
135
- export declare interface IConsensusRegisterCollectionEvents extends ISharedObjectEvents {
136
- (event: "atomicChanged" | "versionChanged", listener: (key: string, value: any, local: boolean) => void): any;
137
- }
138
-
139
- /**
140
- * Consensus Register Collection channel factory interface
141
- *
142
- * Extends the base IChannelFactory to return a more definite type of IConsensusRegisterCollection
143
- * Use for the runtime to create and load distributed data structure by type name of each channel.
144
- * @alpha
145
- */
146
- export declare interface IConsensusRegisterCollectionFactory extends IChannelFactory {
147
- /**
148
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}
149
- */
150
- load(document: IFluidDataStoreRuntime, id: string, services: IChannelServices, attributes: IChannelAttributes): Promise<IConsensusRegisterCollection>;
151
- create(document: IFluidDataStoreRuntime, id: string): IConsensusRegisterCollection;
152
- }
153
-
154
- /**
155
- * Read policies used when reading the map value.
156
- * @alpha
157
- */
158
- export declare enum ReadPolicy {
159
- Atomic = 0,
160
- LWW = 1
161
- }
162
-
163
- export { }
@@ -1,27 +0,0 @@
1
- import { IChannelAttributes } from '@fluidframework/datastore-definitions';
2
- import { IChannelFactory } from '@fluidframework/datastore-definitions';
3
- import { IChannelServices } from '@fluidframework/datastore-definitions';
4
- import { IChannelStorageService } from '@fluidframework/datastore-definitions';
5
- import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
6
- import { IFluidSerializer } from '@fluidframework/shared-object-base';
7
- import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
8
- import { ISharedObject } from '@fluidframework/shared-object-base';
9
- import { ISharedObjectEvents } from '@fluidframework/shared-object-base';
10
- import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
11
- import { SharedObject } from '@fluidframework/shared-object-base/internal';
12
-
13
- /* Excluded from this release type: ConsensusRegisterCollection */
14
-
15
- /* Excluded from this release type: ConsensusRegisterCollectionFactory */
16
-
17
- /* Excluded from this release type: IConsensusRegisterCollection */
18
-
19
- /* Excluded from this release type: IConsensusRegisterCollectionEvents */
20
-
21
- /* Excluded from this release type: IConsensusRegisterCollectionFactory */
22
-
23
- /* Excluded from this release type: ReadPolicy */
24
-
25
- /* Excluded from this release type: SharedObject */
26
-
27
- export { }
@@ -1,27 +0,0 @@
1
- import { IChannelAttributes } from '@fluidframework/datastore-definitions';
2
- import { IChannelFactory } from '@fluidframework/datastore-definitions';
3
- import { IChannelServices } from '@fluidframework/datastore-definitions';
4
- import { IChannelStorageService } from '@fluidframework/datastore-definitions';
5
- import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
6
- import { IFluidSerializer } from '@fluidframework/shared-object-base';
7
- import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
8
- import { ISharedObject } from '@fluidframework/shared-object-base';
9
- import { ISharedObjectEvents } from '@fluidframework/shared-object-base';
10
- import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
11
- import { SharedObject } from '@fluidframework/shared-object-base/internal';
12
-
13
- /* Excluded from this release type: ConsensusRegisterCollection */
14
-
15
- /* Excluded from this release type: ConsensusRegisterCollectionFactory */
16
-
17
- /* Excluded from this release type: IConsensusRegisterCollection */
18
-
19
- /* Excluded from this release type: IConsensusRegisterCollectionEvents */
20
-
21
- /* Excluded from this release type: IConsensusRegisterCollectionFactory */
22
-
23
- /* Excluded from this release type: ReadPolicy */
24
-
25
- /* Excluded from this release type: SharedObject */
26
-
27
- export { }
@@ -1,163 +0,0 @@
1
- import { IChannelAttributes } from '@fluidframework/datastore-definitions';
2
- import { IChannelFactory } from '@fluidframework/datastore-definitions';
3
- import { IChannelServices } from '@fluidframework/datastore-definitions';
4
- import { IChannelStorageService } from '@fluidframework/datastore-definitions';
5
- import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
6
- import { IFluidSerializer } from '@fluidframework/shared-object-base';
7
- import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
8
- import { ISharedObject } from '@fluidframework/shared-object-base';
9
- import { ISharedObjectEvents } from '@fluidframework/shared-object-base';
10
- import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
11
- import { SharedObject } from '@fluidframework/shared-object-base/internal';
12
-
13
- /**
14
- * {@inheritDoc IConsensusRegisterCollection}
15
- * @alpha
16
- */
17
- export declare class ConsensusRegisterCollection<T> extends SharedObject<IConsensusRegisterCollectionEvents> implements IConsensusRegisterCollection<T> {
18
- /**
19
- * Create a new consensus register collection
20
- *
21
- * @param runtime - data store runtime the new consensus register collection belongs to
22
- * @param id - optional name of the consensus register collection
23
- * @returns newly create consensus register collection (but not attached yet)
24
- */
25
- static create<T>(runtime: IFluidDataStoreRuntime, id?: string): ConsensusRegisterCollection<T>;
26
- /**
27
- * Get a factory for ConsensusRegisterCollection to register with the data store.
28
- *
29
- * @returns a factory that creates and load ConsensusRegisterCollection
30
- */
31
- static getFactory(): ConsensusRegisterCollectionFactory;
32
- private readonly data;
33
- /**
34
- * Constructs a new consensus register collection. If the object is non-local an id and service interfaces will
35
- * be provided
36
- */
37
- constructor(id: string, runtime: IFluidDataStoreRuntime, attributes: IChannelAttributes);
38
- /**
39
- * Creates a new register or writes a new value.
40
- * Returns a promise that will resolve when the write is acked.
41
- *
42
- * @returns Promise<true> if write was non-concurrent
43
- */
44
- write(key: string, value: T): Promise<boolean>;
45
- /**
46
- * Returns the most recent local value of a register.
47
- * @param key - The key to read
48
- * @param readPolicy - The ReadPolicy to apply. Defaults to Atomic.
49
- */
50
- read(key: string, readPolicy?: ReadPolicy): T | undefined;
51
- readVersions(key: string): T[] | undefined;
52
- keys(): string[];
53
- protected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats;
54
- /**
55
- * {@inheritDoc @fluidframework/shared-object-base#SharedObject.loadCore}
56
- */
57
- protected loadCore(storage: IChannelStorageService): Promise<void>;
58
- protected onDisconnect(): void;
59
- protected processCore(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void;
60
- private readAtomic;
61
- /**
62
- * Process an inbound write op
63
- * @param key - Key that was written to
64
- * @param value - Incoming value
65
- * @param refSeq - RefSeq at the time of write on the remote client
66
- * @param sequenceNumber - Sequence Number of this write op
67
- * @param local - Did this write originate on this client
68
- */
69
- private processInboundWrite;
70
- private stringify;
71
- private parse;
72
- protected applyStashedOp(): void;
73
- }
74
-
75
- /**
76
- * The factory that defines the consensus queue.
77
- * @alpha
78
- */
79
- export declare class ConsensusRegisterCollectionFactory implements IConsensusRegisterCollectionFactory {
80
- static Type: string;
81
- static readonly Attributes: IChannelAttributes;
82
- get type(): string;
83
- get attributes(): IChannelAttributes;
84
- /**
85
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}
86
- */
87
- load(runtime: IFluidDataStoreRuntime, id: string, services: IChannelServices, attributes: IChannelAttributes): Promise<IConsensusRegisterCollection>;
88
- create(document: IFluidDataStoreRuntime, id: string): IConsensusRegisterCollection;
89
- }
90
-
91
- /**
92
- * A distributed data structure that holds a set of registers with update
93
- * versions. On concurrent updates, a register internally stores all possible versions of a value by using reference
94
- * sequence number of the incoming update.
95
- *
96
- * Using all the stored versions, we can then distinguish amongst different read policies. Below are the policies
97
- * we support:
98
- *
99
- * Atomic: Atomicity requires a linearizable register. A linearizable register behaves as if there is only a single
100
- * copy of the data, and that every operation appears to take effect atomically at one point in time. This definition
101
- * implies that operations are executed in an well-defined order. On a concurrent update, we perform a compare-and-set
102
- * operation, where we compare a register sequence number with the incoming reference sequence number.
103
- * The earliest operation overwriting prior sequence numbers wins since every client reaches to an agreement on
104
- * the value. So we can safely return the first value.
105
- *
106
- * LWW: The last write to a key always wins.
107
- * @alpha
108
- */
109
- export declare interface IConsensusRegisterCollection<T = any> extends ISharedObject<IConsensusRegisterCollectionEvents> {
110
- /**
111
- * Attempts to write a register with a value. Returns a promise to indicate the roundtrip completion.
112
- * For a non existent register, it will attempt to create a new register with the specified value.
113
- *
114
- * @returns Promise<true> if write was non-concurrent
115
- */
116
- write(key: string, value: T): Promise<boolean>;
117
- /**
118
- * Retrieves the agreed upon value for the register based on policy. Returns undefined if not present.
119
- */
120
- read(key: string, policy?: ReadPolicy): T | undefined;
121
- /**
122
- * Retrives all concurrent versions. Undefined if not present.
123
- */
124
- readVersions(key: string): T[] | undefined;
125
- /**
126
- * Returns the keys.
127
- */
128
- keys(): string[];
129
- }
130
-
131
- /**
132
- * Events emitted by {@link IConsensusRegisterCollection}.
133
- * @alpha
134
- */
135
- export declare interface IConsensusRegisterCollectionEvents extends ISharedObjectEvents {
136
- (event: "atomicChanged" | "versionChanged", listener: (key: string, value: any, local: boolean) => void): any;
137
- }
138
-
139
- /**
140
- * Consensus Register Collection channel factory interface
141
- *
142
- * Extends the base IChannelFactory to return a more definite type of IConsensusRegisterCollection
143
- * Use for the runtime to create and load distributed data structure by type name of each channel.
144
- * @alpha
145
- */
146
- export declare interface IConsensusRegisterCollectionFactory extends IChannelFactory {
147
- /**
148
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}
149
- */
150
- load(document: IFluidDataStoreRuntime, id: string, services: IChannelServices, attributes: IChannelAttributes): Promise<IConsensusRegisterCollection>;
151
- create(document: IFluidDataStoreRuntime, id: string): IConsensusRegisterCollection;
152
- }
153
-
154
- /**
155
- * Read policies used when reading the map value.
156
- * @alpha
157
- */
158
- export declare enum ReadPolicy {
159
- Atomic = 0,
160
- LWW = 1
161
- }
162
-
163
- export { }
@@ -1,11 +0,0 @@
1
- // This file is read by tools that parse documentation comments conforming to the TSDoc standard.
2
- // It should be published with your NPM package. It should not be tracked by Git.
3
- {
4
- "tsdocVersion": "0.12",
5
- "toolPackages": [
6
- {
7
- "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.42.3"
9
- }
10
- ]
11
- }
@@ -1,163 +0,0 @@
1
- import { IChannelAttributes } from '@fluidframework/datastore-definitions';
2
- import { IChannelFactory } from '@fluidframework/datastore-definitions';
3
- import { IChannelServices } from '@fluidframework/datastore-definitions';
4
- import { IChannelStorageService } from '@fluidframework/datastore-definitions';
5
- import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
6
- import { IFluidSerializer } from '@fluidframework/shared-object-base';
7
- import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
8
- import { ISharedObject } from '@fluidframework/shared-object-base';
9
- import { ISharedObjectEvents } from '@fluidframework/shared-object-base';
10
- import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
11
- import { SharedObject } from '@fluidframework/shared-object-base/internal';
12
-
13
- /**
14
- * {@inheritDoc IConsensusRegisterCollection}
15
- * @alpha
16
- */
17
- export declare class ConsensusRegisterCollection<T> extends SharedObject<IConsensusRegisterCollectionEvents> implements IConsensusRegisterCollection<T> {
18
- /**
19
- * Create a new consensus register collection
20
- *
21
- * @param runtime - data store runtime the new consensus register collection belongs to
22
- * @param id - optional name of the consensus register collection
23
- * @returns newly create consensus register collection (but not attached yet)
24
- */
25
- static create<T>(runtime: IFluidDataStoreRuntime, id?: string): ConsensusRegisterCollection<T>;
26
- /**
27
- * Get a factory for ConsensusRegisterCollection to register with the data store.
28
- *
29
- * @returns a factory that creates and load ConsensusRegisterCollection
30
- */
31
- static getFactory(): ConsensusRegisterCollectionFactory;
32
- private readonly data;
33
- /**
34
- * Constructs a new consensus register collection. If the object is non-local an id and service interfaces will
35
- * be provided
36
- */
37
- constructor(id: string, runtime: IFluidDataStoreRuntime, attributes: IChannelAttributes);
38
- /**
39
- * Creates a new register or writes a new value.
40
- * Returns a promise that will resolve when the write is acked.
41
- *
42
- * @returns Promise<true> if write was non-concurrent
43
- */
44
- write(key: string, value: T): Promise<boolean>;
45
- /**
46
- * Returns the most recent local value of a register.
47
- * @param key - The key to read
48
- * @param readPolicy - The ReadPolicy to apply. Defaults to Atomic.
49
- */
50
- read(key: string, readPolicy?: ReadPolicy): T | undefined;
51
- readVersions(key: string): T[] | undefined;
52
- keys(): string[];
53
- protected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats;
54
- /**
55
- * {@inheritDoc @fluidframework/shared-object-base#SharedObject.loadCore}
56
- */
57
- protected loadCore(storage: IChannelStorageService): Promise<void>;
58
- protected onDisconnect(): void;
59
- protected processCore(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void;
60
- private readAtomic;
61
- /**
62
- * Process an inbound write op
63
- * @param key - Key that was written to
64
- * @param value - Incoming value
65
- * @param refSeq - RefSeq at the time of write on the remote client
66
- * @param sequenceNumber - Sequence Number of this write op
67
- * @param local - Did this write originate on this client
68
- */
69
- private processInboundWrite;
70
- private stringify;
71
- private parse;
72
- protected applyStashedOp(): void;
73
- }
74
-
75
- /**
76
- * The factory that defines the consensus queue.
77
- * @alpha
78
- */
79
- export declare class ConsensusRegisterCollectionFactory implements IConsensusRegisterCollectionFactory {
80
- static Type: string;
81
- static readonly Attributes: IChannelAttributes;
82
- get type(): string;
83
- get attributes(): IChannelAttributes;
84
- /**
85
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}
86
- */
87
- load(runtime: IFluidDataStoreRuntime, id: string, services: IChannelServices, attributes: IChannelAttributes): Promise<IConsensusRegisterCollection>;
88
- create(document: IFluidDataStoreRuntime, id: string): IConsensusRegisterCollection;
89
- }
90
-
91
- /**
92
- * A distributed data structure that holds a set of registers with update
93
- * versions. On concurrent updates, a register internally stores all possible versions of a value by using reference
94
- * sequence number of the incoming update.
95
- *
96
- * Using all the stored versions, we can then distinguish amongst different read policies. Below are the policies
97
- * we support:
98
- *
99
- * Atomic: Atomicity requires a linearizable register. A linearizable register behaves as if there is only a single
100
- * copy of the data, and that every operation appears to take effect atomically at one point in time. This definition
101
- * implies that operations are executed in an well-defined order. On a concurrent update, we perform a compare-and-set
102
- * operation, where we compare a register sequence number with the incoming reference sequence number.
103
- * The earliest operation overwriting prior sequence numbers wins since every client reaches to an agreement on
104
- * the value. So we can safely return the first value.
105
- *
106
- * LWW: The last write to a key always wins.
107
- * @alpha
108
- */
109
- export declare interface IConsensusRegisterCollection<T = any> extends ISharedObject<IConsensusRegisterCollectionEvents> {
110
- /**
111
- * Attempts to write a register with a value. Returns a promise to indicate the roundtrip completion.
112
- * For a non existent register, it will attempt to create a new register with the specified value.
113
- *
114
- * @returns Promise<true> if write was non-concurrent
115
- */
116
- write(key: string, value: T): Promise<boolean>;
117
- /**
118
- * Retrieves the agreed upon value for the register based on policy. Returns undefined if not present.
119
- */
120
- read(key: string, policy?: ReadPolicy): T | undefined;
121
- /**
122
- * Retrives all concurrent versions. Undefined if not present.
123
- */
124
- readVersions(key: string): T[] | undefined;
125
- /**
126
- * Returns the keys.
127
- */
128
- keys(): string[];
129
- }
130
-
131
- /**
132
- * Events emitted by {@link IConsensusRegisterCollection}.
133
- * @alpha
134
- */
135
- export declare interface IConsensusRegisterCollectionEvents extends ISharedObjectEvents {
136
- (event: "atomicChanged" | "versionChanged", listener: (key: string, value: any, local: boolean) => void): any;
137
- }
138
-
139
- /**
140
- * Consensus Register Collection channel factory interface
141
- *
142
- * Extends the base IChannelFactory to return a more definite type of IConsensusRegisterCollection
143
- * Use for the runtime to create and load distributed data structure by type name of each channel.
144
- * @alpha
145
- */
146
- export declare interface IConsensusRegisterCollectionFactory extends IChannelFactory {
147
- /**
148
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}
149
- */
150
- load(document: IFluidDataStoreRuntime, id: string, services: IChannelServices, attributes: IChannelAttributes): Promise<IConsensusRegisterCollection>;
151
- create(document: IFluidDataStoreRuntime, id: string): IConsensusRegisterCollection;
152
- }
153
-
154
- /**
155
- * Read policies used when reading the map value.
156
- * @alpha
157
- */
158
- export declare enum ReadPolicy {
159
- Atomic = 0,
160
- LWW = 1
161
- }
162
-
163
- export { }
@@ -1,27 +0,0 @@
1
- import { IChannelAttributes } from '@fluidframework/datastore-definitions';
2
- import { IChannelFactory } from '@fluidframework/datastore-definitions';
3
- import { IChannelServices } from '@fluidframework/datastore-definitions';
4
- import { IChannelStorageService } from '@fluidframework/datastore-definitions';
5
- import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
6
- import { IFluidSerializer } from '@fluidframework/shared-object-base';
7
- import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
8
- import { ISharedObject } from '@fluidframework/shared-object-base';
9
- import { ISharedObjectEvents } from '@fluidframework/shared-object-base';
10
- import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
11
- import { SharedObject } from '@fluidframework/shared-object-base/internal';
12
-
13
- /* Excluded from this release type: ConsensusRegisterCollection */
14
-
15
- /* Excluded from this release type: ConsensusRegisterCollectionFactory */
16
-
17
- /* Excluded from this release type: IConsensusRegisterCollection */
18
-
19
- /* Excluded from this release type: IConsensusRegisterCollectionEvents */
20
-
21
- /* Excluded from this release type: IConsensusRegisterCollectionFactory */
22
-
23
- /* Excluded from this release type: ReadPolicy */
24
-
25
- /* Excluded from this release type: SharedObject */
26
-
27
- export { }
@@ -1,27 +0,0 @@
1
- import { IChannelAttributes } from '@fluidframework/datastore-definitions';
2
- import { IChannelFactory } from '@fluidframework/datastore-definitions';
3
- import { IChannelServices } from '@fluidframework/datastore-definitions';
4
- import { IChannelStorageService } from '@fluidframework/datastore-definitions';
5
- import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
6
- import { IFluidSerializer } from '@fluidframework/shared-object-base';
7
- import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
8
- import { ISharedObject } from '@fluidframework/shared-object-base';
9
- import { ISharedObjectEvents } from '@fluidframework/shared-object-base';
10
- import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
11
- import { SharedObject } from '@fluidframework/shared-object-base/internal';
12
-
13
- /* Excluded from this release type: ConsensusRegisterCollection */
14
-
15
- /* Excluded from this release type: ConsensusRegisterCollectionFactory */
16
-
17
- /* Excluded from this release type: IConsensusRegisterCollection */
18
-
19
- /* Excluded from this release type: IConsensusRegisterCollectionEvents */
20
-
21
- /* Excluded from this release type: IConsensusRegisterCollectionFactory */
22
-
23
- /* Excluded from this release type: ReadPolicy */
24
-
25
- /* Excluded from this release type: SharedObject */
26
-
27
- export { }
@@ -1,163 +0,0 @@
1
- import { IChannelAttributes } from '@fluidframework/datastore-definitions';
2
- import { IChannelFactory } from '@fluidframework/datastore-definitions';
3
- import { IChannelServices } from '@fluidframework/datastore-definitions';
4
- import { IChannelStorageService } from '@fluidframework/datastore-definitions';
5
- import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
6
- import { IFluidSerializer } from '@fluidframework/shared-object-base';
7
- import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
8
- import { ISharedObject } from '@fluidframework/shared-object-base';
9
- import { ISharedObjectEvents } from '@fluidframework/shared-object-base';
10
- import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
11
- import { SharedObject } from '@fluidframework/shared-object-base/internal';
12
-
13
- /**
14
- * {@inheritDoc IConsensusRegisterCollection}
15
- * @alpha
16
- */
17
- export declare class ConsensusRegisterCollection<T> extends SharedObject<IConsensusRegisterCollectionEvents> implements IConsensusRegisterCollection<T> {
18
- /**
19
- * Create a new consensus register collection
20
- *
21
- * @param runtime - data store runtime the new consensus register collection belongs to
22
- * @param id - optional name of the consensus register collection
23
- * @returns newly create consensus register collection (but not attached yet)
24
- */
25
- static create<T>(runtime: IFluidDataStoreRuntime, id?: string): ConsensusRegisterCollection<T>;
26
- /**
27
- * Get a factory for ConsensusRegisterCollection to register with the data store.
28
- *
29
- * @returns a factory that creates and load ConsensusRegisterCollection
30
- */
31
- static getFactory(): ConsensusRegisterCollectionFactory;
32
- private readonly data;
33
- /**
34
- * Constructs a new consensus register collection. If the object is non-local an id and service interfaces will
35
- * be provided
36
- */
37
- constructor(id: string, runtime: IFluidDataStoreRuntime, attributes: IChannelAttributes);
38
- /**
39
- * Creates a new register or writes a new value.
40
- * Returns a promise that will resolve when the write is acked.
41
- *
42
- * @returns Promise<true> if write was non-concurrent
43
- */
44
- write(key: string, value: T): Promise<boolean>;
45
- /**
46
- * Returns the most recent local value of a register.
47
- * @param key - The key to read
48
- * @param readPolicy - The ReadPolicy to apply. Defaults to Atomic.
49
- */
50
- read(key: string, readPolicy?: ReadPolicy): T | undefined;
51
- readVersions(key: string): T[] | undefined;
52
- keys(): string[];
53
- protected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats;
54
- /**
55
- * {@inheritDoc @fluidframework/shared-object-base#SharedObject.loadCore}
56
- */
57
- protected loadCore(storage: IChannelStorageService): Promise<void>;
58
- protected onDisconnect(): void;
59
- protected processCore(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void;
60
- private readAtomic;
61
- /**
62
- * Process an inbound write op
63
- * @param key - Key that was written to
64
- * @param value - Incoming value
65
- * @param refSeq - RefSeq at the time of write on the remote client
66
- * @param sequenceNumber - Sequence Number of this write op
67
- * @param local - Did this write originate on this client
68
- */
69
- private processInboundWrite;
70
- private stringify;
71
- private parse;
72
- protected applyStashedOp(): void;
73
- }
74
-
75
- /**
76
- * The factory that defines the consensus queue.
77
- * @alpha
78
- */
79
- export declare class ConsensusRegisterCollectionFactory implements IConsensusRegisterCollectionFactory {
80
- static Type: string;
81
- static readonly Attributes: IChannelAttributes;
82
- get type(): string;
83
- get attributes(): IChannelAttributes;
84
- /**
85
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}
86
- */
87
- load(runtime: IFluidDataStoreRuntime, id: string, services: IChannelServices, attributes: IChannelAttributes): Promise<IConsensusRegisterCollection>;
88
- create(document: IFluidDataStoreRuntime, id: string): IConsensusRegisterCollection;
89
- }
90
-
91
- /**
92
- * A distributed data structure that holds a set of registers with update
93
- * versions. On concurrent updates, a register internally stores all possible versions of a value by using reference
94
- * sequence number of the incoming update.
95
- *
96
- * Using all the stored versions, we can then distinguish amongst different read policies. Below are the policies
97
- * we support:
98
- *
99
- * Atomic: Atomicity requires a linearizable register. A linearizable register behaves as if there is only a single
100
- * copy of the data, and that every operation appears to take effect atomically at one point in time. This definition
101
- * implies that operations are executed in an well-defined order. On a concurrent update, we perform a compare-and-set
102
- * operation, where we compare a register sequence number with the incoming reference sequence number.
103
- * The earliest operation overwriting prior sequence numbers wins since every client reaches to an agreement on
104
- * the value. So we can safely return the first value.
105
- *
106
- * LWW: The last write to a key always wins.
107
- * @alpha
108
- */
109
- export declare interface IConsensusRegisterCollection<T = any> extends ISharedObject<IConsensusRegisterCollectionEvents> {
110
- /**
111
- * Attempts to write a register with a value. Returns a promise to indicate the roundtrip completion.
112
- * For a non existent register, it will attempt to create a new register with the specified value.
113
- *
114
- * @returns Promise<true> if write was non-concurrent
115
- */
116
- write(key: string, value: T): Promise<boolean>;
117
- /**
118
- * Retrieves the agreed upon value for the register based on policy. Returns undefined if not present.
119
- */
120
- read(key: string, policy?: ReadPolicy): T | undefined;
121
- /**
122
- * Retrives all concurrent versions. Undefined if not present.
123
- */
124
- readVersions(key: string): T[] | undefined;
125
- /**
126
- * Returns the keys.
127
- */
128
- keys(): string[];
129
- }
130
-
131
- /**
132
- * Events emitted by {@link IConsensusRegisterCollection}.
133
- * @alpha
134
- */
135
- export declare interface IConsensusRegisterCollectionEvents extends ISharedObjectEvents {
136
- (event: "atomicChanged" | "versionChanged", listener: (key: string, value: any, local: boolean) => void): any;
137
- }
138
-
139
- /**
140
- * Consensus Register Collection channel factory interface
141
- *
142
- * Extends the base IChannelFactory to return a more definite type of IConsensusRegisterCollection
143
- * Use for the runtime to create and load distributed data structure by type name of each channel.
144
- * @alpha
145
- */
146
- export declare interface IConsensusRegisterCollectionFactory extends IChannelFactory {
147
- /**
148
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}
149
- */
150
- load(document: IFluidDataStoreRuntime, id: string, services: IChannelServices, attributes: IChannelAttributes): Promise<IConsensusRegisterCollection>;
151
- create(document: IFluidDataStoreRuntime, id: string): IConsensusRegisterCollection;
152
- }
153
-
154
- /**
155
- * Read policies used when reading the map value.
156
- * @alpha
157
- */
158
- export declare enum ReadPolicy {
159
- Atomic = 0,
160
- LWW = 1
161
- }
162
-
163
- export { }