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

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 (37) hide show
  1. package/api-report/runtime-definitions.api.md +47 -47
  2. package/dist/dataStoreContext.d.ts +12 -12
  3. package/dist/dataStoreContext.js +2 -2
  4. package/dist/dataStoreContext.js.map +1 -1
  5. package/dist/dataStoreFactory.d.ts +3 -3
  6. package/dist/dataStoreFactory.js +1 -1
  7. package/dist/dataStoreFactory.js.map +1 -1
  8. package/dist/dataStoreRegistry.d.ts +6 -6
  9. package/dist/dataStoreRegistry.js +1 -1
  10. package/dist/dataStoreRegistry.js.map +1 -1
  11. package/dist/garbageCollection.d.ts +2 -2
  12. package/dist/garbageCollection.js.map +1 -1
  13. package/dist/id-compressor/idCompressor.d.ts +2 -2
  14. package/dist/id-compressor/idCompressor.js.map +1 -1
  15. package/dist/id-compressor/identifiers.d.ts +4 -4
  16. package/dist/id-compressor/identifiers.js.map +1 -1
  17. package/dist/id-compressor/persisted-types/0.0.1.d.ts +4 -4
  18. package/dist/id-compressor/persisted-types/0.0.1.js.map +1 -1
  19. package/dist/protocol.d.ts +1 -1
  20. package/dist/protocol.js.map +1 -1
  21. package/dist/runtime-definitions-alpha.d.ts +1058 -82
  22. package/dist/runtime-definitions-untrimmed.d.ts +47 -47
  23. package/dist/summary.d.ts +13 -13
  24. package/dist/summary.js +1 -1
  25. package/dist/summary.js.map +1 -1
  26. package/lib/runtime-definitions-alpha.d.ts +1058 -82
  27. package/lib/runtime-definitions-untrimmed.d.ts +47 -47
  28. package/package.json +4 -4
  29. package/src/dataStoreContext.ts +12 -12
  30. package/src/dataStoreFactory.ts +3 -3
  31. package/src/dataStoreRegistry.ts +6 -6
  32. package/src/garbageCollection.ts +2 -2
  33. package/src/id-compressor/idCompressor.ts +2 -2
  34. package/src/id-compressor/identifiers.ts +4 -4
  35. package/src/id-compressor/persisted-types/0.0.1.ts +4 -4
  36. package/src/protocol.ts +1 -1
  37. package/src/summary.ts +13 -13
@@ -8,8 +8,11 @@ import { IDocumentMessage } from '@fluidframework/protocol-definitions';
8
8
  import { IDocumentStorageService } from '@fluidframework/driver-definitions';
9
9
  import { IEvent } from '@fluidframework/core-interfaces';
10
10
  import { IEventProvider } from '@fluidframework/core-interfaces';
11
+ import { IFluidHandle } from '@fluidframework/core-interfaces';
12
+ import { IFluidHandleContext } from '@fluidframework/core-interfaces';
11
13
  import { IFluidRouter } from '@fluidframework/core-interfaces';
12
14
  import { ILoaderOptions } from '@fluidframework/container-definitions';
15
+ import { IProvideFluidHandleContext } from '@fluidframework/core-interfaces';
13
16
  import { IQuorumClients } from '@fluidframework/protocol-definitions';
14
17
  import { IRequest } from '@fluidframework/core-interfaces';
15
18
  import { IResponse } from '@fluidframework/core-interfaces';
@@ -23,7 +26,17 @@ import type { IUser } from '@fluidframework/protocol-definitions';
23
26
  import { SummaryTree } from '@fluidframework/protocol-definitions';
24
27
  import { TelemetryEventPropertyType } from '@fluidframework/core-interfaces';
25
28
 
26
- /* Excluded from this release type: AliasResult */
29
+ /**
30
+ * Encapsulates the return codes of the aliasing API.
31
+ *
32
+ * 'Success' - the datastore has been successfully aliased. It can now be used.
33
+ * 'Conflict' - there is already a datastore bound to the provided alias. To acquire it's entry point, use
34
+ * the `IContainerRuntime.getAliasedDataStoreEntryPoint` function. The current datastore should be discarded
35
+ * and will be garbage collected. The current datastore cannot be aliased to a different value.
36
+ * 'AlreadyAliased' - the datastore has already been previously bound to another alias name.
37
+ * @alpha
38
+ */
39
+ export declare type AliasResult = "Success" | "Conflict" | "AlreadyAliased";
27
40
 
28
41
  /* Excluded from this release type: AttributionInfo */
29
42
 
@@ -33,17 +46,61 @@ import { TelemetryEventPropertyType } from '@fluidframework/core-interfaces';
33
46
 
34
47
  /* Excluded from this release type: channelsTreeName */
35
48
 
36
- /* Excluded from this release type: CreateChildSummarizerNodeFn */
37
-
38
- /* Excluded from this release type: CreateChildSummarizerNodeParam */
39
-
40
- /* Excluded from this release type: CreateSummarizerNodeSource */
49
+ /**
50
+ * @alpha
51
+ */
52
+ export declare type CreateChildSummarizerNodeFn = (summarizeInternal: SummarizeInternalFn, getGCDataFn: (fullGC?: boolean) => Promise<IGarbageCollectionData>,
53
+ /**
54
+ * @deprecated The functionality to get base GC details has been moved to summarizer node.
55
+ */
56
+ getBaseGCDetailsFn?: () => Promise<IGarbageCollectionDetailsBase>) => ISummarizerNodeWithGC;
57
+
58
+ /**
59
+ * @alpha
60
+ */
61
+ export declare type CreateChildSummarizerNodeParam = {
62
+ type: CreateSummarizerNodeSource.FromSummary;
63
+ } | {
64
+ type: CreateSummarizerNodeSource.FromAttach;
65
+ sequenceNumber: number;
66
+ snapshot: ITree;
67
+ } | {
68
+ type: CreateSummarizerNodeSource.Local;
69
+ };
70
+
71
+ /**
72
+ * @alpha
73
+ */
74
+ export declare enum CreateSummarizerNodeSource {
75
+ FromSummary = 0,
76
+ FromAttach = 1,
77
+ Local = 2
78
+ }
41
79
 
42
80
  /* Excluded from this release type: DetachedAttributionKey */
43
81
 
44
- /* Excluded from this release type: FluidDataStoreRegistryEntry */
45
-
46
- /* Excluded from this release type: FlushMode */
82
+ /**
83
+ * A single registry entry that may be used to create data stores
84
+ * It has to have either factory or registry, or both.
85
+ * @alpha
86
+ */
87
+ export declare type FluidDataStoreRegistryEntry = Readonly<Partial<IProvideFluidDataStoreRegistry & IProvideFluidDataStoreFactory>>;
88
+
89
+ /**
90
+ * Runtime flush mode handling
91
+ * @alpha
92
+ */
93
+ export declare enum FlushMode {
94
+ /**
95
+ * In Immediate flush mode the runtime will immediately send all operations to the driver layer.
96
+ */
97
+ Immediate = 0,
98
+ /**
99
+ * When in TurnBased flush mode the runtime will buffer operations in the current turn and send them as a single
100
+ * batch at the end of the turn. The flush call on the runtime can be used to force send the current batch.
101
+ */
102
+ TurnBased = 1
103
+ }
47
104
 
