@fluidframework/runtime-definitions 0.58.2001 → 0.59.1000-61898

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.
@@ -26,6 +26,29 @@ export declare enum FlushMode {
26
26
  */
27
27
  TurnBased = 1
28
28
  }
29
+ /**
30
+ * This tells the visibility state of a Fluid object. It basically tracks whether the object is not visible, visible
31
+ * locally within the container only or visible globally to all clients.
32
+ */
33
+ export declare const VisibilityState: {
34
+ /** Indicates that the object is not visible. This is the state when an object is first created. */
35
+ NotVisible: string;
36
+ /**
37
+ * Indicates that the object is visible locally within the container. This is the state when an object is attached
38
+ * to the container's graph but the container itself isn't globally visible. The object's state goes from not
39
+ * visible to locally visible.
40
+ */
41
+ LocallyVisible: string;
42
+ /**
43
+ * Indicates that the object is visible globally to all clients. This is the state of an object in 2 scenarios:
44
+ * 1. It is attached to the container's graph when the container is globally visible. The object's state goes from
45
+ * not visible to globally visible.
46
+ * 2. When a container becomes globally visible, all locally visible objects go from locally visible to globally
47
+ * visible.
48
+ */
49
+ GloballyVisible: string;
50
+ };
51
+ export declare type VisibilityState = typeof VisibilityState[keyof typeof VisibilityState];
29
52
  export interface IContainerRuntimeBaseEvents extends IEvent {
30
53
  (event: "batchBegin" | "op", listener: (op: ISequencedDocumentMessage) => void): any;
31
54
  (event: "batchEnd", listener: (error: any, op: ISequencedDocumentMessage) => void): any;
@@ -62,6 +85,7 @@ export interface IContainerRuntimeBase extends IEventProvider<IContainerRuntimeB
62
85
  orderSequentially(callback: () => void): void;
63
86
  /**
64
87
  * Sets the flush mode for operations on the document.
88
+ * @deprecated - Will be removed in 0.60. See #9480.
65
89
  */
66
90
  setFlushMode(mode: FlushMode): void;
67
91
  /**
@@ -120,6 +144,7 @@ export interface IFluidDataStoreChannel extends IFluidRouter, IDisposable {
120
144
  * Indicates the attachment state of the channel to a host service.
121
145
  */
122
146
  readonly attachState: AttachState;
147
+ readonly visibilityState?: VisibilityState;
123
148
  /**
124
149
  * @deprecated - This is an internal method that should not be exposed.
125
150
  * Called to bind the runtime to the container.
@@ -127,9 +152,15 @@ export interface IFluidDataStoreChannel extends IFluidRouter, IDisposable {
127
152
  */
128
153
  bindToContext(): void;
129
154
  /**
155
+ * @deprecated - This will be removed in favor of makeVisibleAndAttachGraph.
130
156
  * Runs through the graph and attaches the bound handles. Then binds this runtime to the container.
131
157
  */
132
158
  attachGraph(): void;
159
+ /**
160
+ * Makes the data store channel visible in the container. Also, runs through its graph and attaches all
161
+ * bound handles that represent its dependencies in the container's graph.
162
+ */
163
+ makeVisibleAndAttachGraph?(): void;
133
164
  /**
134
165
  * Retrieves the summary used as part of the initial summary message
135
166
  */
@@ -246,12 +277,18 @@ export interface IFluidDataStoreContext extends IEventProvider<IFluidDataStoreCo
246
277
  */
247
278
  submitSignal(type: string, content: any): void;
248
279
  /**
280
+ * @deprecated - To be removed in favor of makeVisible.
249
281
  * Register the runtime to the container
250
282
  */
251
283
  bindToContext(): void;
284
+ /**
285
+ * Called to make the data store locally visible in the container. This happens automatically for root data stores
286
+ * when they are marked as root. For non-root data stores, this happens when their handle is added to a visible DDS.
287
+ */
288
+ makeLocallyVisible?(): void;
252
289
  /**
253
290
  * Call by IFluidDataStoreChannel, indicates that a channel is dirty and needs to be part of the summary.
254
- * @param address - The address of the channe that is dirty.
291
+ * @param address - The address of the channel that is dirty.
255
292
  */
256
293
  setChannelDirty(address: string): void;
257
294
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"dataStoreContext.d.ts","sourceRoot":"","sources":["../src/dataStoreContext.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAC/G,OAAO,EACH,YAAY,EACZ,0BAA0B,EAC1B,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,WAAW,EACd,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACH,SAAS,EACT,aAAa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AC,6BAA6B,CAAC,CAAC;IAE5D;;;;;OAKG;IACH,wBAAwB,CAAC,CAAC,SAAS,EAAE,YAAY,EAAE,cAAc,EAAE,YAAY,GAAG,IAAI,CAAC;CAC1F;AAED,MAAM,WAAW,8BAA+B,SAAQ,sBAAsB;IAC1E;;OAEG;IACH,aAAa,CACT,OAAO,EAAE,6BAA6B,EACtC,gBAAgB,EAAE,sBAAsB,GACzC,OAAO,CAAC,IAAI,CAAC,CAAC;CACpB"}
@@ -4,7 +4,7 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.FlushMode = void 0;
7
+ exports.VisibilityState = exports.FlushMode = void 0;
8
8
  /**
9
9
  * Runtime flush mode handling
10
10
  */
@@ -20,4 +20,26 @@ var FlushMode;
20
20
  */
21
21
  FlushMode[FlushMode["TurnBased"] = 1] = "TurnBased";
22
22
  })(FlushMode = exports.FlushMode || (exports.FlushMode = {}));
