@fluidframework/runtime-definitions 2.0.0-dev.7.4.0.217212 → 2.0.0-dev.7.4.0.221926

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.
Files changed (69) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/api-extractor.json +0 -3
  3. package/api-report/runtime-definitions.api.md +66 -99
  4. package/dist/attribution.d.ts +4 -4
  5. package/dist/attribution.js.map +1 -1
  6. package/dist/dataStoreContext.d.ts +13 -13
  7. package/dist/dataStoreContext.d.ts.map +1 -1
  8. package/dist/dataStoreContext.js +2 -2
  9. package/dist/dataStoreContext.js.map +1 -1
  10. package/dist/dataStoreFactory.d.ts +3 -3
  11. package/dist/dataStoreFactory.js +1 -1
  12. package/dist/dataStoreFactory.js.map +1 -1
  13. package/dist/dataStoreRegistry.d.ts +6 -6
  14. package/dist/dataStoreRegistry.js +1 -1
  15. package/dist/dataStoreRegistry.js.map +1 -1
  16. package/dist/garbageCollection.d.ts +2 -2
  17. package/dist/garbageCollection.js.map +1 -1
  18. package/dist/index.d.ts +49 -1
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +11 -2
  21. package/dist/index.js.map +1 -1
  22. package/dist/protocol.d.ts +1 -1
  23. package/dist/protocol.js.map +1 -1
  24. package/dist/runtime-definitions-alpha.d.ts +939 -93
  25. package/dist/runtime-definitions-beta.d.ts +31 -0
  26. package/dist/runtime-definitions-public.d.ts +31 -0
  27. package/dist/runtime-definitions-untrimmed.d.ts +66 -248
  28. package/dist/summary.d.ts +13 -13
  29. package/dist/summary.js +1 -1
  30. package/dist/summary.js.map +1 -1
  31. package/lib/runtime-definitions-alpha.d.ts +939 -93
  32. package/lib/runtime-definitions-beta.d.ts +31 -0
  33. package/lib/runtime-definitions-public.d.ts +31 -0
  34. package/lib/runtime-definitions-untrimmed.d.ts +66 -248
  35. package/package.json +7 -4
  36. package/src/attribution.ts +4 -4
  37. package/src/dataStoreContext.ts +13 -13
  38. package/src/dataStoreFactory.ts +3 -3
  39. package/src/dataStoreRegistry.ts +6 -6
  40. package/src/garbageCollection.ts +2 -2
  41. package/src/index.ts +46 -6
  42. package/src/protocol.ts +1 -1
  43. package/src/summary.ts +13 -13
  44. package/dist/id-compressor/idCompressor.d.ts +0 -139
  45. package/dist/id-compressor/idCompressor.d.ts.map +0 -1
  46. package/dist/id-compressor/idCompressor.js +0 -7
  47. package/dist/id-compressor/idCompressor.js.map +0 -1
  48. package/dist/id-compressor/identifiers.d.ts +0 -40
  49. package/dist/id-compressor/identifiers.d.ts.map +0 -1
  50. package/dist/id-compressor/identifiers.js +0 -7
  51. package/dist/id-compressor/identifiers.js.map +0 -1
  52. package/dist/id-compressor/index.d.ts +0 -8
  53. package/dist/id-compressor/index.d.ts.map +0 -1
  54. package/dist/id-compressor/index.js +0 -10
  55. package/dist/id-compressor/index.js.map +0 -1
  56. package/dist/id-compressor/persisted-types/0.0.1.d.ts +0 -46
  57. package/dist/id-compressor/persisted-types/0.0.1.d.ts.map +0 -1
  58. package/dist/id-compressor/persisted-types/0.0.1.js +0 -14
  59. package/dist/id-compressor/persisted-types/0.0.1.js.map +0 -1
  60. package/dist/id-compressor/persisted-types/index.d.ts +0 -6
  61. package/dist/id-compressor/persisted-types/index.d.ts.map +0 -1
  62. package/dist/id-compressor/persisted-types/index.js +0 -10
  63. package/dist/id-compressor/persisted-types/index.js.map +0 -1
  64. package/src/id-compressor/idCompressor.ts +0 -155
  65. package/src/id-compressor/identifiers.ts +0 -39
  66. package/src/id-compressor/index.ts +0 -16
  67. package/src/id-compressor/persisted-types/0.0.1.ts +0 -51
  68. package/src/id-compressor/persisted-types/README.md +0 -3
  69. package/src/id-compressor/persisted-types/index.ts +0 -12