48
105
  /* Excluded from this release type: FlushModeExperimental */
49
106
 
@@ -57,100 +114,1019 @@ import { TelemetryEventPropertyType } from '@fluidframework/core-interfaces';
57
114
 
58
115
  /* Excluded from this release type: IAttachMessage */
59
116
 
60
- /* Excluded from this release type: IContainerRuntimeBase */
61
-
62
- /* Excluded from this release type: IContainerRuntimeBaseEvents */
63
-
64
- /* Excluded from this release type: IDataStore */
65
-
66
- /* Excluded from this release type: IdCreationRange */
117
+ /**
118
+ * A reduced set of functionality of IContainerRuntime that a data store context/data store runtime will need
119
+ * TODO: this should be merged into IFluidDataStoreContext
120
+ * @alpha
121
+ */
122
+ export declare interface IContainerRuntimeBase extends IEventProvider<IContainerRuntimeBaseEvents> {
123
+ readonly logger: ITelemetryBaseLogger;
124
+ readonly clientDetails: IClientDetails;
125
+ /**
126
+ * Invokes the given callback and guarantees that all operations generated within the callback will be ordered
127
+ * sequentially. Total size of all messages must be less than maxOpSize.
128
+ */
129
+ orderSequentially(callback: () => void): void;
130
+ /**
131
+ * Executes a request against the container runtime
132
+ * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
133
+ */
134
+ request(request: IRequest): Promise<IResponse>;
135
+ /**
136
+ * Submits a container runtime level signal to be sent to other clients.
137
+ * @param type - Type of the signal.
138
+ * @param content - Content of the signal.
139
+ */
140
+ submitSignal(type: string, content: any): void;
141
+ /**
142
+ * @deprecated 0.16 Issue #1537, #3631
143
+ */
144
+ _createDataStoreWithProps(pkg: string | string[], props?: any, id?: string): Promise<IDataStore>;
145
+ /**
146
+ * Creates a data store and returns an object that exposes a handle to the data store's entryPoint, and also serves
147
+ * as the data store's router. The data store is not bound to a container, and in such state is not persisted to
148
+ * storage (file). Storing the entryPoint handle (or any other handle inside the data store, e.g. for DDS) into an
149
+ * already attached DDS (or non-attached DDS that will eventually get attached to storage) will result in this
150
+ * store being attached to storage.
151
+ * @param pkg - Package name of the data store factory
152
+ */
153
+ createDataStore(pkg: string | string[]): Promise<IDataStore>;
154
+ /**
155
+ * Creates detached data store context. Only after context.attachRuntime() is called,
156
+ * data store initialization is considered complete.
157
+ */
158
+ createDetachedDataStore(pkg: Readonly<string[]>): IFluidDataStoreContextDetached;
159
+ /**
160
+ * Get an absolute url for a provided container-relative request.
161
+ * Returns undefined if the container or data store isn't attached to storage.
162
+ * @param relativeUrl - A relative request within the container
163
+ */
164
+ getAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;
165
+ uploadBlob(blob: ArrayBufferLike, signal?: AbortSignal): Promise<IFluidHandle<ArrayBufferLike>>;
166
+ /**
167
+ * Returns the current quorum.
168
+ */
169
+ getQuorum(): IQuorumClients;
170
+ /**
171
+ * Returns the current audience.
172
+ */
173
+ getAudience(): IAudience;
174
+ /**
175
+ * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
176
+ */
177
+ readonly IFluidHandleContext: IFluidHandleContext;
178
+ }
179
+
180
+ /**
181
+ * @alpha
182
+ */
183
+ export declare interface IContainerRuntimeBaseEvents extends IEvent {
184
+ (event: "batchBegin", listener: (op: ISequencedDocumentMessage) => void): any;
185
+ /**
186
+ * @param runtimeMessage - tells if op is runtime op. If it is, it was unpacked, i.e. it's type and content
187
+ * represent internal container runtime type / content.
188
+ */
189
+ (event: "op", listener: (op: ISequencedDocumentMessage, runtimeMessage?: boolean) => void): any;
190
+ (event: "batchEnd", listener: (error: any, op: ISequencedDocumentMessage) => void): any;
191
+ (event: "signal", listener: (message: IInboundSignalMessage, local: boolean) => void): any;
192
+ }
193
+
194
+ /**
195
+ * Exposes some functionality/features of a data store:
196
+ * - Handle to the data store's entryPoint
197
+ * - Fluid router for the data store
198
+ * - Can be assigned an alias
199
+ * @alpha
200
+ */
201
+ export declare interface IDataStore {
202
+ /**
203
+ * Attempt to assign an alias to the datastore.
204
+ * If the operation succeeds, the datastore can be referenced
205
+ * by the supplied alias and will not be garbage collected.
206
+ *
207
+ * @param alias - Given alias for this datastore.
208
+ * @returns A promise with the {@link AliasResult}
209
+ */
210
+ trySetAlias(alias: string): Promise<AliasResult>;
211
+ /**
212
+ * Exposes a handle to the root object / entryPoint of the data store. Use this as the primary way of interacting
213
+ * with it.
214
+ */
215
+ readonly entryPoint: IFluidHandle<FluidObject>;
216
+ /**
217
+ * @deprecated Requesting will not be supported in a future major release.
218
+ * Instead, access the objects within the DataStore using entryPoint, and then navigate from there using
219
+ * app-specific logic (e.g. retrieving a handle from a DDS, or the entryPoint object could implement a request paradigm itself)
220
+ *
221
+ * IMPORTANT: This overload is provided for back-compat where IDataStore.request(\{ url: "/" \}) is already implemented and used.
222
+ * The functionality it can provide (if the DataStore implementation is built for it) is redundant with @see {@link IDataStore.entryPoint}.
223
+ *
224
+ * Refer to Removing-IFluidRouter.md for details on migrating from the request pattern to using entryPoint.
225
+ *
226
+ * @param request - Only requesting \{ url: "/" \} is supported, requesting arbitrary URLs is deprecated.
227
+ */
228
+ request(request: {
229
+ url: "/";
230
+ headers?: undefined;
231
+ }): Promise<IResponse>;
232
+ /**
233
+ * Issue a request against the DataStore for a resource within it.
234
+ * @param request - The request to be issued against the DataStore
235
+ *
236
+ * @deprecated Requesting an arbitrary URL with headers will not be supported in a future major release.
237
+ * Instead, access the objects within the DataStore using entryPoint, and then navigate from there using
238
+ * app-specific logic (e.g. retrieving a handle from a DDS, or the entryPoint object could implement a request paradigm itself)
239
+ *
240
+ * Refer to Removing-IFluidRouter.md for details on migrating from the request pattern to using entryPoint.
241
+ */
242
+ request(request: IRequest): Promise<IResponse>;
243
+ /**
244
+ * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
245
+ */
246
+ readonly IFluidRouter: IFluidRouter;
247
+ }
248
+
249
+ /**
250
+ * Data describing a range of session-local IDs (from a remote or local session).
251
+ *
252
+ * A range is composed of local IDs that were generated.
253
+ * @alpha
254
+ */
255
+ export declare interface IdCreationRange {
256
+ readonly sessionId: SessionId;
257
+ readonly ids?: {
258
+ readonly firstGenCount: number;
259
+ readonly count: number;
260
+ };
261
+ }
67
262
 
