@fluidframework/id-compressor 2.0.0-dev-rc.1.0.0.224419

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 (157) hide show
  1. package/.eslintrc.js +27 -0
  2. package/.mocharc.js +12 -0
  3. package/CHANGELOG.md +7 -0
  4. package/LICENSE +21 -0
  5. package/README.md +170 -0
  6. package/api-extractor-lint.json +4 -0
  7. package/api-extractor.json +4 -0
  8. package/api-report/id-compressor.api.md +139 -0
  9. package/dist/appendOnlySortedMap.cjs +318 -0
  10. package/dist/appendOnlySortedMap.cjs.map +1 -0
  11. package/dist/appendOnlySortedMap.d.ts +124 -0
  12. package/dist/appendOnlySortedMap.d.ts.map +1 -0
  13. package/dist/finalSpace.cjs +62 -0
  14. package/dist/finalSpace.cjs.map +1 -0
  15. package/dist/finalSpace.d.ts +29 -0
  16. package/dist/finalSpace.d.ts.map +1 -0
  17. package/dist/id-compressor-alpha.d.ts +320 -0
  18. package/dist/id-compressor-beta.d.ts +172 -0
  19. package/dist/id-compressor-public.d.ts +172 -0
  20. package/dist/id-compressor-untrimmed.d.ts +333 -0
  21. package/dist/idCompressor.cjs +502 -0
  22. package/dist/idCompressor.cjs.map +1 -0
  23. package/dist/idCompressor.d.ts +84 -0
  24. package/dist/idCompressor.d.ts.map +1 -0
  25. package/dist/identifiers.cjs +15 -0
  26. package/dist/identifiers.cjs.map +1 -0
  27. package/dist/identifiers.d.ts +32 -0
  28. package/dist/identifiers.d.ts.map +1 -0
  29. package/dist/index.cjs +20 -0
  30. package/dist/index.cjs.map +1 -0
  31. package/dist/index.d.ts +11 -0
  32. package/dist/index.d.ts.map +1 -0
  33. package/dist/packageVersion.cjs +12 -0
  34. package/dist/packageVersion.cjs.map +1 -0
  35. package/dist/packageVersion.d.ts +9 -0
  36. package/dist/packageVersion.d.ts.map +1 -0
  37. package/dist/persistanceUtilities.cjs +43 -0
  38. package/dist/persistanceUtilities.cjs.map +1 -0
  39. package/dist/persistanceUtilities.d.ts +22 -0
  40. package/dist/persistanceUtilities.d.ts.map +1 -0
  41. package/dist/sessionSpaceNormalizer.cjs +80 -0
  42. package/dist/sessionSpaceNormalizer.cjs.map +1 -0
  43. package/dist/sessionSpaceNormalizer.d.ts +46 -0
  44. package/dist/sessionSpaceNormalizer.d.ts.map +1 -0
  45. package/dist/sessions.cjs +305 -0
  46. package/dist/sessions.cjs.map +1 -0
  47. package/dist/sessions.d.ts +115 -0
  48. package/dist/sessions.d.ts.map +1 -0
  49. package/dist/tsdoc-metadata.json +11 -0
  50. package/dist/types/idCompressor.cjs +7 -0
  51. package/dist/types/idCompressor.cjs.map +1 -0
  52. package/dist/types/idCompressor.d.ts +139 -0
  53. package/dist/types/idCompressor.d.ts.map +1 -0
  54. package/dist/types/identifiers.cjs +7 -0
  55. package/dist/types/identifiers.cjs.map +1 -0
  56. package/dist/types/identifiers.d.ts +40 -0
  57. package/dist/types/identifiers.d.ts.map +1 -0
  58. package/dist/types/index.cjs +7 -0
  59. package/dist/types/index.cjs.map +1 -0
  60. package/dist/types/index.d.ts +8 -0
  61. package/dist/types/index.d.ts.map +1 -0
  62. package/dist/types/persisted-types/0.0.1.cjs +7 -0
  63. package/dist/types/persisted-types/0.0.1.cjs.map +1 -0
  64. package/dist/types/persisted-types/0.0.1.d.ts +52 -0
  65. package/dist/types/persisted-types/0.0.1.d.ts.map +1 -0
  66. package/dist/types/persisted-types/index.cjs +7 -0
  67. package/dist/types/persisted-types/index.cjs.map +1 -0
  68. package/dist/types/persisted-types/index.d.ts +6 -0
  69. package/dist/types/persisted-types/index.d.ts.map +1 -0
  70. package/dist/utilities.cjs +170 -0
  71. package/dist/utilities.cjs.map +1 -0
  72. package/dist/utilities.d.ts +53 -0
  73. package/dist/utilities.d.ts.map +1 -0
  74. package/lib/appendOnlySortedMap.d.mts +124 -0
  75. package/lib/appendOnlySortedMap.d.mts.map +1 -0
  76. package/lib/appendOnlySortedMap.mjs +312 -0
  77. package/lib/appendOnlySortedMap.mjs.map +1 -0
  78. package/lib/finalSpace.d.mts +29 -0
  79. package/lib/finalSpace.d.mts.map +1 -0
  80. package/lib/finalSpace.mjs +58 -0
  81. package/lib/finalSpace.mjs.map +1 -0
  82. package/lib/id-compressor-alpha.d.mts +320 -0
  83. package/lib/id-compressor-beta.d.mts +172 -0
  84. package/lib/id-compressor-public.d.mts +172 -0
  85. package/lib/id-compressor-untrimmed.d.mts +333 -0
  86. package/lib/idCompressor.d.mts +84 -0
  87. package/lib/idCompressor.d.mts.map +1 -0
  88. package/lib/idCompressor.mjs +496 -0
  89. package/lib/idCompressor.mjs.map +1 -0
  90. package/lib/identifiers.d.mts +32 -0
  91. package/lib/identifiers.d.mts.map +1 -0
  92. package/lib/identifiers.mjs +11 -0
  93. package/lib/identifiers.mjs.map +1 -0
  94. package/lib/index.d.mts +8 -0
  95. package/lib/index.d.mts.map +1 -0
  96. package/lib/index.mjs +7 -0
  97. package/lib/index.mjs.map +1 -0
  98. package/lib/packageVersion.d.mts +9 -0
  99. package/lib/packageVersion.d.mts.map +1 -0
  100. package/lib/packageVersion.mjs +9 -0
  101. package/lib/packageVersion.mjs.map +1 -0
  102. package/lib/persistanceUtilities.d.mts +22 -0
  103. package/lib/persistanceUtilities.d.mts.map +1 -0
  104. package/lib/persistanceUtilities.mjs +34 -0
  105. package/lib/persistanceUtilities.mjs.map +1 -0
  106. package/lib/sessionSpaceNormalizer.d.mts +46 -0
  107. package/lib/sessionSpaceNormalizer.d.mts.map +1 -0
  108. package/lib/sessionSpaceNormalizer.mjs +76 -0
  109. package/lib/sessionSpaceNormalizer.mjs.map +1 -0
  110. package/lib/sessions.d.mts +115 -0
  111. package/lib/sessions.d.mts.map +1 -0
  112. package/lib/sessions.mjs +290 -0
  113. package/lib/sessions.mjs.map +1 -0
  114. package/lib/types/idCompressor.d.mts +139 -0
  115. package/lib/types/idCompressor.d.mts.map +1 -0
  116. package/lib/types/idCompressor.mjs +6 -0
  117. package/lib/types/idCompressor.mjs.map +1 -0
  118. package/lib/types/identifiers.d.mts +40 -0
  119. package/lib/types/identifiers.d.mts.map +1 -0
  120. package/lib/types/identifiers.mjs +6 -0
  121. package/lib/types/identifiers.mjs.map +1 -0
  122. package/lib/types/index.d.mts +8 -0
  123. package/lib/types/index.d.mts.map +1 -0
  124. package/lib/types/index.mjs +6 -0
  125. package/lib/types/index.mjs.map +1 -0
  126. package/lib/types/persisted-types/0.0.1.d.mts +52 -0
  127. package/lib/types/persisted-types/0.0.1.d.mts.map +1 -0
  128. package/lib/types/persisted-types/0.0.1.mjs +6 -0
  129. package/lib/types/persisted-types/0.0.1.mjs.map +1 -0
  130. package/lib/types/persisted-types/index.d.mts +6 -0
  131. package/lib/types/persisted-types/index.d.mts.map +1 -0
  132. package/lib/types/persisted-types/index.mjs +6 -0
  133. package/lib/types/persisted-types/index.mjs.map +1 -0
  134. package/lib/utilities.d.mts +53 -0
  135. package/lib/utilities.d.mts.map +1 -0
  136. package/lib/utilities.mjs +151 -0
  137. package/lib/utilities.mjs.map +1 -0
  138. package/package.json +114 -0
  139. package/prettier.config.cjs +8 -0
  140. package/src/appendOnlySortedMap.ts +366 -0
  141. package/src/finalSpace.ts +67 -0
  142. package/src/idCompressor.ts +685 -0
  143. package/src/identifiers.ts +42 -0
  144. package/src/index.ts +23 -0
  145. package/src/packageVersion.ts +9 -0
  146. package/src/persistanceUtilities.ts +58 -0
  147. package/src/sessionSpaceNormalizer.ts +83 -0
  148. package/src/sessions.ts +405 -0
  149. package/src/types/idCompressor.ts +155 -0
  150. package/src/types/identifiers.ts +39 -0
  151. package/src/types/index.ts +15 -0
  152. package/src/types/persisted-types/0.0.1.ts +58 -0
  153. package/src/types/persisted-types/README.md +3 -0
  154. package/src/types/persisted-types/index.ts +11 -0
  155. package/src/utilities.ts +191 -0
  156. package/tsc-multi.test.json +4 -0
  157. package/tsconfig.json +12 -0
