@fluidframework/runtime-definitions 2.0.0-rc.1.0.6 → 2.0.0-rc.2.0.1
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 +98 -112
- package/dist/dataStoreContext.d.ts +110 -64
- 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} +1 -1
- package/dist/garbageCollectionDefinitions.d.ts.map +1 -0
- package/dist/{garbageCollection.js → garbageCollectionDefinitions.js} +1 -1
- 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 -27
- 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 +184 -175
- package/dist/runtime-definitions-beta.d.ts +35 -57
- package/dist/runtime-definitions-public.d.ts +35 -57
- package/dist/runtime-definitions-untrimmed.d.ts +185 -175
- 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 +133 -80
- package/src/dataStoreFactory.ts +1 -1
- package/src/dataStoreRegistry.ts +1 -1
- package/src/index.ts +25 -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
- /package/src/{garbageCollection.ts → garbageCollectionDefinitions.ts} +0 -0
|
@@ -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.
|
|
@@ -126,6 +115,9 @@ export declare type FluidDataStoreRegistryEntry = Readonly<Partial<IProvideFluid
|
|
|
126
115
|
export declare enum FlushMode {
|
|
127
116
|
/**
|
|
128
117
|
* In Immediate flush mode the runtime will immediately send all operations to the driver layer.
|
|
118
|
+
*
|
|
119
|
+
* @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.
|
|
120
|
+
* See https://github.com/microsoft/FluidFramework/tree/main/packages/runtime/container-runtime/src/opLifecycle#how-batching-works
|
|
129
121
|
*/
|
|
130
122
|
Immediate = 0,
|
|
131
123
|
/**
|
|
@@ -175,6 +167,7 @@ export declare interface IAttachMessage {
|
|
|
175
167
|
export declare interface IContainerRuntimeBase extends IEventProvider<IContainerRuntimeBaseEvents> {
|
|
176
168
|
readonly logger: ITelemetryBaseLogger;
|
|
177
169
|
readonly clientDetails: IClientDetails;
|
|
170
|
+
readonly disposed: boolean;
|
|
178
171
|
/**
|
|
179
172
|
* Invokes the given callback and guarantees that all operations generated within the callback will be ordered
|
|
180
173
|
* sequentially.
|
|
@@ -186,12 +179,13 @@ export declare interface IContainerRuntimeBase extends IEventProvider<IContainer
|
|
|
186
179
|
* Submits a container runtime level signal to be sent to other clients.
|
|
187
180
|
* @param type - Type of the signal.
|
|
188
181
|
* @param content - Content of the signal.
|
|
182
|
+
* @param targetClientId - When specified, the signal is only sent to the provided client id.
|
|
189
183
|
*/
|
|
190
|
-
submitSignal(type: string, content: any): void;
|
|
184
|
+
submitSignal(type: string, content: any, targetClientId?: string): void;
|
|
191
185
|
/**
|
|
192
186
|
* @deprecated 0.16 Issue #1537, #3631
|
|
193
187
|
*/
|
|
194
|
-
_createDataStoreWithProps(pkg: string | string[]
|
|
188
|
+
_createDataStoreWithProps(pkg: Readonly<string | string[]>, props?: any, id?: string): Promise<IDataStore>;
|
|
195
189
|
/**
|
|
196
190
|
* Creates a data store and returns an object that exposes a handle to the data store's entryPoint, and also serves
|
|
197
191
|
* as the data store's router. The data store is not bound to a container, and in such state is not persisted to
|
|
@@ -199,13 +193,20 @@ export declare interface IContainerRuntimeBase extends IEventProvider<IContainer
|
|
|
199
193
|
* already attached DDS (or non-attached DDS that will eventually get attached to storage) will result in this
|
|
200
194
|
* store being attached to storage.
|
|
201
195
|
* @param pkg - Package name of the data store factory
|
|
196
|
+
* @param loadingGroupId - This represents the group of the datastore within a container or its snapshot.
|
|
197
|
+
* When not specified the datastore will belong to a `default` group. Read more about it in this
|
|
198
|
+
* {@link https://github.com/microsoft/FluidFramework/blob/main/packages/runtime/container-runtime/README.md | README}
|
|
202
199
|
*/
|
|
203
|
-
createDataStore(pkg: string | string[]): Promise<IDataStore>;
|
|
200
|
+
createDataStore(pkg: Readonly<string | string[]>, loadingGroupId?: string): Promise<IDataStore>;
|
|
204
201
|
/**
|
|
205
202
|
* Creates detached data store context. Only after context.attachRuntime() is called,
|
|
206
203
|
* data store initialization is considered complete.
|
|
204
|
+
* @param pkg - Package name of the data store factory
|
|
205
|
+
* @param loadingGroupId - This represents the group of the datastore within a container or its snapshot.
|
|
206
|
+
* When not specified the datastore will belong to a `default` group. Read more about it in this
|
|
207
|
+
* {@link https://github.com/microsoft/FluidFramework/blob/main/packages/runtime/container-runtime/README.md | README}.
|
|
207
208
|
*/
|
|
208
|
-
createDetachedDataStore(pkg: Readonly<string[]
|
|
209
|
+
createDetachedDataStore(pkg: Readonly<string[]>, loadingGroupId?: string): IFluidDataStoreContextDetached;
|
|
209
210
|
/**
|
|
210
211
|
* Get an absolute url for a provided container-relative request.
|
|
211
212
|
* Returns undefined if the container or data store isn't attached to storage.
|
|
@@ -221,6 +222,28 @@ export declare interface IContainerRuntimeBase extends IEventProvider<IContainer
|
|
|
221
222
|
* Returns the current audience.
|
|
222
223
|
*/
|
|
223
224
|
getAudience(): IAudience;
|
|
225
|
+
/**
|
|
226
|
+
* Generates a new ID that is guaranteed to be unique across all sessions for this container.
|
|
227
|
+
* It could be in compact form (non-negative integer, oppotunistic), but it could also be UUID string.
|
|
228
|
+
* UUIDs generated will have low entropy in groups and will compress well.
|
|
229
|
+
* It can be leveraged anywhere in container where container unique IDs are required, i.e. any place
|
|
230
|
+
* that uses uuid() and stores result in container is likely candidate to start leveraging this API.
|
|
231
|
+
* If you always want to convert to string, instead of doing String(generateDocumentUniqueId()), consider
|
|
232
|
+
* doing encodeCompactIdToString(generateDocumentUniqueId()).
|
|
233
|
+
*
|
|
234
|
+
* For more details, please see IIdCompressor.generateDocumentUniqueId()
|
|
235
|
+
*/
|
|
236
|
+
generateDocumentUniqueId(): number | string;
|
|
237
|
+
/**
|
|
238
|
+
* Api to fetch the snapshot from the service for a loadingGroupIds.
|
|
239
|
+
* @param loadingGroupIds - LoadingGroupId for which the snapshot is asked for.
|
|
240
|
+
* @param pathParts - Parts of the path, which we want to extract from the snapshot tree.
|
|
241
|
+
* @returns - snapshotTree and the sequence number of the snapshot.
|
|
242
|
+
*/
|
|
243
|
+
getSnapshotForLoadingGroupId(loadingGroupIds: string[], pathParts: string[]): Promise<{
|
|
244
|
+
snapshotTree: ISnapshotTree;
|
|
245
|
+
sequenceNumber: number;
|
|
246
|
+
}>;
|
|
224
247
|
}
|
|
225
248
|
|
|
226
249
|
/**
|
|
@@ -235,6 +258,7 @@ export declare interface IContainerRuntimeBaseEvents extends IEvent {
|
|
|
235
258
|
(event: "op", listener: (op: ISequencedDocumentMessage, runtimeMessage?: boolean) => void): any;
|
|
236
259
|
(event: "batchEnd", listener: (error: any, op: ISequencedDocumentMessage) => void): any;
|
|
237
260
|
(event: "signal", listener: (message: IInboundSignalMessage, local: boolean) => void): any;
|
|
261
|
+
(event: "dispose", listener: () => void): any;
|
|
238
262
|
}
|
|
239
263
|
|
|
240
264
|
/**
|
|
@@ -261,10 +285,6 @@ export declare interface IDataStore {
|
|
|
261
285
|
readonly entryPoint: IFluidHandle<FluidObject>;
|
|
262
286
|
}
|
|
263
287
|
|
|
264
|
-
export { IdCompressor }
|
|
265
|
-
|
|
266
|
-
export { IdCreationRange }
|
|
267
|
-
|
|
268
288
|
/**
|
|
269
289
|
* An envelope wraps the contents with the intended target
|
|
270
290
|
* @alpha
|
|
@@ -315,17 +335,6 @@ export declare interface IExperimentalIncrementalSummaryContext {
|
|
|
315
335
|
* @alpha
|
|
316
336
|
*/
|
|
317
337
|
export declare interface IFluidDataStoreChannel extends IDisposable {
|
|
318
|
-
readonly id: string;
|
|
319
|
-
/**
|
|
320
|
-
* Indicates the attachment state of the channel to a host service.
|
|
321
|
-
*/
|
|
322
|
-
readonly attachState: AttachState;
|
|
323
|
-
readonly visibilityState: VisibilityState;
|
|
324
|
-
/**
|
|
325
|
-
* Runs through the graph and attaches the bound handles. Then binds this runtime to the container.
|
|
326
|
-
* @deprecated This will be removed in favor of {@link IFluidDataStoreChannel.makeVisibleAndAttachGraph}.
|
|
327
|
-
*/
|
|
328
|
-
attachGraph(): void;
|
|
329
338
|
/**
|
|
330
339
|
* Makes the data store channel visible in the container. Also, runs through its graph and attaches all
|
|
331
340
|
* bound handles that represent its dependencies in the container's graph.
|
|
@@ -342,11 +351,11 @@ export declare interface IFluidDataStoreChannel extends IDisposable {
|
|
|
342
351
|
/**
|
|
343
352
|
* Processes the op.
|
|
344
353
|
*/
|
|
345
|
-
process(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void;
|
|
354
|
+
process(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown, addedOutboundReference?: (fromNodePath: string, toNodePath: string) => void): void;
|
|
346
355
|
/**
|
|
347
356
|
* Processes the signal.
|
|
348
357
|
*/
|
|
349
|
-
processSignal(message:
|
|
358
|
+
processSignal(message: IInboundSignalMessage, local: boolean): void;
|
|
350
359
|
/**
|
|
351
360
|
* Generates a summary for the channel.
|
|
352
361
|
* Introduced with summarizerNode - will be required in a future release.
|
|
@@ -401,7 +410,7 @@ export declare interface IFluidDataStoreChannel extends IDisposable {
|
|
|
401
410
|
* get information and call functionality to the container.
|
|
402
411
|
* @alpha
|
|
403
412
|
*/
|
|
404
|
-
export declare interface IFluidDataStoreContext extends IEventProvider<IFluidDataStoreContextEvents>,
|
|
413
|
+
export declare interface IFluidDataStoreContext extends IEventProvider<IFluidDataStoreContextEvents>, IFluidParentContext {
|
|
405
414
|
readonly id: string;
|
|
406
415
|
/**
|
|
407
416
|
* A data store created by a client, is a local data store for that client. Also, when a detached container loads
|
|
@@ -416,28 +425,122 @@ export declare interface IFluidDataStoreContext extends IEventProvider<IFluidDat
|
|
|
416
425
|
* The package path of the data store as per the package factory.
|
|
417
426
|
*/
|
|
418
427
|
readonly packagePath: readonly string[];
|
|
419
|
-
readonly
|
|
428
|
+
readonly baseSnapshot: ISnapshotTree | undefined;
|
|
429
|
+
/**
|
|
430
|
+
* @deprecated 0.16 Issue #1635, #3631
|
|
431
|
+
*/
|
|
432
|
+
readonly createProps?: any;
|
|
433
|
+
/**
|
|
434
|
+
* Call by IFluidDataStoreChannel, indicates that a channel is dirty and needs to be part of the summary.
|
|
435
|
+
* @param address - The address of the channel that is dirty.
|
|
436
|
+
*/
|
|
437
|
+
setChannelDirty(address: string): void;
|
|
438
|
+
/**
|
|
439
|
+
* @deprecated The functionality to get base GC details has been moved to summarizer node.
|
|
440
|
+
*
|
|
441
|
+
* Returns the GC details in the initial summary of this data store. This is used to initialize the data store
|
|
442
|
+
* and its children with the GC details from the previous summary.
|
|
443
|
+
*/
|
|
444
|
+
getBaseGCDetails(): Promise<IGarbageCollectionDetailsBase>;
|
|
445
|
+
/**
|
|
446
|
+
* (Same as @see addedGCOutboundReference, but with string paths instead of handles)
|
|
447
|
+
*
|
|
448
|
+
* Called when a new outbound reference is added to another node. This is used by garbage collection to identify
|
|
449
|
+
* all references added in the system.
|
|
450
|
+
*
|
|
451
|
+
* @param fromPath - The absolute path of the node that added the reference.
|
|
452
|
+
* @param toPath - The absolute path of the outbound node that is referenced.
|
|
453
|
+
*/
|
|
454
|
+
addedGCOutboundRoute?(fromPath: string, toPath: string): void;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* @alpha
|
|
459
|
+
*/
|
|
460
|
+
export declare interface IFluidDataStoreContextDetached extends IFluidDataStoreContext {
|
|
461
|
+
/**
|
|
462
|
+
* Binds a runtime to the context.
|
|
463
|
+
*/
|
|
464
|
+
attachRuntime(factory: IProvideFluidDataStoreFactory, dataStoreRuntime: IFluidDataStoreChannel): Promise<IDataStore>;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
/**
|
|
468
|
+
* @alpha
|
|
469
|
+
*/
|
|
470
|
+
export declare interface IFluidDataStoreContextEvents extends IEvent {
|
|
471
|
+
(event: "attaching" | "attached", listener: () => void): any;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
/**
|
|
475
|
+
* @alpha
|
|
476
|
+
*/
|
|
477
|
+
export declare const IFluidDataStoreFactory: keyof IProvideFluidDataStoreFactory;
|
|
478
|
+
|
|
479
|
+
/**
|
|
480
|
+
* IFluidDataStoreFactory create data stores. It is associated with an identifier (its `type` member)
|
|
481
|
+
* and usually provided to consumers using this mapping through a data store registry.
|
|
482
|
+
* @alpha
|
|
483
|
+
*/
|
|
484
|
+
export declare interface IFluidDataStoreFactory extends IProvideFluidDataStoreFactory {
|
|
485
|
+
/**
|
|
486
|
+
* String that uniquely identifies the type of data store created by this factory.
|
|
487
|
+
*/
|
|
488
|
+
type: string;
|
|
489
|
+
/**
|
|
490
|
+
* Generates runtime for the data store from the data store context. Once created should be bound to the context.
|
|
491
|
+
* @param context - Context for the data store.
|
|
492
|
+
* @param existing - If instantiating from an existing file.
|
|
493
|
+
*/
|
|
494
|
+
instantiateDataStore(context: IFluidDataStoreContext, existing: boolean): Promise<IFluidDataStoreChannel>;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
/**
|
|
498
|
+
* @alpha
|
|
499
|
+
*/
|
|
500
|
+
export declare const IFluidDataStoreRegistry: keyof IProvideFluidDataStoreRegistry;
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* An association of identifiers to data store registry entries, where the
|
|
504
|
+
* entries can be used to create data stores.
|
|
505
|
+
* @alpha
|
|
506
|
+
*/
|
|
507
|
+
export declare interface IFluidDataStoreRegistry extends IProvideFluidDataStoreRegistry {
|
|
508
|
+
get(name: string): Promise<FluidDataStoreRegistryEntry | undefined>;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
/**
|
|
512
|
+
* Represents the context for the data store like objects. It is used by the data store runtime to
|
|
513
|
+
* get information and call functionality to its parent.
|
|
514
|
+
*
|
|
515
|
+
* This layout is temporary, as {@link IFluidParentContext} and {@link IFluidDataStoreContext} will converge.
|
|
516
|
+
*
|
|
517
|
+
* @alpha
|
|
518
|
+
*/
|
|
519
|
+
export declare interface IFluidParentContext extends IProvideFluidHandleContext, Partial<IProvideFluidDataStoreRegistry> {
|
|
520
|
+
readonly options: Record<string | number, any>;
|
|
420
521
|
readonly clientId: string | undefined;
|
|
421
522
|
readonly connected: boolean;
|
|
422
523
|
readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;
|
|
423
524
|
readonly storage: IDocumentStorageService;
|
|
424
|
-
readonly baseSnapshot: ISnapshotTree | undefined;
|
|
425
525
|
readonly logger: ITelemetryBaseLogger;
|
|
426
526
|
readonly clientDetails: IClientDetails;
|
|
427
527
|
readonly idCompressor?: IIdCompressor;
|
|
528
|
+
/**
|
|
529
|
+
* Represents the loading group to which the data store belongs to. Please refer to this readme for more context.
|
|
530
|
+
* {@link https://github.com/microsoft/FluidFramework/blob/main/packages/runtime/container-runtime/README.md | README}
|
|
531
|
+
*/
|
|
532
|
+
readonly loadingGroupId?: string;
|
|
428
533
|
/**
|
|
429
534
|
* Indicates the attachment state of the data store to a host service.
|
|
430
535
|
*/
|
|
431
536
|
readonly attachState: AttachState;
|
|
432
537
|
readonly containerRuntime: IContainerRuntimeBase;
|
|
433
|
-
/**
|
|
434
|
-
* @deprecated 0.16 Issue #1635, #3631
|
|
435
|
-
*/
|
|
436
|
-
readonly createProps?: any;
|
|
437
538
|
/**
|
|
438
539
|
* Ambient services provided with the context
|
|
439
540
|
*/
|
|
440
541
|
readonly scope: FluidObject;
|
|
542
|
+
readonly gcThrowOnTombstoneUsage: boolean;
|
|
543
|
+
readonly gcTombstoneEnforcementAllowed: boolean;
|
|
441
544
|
/**
|
|
442
545
|
* Returns the current quorum.
|
|
443
546
|
*/
|
|
@@ -476,11 +579,6 @@ export declare interface IFluidDataStoreContext extends IEventProvider<IFluidDat
|
|
|
476
579
|
* when they are marked as root. For non-root data stores, this happens when their handle is added to a visible DDS.
|
|
477
580
|
*/
|
|
478
581
|
makeLocallyVisible(): void;
|
|
479
|
-
/**
|
|
480
|
-
* Call by IFluidDataStoreChannel, indicates that a channel is dirty and needs to be part of the summary.
|
|
481
|
-
* @param address - The address of the channel that is dirty.
|
|
482
|
-
*/
|
|
483
|
-
setChannelDirty(address: string): void;
|
|
484
582
|
/**
|
|
485
583
|
* Get an absolute url to the container based on the provided relativeUrl.
|
|
486
584
|
* Returns undefined if the container or data store isn't attached to storage.
|
|
@@ -499,14 +597,8 @@ export declare interface IFluidDataStoreContext extends IEventProvider<IFluidDat
|
|
|
499
597
|
* If it is local, it will throw unsupported errors on calls to summarize.
|
|
500
598
|
*/
|
|
501
599
|
createParam: CreateChildSummarizerNodeParam): CreateChildSummarizerNodeFn;
|
|
600
|
+
deleteChildSummarizerNode?(id: string): void;
|
|
502
601
|
uploadBlob(blob: ArrayBufferLike, signal?: AbortSignal): Promise<IFluidHandle<ArrayBufferLike>>;
|
|
503
|
-
/**
|
|
504
|
-
* @deprecated The functionality to get base GC details has been moved to summarizer node.
|
|
505
|
-
*
|
|
506
|
-
* Returns the GC details in the initial summary of this data store. This is used to initialize the data store
|
|
507
|
-
* and its children with the GC details from the previous summary.
|
|
508
|
-
*/
|
|
509
|
-
getBaseGCDetails(): Promise<IGarbageCollectionDetailsBase>;
|
|
510
602
|
/**
|
|
511
603
|
* @deprecated There is no replacement for this, its functionality is no longer needed at this layer.
|
|
512
604
|
* It will be removed in a future release, sometime after 2.0.0-internal.8.0.0
|
|
@@ -518,71 +610,11 @@ export declare interface IFluidDataStoreContext extends IEventProvider<IFluidDat
|
|
|
518
610
|
* @param srcHandle - The handle of the node that added the reference.
|
|
519
611
|
* @param outboundHandle - The handle of the outbound node that is referenced.
|
|
520
612
|
*/
|
|
521
|
-
addedGCOutboundReference?(srcHandle:
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
* all references added in the system.
|
|
527
|
-
*
|
|
528
|
-
* @param fromPath - The absolute path of the node that added the reference.
|
|
529
|
-
* @param toPath - The absolute path of the outbound node that is referenced.
|
|
530
|
-
*/
|
|
531
|
-
addedGCOutboundRoute?(fromPath: string, toPath: string): void;
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
/**
|
|
535
|
-
* @alpha
|
|
536
|
-
*/
|
|
537
|
-
export declare interface IFluidDataStoreContextDetached extends IFluidDataStoreContext {
|
|
538
|
-
/**
|
|
539
|
-
* Binds a runtime to the context.
|
|
540
|
-
*/
|
|
541
|
-
attachRuntime(factory: IProvideFluidDataStoreFactory, dataStoreRuntime: IFluidDataStoreChannel): Promise<void>;
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
/**
|
|
545
|
-
* @alpha
|
|
546
|
-
*/
|
|
547
|
-
export declare interface IFluidDataStoreContextEvents extends IEvent {
|
|
548
|
-
(event: "attaching" | "attached", listener: () => void): any;
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
/**
|
|
552
|
-
* @alpha
|
|
553
|
-
*/
|
|
554
|
-
export declare const IFluidDataStoreFactory: keyof IProvideFluidDataStoreFactory;
|
|
555
|
-
|
|
556
|
-
/**
|
|
557
|
-
* IFluidDataStoreFactory create data stores. It is associated with an identifier (its `type` member)
|
|
558
|
-
* and usually provided to consumers using this mapping through a data store registry.
|
|
559
|
-
* @alpha
|
|
560
|
-
*/
|
|
561
|
-
export declare interface IFluidDataStoreFactory extends IProvideFluidDataStoreFactory {
|
|
562
|
-
/**
|
|
563
|
-
* String that uniquely identifies the type of data store created by this factory.
|
|
564
|
-
*/
|
|
565
|
-
type: string;
|
|
566
|
-
/**
|
|
567
|
-
* Generates runtime for the data store from the data store context. Once created should be bound to the context.
|
|
568
|
-
* @param context - Context for the data store.
|
|
569
|
-
* @param existing - If instantiating from an existing file.
|
|
570
|
-
*/
|
|
571
|
-
instantiateDataStore(context: IFluidDataStoreContext, existing: boolean): Promise<IFluidDataStoreChannel>;
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
/**
|
|
575
|
-
* @alpha
|
|
576
|
-
*/
|
|
577
|
-
export declare const IFluidDataStoreRegistry: keyof IProvideFluidDataStoreRegistry;
|
|
578
|
-
|
|
579
|
-
/**
|
|
580
|
-
* An association of identifiers to data store registry entries, where the
|
|
581
|
-
* entries can be used to create data stores.
|
|
582
|
-
* @alpha
|
|
583
|
-
*/
|
|
584
|
-
export declare interface IFluidDataStoreRegistry extends IProvideFluidDataStoreRegistry {
|
|
585
|
-
get(name: string): Promise<FluidDataStoreRegistryEntry | undefined>;
|
|
613
|
+
addedGCOutboundReference?(srcHandle: {
|
|
614
|
+
absolutePath: string;
|
|
615
|
+
}, outboundHandle: {
|
|
616
|
+
absolutePath: string;
|
|
617
|
+
}): void;
|
|
586
618
|
}
|
|
587
619
|
|
|
588
620
|
/**
|
|
@@ -614,10 +646,6 @@ export declare interface IGarbageCollectionDetailsBase {
|
|
|
614
646
|
gcData?: IGarbageCollectionData;
|
|
615
647
|
}
|
|
616
648
|
|
|
617
|
-
export { IIdCompressor }
|
|
618
|
-
|
|
619
|
-
export { IIdCompressorCore }
|
|
620
|
-
|
|
621
649
|
/**
|
|
622
650
|
* Represents ISignalMessage with its type.
|
|
623
651
|
* @public
|
|
@@ -701,9 +729,6 @@ export declare interface ISummarizerNode {
|
|
|
701
729
|
invalidate(sequenceNumber: number): void;
|
|
702
730
|
/**
|
|
703
731
|
* Calls the internal summarize function and handles internal state tracking.
|
|
704
|
-
* If unchanged and fullTree is false, it will reuse previous summary subtree.
|
|
705
|
-
* If an error is encountered and throwOnFailure is false, it will try to make
|
|
706
|
-
* a summary with a pointer to the previous summary + a blob of outstanding ops.
|
|
707
732
|
* @param fullTree - true to skip optimizations and always generate the full tree
|
|
708
733
|
* @param trackState - indicates whether the summarizer node should track the state of the summary or not
|
|
709
734
|
* @param telemetryContext - summary data passed through the layers for telemetry purposes
|
|
@@ -744,7 +769,9 @@ export declare interface ISummarizerNode {
|
|
|
744
769
|
*/
|
|
745
770
|
config?: ISummarizerNodeConfig): ISummarizerNode;
|
|
746
771
|
getChild(id: string): ISummarizerNode | undefined;
|
|
747
|
-
/**
|
|
772
|
+
/**
|
|
773
|
+
* True if a summary is currently in progress
|
|
774
|
+
*/
|
|
748
775
|
isSummaryInProgress?(): boolean;
|
|
749
776
|
}
|
|
750
777
|
|
|
@@ -757,16 +784,6 @@ export declare interface ISummarizerNodeConfig {
|
|
|
757
784
|
* Defaults to true.
|
|
758
785
|
*/
|
|
759
786
|
readonly canReuseHandle?: boolean;
|
|
760
|
-
/**
|
|
761
|
-
* True to always stop execution on error during summarize, or false to
|
|
762
|
-
* attempt creating a summary that is a pointer ot the last acked summary
|
|
763
|
-
* plus outstanding ops in case of internal summarize failure.
|
|
764
|
-
* Defaults to false.
|
|
765
|
-
*
|
|
766
|
-
* BUG BUG: Default to true while we investigate problem
|
|
767
|
-
* with differential summaries
|
|
768
|
-
*/
|
|
769
|
-
readonly throwOnFailure?: true;
|
|
770
787
|
}
|
|
771
788
|
|
|
772
789
|
/**
|
|
@@ -897,24 +914,30 @@ export declare interface ITelemetryContext {
|
|
|
897
914
|
* @param property - property name of the telemetry data being tracked (ex: "DirectoryCount")
|
|
898
915
|
* @param value - value to attribute to this summary telemetry data
|
|
899
916
|
*/
|
|
900
|
-
set(prefix: string, property: string, value:
|
|
917
|
+
set(prefix: string, property: string, value: TelemetryBaseEventPropertyType): void;
|
|
901
918
|
/**
|
|
902
919
|
* Sets multiple values for telemetry data being tracked.
|
|
903
920
|
* @param prefix - unique prefix to tag this data with (ex: "fluid:summarize:")
|
|
904
921
|
* @param property - property name of the telemetry data being tracked (ex: "Options")
|
|
905
922
|
* @param values - A set of values to attribute to this summary telemetry data.
|
|
906
923
|
*/
|
|
907
|
-
setMultiple(prefix: string, property: string, values: Record<string,
|
|
924
|
+
setMultiple(prefix: string, property: string, values: Record<string, TelemetryBaseEventPropertyType>): void;
|
|
908
925
|
/**
|
|
909
926
|
* Get the telemetry data being tracked
|
|
927
|
+
*
|
|
928
|
+
* @deprecated This interface should only be used for instrumenting, not for attempting to read already-set telemetry data.
|
|
929
|
+
*
|
|
910
930
|
* @param prefix - unique prefix for this data (ex: "fluid:map:")
|
|
911
931
|
* @param property - property name of the telemetry data being tracked (ex: "DirectoryCount")
|
|
912
932
|
* @returns undefined if item not found
|
|
913
933
|
*/
|
|
914
|
-
get(prefix: string, property: string):
|
|
934
|
+
get(prefix: string, property: string): TelemetryBaseEventPropertyType;
|
|
915
935
|
/**
|
|
916
936
|
* Returns a serialized version of all the telemetry data.
|
|
917
937
|
* Should be used when logging in telemetry events.
|
|
938
|
+
*
|
|
939
|
+
* @deprecated This interface should only be used for instrumenting. A concrete implementation will likely have a serialize function
|
|
940
|
+
* but this functionality should not be used by other code being given an ITelemetryContext.
|
|
918
941
|
*/
|
|
919
942
|
serialize(): string;
|
|
920
943
|
}
|
|
@@ -959,20 +982,6 @@ export declare interface OpAttributionKey {
|
|
|
959
982
|
seq: number;
|
|
960
983
|
}
|
|
961
984
|
|
|
962
|
-
export { OpSpaceCompressedId }
|
|
963
|
-
|
|
964
|
-
export { SerializedIdCompressor }
|
|
965
|
-
|
|
966
|
-
export { SerializedIdCompressorWithNoSession }
|
|
967
|
-
|
|
968
|
-
export { SerializedIdCompressorWithOngoingSession }
|
|
969
|
-
|
|
970
|
-
export { SessionId }
|
|
971
|
-
|
|
972
|
-
export { SessionSpaceCompressedId }
|
|
973
|
-
|
|
974
|
-
export { StableId }
|
|
975
|
-
|
|
976
985
|
/**
|
|
977
986
|
* @alpha
|
|
978
987
|
*/
|