23
+ /**
24
+ * This tells the visibility state of a Fluid object. It basically tracks whether the object is not visible, visible
25
+ * locally within the container only or visible globally to all clients.
26
+ */
27
+ exports.VisibilityState = {
28
+ /** Indicates that the object is not visible. This is the state when an object is first created. */
29
+ NotVisible: "NotVisible",
30
+ /**
31
+ * Indicates that the object is visible locally within the container. This is the state when an object is attached
32
+ * to the container's graph but the container itself isn't globally visible. The object's state goes from not
33
+ * visible to locally visible.
34
+ */
35
+ LocallyVisible: "LocallyVisible",
36
+ /**
37
+ * Indicates that the object is visible globally to all clients. This is the state of an object in 2 scenarios:
38
+ * 1. It is attached to the container's graph when the container is globally visible. The object's state goes from
39
+ * not visible to globally visible.
40
+ * 2. When a container becomes globally visible, all locally visible objects go from locally visible to globally
41
+ * visible.
42
+ */
43
+ GloballyVisible: "GloballyVisible",
44
+ };
23
45
  //# sourceMappingURL=dataStoreContext.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dataStoreContext.js","sourceRoot":"","sources":["../src/dataStoreContext.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAwCH;;GAEG;AACH,IAAY,SAWX;AAXD,WAAY,SAAS;IACjB;;OAEG;IACH,mDAAS,CAAA;IAET;;;OAGG;IACH,mDAAS,CAAA;AACb,CAAC,EAXW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAWpB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryBaseLogger, IDisposable, IEvent, IEventProvider } from \"@fluidframework/common-definitions\";\nimport {\n IFluidRouter,\n IProvideFluidHandleContext,\n IFluidHandle,\n IRequest,\n IResponse,\n FluidObject,\n} from \"@fluidframework/core-interfaces\";\nimport {\n IAudience,\n IDeltaManager,\n AttachState,\n ILoaderOptions,\n} from \"@fluidframework/container-definitions\";\nimport { IDocumentStorageService } from \"@fluidframework/driver-definitions\";\nimport {\n IClientDetails,\n IDocumentMessage,\n IQuorumClients,\n ISequencedDocumentMessage,\n ISnapshotTree,\n} from \"@fluidframework/protocol-definitions\";\nimport { IProvideFluidDataStoreFactory } from \"./dataStoreFactory\";\nimport { IProvideFluidDataStoreRegistry } from \"./dataStoreRegistry\";\nimport {\n IGarbageCollectionData,\n IGarbageCollectionDetailsBase,\n IGarbageCollectionSummaryDetails,\n} from \"./garbageCollection\";\nimport { IInboundSignalMessage } from \"./protocol\";\nimport {\n CreateChildSummarizerNodeParam,\n ISummarizerNodeWithGC,\n ISummaryTreeWithStats,\n SummarizeInternalFn,\n} from \"./summary\";\n\n/**\n * Runtime flush mode handling\n */\nexport enum FlushMode {\n /**\n * In Immediate flush mode the runtime will immediately send all operations to the driver layer.\n */\n Immediate,\n\n /**\n * When in TurnBased flush mode the runtime will buffer operations in the current turn and send them as a single\n * batch at the end of the turn. The flush call on the runtime can be used to force send the current batch.\n */\n TurnBased,\n}\n\nexport interface IContainerRuntimeBaseEvents extends IEvent{\n (event: \"batchBegin\" | \"op\", listener: (op: ISequencedDocumentMessage) => void);\n (event: \"batchEnd\", listener: (error: any, op: ISequencedDocumentMessage) => void);\n (event: \"signal\", listener: (message: IInboundSignalMessage, local: boolean) => void);\n}\n\n/**\n * Encapsulates the return codes of the aliasing API\n */\n export type AliasResult = \"Success\" | \"Conflict\" | \"Aliasing\" | \"AlreadyAliased\";\n\n/**\n * A fluid router with the capability of being assigned an alias\n */\n export interface IDataStore extends IFluidRouter {\n /**\n * Attempt to assign an alias to the datastore.\n * If the operation succeeds, the datastore can be referenced\n * by the supplied alias.\n *\n * @param alias - Given alias for this datastore.\n */\n trySetAlias(alias: string): Promise<AliasResult>;\n}\n\n/**\n * A reduced set of functionality of IContainerRuntime that a data store context/data store runtime will need\n * TODO: this should be merged into IFluidDataStoreContext\n */\nexport interface IContainerRuntimeBase extends\n IEventProvider<IContainerRuntimeBaseEvents>,\n IProvideFluidHandleContext {\n\n readonly logger: ITelemetryBaseLogger;\n readonly clientDetails: IClientDetails;\n\n /**\n * Invokes the given callback and guarantees that all operations generated within the callback will be ordered\n * sequentially. Total size of all messages must be less than maxOpSize.\n */\n orderSequentially(callback: () => void): void;\n\n /**\n * Sets the flush mode for operations on the document.\n */\n setFlushMode(mode: FlushMode): void;\n\n /**\n * Executes a request against the container runtime\n */\n request(request: IRequest): Promise<IResponse>;\n\n /**\n * Submits a container runtime level signal to be sent to other clients.\n * @param type - Type of the signal.\n * @param content - Content of the signal.\n */\n submitSignal(type: string, content: any): void;\n\n /**\n * @deprecated 0.16 Issue #1537, #3631\n * @internal\n */\n _createDataStoreWithProps(\n pkg: string | string[],\n props?: any,\n id?: string,\n isRoot?: boolean,\n ): Promise<IDataStore>;\n\n /**\n * Creates data store. Returns router of data store. Data store is not bound to container,\n * store in such state is not persisted to storage (file). Storing a handle to this store\n * (or any of its parts, like DDS) into already attached DDS (or non-attached DDS that will eventually\n * gets attached to storage) will result in this store being attached to storage.\n * @param pkg - Package name of the data store factory\n */\n createDataStore(pkg: string | string[]): Promise<IDataStore>;\n\n /**\n * Creates detached data store context. only after context.attachRuntime() is called,\n * data store initialization is considered compete.\n */\n createDetachedDataStore(pkg: Readonly<string[]>): IFluidDataStoreContextDetached;\n\n /**\n * Get an absolute url for a provided container-relative request.\n * Returns undefined if the container or data store isn't attached to storage.\n * @param relativeUrl - A relative request within the container\n */\n getAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;\n\n uploadBlob(blob: ArrayBufferLike): Promise<IFluidHandle<ArrayBufferLike>>;\n\n /**\n * Returns the current quorum.\n */\n getQuorum(): IQuorumClients;\n\n /**\n * Returns the current audience.\n */\n getAudience(): IAudience;\n}\n\n/**\n * Minimal interface a data store runtime need to provide for IFluidDataStoreContext to bind to control\n *\n * Functionality include attach, snapshot, op/signal processing, request routes,\n * and connection state notifications\n */\nexport interface IFluidDataStoreChannel extends\n IFluidRouter,\n IDisposable {\n\n readonly id: string;\n\n /**\n * Indicates the attachment state of the channel to a host service.\n */\n readonly attachState: AttachState;\n\n /**\n * @deprecated - This is an internal method that should not be exposed.\n * Called to bind the runtime to the container.\n * If the container is not attached to storage, then this would also be unknown to other clients.\n */\n bindToContext(): void;\n\n /**\n * Runs through the graph and attaches the bound handles. Then binds this runtime to the container.\n */\n attachGraph(): void;\n\n /**\n * Retrieves the summary used as part of the initial summary message\n */\n getAttachSummary(): ISummaryTreeWithStats;\n\n /**\n * Processes the op.\n */\n process(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void;\n\n /**\n * Processes the signal.\n */\n processSignal(message: any, local: boolean): void;\n\n /**\n * Generates a summary for the channel.\n * Introduced with summarizerNode - will be required in a future release.\n * @param fullTree - true to bypass optimizations and force a full summary tree.\n * @param trackState - This tells whether we should track state from this summary.\n */\n summarize(fullTree?: boolean, trackState?: boolean): Promise<ISummaryTreeWithStats>;\n\n /**\n * Returns the data used for garbage collection. This includes a list of GC nodes that represent this context\n * including any of its children. Each node has a list of outbound routes to other GC nodes in the document.\n * @param fullGC - true to bypass optimizations and force full generation of GC data.\n */\n getGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;\n\n /**\n * After GC has run, called to notify this channel of routes that are used in it.\n * @param usedRoutes - The routes that are used in this channel.\n * @param gcTimestamp - The time when GC was run that generated these used routes. If any node becomes unreferenced\n * as part of this GC run, this should be used to update the time when it happens.\n */\n updateUsedRoutes(usedRoutes: string[], gcTimestamp?: number): void;\n\n /**\n * Notifies this object about changes in the connection state.\n * @param value - New connection state.\n * @param clientId - ID of the client. It's old ID when in disconnected state and\n * it's new client ID when we are connecting or connected.\n */\n setConnectionState(connected: boolean, clientId?: string);\n\n /**\n * Ask the DDS to resubmit a message. This could be because we reconnected and this message was not acked.\n * @param type - The type of the original message.\n * @param content - The content of the original message.\n * @param localOpMetadata - The local metadata associated with the original message.\n */\n reSubmit(type: string, content: any, localOpMetadata: unknown);\n\n applyStashedOp(content: any): Promise<unknown>;\n}\n\nexport type CreateChildSummarizerNodeFn = (\n summarizeInternal: SummarizeInternalFn,\n getGCDataFn: (fullGC?: boolean) => Promise<IGarbageCollectionData>,\n getInitialGCSummaryDetailsFn: () => Promise<IGarbageCollectionSummaryDetails>,\n) => ISummarizerNodeWithGC;\n\nexport interface IFluidDataStoreContextEvents extends IEvent {\n // eslint-disable-next-line @typescript-eslint/unified-signatures\n (event: \"attaching\" | \"attached\", listener: () => void);\n}\n\n/**\n * Represents the context for the data store. It is used by the data store runtime to\n * get information and call functionality to the container.\n */\nexport interface IFluidDataStoreContext extends\n IEventProvider<IFluidDataStoreContextEvents>,\n Partial<IProvideFluidDataStoreRegistry>,\n IProvideFluidHandleContext {\n readonly id: string;\n /**\n * A data store created by a client, is a local data store for that client. Also, when a detached container loads\n * from a snapshot, all the data stores are treated as local data stores because at that stage the container\n * still doesn't exists in storage and so the data store couldn't have been created by any other client.\n * Value of this never changes even after the data store is attached.\n * As implementer of data store runtime, you can use this property to check that this data store belongs to this\n * client and hence implement any scenario based on that.\n */\n readonly isLocalDataStore: boolean;\n /**\n * The package path of the data store as per the package factory.\n */\n readonly packagePath: readonly string[];\n readonly options: ILoaderOptions;\n readonly clientId: string | undefined;\n readonly connected: boolean;\n readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n readonly storage: IDocumentStorageService;\n readonly baseSnapshot: ISnapshotTree | undefined;\n readonly logger: ITelemetryBaseLogger;\n readonly clientDetails: IClientDetails;\n /**\n * Indicates the attachment state of the data store to a host service.\n */\n readonly attachState: AttachState;\n\n readonly containerRuntime: IContainerRuntimeBase;\n\n /**\n * @deprecated 0.16 Issue #1635, #3631\n */\n readonly createProps?: any;\n\n /**\n * Ambient services provided with the context\n */\n readonly scope: FluidObject;\n\n /**\n * Returns the current quorum.\n */\n getQuorum(): IQuorumClients;\n\n /**\n * Returns the current audience.\n */\n getAudience(): IAudience;\n\n /**\n * Submits the message to be sent to other clients.\n * @param type - Type of the message.\n * @param content - Content of the message.\n * @param localOpMetadata - The local metadata associated with the message. This is kept locally and not sent to\n * the server. This will be sent back when this message is received back from the server. This is also sent if\n * we are asked to resubmit the message.\n */\n submitMessage(type: string, content: any, localOpMetadata: unknown): void;\n\n /**\n * Submits the signal to be sent to other clients.\n * @param type - Type of the signal.\n * @param content - Content of the signal.\n */\n submitSignal(type: string, content: any): void;\n\n /**\n * Register the runtime to the container\n */\n bindToContext(): void;\n\n /**\n * Call by IFluidDataStoreChannel, indicates that a channel is dirty and needs to be part of the summary.\n * @param address - The address of the channe that is dirty.\n */\n setChannelDirty(address: string): void;\n\n /**\n * Get an absolute url to the container based on the provided relativeUrl.\n * Returns undefined if the container or data store isn't attached to storage.\n * @param relativeUrl - A relative request within the container\n */\n getAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;\n\n getCreateChildSummarizerNodeFn(\n /** Initial id or path part of this node */\n id: string,\n /**\n * Information needed to create the node.\n * If it is from a base summary, it will assert that a summary has been seen.\n * Attach information if it is created from an attach op.\n * If it is local, it will throw unsupported errors on calls to summarize.\n */\n createParam: CreateChildSummarizerNodeParam,\n ): CreateChildSummarizerNodeFn;\n\n uploadBlob(blob: ArrayBufferLike): Promise<IFluidHandle<ArrayBufferLike>>;\n\n /**\n * @deprecated - Renamed to getBaseGCDetails.\n */\n getInitialGCSummaryDetails(): Promise<IGarbageCollectionSummaryDetails>;\n\n /**\n * Returns the GC details in the initial summary of this data store. This is used to initialize the data store\n * and its children with the GC details from the previous summary.\n */\n getBaseGCDetails?(): Promise<IGarbageCollectionDetailsBase>;\n\n /**\n * Called when a new outbound reference is added to another node. This is used by garbage collection to identify\n * all references added in the system.\n * @param srcHandle - The handle of the node that added the reference.\n * @param outboundHandle - The handle of the outbound node that is referenced.\n */\n addedGCOutboundReference?(srcHandle: IFluidHandle, outboundHandle: IFluidHandle): void;\n}\n\nexport interface IFluidDataStoreContextDetached extends IFluidDataStoreContext {\n /**\n * Binds a runtime to the context.\n */\n attachRuntime(\n factory: IProvideFluidDataStoreFactory,\n dataStoreRuntime: IFluidDataStoreChannel,\n ): Promise<void>;\n}\n"]}