@@ -1,8 +0,0 @@
1
- /*!
2
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
- * Licensed under the MIT License.
4
- */
5
- export { IdCreationRange, SerializedIdCompressor, SerializedIdCompressorWithNoSession, SerializedIdCompressorWithOngoingSession, initialClusterCapacity, } from "./persisted-types";
6
- export { IIdCompressorCore, IIdCompressor } from "./idCompressor";
7
- export { SessionSpaceCompressedId, OpSpaceCompressedId, SessionId, StableId } from "./identifiers";
8
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/id-compressor/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,eAAe,EACf,sBAAsB,EACtB,mCAAmC,EACnC,wCAAwC,EACxC,sBAAsB,GACtB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAElE,OAAO,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC"}
@@ -1,10 +0,0 @@
1
- "use strict";
2
- /*!
3
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
4
- * Licensed under the MIT License.
5
- */
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.initialClusterCapacity = void 0;
8
- var persisted_types_1 = require("./persisted-types");
9
- Object.defineProperty(exports, "initialClusterCapacity", { enumerable: true, get: function () { return persisted_types_1.initialClusterCapacity; } });
10
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/id-compressor/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,qDAM2B;AAD1B,yHAAA,sBAAsB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tIdCreationRange,\n\tSerializedIdCompressor,\n\tSerializedIdCompressorWithNoSession,\n\tSerializedIdCompressorWithOngoingSession,\n\tinitialClusterCapacity,\n} from \"./persisted-types\";\n\nexport { IIdCompressorCore, IIdCompressor } from \"./idCompressor\";\n\nexport { SessionSpaceCompressedId, OpSpaceCompressedId, SessionId, StableId } from \"./identifiers\";\n"]}
@@ -1,46 +0,0 @@
1
- /*!
2
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
- * Licensed under the MIT License.
4
- */
5
- import type { SessionId } from "../identifiers";
6
- /**
7
- * The serialized contents of an IdCompressor, suitable for persistence in a summary.
8
- * @internal
9
- */
10
- export type SerializedIdCompressor = string & {
11
- readonly _serializedIdCompressor: "8c73c57c-1cf4-4278-8915-6444cb4f6af5";
12
- };
13
- /**
14
- * The serialized contents of an IdCompressor, suitable for persistence in a summary.
15
- * @internal
16
- */
17
- export type SerializedIdCompressorWithNoSession = SerializedIdCompressor & {
18
- readonly _noLocalState: "3aa2e1e8-cc28-4ea7-bc1a-a11dc3f26dfb";
19
- };
20
- /**
21
- * The serialized contents of an IdCompressor, suitable for persistence in a summary.
22
- * @internal
23
- */
24
- export type SerializedIdCompressorWithOngoingSession = SerializedIdCompressor & {
25
- readonly _hasLocalState: "1281acae-6d14-47e7-bc92-71c8ee0819cb";
26
- };
27
- /**
28
- * Data describing a range of session-local IDs (from a remote or local session).
29
- *
30
- * A range is composed of local IDs that were generated.
31
- * @internal
32
- */
33
- export interface IdCreationRange {
34
- readonly sessionId: SessionId;
35
- readonly ids?: {
36
- readonly firstGenCount: number;
37
- readonly count: number;
38
- };
39
- }
40
- /**
41
- * Roughly equates to a minimum of 1M sessions before we start allocating 64 bit IDs.
42
- * This value must *NOT* change without careful consideration to compatibility.
43
- * @internal
44
- */
45
- export declare const initialClusterCapacity = 512;
46
- //# sourceMappingURL=0.0.1.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"0.0.1.d.ts","sourceRoot":"","sources":["../../../src/id-compressor/persisted-types/0.0.1.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG;IAC7C,QAAQ,CAAC,uBAAuB,EAAE,sCAAsC,CAAC;CACzE,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,mCAAmC,GAAG,sBAAsB,GAAG;IAC1E,QAAQ,CAAC,aAAa,EAAE,sCAAsC,CAAC;CAC/D,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,wCAAwC,GAAG,sBAAsB,GAAG;IAC/E,QAAQ,CAAC,cAAc,EAAE,sCAAsC,CAAC;CAChE,CAAC;AAEF;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC/B,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,GAAG,CAAC,EAAE;QACd,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;QAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;KACvB,CAAC;CACF;AAED;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,MAAM,CAAC"}
@@ -1,14 +0,0 @@
1
- "use strict";
2
- /*!
3
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
4
- * Licensed under the MIT License.
5
- */
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.initialClusterCapacity = void 0;
8
- /**
9
- * Roughly equates to a minimum of 1M sessions before we start allocating 64 bit IDs.
10
- * This value must *NOT* change without careful consideration to compatibility.
11
- * @internal
12
- */
13
- exports.initialClusterCapacity = 512;
14
- //# sourceMappingURL=0.0.1.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"0.0.1.js","sourceRoot":"","sources":["../../../src/id-compressor/persisted-types/0.0.1.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AA0CH;;;;GAIG;AACU,QAAA,sBAAsB,GAAG,GAAG,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { SessionId } from \"../identifiers\";\n\n/**\n * The serialized contents of an IdCompressor, suitable for persistence in a summary.\n * @internal\n */\nexport type SerializedIdCompressor = string & {\n\treadonly _serializedIdCompressor: \"8c73c57c-1cf4-4278-8915-6444cb4f6af5\";\n};\n\n/**\n * The serialized contents of an IdCompressor, suitable for persistence in a summary.\n * @internal\n */\nexport type SerializedIdCompressorWithNoSession = SerializedIdCompressor & {\n\treadonly _noLocalState: \"3aa2e1e8-cc28-4ea7-bc1a-a11dc3f26dfb\";\n};\n\n/**\n * The serialized contents of an IdCompressor, suitable for persistence in a summary.\n * @internal\n */\nexport type SerializedIdCompressorWithOngoingSession = SerializedIdCompressor & {\n\treadonly _hasLocalState: \"1281acae-6d14-47e7-bc92-71c8ee0819cb\";\n};\n\n/**\n * Data describing a range of session-local IDs (from a remote or local session).\n *\n * A range is composed of local IDs that were generated.\n * @internal\n */\nexport interface IdCreationRange {\n\treadonly sessionId: SessionId;\n\treadonly ids?: {\n\t\treadonly firstGenCount: number;\n\t\treadonly count: number;\n\t};\n}\n\n/**\n * Roughly equates to a minimum of 1M sessions before we start allocating 64 bit IDs.\n * This value must *NOT* change without careful consideration to compatibility.\n * @internal\n */\nexport const initialClusterCapacity = 512;\n"]}
@@ -1,6 +0,0 @@
1
- /*!
2
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
- * Licensed under the MIT License.
4
- */
5
- export { IdCreationRange, SerializedIdCompressor, SerializedIdCompressorWithNoSession, SerializedIdCompressorWithOngoingSession, initialClusterCapacity, } from "./0.0.1";
6
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/id-compressor/persisted-types/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,eAAe,EACf,sBAAsB,EACtB,mCAAmC,EACnC,wCAAwC,EACxC,sBAAsB,GACtB,MAAM,SAAS,CAAC"}
@@ -1,10 +0,0 @@
1
- "use strict";
2
- /*!
3
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
4
- * Licensed under the MIT License.
5
- */
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.initialClusterCapacity = void 0;
8
- var _0_0_1_1 = require("./0.0.1");
9
- Object.defineProperty(exports, "initialClusterCapacity", { enumerable: true, get: function () { return _0_0_1_1.initialClusterCapacity; } });
10
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/id-compressor/persisted-types/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kCAMiB;AADhB,gHAAA,sBAAsB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tIdCreationRange,\n\tSerializedIdCompressor,\n\tSerializedIdCompressorWithNoSession,\n\tSerializedIdCompressorWithOngoingSession,\n\tinitialClusterCapacity,\n} from \"./0.0.1\";\n"]}
@@ -1,155 +0,0 @@
1
- /*!
2
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
- * Licensed under the MIT License.
4
- */
5
-
6
- import { SessionSpaceCompressedId, OpSpaceCompressedId, SessionId, StableId } from "./identifiers";
7
- import {
8
- IdCreationRange,
9
- SerializedIdCompressorWithNoSession,
10
- SerializedIdCompressorWithOngoingSession,
11
- } from "./persisted-types";
12
-
13
- /**
14
- * @internal
15
- */
16
- export interface IIdCompressorCore {
17
- /**
18
- * Returns a range of IDs created by this session in a format for sending to the server for finalizing.
19
- * The range will include all IDs generated via calls to `generateCompressedId` since the last time this method was called.
20
- * @returns the range of IDs, which may be empty. This range must be sent to the server for ordering before
21
- * it is finalized. Ranges must be sent to the server in the order that they are taken via calls to this method.
22
- */
23
- takeNextCreationRange(): IdCreationRange;
24
-
25
- /**
26
- * Finalizes the supplied range of IDs (which may be from either a remote or local session).
27
- * @param range - the range of session-local IDs to finalize.
28
- */
29
- finalizeCreationRange(range: IdCreationRange): void;
30
-
31
- /**
32
- * Returns a persistable form of the current state of this `IdCompressor` which can be rehydrated via `IdCompressor.deserialize()`.
33
- * This includes finalized state as well as un-finalized state and is therefore suitable for use in offline scenarios.
34
- */
35
- serialize(withSession: true): SerializedIdCompressorWithOngoingSession;
36
-
37
- /**
38
- * Returns a persistable form of the current state of this `IdCompressor` which can be rehydrated via `IdCompressor.deserialize()`.
39
- * This only includes finalized state and is therefore suitable for use in summaries.
40
- */
41
- serialize(withSession: false): SerializedIdCompressorWithNoSession;
42
- }
43
-
44
- /**
45
- * A distributed UUID generator and compressor.
46
- *
47
- * Generates arbitrary non-colliding v4 UUIDs, called stable IDs, for multiple "sessions" (which can be distributed across the network),
48
- * providing each session with the ability to map these UUIDs to `numbers`.
49
- *
50
- * A session is a unique identifier that denotes a single compressor. New IDs are created through a single compressor API
51
- * which should then sent in ranges to the server for total ordering (and are subsequently relayed to other clients). When a new ID is
52
- * created it is said to be created by the compressor's "local" session.
53
- *
54
- * For each stable ID created, two numeric IDs are provided by the compressor:
55
- *
56
- * 1. A session-local ID, which is stable for the lifetime of the session (which could be longer than that of the compressor object, as it may
57
- * be serialized for offline usage). Available as soon as the stable ID is allocated. These IDs are session-unique and are thus only
58
- * safely usable within the scope of the compressor that created it.
59
- *
60
- * 2. A final ID, which is stable across serialization and deserialization of an IdCompressor. Available as soon as the range containing
61
- * the corresponding session-local ID is totally ordered (via consensus) with respect to other sessions' allocations.
62
- * Final IDs are known to and publicly usable by any compressor that has received them.
63
- *
64
- * Compressors will allocate UUIDs in non-random ways to reduce entropy allowing for optimized storage of the data needed
65
- * to map the UUIDs to the numbers.
66
- *
67
- * The following invariants are upheld by IdCompressor:
68
- *
69
- * 1. Session-local IDs will always decompress to the same UUIDs for the lifetime of the session.
70
- *
71
- * 2. Final IDs will always decompress to the same UUIDs.
72
- *
73
- * 3. After a server-processed range of session-local IDs (from any session) is received by a compressor, any of those session-local IDs may be
74
- * translated by the compressor into the corresponding final ID. For any given session-local ID, this translation will always yield the
75
- * same final ID.
76
- *
77
- * 4. A UUID will always compress into the same session-local ID for the lifetime of the session.
78
- *
79
- * Session-local IDs are sent across the wire in efficiently-represented ranges. These ranges are created by querying the compressor, and *must*
80
- * be ordered (i.e. sent to the server) in the order they are created in order to preserve the above invariants.
81
- *
82
- * Session-local IDs can be used immediately after creation, but will eventually (after being sequenced) have a corresponding final ID. This
83
- * could make reasoning about equality of those two forms difficult. For example, if a cache is keyed off of a
84
- * session-local ID but is later queried using the final ID (which is semantically equal, as it decompresses to the same UUID/string) it will
85
- * produce a cache miss. In order to make using collections of both remotely created and locally created IDs easy, regardless of whether the
86
- * session-local IDs have been finalized, the compressor defines two "spaces" of IDs:
87
- *
88
- * 1. Session space: in this space, all IDs are normalized to their "most local form". This means that all IDs created by the local session
89
- * will be in local form, regardless of if they have been finalized. Remotely created IDs, which could only have been received after
90
- * finalizing and will never have a local form for the compressor, will of course be final IDs. This space should be used with consumer APIs
91
- * and data structures, as the lifetime of the IDs is guaranteed to be the same as the compressor object. Care must be taken to not use
92
- * these IDs across compressor objects, as the local IDs are specific to the compressor that created them.
93
- *
94
- * 2. Op space: in this space, all IDs are normalized to their "most final form". This means that all IDs except session-local IDs that
95
- * have not yet been finalized will be in final ID form. This space is useful for serialization in ops (e.g. references), as other clients
96
- * that receive them need not do any work to normalize them to *their* session-space in the common case. Note that IDs in op space may move
97
- * out of Op space over time, namely, when a session-local ID in this space becomes finalized, and thereafter has a "more final form".
98
- * Consequentially, it may be useful to restrict parameters of a persisted type to this space (to optimize perf), but it is potentially
99
- * incorrect to use this type for a runtime variable. This is an asymmetry that does not affect session space, as local IDs are always as
100
- * "local as possible".
101
- *
102
- * These two spaces naturally define a rule: consumers of compressed IDs should use session-space IDs, but serialized forms such as ops
103
- * should use op-space IDs.
104
- * @internal
105
- */
106
- export interface IIdCompressor {
107
- localSessionId: SessionId;
108
-
109
- /**
110
- * Generates a new compressed ID or returns an existing one.
111
- * This should ONLY be called to generate IDs for local operations.
112
- * @returns A new local ID in session space.
113
- */
114
- generateCompressedId(): SessionSpaceCompressedId;
115
- /**
116
- * Normalizes a session space ID into op space.
117
- * @param id - the local ID to normalize.
118
- * @returns the ID in op space.
119
- */
120
- normalizeToOpSpace(id: SessionSpaceCompressedId): OpSpaceCompressedId;
121
- /**
122
- * Normalizes an ID into session space.
123
- * @param id - the ID to normalize. If it is a local ID, it is assumed to have been created by the session corresponding
124
- * to `sessionId`.
125
- * @param originSessionId - the session from which `id` originated
126
- * @returns the session-space ID corresponding to `id`, which might not have been a final ID if the client that created it had not yet
127
- * finalized it. This can occur when a client references an ID during the window of time in which it is waiting to receive the ordered
128
- * range that contained it from the server.
129
- */
130
- normalizeToSessionSpace(
131
- id: OpSpaceCompressedId,
132
- originSessionId: SessionId,
133
- ): SessionSpaceCompressedId;
134
-
135
- /**
136
- * Decompresses a previously compressed ID into a UUID.
137
- * @param id - the compressed ID to be decompressed.
138
- * @returns the UUID associated with the compressed ID. Fails if the ID was not generated by this compressor.
139
- */
140
- decompress(id: SessionSpaceCompressedId): StableId;
141
-
142
- /**
143
- * Recompresses a UUID.
144
- * @param uncompressed - the UUID to recompress.
145
- * @returns the `CompressedId` associated with `uncompressed`. Fails if it has not been previously compressed by this compressor.
146
- */
147
- recompress(uncompressed: StableId): SessionSpaceCompressedId;
148
-
149
- /**
150
- * Attempts to recompresses a UUID.
151
- * @param uncompressed - the UUID to recompress,
152
- * @returns the `CompressedId` associated with `uncompressed` or undefined if it has not been previously compressed by this compressor.
153
- */
154
- tryRecompress(uncompressed: StableId): SessionSpaceCompressedId | undefined;
155
- }
@@ -1,39 +0,0 @@
1
- /*!
2
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
- * Licensed under the MIT License.
4
- */
5
-
6
- /**
7
- * A compressed ID that has been normalized into "session space" (see `IdCompressor` for more).
8
- * Consumer-facing APIs and data structures should use session-space IDs as their lifetime and equality is stable and tied to
9
- * the scope of the session (i.e. compressor) that produced them.
10
- * @internal
11
- */
12
- export type SessionSpaceCompressedId = number & {
13
- readonly SessionUnique: "cea55054-6b82-4cbf-ad19-1fa645ea3b3e";
14
- };
15
-
16
- /**
17
- * A compressed ID that has been normalized into "op space".
18
- * Serialized/persisted structures (e.g. ops) should use op-space IDs as a performance optimization, as they require less normalizing when
19
- * received by a remote client due to the fact that op space for a given compressor is session space for all other compressors.
20
- * @internal
21
- */
22
- export type OpSpaceCompressedId = number & {
23
- readonly OpNormalized: "9209432d-a959-4df7-b2ad-767ead4dbcae";
24
- };
25
-
26
- /**
27
- * A version 4, variant 1 uuid (https://datatracker.ietf.org/doc/html/rfc4122).
28
- * A 128-bit Universally Unique IDentifier. Represented here
29
- * with a string of the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx,
30
- * where x is a lowercase hex digit.
31
- * @internal
32
- */
33
- export type StableId = string & { readonly StableId: "53172b0d-a3d5-41ea-bd75-b43839c97f5a" };
34
-
35
- /**
36
- * A StableId which is suitable for use as a session identifier
37
- * @internal
38
- */
39
- export type SessionId = StableId & { readonly SessionId: "4498f850-e14e-4be9-8db0-89ec00997e58" };
@@ -1,16 +0,0 @@
1
- /*!
2
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
- * Licensed under the MIT License.
4
- */
5
-
6
- export {
7
- IdCreationRange,
8
- SerializedIdCompressor,
9
- SerializedIdCompressorWithNoSession,
10
- SerializedIdCompressorWithOngoingSession,
11
- initialClusterCapacity,
12
- } from "./persisted-types";
13
-
14
- export { IIdCompressorCore, IIdCompressor } from "./idCompressor";
15
-
16
- export { SessionSpaceCompressedId, OpSpaceCompressedId, SessionId, StableId } from "./identifiers";
@@ -1,51 +0,0 @@
1
- /*!
2
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
- * Licensed under the MIT License.
4
- */
5
-
6
- import type { SessionId } from "../identifiers";
7
-
8
- /**
9
- * The serialized contents of an IdCompressor, suitable for persistence in a summary.
10
- * @internal
11
- */
12
- export type SerializedIdCompressor = string & {
13
- readonly _serializedIdCompressor: "8c73c57c-1cf4-4278-8915-6444cb4f6af5";
14
- };
15
-
16
- /**
17
- * The serialized contents of an IdCompressor, suitable for persistence in a summary.
18
- * @internal
19
- */
20
- export type SerializedIdCompressorWithNoSession = SerializedIdCompressor & {
21
- readonly _noLocalState: "3aa2e1e8-cc28-4ea7-bc1a-a11dc3f26dfb";
22
- };
23
-
24
- /**
25
- * The serialized contents of an IdCompressor, suitable for persistence in a summary.
26
- * @internal
27
- */
28
- export type SerializedIdCompressorWithOngoingSession = SerializedIdCompressor & {
29
- readonly _hasLocalState: "1281acae-6d14-47e7-bc92-71c8ee0819cb";
30
- };
31
-
32
- /**
33
- * Data describing a range of session-local IDs (from a remote or local session).
34
- *
35
- * A range is composed of local IDs that were generated.
36
- * @internal
37
- */
38
- export interface IdCreationRange {
39
- readonly sessionId: SessionId;
40
- readonly ids?: {
41
- readonly firstGenCount: number;
42
- readonly count: number;
43
- };
44
- }
45
-
46
- /**
47
- * Roughly equates to a minimum of 1M sessions before we start allocating 64 bit IDs.
48
- * This value must *NOT* change without careful consideration to compatibility.
49
- * @internal
50
- */
51
- export const initialClusterCapacity = 512;
@@ -1,3 +0,0 @@
1
- # Persisted Types
2
-
3
- The types in this folder inherit all requirements outlined in [the experimental SharedTree persisted types README](../../../../../../experimental/dds/tree/src/persisted-types/README.md).
@@ -1,12 +0,0 @@
1
- /*!
2
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
- * Licensed under the MIT License.
4
- */
5
-
6
- export {
7
- IdCreationRange,
8
- SerializedIdCompressor,
9
- SerializedIdCompressorWithNoSession,
10
- SerializedIdCompressorWithOngoingSession,
11
- initialClusterCapacity,
12
- } from "./0.0.1";