@@ -0,0 +1,333 @@
1
+ import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
2
+
3
+ /**
4
+ * Asserts that the given string is a stable ID.
5
+ * @internal
6
+ */
7
+ export declare function assertIsStableId(stableId: string): StableId;
8
+
9
+ /**
10
+ * Create a new {@link IIdCompressor}.
11
+ * @alpha
12
+ */
13
+ export declare function createIdCompressor(logger?: ITelemetryBaseLogger): IIdCompressor & IIdCompressorCore;
14
+
15
+ /**
16
+ * Create a new {@link IIdCompressor}.
17
+ * @param sessionId - The seed ID for the compressor.
18
+ * @alpha
19
+ */
20
+ export declare function createIdCompressor(sessionId: SessionId, logger?: ITelemetryBaseLogger): IIdCompressor & IIdCompressorCore;
21
+
22
+ /**
23
+ * Generate a random session ID
24
+ * @alpha
25
+ */
26
+ export declare function createSessionId(): SessionId;
27
+
28
+ /**
29
+ * Deserializes the supplied state into an ID compressor.
30
+ * @alpha
31
+ */
32
+ export declare function deserializeIdCompressor(serialized: SerializedIdCompressorWithOngoingSession): IIdCompressor & IIdCompressorCore;
33
+
34
+ /**
35
+ * Deserializes the supplied state into an ID compressor.
36
+ * @alpha
37
+ */
38
+ export declare function deserializeIdCompressor(serialized: SerializedIdCompressorWithNoSession, newSessionId: SessionId): IIdCompressor & IIdCompressorCore;
39
+
40
+ /**
41
+ * Generate a random stable ID
42
+ * @internal
43
+ */
44
+ export declare function generateStableId(): StableId;
45
+
46
+ /**
47
+ * See {@link IIdCompressor} and {@link IIdCompressorCore}
48
+ *
49
+ * @alpha
50
+ *
51
+ * @deprecated Not intended for public use and will be removed from the public API in the future.
52
+ * Use `createIdCompressor` instead.
53
+ */
54
+ export declare class IdCompressor implements IIdCompressor, IIdCompressorCore {
55
+ private readonly logger?;
56
+ /**
57
+ * Max allowed initial cluster size.
58
+ */
59
+ static readonly maxClusterSize: number;
60
+ readonly localSessionId: SessionId;
61
+ private readonly localSession;
62
+ private readonly normalizer;
63
+ private localGenCount;
64
+ private nextRangeBaseGenCount;
65
+ private readonly sessions;
66
+ private readonly finalSpace;
67
+ /**
68
+ * Roughly equates to a minimum of 1M sessions before we start allocating 64 bit IDs.
69
+ * Eventually, this can be adjusted dynamically to have cluster reservation policies that
70
+ * optimize the number of eager finals.
71
+ * It is not readonly as it is accessed by tests for clear-box testing.
72
+ */
73
+ private nextRequestedClusterSize;
74
+ private telemetryLocalIdCount;
75
+ private telemetryEagerFinalIdCount;
76
+ private constructor();
77
+ /**
78
+ * @deprecated Use `createIdCompressor` instead.
79
+ */
80
+ static create(logger?: ITelemetryBaseLogger): IIdCompressor & IIdCompressorCore;
81
+ /**
82
+ * @deprecated Use `createIdCompressor` instead.
83
+ */
84
+ static create(sessionId: SessionId, logger?: ITelemetryBaseLogger): IIdCompressor & IIdCompressorCore;
85
+ generateCompressedId(): SessionSpaceCompressedId;
86
+ private generateNextLocalId;
87
+ takeNextCreationRange(): IdCreationRange;
88
+ private static assertValidRange;
89
+ finalizeCreationRange(range: IdCreationRange): void;
90
+ private addEmptyCluster;
91
+ normalizeToOpSpace(id: SessionSpaceCompressedId): OpSpaceCompressedId;
92
+ normalizeToSessionSpace(id: OpSpaceCompressedId, originSessionId: SessionId): SessionSpaceCompressedId;
93
+ decompress(id: SessionSpaceCompressedId): StableId;
94
+ recompress(uncompressed: StableId): SessionSpaceCompressedId;
95
+ tryRecompress(uncompressed: StableId): SessionSpaceCompressedId | undefined;
96
+ serialize(withSession: true): SerializedIdCompressorWithOngoingSession;
97
+ serialize(withSession: false): SerializedIdCompressorWithNoSession;
98
+ static deserialize(serialized: SerializedIdCompressorWithOngoingSession): IdCompressor;
99
+ static deserialize(serialized: SerializedIdCompressorWithNoSession, newSessionId: SessionId): IdCompressor;
100
+ equals(other: IdCompressor, includeLocalState: boolean): boolean;
101
+ }
102
+
103
+ /**
104
+ * Data describing a range of session-local IDs (from a remote or local session).
105
+ *
106
+ * A range is composed of local IDs that were generated.
107
+ * @alpha
108
+ */
109
+ export declare interface IdCreationRange {
110
+ readonly sessionId: SessionId;
111
+ readonly ids?: {
112
+ /**
113
+ * The gen count of the first ID in the range created by `sessionId.`
114
+ */
115
+ readonly firstGenCount: number;
116
+ /**
117
+ * The number of IDs created in the range created by `sessionId.`
118
+ */
119
+ readonly count: number;
120
+ /**
121
+ * The size of the ID cluster to create if `count` overflows the existing cluster for
122
+ * `sessionId`, if one exists. This request will be respected, and the size of the cluster
123
+ * will be equal to overflow + `requestedClusterSize`.
124
+ */
125
+ readonly requestedClusterSize: number;
126
+ };
127
+ }
128
+
129
+ /**
130
+ * A distributed UUID generator and compressor.
131
+ *
132
+ * Generates arbitrary non-colliding v4 UUIDs, called stable IDs, for multiple "sessions" (which can be distributed across the network),
133
+ * providing each session with the ability to map these UUIDs to `numbers`.
134
+ *
135
+ * A session is a unique identifier that denotes a single compressor. New IDs are created through a single compressor API
136
+ * which should then sent in ranges to the server for total ordering (and are subsequently relayed to other clients). When a new ID is
137
+ * created it is said to be created by the compressor's "local" session.
138
+ *
139
+ * For each stable ID created, two numeric IDs are provided by the compressor:
140
+ *
141
+ * 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
142
+ * be serialized for offline usage). Available as soon as the stable ID is allocated. These IDs are session-unique and are thus only
143
+ * safely usable within the scope of the compressor that created it.
144
+ *
145
+ * 2. A final ID, which is stable across serialization and deserialization of an IdCompressor. Available as soon as the range containing
146
+ * the corresponding session-local ID is totally ordered (via consensus) with respect to other sessions' allocations.
147
+ * Final IDs are known to and publicly usable by any compressor that has received them.
148
+ *
149
+ * Compressors will allocate UUIDs in non-random ways to reduce entropy allowing for optimized storage of the data needed
150
+ * to map the UUIDs to the numbers.
151
+ *
152
+ * The following invariants are upheld by IdCompressor:
153
+ *
154
+ * 1. Session-local IDs will always decompress to the same UUIDs for the lifetime of the session.
155
+ *
156
+ * 2. Final IDs will always decompress to the same UUIDs.
157
+ *
158
+ * 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
159
+ * translated by the compressor into the corresponding final ID. For any given session-local ID, this translation will always yield the
160
+ * same final ID.
161
+ *
162
+ * 4. A UUID will always compress into the same session-local ID for the lifetime of the session.
163
+ *
164
+ * Session-local IDs are sent across the wire in efficiently-represented ranges. These ranges are created by querying the compressor, and *must*
165
+ * be ordered (i.e. sent to the server) in the order they are created in order to preserve the above invariants.
166
+ *
167
+ * Session-local IDs can be used immediately after creation, but will eventually (after being sequenced) have a corresponding final ID. This
168
+ * could make reasoning about equality of those two forms difficult. For example, if a cache is keyed off of a
169
+ * 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
170
+ * produce a cache miss. In order to make using collections of both remotely created and locally created IDs easy, regardless of whether the
171
+ * session-local IDs have been finalized, the compressor defines two "spaces" of IDs:
172
+ *
173
+ * 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
174
+ * will be in local form, regardless of if they have been finalized. Remotely created IDs, which could only have been received after
175
+ * 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
176
+ * 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
177
+ * these IDs across compressor objects, as the local IDs are specific to the compressor that created them.
178
+ *
179
+ * 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
180
+ * 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
181
+ * 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
182
+ * out of Op space over time, namely, when a session-local ID in this space becomes finalized, and thereafter has a "more final form".
183
+ * Consequentially, it may be useful to restrict parameters of a persisted type to this space (to optimize perf), but it is potentially
184
+ * 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
185
+ * "local as possible".
186
+ *
187
+ * These two spaces naturally define a rule: consumers of compressed IDs should use session-space IDs, but serialized forms such as ops
188
+ * should use op-space IDs.
189
+ * @public
190
+ */
191
+ export declare interface IIdCompressor {
192
+ localSessionId: SessionId;
193
+ /**
194
+ * Generates a new compressed ID or returns an existing one.
195
+ * This should ONLY be called to generate IDs for local operations.
196
+ * @returns A new local ID in session space.
197
+ */
198
+ generateCompressedId(): SessionSpaceCompressedId;
199
+ /**
200
+ * Normalizes a session space ID into op space.
201
+ * @param id - the local ID to normalize.
202
+ * @returns the ID in op space.
203
+ */
204
+ normalizeToOpSpace(id: SessionSpaceCompressedId): OpSpaceCompressedId;
205
+ /**
206
+ * Normalizes an ID into session space.
207
+ * @param id - the ID to normalize. If it is a local ID, it is assumed to have been created by the session corresponding
208
+ * to `sessionId`.
209
+ * @param originSessionId - the session from which `id` originated
210
+ * @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
211
+ * 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
212
+ * range that contained it from the server.
213
+ */
214
+ normalizeToSessionSpace(id: OpSpaceCompressedId, originSessionId: SessionId): SessionSpaceCompressedId;
215
+ /**
216
+ * Decompresses a previously compressed ID into a UUID.
217
+ * @param id - the compressed ID to be decompressed.
218
+ * @returns the UUID associated with the compressed ID. Fails if the ID was not generated by this compressor.
219
+ */
220
+ decompress(id: SessionSpaceCompressedId): StableId;
221
+ /**
222
+ * Recompresses a UUID.
223
+ * @param uncompressed - the UUID to recompress.
224
+ * @returns the `CompressedId` associated with `uncompressed`. Fails if it has not been previously compressed by this compressor.
225
+ */
226
+ recompress(uncompressed: StableId): SessionSpaceCompressedId;
227
+ /**
228
+ * Attempts to recompresses a UUID.
229
+ * @param uncompressed - the UUID to recompress,
230
+ * @returns the `CompressedId` associated with `uncompressed` or undefined if it has not been previously compressed by this compressor.
231
+ */
232
+ tryRecompress(uncompressed: StableId): SessionSpaceCompressedId | undefined;
233
+ }
234
+
235
+ /**
236
+ * @alpha
237
+ */
238
+ export declare interface IIdCompressorCore {
239
+ /**
240
+ * Returns a range of IDs created by this session in a format for sending to the server for finalizing.
241
+ * The range will include all IDs generated via calls to `generateCompressedId` since the last time this method was called.
242
+ * @returns the range of IDs, which may be empty. This range must be sent to the server for ordering before
243
+ * it is finalized. Ranges must be sent to the server in the order that they are taken via calls to this method.
244
+ */
245
+ takeNextCreationRange(): IdCreationRange;
246
+ /**
247
+ * Finalizes the supplied range of IDs (which may be from either a remote or local session).
248
+ * @param range - the range of session-local IDs to finalize.
249
+ */
250
+ finalizeCreationRange(range: IdCreationRange): void;
251
+ /**
252
+ * Returns a persistable form of the current state of this `IdCompressor` which can be rehydrated via `IdCompressor.deserialize()`.
253
+ * This includes finalized state as well as un-finalized state and is therefore suitable for use in offline scenarios.
254
+ */
255
+ serialize(withSession: true): SerializedIdCompressorWithOngoingSession;
256
+ /**
257
+ * Returns a persistable form of the current state of this `IdCompressor` which can be rehydrated via `IdCompressor.deserialize()`.
258
+ * This only includes finalized state and is therefore suitable for use in summaries.
259
+ */
260
+ serialize(withSession: false): SerializedIdCompressorWithNoSession;
261
+ }
262
+
263
+ /**
264
+ * Returns true iff the given string is a valid Version 4, variant 2 UUID
265
+ * 'xxxxxxxx-xxxx-4xxx-vxxx-xxxxxxxxxxxx'
266
+ * @internal
267
+ */
268
+ export declare function isStableId(str: string): str is StableId;
269
+
270
+ /**
271
+ * A compressed ID that has been normalized into "op space".
272
+ * Serialized/persisted structures (e.g. ops) should use op-space IDs as a performance optimization, as they require less normalizing when
273
+ * received by a remote client due to the fact that op space for a given compressor is session space for all other compressors.
274
+ * @public
275
+ */
276
+ export declare type OpSpaceCompressedId = number & {
277
+ readonly OpNormalized: "9209432d-a959-4df7-b2ad-767ead4dbcae";
278
+ };
279
+
280
+ /**
281
+ * The serialized contents of an IdCompressor, suitable for persistence in a summary.
282
+ * @alpha
283
+ */
284
+ export declare type SerializedIdCompressor = string & {
285
+ readonly _serializedIdCompressor: "8c73c57c-1cf4-4278-8915-6444cb4f6af5";
286
+ };
287
+
288
+ /**
289
+ * The serialized contents of an IdCompressor, suitable for persistence in a summary.
290
+ * @alpha
291
+ */
292
+ export declare type SerializedIdCompressorWithNoSession = SerializedIdCompressor & {
293
+ readonly _noLocalState: "3aa2e1e8-cc28-4ea7-bc1a-a11dc3f26dfb";
294
+ };
295
+
296
+ /**
297
+ * The serialized contents of an IdCompressor, suitable for persistence in a summary.
298
+ * @alpha
299
+ */
300
+ export declare type SerializedIdCompressorWithOngoingSession = SerializedIdCompressor & {
301
+ readonly _hasLocalState: "1281acae-6d14-47e7-bc92-71c8ee0819cb";
302
+ };
303
+
304
+ /**
305
+ * A StableId which is suitable for use as a session identifier
306
+ * @public
307
+ */
308
+ export declare type SessionId = StableId & {
309
+ readonly SessionId: "4498f850-e14e-4be9-8db0-89ec00997e58";
310
+ };
311
+
312
+ /**
313
+ * A compressed ID that has been normalized into "session space" (see `IdCompressor` for more).
314
+ * Consumer-facing APIs and data structures should use session-space IDs as their lifetime and equality is stable and tied to
315
+ * the scope of the session (i.e. compressor) that produced them.
316
+ * @public
317
+ */
318
+ export declare type SessionSpaceCompressedId = number & {
319
+ readonly SessionUnique: "cea55054-6b82-4cbf-ad19-1fa645ea3b3e";
320
+ };
321
+
322
+ /**
323
+ * A version 4, variant 1 uuid (https://datatracker.ietf.org/doc/html/rfc4122).
324
+ * A 128-bit Universally Unique IDentifier. Represented here
325
+ * with a string of the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx,
326
+ * where x is a lowercase hex digit.
327
+ * @public
328
+ */
329
+ export declare type StableId = string & {
330
+ readonly StableId: "53172b0d-a3d5-41ea-bd75-b43839c97f5a";
331
+ };
332
+
333
+ export { }