1
+ {"version":3,"file":"dataStoreContext.js","sourceRoot":"","sources":["../src/dataStoreContext.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAwCH;;GAEG;AACH,IAAY,SAWX;AAXD,WAAY,SAAS;IACjB;;OAEG;IACH,mDAAS,CAAA;IAET;;;OAGG;IACH,mDAAS,CAAA;AACb,CAAC,EAXW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAWpB;AAED;;;GAGG;AACU,QAAA,eAAe,GAAG;IAC3B,mGAAmG;IACnG,UAAU,EAAE,YAAY;IAExB;;;;OAIG;IACH,cAAc,EAAE,gBAAgB;IAEhC;;;;;;OAMG;IACH,eAAe,EAAE,iBAAiB;CACrC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryBaseLogger, IDisposable, IEvent, IEventProvider } from \"@fluidframework/common-definitions\";\nimport {\n IFluidRouter,\n IProvideFluidHandleContext,\n IFluidHandle,\n IRequest,\n IResponse,\n FluidObject,\n} from \"@fluidframework/core-interfaces\";\nimport {\n IAudience,\n IDeltaManager,\n AttachState,\n ILoaderOptions,\n} from \"@fluidframework/container-definitions\";\nimport { IDocumentStorageService } from \"@fluidframework/driver-definitions\";\nimport {\n IClientDetails,\n IDocumentMessage,\n IQuorumClients,\n ISequencedDocumentMessage,\n ISnapshotTree,\n} from \"@fluidframework/protocol-definitions\";\nimport { IProvideFluidDataStoreFactory } from \"./dataStoreFactory\";\nimport { IProvideFluidDataStoreRegistry } from \"./dataStoreRegistry\";\nimport {\n IGarbageCollectionData,\n IGarbageCollectionDetailsBase,\n IGarbageCollectionSummaryDetails,\n} from \"./garbageCollection\";\nimport { IInboundSignalMessage } from \"./protocol\";\nimport {\n CreateChildSummarizerNodeParam,\n ISummarizerNodeWithGC,\n ISummaryTreeWithStats,\n SummarizeInternalFn,\n} from \"./summary\";\n\n/**\n * Runtime flush mode handling\n */\nexport enum FlushMode {\n /**\n * In Immediate flush mode the runtime will immediately send all operations to the driver layer.\n */\n Immediate,\n\n /**\n * When in TurnBased flush mode the runtime will buffer operations in the current turn and send them as a single\n * batch at the end of the turn. The flush call on the runtime can be used to force send the current batch.\n */\n TurnBased,\n}\n\n/**\n * This tells the visibility state of a Fluid object. It basically tracks whether the object is not visible, visible\n * locally within the container only or visible globally to all clients.\n */\nexport const VisibilityState = {\n /** Indicates that the object is not visible. This is the state when an object is first created. */\n NotVisible: \"NotVisible\",\n\n /**\n * Indicates that the object is visible locally within the container. This is the state when an object is attached\n * to the container's graph but the container itself isn't globally visible. The object's state goes from not\n * visible to locally visible.\n */\n LocallyVisible: \"LocallyVisible\",\n\n /**\n * Indicates that the object is visible globally to all clients. This is the state of an object in 2 scenarios:\n * 1. It is attached to the container's graph when the container is globally visible. The object's state goes from\n * not visible to globally visible.\n * 2. When a container becomes globally visible, all locally visible objects go from locally visible to globally\n * visible.\n */\n GloballyVisible: \"GloballyVisible\",\n};\nexport type VisibilityState = typeof VisibilityState[keyof typeof VisibilityState];\n\nexport interface IContainerRuntimeBaseEvents extends IEvent{\n (event: \"batchBegin\" | \"op\", listener: (op: ISequencedDocumentMessage) => void);\n (event: \"batchEnd\", listener: (error: any, op: ISequencedDocumentMessage) => void);\n (event: \"signal\", listener: (message: IInboundSignalMessage, local: boolean) => void);\n}\n\n/**\n * Encapsulates the return codes of the aliasing API\n */\n export type AliasResult = \"Success\" | \"Conflict\" | \"Aliasing\" | \"AlreadyAliased\";\n\n/**\n * A fluid router with the capability of being assigned an alias\n */\n export interface IDataStore extends IFluidRouter {\n /**\n * Attempt to assign an alias to the datastore.\n * If the operation succeeds, the datastore can be referenced\n * by the supplied alias.\n *\n * @param alias - Given alias for this datastore.\n */\n trySetAlias(alias: string): Promise<AliasResult>;\n}\n\n/**\n * A reduced set of functionality of IContainerRuntime that a data store context/data store runtime will need\n * TODO: this should be merged into IFluidDataStoreContext\n */\nexport interface IContainerRuntimeBase extends\n IEventProvider<IContainerRuntimeBaseEvents>,\n IProvideFluidHandleContext {\n\n readonly logger: ITelemetryBaseLogger;\n readonly clientDetails: IClientDetails;\n\n /**\n * Invokes the given callback and guarantees that all operations generated within the callback will be ordered\n * sequentially. Total size of all messages must be less than maxOpSize.\n */\n orderSequentially(callback: () => void): void;\n\n /**\n * Sets the flush mode for operations on the document.\n * @deprecated - Will be removed in 0.60. See #9480.\n */\n setFlushMode(mode: FlushMode): void;\n\n /**\n * Executes a request against the container runtime\n */\n request(request: IRequest): Promise<IResponse>;\n\n /**\n * Submits a container runtime level signal to be sent to other clients.\n * @param type - Type of the signal.\n * @param content - Content of the signal.\n */\n submitSignal(type: string, content: any): void;\n\n /**\n * @deprecated 0.16 Issue #1537, #3631\n * @internal\n */\n _createDataStoreWithProps(\n pkg: string | string[],\n props?: any,\n id?: string,\n isRoot?: boolean,\n ): Promise<IDataStore>;\n\n /**\n * Creates data store. Returns router of data store. Data store is not bound to container,\n * store in such state is not persisted to storage (file). Storing a handle to this store\n * (or any of its parts, like DDS) into already attached DDS (or non-attached DDS that will eventually\n * gets attached to storage) will result in this store being attached to storage.\n * @param pkg - Package name of the data store factory\n */\n createDataStore(pkg: string | string[]): Promise<IDataStore>;\n\n /**\n * Creates detached data store context. only after context.attachRuntime() is called,\n * data store initialization is considered compete.\n */\n createDetachedDataStore(pkg: Readonly<string[]>): IFluidDataStoreContextDetached;\n\n /**\n * Get an absolute url for a provided container-relative request.\n * Returns undefined if the container or data store isn't attached to storage.\n * @param relativeUrl - A relative request within the container\n */\n getAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;\n\n uploadBlob(blob: ArrayBufferLike): Promise<IFluidHandle<ArrayBufferLike>>;\n\n /**\n * Returns the current quorum.\n */\n getQuorum(): IQuorumClients;\n\n /**\n * Returns the current audience.\n */\n getAudience(): IAudience;\n}\n\n/**\n * Minimal interface a data store runtime need to provide for IFluidDataStoreContext to bind to control\n *\n * Functionality include attach, snapshot, op/signal processing, request routes,\n * and connection state notifications\n */\nexport interface IFluidDataStoreChannel extends\n IFluidRouter,\n IDisposable {\n\n readonly id: string;\n\n /**\n * Indicates the attachment state of the channel to a host service.\n */\n readonly attachState: AttachState;\n\n readonly visibilityState?: VisibilityState;\n\n /**\n * @deprecated - This is an internal method that should not be exposed.\n * Called to bind the runtime to the container.\n * If the container is not attached to storage, then this would also be unknown to other clients.\n */\n bindToContext(): void;\n\n /**\n * @deprecated - This will be removed in favor of makeVisibleAndAttachGraph.\n * Runs through the graph and attaches the bound handles. Then binds this runtime to the container.\n */\n attachGraph(): void;\n\n /**\n * Makes the data store channel visible in the container. Also, runs through its graph and attaches all\n * bound handles that represent its dependencies in the container's graph.\n */\n makeVisibleAndAttachGraph?(): void;\n\n /**\n * Retrieves the summary used as part of the initial summary message\n */\n getAttachSummary(): ISummaryTreeWithStats;\n\n /**\n * Processes the op.\n */\n process(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void;\n\n /**\n * Processes the signal.\n */\n processSignal(message: any, local: boolean): void;\n\n /**\n * Generates a summary for the channel.\n * Introduced with summarizerNode - will be required in a future release.\n * @param fullTree - true to bypass optimizations and force a full summary tree.\n * @param trackState - This tells whether we should track state from this summary.\n */\n summarize(fullTree?: boolean, trackState?: boolean): Promise<ISummaryTreeWithStats>;\n\n /**\n * Returns the data used for garbage collection. This includes a list of GC nodes that represent this context\n * including any of its children. Each node has a list of outbound routes to other GC nodes in the document.\n * @param fullGC - true to bypass optimizations and force full generation of GC data.\n */\n getGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;\n\n /**\n * After GC has run, called to notify this channel of routes that are used in it.\n * @param usedRoutes - The routes that are used in this channel.\n * @param gcTimestamp - The time when GC was run that generated these used routes. If any node becomes unreferenced\n * as part of this GC run, this should be used to update the time when it happens.\n */\n updateUsedRoutes(usedRoutes: string[], gcTimestamp?: number): void;\n\n /**\n * Notifies this object about changes in the connection state.\n * @param value - New connection state.\n * @param clientId - ID of the client. It's old ID when in disconnected state and\n * it's new client ID when we are connecting or connected.\n */\n setConnectionState(connected: boolean, clientId?: string);\n\n /**\n * Ask the DDS to resubmit a message. This could be because we reconnected and this message was not acked.\n * @param type - The type of the original message.\n * @param content - The content of the original message.\n * @param localOpMetadata - The local metadata associated with the original message.\n */\n reSubmit(type: string, content: any, localOpMetadata: unknown);\n\n applyStashedOp(content: any): Promise<unknown>;\n}\n\nexport type CreateChildSummarizerNodeFn = (\n summarizeInternal: SummarizeInternalFn,\n getGCDataFn: (fullGC?: boolean) => Promise<IGarbageCollectionData>,\n getInitialGCSummaryDetailsFn: () => Promise<IGarbageCollectionSummaryDetails>,\n) => ISummarizerNodeWithGC;\n\nexport interface IFluidDataStoreContextEvents extends IEvent {\n // eslint-disable-next-line @typescript-eslint/unified-signatures\n (event: \"attaching\" | \"attached\", listener: () => void);\n}\n\n/**\n * Represents the context for the data store. It is used by the data store runtime to\n * get information and call functionality to the container.\n */\nexport interface IFluidDataStoreContext extends\n IEventProvider<IFluidDataStoreContextEvents>,\n Partial<IProvideFluidDataStoreRegistry>,\n IProvideFluidHandleContext {\n readonly id: string;\n /**\n * A data store created by a client, is a local data store for that client. Also, when a detached container loads\n * from a snapshot, all the data stores are treated as local data stores because at that stage the container\n * still doesn't exists in storage and so the data store couldn't have been created by any other client.\n * Value of this never changes even after the data store is attached.\n * As implementer of data store runtime, you can use this property to check that this data store belongs to this\n * client and hence implement any scenario based on that.\n */\n readonly isLocalDataStore: boolean;\n /**\n * The package path of the data store as per the package factory.\n */\n readonly packagePath: readonly string[];\n readonly options: ILoaderOptions;\n readonly clientId: string | undefined;\n readonly connected: boolean;\n readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n readonly storage: IDocumentStorageService;\n readonly baseSnapshot: ISnapshotTree | undefined;\n readonly logger: ITelemetryBaseLogger;\n readonly clientDetails: IClientDetails;\n /**\n * Indicates the attachment state of the data store to a host service.\n */\n readonly attachState: AttachState;\n\n readonly containerRuntime: IContainerRuntimeBase;\n\n /**\n * @deprecated 0.16 Issue #1635, #3631\n */\n readonly createProps?: any;\n\n /**\n * Ambient services provided with the context\n */\n readonly scope: FluidObject;\n\n /**\n * Returns the current quorum.\n */\n getQuorum(): IQuorumClients;\n\n /**\n * Returns the current audience.\n */\n getAudience(): IAudience;\n\n /**\n * Submits the message to be sent to other clients.\n * @param type - Type of the message.\n * @param content - Content of the message.\n * @param localOpMetadata - The local metadata associated with the message. This is kept locally and not sent to\n * the server. This will be sent back when this message is received back from the server. This is also sent if\n * we are asked to resubmit the message.\n */\n submitMessage(type: string, content: any, localOpMetadata: unknown): void;\n\n /**\n * Submits the signal to be sent to other clients.\n * @param type - Type of the signal.\n * @param content - Content of the signal.\n */\n submitSignal(type: string, content: any): void;\n\n /**\n * @deprecated - To be removed in favor of makeVisible.\n * Register the runtime to the container\n */\n bindToContext(): void;\n\n /**\n * Called to make the data store locally visible in the container. This happens automatically for root data stores\n * when they are marked as root. For non-root data stores, this happens when their handle is added to a visible DDS.\n */\n makeLocallyVisible?(): void;\n\n /**\n * Call by IFluidDataStoreChannel, indicates that a channel is dirty and needs to be part of the summary.\n * @param address - The address of the channel that is dirty.\n */\n setChannelDirty(address: string): void;\n\n /**\n * Get an absolute url to the container based on the provided relativeUrl.\n * Returns undefined if the container or data store isn't attached to storage.\n * @param relativeUrl - A relative request within the container\n */\n getAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;\n\n getCreateChildSummarizerNodeFn(\n /** Initial id or path part of this node */\n id: string,\n /**\n * Information needed to create the node.\n * If it is from a base summary, it will assert that a summary has been seen.\n * Attach information if it is created from an attach op.\n * If it is local, it will throw unsupported errors on calls to summarize.\n */\n createParam: CreateChildSummarizerNodeParam,\n ): CreateChildSummarizerNodeFn;\n\n uploadBlob(blob: ArrayBufferLike): Promise<IFluidHandle<ArrayBufferLike>>;\n\n /**\n * @deprecated - Renamed to getBaseGCDetails.\n */\n getInitialGCSummaryDetails(): Promise<IGarbageCollectionSummaryDetails>;\n\n /**\n * Returns the GC details in the initial summary of this data store. This is used to initialize the data store\n * and its children with the GC details from the previous summary.\n */\n getBaseGCDetails?(): Promise<IGarbageCollectionDetailsBase>;\n\n /**\n * Called when a new outbound reference is added to another node. This is used by garbage collection to identify\n * all references added in the system.\n * @param srcHandle - The handle of the node that added the reference.\n * @param outboundHandle - The handle of the outbound node that is referenced.\n */\n addedGCOutboundReference?(srcHandle: IFluidHandle, outboundHandle: IFluidHandle): void;\n}\n\nexport interface IFluidDataStoreContextDetached extends IFluidDataStoreContext {\n /**\n * Binds a runtime to the context.\n */\n attachRuntime(\n factory: IProvideFluidDataStoreFactory,\n dataStoreRuntime: IFluidDataStoreChannel,\n ): Promise<void>;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/runtime-definitions",
3
- "version": "0.58.2001",
3
+ "version": "0.59.1000-61898",
4
4
  "description": "Fluid Runtime definitions",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -14,15 +14,11 @@
14
14
  "main": "dist/index.js",
15
15
  "types": "dist/index.d.ts",
16
16
  "scripts": {
17
- "build": "npm run build:gen && concurrently npm:build:compile npm:lint && npm run build:docs",
17
+ "build": "concurrently npm:build:compile npm:lint && npm run build:docs",
18
18
  "build:compile": "npm run tsc && npm run build:test",
19
19
  "build:docs": "api-extractor run --local --typescript-compiler-folder ../../../node_modules/typescript && copyfiles -u 1 ./_api-extractor-temp/doc-models/* ../../../_api-extractor-temp/",
20
20
  "build:full": "npm run build",
21
21
  "build:full:compile": "npm run build:compile",
22
- "build:gen": "npm run build:gen:typetests",
23
- "build:gen:bump": "npm run build:gen:typetests:prepare",
24
- "build:gen:typetests": "fluid-type-validator -d .",
25
- "build:gen:typetests:prepare": "fluid-type-validator -d . -p",
26
22
  "build:test": "tsc --project ./src/test/tsconfig.json",
27
23
  "ci:build:docs": "api-extractor run --typescript-compiler-folder ../../../node_modules/typescript && copyfiles -u 1 ./_api-extractor-temp/* ../../../_api-extractor-temp/",
28
24
  "clean": "rimraf dist *.tsbuildinfo *.build.log",
@@ -37,23 +33,16 @@
37
33
  "dependencies": {
38
34
  "@fluidframework/common-definitions": "^0.20.1",
39
35
  "@fluidframework/common-utils": "^0.32.1",
40
- "@fluidframework/container-definitions": "^0.47.1000",
41
- "@fluidframework/core-interfaces": "^0.42.0",
42
- "@fluidframework/driver-definitions": "^0.45.1000",
43
- "@fluidframework/protocol-definitions": "^0.1027.1000",
36
+ "@fluidframework/container-definitions": "^0.48.1000-0",
37
+ "@fluidframework/core-interfaces": "^0.43.1000-0",
38
+ "@fluidframework/driver-definitions": "^0.46.1000-0",
39
+ "@fluidframework/protocol-definitions": "^0.1028.1000-0",
44
40
  "@types/node": "^14.18.0"
45
41
  },
46
42
  "devDependencies": {
47
43
  "@fluidframework/build-common": "^0.23.0",
48
- "@fluidframework/build-tools": "^0.2.58041",
49
- "@fluidframework/eslint-config-fluid": "^0.27.0",
50
- "@fluidframework/runtime-definitions-0.51.1": "npm:@fluidframework/runtime-definitions@0.51.1",
51
- "@fluidframework/runtime-definitions-0.52.0": "npm:@fluidframework/runtime-definitions@0.52.0",
52
- "@fluidframework/runtime-definitions-0.53.0": "npm:@fluidframework/runtime-definitions@0.53.0",
53
- "@fluidframework/runtime-definitions-0.54.0": "npm:@fluidframework/runtime-definitions@0.54.0",
54
- "@fluidframework/runtime-definitions-0.55.0": "npm:@fluidframework/runtime-definitions@0.55.0",
55
- "@fluidframework/runtime-definitions-0.56.0": "npm:@fluidframework/runtime-definitions@0.56.0",
56
- "@fluidframework/runtime-definitions-0.57.0": "npm:@fluidframework/runtime-definitions@0.57.0",
44
+ "@fluidframework/eslint-config-fluid": "^0.28.1000-61189",
45
+ "@fluidframework/runtime-definitions-previous": "npm:@fluidframework/runtime-definitions@^0.58.0",
57
46
  "@microsoft/api-extractor": "^7.16.1",
58
47
  "@rushstack/eslint-config": "^2.5.1",
59
48
  "@typescript-eslint/eslint-plugin": "~5.9.0",
@@ -72,312 +61,22 @@
72
61
  "typescript-formatter": "7.1.0"
73
62
  },
74
63
  "typeValidation": {
75
- "version": "0.58.0",
64
+ "version": "0.59.1000",
76
65
  "broken": {
77
- "0.51.1": {
78
- "InterfaceDeclaration_IFluidDataStoreContextDetached": {
79
- "backCompat": false,
66
+ "0.58.2002": {
67
+ "InterfaceDeclaration_IAttachMessage": {
80
68
  "forwardCompat": false
81
69
  },
82
70
  "InterfaceDeclaration_IFluidDataStoreContext": {
83
- "backCompat": false,
84
- "forwardCompat": false
85
- },
86
- "InterfaceDeclaration_IContainerRuntimeBase": {
87
- "backCompat": false,
88
- "forwardCompat": false
89
- },
90
- "InterfaceDeclaration_IContainerRuntime": {
91
71
  "backCompat": false
92
72
  },
93
- "InterfaceDeclaration_IChannelFactory": {
94
- "backCompat": false
95
- },
96
- "InterfaceDeclaration_IFluidDataStoreRuntime": {
97
- "backCompat": false
98
- },
99
- "InterfaceDeclaration_IProvideFluidDataStoreRegistry": {
100
- "backCompat": false,
101
- "forwardCompat": false
102
- },
103
- "InterfaceDeclaration_FluidDataStoreRegistryEntry": {
104
- "backCompat": false,
105
- "forwardCompat": false
106
- },
107
- "InterfaceDeclaration_IFluidDataStoreFactory": {
108
- "backCompat": false,
109
- "forwardCompat": false
110
- },
111
- "InterfaceDeclaration_IProvideFluidDataStoreFactory": {
112
- "backCompat": false,
113
- "forwardCompat": false
114
- },
115
- "InterfaceDeclaration_IFluidDataStoreRegistry": {
116
- "backCompat": false,
117
- "forwardCompat": false
118
- },
119
- "TypeAliasDeclaration_NamedFluidDataStoreRegistryEntries": {
120
- "backCompat": false,
121
- "forwardCompat": false
122
- },
123
- "TypeAliasDeclaration_NamedFluidDataStoreRegistryEntry": {
124
- "backCompat": false,
125
- "forwardCompat": false
126
- },
127
- "TypeAliasDeclaration_FluidDataStoreRegistryEntry": {
128
- "backCompat": false,
129
- "forwardCompat": false
130
- }
131
- },
132
- "0.52.0": {
133
- "InterfaceDeclaration_IContainerRuntimeBase": {
134
- "backCompat": false,
135
- "forwardCompat": false
136
- },
137
- "InterfaceDeclaration_IFluidDataStoreContext": {
138
- "backCompat": false,
139
- "forwardCompat": false
140
- },
141
- "InterfaceDeclaration_IFluidDataStoreContextDetached": {
142
- "backCompat": false,
143
- "forwardCompat": false
144
- },
145
- "TypeAliasDeclaration_FluidDataStoreRegistryEntry": {
146
- "backCompat": false,
147
- "forwardCompat": false
148
- },
149
- "InterfaceDeclaration_IFluidDataStoreFactory": {
150
- "backCompat": false,
151
- "forwardCompat": false
152
- },
153
- "InterfaceDeclaration_IFluidDataStoreRegistry": {
154
- "backCompat": false,
155
- "forwardCompat": false
156
- },
157
- "InterfaceDeclaration_IProvideFluidDataStoreFactory": {
158
- "backCompat": false,
159
- "forwardCompat": false
160
- },
161
- "InterfaceDeclaration_IProvideFluidDataStoreRegistry": {
162
- "backCompat": false,
163
- "forwardCompat": false
164
- },
165
- "TypeAliasDeclaration_NamedFluidDataStoreRegistryEntries": {
166
- "backCompat": false,
167
- "forwardCompat": false
168
- },
169
- "TypeAliasDeclaration_NamedFluidDataStoreRegistryEntry": {
170
- "backCompat": false,
171
- "forwardCompat": false
172
- }
173
- },
174
- "0.53.0": {
175
- "InterfaceDeclaration_IContainerRuntimeBase": {
176
- "backCompat": false,
177
- "forwardCompat": false
178
- },
179
- "InterfaceDeclaration_IFluidDataStoreContext": {
180
- "backCompat": false,
181
- "forwardCompat": false
182
- },
183
- "InterfaceDeclaration_IFluidDataStoreContextDetached": {
184
- "backCompat": false,
185
- "forwardCompat": false
186
- },
187
- "TypeAliasDeclaration_FluidDataStoreRegistryEntry": {
188
- "backCompat": false,
189
- "forwardCompat": false
190
- },
191
- "InterfaceDeclaration_IFluidDataStoreFactory": {
192
- "backCompat": false,
193
- "forwardCompat": false
194
- },
195
- "InterfaceDeclaration_IFluidDataStoreRegistry": {
196
- "backCompat": false,
197
- "forwardCompat": false
198
- },
199
- "InterfaceDeclaration_IProvideFluidDataStoreFactory": {
200
- "backCompat": false,
201
- "forwardCompat": false
202
- },
203
- "InterfaceDeclaration_IProvideFluidDataStoreRegistry": {
204
- "backCompat": false,
205
- "forwardCompat": false
206
- },
207
- "TypeAliasDeclaration_NamedFluidDataStoreRegistryEntries": {
208
- "backCompat": false,
209
- "forwardCompat": false
210
- },
211
- "TypeAliasDeclaration_NamedFluidDataStoreRegistryEntry": {
212
- "backCompat": false,
213
- "forwardCompat": false
214
- }
215
- },
216
- "0.54.0": {
217
- "TypeAliasDeclaration_FluidDataStoreRegistryEntry": {
218
- "backCompat": false,
219
- "forwardCompat": false
220
- },
221
- "InterfaceDeclaration_IContainerRuntimeBase": {
222
- "backCompat": false,
223
- "forwardCompat": false
224
- },
225
- "InterfaceDeclaration_IFluidDataStoreContext": {
226
- "backCompat": false,
227
- "forwardCompat": false
228
- },
229
73
  "InterfaceDeclaration_IFluidDataStoreContextDetached": {
230
- "backCompat": false,
231
- "forwardCompat": false
232
- },
233
- "InterfaceDeclaration_IFluidDataStoreFactory": {
234
- "backCompat": false,
235
- "forwardCompat": false
236
- },
237
- "InterfaceDeclaration_IFluidDataStoreRegistry": {
238
- "backCompat": false,
239
- "forwardCompat": false
240
- },
241
- "InterfaceDeclaration_IProvideFluidDataStoreFactory": {
242
- "backCompat": false,
243
- "forwardCompat": false
244
- },
245
- "InterfaceDeclaration_IProvideFluidDataStoreRegistry": {
246
- "backCompat": false,
247
- "forwardCompat": false
248
- },
249
- "TypeAliasDeclaration_NamedFluidDataStoreRegistryEntries": {
250
- "backCompat": false,
251
- "forwardCompat": false
252
- },
253
- "TypeAliasDeclaration_NamedFluidDataStoreRegistryEntry": {
254
- "backCompat": false,
255
- "forwardCompat": false
256
- }
257
- },
258
- "0.55.0": {
259
- "TypeAliasDeclaration_FluidDataStoreRegistryEntry": {
260
- "backCompat": false,
261
- "forwardCompat": false
262
- },
263
- "InterfaceDeclaration_IContainerRuntimeBase": {
264
- "backCompat": false,
265
- "forwardCompat": false
266
- },
267
- "InterfaceDeclaration_IFluidDataStoreContext": {
268
- "backCompat": false,
269
- "forwardCompat": false
270
- },
271
- "InterfaceDeclaration_IFluidDataStoreContextDetached": {
272
- "backCompat": false,
273
- "forwardCompat": false
274
- },
275
- "InterfaceDeclaration_IFluidDataStoreFactory": {
276
- "backCompat": false,
277
- "forwardCompat": false
278
- },
279
- "InterfaceDeclaration_IFluidDataStoreRegistry": {
280
- "backCompat": false,
281
- "forwardCompat": false
282
- },
283
- "InterfaceDeclaration_IProvideFluidDataStoreFactory": {
284
- "backCompat": false,
285
- "forwardCompat": false
286
- },
287
- "InterfaceDeclaration_IProvideFluidDataStoreRegistry": {
288
- "backCompat": false,
289
- "forwardCompat": false
290
- },
291
- "TypeAliasDeclaration_NamedFluidDataStoreRegistryEntries": {
292
- "backCompat": false,
293
- "forwardCompat": false
294
- },
295
- "TypeAliasDeclaration_NamedFluidDataStoreRegistryEntry": {
296
- "backCompat": false,
297
- "forwardCompat": false
298
- }
299
- },
300
- "0.56.0": {
301
- "InterfaceDeclaration_IContainerRuntimeBase": {
302
- "backCompat": false,
303
- "forwardCompat": false
304
- },
305
- "InterfaceDeclaration_IFluidDataStoreContext": {
306
- "backCompat": false,
307
- "forwardCompat": false
308
- },
309
- "InterfaceDeclaration_IFluidDataStoreContextDetached": {
310
- "backCompat": false,
311
- "forwardCompat": false
312
- },
313
- "TypeAliasDeclaration_FluidDataStoreRegistryEntry": {
314
- "backCompat": false,
315
- "forwardCompat": false
316
- },
317
- "InterfaceDeclaration_IFluidDataStoreFactory": {
318
- "backCompat": false,
319
- "forwardCompat": false
320
- },
321
- "InterfaceDeclaration_IFluidDataStoreRegistry": {
322
- "backCompat": false,
323
- "forwardCompat": false
324
- },
325
- "InterfaceDeclaration_IProvideFluidDataStoreFactory": {
326
- "backCompat": false,
327
- "forwardCompat": false
328
- },
329
- "InterfaceDeclaration_IProvideFluidDataStoreRegistry": {
330
- "backCompat": false,
331
- "forwardCompat": false
332
- },
333
- "TypeAliasDeclaration_NamedFluidDataStoreRegistryEntries": {
334
- "backCompat": false,
335
- "forwardCompat": false
336
- },
337
- "TypeAliasDeclaration_NamedFluidDataStoreRegistryEntry": {
338
- "backCompat": false,
339
- "forwardCompat": false
340
- }
341
- },
342
- "0.57.0": {
343
- "InterfaceDeclaration_IContainerRuntimeBase": {
344
- "backCompat": false,
345
- "forwardCompat": false
346
- },
347
- "InterfaceDeclaration_IFluidDataStoreContext": {
348
- "backCompat": false,
349
- "forwardCompat": false
350
- },
351
- "InterfaceDeclaration_IFluidDataStoreContextDetached": {
352
- "backCompat": false,
353
- "forwardCompat": false
354
- },
355
- "TypeAliasDeclaration_FluidDataStoreRegistryEntry": {
356
- "backCompat": false,
357
- "forwardCompat": false
358
- },
359
- "InterfaceDeclaration_IFluidDataStoreFactory": {
360
- "backCompat": false,
361
- "forwardCompat": false
362
- },
363
- "InterfaceDeclaration_IFluidDataStoreRegistry": {
364
- "backCompat": false,
365
- "forwardCompat": false
366
- },
367
- "InterfaceDeclaration_IProvideFluidDataStoreFactory": {
368
- "backCompat": false,
369
- "forwardCompat": false
370
- },
371
- "InterfaceDeclaration_IProvideFluidDataStoreRegistry": {
372
- "backCompat": false,
373
- "forwardCompat": false
74
+ "backCompat": false
374
75
  },
375
- "TypeAliasDeclaration_NamedFluidDataStoreRegistryEntries": {
376
- "backCompat": false,
76
+ "TypeAliasDeclaration_InboundAttachMessage": {
377
77
  "forwardCompat": false
378
78
  },
379
- "TypeAliasDeclaration_NamedFluidDataStoreRegistryEntry": {
380
- "backCompat": false,
79
+ "TypeAliasDeclaration_CreateChildSummarizerNodeParam": {
381
80
  "forwardCompat": false
382
81
  }
383
82
  }
@@ -57,6 +57,32 @@ export enum FlushMode {
57
57
  TurnBased,
58
58
  }
59
59
 
60
+ /**
61
+ * This tells the visibility state of a Fluid object. It basically tracks whether the object is not visible, visible
62
+ * locally within the container only or visible globally to all clients.
63
+ */
64
+ export const VisibilityState = {
65
+ /** Indicates that the object is not visible. This is the state when an object is first created. */
66
+ NotVisible: "NotVisible",
67
+
68
+ /**
69
+ * Indicates that the object is visible locally within the container. This is the state when an object is attached
70
+ * to the container's graph but the container itself isn't globally visible. The object's state goes from not
71
+ * visible to locally visible.
72
+ */
73
+ LocallyVisible: "LocallyVisible",
74
+
75
+ /**
76
+ * Indicates that the object is visible globally to all clients. This is the state of an object in 2 scenarios:
77
+ * 1. It is attached to the container's graph when the container is globally visible. The object's state goes from
78
+ * not visible to globally visible.
79
+ * 2. When a container becomes globally visible, all locally visible objects go from locally visible to globally
80
+ * visible.
81
+ */
82
+ GloballyVisible: "GloballyVisible",
83
+ };
84
+ export type VisibilityState = typeof VisibilityState[keyof typeof VisibilityState];
85
+
60
86
  export interface IContainerRuntimeBaseEvents extends IEvent{
61
87
  (event: "batchBegin" | "op", listener: (op: ISequencedDocumentMessage) => void);
62
88
  (event: "batchEnd", listener: (error: any, op: ISequencedDocumentMessage) => void);
@@ -101,6 +127,7 @@ export interface IContainerRuntimeBase extends
101
127
 
102
128
  /**
103
129
  * Sets the flush mode for operations on the document.
130
+ * @deprecated - Will be removed in 0.60. See #9480.
104
131
  */
105
132
  setFlushMode(mode: FlushMode): void;
106
133
 
@@ -179,18 +206,27 @@ export interface IFluidDataStoreChannel extends
179
206
  */
180
207
  readonly attachState: AttachState;
181
208
 
209
+ readonly visibilityState?: VisibilityState;
210
+
182
211
  /**
183
212
  * @deprecated - This is an internal method that should not be exposed.
184
213
  * Called to bind the runtime to the container.
185
214
  * If the container is not attached to storage, then this would also be unknown to other clients.
186
215
  */
187
- bindToContext(): void;
216
+ bindToContext(): void;
188
217
 
189
218
  /**
219
+ * @deprecated - This will be removed in favor of makeVisibleAndAttachGraph.
190
220
  * Runs through the graph and attaches the bound handles. Then binds this runtime to the container.
191
221
  */
192
222
  attachGraph(): void;
193
223
 
224
+ /**
225
+ * Makes the data store channel visible in the container. Also, runs through its graph and attaches all
226
+ * bound handles that represent its dependencies in the container's graph.
227
+ */
228
+ makeVisibleAndAttachGraph?(): void;
229
+
194
230
  /**
195
231
  * Retrieves the summary used as part of the initial summary message
196
232
  */
@@ -334,13 +370,20 @@ export interface IFluidDataStoreContext extends
334
370
  submitSignal(type: string, content: any): void;
335
371
 
336
372
  /**
373
+ * @deprecated - To be removed in favor of makeVisible.
337
374
  * Register the runtime to the container
338
375
  */
339
376
  bindToContext(): void;
340
377
 
378
+ /**
379
+ * Called to make the data store locally visible in the container. This happens automatically for root data stores
380
+ * when they are marked as root. For non-root data stores, this happens when their handle is added to a visible DDS.
381
+ */
382
+ makeLocallyVisible?(): void;
383
+
341
384
  /**
342
385
  * Call by IFluidDataStoreChannel, indicates that a channel is dirty and needs to be part of the summary.
343
- * @param address - The address of the channe that is dirty.
386
+ * @param address - The address of the channel that is dirty.
344
387
  */
345
388
  setChannelDirty(address: string): void;
346
389