68
263
  /* Excluded from this release type: IEnvelope */
69
264
 
70
- /* Excluded from this release type: IExperimentalIncrementalSummaryContext */
71
-
72
- /* Excluded from this release type: IFluidDataStoreChannel */
73
-
74
- /* Excluded from this release type: IFluidDataStoreContext */
75
-
76
- /* Excluded from this release type: IFluidDataStoreContextDetached */
77
-
78
- /* Excluded from this release type: IFluidDataStoreContextEvents */
79
-
80
- /* Excluded from this release type: IFluidDataStoreFactory */
81
-
82
- /* Excluded from this release type: IFluidDataStoreRegistry */
83
-
84
- /* Excluded from this release type: IFluidHandle */
85
-
86
- /* Excluded from this release type: IFluidHandleContext */
87
-
88
- /* Excluded from this release type: IGarbageCollectionData */
89
-
90
- /* Excluded from this release type: IGarbageCollectionDetailsBase */
91
-
92
- /* Excluded from this release type: IIdCompressor */
93
-
94
- /* Excluded from this release type: IIdCompressorCore */
95
-
96
- /* Excluded from this release type: IInboundSignalMessage */
265
+ /**
266
+ * @experimental - Can be deleted/changed at any time
267
+ * Contains the necessary information to allow DDSes to do incremental summaries
268
+ * @alpha
269
+ */
270
+ export declare interface IExperimentalIncrementalSummaryContext {
271
+ /**
272
+ * The sequence number of the summary generated that will be sent to the server.
273
+ */
274
+ summarySequenceNumber: number;
275
+ /**
276
+ * The sequence number of the most recent summary that was acknowledged by the server.
277
+ */
278
+ latestSummarySequenceNumber: number;
279
+ /**
280
+ * The path to the runtime/datastore/dds that is used to generate summary handles
281
+ * Note: Summary handles are nodes of the summary tree that point to previous parts of the last successful summary
282
+ * instead of being a blob or tree node
283
+ *
284
+ * This path contains the id of the data store and dds which should not be leaked to layers below them. Ideally,
285
+ * a layer should not know its own id. This is important for channel unification work and there has been a lot of
286
+ * work to remove these kinds of leakages. Some still exist, which have to be fixed but we should not be adding
287
+ * more dependencies.
288
+ */
289
+ summaryPath: string;
290
+ }
291
+
292
+ /**
293
+ * Minimal interface a data store runtime needs to provide for IFluidDataStoreContext to bind to control.
294
+ *
295
+ * Functionality include attach, snapshot, op/signal processing, request routes, expose an entryPoint,
296
+ * and connection state notifications
297
+ * @alpha
298
+ */
299
+ export declare interface IFluidDataStoreChannel extends IDisposable {
300
+ readonly id: string;
301
+ /**
302
+ * Indicates the attachment state of the channel to a host service.
303
+ */
304
+ readonly attachState: AttachState;
305
+ readonly visibilityState: VisibilityState;
306
+ /**
307
+ * Runs through the graph and attaches the bound handles. Then binds this runtime to the container.
308
+ * @deprecated This will be removed in favor of {@link IFluidDataStoreChannel.makeVisibleAndAttachGraph}.
309
+ */
310
+ attachGraph(): void;
311
+ /**
312
+ * Makes the data store channel visible in the container. Also, runs through its graph and attaches all
313
+ * bound handles that represent its dependencies in the container's graph.
314
+ */
315
+ makeVisibleAndAttachGraph(): void;
316
+ /**
317
+ * Retrieves the summary used as part of the initial summary message
318
+ */
319
+ getAttachSummary(telemetryContext?: ITelemetryContext): ISummaryTreeWithStats;
320
+ /**
321
+ * Processes the op.
322
+ */
323
+ process(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void;
324
+ /**
325
+ * Processes the signal.
326
+ */
327
+ processSignal(message: any, local: boolean): void;
328
+ /**
329
+ * Generates a summary for the channel.
330
+ * Introduced with summarizerNode - will be required in a future release.
331
+ * @param fullTree - true to bypass optimizations and force a full summary tree.
332
+ * @param trackState - This tells whether we should track state from this summary.
333
+ * @param telemetryContext - summary data passed through the layers for telemetry purposes
334
+ */
335
+ summarize(fullTree?: boolean, trackState?: boolean, telemetryContext?: ITelemetryContext): Promise<ISummaryTreeWithStats>;
336
+ /**
337
+ * Returns the data used for garbage collection. This includes a list of GC nodes that represent this context
338
+ * including any of its children. Each node has a list of outbound routes to other GC nodes in the document.
339
+ * @param fullGC - true to bypass optimizations and force full generation of GC data.
340
+ */
341
+ getGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;
342
+ /**
343
+ * After GC has run, called to notify this channel of routes that are used in it.
344
+ * @param usedRoutes - The routes that are used in this channel.
345
+ */
346
+ updateUsedRoutes(usedRoutes: string[]): void;
347
+ /**
348
+ * Notifies this object about changes in the connection state.
349
+ * @param value - New connection state.
350
+ * @param clientId - ID of the client. It's old ID when in disconnected state and
351
+ * it's new client ID when we are connecting or connected.
352
+ */
353
+ setConnectionState(connected: boolean, clientId?: string): any;
354
+ /**
355
+ * Ask the DDS to resubmit a message. This could be because we reconnected and this message was not acked.
356
+ * @param type - The type of the original message.
357
+ * @param content - The content of the original message.
358
+ * @param localOpMetadata - The local metadata associated with the original message.
359
+ */
360
+ reSubmit(type: string, content: any, localOpMetadata: unknown): any;
361
+ applyStashedOp(content: any): Promise<unknown>;
362
+ /**
363
+ * Revert a local message.
364
+ * @param type - The type of the original message.
365
+ * @param content - The content of the original message.
366
+ * @param localOpMetadata - The local metadata associated with the original message.
367
+ */
368
+ rollback?(type: string, content: any, localOpMetadata: unknown): void;
369
+ /**
370
+ * Exposes a handle to the root object / entryPoint of the component. Use this as the primary way of interacting
371
+ * with the component.
372
+ */
373
+ readonly entryPoint: IFluidHandle<FluidObject>;
374
+ request(request: IRequest): Promise<IResponse>;
375
+ /**
376
+ * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
377
+ */
378
+ readonly IFluidRouter: IFluidRouter;
379
+ }
380
+
381
+ /**
382
+ * Represents the context for the data store. It is used by the data store runtime to
383
+ * get information and call functionality to the container.
384
+ * @alpha
385
+ */
386
+ export declare interface IFluidDataStoreContext extends IEventProvider<IFluidDataStoreContextEvents>, Partial<IProvideFluidDataStoreRegistry>, IProvideFluidHandleContext {
387
+ readonly id: string;
388
+ /**
389
+ * A data store created by a client, is a local data store for that client. Also, when a detached container loads
390
+ * from a snapshot, all the data stores are treated as local data stores because at that stage the container
391
+ * still doesn't exists in storage and so the data store couldn't have been created by any other client.
392
+ * Value of this never changes even after the data store is attached.
393
+ * As implementer of data store runtime, you can use this property to check that this data store belongs to this
394
+ * client and hence implement any scenario based on that.
395
+ */
396
+ readonly isLocalDataStore: boolean;
397
+ /**
398
+ * The package path of the data store as per the package factory.
399
+ */
400
+ readonly packagePath: readonly string[];
401
+ readonly options: ILoaderOptions;
402
+ readonly clientId: string | undefined;
403
+ readonly connected: boolean;
404
+ readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;
405
+ readonly storage: IDocumentStorageService;
406
+ readonly baseSnapshot: ISnapshotTree | undefined;
407
+ readonly logger: ITelemetryBaseLogger;
408
+ readonly clientDetails: IClientDetails;
409
+ readonly idCompressor?: IIdCompressor;
410
+ /**
411
+ * Indicates the attachment state of the data store to a host service.
412
+ */
413
+ readonly attachState: AttachState;
414
+ readonly containerRuntime: IContainerRuntimeBase;
415
+ /**
416
+ * @deprecated 0.16 Issue #1635, #3631
417
+ */
418
+ readonly createProps?: any;
419
+ /**
420
+ * Ambient services provided with the context
421
+ */
422
+ readonly scope: FluidObject;
423
+ /**
424
+ * Returns the current quorum.
425
+ */
426
+ getQuorum(): IQuorumClients;
427
+ /**
428
+ * Returns the current audience.
429
+ */
430
+ getAudience(): IAudience;
431
+ /**
432
+ * Invokes the given callback and expects that no ops are submitted
433
+ * until execution finishes. If an op is submitted, an error will be raised.
434
+ *
435
+ * Can be disabled by feature gate `Fluid.ContainerRuntime.DisableOpReentryCheck`
436
+ *
437
+ * @param callback - the callback to be invoked
438
+ */
439
+ ensureNoDataModelChanges<T>(callback: () => T): T;
440
+ /**
441
+ * Submits the message to be sent to other clients.
442
+ * @param type - Type of the message.
443
+ * @param content - Content of the message.
444
+ * @param localOpMetadata - The local metadata associated with the message. This is kept locally and not sent to
445
+ * the server. This will be sent back when this message is received back from the server. This is also sent if
446
+ * we are asked to resubmit the message.
447
+ */
448
+ submitMessage(type: string, content: any, localOpMetadata: unknown): void;
449
+ /**
450
+ * Submits the signal to be sent to other clients.
451
+ * @param type - Type of the signal.
452
+ * @param content - Content of the signal.
453
+ * @param targetClientId - When specified, the signal is only sent to the provided client id.
454
+ */
455
+ submitSignal(type: string, content: any, targetClientId?: string): void;
456
+ /**
457
+ * Called to make the data store locally visible in the container. This happens automatically for root data stores
458
+ * when they are marked as root. For non-root data stores, this happens when their handle is added to a visible DDS.
459
+ */
460
+ makeLocallyVisible(): void;
461
+ /**
462
+ * Call by IFluidDataStoreChannel, indicates that a channel is dirty and needs to be part of the summary.
463
+ * @param address - The address of the channel that is dirty.
464
+ */
465
+ setChannelDirty(address: string): void;
466
+ /**
467
+ * Get an absolute url to the container based on the provided relativeUrl.
468
+ * Returns undefined if the container or data store isn't attached to storage.
469
+ * @param relativeUrl - A relative request within the container
470
+ */
471
+ getAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;
472
+ getCreateChildSummarizerNodeFn(
473
+ /**
474
+ * Initial id or path part of this node
475
+ */
476
+ id: string,
477
+ /**
478
+ * Information needed to create the node.
479
+ * If it is from a base summary, it will assert that a summary has been seen.
480
+ * Attach information if it is created from an attach op.
481
+ * If it is local, it will throw unsupported errors on calls to summarize.
482
+ */
483
+ createParam: CreateChildSummarizerNodeParam): CreateChildSummarizerNodeFn;
484
+ uploadBlob(blob: ArrayBufferLike, signal?: AbortSignal): Promise<IFluidHandle<ArrayBufferLike>>;
485
+ /**
486
+ * @deprecated The functionality to get base GC details has been moved to summarizer node.
487
+ *
488
+ * Returns the GC details in the initial summary of this data store. This is used to initialize the data store
489
+ * and its children with the GC details from the previous summary.
490
+ */
491
+ getBaseGCDetails(): Promise<IGarbageCollectionDetailsBase>;
492
+ /**
493
+ * Called when a new outbound reference is added to another node. This is used by garbage collection to identify
494
+ * all references added in the system.
495
+ * @param srcHandle - The handle of the node that added the reference.
496
+ * @param outboundHandle - The handle of the outbound node that is referenced.
497
+ */
498
+ addedGCOutboundReference?(srcHandle: IFluidHandle, outboundHandle: IFluidHandle): void;
499
+ }
500
+
501
+ /**
502
+ * @alpha
503
+ */
504
+ export declare interface IFluidDataStoreContextDetached extends IFluidDataStoreContext {
505
+ /**
506
+ * Binds a runtime to the context.
507
+ */
508
+ attachRuntime(factory: IProvideFluidDataStoreFactory, dataStoreRuntime: IFluidDataStoreChannel): Promise<void>;
509
+ }
510
+
511
+ /**
512
+ * @alpha
513
+ */
514
+ export declare interface IFluidDataStoreContextEvents extends IEvent {
515
+ (event: "attaching" | "attached", listener: () => void): any;
516
+ }
517
+
518
+ /**
519
+ * @alpha
520
+ */
521
+ export declare const IFluidDataStoreFactory: keyof IProvideFluidDataStoreFactory;
522
+
523
+ /**
524
+ * IFluidDataStoreFactory create data stores. It is associated with an identifier (its `type` member)
525
+ * and usually provided to consumers using this mapping through a data store registry.
526
+ * @alpha
527
+ */
528
+ export declare interface IFluidDataStoreFactory extends IProvideFluidDataStoreFactory {
529
+ /**
530
+ * String that uniquely identifies the type of data store created by this factory.
531
+ */
532
+ type: string;
533
+ /**
534
+ * Generates runtime for the data store from the data store context. Once created should be bound to the context.
535
+ * @param context - Context for the data store.
536
+ * @param existing - If instantiating from an existing file.
537
+ */
538
+ instantiateDataStore(context: IFluidDataStoreContext, existing: boolean): Promise<IFluidDataStoreChannel>;
539
+ }
540
+
541
+ /**
542
+ * @alpha
543
+ */
544
+ export declare const IFluidDataStoreRegistry: keyof IProvideFluidDataStoreRegistry;
545
+
546
+ /**
547
+ * An association of identifiers to data store registry entries, where the
548
+ * entries can be used to create data stores.
549
+ * @alpha
550
+ */
551
+ export declare interface IFluidDataStoreRegistry extends IProvideFluidDataStoreRegistry {
552
+ get(name: string): Promise<FluidDataStoreRegistryEntry | undefined>;
553
+ }
554
+
555
+ /**
556
+ * Garbage collection data returned by nodes in a Container.
557
+ * Used for running GC in the Container.
558
+ * @alpha
559
+ */
560
+ export declare interface IGarbageCollectionData {
561
+ /**
562
+ * The GC nodes of a Fluid object in the Container. Each node has an id and a set of routes to other GC nodes.
563
+ */
564
+ gcNodes: {
565
+ [id: string]: string[];
566
+ };
567
+ }
568
+
569
+ /**
570
+ * GC details provided to each node during creation.
571
+ * @alpha
572
+ */
573
+ export declare interface IGarbageCollectionDetailsBase {
574
+ /**
575
+ * A list of routes to Fluid objects that are used in this node.
576
+ */
577
+ usedRoutes?: string[];
578
+ /**
579
+ * The GC data of this node.
580
+ */
581
+ gcData?: IGarbageCollectionData;
582
+ }
583
+
584
+ /**
585
+ * A distributed UUID generator and compressor.
586
+ *
587
+ * Generates arbitrary non-colliding v4 UUIDs, called stable IDs, for multiple "sessions" (which can be distributed across the network),
588
+ * providing each session with the ability to map these UUIDs to `numbers`.
589
+ *
590
+ * A session is a unique identifier that denotes a single compressor. New IDs are created through a single compressor API
591
+ * which should then sent in ranges to the server for total ordering (and are subsequently relayed to other clients). When a new ID is
592
+ * created it is said to be created by the compressor's "local" session.
593
+ *
594
+ * For each stable ID created, two numeric IDs are provided by the compressor:
595
+ *
596
+ * 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
597
+ * be serialized for offline usage). Available as soon as the stable ID is allocated. These IDs are session-unique and are thus only
598
+ * safely usable within the scope of the compressor that created it.
599
+ *
600
+ * 2. A final ID, which is stable across serialization and deserialization of an IdCompressor. Available as soon as the range containing
601
+ * the corresponding session-local ID is totally ordered (via consensus) with respect to other sessions' allocations.
602
+ * Final IDs are known to and publicly usable by any compressor that has received them.
603
+ *
604
+ * Compressors will allocate UUIDs in non-random ways to reduce entropy allowing for optimized storage of the data needed
605
+ * to map the UUIDs to the numbers.
606
+ *
607
+ * The following invariants are upheld by IdCompressor:
608
+ *
609
+ * 1. Session-local IDs will always decompress to the same UUIDs for the lifetime of the session.
610
+ *
611
+ * 2. Final IDs will always decompress to the same UUIDs.
612
+ *
613
+ * 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
614
+ * translated by the compressor into the corresponding final ID. For any given session-local ID, this translation will always yield the
615
+ * same final ID.
616
+ *
617
+ * 4. A UUID will always compress into the same session-local ID for the lifetime of the session.
618
+ *
619
+ * Session-local IDs are sent across the wire in efficiently-represented ranges. These ranges are created by querying the compressor, and *must*
620
+ * be ordered (i.e. sent to the server) in the order they are created in order to preserve the above invariants.
621
+ *
622
+ * Session-local IDs can be used immediately after creation, but will eventually (after being sequenced) have a corresponding final ID. This
623
+ * could make reasoning about equality of those two forms difficult. For example, if a cache is keyed off of a
624
+ * 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
625
+ * produce a cache miss. In order to make using collections of both remotely created and locally created IDs easy, regardless of whether the
626
+ * session-local IDs have been finalized, the compressor defines two "spaces" of IDs:
627
+ *
628
+ * 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
629
+ * will be in local form, regardless of if they have been finalized. Remotely created IDs, which could only have been received after
630
+ * 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
631
+ * 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
632
+ * these IDs across compressor objects, as the local IDs are specific to the compressor that created them.
633
+ *
634
+ * 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
635
+ * 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
636
+ * 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
637
+ * out of Op space over time, namely, when a session-local ID in this space becomes finalized, and thereafter has a "more final form".
638
+ * Consequentially, it may be useful to restrict parameters of a persisted type to this space (to optimize perf), but it is potentially
639
+ * 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
640
+ * "local as possible".
641
+ *
642
+ * These two spaces naturally define a rule: consumers of compressed IDs should use session-space IDs, but serialized forms such as ops
643
+ * should use op-space IDs.
644
+ * @alpha
645
+ */
646
+ export declare interface IIdCompressor {
647
+ localSessionId: SessionId;
648
+ /**
649
+ * Generates a new compressed ID or returns an existing one.
650
+ * This should ONLY be called to generate IDs for local operations.
651
+ * @returns A new local ID in session space.
652
+ */
653
+ generateCompressedId(): SessionSpaceCompressedId;
654
+ /**
655
+ * Normalizes a session space ID into op space.
656
+ * @param id - the local ID to normalize.
657
+ * @returns the ID in op space.
658
+ */
659
+ normalizeToOpSpace(id: SessionSpaceCompressedId): OpSpaceCompressedId;
660
+ /**
661
+ * Normalizes an ID into session space.
662
+ * @param id - the ID to normalize. If it is a local ID, it is assumed to have been created by the session corresponding
663
+ * to `sessionId`.
664
+ * @param originSessionId - the session from which `id` originated
665
+ * @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
666
+ * 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
667
+ * range that contained it from the server.
668
+ */
669
+ normalizeToSessionSpace(id: OpSpaceCompressedId, originSessionId: SessionId): SessionSpaceCompressedId;
670
+ /**
671
+ * Decompresses a previously compressed ID into a UUID.
672
+ * @param id - the compressed ID to be decompressed.
673
+ * @returns the UUID associated with the compressed ID. Fails if the ID was not generated by this compressor.
674
+ */
675
+ decompress(id: SessionSpaceCompressedId): StableId;
676
+ /**
677
+ * Recompresses a UUID.
678
+ * @param uncompressed - the UUID to recompress.
679
+ * @returns the `CompressedId` associated with `uncompressed`. Fails if it has not been previously compressed by this compressor.
680
+ */
681
+ recompress(uncompressed: StableId): SessionSpaceCompressedId;
682
+ /**
683
+ * Attempts to recompresses a UUID.
684
+ * @param uncompressed - the UUID to recompress,
685
+ * @returns the `CompressedId` associated with `uncompressed` or undefined if it has not been previously compressed by this compressor.
686
+ */
687
+ tryRecompress(uncompressed: StableId): SessionSpaceCompressedId | undefined;
688
+ }
689
+
690
+ /**
691
+ * @alpha
692
+ */
693
+ export declare interface IIdCompressorCore {
694
+ /**
695
+ * Returns a range of IDs created by this session in a format for sending to the server for finalizing.
696
+ * The range will include all IDs generated via calls to `generateCompressedId` since the last time this method was called.
697
+ * @returns the range of IDs, which may be empty. This range must be sent to the server for ordering before
698
+ * it is finalized. Ranges must be sent to the server in the order that they are taken via calls to this method.
699
+ */
700
+ takeNextCreationRange(): IdCreationRange;
701
+ /**
702
+ * Finalizes the supplied range of IDs (which may be from either a remote or local session).
703
+ * @param range - the range of session-local IDs to finalize.
704
+ */
705
+ finalizeCreationRange(range: IdCreationRange): void;
706
+ /**
707
+ * Returns a persistable form of the current state of this `IdCompressor` which can be rehydrated via `IdCompressor.deserialize()`.
708
+ * This includes finalized state as well as un-finalized state and is therefore suitable for use in offline scenarios.
709
+ */
710
+ serialize(withSession: true): SerializedIdCompressorWithOngoingSession;
711
+ /**
712
+ * Returns a persistable form of the current state of this `IdCompressor` which can be rehydrated via `IdCompressor.deserialize()`.
713
+ * This only includes finalized state and is therefore suitable for use in summaries.
714
+ */
715
+ serialize(withSession: false): SerializedIdCompressorWithNoSession;
716
+ }
717
+
718
+ /**
719
+ * Represents ISignalMessage with its type.
720
+ * @alpha
721
+ */
722
+ export declare interface IInboundSignalMessage extends ISignalMessage {
723
+ type: string;
724
+ }
97
725
 
98
726
  /* Excluded from this release type: InboundAttachMessage */
99
727
 
100
728
  /* Excluded from this release type: initialClusterCapacity */
101
729
 
102
- /* Excluded from this release type: IProvideFluidDataStoreFactory */
103
-
104
- /* Excluded from this release type: IProvideFluidDataStoreRegistry */
730
+ /**
731
+ * @alpha
732
+ */
733
+ export declare interface IProvideFluidDataStoreFactory {
734
+ readonly IFluidDataStoreFactory: IFluidDataStoreFactory;
735
+ }
105
736
 
106
- /* Excluded from this release type: IProvideFluidHandleContext */
737
+ /**
738
+ * @alpha
739
+ */
740
+ export declare interface IProvideFluidDataStoreRegistry {
741
+ readonly IFluidDataStoreRegistry: IFluidDataStoreRegistry;
742
+ }
107
743
 
108
744
  /* Excluded from this release type: ISignalEnvelope */
109
745
 
110
- /* Excluded from this release type: ISummarizeInternalResult */
111
-
112
- /* Excluded from this release type: ISummarizeResult */
113
-
114
- /* Excluded from this release type: ISummarizerNode */
115
-
116
- /* Excluded from this release type: ISummarizerNodeConfig */
117
-
118
- /* Excluded from this release type: ISummarizerNodeConfigWithGC */
119
-
120
- /* Excluded from this release type: ISummarizerNodeWithGC */
121
-
122
- /* Excluded from this release type: ISummaryStats */
123
-
124
- /* Excluded from this release type: ISummaryTreeWithStats */
125
-
126
- /* Excluded from this release type: ITelemetryContext */
746
+ /**
747
+ * Contains the same data as ISummaryResult but in order to avoid naming collisions,
748
+ * the data store summaries are wrapped around an array of labels identified by pathPartsForChildren.
749
+ *
750
+ * @example
751
+ *
752
+ * ```typescript
753
+ * id:""
754
+ * pathPartsForChildren: ["path1"]
755
+ * stats: ...
756
+ * summary:
757
+ * ...
758
+ * "path1":
759
+ * ```
760
+ * @alpha
761
+ */
762
+ export declare interface ISummarizeInternalResult extends ISummarizeResult {
763
+ id: string;
764
+ /**
765
+ * Additional path parts between this node's ID and its children's IDs.
766
+ */
767
+ pathPartsForChildren?: string[];
768
+ }
769
+
770
+ /**
771
+ * Represents a summary at a current sequence number.
772
+ * @alpha
773
+ */
774
+ export declare interface ISummarizeResult {
775
+ stats: ISummaryStats;
776
+ summary: SummaryTree;
777
+ }
778
+
779
+ /**
780
+ * @alpha
781
+ */
782
+ export declare interface ISummarizerNode {
783
+ /**
784
+ * Latest successfully acked summary reference sequence number
785
+ */
786
+ readonly referenceSequenceNumber: number;
787
+ /**
788
+ * Marks the node as having a change with the given sequence number.
789
+ * @param sequenceNumber - sequence number of change
790
+ */
791
+ invalidate(sequenceNumber: number): void;
792
+ /**
793
+ * Calls the internal summarize function and handles internal state tracking.
794
+ * If unchanged and fullTree is false, it will reuse previous summary subtree.
795
+ * If an error is encountered and throwOnFailure is false, it will try to make
796
+ * a summary with a pointer to the previous summary + a blob of outstanding ops.
797
+ * @param fullTree - true to skip optimizations and always generate the full tree
798
+ * @param trackState - indicates whether the summarizer node should track the state of the summary or not
799
+ * @param telemetryContext - summary data passed through the layers for telemetry purposes
800
+ */
801
+ summarize(fullTree: boolean, trackState?: boolean, telemetryContext?: ITelemetryContext): Promise<ISummarizeResult>;
802
+ /**
803
+ * Checks if there are any additional path parts for children that need to
804
+ * be loaded from the base summary. Additional path parts represent parts
805
+ * of the path between this SummarizerNode and any child SummarizerNodes
806
+ * that it might have. For example: if datastore "a" contains dds "b", but the
807
+ * path is "/a/.channels/b", then the additional path part is ".channels".
808
+ * @param snapshot - the base summary to parse
809
+ */
810
+ updateBaseSummaryState(snapshot: ISnapshotTree): void;
811
+ /**
812
+ * Records an op representing a change to this node/subtree.
813
+ * @param op - op of change to record
814
+ */
815
+ recordChange(op: ISequencedDocumentMessage): void;
816
+ createChild(
817
+ /**
818
+ * Summarize function
819
+ */
820
+ summarizeInternalFn: SummarizeInternalFn,
821
+ /**
822
+ * Initial id or path part of this node
823
+ */
824
+ id: string,
825
+ /**
826
+ * Information needed to create the node.
827
+ * If it is from a base summary, it will assert that a summary has been seen.
828
+ * Attach information if it is created from an attach op.
829
+ * If it is local, it will throw unsupported errors on calls to summarize.
830
+ */
831
+ createParam: CreateChildSummarizerNodeParam,
832
+ /**
833
+ * Optional configuration affecting summarize behavior
834
+ */
835
+ config?: ISummarizerNodeConfig): ISummarizerNode;
836
+ getChild(id: string): ISummarizerNode | undefined;
837
+ /** True if a summary is currently in progress */
838
+ isSummaryInProgress?(): boolean;
839
+ }
840
+
841
+ /**
842
+ * @alpha
843
+ */
844
+ export declare interface ISummarizerNodeConfig {
845
+ /**
846
+ * True to reuse previous handle when unchanged since last acked summary.
847
+ * Defaults to true.
848
+ */
849
+ readonly canReuseHandle?: boolean;
850
+ /**
851
+ * True to always stop execution on error during summarize, or false to
852
+ * attempt creating a summary that is a pointer ot the last acked summary
853
+ * plus outstanding ops in case of internal summarize failure.
854
+ * Defaults to false.
855
+ *
856
+ * BUG BUG: Default to true while we investigate problem
857
+ * with differential summaries
858
+ */
859
+ readonly throwOnFailure?: true;
860
+ }
861
+
862
+ /**
863
+ * @alpha
864
+ */
865
+ export declare interface ISummarizerNodeConfigWithGC extends ISummarizerNodeConfig {
866
+ /**
867
+ * True if GC is disabled. If so, don't track GC related state for a summary.
868
+ * This is propagated to all child nodes.
869
+ */
870
+ readonly gcDisabled?: boolean;
871
+ }
872
+
873
+ /**
874
+ * Extends the functionality of ISummarizerNode to support garbage collection. It adds / updates the following APIs:
875
+ *
876
+ * `usedRoutes`: The routes in this node that are currently in use.
877
+ *
878
+ * `getGCData`: A new API that can be used to get the garbage collection data for this node.
879
+ *
880
+ * `summarize`: Added a trackState flag which indicates whether the summarizer node should track the state of the
881
+ * summary or not.
882
+ *
883
+ * `createChild`: Added the following params:
884
+ *
885
+ * - `getGCDataFn`: This gets the GC data from the caller. This must be provided in order for getGCData to work.
886
+ *
887
+ * - `getInitialGCDetailsFn`: This gets the initial GC details from the caller.
888
+ *
889
+ * `deleteChild`: Deletes a child node.
890
+ *
891
+ * `isReferenced`: This tells whether this node is referenced in the document or not.
892
+ *
893
+ * `updateUsedRoutes`: Used to notify this node of routes that are currently in use in it.
894
+ * @alpha
895
+ */
896
+ export declare interface ISummarizerNodeWithGC extends ISummarizerNode {
897
+ createChild(
898
+ /**
899
+ * Summarize function
900
+ */
901
+ summarizeInternalFn: SummarizeInternalFn,
902
+ /**
903
+ * Initial id or path part of this node
904
+ */
905
+ id: string,
906
+ /**
907
+ * Information needed to create the node.
908
+ * If it is from a base summary, it will assert that a summary has been seen.
909
+ * Attach information if it is created from an attach op.
910
+ * If it is local, it will throw unsupported errors on calls to summarize.
911
+ */
912
+ createParam: CreateChildSummarizerNodeParam,
913
+ /**
914
+ * Optional configuration affecting summarize behavior
915
+ */
916
+ config?: ISummarizerNodeConfigWithGC, getGCDataFn?: (fullGC?: boolean) => Promise<IGarbageCollectionData>,
917
+ /**
918
+ * @deprecated The functionality to update child's base GC details is incorporated in the summarizer node.
919
+ */
920
+ getBaseGCDetailsFn?: () => Promise<IGarbageCollectionDetailsBase>): ISummarizerNodeWithGC;
921
+ /**
922
+ * Delete the child with the given id..
923
+ */
924
+ deleteChild(id: string): void;
925
+ getChild(id: string): ISummarizerNodeWithGC | undefined;
926
+ /**
927
+ * Returns this node's data that is used for garbage collection. This includes a list of GC nodes that represent
928
+ * this node. Each node has a set of outbound routes to other GC nodes in the document.
929
+ * @param fullGC - true to bypass optimizations and force full generation of GC data.
930
+ */
931
+ getGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;
932
+ /**
933
+ * Tells whether this node is being referenced in this document or not. Unreferenced node will get GC'd
934
+ */
935
+ isReferenced(): boolean;
936
+ /**
937
+ * After GC has run, called to notify this node of routes that are used in it. These are used for the following:
938
+ * 1. To identify if this node is being referenced in the document or not.
939
+ * 2. To identify if this node or any of its children's used routes changed since last summary.
940
+ *
941
+ * @param usedRoutes - The routes that are used in this node.
942
+ */
943
+ updateUsedRoutes(usedRoutes: string[]): void;
944
+ }
945
+
946
+ /**
947
+ * Contains the aggregation data from a Tree/Subtree.
948
+ * @alpha
949
+ */
950
+ export declare interface ISummaryStats {
951
+ treeNodeCount: number;
952
+ blobNodeCount: number;
953
+ handleNodeCount: number;
954
+ totalBlobSize: number;
955
+ unreferencedBlobSize: number;
956
+ }
957
+
958
+ /**
959
+ * Represents the summary tree for a node along with the statistics for that tree.
960
+ * For example, for a given data store, it contains the data for data store along with a subtree for
961
+ * each of its DDS.
962
+ * Any component that implements IChannelContext, IFluidDataStoreChannel or extends SharedObject
963
+ * will be taking part of the summarization process.
964
+ * @alpha
965
+ */
966
+ export declare interface ISummaryTreeWithStats {
967
+ /**
968
+ * Represents an aggregation of node counts and blob sizes associated to the current summary information
969
+ */
970
+ stats: ISummaryStats;
971
+ /**
972
+ * A recursive data structure that will be converted to a snapshot tree and uploaded
973
+ * to the backend.
974
+ */
975
+ summary: ISummaryTree;
976
+ }
977
+
978
+ /**
979
+ * Contains telemetry data relevant to summarization workflows.
980
+ * This object is expected to be modified directly by various summarize methods.
981
+ * @alpha
982
+ */
983
+ export declare interface ITelemetryContext {
984
+ /**
985
+ * Sets value for telemetry data being tracked.
986
+ * @param prefix - unique prefix to tag this data with (ex: "fluid:map:")
987
+ * @param property - property name of the telemetry data being tracked (ex: "DirectoryCount")
988
+ * @param value - value to attribute to this summary telemetry data
989
+ */
990
+ set(prefix: string, property: string, value: TelemetryEventPropertyType): void;
991
+ /**
992
+ * Sets multiple values for telemetry data being tracked.
993
+ * @param prefix - unique prefix to tag this data with (ex: "fluid:summarize:")
994
+ * @param property - property name of the telemetry data being tracked (ex: "Options")
995
+ * @param values - A set of values to attribute to this summary telemetry data.
996
+ */
997
+ setMultiple(prefix: string, property: string, values: Record<string, TelemetryEventPropertyType>): void;
998
+ /**
999
+ * Get the telemetry data being tracked
1000
+ * @param prefix - unique prefix for this data (ex: "fluid:map:")
1001
+ * @param property - property name of the telemetry data being tracked (ex: "DirectoryCount")
1002
+ * @returns undefined if item not found
1003
+ */
1004
+ get(prefix: string, property: string): TelemetryEventPropertyType;
1005
+ /**
1006
+ * Returns a serialized version of all the telemetry data.
1007
+ * Should be used when logging in telemetry events.
1008
+ */
1009
+ serialize(): string;
1010
+ }
127
1011
 
128
1012
  /* Excluded from this release type: LocalAttributionKey */
129
1013
 
130
- /* Excluded from this release type: NamedFluidDataStoreRegistryEntries */
1014
+ /**
1015
+ * An iterable identifier/registry entry pair list
1016
+ * @alpha
1017
+ */
1018
+ export declare type NamedFluidDataStoreRegistryEntries = Iterable<NamedFluidDataStoreRegistryEntry>;
131
1019
 
132
- /* Excluded from this release type: NamedFluidDataStoreRegistryEntry */
1020
+ /**
1021
+ * An associated pair of an identifier and registry entry. Registry entries
1022
+ * may be dynamically loaded.
1023
+ * @alpha
1024
+ */
1025
+ export declare type NamedFluidDataStoreRegistryEntry = [string, Promise<FluidDataStoreRegistryEntry>];
133
1026
 
134
1027
  /* Excluded from this release type: OpAttributionKey */
135
1028
 
136
- /* Excluded from this release type: OpSpaceCompressedId */
137
-
138
- /* Excluded from this release type: SerializedIdCompressor */
139
-
140
- /* Excluded from this release type: SerializedIdCompressorWithNoSession */
141
-
142
- /* Excluded from this release type: SerializedIdCompressorWithOngoingSession */
143
-
144
- /* Excluded from this release type: SessionId */
145
-
146
- /* Excluded from this release type: SessionSpaceCompressedId */
147
-
148
- /* Excluded from this release type: StableId */
149
-
150
- /* Excluded from this release type: SummarizeInternalFn */
1029
+ /**
1030
+ * A compressed ID that has been normalized into "op space".
1031
+ * Serialized/persisted structures (e.g. ops) should use op-space IDs as a performance optimization, as they require less normalizing when
1032
+ * received by a remote client due to the fact that op space for a given compressor is session space for all other compressors.
1033
+ * @alpha
1034
+ */
1035
+ export declare type OpSpaceCompressedId = number & {
1036
+ readonly OpNormalized: "9209432d-a959-4df7-b2ad-767ead4dbcae";
1037
+ };
1038
+
1039
+ /**
1040
+ * The serialized contents of an IdCompressor, suitable for persistence in a summary.
1041
+ * @alpha
1042
+ */
1043
+ export declare type SerializedIdCompressor = string & {
1044
+ readonly _serializedIdCompressor: "8c73c57c-1cf4-4278-8915-6444cb4f6af5";
1045
+ };
1046
+
1047
+ /**
1048
+ * The serialized contents of an IdCompressor, suitable for persistence in a summary.
1049
+ * @alpha
1050
+ */
1051
+ export declare type SerializedIdCompressorWithNoSession = SerializedIdCompressor & {
1052
+ readonly _noLocalState: "3aa2e1e8-cc28-4ea7-bc1a-a11dc3f26dfb";
1053
+ };
1054
+
1055
+ /**
1056
+ * The serialized contents of an IdCompressor, suitable for persistence in a summary.
1057
+ * @alpha
1058
+ */
1059
+ export declare type SerializedIdCompressorWithOngoingSession = SerializedIdCompressor & {
1060
+ readonly _hasLocalState: "1281acae-6d14-47e7-bc92-71c8ee0819cb";
1061
+ };
1062
+
1063
+ /**
1064
+ * A StableId which is suitable for use as a session identifier
1065
+ * @alpha
1066
+ */
1067
+ export declare type SessionId = StableId & {
1068
+ readonly SessionId: "4498f850-e14e-4be9-8db0-89ec00997e58";
1069
+ };
1070
+
1071
+ /**
1072
+ * A compressed ID that has been normalized into "session space" (see `IdCompressor` for more).
1073
+ * Consumer-facing APIs and data structures should use session-space IDs as their lifetime and equality is stable and tied to
1074
+ * the scope of the session (i.e. compressor) that produced them.
1075
+ * @alpha
1076
+ */
1077
+ export declare type SessionSpaceCompressedId = number & {
1078
+ readonly SessionUnique: "cea55054-6b82-4cbf-ad19-1fa645ea3b3e";
1079
+ };
1080
+
1081
+ /**
1082
+ * A version 4, variant 1 uuid (https://datatracker.ietf.org/doc/html/rfc4122).
1083
+ * A 128-bit Universally Unique IDentifier. Represented here
1084
+ * with a string of the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx,
1085
+ * where x is a lowercase hex digit.
1086
+ * @alpha
1087
+ */
1088
+ export declare type StableId = string & {
1089
+ readonly StableId: "53172b0d-a3d5-41ea-bd75-b43839c97f5a";
1090
+ };
1091
+
1092
+ /**
1093
+ * @alpha
1094
+ */
1095
+ export declare type SummarizeInternalFn = (fullTree: boolean, trackState: boolean, telemetryContext?: ITelemetryContext, incrementalSummaryContext?: IExperimentalIncrementalSummaryContext) => Promise<ISummarizeInternalResult>;
151
1096
 
152
1097
  /* Excluded from this release type: totalBlobSizePropertyName */
153
1098
 
154
- /* Excluded from this release type: VisibilityState */
1099
+ /**
1100
+ * This tells the visibility state of a Fluid object. It basically tracks whether the object is not visible, visible
1101
+ * locally within the container only or visible globally to all clients.
1102
+ * @alpha
1103
+ */
1104
+ export declare const VisibilityState: {
1105
+ /**
1106
+ * Indicates that the object is not visible. This is the state when an object is first created.
1107
+ */
1108
+ NotVisible: string;
1109
+ /**
1110
+ * Indicates that the object is visible locally within the container. This is the state when an object is attached
1111
+ * to the container's graph but the container itself isn't globally visible. The object's state goes from not
1112
+ * visible to locally visible.
1113
+ */
1114
+ LocallyVisible: string;
1115
+ /**
1116
+ * Indicates that the object is visible globally to all clients. This is the state of an object in 2 scenarios:
1117
+ *
1118
+ * 1. It is attached to the container's graph when the container is globally visible. The object's state goes from
1119
+ * not visible to globally visible.
1120
+ *
1121
+ * 2. When a container becomes globally visible, all locally visible objects go from locally visible to globally
1122
+ * visible.
1123
+ */
1124
+ GloballyVisible: string;
1125
+ };
1126
+
1127
+ /**
1128
+ * @alpha
1129
+ */
1130
+ export declare type VisibilityState = (typeof VisibilityState)[keyof typeof VisibilityState];
155
1131
 
156
1132
  export { }