@fluidframework/runtime-definitions 2.0.0-internal.6.4.0 → 2.0.0-internal.7.1.0

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