@fluidframework/runtime-definitions 2.0.0-rc.1.0.3 → 2.0.0-rc.2.0.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.
- package/.eslintrc.cjs +1 -1
- package/CHANGELOG.md +75 -0
- package/api-extractor-cjs.json +8 -0
- package/api-extractor-lint.json +1 -1
- package/api-extractor.json +1 -1
- package/api-report/runtime-definitions.api.md +103 -112
- package/dist/dataStoreContext.d.ts +124 -62
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +3 -0
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/dataStoreFactory.d.ts +1 -1
- package/dist/dataStoreFactory.d.ts.map +1 -1
- package/dist/dataStoreFactory.js.map +1 -1
- package/dist/dataStoreRegistry.d.ts +1 -1
- package/dist/dataStoreRegistry.d.ts.map +1 -1
- package/dist/dataStoreRegistry.js.map +1 -1
- package/dist/{garbageCollection.d.ts → garbageCollectionDefinitions.d.ts} +8 -2
- package/dist/garbageCollectionDefinitions.d.ts.map +1 -0
- package/dist/{garbageCollection.js → garbageCollectionDefinitions.js} +9 -3
- package/dist/garbageCollectionDefinitions.js.map +1 -0
- package/dist/index.d.ts +12 -52
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -26
- package/dist/index.js.map +1 -1
- package/dist/package.json +3 -0
- package/dist/protocol.d.ts +2 -1
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js.map +1 -1
- package/dist/runtime-definitions-alpha.d.ts +193 -166
- package/dist/runtime-definitions-beta.d.ts +37 -57
- package/dist/runtime-definitions-public.d.ts +37 -57
- package/dist/runtime-definitions-untrimmed.d.ts +200 -167
- package/dist/summary.d.ts +15 -20
- package/dist/summary.d.ts.map +1 -1
- package/dist/summary.js.map +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/attribution.d.ts +71 -0
- package/lib/attribution.d.ts.map +1 -0
- package/lib/attribution.js +6 -0
- package/lib/attribution.js.map +1 -0
- package/lib/dataStoreContext.d.ts +469 -0
- package/lib/dataStoreContext.d.ts.map +1 -0
- package/lib/dataStoreContext.js +67 -0
- package/lib/dataStoreContext.js.map +1 -0
- package/lib/dataStoreFactory.d.ts +33 -0
- package/lib/dataStoreFactory.d.ts.map +1 -0
- package/lib/dataStoreFactory.js +9 -0
- package/lib/dataStoreFactory.js.map +1 -0
- package/lib/dataStoreRegistry.d.ts +41 -0
- package/lib/dataStoreRegistry.d.ts.map +1 -0
- package/lib/dataStoreRegistry.js +9 -0
- package/lib/dataStoreRegistry.js.map +1 -0
- package/lib/garbageCollectionDefinitions.d.ts +62 -0
- package/lib/garbageCollectionDefinitions.d.ts.map +1 -0
- package/lib/garbageCollectionDefinitions.js +35 -0
- package/lib/garbageCollectionDefinitions.js.map +1 -0
- package/lib/index.d.ts +17 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +10 -0
- package/lib/index.js.map +1 -0
- package/lib/protocol.d.ts +77 -0
- package/lib/protocol.d.ts.map +1 -0
- package/lib/protocol.js +6 -0
- package/lib/protocol.js.map +1 -0
- package/lib/runtime-definitions-alpha.d.ts +1025 -0
- package/lib/runtime-definitions-beta.d.ts +244 -0
- package/lib/runtime-definitions-public.d.ts +244 -0
- package/lib/runtime-definitions-untrimmed.d.ts +1106 -0
- package/lib/summary.d.ts +322 -0
- package/lib/summary.d.ts.map +1 -0
- package/lib/summary.js +26 -0
- package/lib/summary.js.map +1 -0
- package/package.json +111 -34
- package/src/dataStoreContext.ts +148 -77
- package/src/dataStoreFactory.ts +1 -1
- package/src/dataStoreRegistry.ts +1 -1
- package/src/{garbageCollection.ts → garbageCollectionDefinitions.ts} +7 -1
- package/src/index.ts +26 -70
- package/src/protocol.ts +2 -1
- package/src/summary.ts +18 -20
- package/tsconfig.cjs.json +7 -0
- package/tsconfig.json +2 -5
- package/dist/garbageCollection.d.ts.map +0 -1
- package/dist/garbageCollection.js.map +0 -1
|
@@ -1,39 +1,28 @@
|
|
|
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 {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import { ISnapshotTree } from '@fluidframework/protocol-definitions';
|
|
24
|
-
import { ISummaryTree } from '@fluidframework/protocol-definitions';
|
|
25
|
-
import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
26
|
-
import { ITree } from '@fluidframework/protocol-definitions';
|
|
1
|
+
import type { AttachState } from '@fluidframework/container-definitions';
|
|
2
|
+
import type { FluidObject } from '@fluidframework/core-interfaces';
|
|
3
|
+
import type { IAudience } from '@fluidframework/container-definitions';
|
|
4
|
+
import type { IClientDetails } from '@fluidframework/protocol-definitions';
|
|
5
|
+
import type { IDeltaManager } from '@fluidframework/container-definitions';
|
|
6
|
+
import type { IDisposable } from '@fluidframework/core-interfaces';
|
|
7
|
+
import type { IDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
8
|
+
import type { IDocumentStorageService } from '@fluidframework/driver-definitions';
|
|
9
|
+
import type { IEvent } from '@fluidframework/core-interfaces';
|
|
10
|
+
import type { IEventProvider } from '@fluidframework/core-interfaces';
|
|
11
|
+
import type { IFluidHandle } from '@fluidframework/core-interfaces';
|
|
12
|
+
import type { IIdCompressor } from '@fluidframework/id-compressor';
|
|
13
|
+
import type { IProvideFluidHandleContext } from '@fluidframework/core-interfaces';
|
|
14
|
+
import type { IQuorumClients } from '@fluidframework/protocol-definitions';
|
|
15
|
+
import type { IRequest } from '@fluidframework/core-interfaces';
|
|
16
|
+
import type { IResponse } from '@fluidframework/core-interfaces';
|
|
17
|
+
import type { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
18
|
+
import type { ISignalMessage } from '@fluidframework/protocol-definitions';
|
|
19
|
+
import type { ISnapshotTree } from '@fluidframework/protocol-definitions';
|
|
20
|
+
import type { ISummaryTree } from '@fluidframework/protocol-definitions';
|
|
21
|
+
import type { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
22
|
+
import type { ITree } from '@fluidframework/protocol-definitions';
|
|
27
23
|
import type { IUser } from '@fluidframework/protocol-definitions';
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import { SerializedIdCompressorWithNoSession } from '@fluidframework/id-compressor';
|
|
31
|
-
import { SerializedIdCompressorWithOngoingSession } from '@fluidframework/id-compressor';
|
|
32
|
-
import { SessionId } from '@fluidframework/id-compressor';
|
|
33
|
-
import { SessionSpaceCompressedId } from '@fluidframework/id-compressor';
|
|
34
|
-
import { StableId } from '@fluidframework/id-compressor';
|
|
35
|
-
import { SummaryTree } from '@fluidframework/protocol-definitions';
|
|
36
|
-
import { TelemetryEventPropertyType } from '@fluidframework/core-interfaces';
|
|
24
|
+
import type { SummaryTree } from '@fluidframework/protocol-definitions';
|
|
25
|
+
import type { TelemetryBaseEventPropertyType } from '@fluidframework/core-interfaces';
|
|
37
26
|
|
|
38
27
|
/**
|
|
39
28
|
* Encapsulates the return codes of the aliasing API.
|
|
@@ -145,6 +134,9 @@ export declare type FluidDataStoreRegistryEntry = Readonly<Partial<IProvideFluid
|
|
|
145
134
|
export declare enum FlushMode {
|
|
146
135
|
/**
|
|
147
136
|
* In Immediate flush mode the runtime will immediately send all operations to the driver layer.
|
|
137
|
+
*
|
|
138
|
+
* @deprecated This option will be removed in the next major version and should not be used. Use {@link FlushMode.TurnBased} instead, which is the default.
|
|
139
|
+
* See https://github.com/microsoft/FluidFramework/tree/main/packages/runtime/container-runtime/src/opLifecycle#how-batching-works
|
|
148
140
|
*/
|
|
149
141
|
Immediate = 0,
|
|
150
142
|
/**
|
|
@@ -171,12 +163,19 @@ export declare enum FlushModeExperimental {
|
|
|
171
163
|
}
|
|
172
164
|
|
|
173
165
|
/**
|
|
174
|
-
*
|
|
166
|
+
* The prefix for GC blobs in the GC tree in summary.
|
|
175
167
|
*
|
|
176
168
|
* @internal
|
|
177
169
|
*/
|
|
178
170
|
export declare const gcBlobPrefix = "__gc";
|
|
179
171
|
|
|
172
|
+
/**
|
|
173
|
+
* The key for the GC Data blob in attach summaries.
|
|
174
|
+
*
|
|
175
|
+
* @internal
|
|
176
|
+
*/
|
|
177
|
+
export declare const gcDataBlobKey = ".gcdata";
|
|
178
|
+
|
|
180
179
|
/**
|
|
181
180
|
* The key for deleted nodes blob in the GC tree in summary.
|
|
182
181
|
*
|
|
@@ -226,6 +225,7 @@ export declare interface IAttachMessage {
|
|
|
226
225
|
export declare interface IContainerRuntimeBase extends IEventProvider<IContainerRuntimeBaseEvents> {
|
|
227
226
|
readonly logger: ITelemetryBaseLogger;
|
|
228
227
|
readonly clientDetails: IClientDetails;
|
|
228
|
+
readonly disposed: boolean;
|
|
229
229
|
/**
|
|
230
230
|
* Invokes the given callback and guarantees that all operations generated within the callback will be ordered
|
|
231
231
|
* sequentially.
|
|
@@ -237,12 +237,13 @@ export declare interface IContainerRuntimeBase extends IEventProvider<IContainer
|
|
|
237
237
|
* Submits a container runtime level signal to be sent to other clients.
|
|
238
238
|
* @param type - Type of the signal.
|
|
239
239
|
* @param content - Content of the signal.
|
|
240
|
+
* @param targetClientId - When specified, the signal is only sent to the provided client id.
|
|
240
241
|
*/
|
|
241
|
-
submitSignal(type: string, content: any): void;
|
|
242
|
+
submitSignal(type: string, content: any, targetClientId?: string): void;
|
|
242
243
|
/**
|
|
243
244
|
* @deprecated 0.16 Issue #1537, #3631
|
|
244
245
|
*/
|
|
245
|
-
_createDataStoreWithProps(pkg: string | string[]
|
|
246
|
+
_createDataStoreWithProps(pkg: Readonly<string | string[]>, props?: any, id?: string): Promise<IDataStore>;
|
|
246
247
|
/**
|
|
247
248
|
* Creates a data store and returns an object that exposes a handle to the data store's entryPoint, and also serves
|
|
248
249
|
* as the data store's router. The data store is not bound to a container, and in such state is not persisted to
|
|
@@ -250,13 +251,20 @@ export declare interface IContainerRuntimeBase extends IEventProvider<IContainer
|
|
|
250
251
|
* already attached DDS (or non-attached DDS that will eventually get attached to storage) will result in this
|
|
251
252
|
* store being attached to storage.
|
|
252
253
|
* @param pkg - Package name of the data store factory
|
|
254
|
+
* @param loadingGroupId - This represents the group of the datastore within a container or its snapshot.
|
|
255
|
+
* When not specified the datastore will belong to a `default` group. Read more about it in this
|
|
256
|
+
* {@link https://github.com/microsoft/FluidFramework/blob/main/packages/runtime/container-runtime/README.md | README}
|
|
253
257
|
*/
|
|
254
|
-
createDataStore(pkg: string | string[]): Promise<IDataStore>;
|
|
258
|
+
createDataStore(pkg: Readonly<string | string[]>, loadingGroupId?: string): Promise<IDataStore>;
|
|
255
259
|
/**
|
|
256
260
|
* Creates detached data store context. Only after context.attachRuntime() is called,
|
|
257
261
|
* data store initialization is considered complete.
|
|
262
|
+
* @param pkg - Package name of the data store factory
|
|
263
|
+
* @param loadingGroupId - This represents the group of the datastore within a container or its snapshot.
|
|
264
|
+
* When not specified the datastore will belong to a `default` group. Read more about it in this
|
|
265
|
+
* {@link https://github.com/microsoft/FluidFramework/blob/main/packages/runtime/container-runtime/README.md | README}.
|
|
258
266
|
*/
|
|
259
|
-
createDetachedDataStore(pkg: Readonly<string[]
|
|
267
|
+
createDetachedDataStore(pkg: Readonly<string[]>, loadingGroupId?: string): IFluidDataStoreContextDetached;
|
|
260
268
|
/**
|
|
261
269
|
* Get an absolute url for a provided container-relative request.
|
|
262
270
|
* Returns undefined if the container or data store isn't attached to storage.
|
|
@@ -272,6 +280,28 @@ export declare interface IContainerRuntimeBase extends IEventProvider<IContainer
|
|
|
272
280
|
* Returns the current audience.
|
|
273
281
|
*/
|
|
274
282
|
getAudience(): IAudience;
|
|
283
|
+
/**
|
|
284
|
+
* Generates a new ID that is guaranteed to be unique across all sessions for this container.
|
|
285
|
+
* It could be in compact form (non-negative integer, oppotunistic), but it could also be UUID string.
|
|
286
|
+
* UUIDs generated will have low entropy in groups and will compress well.
|
|
287
|
+
* It can be leveraged anywhere in container where container unique IDs are required, i.e. any place
|
|
288
|
+
* that uses uuid() and stores result in container is likely candidate to start leveraging this API.
|
|
289
|
+
* If you always want to convert to string, instead of doing String(generateDocumentUniqueId()), consider
|
|
290
|
+
* doing encodeCompactIdToString(generateDocumentUniqueId()).
|
|
291
|
+
*
|
|
292
|
+
* For more details, please see IIdCompressor.generateDocumentUniqueId()
|
|
293
|
+
*/
|
|
294
|
+
generateDocumentUniqueId(): number | string;
|
|
295
|
+
/**
|
|
296
|
+
* Api to fetch the snapshot from the service for a loadingGroupIds.
|
|
297
|
+
* @param loadingGroupIds - LoadingGroupId for which the snapshot is asked for.
|
|
298
|
+
* @param pathParts - Parts of the path, which we want to extract from the snapshot tree.
|
|
299
|
+
* @returns - snapshotTree and the sequence number of the snapshot.
|
|
300
|
+
*/
|
|
301
|
+
getSnapshotForLoadingGroupId(loadingGroupIds: string[], pathParts: string[]): Promise<{
|
|
302
|
+
snapshotTree: ISnapshotTree;
|
|
303
|
+
sequenceNumber: number;
|
|
304
|
+
}>;
|
|
275
305
|
}
|
|
276
306
|
|
|
277
307
|
/**
|
|
@@ -286,6 +316,7 @@ export declare interface IContainerRuntimeBaseEvents extends IEvent {
|
|
|
286
316
|
(event: "op", listener: (op: ISequencedDocumentMessage, runtimeMessage?: boolean) => void): any;
|
|
287
317
|
(event: "batchEnd", listener: (error: any, op: ISequencedDocumentMessage) => void): any;
|
|
288
318
|
(event: "signal", listener: (message: IInboundSignalMessage, local: boolean) => void): any;
|
|
319
|
+
(event: "dispose", listener: () => void): any;
|
|
289
320
|
}
|
|
290
321
|
|
|
291
322
|
/**
|
|
@@ -312,10 +343,6 @@ export declare interface IDataStore {
|
|
|
312
343
|
readonly entryPoint: IFluidHandle<FluidObject>;
|
|
313
344
|
}
|
|
314
345
|
|
|
315
|
-
export { IdCompressor }
|
|
316
|
-
|
|
317
|
-
export { IdCreationRange }
|
|
318
|
-
|
|
319
346
|
/**
|
|
320
347
|
* An envelope wraps the contents with the intended target
|
|
321
348
|
* @alpha
|
|
@@ -366,34 +393,27 @@ export declare interface IExperimentalIncrementalSummaryContext {
|
|
|
366
393
|
* @alpha
|
|
367
394
|
*/
|
|
368
395
|
export declare interface IFluidDataStoreChannel extends IDisposable {
|
|
369
|
-
readonly id: string;
|
|
370
|
-
/**
|
|
371
|
-
* Indicates the attachment state of the channel to a host service.
|
|
372
|
-
*/
|
|
373
|
-
readonly attachState: AttachState;
|
|
374
|
-
readonly visibilityState: VisibilityState;
|
|
375
|
-
/**
|
|
376
|
-
* Runs through the graph and attaches the bound handles. Then binds this runtime to the container.
|
|
377
|
-
* @deprecated This will be removed in favor of {@link IFluidDataStoreChannel.makeVisibleAndAttachGraph}.
|
|
378
|
-
*/
|
|
379
|
-
attachGraph(): void;
|
|
380
396
|
/**
|
|
381
397
|
* Makes the data store channel visible in the container. Also, runs through its graph and attaches all
|
|
382
398
|
* bound handles that represent its dependencies in the container's graph.
|
|
383
399
|
*/
|
|
384
400
|
makeVisibleAndAttachGraph(): void;
|
|
385
401
|
/**
|
|
386
|
-
*
|
|
402
|
+
* Synchronously retrieves the summary used as part of the initial summary message
|
|
387
403
|
*/
|
|
388
404
|
getAttachSummary(telemetryContext?: ITelemetryContext): ISummaryTreeWithStats;
|
|
405
|
+
/**
|
|
406
|
+
* Synchronously retrieves GC Data (representing the outbound routes present) for the initial state of the DataStore
|
|
407
|
+
*/
|
|
408
|
+
getAttachGCData?(telemetryContext?: ITelemetryContext): IGarbageCollectionData;
|
|
389
409
|
/**
|
|
390
410
|
* Processes the op.
|
|
391
411
|
*/
|
|
392
|
-
process(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void;
|
|
412
|
+
process(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown, addedOutboundReference?: (fromNodePath: string, toNodePath: string) => void): void;
|
|
393
413
|
/**
|
|
394
414
|
* Processes the signal.
|
|
395
415
|
*/
|
|
396
|
-
processSignal(message:
|
|
416
|
+
processSignal(message: IInboundSignalMessage, local: boolean): void;
|
|
397
417
|
/**
|
|
398
418
|
* Generates a summary for the channel.
|
|
399
419
|
* Introduced with summarizerNode - will be required in a future release.
|
|
@@ -448,7 +468,7 @@ export declare interface IFluidDataStoreChannel extends IDisposable {
|
|
|
448
468
|
* get information and call functionality to the container.
|
|
449
469
|
* @alpha
|
|
450
470
|
*/
|
|
451
|
-
export declare interface IFluidDataStoreContext extends IEventProvider<IFluidDataStoreContextEvents>,
|
|
471
|
+
export declare interface IFluidDataStoreContext extends IEventProvider<IFluidDataStoreContextEvents>, IFluidParentContext {
|
|
452
472
|
readonly id: string;
|
|
453
473
|
/**
|
|
454
474
|
* A data store created by a client, is a local data store for that client. Also, when a detached container loads
|
|
@@ -463,28 +483,122 @@ export declare interface IFluidDataStoreContext extends IEventProvider<IFluidDat
|
|
|
463
483
|
* The package path of the data store as per the package factory.
|
|
464
484
|
*/
|
|
465
485
|
readonly packagePath: readonly string[];
|
|
466
|
-
readonly
|
|
486
|
+
readonly baseSnapshot: ISnapshotTree | undefined;
|
|
487
|
+
/**
|
|
488
|
+
* @deprecated 0.16 Issue #1635, #3631
|
|
489
|
+
*/
|
|
490
|
+
readonly createProps?: any;
|
|
491
|
+
/**
|
|
492
|
+
* Call by IFluidDataStoreChannel, indicates that a channel is dirty and needs to be part of the summary.
|
|
493
|
+
* @param address - The address of the channel that is dirty.
|
|
494
|
+
*/
|
|
495
|
+
setChannelDirty(address: string): void;
|
|
496
|
+
/**
|
|
497
|
+
* @deprecated The functionality to get base GC details has been moved to summarizer node.
|
|
498
|
+
*
|
|
499
|
+
* Returns the GC details in the initial summary of this data store. This is used to initialize the data store
|
|
500
|
+
* and its children with the GC details from the previous summary.
|
|
501
|
+
*/
|
|
502
|
+
getBaseGCDetails(): Promise<IGarbageCollectionDetailsBase>;
|
|
503
|
+
/**
|
|
504
|
+
* (Same as @see addedGCOutboundReference, but with string paths instead of handles)
|
|
505
|
+
*
|
|
506
|
+
* Called when a new outbound reference is added to another node. This is used by garbage collection to identify
|
|
507
|
+
* all references added in the system.
|
|
508
|
+
*
|
|
509
|
+
* @param fromPath - The absolute path of the node that added the reference.
|
|
510
|
+
* @param toPath - The absolute path of the outbound node that is referenced.
|
|
511
|
+
*/
|
|
512
|
+
addedGCOutboundRoute?(fromPath: string, toPath: string): void;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* @alpha
|
|
517
|
+
*/
|
|
518
|
+
export declare interface IFluidDataStoreContextDetached extends IFluidDataStoreContext {
|
|
519
|
+
/**
|
|
520
|
+
* Binds a runtime to the context.
|
|
521
|
+
*/
|
|
522
|
+
attachRuntime(factory: IProvideFluidDataStoreFactory, dataStoreRuntime: IFluidDataStoreChannel): Promise<IDataStore>;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
/**
|
|
526
|
+
* @alpha
|
|
527
|
+
*/
|
|
528
|
+
export declare interface IFluidDataStoreContextEvents extends IEvent {
|
|
529
|
+
(event: "attaching" | "attached", listener: () => void): any;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
/**
|
|
533
|
+
* @alpha
|
|
534
|
+
*/
|
|
535
|
+
export declare const IFluidDataStoreFactory: keyof IProvideFluidDataStoreFactory;
|
|
536
|
+
|
|
537
|
+
/**
|
|
538
|
+
* IFluidDataStoreFactory create data stores. It is associated with an identifier (its `type` member)
|
|
539
|
+
* and usually provided to consumers using this mapping through a data store registry.
|
|
540
|
+
* @alpha
|
|
541
|
+
*/
|
|
542
|
+
export declare interface IFluidDataStoreFactory extends IProvideFluidDataStoreFactory {
|
|
543
|
+
/**
|
|
544
|
+
* String that uniquely identifies the type of data store created by this factory.
|
|
545
|
+
*/
|
|
546
|
+
type: string;
|
|
547
|
+
/**
|
|
548
|
+
* Generates runtime for the data store from the data store context. Once created should be bound to the context.
|
|
549
|
+
* @param context - Context for the data store.
|
|
550
|
+
* @param existing - If instantiating from an existing file.
|
|
551
|
+
*/
|
|
552
|
+
instantiateDataStore(context: IFluidDataStoreContext, existing: boolean): Promise<IFluidDataStoreChannel>;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
/**
|
|
556
|
+
* @alpha
|
|
557
|
+
*/
|
|
558
|
+
export declare const IFluidDataStoreRegistry: keyof IProvideFluidDataStoreRegistry;
|
|
559
|
+
|
|
560
|
+
/**
|
|
561
|
+
* An association of identifiers to data store registry entries, where the
|
|
562
|
+
* entries can be used to create data stores.
|
|
563
|
+
* @alpha
|
|
564
|
+
*/
|
|
565
|
+
export declare interface IFluidDataStoreRegistry extends IProvideFluidDataStoreRegistry {
|
|
566
|
+
get(name: string): Promise<FluidDataStoreRegistryEntry | undefined>;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* Represents the context for the data store like objects. It is used by the data store runtime to
|
|
571
|
+
* get information and call functionality to its parent.
|
|
572
|
+
*
|
|
573
|
+
* This layout is temporary, as {@link IFluidParentContext} and {@link IFluidDataStoreContext} will converge.
|
|
574
|
+
*
|
|
575
|
+
* @alpha
|
|
576
|
+
*/
|
|
577
|
+
export declare interface IFluidParentContext extends IProvideFluidHandleContext, Partial<IProvideFluidDataStoreRegistry> {
|
|
578
|
+
readonly options: Record<string | number, any>;
|
|
467
579
|
readonly clientId: string | undefined;
|
|
468
580
|
readonly connected: boolean;
|
|
469
581
|
readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;
|
|
470
582
|
readonly storage: IDocumentStorageService;
|
|
471
|
-
readonly baseSnapshot: ISnapshotTree | undefined;
|
|
472
583
|
readonly logger: ITelemetryBaseLogger;
|
|
473
584
|
readonly clientDetails: IClientDetails;
|
|
474
585
|
readonly idCompressor?: IIdCompressor;
|
|
586
|
+
/**
|
|
587
|
+
* Represents the loading group to which the data store belongs to. Please refer to this readme for more context.
|
|
588
|
+
* {@link https://github.com/microsoft/FluidFramework/blob/main/packages/runtime/container-runtime/README.md | README}
|
|
589
|
+
*/
|
|
590
|
+
readonly loadingGroupId?: string;
|
|
475
591
|
/**
|
|
476
592
|
* Indicates the attachment state of the data store to a host service.
|
|
477
593
|
*/
|
|
478
594
|
readonly attachState: AttachState;
|
|
479
595
|
readonly containerRuntime: IContainerRuntimeBase;
|
|
480
|
-
/**
|
|
481
|
-
* @deprecated 0.16 Issue #1635, #3631
|
|
482
|
-
*/
|
|
483
|
-
readonly createProps?: any;
|
|
484
596
|
/**
|
|
485
597
|
* Ambient services provided with the context
|
|
486
598
|
*/
|
|
487
599
|
readonly scope: FluidObject;
|
|
600
|
+
readonly gcThrowOnTombstoneUsage: boolean;
|
|
601
|
+
readonly gcTombstoneEnforcementAllowed: boolean;
|
|
488
602
|
/**
|
|
489
603
|
* Returns the current quorum.
|
|
490
604
|
*/
|
|
@@ -523,11 +637,6 @@ export declare interface IFluidDataStoreContext extends IEventProvider<IFluidDat
|
|
|
523
637
|
* when they are marked as root. For non-root data stores, this happens when their handle is added to a visible DDS.
|
|
524
638
|
*/
|
|
525
639
|
makeLocallyVisible(): void;
|
|
526
|
-
/**
|
|
527
|
-
* Call by IFluidDataStoreChannel, indicates that a channel is dirty and needs to be part of the summary.
|
|
528
|
-
* @param address - The address of the channel that is dirty.
|
|
529
|
-
*/
|
|
530
|
-
setChannelDirty(address: string): void;
|
|
531
640
|
/**
|
|
532
641
|
* Get an absolute url to the container based on the provided relativeUrl.
|
|
533
642
|
* Returns undefined if the container or data store isn't attached to storage.
|
|
@@ -546,78 +655,24 @@ export declare interface IFluidDataStoreContext extends IEventProvider<IFluidDat
|
|
|
546
655
|
* If it is local, it will throw unsupported errors on calls to summarize.
|
|
547
656
|
*/
|
|
548
657
|
createParam: CreateChildSummarizerNodeParam): CreateChildSummarizerNodeFn;
|
|
658
|
+
deleteChildSummarizerNode?(id: string): void;
|
|
549
659
|
uploadBlob(blob: ArrayBufferLike, signal?: AbortSignal): Promise<IFluidHandle<ArrayBufferLike>>;
|
|
550
|
-
/**
|
|
551
|
-
* @deprecated The functionality to get base GC details has been moved to summarizer node.
|
|
552
|
-
*
|
|
553
|
-
* Returns the GC details in the initial summary of this data store. This is used to initialize the data store
|
|
554
|
-
* and its children with the GC details from the previous summary.
|
|
555
|
-
*/
|
|
556
|
-
getBaseGCDetails(): Promise<IGarbageCollectionDetailsBase>;
|
|
557
660
|
/**
|
|
558
661
|
* @deprecated There is no replacement for this, its functionality is no longer needed at this layer.
|
|
559
662
|
* It will be removed in a future release, sometime after 2.0.0-internal.8.0.0
|
|
560
663
|
*
|
|
664
|
+
* Similar capability is exposed with from/to string paths instead of handles via @see addedGCOutboundRoute
|
|
665
|
+
*
|
|
561
666
|
* Called when a new outbound reference is added to another node. This is used by garbage collection to identify
|
|
562
667
|
* all references added in the system.
|
|
563
668
|
* @param srcHandle - The handle of the node that added the reference.
|
|
564
669
|
* @param outboundHandle - The handle of the outbound node that is referenced.
|
|
565
670
|
*/
|
|
566
|
-
addedGCOutboundReference?(srcHandle:
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
*/
|
|
572
|
-
export declare interface IFluidDataStoreContextDetached extends IFluidDataStoreContext {
|
|
573
|
-
/**
|
|
574
|
-
* Binds a runtime to the context.
|
|
575
|
-
*/
|
|
576
|
-
attachRuntime(factory: IProvideFluidDataStoreFactory, dataStoreRuntime: IFluidDataStoreChannel): Promise<void>;
|
|
577
|
-
}
|
|
578
|
-
|
|
579
|
-
/**
|
|
580
|
-
* @alpha
|
|
581
|
-
*/
|
|
582
|
-
export declare interface IFluidDataStoreContextEvents extends IEvent {
|
|
583
|
-
(event: "attaching" | "attached", listener: () => void): any;
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
/**
|
|
587
|
-
* @alpha
|
|
588
|
-
*/
|
|
589
|
-
export declare const IFluidDataStoreFactory: keyof IProvideFluidDataStoreFactory;
|
|
590
|
-
|
|
591
|
-
/**
|
|
592
|
-
* IFluidDataStoreFactory create data stores. It is associated with an identifier (its `type` member)
|
|
593
|
-
* and usually provided to consumers using this mapping through a data store registry.
|
|
594
|
-
* @alpha
|
|
595
|
-
*/
|
|
596
|
-
export declare interface IFluidDataStoreFactory extends IProvideFluidDataStoreFactory {
|
|
597
|
-
/**
|
|
598
|
-
* String that uniquely identifies the type of data store created by this factory.
|
|
599
|
-
*/
|
|
600
|
-
type: string;
|
|
601
|
-
/**
|
|
602
|
-
* Generates runtime for the data store from the data store context. Once created should be bound to the context.
|
|
603
|
-
* @param context - Context for the data store.
|
|
604
|
-
* @param existing - If instantiating from an existing file.
|
|
605
|
-
*/
|
|
606
|
-
instantiateDataStore(context: IFluidDataStoreContext, existing: boolean): Promise<IFluidDataStoreChannel>;
|
|
607
|
-
}
|
|
608
|
-
|
|
609
|
-
/**
|
|
610
|
-
* @alpha
|
|
611
|
-
*/
|
|
612
|
-
export declare const IFluidDataStoreRegistry: keyof IProvideFluidDataStoreRegistry;
|
|
613
|
-
|
|
614
|
-
/**
|
|
615
|
-
* An association of identifiers to data store registry entries, where the
|
|
616
|
-
* entries can be used to create data stores.
|
|
617
|
-
* @alpha
|
|
618
|
-
*/
|
|
619
|
-
export declare interface IFluidDataStoreRegistry extends IProvideFluidDataStoreRegistry {
|
|
620
|
-
get(name: string): Promise<FluidDataStoreRegistryEntry | undefined>;
|
|
671
|
+
addedGCOutboundReference?(srcHandle: {
|
|
672
|
+
absolutePath: string;
|
|
673
|
+
}, outboundHandle: {
|
|
674
|
+
absolutePath: string;
|
|
675
|
+
}): void;
|
|
621
676
|
}
|
|
622
677
|
|
|
623
678
|
/**
|
|
@@ -649,10 +704,6 @@ export declare interface IGarbageCollectionDetailsBase {
|
|
|
649
704
|
gcData?: IGarbageCollectionData;
|
|
650
705
|
}
|
|
651
706
|
|
|
652
|
-
export { IIdCompressor }
|
|
653
|
-
|
|
654
|
-
export { IIdCompressorCore }
|
|
655
|
-
|
|
656
707
|
/**
|
|
657
708
|
* Represents ISignalMessage with its type.
|
|
658
709
|
* @public
|
|
@@ -688,6 +739,7 @@ export declare interface IProvideFluidDataStoreRegistry {
|
|
|
688
739
|
|
|
689
740
|
/**
|
|
690
741
|
* @internal
|
|
742
|
+
* @deprecated - This interface is now moved to `@fluidframework/container-definitions` package. Please import from that package.
|
|
691
743
|
*/
|
|
692
744
|
export declare interface ISignalEnvelope {
|
|
693
745
|
/**
|
|
@@ -755,9 +807,6 @@ export declare interface ISummarizerNode {
|
|
|
755
807
|
invalidate(sequenceNumber: number): void;
|
|
756
808
|
/**
|
|
757
809
|
* Calls the internal summarize function and handles internal state tracking.
|
|
758
|
-
* If unchanged and fullTree is false, it will reuse previous summary subtree.
|
|
759
|
-
* If an error is encountered and throwOnFailure is false, it will try to make
|
|
760
|
-
* a summary with a pointer to the previous summary + a blob of outstanding ops.
|
|
761
810
|
* @param fullTree - true to skip optimizations and always generate the full tree
|
|
762
811
|
* @param trackState - indicates whether the summarizer node should track the state of the summary or not
|
|
763
812
|
* @param telemetryContext - summary data passed through the layers for telemetry purposes
|
|
@@ -798,7 +847,9 @@ export declare interface ISummarizerNode {
|
|
|
798
847
|
*/
|
|
799
848
|
config?: ISummarizerNodeConfig): ISummarizerNode;
|
|
800
849
|
getChild(id: string): ISummarizerNode | undefined;
|
|
801
|
-
/**
|
|
850
|
+
/**
|
|
851
|
+
* True if a summary is currently in progress
|
|
852
|
+
*/
|
|
802
853
|
isSummaryInProgress?(): boolean;
|
|
803
854
|
}
|
|
804
855
|
|
|
@@ -811,16 +862,6 @@ export declare interface ISummarizerNodeConfig {
|
|
|
811
862
|
* Defaults to true.
|
|
812
863
|
*/
|
|
813
864
|
readonly canReuseHandle?: boolean;
|
|
814
|
-
/**
|
|
815
|
-
* True to always stop execution on error during summarize, or false to
|
|
816
|
-
* attempt creating a summary that is a pointer ot the last acked summary
|
|
817
|
-
* plus outstanding ops in case of internal summarize failure.
|
|
818
|
-
* Defaults to false.
|
|
819
|
-
*
|
|
820
|
-
* BUG BUG: Default to true while we investigate problem
|
|
821
|
-
* with differential summaries
|
|
822
|
-
*/
|
|
823
|
-
readonly throwOnFailure?: true;
|
|
824
865
|
}
|
|
825
866
|
|
|
826
867
|
/**
|
|
@@ -951,24 +992,30 @@ export declare interface ITelemetryContext {
|
|
|
951
992
|
* @param property - property name of the telemetry data being tracked (ex: "DirectoryCount")
|
|
952
993
|
* @param value - value to attribute to this summary telemetry data
|
|
953
994
|
*/
|
|
954
|
-
set(prefix: string, property: string, value:
|
|
995
|
+
set(prefix: string, property: string, value: TelemetryBaseEventPropertyType): void;
|
|
955
996
|
/**
|
|
956
997
|
* Sets multiple values for telemetry data being tracked.
|
|
957
998
|
* @param prefix - unique prefix to tag this data with (ex: "fluid:summarize:")
|
|
958
999
|
* @param property - property name of the telemetry data being tracked (ex: "Options")
|
|
959
1000
|
* @param values - A set of values to attribute to this summary telemetry data.
|
|
960
1001
|
*/
|
|
961
|
-
setMultiple(prefix: string, property: string, values: Record<string,
|
|
1002
|
+
setMultiple(prefix: string, property: string, values: Record<string, TelemetryBaseEventPropertyType>): void;
|
|
962
1003
|
/**
|
|
963
1004
|
* Get the telemetry data being tracked
|
|
1005
|
+
*
|
|
1006
|
+
* @deprecated This interface should only be used for instrumenting, not for attempting to read already-set telemetry data.
|
|
1007
|
+
*
|
|
964
1008
|
* @param prefix - unique prefix for this data (ex: "fluid:map:")
|
|
965
1009
|
* @param property - property name of the telemetry data being tracked (ex: "DirectoryCount")
|
|
966
1010
|
* @returns undefined if item not found
|
|
967
1011
|
*/
|
|
968
|
-
get(prefix: string, property: string):
|
|
1012
|
+
get(prefix: string, property: string): TelemetryBaseEventPropertyType;
|
|
969
1013
|
/**
|
|
970
1014
|
* Returns a serialized version of all the telemetry data.
|
|
971
1015
|
* Should be used when logging in telemetry events.
|
|
1016
|
+
*
|
|
1017
|
+
* @deprecated This interface should only be used for instrumenting. A concrete implementation will likely have a serialize function
|
|
1018
|
+
* but this functionality should not be used by other code being given an ITelemetryContext.
|
|
972
1019
|
*/
|
|
973
1020
|
serialize(): string;
|
|
974
1021
|
}
|
|
@@ -1013,20 +1060,6 @@ export declare interface OpAttributionKey {
|
|
|
1013
1060
|
seq: number;
|
|
1014
1061
|
}
|
|
1015
1062
|
|
|
1016
|
-
export { OpSpaceCompressedId }
|
|
1017
|
-
|
|
1018
|
-
export { SerializedIdCompressor }
|
|
1019
|
-
|
|
1020
|
-
export { SerializedIdCompressorWithNoSession }
|
|
1021
|
-
|
|
1022
|
-
export { SerializedIdCompressorWithOngoingSession }
|
|
1023
|
-
|
|
1024
|
-
export { SessionId }
|
|
1025
|
-
|
|
1026
|
-
export { SessionSpaceCompressedId }
|
|
1027
|
-
|
|
1028
|
-
export { StableId }
|
|
1029
|
-
|
|
1030
1063
|
/**
|
|
1031
1064
|
* @alpha
|
|
1032
1065
|
*/
|
package/dist/summary.d.ts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
6
|
-
import { SummaryTree, ISummaryTree, ISequencedDocumentMessage, ISnapshotTree, ITree } from "@fluidframework/protocol-definitions";
|
|
7
|
-
import { IGarbageCollectionData, IGarbageCollectionDetailsBase } from "./
|
|
5
|
+
import type { TelemetryBaseEventPropertyType } from "@fluidframework/core-interfaces";
|
|
6
|
+
import type { SummaryTree, ISummaryTree, ISequencedDocumentMessage, ISnapshotTree, ITree } from "@fluidframework/protocol-definitions";
|
|
7
|
+
import type { IGarbageCollectionData, IGarbageCollectionDetailsBase } from "./garbageCollectionDefinitions.js";
|
|
8
8
|
/**
|
|
9
9
|
* Contains the aggregation data from a Tree/Subtree.
|
|
10
10
|
* @public
|
|
@@ -105,16 +105,6 @@ export interface ISummarizerNodeConfig {
|
|
|
105
105
|
* Defaults to true.
|
|
106
106
|
*/
|
|
107
107
|
readonly canReuseHandle?: boolean;
|
|
108
|
-
/**
|
|
109
|
-
* True to always stop execution on error during summarize, or false to
|
|
110
|
-
* attempt creating a summary that is a pointer ot the last acked summary
|
|
111
|
-
* plus outstanding ops in case of internal summarize failure.
|
|
112
|
-
* Defaults to false.
|
|
113
|
-
*
|
|
114
|
-
* BUG BUG: Default to true while we investigate problem
|
|
115
|
-
* with differential summaries
|
|
116
|
-
*/
|
|
117
|
-
readonly throwOnFailure?: true;
|
|
118
108
|
}
|
|
119
109
|
/**
|
|
120
110
|
* @alpha
|
|
@@ -161,9 +151,6 @@ export interface ISummarizerNode {
|
|
|
161
151
|
invalidate(sequenceNumber: number): void;
|
|
162
152
|
/**
|
|
163
153
|
* Calls the internal summarize function and handles internal state tracking.
|
|
164
|
-
* If unchanged and fullTree is false, it will reuse previous summary subtree.
|
|
165
|
-
* If an error is encountered and throwOnFailure is false, it will try to make
|
|
166
|
-
* a summary with a pointer to the previous summary + a blob of outstanding ops.
|
|
167
154
|
* @param fullTree - true to skip optimizations and always generate the full tree
|
|
168
155
|
* @param trackState - indicates whether the summarizer node should track the state of the summary or not
|
|
169
156
|
* @param telemetryContext - summary data passed through the layers for telemetry purposes
|
|
@@ -204,7 +191,9 @@ export interface ISummarizerNode {
|
|
|
204
191
|
*/
|
|
205
192
|
config?: ISummarizerNodeConfig): ISummarizerNode;
|
|
206
193
|
getChild(id: string): ISummarizerNode | undefined;
|
|
207
|
-
/**
|
|
194
|
+
/**
|
|
195
|
+
* True if a summary is currently in progress
|
|
196
|
+
*/
|
|
208
197
|
isSummaryInProgress?(): boolean;
|
|
209
198
|
}
|
|
210
199
|
/**
|
|
@@ -295,24 +284,30 @@ export interface ITelemetryContext {
|
|
|
295
284
|
* @param property - property name of the telemetry data being tracked (ex: "DirectoryCount")
|
|
296
285
|
* @param value - value to attribute to this summary telemetry data
|
|
297
286
|
*/
|
|
298
|
-
set(prefix: string, property: string, value:
|
|
287
|
+
set(prefix: string, property: string, value: TelemetryBaseEventPropertyType): void;
|
|
299
288
|
/**
|
|
300
289
|
* Sets multiple values for telemetry data being tracked.
|
|
301
290
|
* @param prefix - unique prefix to tag this data with (ex: "fluid:summarize:")
|
|
302
291
|
* @param property - property name of the telemetry data being tracked (ex: "Options")
|
|
303
292
|
* @param values - A set of values to attribute to this summary telemetry data.
|
|
304
293
|
*/
|
|
305
|
-
setMultiple(prefix: string, property: string, values: Record<string,
|
|
294
|
+
setMultiple(prefix: string, property: string, values: Record<string, TelemetryBaseEventPropertyType>): void;
|
|
306
295
|
/**
|
|
307
296
|
* Get the telemetry data being tracked
|
|
297
|
+
*
|
|
298
|
+
* @deprecated This interface should only be used for instrumenting, not for attempting to read already-set telemetry data.
|
|
299
|
+
*
|
|
308
300
|
* @param prefix - unique prefix for this data (ex: "fluid:map:")
|
|
309
301
|
* @param property - property name of the telemetry data being tracked (ex: "DirectoryCount")
|
|
310
302
|
* @returns undefined if item not found
|
|
311
303
|
*/
|
|
312
|
-
get(prefix: string, property: string):
|
|
304
|
+
get(prefix: string, property: string): TelemetryBaseEventPropertyType;
|
|
313
305
|
/**
|
|
314
306
|
* Returns a serialized version of all the telemetry data.
|
|
315
307
|
* Should be used when logging in telemetry events.
|
|
308
|
+
*
|
|
309
|
+
* @deprecated This interface should only be used for instrumenting. A concrete implementation will likely have a serialize function
|
|
310
|
+
* but this functionality should not be used by other code being given an ITelemetryContext.
|
|
316
311
|
*/
|
|
317
312
|
serialize(): string;
|
|
318
313
|
}
|