@fluidframework/runtime-definitions 2.0.0-dev-rc.1.0.0.228517 → 2.0.0-dev-rc.2.0.0.245554
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 -116
- package/dist/dataStoreContext.d.ts +128 -69
- 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 +188 -165
- package/dist/runtime-definitions-beta.d.ts +37 -59
- package/dist/runtime-definitions-public.d.ts +37 -59
- package/dist/runtime-definitions-untrimmed.d.ts +195 -166
- 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 +464 -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 +1019 -0
- package/lib/runtime-definitions-beta.d.ts +242 -0
- package/lib/runtime-definitions-public.d.ts +242 -0
- package/lib/runtime-definitions-untrimmed.d.ts +1100 -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 +115 -33
- package/src/dataStoreContext.ts +151 -85
- 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 -71
- 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.
|
|
@@ -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
|
/**
|
|
@@ -139,6 +131,8 @@ export declare enum FlushMode {
|
|
|
139
131
|
|
|
140
132
|
/* Excluded from this release type: gcBlobPrefix */
|
|
141
133
|
|
|
134
|
+
/* Excluded from this release type: gcDataBlobKey */
|
|
135
|
+
|
|
142
136
|
/* Excluded from this release type: gcDeletedBlobKey */
|
|
143
137
|
|
|
144
138
|
/* Excluded from this release type: gcTombstoneBlobKey */
|
|
@@ -173,21 +167,25 @@ export declare interface IAttachMessage {
|
|
|
173
167
|
export declare interface IContainerRuntimeBase extends IEventProvider<IContainerRuntimeBaseEvents> {
|
|
174
168
|
readonly logger: ITelemetryBaseLogger;
|
|
175
169
|
readonly clientDetails: IClientDetails;
|
|
170
|
+
readonly disposed: boolean;
|
|
176
171
|
/**
|
|
177
172
|
* Invokes the given callback and guarantees that all operations generated within the callback will be ordered
|
|
178
|
-
* sequentially.
|
|
173
|
+
* sequentially.
|
|
174
|
+
*
|
|
175
|
+
* If the callback throws an error, the container will close and the error will be logged.
|
|
179
176
|
*/
|
|
180
177
|
orderSequentially(callback: () => void): void;
|
|
181
178
|
/**
|
|
182
179
|
* Submits a container runtime level signal to be sent to other clients.
|
|
183
180
|
* @param type - Type of the signal.
|
|
184
181
|
* @param content - Content of the signal.
|
|
182
|
+
* @param targetClientId - When specified, the signal is only sent to the provided client id.
|
|
185
183
|
*/
|
|
186
|
-
submitSignal(type: string, content: any): void;
|
|
184
|
+
submitSignal(type: string, content: any, targetClientId?: string): void;
|
|
187
185
|
/**
|
|
188
186
|
* @deprecated 0.16 Issue #1537, #3631
|
|
189
187
|
*/
|
|
190
|
-
_createDataStoreWithProps(pkg: string | string[]
|
|
188
|
+
_createDataStoreWithProps(pkg: Readonly<string | string[]>, props?: any, id?: string): Promise<IDataStore>;
|
|
191
189
|
/**
|
|
192
190
|
* Creates a data store and returns an object that exposes a handle to the data store's entryPoint, and also serves
|
|
193
191
|
* as the data store's router. The data store is not bound to a container, and in such state is not persisted to
|
|
@@ -195,13 +193,20 @@ export declare interface IContainerRuntimeBase extends IEventProvider<IContainer
|
|
|
195
193
|
* already attached DDS (or non-attached DDS that will eventually get attached to storage) will result in this
|
|
196
194
|
* store being attached to storage.
|
|
197
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}
|
|
198
199
|
*/
|
|
199
|
-
createDataStore(pkg: string | string[]): Promise<IDataStore>;
|
|
200
|
+
createDataStore(pkg: Readonly<string | string[]>, loadingGroupId?: string): Promise<IDataStore>;
|
|
200
201
|
/**
|
|
201
202
|
* Creates detached data store context. Only after context.attachRuntime() is called,
|
|
202
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}.
|
|
203
208
|
*/
|
|
204
|
-
createDetachedDataStore(pkg: Readonly<string[]
|
|
209
|
+
createDetachedDataStore(pkg: Readonly<string[]>, loadingGroupId?: string): IFluidDataStoreContextDetached;
|
|
205
210
|
/**
|
|
206
211
|
* Get an absolute url for a provided container-relative request.
|
|
207
212
|
* Returns undefined if the container or data store isn't attached to storage.
|
|
@@ -217,6 +222,28 @@ export declare interface IContainerRuntimeBase extends IEventProvider<IContainer
|
|
|
217
222
|
* Returns the current audience.
|
|
218
223
|
*/
|
|
219
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
|
+
}>;
|
|
220
247
|
}
|
|
221
248
|
|
|
222
249
|
/**
|
|
@@ -231,6 +258,7 @@ export declare interface IContainerRuntimeBaseEvents extends IEvent {
|
|
|
231
258
|
(event: "op", listener: (op: ISequencedDocumentMessage, runtimeMessage?: boolean) => void): any;
|
|
232
259
|
(event: "batchEnd", listener: (error: any, op: ISequencedDocumentMessage) => void): any;
|
|
233
260
|
(event: "signal", listener: (message: IInboundSignalMessage, local: boolean) => void): any;
|
|
261
|
+
(event: "dispose", listener: () => void): any;
|
|
234
262
|
}
|
|
235
263
|
|
|
236
264
|
/**
|
|
@@ -257,10 +285,6 @@ export declare interface IDataStore {
|
|
|
257
285
|
readonly entryPoint: IFluidHandle<FluidObject>;
|
|
258
286
|
}
|
|
259
287
|
|
|
260
|
-
export { IdCompressor }
|
|
261
|
-
|
|
262
|
-
export { IdCreationRange }
|
|
263
|
-
|
|
264
288
|
/**
|
|
265
289
|
* An envelope wraps the contents with the intended target
|
|
266
290
|
* @alpha
|
|
@@ -311,34 +335,27 @@ export declare interface IExperimentalIncrementalSummaryContext {
|
|
|
311
335
|
* @alpha
|
|
312
336
|
*/
|
|
313
337
|
export declare interface IFluidDataStoreChannel extends IDisposable {
|
|
314
|
-
readonly id: string;
|
|
315
|
-
/**
|
|
316
|
-
* Indicates the attachment state of the channel to a host service.
|
|
317
|
-
*/
|
|
318
|
-
readonly attachState: AttachState;
|
|
319
|
-
readonly visibilityState: VisibilityState;
|
|
320
|
-
/**
|
|
321
|
-
* Runs through the graph and attaches the bound handles. Then binds this runtime to the container.
|
|
322
|
-
* @deprecated This will be removed in favor of {@link IFluidDataStoreChannel.makeVisibleAndAttachGraph}.
|
|
323
|
-
*/
|
|
324
|
-
attachGraph(): void;
|
|
325
338
|
/**
|
|
326
339
|
* Makes the data store channel visible in the container. Also, runs through its graph and attaches all
|
|
327
340
|
* bound handles that represent its dependencies in the container's graph.
|
|
328
341
|
*/
|
|
329
342
|
makeVisibleAndAttachGraph(): void;
|
|
330
343
|
/**
|
|
331
|
-
*
|
|
344
|
+
* Synchronously retrieves the summary used as part of the initial summary message
|
|
332
345
|
*/
|
|
333
346
|
getAttachSummary(telemetryContext?: ITelemetryContext): ISummaryTreeWithStats;
|
|
347
|
+
/**
|
|
348
|
+
* Synchronously retrieves GC Data (representing the outbound routes present) for the initial state of the DataStore
|
|
349
|
+
*/
|
|
350
|
+
getAttachGCData?(telemetryContext?: ITelemetryContext): IGarbageCollectionData;
|
|
334
351
|
/**
|
|
335
352
|
* Processes the op.
|
|
336
353
|
*/
|
|
337
|
-
process(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void;
|
|
354
|
+
process(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown, addedOutboundReference?: (fromNodePath: string, toNodePath: string) => void): void;
|
|
338
355
|
/**
|
|
339
356
|
* Processes the signal.
|
|
340
357
|
*/
|
|
341
|
-
processSignal(message:
|
|
358
|
+
processSignal(message: IInboundSignalMessage, local: boolean): void;
|
|
342
359
|
/**
|
|
343
360
|
* Generates a summary for the channel.
|
|
344
361
|
* Introduced with summarizerNode - will be required in a future release.
|
|
@@ -386,6 +403,7 @@ export declare interface IFluidDataStoreChannel extends IDisposable {
|
|
|
386
403
|
*/
|
|
387
404
|
readonly entryPoint: IFluidHandle<FluidObject>;
|
|
388
405
|
request(request: IRequest): Promise<IResponse>;
|
|
406
|
+
setAttachState(attachState: AttachState.Attaching | AttachState.Attached): void;
|
|
389
407
|
}
|
|
390
408
|
|
|
391
409
|
/**
|
|
@@ -393,7 +411,7 @@ export declare interface IFluidDataStoreChannel extends IDisposable {
|
|
|
393
411
|
* get information and call functionality to the container.
|
|
394
412
|
* @alpha
|
|
395
413
|
*/
|
|
396
|
-
export declare interface IFluidDataStoreContext extends
|
|
414
|
+
export declare interface IFluidDataStoreContext extends IFluidParentContext {
|
|
397
415
|
readonly id: string;
|
|
398
416
|
/**
|
|
399
417
|
* A data store created by a client, is a local data store for that client. Also, when a detached container loads
|
|
@@ -408,28 +426,110 @@ export declare interface IFluidDataStoreContext extends IEventProvider<IFluidDat
|
|
|
408
426
|
* The package path of the data store as per the package factory.
|
|
409
427
|
*/
|
|
410
428
|
readonly packagePath: readonly string[];
|
|
411
|
-
readonly
|
|
429
|
+
readonly baseSnapshot: ISnapshotTree | undefined;
|
|
430
|
+
/**
|
|
431
|
+
* @deprecated 0.16 Issue #1635, #3631
|
|
432
|
+
*/
|
|
433
|
+
readonly createProps?: any;
|
|
434
|
+
/**
|
|
435
|
+
* @deprecated The functionality to get base GC details has been moved to summarizer node.
|
|
436
|
+
*
|
|
437
|
+
* Returns the GC details in the initial summary of this data store. This is used to initialize the data store
|
|
438
|
+
* and its children with the GC details from the previous summary.
|
|
439
|
+
*/
|
|
440
|
+
getBaseGCDetails(): Promise<IGarbageCollectionDetailsBase>;
|
|
441
|
+
/**
|
|
442
|
+
* (Same as @see addedGCOutboundReference, but with string paths instead of handles)
|
|
443
|
+
*
|
|
444
|
+
* Called when a new outbound reference is added to another node. This is used by garbage collection to identify
|
|
445
|
+
* all references added in the system.
|
|
446
|
+
*
|
|
447
|
+
* @param fromPath - The absolute path of the node that added the reference.
|
|
448
|
+
* @param toPath - The absolute path of the outbound node that is referenced.
|
|
449
|
+
*/
|
|
450
|
+
addedGCOutboundRoute?(fromPath: string, toPath: string): void;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* @alpha
|
|
455
|
+
*/
|
|
456
|
+
export declare interface IFluidDataStoreContextDetached extends IFluidDataStoreContext {
|
|
457
|
+
/**
|
|
458
|
+
* Binds a runtime to the context.
|
|
459
|
+
*/
|
|
460
|
+
attachRuntime(factory: IProvideFluidDataStoreFactory, dataStoreRuntime: IFluidDataStoreChannel): Promise<IDataStore>;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* @alpha
|
|
465
|
+
*/
|
|
466
|
+
export declare const IFluidDataStoreFactory: keyof IProvideFluidDataStoreFactory;
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* IFluidDataStoreFactory create data stores. It is associated with an identifier (its `type` member)
|
|
470
|
+
* and usually provided to consumers using this mapping through a data store registry.
|
|
471
|
+
* @alpha
|
|
472
|
+
*/
|
|
473
|
+
export declare interface IFluidDataStoreFactory extends IProvideFluidDataStoreFactory {
|
|
474
|
+
/**
|
|
475
|
+
* String that uniquely identifies the type of data store created by this factory.
|
|
476
|
+
*/
|
|
477
|
+
type: string;
|
|
478
|
+
/**
|
|
479
|
+
* Generates runtime for the data store from the data store context. Once created should be bound to the context.
|
|
480
|
+
* @param context - Context for the data store.
|
|
481
|
+
* @param existing - If instantiating from an existing file.
|
|
482
|
+
*/
|
|
483
|
+
instantiateDataStore(context: IFluidDataStoreContext, existing: boolean): Promise<IFluidDataStoreChannel>;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* @alpha
|
|
488
|
+
*/
|
|
489
|
+
export declare const IFluidDataStoreRegistry: keyof IProvideFluidDataStoreRegistry;
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* An association of identifiers to data store registry entries, where the
|
|
493
|
+
* entries can be used to create data stores.
|
|
494
|
+
* @alpha
|
|
495
|
+
*/
|
|
496
|
+
export declare interface IFluidDataStoreRegistry extends IProvideFluidDataStoreRegistry {
|
|
497
|
+
get(name: string): Promise<FluidDataStoreRegistryEntry | undefined>;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
/**
|
|
501
|
+
* Represents the context for the data store like objects. It is used by the data store runtime to
|
|
502
|
+
* get information and call functionality to its parent.
|
|
503
|
+
*
|
|
504
|
+
* This layout is temporary, as {@link IFluidParentContext} and {@link IFluidDataStoreContext} will converge.
|
|
505
|
+
*
|
|
506
|
+
* @alpha
|
|
507
|
+
*/
|
|
508
|
+
export declare interface IFluidParentContext extends IProvideFluidHandleContext, Partial<IProvideFluidDataStoreRegistry> {
|
|
509
|
+
readonly options: Record<string | number, any>;
|
|
412
510
|
readonly clientId: string | undefined;
|
|
413
511
|
readonly connected: boolean;
|
|
414
512
|
readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;
|
|
415
513
|
readonly storage: IDocumentStorageService;
|
|
416
|
-
readonly baseSnapshot: ISnapshotTree | undefined;
|
|
417
514
|
readonly logger: ITelemetryBaseLogger;
|
|
418
515
|
readonly clientDetails: IClientDetails;
|
|
419
516
|
readonly idCompressor?: IIdCompressor;
|
|
517
|
+
/**
|
|
518
|
+
* Represents the loading group to which the data store belongs to. Please refer to this readme for more context.
|
|
519
|
+
* {@link https://github.com/microsoft/FluidFramework/blob/main/packages/runtime/container-runtime/README.md | README}
|
|
520
|
+
*/
|
|
521
|
+
readonly loadingGroupId?: string;
|
|
420
522
|
/**
|
|
421
523
|
* Indicates the attachment state of the data store to a host service.
|
|
422
524
|
*/
|
|
423
525
|
readonly attachState: AttachState;
|
|
424
526
|
readonly containerRuntime: IContainerRuntimeBase;
|
|
425
|
-
/**
|
|
426
|
-
* @deprecated 0.16 Issue #1635, #3631
|
|
427
|
-
*/
|
|
428
|
-
readonly createProps?: any;
|
|
429
527
|
/**
|
|
430
528
|
* Ambient services provided with the context
|
|
431
529
|
*/
|
|
432
530
|
readonly scope: FluidObject;
|
|
531
|
+
readonly gcThrowOnTombstoneUsage: boolean;
|
|
532
|
+
readonly gcTombstoneEnforcementAllowed: boolean;
|
|
433
533
|
/**
|
|
434
534
|
* Returns the current quorum.
|
|
435
535
|
*/
|
|
@@ -468,11 +568,6 @@ export declare interface IFluidDataStoreContext extends IEventProvider<IFluidDat
|
|
|
468
568
|
* when they are marked as root. For non-root data stores, this happens when their handle is added to a visible DDS.
|
|
469
569
|
*/
|
|
470
570
|
makeLocallyVisible(): void;
|
|
471
|
-
/**
|
|
472
|
-
* Call by IFluidDataStoreChannel, indicates that a channel is dirty and needs to be part of the summary.
|
|
473
|
-
* @param address - The address of the channel that is dirty.
|
|
474
|
-
*/
|
|
475
|
-
setChannelDirty(address: string): void;
|
|
476
571
|
/**
|
|
477
572
|
* Get an absolute url to the container based on the provided relativeUrl.
|
|
478
573
|
* Returns undefined if the container or data store isn't attached to storage.
|
|
@@ -491,78 +586,29 @@ export declare interface IFluidDataStoreContext extends IEventProvider<IFluidDat
|
|
|
491
586
|
* If it is local, it will throw unsupported errors on calls to summarize.
|
|
492
587
|
*/
|
|
493
588
|
createParam: CreateChildSummarizerNodeParam): CreateChildSummarizerNodeFn;
|
|
589
|
+
deleteChildSummarizerNode?(id: string): void;
|
|
494
590
|
uploadBlob(blob: ArrayBufferLike, signal?: AbortSignal): Promise<IFluidHandle<ArrayBufferLike>>;
|
|
495
|
-
/**
|
|
496
|
-
* @deprecated The functionality to get base GC details has been moved to summarizer node.
|
|
497
|
-
*
|
|
498
|
-
* Returns the GC details in the initial summary of this data store. This is used to initialize the data store
|
|
499
|
-
* and its children with the GC details from the previous summary.
|
|
500
|
-
*/
|
|
501
|
-
getBaseGCDetails(): Promise<IGarbageCollectionDetailsBase>;
|
|
502
591
|
/**
|
|
503
592
|
* @deprecated There is no replacement for this, its functionality is no longer needed at this layer.
|
|
504
593
|
* It will be removed in a future release, sometime after 2.0.0-internal.8.0.0
|
|
505
594
|
*
|
|
595
|
+
* Similar capability is exposed with from/to string paths instead of handles via @see addedGCOutboundRoute
|
|
596
|
+
*
|
|
506
597
|
* Called when a new outbound reference is added to another node. This is used by garbage collection to identify
|
|
507
598
|
* all references added in the system.
|
|
508
599
|
* @param srcHandle - The handle of the node that added the reference.
|
|
509
600
|
* @param outboundHandle - The handle of the outbound node that is referenced.
|
|
510
601
|
*/
|
|
511
|
-
addedGCOutboundReference?(srcHandle:
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
*/
|
|
517
|
-
export declare interface IFluidDataStoreContextDetached extends IFluidDataStoreContext {
|
|
602
|
+
addedGCOutboundReference?(srcHandle: {
|
|
603
|
+
absolutePath: string;
|
|
604
|
+
}, outboundHandle: {
|
|
605
|
+
absolutePath: string;
|
|
606
|
+
}): void;
|
|
518
607
|
/**
|
|
519
|
-
*
|
|
520
|
-
|
|
521
|
-
attachRuntime(factory: IProvideFluidDataStoreFactory, dataStoreRuntime: IFluidDataStoreChannel): Promise<void>;
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
/**
|
|
525
|
-
* @alpha
|
|
526
|
-
*/
|
|
527
|
-
export declare interface IFluidDataStoreContextEvents extends IEvent {
|
|
528
|
-
(event: "attaching" | "attached", listener: () => void): any;
|
|
529
|
-
}
|
|
530
|
-
|
|
531
|
-
/**
|
|
532
|
-
* @alpha
|
|
533
|
-
*/
|
|
534
|
-
export declare const IFluidDataStoreFactory: keyof IProvideFluidDataStoreFactory;
|
|
535
|
-
|
|
536
|
-
/**
|
|
537
|
-
* IFluidDataStoreFactory create data stores. It is associated with an identifier (its `type` member)
|
|
538
|
-
* and usually provided to consumers using this mapping through a data store registry.
|
|
539
|
-
* @alpha
|
|
540
|
-
*/
|
|
541
|
-
export declare interface IFluidDataStoreFactory extends IProvideFluidDataStoreFactory {
|
|
542
|
-
/**
|
|
543
|
-
* String that uniquely identifies the type of data store created by this factory.
|
|
544
|
-
*/
|
|
545
|
-
type: string;
|
|
546
|
-
/**
|
|
547
|
-
* Generates runtime for the data store from the data store context. Once created should be bound to the context.
|
|
548
|
-
* @param context - Context for the data store.
|
|
549
|
-
* @param existing - If instantiating from an existing file.
|
|
608
|
+
* Called by IFluidDataStoreChannel, indicates that a channel is dirty and needs to be part of the summary.
|
|
609
|
+
* @param address - The address of the channel that is dirty.
|
|
550
610
|
*/
|
|
551
|
-
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
/**
|
|
555
|
-
* @alpha
|
|
556
|
-
*/
|
|
557
|
-
export declare const IFluidDataStoreRegistry: keyof IProvideFluidDataStoreRegistry;
|
|
558
|
-
|
|
559
|
-
/**
|
|
560
|
-
* An association of identifiers to data store registry entries, where the
|
|
561
|
-
* entries can be used to create data stores.
|
|
562
|
-
* @alpha
|
|
563
|
-
*/
|
|
564
|
-
export declare interface IFluidDataStoreRegistry extends IProvideFluidDataStoreRegistry {
|
|
565
|
-
get(name: string): Promise<FluidDataStoreRegistryEntry | undefined>;
|
|
611
|
+
setChannelDirty(address: string): void;
|
|
566
612
|
}
|
|
567
613
|
|
|
568
614
|
/**
|
|
@@ -594,10 +640,6 @@ export declare interface IGarbageCollectionDetailsBase {
|
|
|
594
640
|
gcData?: IGarbageCollectionData;
|
|
595
641
|
}
|
|
596
642
|
|
|
597
|
-
export { IIdCompressor }
|
|
598
|
-
|
|
599
|
-
export { IIdCompressorCore }
|
|
600
|
-
|
|
601
643
|
/**
|
|
602
644
|
* Represents ISignalMessage with its type.
|
|
603
645
|
* @public
|
|
@@ -681,9 +723,6 @@ export declare interface ISummarizerNode {
|
|
|
681
723
|
invalidate(sequenceNumber: number): void;
|
|
682
724
|
/**
|
|
683
725
|
* Calls the internal summarize function and handles internal state tracking.
|
|
684
|
-
* If unchanged and fullTree is false, it will reuse previous summary subtree.
|
|
685
|
-
* If an error is encountered and throwOnFailure is false, it will try to make
|
|
686
|
-
* a summary with a pointer to the previous summary + a blob of outstanding ops.
|
|
687
726
|
* @param fullTree - true to skip optimizations and always generate the full tree
|
|
688
727
|
* @param trackState - indicates whether the summarizer node should track the state of the summary or not
|
|
689
728
|
* @param telemetryContext - summary data passed through the layers for telemetry purposes
|
|
@@ -724,7 +763,9 @@ export declare interface ISummarizerNode {
|
|
|
724
763
|
*/
|
|
725
764
|
config?: ISummarizerNodeConfig): ISummarizerNode;
|
|
726
765
|
getChild(id: string): ISummarizerNode | undefined;
|
|
727
|
-
/**
|
|
766
|
+
/**
|
|
767
|
+
* True if a summary is currently in progress
|
|
768
|
+
*/
|
|
728
769
|
isSummaryInProgress?(): boolean;
|
|
729
770
|
}
|
|
730
771
|
|
|
@@ -737,16 +778,6 @@ export declare interface ISummarizerNodeConfig {
|
|
|
737
778
|
* Defaults to true.
|
|
738
779
|
*/
|
|
739
780
|
readonly canReuseHandle?: boolean;
|
|
740
|
-
/**
|
|
741
|
-
* True to always stop execution on error during summarize, or false to
|
|
742
|
-
* attempt creating a summary that is a pointer ot the last acked summary
|
|
743
|
-
* plus outstanding ops in case of internal summarize failure.
|
|
744
|
-
* Defaults to false.
|
|
745
|
-
*
|
|
746
|
-
* BUG BUG: Default to true while we investigate problem
|
|
747
|
-
* with differential summaries
|
|
748
|
-
*/
|
|
749
|
-
readonly throwOnFailure?: true;
|
|
750
781
|
}
|
|
751
782
|
|
|
752
783
|
/**
|
|
@@ -877,24 +908,30 @@ export declare interface ITelemetryContext {
|
|
|
877
908
|
* @param property - property name of the telemetry data being tracked (ex: "DirectoryCount")
|
|
878
909
|
* @param value - value to attribute to this summary telemetry data
|
|
879
910
|
*/
|
|
880
|
-
set(prefix: string, property: string, value:
|
|
911
|
+
set(prefix: string, property: string, value: TelemetryBaseEventPropertyType): void;
|
|
881
912
|
/**
|
|
882
913
|
* Sets multiple values for telemetry data being tracked.
|
|
883
914
|
* @param prefix - unique prefix to tag this data with (ex: "fluid:summarize:")
|
|
884
915
|
* @param property - property name of the telemetry data being tracked (ex: "Options")
|
|
885
916
|
* @param values - A set of values to attribute to this summary telemetry data.
|
|
886
917
|
*/
|
|
887
|
-
setMultiple(prefix: string, property: string, values: Record<string,
|
|
918
|
+
setMultiple(prefix: string, property: string, values: Record<string, TelemetryBaseEventPropertyType>): void;
|
|
888
919
|
/**
|
|
889
920
|
* Get the telemetry data being tracked
|
|
921
|
+
*
|
|
922
|
+
* @deprecated This interface should only be used for instrumenting, not for attempting to read already-set telemetry data.
|
|
923
|
+
*
|
|
890
924
|
* @param prefix - unique prefix for this data (ex: "fluid:map:")
|
|
891
925
|
* @param property - property name of the telemetry data being tracked (ex: "DirectoryCount")
|
|
892
926
|
* @returns undefined if item not found
|
|
893
927
|
*/
|
|
894
|
-
get(prefix: string, property: string):
|
|
928
|
+
get(prefix: string, property: string): TelemetryBaseEventPropertyType;
|
|
895
929
|
/**
|
|
896
930
|
* Returns a serialized version of all the telemetry data.
|
|
897
931
|
* Should be used when logging in telemetry events.
|
|
932
|
+
*
|
|
933
|
+
* @deprecated This interface should only be used for instrumenting. A concrete implementation will likely have a serialize function
|
|
934
|
+
* but this functionality should not be used by other code being given an ITelemetryContext.
|
|
898
935
|
*/
|
|
899
936
|
serialize(): string;
|
|
900
937
|
}
|
|
@@ -939,20 +976,6 @@ export declare interface OpAttributionKey {
|
|
|
939
976
|
seq: number;
|
|
940
977
|
}
|
|
941
978
|
|
|
942
|
-
export { OpSpaceCompressedId }
|
|
943
|
-
|
|
944
|
-
export { SerializedIdCompressor }
|
|
945
|
-
|
|
946
|
-
export { SerializedIdCompressorWithNoSession }
|
|
947
|
-
|
|
948
|
-
export { SerializedIdCompressorWithOngoingSession }
|
|
949
|
-
|
|
950
|
-
export { SessionId }
|
|
951
|
-
|
|
952
|
-
export { SessionSpaceCompressedId }
|
|
953
|
-
|
|
954
|
-
export { StableId }
|
|
955
|
-
|
|
956
979
|
/**
|
|
957
980
|
* @alpha
|
|
958
981
|
*/
|