@fluidframework/runtime-definitions 2.70.0-360753 → 2.70.0-361248

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.
@@ -44,7 +44,7 @@ export declare enum FlushModeExperimental {
44
44
  * This feature requires a version of the loader which supports reference sequence numbers. If an older version of
45
45
  * the loader is used, the runtime will fall back on FlushMode.TurnBased.
46
46
  *
47
- * @experimental - Not ready for use
47
+ * @experimental Not ready for use
48
48
  */
49
49
  Async = 2
50
50
  }
@@ -36,7 +36,7 @@ var FlushModeExperimental;
36
36
  * This feature requires a version of the loader which supports reference sequence numbers. If an older version of
37
37
  * the loader is used, the runtime will fall back on FlushMode.TurnBased.
38
38
  *
39
- * @experimental - Not ready for use
39
+ * @experimental Not ready for use
40
40
  */
41
41
  FlushModeExperimental[FlushModeExperimental["Async"] = 2] = "Async";
42
42
  })(FlushModeExperimental || (exports.FlushModeExperimental = FlushModeExperimental = {}));
@@ -1 +1 @@
1
- {"version":3,"file":"dataStoreContext.js","sourceRoot":"","sources":["../src/dataStoreContext.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAiDH;;;GAGG;AACH,IAAY,SAcX;AAdD,WAAY,SAAS;IACpB;;;;;OAKG;IACH,mDAAS,CAAA;IAET;;;OAGG;IACH,mDAAS,CAAA;AACV,CAAC,EAdW,SAAS,yBAAT,SAAS,QAcpB;AAED;;GAEG;AACH,IAAY,qBAWX;AAXD,WAAY,qBAAqB;IAChC;;;;;;;;OAQG;IACH,mEAAS,CAAA;AACV,CAAC,EAXW,qBAAqB,qCAArB,qBAAqB,QAWhC;AAED;;;;GAIG;AACU,QAAA,eAAe,GAAG;IAC9B;;OAEG;IACH,UAAU,EAAE,YAAY;IAExB;;;;OAIG;IACH,cAAc,EAAE,gBAAgB;IAEhC;;;;;;;;OAQG;IACH,eAAe,EAAE,iBAAiB;CAClC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { AttachState, IAudience } from \"@fluidframework/container-definitions\";\nimport type { IDeltaManager } from \"@fluidframework/container-definitions/internal\";\nimport type {\n\tFluidObject,\n\tIDisposable,\n\tIEvent,\n\tIEventProvider,\n\tIFluidHandle,\n\tIRequest,\n\tIResponse,\n\tITelemetryBaseLogger,\n} from \"@fluidframework/core-interfaces\";\nimport type {\n\tIFluidHandleInternal,\n\tIProvideFluidHandleContext,\n} from \"@fluidframework/core-interfaces/internal\";\nimport type { IClientDetails, IQuorumClients } from \"@fluidframework/driver-definitions\";\nimport type {\n\tIDocumentMessage,\n\tISnapshotTree,\n\tISequencedDocumentMessage,\n} from \"@fluidframework/driver-definitions/internal\";\nimport type { IIdCompressor } from \"@fluidframework/id-compressor\";\n\nimport type { MinimumVersionForCollab } from \"./compatibilityDefinitions.js\";\nimport type {\n\tIFluidDataStoreFactory,\n\tIProvideFluidDataStoreFactory,\n} from \"./dataStoreFactory.js\";\nimport type { IProvideFluidDataStoreRegistry } from \"./dataStoreRegistry.js\";\nimport type {\n\tIGarbageCollectionData,\n\tIGarbageCollectionDetailsBase,\n} from \"./garbageCollectionDefinitions.js\";\nimport type {\n\tIInboundSignalMessage,\n\tIRuntimeMessageCollection,\n\tIRuntimeStorageService,\n} from \"./protocol.js\";\nimport type {\n\tCreateChildSummarizerNodeParam,\n\tISummarizerNodeWithGC,\n\tISummaryTreeWithStats,\n\tITelemetryContext,\n\tSummarizeInternalFn,\n} from \"./summary.js\";\n\n/**\n * Runtime flush mode handling\n * @legacy @beta\n */\nexport enum FlushMode {\n\t/**\n\t * In Immediate flush mode the runtime will immediately send all operations to the driver layer.\n\t *\n\t * @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.\n\t * See https://github.com/microsoft/FluidFramework/tree/main/packages/runtime/container-runtime/src/opLifecycle#how-batching-works\n\t */\n\tImmediate,\n\n\t/**\n\t * When in TurnBased flush mode the runtime will buffer operations in the current turn and send them as a single\n\t * batch at the end of the turn. The flush call on the runtime can be used to force send the current batch.\n\t */\n\tTurnBased,\n}\n\n/**\n * @internal\n */\nexport enum FlushModeExperimental {\n\t/**\n\t * When in Async flush mode, the runtime will accumulate all operations across JS turns and send them as a single\n\t * batch when all micro-tasks are complete.\n\t *\n\t * This feature requires a version of the loader which supports reference sequence numbers. If an older version of\n\t * the loader is used, the runtime will fall back on FlushMode.TurnBased.\n\t *\n\t * @experimental - Not ready for use\n\t */\n\tAsync = 2,\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 * @legacy @beta\n */\nexport const VisibilityState = {\n\t/**\n\t * Indicates that the object is not visible. This is the state when an object is first created.\n\t */\n\tNotVisible: \"NotVisible\",\n\n\t/**\n\t * Indicates that the object is visible locally within the container. This is the state when an object is attached\n\t * to the container's graph but the container itself isn't globally visible. The object's state goes from not\n\t * visible to locally visible.\n\t */\n\tLocallyVisible: \"LocallyVisible\",\n\n\t/**\n\t * Indicates that the object is visible globally to all clients. This is the state of an object in 2 scenarios:\n\t *\n\t * 1. It is attached to the container's graph when the container is globally visible. The object's state goes from\n\t * not visible to globally visible.\n\t *\n\t * 2. When a container becomes globally visible, all locally visible objects go from locally visible to globally\n\t * visible.\n\t */\n\tGloballyVisible: \"GloballyVisible\",\n};\n/**\n * @legacy @beta\n */\nexport type VisibilityState = (typeof VisibilityState)[keyof typeof VisibilityState];\n\n/**\n * @legacy @beta\n * @sealed\n */\nexport interface IContainerRuntimeBaseEvents extends IEvent {\n\t/**\n\t * Indicates the beginning of an incoming batch of ops\n\t * @param op - The first op in the batch. Can be inspected to learn about the sequence numbers relevant for this batch.\n\t */\n\t(event: \"batchBegin\", listener: (op: Omit<ISequencedDocumentMessage, \"contents\">) => void);\n\t/**\n\t * Indicates the end of an incoming batch of ops\n\t * @param error - If an error occurred while processing the batch, it is provided here.\n\t * @param op - The last op in the batch. Can be inspected to learn about the sequence numbers relevant for this batch.\n\t */\n\t(\n\t\tevent: \"batchEnd\",\n\t\tlistener: (error: unknown, op: Omit<ISequencedDocumentMessage, \"contents\">) => void,\n\t);\n\t/**\n\t * Indicates that an incoming op has been processed.\n\t * @param runtimeMessage - tells if op is runtime op. If it is, it was unpacked, i.e. its type and content\n\t * represent internal container runtime type / content. i.e. A grouped batch of N ops will result in N \"op\" events\n\t */\n\t(event: \"op\", listener: (op: ISequencedDocumentMessage, runtimeMessage?: boolean) => void);\n\t(event: \"signal\", listener: (message: IInboundSignalMessage, local: boolean) => void);\n\t(event: \"dispose\", listener: () => void);\n}\n\n/**\n * Encapsulates the return codes of the aliasing API.\n *\n * 'Success' - the datastore has been successfully aliased. It can now be used.\n *\n * 'Conflict' - there is already a datastore bound to the provided alias. To acquire it's entry point, use\n * the `IContainerRuntime.getAliasedDataStoreEntryPoint` function. The current datastore should be discarded\n * and will be garbage collected. The current datastore cannot be aliased to a different value.\n *\n * 'AlreadyAliased' - the datastore has already been previously bound to another alias name.\n * @legacy @beta\n */\nexport type AliasResult = \"Success\" | \"Conflict\" | \"AlreadyAliased\";\n\n/**\n * Exposes some functionality/features of a data store:\n *\n * - Handle to the data store's entryPoint\n *\n * - Fluid router for the data store\n *\n * - Can be assigned an alias\n *\n * @privateRemarks\n * TODO: These docs should define what a \"data store\" is, and not do so by just referencing \"data store\".\n *\n * @legacy @beta\n */\nexport interface IDataStore {\n\t/**\n\t * Attempt to assign an alias to the datastore.\n\t * If the operation succeeds, the datastore can be referenced\n\t * by the supplied alias and will not be garbage collected.\n\t *\n\t * @param alias - Given alias for this datastore.\n\t * @returns A promise with the {@link AliasResult}\n\t */\n\ttrySetAlias(alias: string): Promise<AliasResult>;\n\n\t/**\n\t * Exposes a handle to the root object / entryPoint of the data store. Use this as the primary way of interacting\n\t * with it.\n\t */\n\treadonly entryPoint: IFluidHandleInternal<FluidObject>;\n}\n\n/**\n * A reduced set of functionality of {@link @fluidframework/container-runtime-definitions#IContainerRuntime} that a data store context/data store runtime will need.\n * @privateRemarks\n * TODO: this should be merged into IFluidDataStoreContext\n * @legacy @beta\n * @sealed\n */\nexport interface IContainerRuntimeBase extends IEventProvider<IContainerRuntimeBaseEvents> {\n\treadonly baseLogger: ITelemetryBaseLogger;\n\treadonly clientDetails: IClientDetails;\n\treadonly disposed: boolean;\n\n\t/**\n\t * Invokes the given callback and guarantees that all operations generated within the callback will be ordered\n\t * sequentially.\n\t *\n\t * If the callback throws an error, the container will close and the error will be logged.\n\t *\n\t * @remarks\n\t * `orderSequentially` may enter staging mode for the duration of the function. This is necessary for rolling back certain op types.\n\t */\n\torderSequentially(callback: () => void): void;\n\n\t/**\n\t * Submits a container runtime level signal to be sent to other clients.\n\t * @param type - Type of the signal.\n\t * @param content - Content of the signal. Should be a JSON serializable object or primitive.\n\t * @param targetClientId - When specified, the signal is only sent to the provided client id.\n\t */\n\tsubmitSignal: (type: string, content: unknown, targetClientId?: string) => void;\n\n\t/**\n\t * Creates a data store and returns an object that exposes a handle to the data store's entryPoint, and also serves\n\t * as the data store's router. The data store is not bound to a container, and in such state is not persisted to\n\t * storage (file). Storing the entryPoint handle (or any other handle inside the data store, e.g. for DDS) into an\n\t * already attached DDS (or non-attached DDS that will eventually get attached to storage) will result in this\n\t * store being attached to storage.\n\t * @param pkg - Package name of the data store factory\n\t * @param loadingGroupId - This represents the group of the datastore within a container or its snapshot.\n\t * When not specified the datastore will belong to a `default` group. Read more about it in this\n\t * {@link https://github.com/microsoft/FluidFramework/blob/main/packages/runtime/container-runtime/README.md | README}\n\t */\n\tcreateDataStore(pkg: string | PackagePath, loadingGroupId?: string): Promise<IDataStore>;\n\n\t/**\n\t * Creates detached data store context. Only after context.attachRuntime() is called,\n\t * data store initialization is considered complete.\n\t * @param pkg - Package name of the data store factory\n\t * @param loadingGroupId - This represents the group of the datastore within a container or its snapshot.\n\t * When not specified the datastore will belong to a `default` group. Read more about it in this\n\t * {@link https://github.com/microsoft/FluidFramework/blob/main/packages/runtime/container-runtime/README.md | README}.\n\t */\n\tcreateDetachedDataStore(\n\t\tpkg: readonly string[],\n\t\tloadingGroupId?: string,\n\t): IFluidDataStoreContextDetached;\n\n\t/**\n\t * Returns the aliased data store's entryPoint, given the alias.\n\t * @param alias - The alias for the data store.\n\t * @returns The data store's entry point ({@link @fluidframework/core-interfaces#IFluidHandle}) if it exists and is aliased.\n\t * Returns undefined if no data store has been assigned the given alias.\n\t */\n\tgetAliasedDataStoreEntryPoint(alias: string): Promise<IFluidHandle<FluidObject> | undefined>;\n\n\t/**\n\t * Get an absolute url for a provided container-relative request.\n\t * Returns undefined if the container or data store isn't attached to storage.\n\t * @param relativeUrl - A relative request within the container\n\t */\n\tgetAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;\n\n\tuploadBlob(\n\t\tblob: ArrayBufferLike,\n\t\tsignal?: AbortSignal,\n\t): Promise<IFluidHandle<ArrayBufferLike>>;\n\n\t/**\n\t * Returns the current quorum.\n\t */\n\tgetQuorum(): IQuorumClients;\n\n\t/**\n\t * Returns the current audience.\n\t */\n\tgetAudience(): IAudience;\n\n\t/**\n\t * Generates a new ID that is guaranteed to be unique across all sessions for this container.\n\t * It could be in compact form (non-negative integer, opportunistic), but it could also be UUID string.\n\t * UUIDs generated will have low entropy in groups and will compress well.\n\t * It can be leveraged anywhere in container where container unique IDs are required, i.e. any place\n\t * that uses uuid() and stores result in container is likely candidate to start leveraging this API.\n\t * If you always want to convert to string, instead of doing String(generateDocumentUniqueId()), consider\n\t * doing encodeCompactIdToString(generateDocumentUniqueId()).\n\t *\n\t * @see {@link @fluidframework/id-compressor#IIdCompressor.generateDocumentUniqueId}\n\t */\n\tgenerateDocumentUniqueId(): number | string;\n\n\t/**\n\t * Api to fetch the snapshot from the service for a loadingGroupIds.\n\t * @param loadingGroupIds - LoadingGroupId for which the snapshot is asked for.\n\t * @param pathParts - Parts of the path, which we want to extract from the snapshot tree.\n\t * @returns snapshotTree and the sequence number of the snapshot.\n\t */\n\tgetSnapshotForLoadingGroupId(\n\t\tloadingGroupIds: string[],\n\t\tpathParts: string[],\n\t): Promise<{ snapshotTree: ISnapshotTree; sequenceNumber: number }>;\n}\n\n/**\n * These policies can be set by the author of the data store via its data store runtime to influence behaviors.\n *\n * @remarks\n * Policies allow data store authors to define specific behaviors or constraints for their data stores.\n * These settings can impact how the data store interacts with the runtime and other components.\n *\n * @legacy @beta\n */\nexport interface IFluidDataStorePolicies {\n\t/**\n\t * When set to true, data stores will appear to be readonly while in staging mode.\n\t *\n\t * @remarks\n\t * This policy is useful for data stores that do not support staging mode, such as those using consensus DDS.\n\t * It ensures that the data store appears readonly during staging mode to discourage unsupported operations.\n\t */\n\treadonly readonlyInStagingMode: boolean;\n}\n\n/**\n * Minimal interface a data store runtime needs to provide for IFluidDataStoreContext to bind to control.\n *\n * Functionality include attach, snapshot, op/signal processing, request routes, expose an entryPoint,\n * and connection state notifications\n * @legacy @beta\n */\nexport interface IFluidDataStoreChannel extends IDisposable {\n\t/**\n\t * Optional policies that the data store channel may adhere to that the data store context should know about.\n\t * These policies influence the behavior of the data store, such as its readonly state in specific modes.\n\t */\n\treadonly policies?: IFluidDataStorePolicies;\n\n\t/**\n\t * Makes the data store channel visible in the container. Also, runs through its graph and attaches all\n\t * bound handles that represent its dependencies in the container's graph.\n\t */\n\tmakeVisibleAndAttachGraph(): void;\n\n\t/**\n\t * Synchronously retrieves the summary used as part of the initial summary message\n\t */\n\tgetAttachSummary(telemetryContext?: ITelemetryContext): ISummaryTreeWithStats;\n\n\t/**\n\t * Synchronously retrieves GC Data (representing the outbound routes present) for the initial state of the DataStore\n\t */\n\tgetAttachGCData(telemetryContext?: ITelemetryContext): IGarbageCollectionData;\n\n\t/**\n\t * Process messages for this channel. The messages here are contiguous messages in a batch.\n\t * @param messageCollection - The collection of messages to process.\n\t */\n\tprocessMessages(messageCollection: IRuntimeMessageCollection): void;\n\n\t/**\n\t * Processes the signal.\n\t */\n\tprocessSignal(message: IInboundSignalMessage, local: boolean): void;\n\n\t/**\n\t * Generates a summary for the channel.\n\t * Introduced with summarizerNode - will be required in a future release.\n\t * @param fullTree - true to bypass optimizations and force a full summary tree.\n\t * @param trackState - This tells whether we should track state from this summary.\n\t * @param telemetryContext - summary data passed through the layers for telemetry purposes\n\t */\n\tsummarize(\n\t\tfullTree?: boolean,\n\t\ttrackState?: boolean,\n\t\ttelemetryContext?: ITelemetryContext,\n\t): Promise<ISummaryTreeWithStats>;\n\n\t/**\n\t * Returns the data used for garbage collection. This includes a list of GC nodes that represent this context\n\t * including any of its children. Each node has a list of outbound routes to other GC nodes in the document.\n\t * @param fullGC - true to bypass optimizations and force full generation of GC data.\n\t */\n\tgetGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;\n\n\t/**\n\t * After GC has run, called to notify this channel of routes that are used in it.\n\t * @param usedRoutes - The routes that are used in this channel.\n\t */\n\tupdateUsedRoutes(usedRoutes: string[]): void;\n\n\t/**\n\t * Notifies this object about changes in the connection state.\n\t * @param value - New connection state.\n\t * @param clientId - ID of the client. It's old ID when in disconnected state and\n\t * it's new client ID when we are connecting or connected.\n\t */\n\tsetConnectionState(connected: boolean, clientId?: string);\n\n\t/**\n\t * Notifies this object about changes in the readonly state\n\t */\n\tnotifyReadOnlyState?(readonly: boolean): void;\n\n\t/**\n\t * Ask the DDS to resubmit a message. This can happen for several reasons, such as:\n\t *\n\t * - We reconnected and discovered the original message was never acked.\n\t * - The original message was submitted from a reentrant state that is impossible for other clients to interpret correctly\n\t * - The original message was never sent on the wire and subsequent ops have been inbounded\n\t * @param type - The type of the original message.\n\t * @param content - The content of the original message.\n\t * @param localOpMetadata - The local metadata associated with the original message.\n\t * @param squash - If true, the DDS should avoid resubmitting any \"unnecessary intermediate state\" created by this message.\n\t * This includes any content which this message created but has since been changed or removed by subsequent messages.\n\t * For example, if this message (call it A) inserts content into a DDS that a subsequent op (call it B) removes,\n\t * resubmission of this message (call it A') should avoid inserting that content, and resubmission of the subsequent op that removed it (B') would\n\t * account for the fact that A' never inserted content.\n\t *\n\t * @privateRemarks\n\t * See remarks about squashing contract on `CommitStagedChangesOptionsExperimental`.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO (#28746): breaking change\n\treSubmit(type: string, content: any, localOpMetadata: unknown, squash?: boolean);\n\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO (#28746): breaking change\n\tapplyStashedOp(content: any): Promise<unknown>;\n\n\t/**\n\t * Revert a local message.\n\t * @param type - The type of the original message.\n\t * @param content - The content of the original message.\n\t * @param localOpMetadata - The local metadata associated with the original message.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO (#28746): breaking change\n\trollback?(type: string, content: any, localOpMetadata: unknown): void;\n\n\t/**\n\t * Exposes a handle to the root object / entryPoint of the component. Use this as the primary way of interacting\n\t * with the component.\n\t */\n\treadonly entryPoint: IFluidHandleInternal<FluidObject>;\n\n\trequest(request: IRequest): Promise<IResponse>;\n\n\tsetAttachState(attachState: AttachState.Attaching | AttachState.Attached): void;\n}\n\n/**\n * @legacy @beta\n */\nexport type CreateChildSummarizerNodeFn = (\n\tsummarizeInternal: SummarizeInternalFn,\n\tgetGCDataFn: (fullGC?: boolean) => Promise<IGarbageCollectionData>,\n\t/**\n\t * @deprecated The functionality to get base GC details has been moved to summarizer node.\n\t */\n\tgetBaseGCDetailsFn?: () => Promise<IGarbageCollectionDetailsBase>,\n) => ISummarizerNodeWithGC;\n\n/**\n * The state maintained for messages that are received when a channel isn't yet loaded.\n * @internal\n */\nexport interface IPendingMessagesState {\n\tmessageCollections: IRuntimeMessageCollection[];\n\tpendingCount: number;\n}\n\n/**\n * Context for an {@link IDataStore} like object.\n * @remarks\n * This context does NOT represent common information provided to all channels under a specific parent.\n * Each implementation of {@link IFluidDataStoreChannel} will receive its own instance of this context that contains specifically the data it needs.\n *\n * This layout is temporary, as {@link IFluidParentContext} and {@link IFluidDataStoreContext} will converge.\n * Therefore the semantics of these two interfaces is not really distinct.\n *\n * @privateRemarks\n * In addition to the use for datastores via IFluidDataStoreContext, this is implemented by ContainerRuntime to provide context to the ChannelCollection.\n *\n * @legacy @beta\n */\nexport interface IFluidParentContext\n\textends IProvideFluidHandleContext,\n\t\tPartial<IProvideFluidDataStoreRegistry> {\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO (#28746): breaking change\n\treadonly options: Record<string | number, any>;\n\treadonly clientId: string | undefined;\n\treadonly connected: boolean;\n\t/**\n\t * Indicates if the parent context is readonly. If isReadOnly is true, the consumer of\n\t * the context should also consider themselves readonly.\n\t */\n\treadonly isReadOnly?: () => boolean;\n\t/**\n\t * Minimum version of the FF runtime that is required to collaborate on new documents.\n\t * Consumed by {@link @fluidframework/container-runtime#FluidDataStoreContext}.\n\t * See {@link @fluidframework/container-runtime#LoadContainerRuntimeParams.minVersionForCollab} for more details.\n\t */\n\treadonly minVersionForCollab?: MinimumVersionForCollab;\n\treadonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n\treadonly storage: IRuntimeStorageService;\n\treadonly baseLogger: ITelemetryBaseLogger;\n\treadonly clientDetails: IClientDetails;\n\treadonly idCompressor?: IIdCompressor;\n\t/**\n\t * Represents the loading group to which the data store belongs to. Please refer to this readme for more context.\n\t * {@link https://github.com/microsoft/FluidFramework/blob/main/packages/runtime/container-runtime/README.md | README}\n\t */\n\treadonly loadingGroupId?: string;\n\t/**\n\t * Indicates the attachment state of the data store to a host service.\n\t */\n\treadonly attachState: AttachState;\n\n\treadonly containerRuntime: IContainerRuntimeBase;\n\n\t/**\n\t * Ambient services provided with the context\n\t */\n\treadonly scope: FluidObject;\n\n\t/**\n\t * @deprecated this functionality has been removed.\n\t */\n\treadonly gcThrowOnTombstoneUsage: boolean;\n\t/**\n\t * @deprecated this functionality has been removed.\n\t */\n\treadonly gcTombstoneEnforcementAllowed: boolean;\n\n\t/**\n\t * Returns the current quorum.\n\t */\n\tgetQuorum(): IQuorumClients;\n\n\t/**\n\t * Returns the current audience.\n\t */\n\tgetAudience(): IAudience;\n\n\t/**\n\t * Submits the message to be sent to other clients.\n\t * @param type - Type of the message.\n\t * @param content - Content of the message.\n\t * @param localOpMetadata - The local metadata associated with the message. This is kept locally and not sent to\n\t * the server. This will be sent back when this message is received back from the server. This is also sent if\n\t * we are asked to resubmit the message.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO (#28746): breaking change\n\tsubmitMessage(type: string, content: any, localOpMetadata: unknown): void;\n\n\t/**\n\t * Submits the signal to be sent to other clients.\n\t * @param type - Type of the signal.\n\t * @param content - Content of the signal. Should be an {@link IEnvelope} with `contents` that is a JSON\n\t * serializable object or primitive.\n\t * @param targetClientId - When specified, the signal is only sent to the provided client id.\n\t */\n\tsubmitSignal: (type: string, content: unknown, targetClientId?: string) => void;\n\n\t/**\n\t * Called to make the data store locally visible in the container. This happens automatically for root data stores\n\t * when they are marked as root. For non-root data stores, this happens when their handle is added to a visible DDS.\n\t */\n\tmakeLocallyVisible(): void;\n\n\t/**\n\t * Get an absolute url to the container based on the provided relativeUrl.\n\t * Returns undefined if the container or data store isn't attached to storage.\n\t * @param relativeUrl - A relative request within the container\n\t */\n\tgetAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;\n\n\tgetCreateChildSummarizerNodeFn(\n\t\t/**\n\t\t * Initial id or path part of this node\n\t\t */\n\t\tid: string,\n\t\t/**\n\t\t * Information needed to create the node.\n\t\t * If it is from a base summary, it will assert that a summary has been seen.\n\t\t * Attach information if it is created from an attach op.\n\t\t * If it is local, it will throw unsupported errors on calls to summarize.\n\t\t */\n\t\tcreateParam: CreateChildSummarizerNodeParam,\n\t): CreateChildSummarizerNodeFn;\n\n\tdeleteChildSummarizerNode(id: string): void;\n\n\tuploadBlob(\n\t\tblob: ArrayBufferLike,\n\t\tsignal?: AbortSignal,\n\t): Promise<IFluidHandleInternal<ArrayBufferLike>>;\n\n\t/**\n\t * Called by IFluidDataStoreChannel, indicates that a channel is dirty and needs to be part of the summary.\n\t * @param address - The address of the channel that is dirty.\n\t */\n\tsetChannelDirty(address: string): void;\n\n\t/**\n\t * Called when a new outbound reference is added to another node. This is used by garbage collection to identify\n\t * all references added in the system.\n\t *\n\t * @param fromPath - The absolute path of the node that added the reference.\n\t * @param toPath - The absolute path of the outbound node that is referenced.\n\t * @param messageTimestampMs - The timestamp of the message that added the reference.\n\t */\n\taddedGCOutboundRoute(fromPath: string, toPath: string, messageTimestampMs?: number): void;\n}\n\n/**\n * A path which selects a {@link (IFluidDataStoreFactory:interface)} within a hierarchial registry.\n * @remarks\n * Each string in the array is the \"identifier\" to pick a specific {@link NamedFluidDataStoreRegistryEntry2} within a {@link NamedFluidDataStoreRegistryEntries}.\n *\n * Due to some usages joining this array with \"/\", it is recommended to avoid using \"/\" in the strings.\n * @legacy @beta\n */\nexport type PackagePath = readonly string[];\n\n/**\n * Extension to {@link IFluidParentContext} specifically for {@link IDataStore}s.\n *\n * @remarks\n * This context is provided to the implementation of {@link IFluidDataStoreChannel} which powers the datastore.\n *\n * @legacy @beta\n */\nexport interface IFluidDataStoreContext extends IFluidParentContext {\n\treadonly id: string;\n\t/**\n\t * A data store created by a client, is a local data store for that client. Also, when a detached container loads\n\t * from a snapshot, all the data stores are treated as local data stores because at that stage the container\n\t * still doesn't exists in storage and so the data store couldn't have been created by any other client.\n\t * Value of this never changes even after the data store is attached.\n\t * As implementer of data store runtime, you can use this property to check that this data store belongs to this\n\t * client and hence implement any scenario based on that.\n\t */\n\treadonly isLocalDataStore: boolean;\n\t/**\n\t * The {@link PackagePath} of the data store as per the package factory.\n\t * @remarks\n\t * This defines what {@link (IFluidDataStoreFactory:interface)} would be used to create the {@link IDataStore.entryPoint} of the {@link IDataStore}.\n\t */\n\treadonly packagePath: PackagePath;\n\treadonly baseSnapshot: ISnapshotTree | undefined;\n\n\t/**\n\t * @deprecated 0.16 Issue #1635, #3631\n\t */\n\t// Seems like this can be removed now; the issues mentioned in the @deprecated tag are about _createDataStoreWithProps\n\t// which we finally removed in FF 2.20 (https://github.com/microsoft/FluidFramework/pull/22996).\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO (#28746): breaking change\n\treadonly createProps?: any;\n\n\t/**\n\t * @deprecated The functionality to get base GC details has been moved to summarizer node.\n\t *\n\t * Returns the GC details in the initial summary of this data store. This is used to initialize the data store\n\t * and its children with the GC details from the previous summary.\n\t */\n\tgetBaseGCDetails(): Promise<IGarbageCollectionDetailsBase>;\n\n\t/**\n\t * Synchronously creates a detached child data store.\n\t *\n\t * The `createChildDataStore` method allows for the synchronous creation of a detached child data store. This is particularly\n\t * useful in scenarios where immediate availability of the child data store is required, such as during the initialization\n\t * of a parent data store, or when creation is in response to synchronous user input.\n\t *\n\t * In order for this function to succeed:\n\t * 1. The parent data store's factory must also be an `IFluidDataStoreRegistry`.\n\t * 2. The parent data store's registry must include the same instance as the provided child factory.\n\t * 3. The parent data store's registry must synchronously provide the child factory via the `getSync` method.\n\t * 4. The child factory must implement the `createDataStore` method.\n\t *\n\t * These invariants ensure that the child data store can also be created by a remote client running the same code as this client.\n\t *\n\t * @param childFactory - The factory of the data store to be created.\n\t * @returns The created data store channel.\n\t */\n\tcreateChildDataStore?<T extends IFluidDataStoreFactory>(\n\t\tchildFactory: T,\n\t): ReturnType<Exclude<T[\"createDataStore\"], undefined>>;\n}\n\n/**\n * @legacy @beta\n */\nexport interface IFluidDataStoreContextDetached extends IFluidDataStoreContext {\n\t/**\n\t * Binds a runtime to the context.\n\t */\n\tattachRuntime(\n\t\tfactory: IProvideFluidDataStoreFactory,\n\t\tdataStoreRuntime: IFluidDataStoreChannel,\n\t): Promise<IDataStore>;\n}\n"]}
1
+ {"version":3,"file":"dataStoreContext.js","sourceRoot":"","sources":["../src/dataStoreContext.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAiDH;;;GAGG;AACH,IAAY,SAcX;AAdD,WAAY,SAAS;IACpB;;;;;OAKG;IACH,mDAAS,CAAA;IAET;;;OAGG;IACH,mDAAS,CAAA;AACV,CAAC,EAdW,SAAS,yBAAT,SAAS,QAcpB;AAED;;GAEG;AACH,IAAY,qBAWX;AAXD,WAAY,qBAAqB;IAChC;;;;;;;;OAQG;IACH,mEAAS,CAAA;AACV,CAAC,EAXW,qBAAqB,qCAArB,qBAAqB,QAWhC;AAED;;;;GAIG;AACU,QAAA,eAAe,GAAG;IAC9B;;OAEG;IACH,UAAU,EAAE,YAAY;IAExB;;;;OAIG;IACH,cAAc,EAAE,gBAAgB;IAEhC;;;;;;;;OAQG;IACH,eAAe,EAAE,iBAAiB;CAClC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { AttachState, IAudience } from \"@fluidframework/container-definitions\";\nimport type { IDeltaManager } from \"@fluidframework/container-definitions/internal\";\nimport type {\n\tFluidObject,\n\tIDisposable,\n\tIEvent,\n\tIEventProvider,\n\tIFluidHandle,\n\tIRequest,\n\tIResponse,\n\tITelemetryBaseLogger,\n} from \"@fluidframework/core-interfaces\";\nimport type {\n\tIFluidHandleInternal,\n\tIProvideFluidHandleContext,\n} from \"@fluidframework/core-interfaces/internal\";\nimport type { IClientDetails, IQuorumClients } from \"@fluidframework/driver-definitions\";\nimport type {\n\tIDocumentMessage,\n\tISnapshotTree,\n\tISequencedDocumentMessage,\n} from \"@fluidframework/driver-definitions/internal\";\nimport type { IIdCompressor } from \"@fluidframework/id-compressor\";\n\nimport type { MinimumVersionForCollab } from \"./compatibilityDefinitions.js\";\nimport type {\n\tIFluidDataStoreFactory,\n\tIProvideFluidDataStoreFactory,\n} from \"./dataStoreFactory.js\";\nimport type { IProvideFluidDataStoreRegistry } from \"./dataStoreRegistry.js\";\nimport type {\n\tIGarbageCollectionData,\n\tIGarbageCollectionDetailsBase,\n} from \"./garbageCollectionDefinitions.js\";\nimport type {\n\tIInboundSignalMessage,\n\tIRuntimeMessageCollection,\n\tIRuntimeStorageService,\n} from \"./protocol.js\";\nimport type {\n\tCreateChildSummarizerNodeParam,\n\tISummarizerNodeWithGC,\n\tISummaryTreeWithStats,\n\tITelemetryContext,\n\tSummarizeInternalFn,\n} from \"./summary.js\";\n\n/**\n * Runtime flush mode handling\n * @legacy @beta\n */\nexport enum FlushMode {\n\t/**\n\t * In Immediate flush mode the runtime will immediately send all operations to the driver layer.\n\t *\n\t * @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.\n\t * See https://github.com/microsoft/FluidFramework/tree/main/packages/runtime/container-runtime/src/opLifecycle#how-batching-works\n\t */\n\tImmediate,\n\n\t/**\n\t * When in TurnBased flush mode the runtime will buffer operations in the current turn and send them as a single\n\t * batch at the end of the turn. The flush call on the runtime can be used to force send the current batch.\n\t */\n\tTurnBased,\n}\n\n/**\n * @internal\n */\nexport enum FlushModeExperimental {\n\t/**\n\t * When in Async flush mode, the runtime will accumulate all operations across JS turns and send them as a single\n\t * batch when all micro-tasks are complete.\n\t *\n\t * This feature requires a version of the loader which supports reference sequence numbers. If an older version of\n\t * the loader is used, the runtime will fall back on FlushMode.TurnBased.\n\t *\n\t * @experimental Not ready for use\n\t */\n\tAsync = 2,\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 * @legacy @beta\n */\nexport const VisibilityState = {\n\t/**\n\t * Indicates that the object is not visible. This is the state when an object is first created.\n\t */\n\tNotVisible: \"NotVisible\",\n\n\t/**\n\t * Indicates that the object is visible locally within the container. This is the state when an object is attached\n\t * to the container's graph but the container itself isn't globally visible. The object's state goes from not\n\t * visible to locally visible.\n\t */\n\tLocallyVisible: \"LocallyVisible\",\n\n\t/**\n\t * Indicates that the object is visible globally to all clients. This is the state of an object in 2 scenarios:\n\t *\n\t * 1. It is attached to the container's graph when the container is globally visible. The object's state goes from\n\t * not visible to globally visible.\n\t *\n\t * 2. When a container becomes globally visible, all locally visible objects go from locally visible to globally\n\t * visible.\n\t */\n\tGloballyVisible: \"GloballyVisible\",\n};\n/**\n * @legacy @beta\n */\nexport type VisibilityState = (typeof VisibilityState)[keyof typeof VisibilityState];\n\n/**\n * @legacy @beta\n * @sealed\n */\nexport interface IContainerRuntimeBaseEvents extends IEvent {\n\t/**\n\t * Indicates the beginning of an incoming batch of ops\n\t * @param op - The first op in the batch. Can be inspected to learn about the sequence numbers relevant for this batch.\n\t */\n\t(event: \"batchBegin\", listener: (op: Omit<ISequencedDocumentMessage, \"contents\">) => void);\n\t/**\n\t * Indicates the end of an incoming batch of ops\n\t * @param error - If an error occurred while processing the batch, it is provided here.\n\t * @param op - The last op in the batch. Can be inspected to learn about the sequence numbers relevant for this batch.\n\t */\n\t(\n\t\tevent: \"batchEnd\",\n\t\tlistener: (error: unknown, op: Omit<ISequencedDocumentMessage, \"contents\">) => void,\n\t);\n\t/**\n\t * Indicates that an incoming op has been processed.\n\t * @param runtimeMessage - tells if op is runtime op. If it is, it was unpacked, i.e. its type and content\n\t * represent internal container runtime type / content. i.e. A grouped batch of N ops will result in N \"op\" events\n\t */\n\t(event: \"op\", listener: (op: ISequencedDocumentMessage, runtimeMessage?: boolean) => void);\n\t(event: \"signal\", listener: (message: IInboundSignalMessage, local: boolean) => void);\n\t(event: \"dispose\", listener: () => void);\n}\n\n/**\n * Encapsulates the return codes of the aliasing API.\n *\n * 'Success' - the datastore has been successfully aliased. It can now be used.\n *\n * 'Conflict' - there is already a datastore bound to the provided alias. To acquire it's entry point, use\n * the `IContainerRuntime.getAliasedDataStoreEntryPoint` function. The current datastore should be discarded\n * and will be garbage collected. The current datastore cannot be aliased to a different value.\n *\n * 'AlreadyAliased' - the datastore has already been previously bound to another alias name.\n * @legacy @beta\n */\nexport type AliasResult = \"Success\" | \"Conflict\" | \"AlreadyAliased\";\n\n/**\n * Exposes some functionality/features of a data store:\n *\n * - Handle to the data store's entryPoint\n *\n * - Fluid router for the data store\n *\n * - Can be assigned an alias\n *\n * @privateRemarks\n * TODO: These docs should define what a \"data store\" is, and not do so by just referencing \"data store\".\n *\n * @legacy @beta\n */\nexport interface IDataStore {\n\t/**\n\t * Attempt to assign an alias to the datastore.\n\t * If the operation succeeds, the datastore can be referenced\n\t * by the supplied alias and will not be garbage collected.\n\t *\n\t * @param alias - Given alias for this datastore.\n\t * @returns A promise with the {@link AliasResult}\n\t */\n\ttrySetAlias(alias: string): Promise<AliasResult>;\n\n\t/**\n\t * Exposes a handle to the root object / entryPoint of the data store. Use this as the primary way of interacting\n\t * with it.\n\t */\n\treadonly entryPoint: IFluidHandleInternal<FluidObject>;\n}\n\n/**\n * A reduced set of functionality of {@link @fluidframework/container-runtime-definitions#IContainerRuntime} that a data store context/data store runtime will need.\n * @privateRemarks\n * TODO: this should be merged into IFluidDataStoreContext\n * @legacy @beta\n * @sealed\n */\nexport interface IContainerRuntimeBase extends IEventProvider<IContainerRuntimeBaseEvents> {\n\treadonly baseLogger: ITelemetryBaseLogger;\n\treadonly clientDetails: IClientDetails;\n\treadonly disposed: boolean;\n\n\t/**\n\t * Invokes the given callback and guarantees that all operations generated within the callback will be ordered\n\t * sequentially.\n\t *\n\t * If the callback throws an error, the container will close and the error will be logged.\n\t *\n\t * @remarks\n\t * `orderSequentially` may enter staging mode for the duration of the function. This is necessary for rolling back certain op types.\n\t */\n\torderSequentially(callback: () => void): void;\n\n\t/**\n\t * Submits a container runtime level signal to be sent to other clients.\n\t * @param type - Type of the signal.\n\t * @param content - Content of the signal. Should be a JSON serializable object or primitive.\n\t * @param targetClientId - When specified, the signal is only sent to the provided client id.\n\t */\n\tsubmitSignal: (type: string, content: unknown, targetClientId?: string) => void;\n\n\t/**\n\t * Creates a data store and returns an object that exposes a handle to the data store's entryPoint, and also serves\n\t * as the data store's router. The data store is not bound to a container, and in such state is not persisted to\n\t * storage (file). Storing the entryPoint handle (or any other handle inside the data store, e.g. for DDS) into an\n\t * already attached DDS (or non-attached DDS that will eventually get attached to storage) will result in this\n\t * store being attached to storage.\n\t * @param pkg - Package name of the data store factory\n\t * @param loadingGroupId - This represents the group of the datastore within a container or its snapshot.\n\t * When not specified the datastore will belong to a `default` group. Read more about it in this\n\t * {@link https://github.com/microsoft/FluidFramework/blob/main/packages/runtime/container-runtime/README.md | README}\n\t */\n\tcreateDataStore(pkg: string | PackagePath, loadingGroupId?: string): Promise<IDataStore>;\n\n\t/**\n\t * Creates detached data store context. Only after context.attachRuntime() is called,\n\t * data store initialization is considered complete.\n\t * @param pkg - Package name of the data store factory\n\t * @param loadingGroupId - This represents the group of the datastore within a container or its snapshot.\n\t * When not specified the datastore will belong to a `default` group. Read more about it in this\n\t * {@link https://github.com/microsoft/FluidFramework/blob/main/packages/runtime/container-runtime/README.md | README}.\n\t */\n\tcreateDetachedDataStore(\n\t\tpkg: readonly string[],\n\t\tloadingGroupId?: string,\n\t): IFluidDataStoreContextDetached;\n\n\t/**\n\t * Returns the aliased data store's entryPoint, given the alias.\n\t * @param alias - The alias for the data store.\n\t * @returns The data store's entry point ({@link @fluidframework/core-interfaces#IFluidHandle}) if it exists and is aliased.\n\t * Returns undefined if no data store has been assigned the given alias.\n\t */\n\tgetAliasedDataStoreEntryPoint(alias: string): Promise<IFluidHandle<FluidObject> | undefined>;\n\n\t/**\n\t * Get an absolute url for a provided container-relative request.\n\t * Returns undefined if the container or data store isn't attached to storage.\n\t * @param relativeUrl - A relative request within the container\n\t */\n\tgetAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;\n\n\tuploadBlob(\n\t\tblob: ArrayBufferLike,\n\t\tsignal?: AbortSignal,\n\t): Promise<IFluidHandle<ArrayBufferLike>>;\n\n\t/**\n\t * Returns the current quorum.\n\t */\n\tgetQuorum(): IQuorumClients;\n\n\t/**\n\t * Returns the current audience.\n\t */\n\tgetAudience(): IAudience;\n\n\t/**\n\t * Generates a new ID that is guaranteed to be unique across all sessions for this container.\n\t * It could be in compact form (non-negative integer, opportunistic), but it could also be UUID string.\n\t * UUIDs generated will have low entropy in groups and will compress well.\n\t * It can be leveraged anywhere in container where container unique IDs are required, i.e. any place\n\t * that uses uuid() and stores result in container is likely candidate to start leveraging this API.\n\t * If you always want to convert to string, instead of doing String(generateDocumentUniqueId()), consider\n\t * doing encodeCompactIdToString(generateDocumentUniqueId()).\n\t *\n\t * @see {@link @fluidframework/id-compressor#IIdCompressor.generateDocumentUniqueId}\n\t */\n\tgenerateDocumentUniqueId(): number | string;\n\n\t/**\n\t * Api to fetch the snapshot from the service for a loadingGroupIds.\n\t * @param loadingGroupIds - LoadingGroupId for which the snapshot is asked for.\n\t * @param pathParts - Parts of the path, which we want to extract from the snapshot tree.\n\t * @returns snapshotTree and the sequence number of the snapshot.\n\t */\n\tgetSnapshotForLoadingGroupId(\n\t\tloadingGroupIds: string[],\n\t\tpathParts: string[],\n\t): Promise<{ snapshotTree: ISnapshotTree; sequenceNumber: number }>;\n}\n\n/**\n * These policies can be set by the author of the data store via its data store runtime to influence behaviors.\n *\n * @remarks\n * Policies allow data store authors to define specific behaviors or constraints for their data stores.\n * These settings can impact how the data store interacts with the runtime and other components.\n *\n * @legacy @beta\n */\nexport interface IFluidDataStorePolicies {\n\t/**\n\t * When set to true, data stores will appear to be readonly while in staging mode.\n\t *\n\t * @remarks\n\t * This policy is useful for data stores that do not support staging mode, such as those using consensus DDS.\n\t * It ensures that the data store appears readonly during staging mode to discourage unsupported operations.\n\t */\n\treadonly readonlyInStagingMode: boolean;\n}\n\n/**\n * Minimal interface a data store runtime needs to provide for IFluidDataStoreContext to bind to control.\n *\n * Functionality include attach, snapshot, op/signal processing, request routes, expose an entryPoint,\n * and connection state notifications\n * @legacy @beta\n */\nexport interface IFluidDataStoreChannel extends IDisposable {\n\t/**\n\t * Optional policies that the data store channel may adhere to that the data store context should know about.\n\t * These policies influence the behavior of the data store, such as its readonly state in specific modes.\n\t */\n\treadonly policies?: IFluidDataStorePolicies;\n\n\t/**\n\t * Makes the data store channel visible in the container. Also, runs through its graph and attaches all\n\t * bound handles that represent its dependencies in the container's graph.\n\t */\n\tmakeVisibleAndAttachGraph(): void;\n\n\t/**\n\t * Synchronously retrieves the summary used as part of the initial summary message\n\t */\n\tgetAttachSummary(telemetryContext?: ITelemetryContext): ISummaryTreeWithStats;\n\n\t/**\n\t * Synchronously retrieves GC Data (representing the outbound routes present) for the initial state of the DataStore\n\t */\n\tgetAttachGCData(telemetryContext?: ITelemetryContext): IGarbageCollectionData;\n\n\t/**\n\t * Process messages for this channel. The messages here are contiguous messages in a batch.\n\t * @param messageCollection - The collection of messages to process.\n\t */\n\tprocessMessages(messageCollection: IRuntimeMessageCollection): void;\n\n\t/**\n\t * Processes the signal.\n\t */\n\tprocessSignal(message: IInboundSignalMessage, local: boolean): void;\n\n\t/**\n\t * Generates a summary for the channel.\n\t * Introduced with summarizerNode - will be required in a future release.\n\t * @param fullTree - true to bypass optimizations and force a full summary tree.\n\t * @param trackState - This tells whether we should track state from this summary.\n\t * @param telemetryContext - summary data passed through the layers for telemetry purposes\n\t */\n\tsummarize(\n\t\tfullTree?: boolean,\n\t\ttrackState?: boolean,\n\t\ttelemetryContext?: ITelemetryContext,\n\t): Promise<ISummaryTreeWithStats>;\n\n\t/**\n\t * Returns the data used for garbage collection. This includes a list of GC nodes that represent this context\n\t * including any of its children. Each node has a list of outbound routes to other GC nodes in the document.\n\t * @param fullGC - true to bypass optimizations and force full generation of GC data.\n\t */\n\tgetGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;\n\n\t/**\n\t * After GC has run, called to notify this channel of routes that are used in it.\n\t * @param usedRoutes - The routes that are used in this channel.\n\t */\n\tupdateUsedRoutes(usedRoutes: string[]): void;\n\n\t/**\n\t * Notifies this object about changes in the connection state.\n\t * @param value - New connection state.\n\t * @param clientId - ID of the client. It's old ID when in disconnected state and\n\t * it's new client ID when we are connecting or connected.\n\t */\n\tsetConnectionState(connected: boolean, clientId?: string);\n\n\t/**\n\t * Notifies this object about changes in the readonly state\n\t */\n\tnotifyReadOnlyState?(readonly: boolean): void;\n\n\t/**\n\t * Ask the DDS to resubmit a message. This can happen for several reasons, such as:\n\t *\n\t * - We reconnected and discovered the original message was never acked.\n\t * - The original message was submitted from a reentrant state that is impossible for other clients to interpret correctly\n\t * - The original message was never sent on the wire and subsequent ops have been inbounded\n\t * @param type - The type of the original message.\n\t * @param content - The content of the original message.\n\t * @param localOpMetadata - The local metadata associated with the original message.\n\t * @param squash - If true, the DDS should avoid resubmitting any \"unnecessary intermediate state\" created by this message.\n\t * This includes any content which this message created but has since been changed or removed by subsequent messages.\n\t * For example, if this message (call it A) inserts content into a DDS that a subsequent op (call it B) removes,\n\t * resubmission of this message (call it A') should avoid inserting that content, and resubmission of the subsequent op that removed it (B') would\n\t * account for the fact that A' never inserted content.\n\t *\n\t * @privateRemarks\n\t * See remarks about squashing contract on `CommitStagedChangesOptionsExperimental`.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO (#28746): breaking change\n\treSubmit(type: string, content: any, localOpMetadata: unknown, squash?: boolean);\n\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO (#28746): breaking change\n\tapplyStashedOp(content: any): Promise<unknown>;\n\n\t/**\n\t * Revert a local message.\n\t * @param type - The type of the original message.\n\t * @param content - The content of the original message.\n\t * @param localOpMetadata - The local metadata associated with the original message.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO (#28746): breaking change\n\trollback?(type: string, content: any, localOpMetadata: unknown): void;\n\n\t/**\n\t * Exposes a handle to the root object / entryPoint of the component. Use this as the primary way of interacting\n\t * with the component.\n\t */\n\treadonly entryPoint: IFluidHandleInternal<FluidObject>;\n\n\trequest(request: IRequest): Promise<IResponse>;\n\n\tsetAttachState(attachState: AttachState.Attaching | AttachState.Attached): void;\n}\n\n/**\n * @legacy @beta\n */\nexport type CreateChildSummarizerNodeFn = (\n\tsummarizeInternal: SummarizeInternalFn,\n\tgetGCDataFn: (fullGC?: boolean) => Promise<IGarbageCollectionData>,\n\t/**\n\t * @deprecated The functionality to get base GC details has been moved to summarizer node.\n\t */\n\tgetBaseGCDetailsFn?: () => Promise<IGarbageCollectionDetailsBase>,\n) => ISummarizerNodeWithGC;\n\n/**\n * The state maintained for messages that are received when a channel isn't yet loaded.\n * @internal\n */\nexport interface IPendingMessagesState {\n\tmessageCollections: IRuntimeMessageCollection[];\n\tpendingCount: number;\n}\n\n/**\n * Context for an {@link IDataStore} like object.\n * @remarks\n * This context does NOT represent common information provided to all channels under a specific parent.\n * Each implementation of {@link IFluidDataStoreChannel} will receive its own instance of this context that contains specifically the data it needs.\n *\n * This layout is temporary, as {@link IFluidParentContext} and {@link IFluidDataStoreContext} will converge.\n * Therefore the semantics of these two interfaces is not really distinct.\n *\n * @privateRemarks\n * In addition to the use for datastores via IFluidDataStoreContext, this is implemented by ContainerRuntime to provide context to the ChannelCollection.\n *\n * @legacy @beta\n */\nexport interface IFluidParentContext\n\textends IProvideFluidHandleContext,\n\t\tPartial<IProvideFluidDataStoreRegistry> {\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO (#28746): breaking change\n\treadonly options: Record<string | number, any>;\n\treadonly clientId: string | undefined;\n\treadonly connected: boolean;\n\t/**\n\t * Indicates if the parent context is readonly. If isReadOnly is true, the consumer of\n\t * the context should also consider themselves readonly.\n\t */\n\treadonly isReadOnly?: () => boolean;\n\t/**\n\t * Minimum version of the FF runtime that is required to collaborate on new documents.\n\t * Consumed by {@link @fluidframework/container-runtime#FluidDataStoreContext}.\n\t * See {@link @fluidframework/container-runtime#LoadContainerRuntimeParams.minVersionForCollab} for more details.\n\t */\n\treadonly minVersionForCollab?: MinimumVersionForCollab;\n\treadonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n\treadonly storage: IRuntimeStorageService;\n\treadonly baseLogger: ITelemetryBaseLogger;\n\treadonly clientDetails: IClientDetails;\n\treadonly idCompressor?: IIdCompressor;\n\t/**\n\t * Represents the loading group to which the data store belongs to. Please refer to this readme for more context.\n\t * {@link https://github.com/microsoft/FluidFramework/blob/main/packages/runtime/container-runtime/README.md | README}\n\t */\n\treadonly loadingGroupId?: string;\n\t/**\n\t * Indicates the attachment state of the data store to a host service.\n\t */\n\treadonly attachState: AttachState;\n\n\treadonly containerRuntime: IContainerRuntimeBase;\n\n\t/**\n\t * Ambient services provided with the context\n\t */\n\treadonly scope: FluidObject;\n\n\t/**\n\t * @deprecated this functionality has been removed.\n\t */\n\treadonly gcThrowOnTombstoneUsage: boolean;\n\t/**\n\t * @deprecated this functionality has been removed.\n\t */\n\treadonly gcTombstoneEnforcementAllowed: boolean;\n\n\t/**\n\t * Returns the current quorum.\n\t */\n\tgetQuorum(): IQuorumClients;\n\n\t/**\n\t * Returns the current audience.\n\t */\n\tgetAudience(): IAudience;\n\n\t/**\n\t * Submits the message to be sent to other clients.\n\t * @param type - Type of the message.\n\t * @param content - Content of the message.\n\t * @param localOpMetadata - The local metadata associated with the message. This is kept locally and not sent to\n\t * the server. This will be sent back when this message is received back from the server. This is also sent if\n\t * we are asked to resubmit the message.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO (#28746): breaking change\n\tsubmitMessage(type: string, content: any, localOpMetadata: unknown): void;\n\n\t/**\n\t * Submits the signal to be sent to other clients.\n\t * @param type - Type of the signal.\n\t * @param content - Content of the signal. Should be an {@link IEnvelope} with `contents` that is a JSON\n\t * serializable object or primitive.\n\t * @param targetClientId - When specified, the signal is only sent to the provided client id.\n\t */\n\tsubmitSignal: (type: string, content: unknown, targetClientId?: string) => void;\n\n\t/**\n\t * Called to make the data store locally visible in the container. This happens automatically for root data stores\n\t * when they are marked as root. For non-root data stores, this happens when their handle is added to a visible DDS.\n\t */\n\tmakeLocallyVisible(): void;\n\n\t/**\n\t * Get an absolute url to the container based on the provided relativeUrl.\n\t * Returns undefined if the container or data store isn't attached to storage.\n\t * @param relativeUrl - A relative request within the container\n\t */\n\tgetAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;\n\n\tgetCreateChildSummarizerNodeFn(\n\t\t/**\n\t\t * Initial id or path part of this node\n\t\t */\n\t\tid: string,\n\t\t/**\n\t\t * Information needed to create the node.\n\t\t * If it is from a base summary, it will assert that a summary has been seen.\n\t\t * Attach information if it is created from an attach op.\n\t\t * If it is local, it will throw unsupported errors on calls to summarize.\n\t\t */\n\t\tcreateParam: CreateChildSummarizerNodeParam,\n\t): CreateChildSummarizerNodeFn;\n\n\tdeleteChildSummarizerNode(id: string): void;\n\n\tuploadBlob(\n\t\tblob: ArrayBufferLike,\n\t\tsignal?: AbortSignal,\n\t): Promise<IFluidHandleInternal<ArrayBufferLike>>;\n\n\t/**\n\t * Called by IFluidDataStoreChannel, indicates that a channel is dirty and needs to be part of the summary.\n\t * @param address - The address of the channel that is dirty.\n\t */\n\tsetChannelDirty(address: string): void;\n\n\t/**\n\t * Called when a new outbound reference is added to another node. This is used by garbage collection to identify\n\t * all references added in the system.\n\t *\n\t * @param fromPath - The absolute path of the node that added the reference.\n\t * @param toPath - The absolute path of the outbound node that is referenced.\n\t * @param messageTimestampMs - The timestamp of the message that added the reference.\n\t */\n\taddedGCOutboundRoute(fromPath: string, toPath: string, messageTimestampMs?: number): void;\n}\n\n/**\n * A path which selects a {@link (IFluidDataStoreFactory:interface)} within a hierarchial registry.\n * @remarks\n * Each string in the array is the \"identifier\" to pick a specific {@link NamedFluidDataStoreRegistryEntry2} within a {@link NamedFluidDataStoreRegistryEntries}.\n *\n * Due to some usages joining this array with \"/\", it is recommended to avoid using \"/\" in the strings.\n * @legacy @beta\n */\nexport type PackagePath = readonly string[];\n\n/**\n * Extension to {@link IFluidParentContext} specifically for {@link IDataStore}s.\n *\n * @remarks\n * This context is provided to the implementation of {@link IFluidDataStoreChannel} which powers the datastore.\n *\n * @legacy @beta\n */\nexport interface IFluidDataStoreContext extends IFluidParentContext {\n\treadonly id: string;\n\t/**\n\t * A data store created by a client, is a local data store for that client. Also, when a detached container loads\n\t * from a snapshot, all the data stores are treated as local data stores because at that stage the container\n\t * still doesn't exists in storage and so the data store couldn't have been created by any other client.\n\t * Value of this never changes even after the data store is attached.\n\t * As implementer of data store runtime, you can use this property to check that this data store belongs to this\n\t * client and hence implement any scenario based on that.\n\t */\n\treadonly isLocalDataStore: boolean;\n\t/**\n\t * The {@link PackagePath} of the data store as per the package factory.\n\t * @remarks\n\t * This defines what {@link (IFluidDataStoreFactory:interface)} would be used to create the {@link IDataStore.entryPoint} of the {@link IDataStore}.\n\t */\n\treadonly packagePath: PackagePath;\n\treadonly baseSnapshot: ISnapshotTree | undefined;\n\n\t/**\n\t * @deprecated 0.16 Issue #1635, #3631\n\t */\n\t// Seems like this can be removed now; the issues mentioned in the @deprecated tag are about _createDataStoreWithProps\n\t// which we finally removed in FF 2.20 (https://github.com/microsoft/FluidFramework/pull/22996).\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO (#28746): breaking change\n\treadonly createProps?: any;\n\n\t/**\n\t * @deprecated The functionality to get base GC details has been moved to summarizer node.\n\t *\n\t * Returns the GC details in the initial summary of this data store. This is used to initialize the data store\n\t * and its children with the GC details from the previous summary.\n\t */\n\tgetBaseGCDetails(): Promise<IGarbageCollectionDetailsBase>;\n\n\t/**\n\t * Synchronously creates a detached child data store.\n\t *\n\t * The `createChildDataStore` method allows for the synchronous creation of a detached child data store. This is particularly\n\t * useful in scenarios where immediate availability of the child data store is required, such as during the initialization\n\t * of a parent data store, or when creation is in response to synchronous user input.\n\t *\n\t * In order for this function to succeed:\n\t * 1. The parent data store's factory must also be an `IFluidDataStoreRegistry`.\n\t * 2. The parent data store's registry must include the same instance as the provided child factory.\n\t * 3. The parent data store's registry must synchronously provide the child factory via the `getSync` method.\n\t * 4. The child factory must implement the `createDataStore` method.\n\t *\n\t * These invariants ensure that the child data store can also be created by a remote client running the same code as this client.\n\t *\n\t * @param childFactory - The factory of the data store to be created.\n\t * @returns The created data store channel.\n\t */\n\tcreateChildDataStore?<T extends IFluidDataStoreFactory>(\n\t\tchildFactory: T,\n\t): ReturnType<Exclude<T[\"createDataStore\"], undefined>>;\n}\n\n/**\n * @legacy @beta\n */\nexport interface IFluidDataStoreContextDetached extends IFluidDataStoreContext {\n\t/**\n\t * Binds a runtime to the context.\n\t */\n\tattachRuntime(\n\t\tfactory: IProvideFluidDataStoreFactory,\n\t\tdataStoreRuntime: IFluidDataStoreChannel,\n\t): Promise<IDataStore>;\n}\n"]}
@@ -114,7 +114,7 @@ export interface IRuntimeStorageService {
114
114
  * Whether or not the object has been disposed.
115
115
  * If true, the object should be considered invalid, and its other state should be disregarded.
116
116
  *
117
- * @deprecated - This API is deprecated and will be removed in a future release. No replacement is planned as
117
+ * @deprecated This API is deprecated and will be removed in a future release. No replacement is planned as
118
118
  * it is unused in the DataStore layer.
119
119
  */
120
120
  readonly disposed?: boolean;
@@ -123,42 +123,42 @@ export interface IRuntimeStorageService {
123
123
  * @param error - Optional error indicating the reason for the disposal, if the object was
124
124
  * disposed as the result of an error.
125
125
  *
126
- * @deprecated - This API is deprecated and will be removed in a future release. No replacement is planned as
126
+ * @deprecated This API is deprecated and will be removed in a future release. No replacement is planned as
127
127
  * it is unused in the DataStore layer.
128
128
  */
129
129
  dispose?(error?: Error): void;
130
130
  /**
131
- * @deprecated - This will be removed in a future release. No replacement is planned as
131
+ * @deprecated This will be removed in a future release. No replacement is planned as
132
132
  * it is unused in the DataStore layer.
133
133
  */
134
134
  readonly policies?: IDocumentStorageServicePolicies | undefined;
135
135
  /**
136
- * @deprecated - This will be removed in a future release. No replacement is planned as
136
+ * @deprecated This will be removed in a future release. No replacement is planned as
137
137
  * it is unused in the DataStore layer.
138
138
  */
139
139
  getSnapshotTree(version?: IVersion, scenarioName?: string): Promise<ISnapshotTree | null>;
140
140
  /**
141
- * @deprecated - This will be removed in a future release. No replacement is planned as
141
+ * @deprecated This will be removed in a future release. No replacement is planned as
142
142
  * it is unused in the DataStore layer.
143
143
  */
144
144
  getSnapshot?(snapshotFetchOptions?: ISnapshotFetchOptions): Promise<ISnapshot>;
145
145
  /**
146
- * @deprecated - This will be removed in a future release. No replacement is planned as
146
+ * @deprecated This will be removed in a future release. No replacement is planned as
147
147
  * it is unused in the DataStore layer.
148
148
  */
149
149
  getVersions(versionId: string | null, count: number, scenarioName?: string, fetchSource?: FetchSource): Promise<IVersion[]>;
150
150
  /**
151
- * @deprecated - This will be removed in a future release. No replacement is planned as
151
+ * @deprecated This will be removed in a future release. No replacement is planned as
152
152
  * it is unused in the DataStore layer.
153
153
  */
154
154
  createBlob(file: ArrayBufferLike): Promise<ICreateBlobResponse>;
155
155
  /**
156
- * @deprecated - This will be removed in a future release. No replacement is planned as
156
+ * @deprecated This will be removed in a future release. No replacement is planned as
157
157
  * it is unused in the DataStore layer.
158
158
  */
159
159
  uploadSummaryWithContext(summary: ISummaryTree, context: ISummaryContext): Promise<string>;
160
160
  /**
161
- * @deprecated - This will be removed in a future release. No replacement is planned as
161
+ * @deprecated This will be removed in a future release. No replacement is planned as
162
162
  * it is unused in the DataStore layer.
163
163
  */
164
164
  downloadSummary(handle: ISummaryHandle): Promise<ISummaryTree>;
@@ -1 +1 @@
1
- {"version":3,"file":"protocol.js","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { TypedMessage } from \"@fluidframework/core-interfaces/internal\";\nimport type {\n\tITree,\n\tISignalMessage,\n\tISequencedDocumentMessage,\n\tIDocumentStorageServicePolicies,\n\tIVersion,\n\tISnapshotTree,\n\tISnapshotFetchOptions,\n\tISnapshot,\n\tFetchSource,\n\tICreateBlobResponse,\n\tISummaryTree,\n\tISummaryHandle,\n\tISummaryContext,\n} from \"@fluidframework/driver-definitions/internal\";\n\n/**\n * An envelope wraps the contents with the intended target\n * @legacy @beta\n */\nexport interface IEnvelope {\n\t/**\n\t * The target for the envelope\n\t */\n\taddress: string;\n\n\t/**\n\t * The contents of the envelope\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO (#28746): breaking change\n\tcontents: any;\n}\n\n/**\n * Represents ISignalMessage with its type.\n * @legacy @beta\n */\nexport interface IInboundSignalMessage<TMessage extends TypedMessage = TypedMessage>\n\textends ISignalMessage<TMessage> {\n\treadonly type: TMessage[\"type\"];\n}\n\n/**\n * Message send by client attaching local data structure.\n * Contains snapshot of data structure which is the current state of this data structure.\n * @legacy @beta\n */\nexport interface IAttachMessage {\n\t/**\n\t * The identifier for the object\n\t */\n\tid: string;\n\n\t/**\n\t * The type of object\n\t */\n\ttype: string;\n\n\t/**\n\t * Initial snapshot of the document (contains ownership)\n\t */\n\tsnapshot: ITree;\n}\n\n/**\n * This type should be used when reading an incoming attach op,\n * but it should not be used when creating a new attach op.\n * Older versions of attach messages could have null snapshots,\n * so this gives correct typings for writing backward compatible code.\n * @legacy @beta\n */\nexport type InboundAttachMessage = Omit<IAttachMessage, \"snapshot\"> & {\n\t// eslint-disable-next-line @rushstack/no-new-null -- TODO: breaking change; protocol might even explicitly use null\n\tsnapshot: IAttachMessage[\"snapshot\"] | null;\n};\n\n/**\n * This is the message type that is used within the runtime when processing a sequenced message.\n * It is the same as ISequencedDocumentMessage, but without the contents and clientSequenceNumbers\n * which are sent separately. The contents are modified at multiple layers in the stack so having it\n * separate doesn't require packing and unpacking the entire message.\n * @legacy @beta\n */\nexport type ISequencedMessageEnvelope = Omit<\n\tISequencedDocumentMessage,\n\t\"contents\" | \"clientSequenceNumber\"\n>;\n\n/**\n * These are the contents of a runtime message as it is processed throughout the stack.\n * @legacy @beta\n * @sealed\n */\nexport interface IRuntimeMessagesContent {\n\t/**\n\t * The contents of the message, i.e., the payload\n\t */\n\treadonly contents: unknown;\n\t/**\n\t * The local metadata associated with the original message that was submitted\n\t */\n\treadonly localOpMetadata: unknown;\n\t/**\n\t * The client sequence number of the message\n\t */\n\treadonly clientSequenceNumber: number;\n}\n\n/**\n * A collection of messages that are processed by the runtime.\n * @legacy @beta\n * @sealed\n */\nexport interface IRuntimeMessageCollection {\n\t/**\n\t * The envelope for all the messages in the collection\n\t */\n\treadonly envelope: ISequencedMessageEnvelope;\n\t/**\n\t * Whether these messages were originally generated by the client processing them\n\t */\n\treadonly local: boolean;\n\t/**\n\t * The contents of the messages in the collection\n\t */\n\treadonly messagesContent: readonly IRuntimeMessagesContent[];\n}\n\n/**\n * Interface to provide access to snapshot blobs to DataStore layer.\n *\n * @legacy @beta\n */\nexport interface IRuntimeStorageService {\n\t/**\n\t * Reads the object with the given ID, returns content in arrayBufferLike\n\t */\n\treadBlob(id: string): Promise<ArrayBufferLike>;\n\n\t/**\n\t * Whether or not the object has been disposed.\n\t * If true, the object should be considered invalid, and its other state should be disregarded.\n\t *\n\t * @deprecated - This API is deprecated and will be removed in a future release. No replacement is planned as\n\t * it is unused in the DataStore layer.\n\t */\n\treadonly disposed?: boolean;\n\n\t/**\n\t * Dispose of the object and its resources.\n\t * @param error - Optional error indicating the reason for the disposal, if the object was\n\t * disposed as the result of an error.\n\t *\n\t * @deprecated - This API is deprecated and will be removed in a future release. No replacement is planned as\n\t * it is unused in the DataStore layer.\n\t */\n\tdispose?(error?: Error): void;\n\n\t/**\n\t * @deprecated - This will be removed in a future release. No replacement is planned as\n\t * it is unused in the DataStore layer.\n\t */\n\treadonly policies?: IDocumentStorageServicePolicies | undefined;\n\n\t/**\n\t * @deprecated - This will be removed in a future release. No replacement is planned as\n\t * it is unused in the DataStore layer.\n\t */\n\t// eslint-disable-next-line @rushstack/no-new-null\n\tgetSnapshotTree(version?: IVersion, scenarioName?: string): Promise<ISnapshotTree | null>;\n\n\t/**\n\t * @deprecated - This will be removed in a future release. No replacement is planned as\n\t * it is unused in the DataStore layer.\n\t */\n\tgetSnapshot?(snapshotFetchOptions?: ISnapshotFetchOptions): Promise<ISnapshot>;\n\n\t/**\n\t * @deprecated - This will be removed in a future release. No replacement is planned as\n\t * it is unused in the DataStore layer.\n\t */\n\tgetVersions(\n\t\t// TODO: use `undefined` instead.\n\t\t// eslint-disable-next-line @rushstack/no-new-null\n\t\tversionId: string | null,\n\t\tcount: number,\n\t\tscenarioName?: string,\n\t\tfetchSource?: FetchSource,\n\t): Promise<IVersion[]>;\n\n\t/**\n\t * @deprecated - This will be removed in a future release. No replacement is planned as\n\t * it is unused in the DataStore layer.\n\t */\n\tcreateBlob(file: ArrayBufferLike): Promise<ICreateBlobResponse>;\n\n\t/**\n\t * @deprecated - This will be removed in a future release. No replacement is planned as\n\t * it is unused in the DataStore layer.\n\t */\n\tuploadSummaryWithContext(summary: ISummaryTree, context: ISummaryContext): Promise<string>;\n\n\t/**\n\t * @deprecated - This will be removed in a future release. No replacement is planned as\n\t * it is unused in the DataStore layer.\n\t */\n\tdownloadSummary(handle: ISummaryHandle): Promise<ISummaryTree>;\n}\n"]}
1
+ {"version":3,"file":"protocol.js","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { TypedMessage } from \"@fluidframework/core-interfaces/internal\";\nimport type {\n\tITree,\n\tISignalMessage,\n\tISequencedDocumentMessage,\n\tIDocumentStorageServicePolicies,\n\tIVersion,\n\tISnapshotTree,\n\tISnapshotFetchOptions,\n\tISnapshot,\n\tFetchSource,\n\tICreateBlobResponse,\n\tISummaryTree,\n\tISummaryHandle,\n\tISummaryContext,\n} from \"@fluidframework/driver-definitions/internal\";\n\n/**\n * An envelope wraps the contents with the intended target\n * @legacy @beta\n */\nexport interface IEnvelope {\n\t/**\n\t * The target for the envelope\n\t */\n\taddress: string;\n\n\t/**\n\t * The contents of the envelope\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO (#28746): breaking change\n\tcontents: any;\n}\n\n/**\n * Represents ISignalMessage with its type.\n * @legacy @beta\n */\nexport interface IInboundSignalMessage<TMessage extends TypedMessage = TypedMessage>\n\textends ISignalMessage<TMessage> {\n\treadonly type: TMessage[\"type\"];\n}\n\n/**\n * Message send by client attaching local data structure.\n * Contains snapshot of data structure which is the current state of this data structure.\n * @legacy @beta\n */\nexport interface IAttachMessage {\n\t/**\n\t * The identifier for the object\n\t */\n\tid: string;\n\n\t/**\n\t * The type of object\n\t */\n\ttype: string;\n\n\t/**\n\t * Initial snapshot of the document (contains ownership)\n\t */\n\tsnapshot: ITree;\n}\n\n/**\n * This type should be used when reading an incoming attach op,\n * but it should not be used when creating a new attach op.\n * Older versions of attach messages could have null snapshots,\n * so this gives correct typings for writing backward compatible code.\n * @legacy @beta\n */\nexport type InboundAttachMessage = Omit<IAttachMessage, \"snapshot\"> & {\n\t// eslint-disable-next-line @rushstack/no-new-null -- TODO: breaking change; protocol might even explicitly use null\n\tsnapshot: IAttachMessage[\"snapshot\"] | null;\n};\n\n/**\n * This is the message type that is used within the runtime when processing a sequenced message.\n * It is the same as ISequencedDocumentMessage, but without the contents and clientSequenceNumbers\n * which are sent separately. The contents are modified at multiple layers in the stack so having it\n * separate doesn't require packing and unpacking the entire message.\n * @legacy @beta\n */\nexport type ISequencedMessageEnvelope = Omit<\n\tISequencedDocumentMessage,\n\t\"contents\" | \"clientSequenceNumber\"\n>;\n\n/**\n * These are the contents of a runtime message as it is processed throughout the stack.\n * @legacy @beta\n * @sealed\n */\nexport interface IRuntimeMessagesContent {\n\t/**\n\t * The contents of the message, i.e., the payload\n\t */\n\treadonly contents: unknown;\n\t/**\n\t * The local metadata associated with the original message that was submitted\n\t */\n\treadonly localOpMetadata: unknown;\n\t/**\n\t * The client sequence number of the message\n\t */\n\treadonly clientSequenceNumber: number;\n}\n\n/**\n * A collection of messages that are processed by the runtime.\n * @legacy @beta\n * @sealed\n */\nexport interface IRuntimeMessageCollection {\n\t/**\n\t * The envelope for all the messages in the collection\n\t */\n\treadonly envelope: ISequencedMessageEnvelope;\n\t/**\n\t * Whether these messages were originally generated by the client processing them\n\t */\n\treadonly local: boolean;\n\t/**\n\t * The contents of the messages in the collection\n\t */\n\treadonly messagesContent: readonly IRuntimeMessagesContent[];\n}\n\n/**\n * Interface to provide access to snapshot blobs to DataStore layer.\n *\n * @legacy @beta\n */\nexport interface IRuntimeStorageService {\n\t/**\n\t * Reads the object with the given ID, returns content in arrayBufferLike\n\t */\n\treadBlob(id: string): Promise<ArrayBufferLike>;\n\n\t/**\n\t * Whether or not the object has been disposed.\n\t * If true, the object should be considered invalid, and its other state should be disregarded.\n\t *\n\t * @deprecated This API is deprecated and will be removed in a future release. No replacement is planned as\n\t * it is unused in the DataStore layer.\n\t */\n\treadonly disposed?: boolean;\n\n\t/**\n\t * Dispose of the object and its resources.\n\t * @param error - Optional error indicating the reason for the disposal, if the object was\n\t * disposed as the result of an error.\n\t *\n\t * @deprecated This API is deprecated and will be removed in a future release. No replacement is planned as\n\t * it is unused in the DataStore layer.\n\t */\n\tdispose?(error?: Error): void;\n\n\t/**\n\t * @deprecated This will be removed in a future release. No replacement is planned as\n\t * it is unused in the DataStore layer.\n\t */\n\treadonly policies?: IDocumentStorageServicePolicies | undefined;\n\n\t/**\n\t * @deprecated This will be removed in a future release. No replacement is planned as\n\t * it is unused in the DataStore layer.\n\t */\n\t// eslint-disable-next-line @rushstack/no-new-null\n\tgetSnapshotTree(version?: IVersion, scenarioName?: string): Promise<ISnapshotTree | null>;\n\n\t/**\n\t * @deprecated This will be removed in a future release. No replacement is planned as\n\t * it is unused in the DataStore layer.\n\t */\n\tgetSnapshot?(snapshotFetchOptions?: ISnapshotFetchOptions): Promise<ISnapshot>;\n\n\t/**\n\t * @deprecated This will be removed in a future release. No replacement is planned as\n\t * it is unused in the DataStore layer.\n\t */\n\tgetVersions(\n\t\t// TODO: use `undefined` instead.\n\t\t// eslint-disable-next-line @rushstack/no-new-null\n\t\tversionId: string | null,\n\t\tcount: number,\n\t\tscenarioName?: string,\n\t\tfetchSource?: FetchSource,\n\t): Promise<IVersion[]>;\n\n\t/**\n\t * @deprecated This will be removed in a future release. No replacement is planned as\n\t * it is unused in the DataStore layer.\n\t */\n\tcreateBlob(file: ArrayBufferLike): Promise<ICreateBlobResponse>;\n\n\t/**\n\t * @deprecated This will be removed in a future release. No replacement is planned as\n\t * it is unused in the DataStore layer.\n\t */\n\tuploadSummaryWithContext(summary: ISummaryTree, context: ISummaryContext): Promise<string>;\n\n\t/**\n\t * @deprecated This will be removed in a future release. No replacement is planned as\n\t * it is unused in the DataStore layer.\n\t */\n\tdownloadSummary(handle: ISummaryHandle): Promise<ISummaryTree>;\n}\n"]}
package/dist/summary.d.ts CHANGED
@@ -68,7 +68,7 @@ export interface ISummarizeInternalResult extends ISummarizeResult {
68
68
  pathPartsForChildren?: string[];
69
69
  }
70
70
  /**
71
- * @experimental - Can be deleted/changed at any time
71
+ * @experimental Can be deleted/changed at any time
72
72
  * Contains the necessary information to allow DDSes to do incremental summaries
73
73
  * @legacy @beta
74
74
  */
@@ -1 +1 @@
1
- {"version":3,"file":"summary.js","sourceRoot":"","sources":["../src/summary.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AA8IH;;GAEG;AACH,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IACrC,yFAAW,CAAA;IACX,uFAAU,CAAA;IACV,6EAAK,CAAA;AACN,CAAC,EAJW,0BAA0B,0CAA1B,0BAA0B,QAIrC;AAyKD;;GAEG;AACU,QAAA,gBAAgB,GAAG,WAAW,CAAC;AAwD5C;;GAEG;AACU,QAAA,qBAAqB,GAAG,WAAW,CAAC;AAEjD;;GAEG;AACU,QAAA,yBAAyB,GAAG,eAAe,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { TelemetryBaseEventPropertyType } from \"@fluidframework/core-interfaces\";\nimport type {\n\tISnapshotTree,\n\tISummaryTree,\n\tITree,\n\tSummaryTree,\n\tISequencedDocumentMessage,\n} from \"@fluidframework/driver-definitions/internal\";\nimport type { TelemetryEventPropertyTypeExt } from \"@fluidframework/telemetry-utils/internal\";\n\nimport type {\n\tIGarbageCollectionData,\n\tIGarbageCollectionDetailsBase,\n} from \"./garbageCollectionDefinitions.js\";\n\n/**\n * Contains the aggregation data from a Tree/Subtree.\n * @legacy @beta\n */\nexport interface ISummaryStats {\n\ttreeNodeCount: number;\n\tblobNodeCount: number;\n\thandleNodeCount: number;\n\ttotalBlobSize: number;\n\tunreferencedBlobSize: number;\n}\n\n/**\n * Represents the summary tree for a node along with the statistics for that tree.\n * For example, for a given data store, it contains the data for data store along with a subtree for\n * each of its DDS.\n * Any component that implements IChannelContext, IFluidDataStoreChannel or extends SharedObject\n * will be taking part of the summarization process.\n * @legacy @beta\n */\nexport interface ISummaryTreeWithStats {\n\t/**\n\t * Represents an aggregation of node counts and blob sizes associated to the current summary information\n\t */\n\tstats: ISummaryStats;\n\t/**\n\t * A recursive data structure that will be converted to a snapshot tree and uploaded\n\t * to the backend.\n\t */\n\tsummary: ISummaryTree;\n}\n\n/**\n * Represents a summary at a current sequence number.\n * @legacy @beta\n */\nexport interface ISummarizeResult {\n\tstats: ISummaryStats;\n\tsummary: SummaryTree;\n}\n\n/**\n * Contains the same data as ISummaryResult but in order to avoid naming collisions,\n * the data store summaries are wrapped around an array of labels identified by pathPartsForChildren.\n *\n * @example\n *\n * ```typescript\n * id:\"\"\n * pathPartsForChildren: [\"path1\"]\n * stats: ...\n * summary:\n * ...\n * \"path1\":\n * ```\n * @legacy @beta\n */\nexport interface ISummarizeInternalResult extends ISummarizeResult {\n\tid: string;\n\t/**\n\t * Additional path parts between this node's ID and its children's IDs.\n\t */\n\tpathPartsForChildren?: string[];\n}\n\n/**\n * @experimental - Can be deleted/changed at any time\n * Contains the necessary information to allow DDSes to do incremental summaries\n * @legacy @beta\n */\nexport interface IExperimentalIncrementalSummaryContext {\n\t/**\n\t * The sequence number of the summary generated that will be sent to the server.\n\t */\n\treadonly summarySequenceNumber: number;\n\t/**\n\t * The sequence number of the most recent summary that was acknowledged by the server.\n\t */\n\treadonly latestSummarySequenceNumber: number;\n\t/**\n\t * The path to the runtime/datastore/dds that is used to generate summary handles\n\t * Note: Summary handles are nodes of the summary tree that point to previous parts of the last successful summary\n\t * instead of being a blob or tree node\n\t *\n\t * This path contains the id of the data store and dds which should not be leaked to layers below them. Ideally,\n\t * a layer should not know its own id. This is important for channel unification work and there has been a lot of\n\t * work to remove these kinds of leakages. Some still exist, which have to be fixed but we should not be adding\n\t * more dependencies.\n\t */\n\t// TODO: remove summaryPath\n\treadonly summaryPath: string;\n}\n\n/**\n * @legacy @beta\n */\nexport type SummarizeInternalFn = (\n\tfullTree: boolean,\n\ttrackState: boolean,\n\ttelemetryContext?: ITelemetryContext,\n\tincrementalSummaryContext?: IExperimentalIncrementalSummaryContext,\n) => Promise<ISummarizeInternalResult>;\n\n/**\n * @legacy @beta\n */\nexport interface ISummarizerNodeConfig {\n\t/**\n\t * True to reuse previous handle when unchanged since last acked summary.\n\t * Defaults to true.\n\t */\n\treadonly canReuseHandle?: boolean;\n}\n\n/**\n * @legacy @beta\n */\nexport interface ISummarizerNodeConfigWithGC extends ISummarizerNodeConfig {\n\t/**\n\t * True if GC is disabled. If so, don't track GC related state for a summary.\n\t * This is propagated to all child nodes.\n\t */\n\treadonly gcDisabled?: boolean;\n}\n\n/**\n * @legacy @beta\n */\nexport enum CreateSummarizerNodeSource {\n\tFromSummary,\n\tFromAttach,\n\tLocal,\n}\n/**\n * @legacy @beta\n */\nexport type CreateChildSummarizerNodeParam =\n\t| {\n\t\t\ttype: CreateSummarizerNodeSource.FromSummary;\n\t }\n\t| {\n\t\t\ttype: CreateSummarizerNodeSource.FromAttach;\n\t\t\tsequenceNumber: number;\n\t\t\tsnapshot: ITree;\n\t }\n\t| {\n\t\t\ttype: CreateSummarizerNodeSource.Local;\n\t };\n\n/**\n * @legacy @beta\n */\nexport interface ISummarizerNode {\n\t/**\n\t * Latest successfully acked summary reference sequence number\n\t */\n\treadonly referenceSequenceNumber: number;\n\t/**\n\t * Marks the node as having a change with the given sequence number.\n\t * @param sequenceNumber - sequence number of change\n\t */\n\tinvalidate(sequenceNumber: number): void;\n\t/**\n\t * Calls the internal summarize function and handles internal state tracking.\n\t * @param fullTree - true to skip optimizations and always generate the full tree\n\t * @param trackState - indicates whether the summarizer node should track the state of the summary or not\n\t * @param telemetryContext - summary data passed through the layers for telemetry purposes\n\t */\n\tsummarize(\n\t\tfullTree: boolean,\n\t\ttrackState?: boolean,\n\t\ttelemetryContext?: ITelemetryContext,\n\t): Promise<ISummarizeResult>;\n\t/**\n\t * Checks if there are any additional path parts for children that need to\n\t * be loaded from the base summary. Additional path parts represent parts\n\t * of the path between this SummarizerNode and any child SummarizerNodes\n\t * that it might have. For example: if datastore \"a\" contains dds \"b\", but the\n\t * path is \"/a/.channels/b\", then the additional path part is \".channels\".\n\t * @param snapshot - the base summary to parse\n\t *\n\t * @deprecated The code now always assumes that all summary nodes have .channels\n\t * in their handle so there is no need to maintain any additional path information.\n\t */\n\tupdateBaseSummaryState(snapshot: ISnapshotTree): void;\n\t/**\n\t * Records an op representing a change to this node/subtree.\n\t * @param op - op of change to record\n\t */\n\trecordChange(op: ISequencedDocumentMessage): void;\n\n\tcreateChild(\n\t\t/**\n\t\t * Summarize function\n\t\t */\n\t\tsummarizeInternalFn: SummarizeInternalFn,\n\t\t/**\n\t\t * Initial id or path part of this node\n\t\t */\n\t\tid: string,\n\t\t/**\n\t\t * Information needed to create the node.\n\t\t * If it is from a base summary, it will assert that a summary has been seen.\n\t\t * Attach information if it is created from an attach op.\n\t\t * If it is local, it will throw unsupported errors on calls to summarize.\n\t\t */\n\t\tcreateParam: CreateChildSummarizerNodeParam,\n\t\t/**\n\t\t * Optional configuration affecting summarize behavior\n\t\t */\n\t\tconfig?: ISummarizerNodeConfig,\n\t): ISummarizerNode;\n\n\tgetChild(id: string): ISummarizerNode | undefined;\n\n\t/**\n\t * True if a summary is currently in progress\n\t */\n\tisSummaryInProgress?(): boolean;\n}\n\n/**\n * Extends the functionality of ISummarizerNode to support garbage collection. It adds / updates the following APIs:\n *\n * `usedRoutes`: The routes in this node that are currently in use.\n *\n * `getGCData`: A new API that can be used to get the garbage collection data for this node.\n *\n * `summarize`: Added a trackState flag which indicates whether the summarizer node should track the state of the\n * summary or not.\n *\n * `createChild`: Added the following params:\n *\n * - `getGCDataFn`: This gets the GC data from the caller. This must be provided in order for getGCData to work.\n *\n * - `getInitialGCDetailsFn`: This gets the initial GC details from the caller.\n *\n * `deleteChild`: Deletes a child node.\n *\n * `isReferenced`: This tells whether this node is referenced in the document or not.\n *\n * `updateUsedRoutes`: Used to notify this node of routes that are currently in use in it.\n * @legacy @beta\n */\nexport interface ISummarizerNodeWithGC extends ISummarizerNode {\n\tcreateChild(\n\t\t/**\n\t\t * Summarize function\n\t\t */\n\t\tsummarizeInternalFn: SummarizeInternalFn,\n\t\t/**\n\t\t * Initial id or path part of this node\n\t\t */\n\t\tid: string,\n\t\t/**\n\t\t * Information needed to create the node.\n\t\t * If it is from a base summary, it will assert that a summary has been seen.\n\t\t * Attach information if it is created from an attach op.\n\t\t * If it is local, it will throw unsupported errors on calls to summarize.\n\t\t */\n\t\tcreateParam: CreateChildSummarizerNodeParam,\n\t\t/**\n\t\t * Optional configuration affecting summarize behavior\n\t\t */\n\t\tconfig?: ISummarizerNodeConfigWithGC,\n\t\tgetGCDataFn?: (fullGC?: boolean) => Promise<IGarbageCollectionData>,\n\t\t/**\n\t\t * @deprecated The functionality to update child's base GC details is incorporated in the summarizer node.\n\t\t */\n\t\tgetBaseGCDetailsFn?: () => Promise<IGarbageCollectionDetailsBase>,\n\t): ISummarizerNodeWithGC;\n\n\t/**\n\t * Delete the child with the given id..\n\t */\n\tdeleteChild(id: string): void;\n\n\tgetChild(id: string): ISummarizerNodeWithGC | undefined;\n\n\t/**\n\t * Returns this node's data that is used for garbage collection. This includes a list of GC nodes that represent\n\t * this node. Each node has a set of outbound routes to other GC nodes in the document.\n\t * @param fullGC - true to bypass optimizations and force full generation of GC data.\n\t */\n\tgetGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;\n\n\t/**\n\t * Tells whether this node is being referenced in this document or not. Unreferenced node will get GC'd\n\t */\n\tisReferenced(): boolean;\n\n\t/**\n\t * After GC has run, called to notify this node of routes that are used in it. These are used for the following:\n\t * 1. To identify if this node is being referenced in the document or not.\n\t * 2. To identify if this node or any of its children's used routes changed since last summary.\n\t *\n\t * @param usedRoutes - The routes that are used in this node.\n\t */\n\tupdateUsedRoutes(usedRoutes: string[]): void;\n}\n\n/**\n * @internal\n */\nexport const channelsTreeName = \".channels\";\n\n/**\n * Contains telemetry data relevant to summarization workflows.\n * This object, in contrast to ITelemetryContext, is expected to be modified directly by various summarize methods.\n * @internal\n */\nexport interface ITelemetryContextExt {\n\t/**\n\t * Sets value for telemetry data being tracked.\n\t * @param prefix - unique prefix to tag this data with (ex: \"fluid:map:\")\n\t * @param property - property name of the telemetry data being tracked (ex: \"DirectoryCount\")\n\t * @param value - value to attribute to this summary telemetry data\n\t */\n\tset(prefix: string, property: string, value: TelemetryEventPropertyTypeExt): void;\n\n\t/**\n\t * Sets multiple values for telemetry data being tracked.\n\t * @param prefix - unique prefix to tag this data with (ex: \"fluid:summarize:\")\n\t * @param property - property name of the telemetry data being tracked (ex: \"Options\")\n\t * @param values - A set of values to attribute to this summary telemetry data.\n\t */\n\tsetMultiple(\n\t\tprefix: string,\n\t\tproperty: string,\n\t\tvalues: Record<string, TelemetryEventPropertyTypeExt>,\n\t): void;\n}\n\n/**\n * Contains telemetry data relevant to summarization workflows.\n * This object is expected to be modified directly by various summarize methods.\n * @legacy @beta\n */\nexport interface ITelemetryContext {\n\t/**\n\t * Sets value for telemetry data being tracked.\n\t * @param prefix - unique prefix to tag this data with (ex: \"fluid:map:\")\n\t * @param property - property name of the telemetry data being tracked (ex: \"DirectoryCount\")\n\t * @param value - value to attribute to this summary telemetry data\n\t */\n\tset(prefix: string, property: string, value: TelemetryBaseEventPropertyType): void;\n\n\t/**\n\t * Sets multiple values for telemetry data being tracked.\n\t * @param prefix - unique prefix to tag this data with (ex: \"fluid:summarize:\")\n\t * @param property - property name of the telemetry data being tracked (ex: \"Options\")\n\t * @param values - A set of values to attribute to this summary telemetry data.\n\t */\n\tsetMultiple(\n\t\tprefix: string,\n\t\tproperty: string,\n\t\tvalues: Record<string, TelemetryBaseEventPropertyType>,\n\t): void;\n}\n\n/**\n * @internal\n */\nexport const blobCountPropertyName = \"BlobCount\";\n\n/**\n * @internal\n */\nexport const totalBlobSizePropertyName = \"TotalBlobSize\";\n"]}
1
+ {"version":3,"file":"summary.js","sourceRoot":"","sources":["../src/summary.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AA8IH;;GAEG;AACH,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IACrC,yFAAW,CAAA;IACX,uFAAU,CAAA;IACV,6EAAK,CAAA;AACN,CAAC,EAJW,0BAA0B,0CAA1B,0BAA0B,QAIrC;AAyKD;;GAEG;AACU,QAAA,gBAAgB,GAAG,WAAW,CAAC;AAwD5C;;GAEG;AACU,QAAA,qBAAqB,GAAG,WAAW,CAAC;AAEjD;;GAEG;AACU,QAAA,yBAAyB,GAAG,eAAe,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { TelemetryBaseEventPropertyType } from \"@fluidframework/core-interfaces\";\nimport type {\n\tISnapshotTree,\n\tISummaryTree,\n\tITree,\n\tSummaryTree,\n\tISequencedDocumentMessage,\n} from \"@fluidframework/driver-definitions/internal\";\nimport type { TelemetryEventPropertyTypeExt } from \"@fluidframework/telemetry-utils/internal\";\n\nimport type {\n\tIGarbageCollectionData,\n\tIGarbageCollectionDetailsBase,\n} from \"./garbageCollectionDefinitions.js\";\n\n/**\n * Contains the aggregation data from a Tree/Subtree.\n * @legacy @beta\n */\nexport interface ISummaryStats {\n\ttreeNodeCount: number;\n\tblobNodeCount: number;\n\thandleNodeCount: number;\n\ttotalBlobSize: number;\n\tunreferencedBlobSize: number;\n}\n\n/**\n * Represents the summary tree for a node along with the statistics for that tree.\n * For example, for a given data store, it contains the data for data store along with a subtree for\n * each of its DDS.\n * Any component that implements IChannelContext, IFluidDataStoreChannel or extends SharedObject\n * will be taking part of the summarization process.\n * @legacy @beta\n */\nexport interface ISummaryTreeWithStats {\n\t/**\n\t * Represents an aggregation of node counts and blob sizes associated to the current summary information\n\t */\n\tstats: ISummaryStats;\n\t/**\n\t * A recursive data structure that will be converted to a snapshot tree and uploaded\n\t * to the backend.\n\t */\n\tsummary: ISummaryTree;\n}\n\n/**\n * Represents a summary at a current sequence number.\n * @legacy @beta\n */\nexport interface ISummarizeResult {\n\tstats: ISummaryStats;\n\tsummary: SummaryTree;\n}\n\n/**\n * Contains the same data as ISummaryResult but in order to avoid naming collisions,\n * the data store summaries are wrapped around an array of labels identified by pathPartsForChildren.\n *\n * @example\n *\n * ```typescript\n * id:\"\"\n * pathPartsForChildren: [\"path1\"]\n * stats: ...\n * summary:\n * ...\n * \"path1\":\n * ```\n * @legacy @beta\n */\nexport interface ISummarizeInternalResult extends ISummarizeResult {\n\tid: string;\n\t/**\n\t * Additional path parts between this node's ID and its children's IDs.\n\t */\n\tpathPartsForChildren?: string[];\n}\n\n/**\n * @experimental Can be deleted/changed at any time\n * Contains the necessary information to allow DDSes to do incremental summaries\n * @legacy @beta\n */\nexport interface IExperimentalIncrementalSummaryContext {\n\t/**\n\t * The sequence number of the summary generated that will be sent to the server.\n\t */\n\treadonly summarySequenceNumber: number;\n\t/**\n\t * The sequence number of the most recent summary that was acknowledged by the server.\n\t */\n\treadonly latestSummarySequenceNumber: number;\n\t/**\n\t * The path to the runtime/datastore/dds that is used to generate summary handles\n\t * Note: Summary handles are nodes of the summary tree that point to previous parts of the last successful summary\n\t * instead of being a blob or tree node\n\t *\n\t * This path contains the id of the data store and dds which should not be leaked to layers below them. Ideally,\n\t * a layer should not know its own id. This is important for channel unification work and there has been a lot of\n\t * work to remove these kinds of leakages. Some still exist, which have to be fixed but we should not be adding\n\t * more dependencies.\n\t */\n\t// TODO: remove summaryPath\n\treadonly summaryPath: string;\n}\n\n/**\n * @legacy @beta\n */\nexport type SummarizeInternalFn = (\n\tfullTree: boolean,\n\ttrackState: boolean,\n\ttelemetryContext?: ITelemetryContext,\n\tincrementalSummaryContext?: IExperimentalIncrementalSummaryContext,\n) => Promise<ISummarizeInternalResult>;\n\n/**\n * @legacy @beta\n */\nexport interface ISummarizerNodeConfig {\n\t/**\n\t * True to reuse previous handle when unchanged since last acked summary.\n\t * Defaults to true.\n\t */\n\treadonly canReuseHandle?: boolean;\n}\n\n/**\n * @legacy @beta\n */\nexport interface ISummarizerNodeConfigWithGC extends ISummarizerNodeConfig {\n\t/**\n\t * True if GC is disabled. If so, don't track GC related state for a summary.\n\t * This is propagated to all child nodes.\n\t */\n\treadonly gcDisabled?: boolean;\n}\n\n/**\n * @legacy @beta\n */\nexport enum CreateSummarizerNodeSource {\n\tFromSummary,\n\tFromAttach,\n\tLocal,\n}\n/**\n * @legacy @beta\n */\nexport type CreateChildSummarizerNodeParam =\n\t| {\n\t\t\ttype: CreateSummarizerNodeSource.FromSummary;\n\t }\n\t| {\n\t\t\ttype: CreateSummarizerNodeSource.FromAttach;\n\t\t\tsequenceNumber: number;\n\t\t\tsnapshot: ITree;\n\t }\n\t| {\n\t\t\ttype: CreateSummarizerNodeSource.Local;\n\t };\n\n/**\n * @legacy @beta\n */\nexport interface ISummarizerNode {\n\t/**\n\t * Latest successfully acked summary reference sequence number\n\t */\n\treadonly referenceSequenceNumber: number;\n\t/**\n\t * Marks the node as having a change with the given sequence number.\n\t * @param sequenceNumber - sequence number of change\n\t */\n\tinvalidate(sequenceNumber: number): void;\n\t/**\n\t * Calls the internal summarize function and handles internal state tracking.\n\t * @param fullTree - true to skip optimizations and always generate the full tree\n\t * @param trackState - indicates whether the summarizer node should track the state of the summary or not\n\t * @param telemetryContext - summary data passed through the layers for telemetry purposes\n\t */\n\tsummarize(\n\t\tfullTree: boolean,\n\t\ttrackState?: boolean,\n\t\ttelemetryContext?: ITelemetryContext,\n\t): Promise<ISummarizeResult>;\n\t/**\n\t * Checks if there are any additional path parts for children that need to\n\t * be loaded from the base summary. Additional path parts represent parts\n\t * of the path between this SummarizerNode and any child SummarizerNodes\n\t * that it might have. For example: if datastore \"a\" contains dds \"b\", but the\n\t * path is \"/a/.channels/b\", then the additional path part is \".channels\".\n\t * @param snapshot - the base summary to parse\n\t *\n\t * @deprecated The code now always assumes that all summary nodes have .channels\n\t * in their handle so there is no need to maintain any additional path information.\n\t */\n\tupdateBaseSummaryState(snapshot: ISnapshotTree): void;\n\t/**\n\t * Records an op representing a change to this node/subtree.\n\t * @param op - op of change to record\n\t */\n\trecordChange(op: ISequencedDocumentMessage): void;\n\n\tcreateChild(\n\t\t/**\n\t\t * Summarize function\n\t\t */\n\t\tsummarizeInternalFn: SummarizeInternalFn,\n\t\t/**\n\t\t * Initial id or path part of this node\n\t\t */\n\t\tid: string,\n\t\t/**\n\t\t * Information needed to create the node.\n\t\t * If it is from a base summary, it will assert that a summary has been seen.\n\t\t * Attach information if it is created from an attach op.\n\t\t * If it is local, it will throw unsupported errors on calls to summarize.\n\t\t */\n\t\tcreateParam: CreateChildSummarizerNodeParam,\n\t\t/**\n\t\t * Optional configuration affecting summarize behavior\n\t\t */\n\t\tconfig?: ISummarizerNodeConfig,\n\t): ISummarizerNode;\n\n\tgetChild(id: string): ISummarizerNode | undefined;\n\n\t/**\n\t * True if a summary is currently in progress\n\t */\n\tisSummaryInProgress?(): boolean;\n}\n\n/**\n * Extends the functionality of ISummarizerNode to support garbage collection. It adds / updates the following APIs:\n *\n * `usedRoutes`: The routes in this node that are currently in use.\n *\n * `getGCData`: A new API that can be used to get the garbage collection data for this node.\n *\n * `summarize`: Added a trackState flag which indicates whether the summarizer node should track the state of the\n * summary or not.\n *\n * `createChild`: Added the following params:\n *\n * - `getGCDataFn`: This gets the GC data from the caller. This must be provided in order for getGCData to work.\n *\n * - `getInitialGCDetailsFn`: This gets the initial GC details from the caller.\n *\n * `deleteChild`: Deletes a child node.\n *\n * `isReferenced`: This tells whether this node is referenced in the document or not.\n *\n * `updateUsedRoutes`: Used to notify this node of routes that are currently in use in it.\n * @legacy @beta\n */\nexport interface ISummarizerNodeWithGC extends ISummarizerNode {\n\tcreateChild(\n\t\t/**\n\t\t * Summarize function\n\t\t */\n\t\tsummarizeInternalFn: SummarizeInternalFn,\n\t\t/**\n\t\t * Initial id or path part of this node\n\t\t */\n\t\tid: string,\n\t\t/**\n\t\t * Information needed to create the node.\n\t\t * If it is from a base summary, it will assert that a summary has been seen.\n\t\t * Attach information if it is created from an attach op.\n\t\t * If it is local, it will throw unsupported errors on calls to summarize.\n\t\t */\n\t\tcreateParam: CreateChildSummarizerNodeParam,\n\t\t/**\n\t\t * Optional configuration affecting summarize behavior\n\t\t */\n\t\tconfig?: ISummarizerNodeConfigWithGC,\n\t\tgetGCDataFn?: (fullGC?: boolean) => Promise<IGarbageCollectionData>,\n\t\t/**\n\t\t * @deprecated The functionality to update child's base GC details is incorporated in the summarizer node.\n\t\t */\n\t\tgetBaseGCDetailsFn?: () => Promise<IGarbageCollectionDetailsBase>,\n\t): ISummarizerNodeWithGC;\n\n\t/**\n\t * Delete the child with the given id..\n\t */\n\tdeleteChild(id: string): void;\n\n\tgetChild(id: string): ISummarizerNodeWithGC | undefined;\n\n\t/**\n\t * Returns this node's data that is used for garbage collection. This includes a list of GC nodes that represent\n\t * this node. Each node has a set of outbound routes to other GC nodes in the document.\n\t * @param fullGC - true to bypass optimizations and force full generation of GC data.\n\t */\n\tgetGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;\n\n\t/**\n\t * Tells whether this node is being referenced in this document or not. Unreferenced node will get GC'd\n\t */\n\tisReferenced(): boolean;\n\n\t/**\n\t * After GC has run, called to notify this node of routes that are used in it. These are used for the following:\n\t * 1. To identify if this node is being referenced in the document or not.\n\t * 2. To identify if this node or any of its children's used routes changed since last summary.\n\t *\n\t * @param usedRoutes - The routes that are used in this node.\n\t */\n\tupdateUsedRoutes(usedRoutes: string[]): void;\n}\n\n/**\n * @internal\n */\nexport const channelsTreeName = \".channels\";\n\n/**\n * Contains telemetry data relevant to summarization workflows.\n * This object, in contrast to ITelemetryContext, is expected to be modified directly by various summarize methods.\n * @internal\n */\nexport interface ITelemetryContextExt {\n\t/**\n\t * Sets value for telemetry data being tracked.\n\t * @param prefix - unique prefix to tag this data with (ex: \"fluid:map:\")\n\t * @param property - property name of the telemetry data being tracked (ex: \"DirectoryCount\")\n\t * @param value - value to attribute to this summary telemetry data\n\t */\n\tset(prefix: string, property: string, value: TelemetryEventPropertyTypeExt): void;\n\n\t/**\n\t * Sets multiple values for telemetry data being tracked.\n\t * @param prefix - unique prefix to tag this data with (ex: \"fluid:summarize:\")\n\t * @param property - property name of the telemetry data being tracked (ex: \"Options\")\n\t * @param values - A set of values to attribute to this summary telemetry data.\n\t */\n\tsetMultiple(\n\t\tprefix: string,\n\t\tproperty: string,\n\t\tvalues: Record<string, TelemetryEventPropertyTypeExt>,\n\t): void;\n}\n\n/**\n * Contains telemetry data relevant to summarization workflows.\n * This object is expected to be modified directly by various summarize methods.\n * @legacy @beta\n */\nexport interface ITelemetryContext {\n\t/**\n\t * Sets value for telemetry data being tracked.\n\t * @param prefix - unique prefix to tag this data with (ex: \"fluid:map:\")\n\t * @param property - property name of the telemetry data being tracked (ex: \"DirectoryCount\")\n\t * @param value - value to attribute to this summary telemetry data\n\t */\n\tset(prefix: string, property: string, value: TelemetryBaseEventPropertyType): void;\n\n\t/**\n\t * Sets multiple values for telemetry data being tracked.\n\t * @param prefix - unique prefix to tag this data with (ex: \"fluid:summarize:\")\n\t * @param property - property name of the telemetry data being tracked (ex: \"Options\")\n\t * @param values - A set of values to attribute to this summary telemetry data.\n\t */\n\tsetMultiple(\n\t\tprefix: string,\n\t\tproperty: string,\n\t\tvalues: Record<string, TelemetryBaseEventPropertyType>,\n\t): void;\n}\n\n/**\n * @internal\n */\nexport const blobCountPropertyName = \"BlobCount\";\n\n/**\n * @internal\n */\nexport const totalBlobSizePropertyName = \"TotalBlobSize\";\n"]}
@@ -44,7 +44,7 @@ export declare enum FlushModeExperimental {
44
44
  * This feature requires a version of the loader which supports reference sequence numbers. If an older version of
45
45
  * the loader is used, the runtime will fall back on FlushMode.TurnBased.
46
46
  *
47
- * @experimental - Not ready for use
47
+ * @experimental Not ready for use
48
48
  */
49
49
  Async = 2
50
50
  }
@@ -33,7 +33,7 @@ export var FlushModeExperimental;
33
33
  * This feature requires a version of the loader which supports reference sequence numbers. If an older version of
34
34
  * the loader is used, the runtime will fall back on FlushMode.TurnBased.
35
35
  *
36
- * @experimental - Not ready for use
36
+ * @experimental Not ready for use
37
37
  */
38
38
  FlushModeExperimental[FlushModeExperimental["Async"] = 2] = "Async";
39
39
  })(FlushModeExperimental || (FlushModeExperimental = {}));
@@ -1 +1 @@
1
- {"version":3,"file":"dataStoreContext.js","sourceRoot":"","sources":["../src/dataStoreContext.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAiDH;;;GAGG;AACH,MAAM,CAAN,IAAY,SAcX;AAdD,WAAY,SAAS;IACpB;;;;;OAKG;IACH,mDAAS,CAAA;IAET;;;OAGG;IACH,mDAAS,CAAA;AACV,CAAC,EAdW,SAAS,KAAT,SAAS,QAcpB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,qBAWX;AAXD,WAAY,qBAAqB;IAChC;;;;;;;;OAQG;IACH,mEAAS,CAAA;AACV,CAAC,EAXW,qBAAqB,KAArB,qBAAqB,QAWhC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC9B;;OAEG;IACH,UAAU,EAAE,YAAY;IAExB;;;;OAIG;IACH,cAAc,EAAE,gBAAgB;IAEhC;;;;;;;;OAQG;IACH,eAAe,EAAE,iBAAiB;CAClC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { AttachState, IAudience } from \"@fluidframework/container-definitions\";\nimport type { IDeltaManager } from \"@fluidframework/container-definitions/internal\";\nimport type {\n\tFluidObject,\n\tIDisposable,\n\tIEvent,\n\tIEventProvider,\n\tIFluidHandle,\n\tIRequest,\n\tIResponse,\n\tITelemetryBaseLogger,\n} from \"@fluidframework/core-interfaces\";\nimport type {\n\tIFluidHandleInternal,\n\tIProvideFluidHandleContext,\n} from \"@fluidframework/core-interfaces/internal\";\nimport type { IClientDetails, IQuorumClients } from \"@fluidframework/driver-definitions\";\nimport type {\n\tIDocumentMessage,\n\tISnapshotTree,\n\tISequencedDocumentMessage,\n} from \"@fluidframework/driver-definitions/internal\";\nimport type { IIdCompressor } from \"@fluidframework/id-compressor\";\n\nimport type { MinimumVersionForCollab } from \"./compatibilityDefinitions.js\";\nimport type {\n\tIFluidDataStoreFactory,\n\tIProvideFluidDataStoreFactory,\n} from \"./dataStoreFactory.js\";\nimport type { IProvideFluidDataStoreRegistry } from \"./dataStoreRegistry.js\";\nimport type {\n\tIGarbageCollectionData,\n\tIGarbageCollectionDetailsBase,\n} from \"./garbageCollectionDefinitions.js\";\nimport type {\n\tIInboundSignalMessage,\n\tIRuntimeMessageCollection,\n\tIRuntimeStorageService,\n} from \"./protocol.js\";\nimport type {\n\tCreateChildSummarizerNodeParam,\n\tISummarizerNodeWithGC,\n\tISummaryTreeWithStats,\n\tITelemetryContext,\n\tSummarizeInternalFn,\n} from \"./summary.js\";\n\n/**\n * Runtime flush mode handling\n * @legacy @beta\n */\nexport enum FlushMode {\n\t/**\n\t * In Immediate flush mode the runtime will immediately send all operations to the driver layer.\n\t *\n\t * @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.\n\t * See https://github.com/microsoft/FluidFramework/tree/main/packages/runtime/container-runtime/src/opLifecycle#how-batching-works\n\t */\n\tImmediate,\n\n\t/**\n\t * When in TurnBased flush mode the runtime will buffer operations in the current turn and send them as a single\n\t * batch at the end of the turn. The flush call on the runtime can be used to force send the current batch.\n\t */\n\tTurnBased,\n}\n\n/**\n * @internal\n */\nexport enum FlushModeExperimental {\n\t/**\n\t * When in Async flush mode, the runtime will accumulate all operations across JS turns and send them as a single\n\t * batch when all micro-tasks are complete.\n\t *\n\t * This feature requires a version of the loader which supports reference sequence numbers. If an older version of\n\t * the loader is used, the runtime will fall back on FlushMode.TurnBased.\n\t *\n\t * @experimental - Not ready for use\n\t */\n\tAsync = 2,\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 * @legacy @beta\n */\nexport const VisibilityState = {\n\t/**\n\t * Indicates that the object is not visible. This is the state when an object is first created.\n\t */\n\tNotVisible: \"NotVisible\",\n\n\t/**\n\t * Indicates that the object is visible locally within the container. This is the state when an object is attached\n\t * to the container's graph but the container itself isn't globally visible. The object's state goes from not\n\t * visible to locally visible.\n\t */\n\tLocallyVisible: \"LocallyVisible\",\n\n\t/**\n\t * Indicates that the object is visible globally to all clients. This is the state of an object in 2 scenarios:\n\t *\n\t * 1. It is attached to the container's graph when the container is globally visible. The object's state goes from\n\t * not visible to globally visible.\n\t *\n\t * 2. When a container becomes globally visible, all locally visible objects go from locally visible to globally\n\t * visible.\n\t */\n\tGloballyVisible: \"GloballyVisible\",\n};\n/**\n * @legacy @beta\n */\nexport type VisibilityState = (typeof VisibilityState)[keyof typeof VisibilityState];\n\n/**\n * @legacy @beta\n * @sealed\n */\nexport interface IContainerRuntimeBaseEvents extends IEvent {\n\t/**\n\t * Indicates the beginning of an incoming batch of ops\n\t * @param op - The first op in the batch. Can be inspected to learn about the sequence numbers relevant for this batch.\n\t */\n\t(event: \"batchBegin\", listener: (op: Omit<ISequencedDocumentMessage, \"contents\">) => void);\n\t/**\n\t * Indicates the end of an incoming batch of ops\n\t * @param error - If an error occurred while processing the batch, it is provided here.\n\t * @param op - The last op in the batch. Can be inspected to learn about the sequence numbers relevant for this batch.\n\t */\n\t(\n\t\tevent: \"batchEnd\",\n\t\tlistener: (error: unknown, op: Omit<ISequencedDocumentMessage, \"contents\">) => void,\n\t);\n\t/**\n\t * Indicates that an incoming op has been processed.\n\t * @param runtimeMessage - tells if op is runtime op. If it is, it was unpacked, i.e. its type and content\n\t * represent internal container runtime type / content. i.e. A grouped batch of N ops will result in N \"op\" events\n\t */\n\t(event: \"op\", listener: (op: ISequencedDocumentMessage, runtimeMessage?: boolean) => void);\n\t(event: \"signal\", listener: (message: IInboundSignalMessage, local: boolean) => void);\n\t(event: \"dispose\", listener: () => void);\n}\n\n/**\n * Encapsulates the return codes of the aliasing API.\n *\n * 'Success' - the datastore has been successfully aliased. It can now be used.\n *\n * 'Conflict' - there is already a datastore bound to the provided alias. To acquire it's entry point, use\n * the `IContainerRuntime.getAliasedDataStoreEntryPoint` function. The current datastore should be discarded\n * and will be garbage collected. The current datastore cannot be aliased to a different value.\n *\n * 'AlreadyAliased' - the datastore has already been previously bound to another alias name.\n * @legacy @beta\n */\nexport type AliasResult = \"Success\" | \"Conflict\" | \"AlreadyAliased\";\n\n/**\n * Exposes some functionality/features of a data store:\n *\n * - Handle to the data store's entryPoint\n *\n * - Fluid router for the data store\n *\n * - Can be assigned an alias\n *\n * @privateRemarks\n * TODO: These docs should define what a \"data store\" is, and not do so by just referencing \"data store\".\n *\n * @legacy @beta\n */\nexport interface IDataStore {\n\t/**\n\t * Attempt to assign an alias to the datastore.\n\t * If the operation succeeds, the datastore can be referenced\n\t * by the supplied alias and will not be garbage collected.\n\t *\n\t * @param alias - Given alias for this datastore.\n\t * @returns A promise with the {@link AliasResult}\n\t */\n\ttrySetAlias(alias: string): Promise<AliasResult>;\n\n\t/**\n\t * Exposes a handle to the root object / entryPoint of the data store. Use this as the primary way of interacting\n\t * with it.\n\t */\n\treadonly entryPoint: IFluidHandleInternal<FluidObject>;\n}\n\n/**\n * A reduced set of functionality of {@link @fluidframework/container-runtime-definitions#IContainerRuntime} that a data store context/data store runtime will need.\n * @privateRemarks\n * TODO: this should be merged into IFluidDataStoreContext\n * @legacy @beta\n * @sealed\n */\nexport interface IContainerRuntimeBase extends IEventProvider<IContainerRuntimeBaseEvents> {\n\treadonly baseLogger: ITelemetryBaseLogger;\n\treadonly clientDetails: IClientDetails;\n\treadonly disposed: boolean;\n\n\t/**\n\t * Invokes the given callback and guarantees that all operations generated within the callback will be ordered\n\t * sequentially.\n\t *\n\t * If the callback throws an error, the container will close and the error will be logged.\n\t *\n\t * @remarks\n\t * `orderSequentially` may enter staging mode for the duration of the function. This is necessary for rolling back certain op types.\n\t */\n\torderSequentially(callback: () => void): void;\n\n\t/**\n\t * Submits a container runtime level signal to be sent to other clients.\n\t * @param type - Type of the signal.\n\t * @param content - Content of the signal. Should be a JSON serializable object or primitive.\n\t * @param targetClientId - When specified, the signal is only sent to the provided client id.\n\t */\n\tsubmitSignal: (type: string, content: unknown, targetClientId?: string) => void;\n\n\t/**\n\t * Creates a data store and returns an object that exposes a handle to the data store's entryPoint, and also serves\n\t * as the data store's router. The data store is not bound to a container, and in such state is not persisted to\n\t * storage (file). Storing the entryPoint handle (or any other handle inside the data store, e.g. for DDS) into an\n\t * already attached DDS (or non-attached DDS that will eventually get attached to storage) will result in this\n\t * store being attached to storage.\n\t * @param pkg - Package name of the data store factory\n\t * @param loadingGroupId - This represents the group of the datastore within a container or its snapshot.\n\t * When not specified the datastore will belong to a `default` group. Read more about it in this\n\t * {@link https://github.com/microsoft/FluidFramework/blob/main/packages/runtime/container-runtime/README.md | README}\n\t */\n\tcreateDataStore(pkg: string | PackagePath, loadingGroupId?: string): Promise<IDataStore>;\n\n\t/**\n\t * Creates detached data store context. Only after context.attachRuntime() is called,\n\t * data store initialization is considered complete.\n\t * @param pkg - Package name of the data store factory\n\t * @param loadingGroupId - This represents the group of the datastore within a container or its snapshot.\n\t * When not specified the datastore will belong to a `default` group. Read more about it in this\n\t * {@link https://github.com/microsoft/FluidFramework/blob/main/packages/runtime/container-runtime/README.md | README}.\n\t */\n\tcreateDetachedDataStore(\n\t\tpkg: readonly string[],\n\t\tloadingGroupId?: string,\n\t): IFluidDataStoreContextDetached;\n\n\t/**\n\t * Returns the aliased data store's entryPoint, given the alias.\n\t * @param alias - The alias for the data store.\n\t * @returns The data store's entry point ({@link @fluidframework/core-interfaces#IFluidHandle}) if it exists and is aliased.\n\t * Returns undefined if no data store has been assigned the given alias.\n\t */\n\tgetAliasedDataStoreEntryPoint(alias: string): Promise<IFluidHandle<FluidObject> | undefined>;\n\n\t/**\n\t * Get an absolute url for a provided container-relative request.\n\t * Returns undefined if the container or data store isn't attached to storage.\n\t * @param relativeUrl - A relative request within the container\n\t */\n\tgetAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;\n\n\tuploadBlob(\n\t\tblob: ArrayBufferLike,\n\t\tsignal?: AbortSignal,\n\t): Promise<IFluidHandle<ArrayBufferLike>>;\n\n\t/**\n\t * Returns the current quorum.\n\t */\n\tgetQuorum(): IQuorumClients;\n\n\t/**\n\t * Returns the current audience.\n\t */\n\tgetAudience(): IAudience;\n\n\t/**\n\t * Generates a new ID that is guaranteed to be unique across all sessions for this container.\n\t * It could be in compact form (non-negative integer, opportunistic), but it could also be UUID string.\n\t * UUIDs generated will have low entropy in groups and will compress well.\n\t * It can be leveraged anywhere in container where container unique IDs are required, i.e. any place\n\t * that uses uuid() and stores result in container is likely candidate to start leveraging this API.\n\t * If you always want to convert to string, instead of doing String(generateDocumentUniqueId()), consider\n\t * doing encodeCompactIdToString(generateDocumentUniqueId()).\n\t *\n\t * @see {@link @fluidframework/id-compressor#IIdCompressor.generateDocumentUniqueId}\n\t */\n\tgenerateDocumentUniqueId(): number | string;\n\n\t/**\n\t * Api to fetch the snapshot from the service for a loadingGroupIds.\n\t * @param loadingGroupIds - LoadingGroupId for which the snapshot is asked for.\n\t * @param pathParts - Parts of the path, which we want to extract from the snapshot tree.\n\t * @returns snapshotTree and the sequence number of the snapshot.\n\t */\n\tgetSnapshotForLoadingGroupId(\n\t\tloadingGroupIds: string[],\n\t\tpathParts: string[],\n\t): Promise<{ snapshotTree: ISnapshotTree; sequenceNumber: number }>;\n}\n\n/**\n * These policies can be set by the author of the data store via its data store runtime to influence behaviors.\n *\n * @remarks\n * Policies allow data store authors to define specific behaviors or constraints for their data stores.\n * These settings can impact how the data store interacts with the runtime and other components.\n *\n * @legacy @beta\n */\nexport interface IFluidDataStorePolicies {\n\t/**\n\t * When set to true, data stores will appear to be readonly while in staging mode.\n\t *\n\t * @remarks\n\t * This policy is useful for data stores that do not support staging mode, such as those using consensus DDS.\n\t * It ensures that the data store appears readonly during staging mode to discourage unsupported operations.\n\t */\n\treadonly readonlyInStagingMode: boolean;\n}\n\n/**\n * Minimal interface a data store runtime needs to provide for IFluidDataStoreContext to bind to control.\n *\n * Functionality include attach, snapshot, op/signal processing, request routes, expose an entryPoint,\n * and connection state notifications\n * @legacy @beta\n */\nexport interface IFluidDataStoreChannel extends IDisposable {\n\t/**\n\t * Optional policies that the data store channel may adhere to that the data store context should know about.\n\t * These policies influence the behavior of the data store, such as its readonly state in specific modes.\n\t */\n\treadonly policies?: IFluidDataStorePolicies;\n\n\t/**\n\t * Makes the data store channel visible in the container. Also, runs through its graph and attaches all\n\t * bound handles that represent its dependencies in the container's graph.\n\t */\n\tmakeVisibleAndAttachGraph(): void;\n\n\t/**\n\t * Synchronously retrieves the summary used as part of the initial summary message\n\t */\n\tgetAttachSummary(telemetryContext?: ITelemetryContext): ISummaryTreeWithStats;\n\n\t/**\n\t * Synchronously retrieves GC Data (representing the outbound routes present) for the initial state of the DataStore\n\t */\n\tgetAttachGCData(telemetryContext?: ITelemetryContext): IGarbageCollectionData;\n\n\t/**\n\t * Process messages for this channel. The messages here are contiguous messages in a batch.\n\t * @param messageCollection - The collection of messages to process.\n\t */\n\tprocessMessages(messageCollection: IRuntimeMessageCollection): void;\n\n\t/**\n\t * Processes the signal.\n\t */\n\tprocessSignal(message: IInboundSignalMessage, local: boolean): void;\n\n\t/**\n\t * Generates a summary for the channel.\n\t * Introduced with summarizerNode - will be required in a future release.\n\t * @param fullTree - true to bypass optimizations and force a full summary tree.\n\t * @param trackState - This tells whether we should track state from this summary.\n\t * @param telemetryContext - summary data passed through the layers for telemetry purposes\n\t */\n\tsummarize(\n\t\tfullTree?: boolean,\n\t\ttrackState?: boolean,\n\t\ttelemetryContext?: ITelemetryContext,\n\t): Promise<ISummaryTreeWithStats>;\n\n\t/**\n\t * Returns the data used for garbage collection. This includes a list of GC nodes that represent this context\n\t * including any of its children. Each node has a list of outbound routes to other GC nodes in the document.\n\t * @param fullGC - true to bypass optimizations and force full generation of GC data.\n\t */\n\tgetGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;\n\n\t/**\n\t * After GC has run, called to notify this channel of routes that are used in it.\n\t * @param usedRoutes - The routes that are used in this channel.\n\t */\n\tupdateUsedRoutes(usedRoutes: string[]): void;\n\n\t/**\n\t * Notifies this object about changes in the connection state.\n\t * @param value - New connection state.\n\t * @param clientId - ID of the client. It's old ID when in disconnected state and\n\t * it's new client ID when we are connecting or connected.\n\t */\n\tsetConnectionState(connected: boolean, clientId?: string);\n\n\t/**\n\t * Notifies this object about changes in the readonly state\n\t */\n\tnotifyReadOnlyState?(readonly: boolean): void;\n\n\t/**\n\t * Ask the DDS to resubmit a message. This can happen for several reasons, such as:\n\t *\n\t * - We reconnected and discovered the original message was never acked.\n\t * - The original message was submitted from a reentrant state that is impossible for other clients to interpret correctly\n\t * - The original message was never sent on the wire and subsequent ops have been inbounded\n\t * @param type - The type of the original message.\n\t * @param content - The content of the original message.\n\t * @param localOpMetadata - The local metadata associated with the original message.\n\t * @param squash - If true, the DDS should avoid resubmitting any \"unnecessary intermediate state\" created by this message.\n\t * This includes any content which this message created but has since been changed or removed by subsequent messages.\n\t * For example, if this message (call it A) inserts content into a DDS that a subsequent op (call it B) removes,\n\t * resubmission of this message (call it A') should avoid inserting that content, and resubmission of the subsequent op that removed it (B') would\n\t * account for the fact that A' never inserted content.\n\t *\n\t * @privateRemarks\n\t * See remarks about squashing contract on `CommitStagedChangesOptionsExperimental`.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO (#28746): breaking change\n\treSubmit(type: string, content: any, localOpMetadata: unknown, squash?: boolean);\n\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO (#28746): breaking change\n\tapplyStashedOp(content: any): Promise<unknown>;\n\n\t/**\n\t * Revert a local message.\n\t * @param type - The type of the original message.\n\t * @param content - The content of the original message.\n\t * @param localOpMetadata - The local metadata associated with the original message.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO (#28746): breaking change\n\trollback?(type: string, content: any, localOpMetadata: unknown): void;\n\n\t/**\n\t * Exposes a handle to the root object / entryPoint of the component. Use this as the primary way of interacting\n\t * with the component.\n\t */\n\treadonly entryPoint: IFluidHandleInternal<FluidObject>;\n\n\trequest(request: IRequest): Promise<IResponse>;\n\n\tsetAttachState(attachState: AttachState.Attaching | AttachState.Attached): void;\n}\n\n/**\n * @legacy @beta\n */\nexport type CreateChildSummarizerNodeFn = (\n\tsummarizeInternal: SummarizeInternalFn,\n\tgetGCDataFn: (fullGC?: boolean) => Promise<IGarbageCollectionData>,\n\t/**\n\t * @deprecated The functionality to get base GC details has been moved to summarizer node.\n\t */\n\tgetBaseGCDetailsFn?: () => Promise<IGarbageCollectionDetailsBase>,\n) => ISummarizerNodeWithGC;\n\n/**\n * The state maintained for messages that are received when a channel isn't yet loaded.\n * @internal\n */\nexport interface IPendingMessagesState {\n\tmessageCollections: IRuntimeMessageCollection[];\n\tpendingCount: number;\n}\n\n/**\n * Context for an {@link IDataStore} like object.\n * @remarks\n * This context does NOT represent common information provided to all channels under a specific parent.\n * Each implementation of {@link IFluidDataStoreChannel} will receive its own instance of this context that contains specifically the data it needs.\n *\n * This layout is temporary, as {@link IFluidParentContext} and {@link IFluidDataStoreContext} will converge.\n * Therefore the semantics of these two interfaces is not really distinct.\n *\n * @privateRemarks\n * In addition to the use for datastores via IFluidDataStoreContext, this is implemented by ContainerRuntime to provide context to the ChannelCollection.\n *\n * @legacy @beta\n */\nexport interface IFluidParentContext\n\textends IProvideFluidHandleContext,\n\t\tPartial<IProvideFluidDataStoreRegistry> {\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO (#28746): breaking change\n\treadonly options: Record<string | number, any>;\n\treadonly clientId: string | undefined;\n\treadonly connected: boolean;\n\t/**\n\t * Indicates if the parent context is readonly. If isReadOnly is true, the consumer of\n\t * the context should also consider themselves readonly.\n\t */\n\treadonly isReadOnly?: () => boolean;\n\t/**\n\t * Minimum version of the FF runtime that is required to collaborate on new documents.\n\t * Consumed by {@link @fluidframework/container-runtime#FluidDataStoreContext}.\n\t * See {@link @fluidframework/container-runtime#LoadContainerRuntimeParams.minVersionForCollab} for more details.\n\t */\n\treadonly minVersionForCollab?: MinimumVersionForCollab;\n\treadonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n\treadonly storage: IRuntimeStorageService;\n\treadonly baseLogger: ITelemetryBaseLogger;\n\treadonly clientDetails: IClientDetails;\n\treadonly idCompressor?: IIdCompressor;\n\t/**\n\t * Represents the loading group to which the data store belongs to. Please refer to this readme for more context.\n\t * {@link https://github.com/microsoft/FluidFramework/blob/main/packages/runtime/container-runtime/README.md | README}\n\t */\n\treadonly loadingGroupId?: string;\n\t/**\n\t * Indicates the attachment state of the data store to a host service.\n\t */\n\treadonly attachState: AttachState;\n\n\treadonly containerRuntime: IContainerRuntimeBase;\n\n\t/**\n\t * Ambient services provided with the context\n\t */\n\treadonly scope: FluidObject;\n\n\t/**\n\t * @deprecated this functionality has been removed.\n\t */\n\treadonly gcThrowOnTombstoneUsage: boolean;\n\t/**\n\t * @deprecated this functionality has been removed.\n\t */\n\treadonly gcTombstoneEnforcementAllowed: boolean;\n\n\t/**\n\t * Returns the current quorum.\n\t */\n\tgetQuorum(): IQuorumClients;\n\n\t/**\n\t * Returns the current audience.\n\t */\n\tgetAudience(): IAudience;\n\n\t/**\n\t * Submits the message to be sent to other clients.\n\t * @param type - Type of the message.\n\t * @param content - Content of the message.\n\t * @param localOpMetadata - The local metadata associated with the message. This is kept locally and not sent to\n\t * the server. This will be sent back when this message is received back from the server. This is also sent if\n\t * we are asked to resubmit the message.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO (#28746): breaking change\n\tsubmitMessage(type: string, content: any, localOpMetadata: unknown): void;\n\n\t/**\n\t * Submits the signal to be sent to other clients.\n\t * @param type - Type of the signal.\n\t * @param content - Content of the signal. Should be an {@link IEnvelope} with `contents` that is a JSON\n\t * serializable object or primitive.\n\t * @param targetClientId - When specified, the signal is only sent to the provided client id.\n\t */\n\tsubmitSignal: (type: string, content: unknown, targetClientId?: string) => void;\n\n\t/**\n\t * Called to make the data store locally visible in the container. This happens automatically for root data stores\n\t * when they are marked as root. For non-root data stores, this happens when their handle is added to a visible DDS.\n\t */\n\tmakeLocallyVisible(): void;\n\n\t/**\n\t * Get an absolute url to the container based on the provided relativeUrl.\n\t * Returns undefined if the container or data store isn't attached to storage.\n\t * @param relativeUrl - A relative request within the container\n\t */\n\tgetAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;\n\n\tgetCreateChildSummarizerNodeFn(\n\t\t/**\n\t\t * Initial id or path part of this node\n\t\t */\n\t\tid: string,\n\t\t/**\n\t\t * Information needed to create the node.\n\t\t * If it is from a base summary, it will assert that a summary has been seen.\n\t\t * Attach information if it is created from an attach op.\n\t\t * If it is local, it will throw unsupported errors on calls to summarize.\n\t\t */\n\t\tcreateParam: CreateChildSummarizerNodeParam,\n\t): CreateChildSummarizerNodeFn;\n\n\tdeleteChildSummarizerNode(id: string): void;\n\n\tuploadBlob(\n\t\tblob: ArrayBufferLike,\n\t\tsignal?: AbortSignal,\n\t): Promise<IFluidHandleInternal<ArrayBufferLike>>;\n\n\t/**\n\t * Called by IFluidDataStoreChannel, indicates that a channel is dirty and needs to be part of the summary.\n\t * @param address - The address of the channel that is dirty.\n\t */\n\tsetChannelDirty(address: string): void;\n\n\t/**\n\t * Called when a new outbound reference is added to another node. This is used by garbage collection to identify\n\t * all references added in the system.\n\t *\n\t * @param fromPath - The absolute path of the node that added the reference.\n\t * @param toPath - The absolute path of the outbound node that is referenced.\n\t * @param messageTimestampMs - The timestamp of the message that added the reference.\n\t */\n\taddedGCOutboundRoute(fromPath: string, toPath: string, messageTimestampMs?: number): void;\n}\n\n/**\n * A path which selects a {@link (IFluidDataStoreFactory:interface)} within a hierarchial registry.\n * @remarks\n * Each string in the array is the \"identifier\" to pick a specific {@link NamedFluidDataStoreRegistryEntry2} within a {@link NamedFluidDataStoreRegistryEntries}.\n *\n * Due to some usages joining this array with \"/\", it is recommended to avoid using \"/\" in the strings.\n * @legacy @beta\n */\nexport type PackagePath = readonly string[];\n\n/**\n * Extension to {@link IFluidParentContext} specifically for {@link IDataStore}s.\n *\n * @remarks\n * This context is provided to the implementation of {@link IFluidDataStoreChannel} which powers the datastore.\n *\n * @legacy @beta\n */\nexport interface IFluidDataStoreContext extends IFluidParentContext {\n\treadonly id: string;\n\t/**\n\t * A data store created by a client, is a local data store for that client. Also, when a detached container loads\n\t * from a snapshot, all the data stores are treated as local data stores because at that stage the container\n\t * still doesn't exists in storage and so the data store couldn't have been created by any other client.\n\t * Value of this never changes even after the data store is attached.\n\t * As implementer of data store runtime, you can use this property to check that this data store belongs to this\n\t * client and hence implement any scenario based on that.\n\t */\n\treadonly isLocalDataStore: boolean;\n\t/**\n\t * The {@link PackagePath} of the data store as per the package factory.\n\t * @remarks\n\t * This defines what {@link (IFluidDataStoreFactory:interface)} would be used to create the {@link IDataStore.entryPoint} of the {@link IDataStore}.\n\t */\n\treadonly packagePath: PackagePath;\n\treadonly baseSnapshot: ISnapshotTree | undefined;\n\n\t/**\n\t * @deprecated 0.16 Issue #1635, #3631\n\t */\n\t// Seems like this can be removed now; the issues mentioned in the @deprecated tag are about _createDataStoreWithProps\n\t// which we finally removed in FF 2.20 (https://github.com/microsoft/FluidFramework/pull/22996).\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO (#28746): breaking change\n\treadonly createProps?: any;\n\n\t/**\n\t * @deprecated The functionality to get base GC details has been moved to summarizer node.\n\t *\n\t * Returns the GC details in the initial summary of this data store. This is used to initialize the data store\n\t * and its children with the GC details from the previous summary.\n\t */\n\tgetBaseGCDetails(): Promise<IGarbageCollectionDetailsBase>;\n\n\t/**\n\t * Synchronously creates a detached child data store.\n\t *\n\t * The `createChildDataStore` method allows for the synchronous creation of a detached child data store. This is particularly\n\t * useful in scenarios where immediate availability of the child data store is required, such as during the initialization\n\t * of a parent data store, or when creation is in response to synchronous user input.\n\t *\n\t * In order for this function to succeed:\n\t * 1. The parent data store's factory must also be an `IFluidDataStoreRegistry`.\n\t * 2. The parent data store's registry must include the same instance as the provided child factory.\n\t * 3. The parent data store's registry must synchronously provide the child factory via the `getSync` method.\n\t * 4. The child factory must implement the `createDataStore` method.\n\t *\n\t * These invariants ensure that the child data store can also be created by a remote client running the same code as this client.\n\t *\n\t * @param childFactory - The factory of the data store to be created.\n\t * @returns The created data store channel.\n\t */\n\tcreateChildDataStore?<T extends IFluidDataStoreFactory>(\n\t\tchildFactory: T,\n\t): ReturnType<Exclude<T[\"createDataStore\"], undefined>>;\n}\n\n/**\n * @legacy @beta\n */\nexport interface IFluidDataStoreContextDetached extends IFluidDataStoreContext {\n\t/**\n\t * Binds a runtime to the context.\n\t */\n\tattachRuntime(\n\t\tfactory: IProvideFluidDataStoreFactory,\n\t\tdataStoreRuntime: IFluidDataStoreChannel,\n\t): Promise<IDataStore>;\n}\n"]}
1
+ {"version":3,"file":"dataStoreContext.js","sourceRoot":"","sources":["../src/dataStoreContext.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAiDH;;;GAGG;AACH,MAAM,CAAN,IAAY,SAcX;AAdD,WAAY,SAAS;IACpB;;;;;OAKG;IACH,mDAAS,CAAA;IAET;;;OAGG;IACH,mDAAS,CAAA;AACV,CAAC,EAdW,SAAS,KAAT,SAAS,QAcpB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,qBAWX;AAXD,WAAY,qBAAqB;IAChC;;;;;;;;OAQG;IACH,mEAAS,CAAA;AACV,CAAC,EAXW,qBAAqB,KAArB,qBAAqB,QAWhC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC9B;;OAEG;IACH,UAAU,EAAE,YAAY;IAExB;;;;OAIG;IACH,cAAc,EAAE,gBAAgB;IAEhC;;;;;;;;OAQG;IACH,eAAe,EAAE,iBAAiB;CAClC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { AttachState, IAudience } from \"@fluidframework/container-definitions\";\nimport type { IDeltaManager } from \"@fluidframework/container-definitions/internal\";\nimport type {\n\tFluidObject,\n\tIDisposable,\n\tIEvent,\n\tIEventProvider,\n\tIFluidHandle,\n\tIRequest,\n\tIResponse,\n\tITelemetryBaseLogger,\n} from \"@fluidframework/core-interfaces\";\nimport type {\n\tIFluidHandleInternal,\n\tIProvideFluidHandleContext,\n} from \"@fluidframework/core-interfaces/internal\";\nimport type { IClientDetails, IQuorumClients } from \"@fluidframework/driver-definitions\";\nimport type {\n\tIDocumentMessage,\n\tISnapshotTree,\n\tISequencedDocumentMessage,\n} from \"@fluidframework/driver-definitions/internal\";\nimport type { IIdCompressor } from \"@fluidframework/id-compressor\";\n\nimport type { MinimumVersionForCollab } from \"./compatibilityDefinitions.js\";\nimport type {\n\tIFluidDataStoreFactory,\n\tIProvideFluidDataStoreFactory,\n} from \"./dataStoreFactory.js\";\nimport type { IProvideFluidDataStoreRegistry } from \"./dataStoreRegistry.js\";\nimport type {\n\tIGarbageCollectionData,\n\tIGarbageCollectionDetailsBase,\n} from \"./garbageCollectionDefinitions.js\";\nimport type {\n\tIInboundSignalMessage,\n\tIRuntimeMessageCollection,\n\tIRuntimeStorageService,\n} from \"./protocol.js\";\nimport type {\n\tCreateChildSummarizerNodeParam,\n\tISummarizerNodeWithGC,\n\tISummaryTreeWithStats,\n\tITelemetryContext,\n\tSummarizeInternalFn,\n} from \"./summary.js\";\n\n/**\n * Runtime flush mode handling\n * @legacy @beta\n */\nexport enum FlushMode {\n\t/**\n\t * In Immediate flush mode the runtime will immediately send all operations to the driver layer.\n\t *\n\t * @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.\n\t * See https://github.com/microsoft/FluidFramework/tree/main/packages/runtime/container-runtime/src/opLifecycle#how-batching-works\n\t */\n\tImmediate,\n\n\t/**\n\t * When in TurnBased flush mode the runtime will buffer operations in the current turn and send them as a single\n\t * batch at the end of the turn. The flush call on the runtime can be used to force send the current batch.\n\t */\n\tTurnBased,\n}\n\n/**\n * @internal\n */\nexport enum FlushModeExperimental {\n\t/**\n\t * When in Async flush mode, the runtime will accumulate all operations across JS turns and send them as a single\n\t * batch when all micro-tasks are complete.\n\t *\n\t * This feature requires a version of the loader which supports reference sequence numbers. If an older version of\n\t * the loader is used, the runtime will fall back on FlushMode.TurnBased.\n\t *\n\t * @experimental Not ready for use\n\t */\n\tAsync = 2,\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 * @legacy @beta\n */\nexport const VisibilityState = {\n\t/**\n\t * Indicates that the object is not visible. This is the state when an object is first created.\n\t */\n\tNotVisible: \"NotVisible\",\n\n\t/**\n\t * Indicates that the object is visible locally within the container. This is the state when an object is attached\n\t * to the container's graph but the container itself isn't globally visible. The object's state goes from not\n\t * visible to locally visible.\n\t */\n\tLocallyVisible: \"LocallyVisible\",\n\n\t/**\n\t * Indicates that the object is visible globally to all clients. This is the state of an object in 2 scenarios:\n\t *\n\t * 1. It is attached to the container's graph when the container is globally visible. The object's state goes from\n\t * not visible to globally visible.\n\t *\n\t * 2. When a container becomes globally visible, all locally visible objects go from locally visible to globally\n\t * visible.\n\t */\n\tGloballyVisible: \"GloballyVisible\",\n};\n/**\n * @legacy @beta\n */\nexport type VisibilityState = (typeof VisibilityState)[keyof typeof VisibilityState];\n\n/**\n * @legacy @beta\n * @sealed\n */\nexport interface IContainerRuntimeBaseEvents extends IEvent {\n\t/**\n\t * Indicates the beginning of an incoming batch of ops\n\t * @param op - The first op in the batch. Can be inspected to learn about the sequence numbers relevant for this batch.\n\t */\n\t(event: \"batchBegin\", listener: (op: Omit<ISequencedDocumentMessage, \"contents\">) => void);\n\t/**\n\t * Indicates the end of an incoming batch of ops\n\t * @param error - If an error occurred while processing the batch, it is provided here.\n\t * @param op - The last op in the batch. Can be inspected to learn about the sequence numbers relevant for this batch.\n\t */\n\t(\n\t\tevent: \"batchEnd\",\n\t\tlistener: (error: unknown, op: Omit<ISequencedDocumentMessage, \"contents\">) => void,\n\t);\n\t/**\n\t * Indicates that an incoming op has been processed.\n\t * @param runtimeMessage - tells if op is runtime op. If it is, it was unpacked, i.e. its type and content\n\t * represent internal container runtime type / content. i.e. A grouped batch of N ops will result in N \"op\" events\n\t */\n\t(event: \"op\", listener: (op: ISequencedDocumentMessage, runtimeMessage?: boolean) => void);\n\t(event: \"signal\", listener: (message: IInboundSignalMessage, local: boolean) => void);\n\t(event: \"dispose\", listener: () => void);\n}\n\n/**\n * Encapsulates the return codes of the aliasing API.\n *\n * 'Success' - the datastore has been successfully aliased. It can now be used.\n *\n * 'Conflict' - there is already a datastore bound to the provided alias. To acquire it's entry point, use\n * the `IContainerRuntime.getAliasedDataStoreEntryPoint` function. The current datastore should be discarded\n * and will be garbage collected. The current datastore cannot be aliased to a different value.\n *\n * 'AlreadyAliased' - the datastore has already been previously bound to another alias name.\n * @legacy @beta\n */\nexport type AliasResult = \"Success\" | \"Conflict\" | \"AlreadyAliased\";\n\n/**\n * Exposes some functionality/features of a data store:\n *\n * - Handle to the data store's entryPoint\n *\n * - Fluid router for the data store\n *\n * - Can be assigned an alias\n *\n * @privateRemarks\n * TODO: These docs should define what a \"data store\" is, and not do so by just referencing \"data store\".\n *\n * @legacy @beta\n */\nexport interface IDataStore {\n\t/**\n\t * Attempt to assign an alias to the datastore.\n\t * If the operation succeeds, the datastore can be referenced\n\t * by the supplied alias and will not be garbage collected.\n\t *\n\t * @param alias - Given alias for this datastore.\n\t * @returns A promise with the {@link AliasResult}\n\t */\n\ttrySetAlias(alias: string): Promise<AliasResult>;\n\n\t/**\n\t * Exposes a handle to the root object / entryPoint of the data store. Use this as the primary way of interacting\n\t * with it.\n\t */\n\treadonly entryPoint: IFluidHandleInternal<FluidObject>;\n}\n\n/**\n * A reduced set of functionality of {@link @fluidframework/container-runtime-definitions#IContainerRuntime} that a data store context/data store runtime will need.\n * @privateRemarks\n * TODO: this should be merged into IFluidDataStoreContext\n * @legacy @beta\n * @sealed\n */\nexport interface IContainerRuntimeBase extends IEventProvider<IContainerRuntimeBaseEvents> {\n\treadonly baseLogger: ITelemetryBaseLogger;\n\treadonly clientDetails: IClientDetails;\n\treadonly disposed: boolean;\n\n\t/**\n\t * Invokes the given callback and guarantees that all operations generated within the callback will be ordered\n\t * sequentially.\n\t *\n\t * If the callback throws an error, the container will close and the error will be logged.\n\t *\n\t * @remarks\n\t * `orderSequentially` may enter staging mode for the duration of the function. This is necessary for rolling back certain op types.\n\t */\n\torderSequentially(callback: () => void): void;\n\n\t/**\n\t * Submits a container runtime level signal to be sent to other clients.\n\t * @param type - Type of the signal.\n\t * @param content - Content of the signal. Should be a JSON serializable object or primitive.\n\t * @param targetClientId - When specified, the signal is only sent to the provided client id.\n\t */\n\tsubmitSignal: (type: string, content: unknown, targetClientId?: string) => void;\n\n\t/**\n\t * Creates a data store and returns an object that exposes a handle to the data store's entryPoint, and also serves\n\t * as the data store's router. The data store is not bound to a container, and in such state is not persisted to\n\t * storage (file). Storing the entryPoint handle (or any other handle inside the data store, e.g. for DDS) into an\n\t * already attached DDS (or non-attached DDS that will eventually get attached to storage) will result in this\n\t * store being attached to storage.\n\t * @param pkg - Package name of the data store factory\n\t * @param loadingGroupId - This represents the group of the datastore within a container or its snapshot.\n\t * When not specified the datastore will belong to a `default` group. Read more about it in this\n\t * {@link https://github.com/microsoft/FluidFramework/blob/main/packages/runtime/container-runtime/README.md | README}\n\t */\n\tcreateDataStore(pkg: string | PackagePath, loadingGroupId?: string): Promise<IDataStore>;\n\n\t/**\n\t * Creates detached data store context. Only after context.attachRuntime() is called,\n\t * data store initialization is considered complete.\n\t * @param pkg - Package name of the data store factory\n\t * @param loadingGroupId - This represents the group of the datastore within a container or its snapshot.\n\t * When not specified the datastore will belong to a `default` group. Read more about it in this\n\t * {@link https://github.com/microsoft/FluidFramework/blob/main/packages/runtime/container-runtime/README.md | README}.\n\t */\n\tcreateDetachedDataStore(\n\t\tpkg: readonly string[],\n\t\tloadingGroupId?: string,\n\t): IFluidDataStoreContextDetached;\n\n\t/**\n\t * Returns the aliased data store's entryPoint, given the alias.\n\t * @param alias - The alias for the data store.\n\t * @returns The data store's entry point ({@link @fluidframework/core-interfaces#IFluidHandle}) if it exists and is aliased.\n\t * Returns undefined if no data store has been assigned the given alias.\n\t */\n\tgetAliasedDataStoreEntryPoint(alias: string): Promise<IFluidHandle<FluidObject> | undefined>;\n\n\t/**\n\t * Get an absolute url for a provided container-relative request.\n\t * Returns undefined if the container or data store isn't attached to storage.\n\t * @param relativeUrl - A relative request within the container\n\t */\n\tgetAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;\n\n\tuploadBlob(\n\t\tblob: ArrayBufferLike,\n\t\tsignal?: AbortSignal,\n\t): Promise<IFluidHandle<ArrayBufferLike>>;\n\n\t/**\n\t * Returns the current quorum.\n\t */\n\tgetQuorum(): IQuorumClients;\n\n\t/**\n\t * Returns the current audience.\n\t */\n\tgetAudience(): IAudience;\n\n\t/**\n\t * Generates a new ID that is guaranteed to be unique across all sessions for this container.\n\t * It could be in compact form (non-negative integer, opportunistic), but it could also be UUID string.\n\t * UUIDs generated will have low entropy in groups and will compress well.\n\t * It can be leveraged anywhere in container where container unique IDs are required, i.e. any place\n\t * that uses uuid() and stores result in container is likely candidate to start leveraging this API.\n\t * If you always want to convert to string, instead of doing String(generateDocumentUniqueId()), consider\n\t * doing encodeCompactIdToString(generateDocumentUniqueId()).\n\t *\n\t * @see {@link @fluidframework/id-compressor#IIdCompressor.generateDocumentUniqueId}\n\t */\n\tgenerateDocumentUniqueId(): number | string;\n\n\t/**\n\t * Api to fetch the snapshot from the service for a loadingGroupIds.\n\t * @param loadingGroupIds - LoadingGroupId for which the snapshot is asked for.\n\t * @param pathParts - Parts of the path, which we want to extract from the snapshot tree.\n\t * @returns snapshotTree and the sequence number of the snapshot.\n\t */\n\tgetSnapshotForLoadingGroupId(\n\t\tloadingGroupIds: string[],\n\t\tpathParts: string[],\n\t): Promise<{ snapshotTree: ISnapshotTree; sequenceNumber: number }>;\n}\n\n/**\n * These policies can be set by the author of the data store via its data store runtime to influence behaviors.\n *\n * @remarks\n * Policies allow data store authors to define specific behaviors or constraints for their data stores.\n * These settings can impact how the data store interacts with the runtime and other components.\n *\n * @legacy @beta\n */\nexport interface IFluidDataStorePolicies {\n\t/**\n\t * When set to true, data stores will appear to be readonly while in staging mode.\n\t *\n\t * @remarks\n\t * This policy is useful for data stores that do not support staging mode, such as those using consensus DDS.\n\t * It ensures that the data store appears readonly during staging mode to discourage unsupported operations.\n\t */\n\treadonly readonlyInStagingMode: boolean;\n}\n\n/**\n * Minimal interface a data store runtime needs to provide for IFluidDataStoreContext to bind to control.\n *\n * Functionality include attach, snapshot, op/signal processing, request routes, expose an entryPoint,\n * and connection state notifications\n * @legacy @beta\n */\nexport interface IFluidDataStoreChannel extends IDisposable {\n\t/**\n\t * Optional policies that the data store channel may adhere to that the data store context should know about.\n\t * These policies influence the behavior of the data store, such as its readonly state in specific modes.\n\t */\n\treadonly policies?: IFluidDataStorePolicies;\n\n\t/**\n\t * Makes the data store channel visible in the container. Also, runs through its graph and attaches all\n\t * bound handles that represent its dependencies in the container's graph.\n\t */\n\tmakeVisibleAndAttachGraph(): void;\n\n\t/**\n\t * Synchronously retrieves the summary used as part of the initial summary message\n\t */\n\tgetAttachSummary(telemetryContext?: ITelemetryContext): ISummaryTreeWithStats;\n\n\t/**\n\t * Synchronously retrieves GC Data (representing the outbound routes present) for the initial state of the DataStore\n\t */\n\tgetAttachGCData(telemetryContext?: ITelemetryContext): IGarbageCollectionData;\n\n\t/**\n\t * Process messages for this channel. The messages here are contiguous messages in a batch.\n\t * @param messageCollection - The collection of messages to process.\n\t */\n\tprocessMessages(messageCollection: IRuntimeMessageCollection): void;\n\n\t/**\n\t * Processes the signal.\n\t */\n\tprocessSignal(message: IInboundSignalMessage, local: boolean): void;\n\n\t/**\n\t * Generates a summary for the channel.\n\t * Introduced with summarizerNode - will be required in a future release.\n\t * @param fullTree - true to bypass optimizations and force a full summary tree.\n\t * @param trackState - This tells whether we should track state from this summary.\n\t * @param telemetryContext - summary data passed through the layers for telemetry purposes\n\t */\n\tsummarize(\n\t\tfullTree?: boolean,\n\t\ttrackState?: boolean,\n\t\ttelemetryContext?: ITelemetryContext,\n\t): Promise<ISummaryTreeWithStats>;\n\n\t/**\n\t * Returns the data used for garbage collection. This includes a list of GC nodes that represent this context\n\t * including any of its children. Each node has a list of outbound routes to other GC nodes in the document.\n\t * @param fullGC - true to bypass optimizations and force full generation of GC data.\n\t */\n\tgetGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;\n\n\t/**\n\t * After GC has run, called to notify this channel of routes that are used in it.\n\t * @param usedRoutes - The routes that are used in this channel.\n\t */\n\tupdateUsedRoutes(usedRoutes: string[]): void;\n\n\t/**\n\t * Notifies this object about changes in the connection state.\n\t * @param value - New connection state.\n\t * @param clientId - ID of the client. It's old ID when in disconnected state and\n\t * it's new client ID when we are connecting or connected.\n\t */\n\tsetConnectionState(connected: boolean, clientId?: string);\n\n\t/**\n\t * Notifies this object about changes in the readonly state\n\t */\n\tnotifyReadOnlyState?(readonly: boolean): void;\n\n\t/**\n\t * Ask the DDS to resubmit a message. This can happen for several reasons, such as:\n\t *\n\t * - We reconnected and discovered the original message was never acked.\n\t * - The original message was submitted from a reentrant state that is impossible for other clients to interpret correctly\n\t * - The original message was never sent on the wire and subsequent ops have been inbounded\n\t * @param type - The type of the original message.\n\t * @param content - The content of the original message.\n\t * @param localOpMetadata - The local metadata associated with the original message.\n\t * @param squash - If true, the DDS should avoid resubmitting any \"unnecessary intermediate state\" created by this message.\n\t * This includes any content which this message created but has since been changed or removed by subsequent messages.\n\t * For example, if this message (call it A) inserts content into a DDS that a subsequent op (call it B) removes,\n\t * resubmission of this message (call it A') should avoid inserting that content, and resubmission of the subsequent op that removed it (B') would\n\t * account for the fact that A' never inserted content.\n\t *\n\t * @privateRemarks\n\t * See remarks about squashing contract on `CommitStagedChangesOptionsExperimental`.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO (#28746): breaking change\n\treSubmit(type: string, content: any, localOpMetadata: unknown, squash?: boolean);\n\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO (#28746): breaking change\n\tapplyStashedOp(content: any): Promise<unknown>;\n\n\t/**\n\t * Revert a local message.\n\t * @param type - The type of the original message.\n\t * @param content - The content of the original message.\n\t * @param localOpMetadata - The local metadata associated with the original message.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO (#28746): breaking change\n\trollback?(type: string, content: any, localOpMetadata: unknown): void;\n\n\t/**\n\t * Exposes a handle to the root object / entryPoint of the component. Use this as the primary way of interacting\n\t * with the component.\n\t */\n\treadonly entryPoint: IFluidHandleInternal<FluidObject>;\n\n\trequest(request: IRequest): Promise<IResponse>;\n\n\tsetAttachState(attachState: AttachState.Attaching | AttachState.Attached): void;\n}\n\n/**\n * @legacy @beta\n */\nexport type CreateChildSummarizerNodeFn = (\n\tsummarizeInternal: SummarizeInternalFn,\n\tgetGCDataFn: (fullGC?: boolean) => Promise<IGarbageCollectionData>,\n\t/**\n\t * @deprecated The functionality to get base GC details has been moved to summarizer node.\n\t */\n\tgetBaseGCDetailsFn?: () => Promise<IGarbageCollectionDetailsBase>,\n) => ISummarizerNodeWithGC;\n\n/**\n * The state maintained for messages that are received when a channel isn't yet loaded.\n * @internal\n */\nexport interface IPendingMessagesState {\n\tmessageCollections: IRuntimeMessageCollection[];\n\tpendingCount: number;\n}\n\n/**\n * Context for an {@link IDataStore} like object.\n * @remarks\n * This context does NOT represent common information provided to all channels under a specific parent.\n * Each implementation of {@link IFluidDataStoreChannel} will receive its own instance of this context that contains specifically the data it needs.\n *\n * This layout is temporary, as {@link IFluidParentContext} and {@link IFluidDataStoreContext} will converge.\n * Therefore the semantics of these two interfaces is not really distinct.\n *\n * @privateRemarks\n * In addition to the use for datastores via IFluidDataStoreContext, this is implemented by ContainerRuntime to provide context to the ChannelCollection.\n *\n * @legacy @beta\n */\nexport interface IFluidParentContext\n\textends IProvideFluidHandleContext,\n\t\tPartial<IProvideFluidDataStoreRegistry> {\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO (#28746): breaking change\n\treadonly options: Record<string | number, any>;\n\treadonly clientId: string | undefined;\n\treadonly connected: boolean;\n\t/**\n\t * Indicates if the parent context is readonly. If isReadOnly is true, the consumer of\n\t * the context should also consider themselves readonly.\n\t */\n\treadonly isReadOnly?: () => boolean;\n\t/**\n\t * Minimum version of the FF runtime that is required to collaborate on new documents.\n\t * Consumed by {@link @fluidframework/container-runtime#FluidDataStoreContext}.\n\t * See {@link @fluidframework/container-runtime#LoadContainerRuntimeParams.minVersionForCollab} for more details.\n\t */\n\treadonly minVersionForCollab?: MinimumVersionForCollab;\n\treadonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n\treadonly storage: IRuntimeStorageService;\n\treadonly baseLogger: ITelemetryBaseLogger;\n\treadonly clientDetails: IClientDetails;\n\treadonly idCompressor?: IIdCompressor;\n\t/**\n\t * Represents the loading group to which the data store belongs to. Please refer to this readme for more context.\n\t * {@link https://github.com/microsoft/FluidFramework/blob/main/packages/runtime/container-runtime/README.md | README}\n\t */\n\treadonly loadingGroupId?: string;\n\t/**\n\t * Indicates the attachment state of the data store to a host service.\n\t */\n\treadonly attachState: AttachState;\n\n\treadonly containerRuntime: IContainerRuntimeBase;\n\n\t/**\n\t * Ambient services provided with the context\n\t */\n\treadonly scope: FluidObject;\n\n\t/**\n\t * @deprecated this functionality has been removed.\n\t */\n\treadonly gcThrowOnTombstoneUsage: boolean;\n\t/**\n\t * @deprecated this functionality has been removed.\n\t */\n\treadonly gcTombstoneEnforcementAllowed: boolean;\n\n\t/**\n\t * Returns the current quorum.\n\t */\n\tgetQuorum(): IQuorumClients;\n\n\t/**\n\t * Returns the current audience.\n\t */\n\tgetAudience(): IAudience;\n\n\t/**\n\t * Submits the message to be sent to other clients.\n\t * @param type - Type of the message.\n\t * @param content - Content of the message.\n\t * @param localOpMetadata - The local metadata associated with the message. This is kept locally and not sent to\n\t * the server. This will be sent back when this message is received back from the server. This is also sent if\n\t * we are asked to resubmit the message.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO (#28746): breaking change\n\tsubmitMessage(type: string, content: any, localOpMetadata: unknown): void;\n\n\t/**\n\t * Submits the signal to be sent to other clients.\n\t * @param type - Type of the signal.\n\t * @param content - Content of the signal. Should be an {@link IEnvelope} with `contents` that is a JSON\n\t * serializable object or primitive.\n\t * @param targetClientId - When specified, the signal is only sent to the provided client id.\n\t */\n\tsubmitSignal: (type: string, content: unknown, targetClientId?: string) => void;\n\n\t/**\n\t * Called to make the data store locally visible in the container. This happens automatically for root data stores\n\t * when they are marked as root. For non-root data stores, this happens when their handle is added to a visible DDS.\n\t */\n\tmakeLocallyVisible(): void;\n\n\t/**\n\t * Get an absolute url to the container based on the provided relativeUrl.\n\t * Returns undefined if the container or data store isn't attached to storage.\n\t * @param relativeUrl - A relative request within the container\n\t */\n\tgetAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;\n\n\tgetCreateChildSummarizerNodeFn(\n\t\t/**\n\t\t * Initial id or path part of this node\n\t\t */\n\t\tid: string,\n\t\t/**\n\t\t * Information needed to create the node.\n\t\t * If it is from a base summary, it will assert that a summary has been seen.\n\t\t * Attach information if it is created from an attach op.\n\t\t * If it is local, it will throw unsupported errors on calls to summarize.\n\t\t */\n\t\tcreateParam: CreateChildSummarizerNodeParam,\n\t): CreateChildSummarizerNodeFn;\n\n\tdeleteChildSummarizerNode(id: string): void;\n\n\tuploadBlob(\n\t\tblob: ArrayBufferLike,\n\t\tsignal?: AbortSignal,\n\t): Promise<IFluidHandleInternal<ArrayBufferLike>>;\n\n\t/**\n\t * Called by IFluidDataStoreChannel, indicates that a channel is dirty and needs to be part of the summary.\n\t * @param address - The address of the channel that is dirty.\n\t */\n\tsetChannelDirty(address: string): void;\n\n\t/**\n\t * Called when a new outbound reference is added to another node. This is used by garbage collection to identify\n\t * all references added in the system.\n\t *\n\t * @param fromPath - The absolute path of the node that added the reference.\n\t * @param toPath - The absolute path of the outbound node that is referenced.\n\t * @param messageTimestampMs - The timestamp of the message that added the reference.\n\t */\n\taddedGCOutboundRoute(fromPath: string, toPath: string, messageTimestampMs?: number): void;\n}\n\n/**\n * A path which selects a {@link (IFluidDataStoreFactory:interface)} within a hierarchial registry.\n * @remarks\n * Each string in the array is the \"identifier\" to pick a specific {@link NamedFluidDataStoreRegistryEntry2} within a {@link NamedFluidDataStoreRegistryEntries}.\n *\n * Due to some usages joining this array with \"/\", it is recommended to avoid using \"/\" in the strings.\n * @legacy @beta\n */\nexport type PackagePath = readonly string[];\n\n/**\n * Extension to {@link IFluidParentContext} specifically for {@link IDataStore}s.\n *\n * @remarks\n * This context is provided to the implementation of {@link IFluidDataStoreChannel} which powers the datastore.\n *\n * @legacy @beta\n */\nexport interface IFluidDataStoreContext extends IFluidParentContext {\n\treadonly id: string;\n\t/**\n\t * A data store created by a client, is a local data store for that client. Also, when a detached container loads\n\t * from a snapshot, all the data stores are treated as local data stores because at that stage the container\n\t * still doesn't exists in storage and so the data store couldn't have been created by any other client.\n\t * Value of this never changes even after the data store is attached.\n\t * As implementer of data store runtime, you can use this property to check that this data store belongs to this\n\t * client and hence implement any scenario based on that.\n\t */\n\treadonly isLocalDataStore: boolean;\n\t/**\n\t * The {@link PackagePath} of the data store as per the package factory.\n\t * @remarks\n\t * This defines what {@link (IFluidDataStoreFactory:interface)} would be used to create the {@link IDataStore.entryPoint} of the {@link IDataStore}.\n\t */\n\treadonly packagePath: PackagePath;\n\treadonly baseSnapshot: ISnapshotTree | undefined;\n\n\t/**\n\t * @deprecated 0.16 Issue #1635, #3631\n\t */\n\t// Seems like this can be removed now; the issues mentioned in the @deprecated tag are about _createDataStoreWithProps\n\t// which we finally removed in FF 2.20 (https://github.com/microsoft/FluidFramework/pull/22996).\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO (#28746): breaking change\n\treadonly createProps?: any;\n\n\t/**\n\t * @deprecated The functionality to get base GC details has been moved to summarizer node.\n\t *\n\t * Returns the GC details in the initial summary of this data store. This is used to initialize the data store\n\t * and its children with the GC details from the previous summary.\n\t */\n\tgetBaseGCDetails(): Promise<IGarbageCollectionDetailsBase>;\n\n\t/**\n\t * Synchronously creates a detached child data store.\n\t *\n\t * The `createChildDataStore` method allows for the synchronous creation of a detached child data store. This is particularly\n\t * useful in scenarios where immediate availability of the child data store is required, such as during the initialization\n\t * of a parent data store, or when creation is in response to synchronous user input.\n\t *\n\t * In order for this function to succeed:\n\t * 1. The parent data store's factory must also be an `IFluidDataStoreRegistry`.\n\t * 2. The parent data store's registry must include the same instance as the provided child factory.\n\t * 3. The parent data store's registry must synchronously provide the child factory via the `getSync` method.\n\t * 4. The child factory must implement the `createDataStore` method.\n\t *\n\t * These invariants ensure that the child data store can also be created by a remote client running the same code as this client.\n\t *\n\t * @param childFactory - The factory of the data store to be created.\n\t * @returns The created data store channel.\n\t */\n\tcreateChildDataStore?<T extends IFluidDataStoreFactory>(\n\t\tchildFactory: T,\n\t): ReturnType<Exclude<T[\"createDataStore\"], undefined>>;\n}\n\n/**\n * @legacy @beta\n */\nexport interface IFluidDataStoreContextDetached extends IFluidDataStoreContext {\n\t/**\n\t * Binds a runtime to the context.\n\t */\n\tattachRuntime(\n\t\tfactory: IProvideFluidDataStoreFactory,\n\t\tdataStoreRuntime: IFluidDataStoreChannel,\n\t): Promise<IDataStore>;\n}\n"]}
package/lib/protocol.d.ts CHANGED
@@ -114,7 +114,7 @@ export interface IRuntimeStorageService {
114
114
  * Whether or not the object has been disposed.
115
115
  * If true, the object should be considered invalid, and its other state should be disregarded.
116
116
  *
117
- * @deprecated - This API is deprecated and will be removed in a future release. No replacement is planned as
117
+ * @deprecated This API is deprecated and will be removed in a future release. No replacement is planned as
118
118
  * it is unused in the DataStore layer.
119
119
  */
120
120
  readonly disposed?: boolean;
@@ -123,42 +123,42 @@ export interface IRuntimeStorageService {
123
123
  * @param error - Optional error indicating the reason for the disposal, if the object was
124
124
  * disposed as the result of an error.
125
125
  *
126
- * @deprecated - This API is deprecated and will be removed in a future release. No replacement is planned as
126
+ * @deprecated This API is deprecated and will be removed in a future release. No replacement is planned as
127
127
  * it is unused in the DataStore layer.
128
128
  */
129
129
  dispose?(error?: Error): void;
130
130
  /**
131
- * @deprecated - This will be removed in a future release. No replacement is planned as
131
+ * @deprecated This will be removed in a future release. No replacement is planned as
132
132
  * it is unused in the DataStore layer.
133
133
  */
134
134
  readonly policies?: IDocumentStorageServicePolicies | undefined;
135
135
  /**
136
- * @deprecated - This will be removed in a future release. No replacement is planned as
136
+ * @deprecated This will be removed in a future release. No replacement is planned as
137
137
  * it is unused in the DataStore layer.
138
138
  */
139
139
  getSnapshotTree(version?: IVersion, scenarioName?: string): Promise<ISnapshotTree | null>;
140
140
  /**
141
- * @deprecated - This will be removed in a future release. No replacement is planned as
141
+ * @deprecated This will be removed in a future release. No replacement is planned as
142
142
  * it is unused in the DataStore layer.
143
143
  */
144
144
  getSnapshot?(snapshotFetchOptions?: ISnapshotFetchOptions): Promise<ISnapshot>;
145
145
  /**
146
- * @deprecated - This will be removed in a future release. No replacement is planned as
146
+ * @deprecated This will be removed in a future release. No replacement is planned as
147
147
  * it is unused in the DataStore layer.
148
148
  */
149
149
  getVersions(versionId: string | null, count: number, scenarioName?: string, fetchSource?: FetchSource): Promise<IVersion[]>;
150
150
  /**
151
- * @deprecated - This will be removed in a future release. No replacement is planned as
151
+ * @deprecated This will be removed in a future release. No replacement is planned as
152
152
  * it is unused in the DataStore layer.
153
153
  */
154
154
  createBlob(file: ArrayBufferLike): Promise<ICreateBlobResponse>;
155
155
  /**
156
- * @deprecated - This will be removed in a future release. No replacement is planned as
156
+ * @deprecated This will be removed in a future release. No replacement is planned as
157
157
  * it is unused in the DataStore layer.
158
158
  */
159
159
  uploadSummaryWithContext(summary: ISummaryTree, context: ISummaryContext): Promise<string>;
160
160
  /**
161
- * @deprecated - This will be removed in a future release. No replacement is planned as
161
+ * @deprecated This will be removed in a future release. No replacement is planned as
162
162
  * it is unused in the DataStore layer.
163
163
  */
164
164
  downloadSummary(handle: ISummaryHandle): Promise<ISummaryTree>;
@@ -1 +1 @@
1
- {"version":3,"file":"protocol.js","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { TypedMessage } from \"@fluidframework/core-interfaces/internal\";\nimport type {\n\tITree,\n\tISignalMessage,\n\tISequencedDocumentMessage,\n\tIDocumentStorageServicePolicies,\n\tIVersion,\n\tISnapshotTree,\n\tISnapshotFetchOptions,\n\tISnapshot,\n\tFetchSource,\n\tICreateBlobResponse,\n\tISummaryTree,\n\tISummaryHandle,\n\tISummaryContext,\n} from \"@fluidframework/driver-definitions/internal\";\n\n/**\n * An envelope wraps the contents with the intended target\n * @legacy @beta\n */\nexport interface IEnvelope {\n\t/**\n\t * The target for the envelope\n\t */\n\taddress: string;\n\n\t/**\n\t * The contents of the envelope\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO (#28746): breaking change\n\tcontents: any;\n}\n\n/**\n * Represents ISignalMessage with its type.\n * @legacy @beta\n */\nexport interface IInboundSignalMessage<TMessage extends TypedMessage = TypedMessage>\n\textends ISignalMessage<TMessage> {\n\treadonly type: TMessage[\"type\"];\n}\n\n/**\n * Message send by client attaching local data structure.\n * Contains snapshot of data structure which is the current state of this data structure.\n * @legacy @beta\n */\nexport interface IAttachMessage {\n\t/**\n\t * The identifier for the object\n\t */\n\tid: string;\n\n\t/**\n\t * The type of object\n\t */\n\ttype: string;\n\n\t/**\n\t * Initial snapshot of the document (contains ownership)\n\t */\n\tsnapshot: ITree;\n}\n\n/**\n * This type should be used when reading an incoming attach op,\n * but it should not be used when creating a new attach op.\n * Older versions of attach messages could have null snapshots,\n * so this gives correct typings for writing backward compatible code.\n * @legacy @beta\n */\nexport type InboundAttachMessage = Omit<IAttachMessage, \"snapshot\"> & {\n\t// eslint-disable-next-line @rushstack/no-new-null -- TODO: breaking change; protocol might even explicitly use null\n\tsnapshot: IAttachMessage[\"snapshot\"] | null;\n};\n\n/**\n * This is the message type that is used within the runtime when processing a sequenced message.\n * It is the same as ISequencedDocumentMessage, but without the contents and clientSequenceNumbers\n * which are sent separately. The contents are modified at multiple layers in the stack so having it\n * separate doesn't require packing and unpacking the entire message.\n * @legacy @beta\n */\nexport type ISequencedMessageEnvelope = Omit<\n\tISequencedDocumentMessage,\n\t\"contents\" | \"clientSequenceNumber\"\n>;\n\n/**\n * These are the contents of a runtime message as it is processed throughout the stack.\n * @legacy @beta\n * @sealed\n */\nexport interface IRuntimeMessagesContent {\n\t/**\n\t * The contents of the message, i.e., the payload\n\t */\n\treadonly contents: unknown;\n\t/**\n\t * The local metadata associated with the original message that was submitted\n\t */\n\treadonly localOpMetadata: unknown;\n\t/**\n\t * The client sequence number of the message\n\t */\n\treadonly clientSequenceNumber: number;\n}\n\n/**\n * A collection of messages that are processed by the runtime.\n * @legacy @beta\n * @sealed\n */\nexport interface IRuntimeMessageCollection {\n\t/**\n\t * The envelope for all the messages in the collection\n\t */\n\treadonly envelope: ISequencedMessageEnvelope;\n\t/**\n\t * Whether these messages were originally generated by the client processing them\n\t */\n\treadonly local: boolean;\n\t/**\n\t * The contents of the messages in the collection\n\t */\n\treadonly messagesContent: readonly IRuntimeMessagesContent[];\n}\n\n/**\n * Interface to provide access to snapshot blobs to DataStore layer.\n *\n * @legacy @beta\n */\nexport interface IRuntimeStorageService {\n\t/**\n\t * Reads the object with the given ID, returns content in arrayBufferLike\n\t */\n\treadBlob(id: string): Promise<ArrayBufferLike>;\n\n\t/**\n\t * Whether or not the object has been disposed.\n\t * If true, the object should be considered invalid, and its other state should be disregarded.\n\t *\n\t * @deprecated - This API is deprecated and will be removed in a future release. No replacement is planned as\n\t * it is unused in the DataStore layer.\n\t */\n\treadonly disposed?: boolean;\n\n\t/**\n\t * Dispose of the object and its resources.\n\t * @param error - Optional error indicating the reason for the disposal, if the object was\n\t * disposed as the result of an error.\n\t *\n\t * @deprecated - This API is deprecated and will be removed in a future release. No replacement is planned as\n\t * it is unused in the DataStore layer.\n\t */\n\tdispose?(error?: Error): void;\n\n\t/**\n\t * @deprecated - This will be removed in a future release. No replacement is planned as\n\t * it is unused in the DataStore layer.\n\t */\n\treadonly policies?: IDocumentStorageServicePolicies | undefined;\n\n\t/**\n\t * @deprecated - This will be removed in a future release. No replacement is planned as\n\t * it is unused in the DataStore layer.\n\t */\n\t// eslint-disable-next-line @rushstack/no-new-null\n\tgetSnapshotTree(version?: IVersion, scenarioName?: string): Promise<ISnapshotTree | null>;\n\n\t/**\n\t * @deprecated - This will be removed in a future release. No replacement is planned as\n\t * it is unused in the DataStore layer.\n\t */\n\tgetSnapshot?(snapshotFetchOptions?: ISnapshotFetchOptions): Promise<ISnapshot>;\n\n\t/**\n\t * @deprecated - This will be removed in a future release. No replacement is planned as\n\t * it is unused in the DataStore layer.\n\t */\n\tgetVersions(\n\t\t// TODO: use `undefined` instead.\n\t\t// eslint-disable-next-line @rushstack/no-new-null\n\t\tversionId: string | null,\n\t\tcount: number,\n\t\tscenarioName?: string,\n\t\tfetchSource?: FetchSource,\n\t): Promise<IVersion[]>;\n\n\t/**\n\t * @deprecated - This will be removed in a future release. No replacement is planned as\n\t * it is unused in the DataStore layer.\n\t */\n\tcreateBlob(file: ArrayBufferLike): Promise<ICreateBlobResponse>;\n\n\t/**\n\t * @deprecated - This will be removed in a future release. No replacement is planned as\n\t * it is unused in the DataStore layer.\n\t */\n\tuploadSummaryWithContext(summary: ISummaryTree, context: ISummaryContext): Promise<string>;\n\n\t/**\n\t * @deprecated - This will be removed in a future release. No replacement is planned as\n\t * it is unused in the DataStore layer.\n\t */\n\tdownloadSummary(handle: ISummaryHandle): Promise<ISummaryTree>;\n}\n"]}
1
+ {"version":3,"file":"protocol.js","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { TypedMessage } from \"@fluidframework/core-interfaces/internal\";\nimport type {\n\tITree,\n\tISignalMessage,\n\tISequencedDocumentMessage,\n\tIDocumentStorageServicePolicies,\n\tIVersion,\n\tISnapshotTree,\n\tISnapshotFetchOptions,\n\tISnapshot,\n\tFetchSource,\n\tICreateBlobResponse,\n\tISummaryTree,\n\tISummaryHandle,\n\tISummaryContext,\n} from \"@fluidframework/driver-definitions/internal\";\n\n/**\n * An envelope wraps the contents with the intended target\n * @legacy @beta\n */\nexport interface IEnvelope {\n\t/**\n\t * The target for the envelope\n\t */\n\taddress: string;\n\n\t/**\n\t * The contents of the envelope\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO (#28746): breaking change\n\tcontents: any;\n}\n\n/**\n * Represents ISignalMessage with its type.\n * @legacy @beta\n */\nexport interface IInboundSignalMessage<TMessage extends TypedMessage = TypedMessage>\n\textends ISignalMessage<TMessage> {\n\treadonly type: TMessage[\"type\"];\n}\n\n/**\n * Message send by client attaching local data structure.\n * Contains snapshot of data structure which is the current state of this data structure.\n * @legacy @beta\n */\nexport interface IAttachMessage {\n\t/**\n\t * The identifier for the object\n\t */\n\tid: string;\n\n\t/**\n\t * The type of object\n\t */\n\ttype: string;\n\n\t/**\n\t * Initial snapshot of the document (contains ownership)\n\t */\n\tsnapshot: ITree;\n}\n\n/**\n * This type should be used when reading an incoming attach op,\n * but it should not be used when creating a new attach op.\n * Older versions of attach messages could have null snapshots,\n * so this gives correct typings for writing backward compatible code.\n * @legacy @beta\n */\nexport type InboundAttachMessage = Omit<IAttachMessage, \"snapshot\"> & {\n\t// eslint-disable-next-line @rushstack/no-new-null -- TODO: breaking change; protocol might even explicitly use null\n\tsnapshot: IAttachMessage[\"snapshot\"] | null;\n};\n\n/**\n * This is the message type that is used within the runtime when processing a sequenced message.\n * It is the same as ISequencedDocumentMessage, but without the contents and clientSequenceNumbers\n * which are sent separately. The contents are modified at multiple layers in the stack so having it\n * separate doesn't require packing and unpacking the entire message.\n * @legacy @beta\n */\nexport type ISequencedMessageEnvelope = Omit<\n\tISequencedDocumentMessage,\n\t\"contents\" | \"clientSequenceNumber\"\n>;\n\n/**\n * These are the contents of a runtime message as it is processed throughout the stack.\n * @legacy @beta\n * @sealed\n */\nexport interface IRuntimeMessagesContent {\n\t/**\n\t * The contents of the message, i.e., the payload\n\t */\n\treadonly contents: unknown;\n\t/**\n\t * The local metadata associated with the original message that was submitted\n\t */\n\treadonly localOpMetadata: unknown;\n\t/**\n\t * The client sequence number of the message\n\t */\n\treadonly clientSequenceNumber: number;\n}\n\n/**\n * A collection of messages that are processed by the runtime.\n * @legacy @beta\n * @sealed\n */\nexport interface IRuntimeMessageCollection {\n\t/**\n\t * The envelope for all the messages in the collection\n\t */\n\treadonly envelope: ISequencedMessageEnvelope;\n\t/**\n\t * Whether these messages were originally generated by the client processing them\n\t */\n\treadonly local: boolean;\n\t/**\n\t * The contents of the messages in the collection\n\t */\n\treadonly messagesContent: readonly IRuntimeMessagesContent[];\n}\n\n/**\n * Interface to provide access to snapshot blobs to DataStore layer.\n *\n * @legacy @beta\n */\nexport interface IRuntimeStorageService {\n\t/**\n\t * Reads the object with the given ID, returns content in arrayBufferLike\n\t */\n\treadBlob(id: string): Promise<ArrayBufferLike>;\n\n\t/**\n\t * Whether or not the object has been disposed.\n\t * If true, the object should be considered invalid, and its other state should be disregarded.\n\t *\n\t * @deprecated This API is deprecated and will be removed in a future release. No replacement is planned as\n\t * it is unused in the DataStore layer.\n\t */\n\treadonly disposed?: boolean;\n\n\t/**\n\t * Dispose of the object and its resources.\n\t * @param error - Optional error indicating the reason for the disposal, if the object was\n\t * disposed as the result of an error.\n\t *\n\t * @deprecated This API is deprecated and will be removed in a future release. No replacement is planned as\n\t * it is unused in the DataStore layer.\n\t */\n\tdispose?(error?: Error): void;\n\n\t/**\n\t * @deprecated This will be removed in a future release. No replacement is planned as\n\t * it is unused in the DataStore layer.\n\t */\n\treadonly policies?: IDocumentStorageServicePolicies | undefined;\n\n\t/**\n\t * @deprecated This will be removed in a future release. No replacement is planned as\n\t * it is unused in the DataStore layer.\n\t */\n\t// eslint-disable-next-line @rushstack/no-new-null\n\tgetSnapshotTree(version?: IVersion, scenarioName?: string): Promise<ISnapshotTree | null>;\n\n\t/**\n\t * @deprecated This will be removed in a future release. No replacement is planned as\n\t * it is unused in the DataStore layer.\n\t */\n\tgetSnapshot?(snapshotFetchOptions?: ISnapshotFetchOptions): Promise<ISnapshot>;\n\n\t/**\n\t * @deprecated This will be removed in a future release. No replacement is planned as\n\t * it is unused in the DataStore layer.\n\t */\n\tgetVersions(\n\t\t// TODO: use `undefined` instead.\n\t\t// eslint-disable-next-line @rushstack/no-new-null\n\t\tversionId: string | null,\n\t\tcount: number,\n\t\tscenarioName?: string,\n\t\tfetchSource?: FetchSource,\n\t): Promise<IVersion[]>;\n\n\t/**\n\t * @deprecated This will be removed in a future release. No replacement is planned as\n\t * it is unused in the DataStore layer.\n\t */\n\tcreateBlob(file: ArrayBufferLike): Promise<ICreateBlobResponse>;\n\n\t/**\n\t * @deprecated This will be removed in a future release. No replacement is planned as\n\t * it is unused in the DataStore layer.\n\t */\n\tuploadSummaryWithContext(summary: ISummaryTree, context: ISummaryContext): Promise<string>;\n\n\t/**\n\t * @deprecated This will be removed in a future release. No replacement is planned as\n\t * it is unused in the DataStore layer.\n\t */\n\tdownloadSummary(handle: ISummaryHandle): Promise<ISummaryTree>;\n}\n"]}
package/lib/summary.d.ts CHANGED
@@ -68,7 +68,7 @@ export interface ISummarizeInternalResult extends ISummarizeResult {
68
68
  pathPartsForChildren?: string[];
69
69
  }
70
70
  /**
71
- * @experimental - Can be deleted/changed at any time
71
+ * @experimental Can be deleted/changed at any time
72
72
  * Contains the necessary information to allow DDSes to do incremental summaries
73
73
  * @legacy @beta
74
74
  */
@@ -1 +1 @@
1
- {"version":3,"file":"summary.js","sourceRoot":"","sources":["../src/summary.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA8IH;;GAEG;AACH,MAAM,CAAN,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IACrC,yFAAW,CAAA;IACX,uFAAU,CAAA;IACV,6EAAK,CAAA;AACN,CAAC,EAJW,0BAA0B,KAA1B,0BAA0B,QAIrC;AAyKD;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,WAAW,CAAC;AAwD5C;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,WAAW,CAAC;AAEjD;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,eAAe,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { TelemetryBaseEventPropertyType } from \"@fluidframework/core-interfaces\";\nimport type {\n\tISnapshotTree,\n\tISummaryTree,\n\tITree,\n\tSummaryTree,\n\tISequencedDocumentMessage,\n} from \"@fluidframework/driver-definitions/internal\";\nimport type { TelemetryEventPropertyTypeExt } from \"@fluidframework/telemetry-utils/internal\";\n\nimport type {\n\tIGarbageCollectionData,\n\tIGarbageCollectionDetailsBase,\n} from \"./garbageCollectionDefinitions.js\";\n\n/**\n * Contains the aggregation data from a Tree/Subtree.\n * @legacy @beta\n */\nexport interface ISummaryStats {\n\ttreeNodeCount: number;\n\tblobNodeCount: number;\n\thandleNodeCount: number;\n\ttotalBlobSize: number;\n\tunreferencedBlobSize: number;\n}\n\n/**\n * Represents the summary tree for a node along with the statistics for that tree.\n * For example, for a given data store, it contains the data for data store along with a subtree for\n * each of its DDS.\n * Any component that implements IChannelContext, IFluidDataStoreChannel or extends SharedObject\n * will be taking part of the summarization process.\n * @legacy @beta\n */\nexport interface ISummaryTreeWithStats {\n\t/**\n\t * Represents an aggregation of node counts and blob sizes associated to the current summary information\n\t */\n\tstats: ISummaryStats;\n\t/**\n\t * A recursive data structure that will be converted to a snapshot tree and uploaded\n\t * to the backend.\n\t */\n\tsummary: ISummaryTree;\n}\n\n/**\n * Represents a summary at a current sequence number.\n * @legacy @beta\n */\nexport interface ISummarizeResult {\n\tstats: ISummaryStats;\n\tsummary: SummaryTree;\n}\n\n/**\n * Contains the same data as ISummaryResult but in order to avoid naming collisions,\n * the data store summaries are wrapped around an array of labels identified by pathPartsForChildren.\n *\n * @example\n *\n * ```typescript\n * id:\"\"\n * pathPartsForChildren: [\"path1\"]\n * stats: ...\n * summary:\n * ...\n * \"path1\":\n * ```\n * @legacy @beta\n */\nexport interface ISummarizeInternalResult extends ISummarizeResult {\n\tid: string;\n\t/**\n\t * Additional path parts between this node's ID and its children's IDs.\n\t */\n\tpathPartsForChildren?: string[];\n}\n\n/**\n * @experimental - Can be deleted/changed at any time\n * Contains the necessary information to allow DDSes to do incremental summaries\n * @legacy @beta\n */\nexport interface IExperimentalIncrementalSummaryContext {\n\t/**\n\t * The sequence number of the summary generated that will be sent to the server.\n\t */\n\treadonly summarySequenceNumber: number;\n\t/**\n\t * The sequence number of the most recent summary that was acknowledged by the server.\n\t */\n\treadonly latestSummarySequenceNumber: number;\n\t/**\n\t * The path to the runtime/datastore/dds that is used to generate summary handles\n\t * Note: Summary handles are nodes of the summary tree that point to previous parts of the last successful summary\n\t * instead of being a blob or tree node\n\t *\n\t * This path contains the id of the data store and dds which should not be leaked to layers below them. Ideally,\n\t * a layer should not know its own id. This is important for channel unification work and there has been a lot of\n\t * work to remove these kinds of leakages. Some still exist, which have to be fixed but we should not be adding\n\t * more dependencies.\n\t */\n\t// TODO: remove summaryPath\n\treadonly summaryPath: string;\n}\n\n/**\n * @legacy @beta\n */\nexport type SummarizeInternalFn = (\n\tfullTree: boolean,\n\ttrackState: boolean,\n\ttelemetryContext?: ITelemetryContext,\n\tincrementalSummaryContext?: IExperimentalIncrementalSummaryContext,\n) => Promise<ISummarizeInternalResult>;\n\n/**\n * @legacy @beta\n */\nexport interface ISummarizerNodeConfig {\n\t/**\n\t * True to reuse previous handle when unchanged since last acked summary.\n\t * Defaults to true.\n\t */\n\treadonly canReuseHandle?: boolean;\n}\n\n/**\n * @legacy @beta\n */\nexport interface ISummarizerNodeConfigWithGC extends ISummarizerNodeConfig {\n\t/**\n\t * True if GC is disabled. If so, don't track GC related state for a summary.\n\t * This is propagated to all child nodes.\n\t */\n\treadonly gcDisabled?: boolean;\n}\n\n/**\n * @legacy @beta\n */\nexport enum CreateSummarizerNodeSource {\n\tFromSummary,\n\tFromAttach,\n\tLocal,\n}\n/**\n * @legacy @beta\n */\nexport type CreateChildSummarizerNodeParam =\n\t| {\n\t\t\ttype: CreateSummarizerNodeSource.FromSummary;\n\t }\n\t| {\n\t\t\ttype: CreateSummarizerNodeSource.FromAttach;\n\t\t\tsequenceNumber: number;\n\t\t\tsnapshot: ITree;\n\t }\n\t| {\n\t\t\ttype: CreateSummarizerNodeSource.Local;\n\t };\n\n/**\n * @legacy @beta\n */\nexport interface ISummarizerNode {\n\t/**\n\t * Latest successfully acked summary reference sequence number\n\t */\n\treadonly referenceSequenceNumber: number;\n\t/**\n\t * Marks the node as having a change with the given sequence number.\n\t * @param sequenceNumber - sequence number of change\n\t */\n\tinvalidate(sequenceNumber: number): void;\n\t/**\n\t * Calls the internal summarize function and handles internal state tracking.\n\t * @param fullTree - true to skip optimizations and always generate the full tree\n\t * @param trackState - indicates whether the summarizer node should track the state of the summary or not\n\t * @param telemetryContext - summary data passed through the layers for telemetry purposes\n\t */\n\tsummarize(\n\t\tfullTree: boolean,\n\t\ttrackState?: boolean,\n\t\ttelemetryContext?: ITelemetryContext,\n\t): Promise<ISummarizeResult>;\n\t/**\n\t * Checks if there are any additional path parts for children that need to\n\t * be loaded from the base summary. Additional path parts represent parts\n\t * of the path between this SummarizerNode and any child SummarizerNodes\n\t * that it might have. For example: if datastore \"a\" contains dds \"b\", but the\n\t * path is \"/a/.channels/b\", then the additional path part is \".channels\".\n\t * @param snapshot - the base summary to parse\n\t *\n\t * @deprecated The code now always assumes that all summary nodes have .channels\n\t * in their handle so there is no need to maintain any additional path information.\n\t */\n\tupdateBaseSummaryState(snapshot: ISnapshotTree): void;\n\t/**\n\t * Records an op representing a change to this node/subtree.\n\t * @param op - op of change to record\n\t */\n\trecordChange(op: ISequencedDocumentMessage): void;\n\n\tcreateChild(\n\t\t/**\n\t\t * Summarize function\n\t\t */\n\t\tsummarizeInternalFn: SummarizeInternalFn,\n\t\t/**\n\t\t * Initial id or path part of this node\n\t\t */\n\t\tid: string,\n\t\t/**\n\t\t * Information needed to create the node.\n\t\t * If it is from a base summary, it will assert that a summary has been seen.\n\t\t * Attach information if it is created from an attach op.\n\t\t * If it is local, it will throw unsupported errors on calls to summarize.\n\t\t */\n\t\tcreateParam: CreateChildSummarizerNodeParam,\n\t\t/**\n\t\t * Optional configuration affecting summarize behavior\n\t\t */\n\t\tconfig?: ISummarizerNodeConfig,\n\t): ISummarizerNode;\n\n\tgetChild(id: string): ISummarizerNode | undefined;\n\n\t/**\n\t * True if a summary is currently in progress\n\t */\n\tisSummaryInProgress?(): boolean;\n}\n\n/**\n * Extends the functionality of ISummarizerNode to support garbage collection. It adds / updates the following APIs:\n *\n * `usedRoutes`: The routes in this node that are currently in use.\n *\n * `getGCData`: A new API that can be used to get the garbage collection data for this node.\n *\n * `summarize`: Added a trackState flag which indicates whether the summarizer node should track the state of the\n * summary or not.\n *\n * `createChild`: Added the following params:\n *\n * - `getGCDataFn`: This gets the GC data from the caller. This must be provided in order for getGCData to work.\n *\n * - `getInitialGCDetailsFn`: This gets the initial GC details from the caller.\n *\n * `deleteChild`: Deletes a child node.\n *\n * `isReferenced`: This tells whether this node is referenced in the document or not.\n *\n * `updateUsedRoutes`: Used to notify this node of routes that are currently in use in it.\n * @legacy @beta\n */\nexport interface ISummarizerNodeWithGC extends ISummarizerNode {\n\tcreateChild(\n\t\t/**\n\t\t * Summarize function\n\t\t */\n\t\tsummarizeInternalFn: SummarizeInternalFn,\n\t\t/**\n\t\t * Initial id or path part of this node\n\t\t */\n\t\tid: string,\n\t\t/**\n\t\t * Information needed to create the node.\n\t\t * If it is from a base summary, it will assert that a summary has been seen.\n\t\t * Attach information if it is created from an attach op.\n\t\t * If it is local, it will throw unsupported errors on calls to summarize.\n\t\t */\n\t\tcreateParam: CreateChildSummarizerNodeParam,\n\t\t/**\n\t\t * Optional configuration affecting summarize behavior\n\t\t */\n\t\tconfig?: ISummarizerNodeConfigWithGC,\n\t\tgetGCDataFn?: (fullGC?: boolean) => Promise<IGarbageCollectionData>,\n\t\t/**\n\t\t * @deprecated The functionality to update child's base GC details is incorporated in the summarizer node.\n\t\t */\n\t\tgetBaseGCDetailsFn?: () => Promise<IGarbageCollectionDetailsBase>,\n\t): ISummarizerNodeWithGC;\n\n\t/**\n\t * Delete the child with the given id..\n\t */\n\tdeleteChild(id: string): void;\n\n\tgetChild(id: string): ISummarizerNodeWithGC | undefined;\n\n\t/**\n\t * Returns this node's data that is used for garbage collection. This includes a list of GC nodes that represent\n\t * this node. Each node has a set of outbound routes to other GC nodes in the document.\n\t * @param fullGC - true to bypass optimizations and force full generation of GC data.\n\t */\n\tgetGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;\n\n\t/**\n\t * Tells whether this node is being referenced in this document or not. Unreferenced node will get GC'd\n\t */\n\tisReferenced(): boolean;\n\n\t/**\n\t * After GC has run, called to notify this node of routes that are used in it. These are used for the following:\n\t * 1. To identify if this node is being referenced in the document or not.\n\t * 2. To identify if this node or any of its children's used routes changed since last summary.\n\t *\n\t * @param usedRoutes - The routes that are used in this node.\n\t */\n\tupdateUsedRoutes(usedRoutes: string[]): void;\n}\n\n/**\n * @internal\n */\nexport const channelsTreeName = \".channels\";\n\n/**\n * Contains telemetry data relevant to summarization workflows.\n * This object, in contrast to ITelemetryContext, is expected to be modified directly by various summarize methods.\n * @internal\n */\nexport interface ITelemetryContextExt {\n\t/**\n\t * Sets value for telemetry data being tracked.\n\t * @param prefix - unique prefix to tag this data with (ex: \"fluid:map:\")\n\t * @param property - property name of the telemetry data being tracked (ex: \"DirectoryCount\")\n\t * @param value - value to attribute to this summary telemetry data\n\t */\n\tset(prefix: string, property: string, value: TelemetryEventPropertyTypeExt): void;\n\n\t/**\n\t * Sets multiple values for telemetry data being tracked.\n\t * @param prefix - unique prefix to tag this data with (ex: \"fluid:summarize:\")\n\t * @param property - property name of the telemetry data being tracked (ex: \"Options\")\n\t * @param values - A set of values to attribute to this summary telemetry data.\n\t */\n\tsetMultiple(\n\t\tprefix: string,\n\t\tproperty: string,\n\t\tvalues: Record<string, TelemetryEventPropertyTypeExt>,\n\t): void;\n}\n\n/**\n * Contains telemetry data relevant to summarization workflows.\n * This object is expected to be modified directly by various summarize methods.\n * @legacy @beta\n */\nexport interface ITelemetryContext {\n\t/**\n\t * Sets value for telemetry data being tracked.\n\t * @param prefix - unique prefix to tag this data with (ex: \"fluid:map:\")\n\t * @param property - property name of the telemetry data being tracked (ex: \"DirectoryCount\")\n\t * @param value - value to attribute to this summary telemetry data\n\t */\n\tset(prefix: string, property: string, value: TelemetryBaseEventPropertyType): void;\n\n\t/**\n\t * Sets multiple values for telemetry data being tracked.\n\t * @param prefix - unique prefix to tag this data with (ex: \"fluid:summarize:\")\n\t * @param property - property name of the telemetry data being tracked (ex: \"Options\")\n\t * @param values - A set of values to attribute to this summary telemetry data.\n\t */\n\tsetMultiple(\n\t\tprefix: string,\n\t\tproperty: string,\n\t\tvalues: Record<string, TelemetryBaseEventPropertyType>,\n\t): void;\n}\n\n/**\n * @internal\n */\nexport const blobCountPropertyName = \"BlobCount\";\n\n/**\n * @internal\n */\nexport const totalBlobSizePropertyName = \"TotalBlobSize\";\n"]}
1
+ {"version":3,"file":"summary.js","sourceRoot":"","sources":["../src/summary.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA8IH;;GAEG;AACH,MAAM,CAAN,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IACrC,yFAAW,CAAA;IACX,uFAAU,CAAA;IACV,6EAAK,CAAA;AACN,CAAC,EAJW,0BAA0B,KAA1B,0BAA0B,QAIrC;AAyKD;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,WAAW,CAAC;AAwD5C;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,WAAW,CAAC;AAEjD;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,eAAe,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { TelemetryBaseEventPropertyType } from \"@fluidframework/core-interfaces\";\nimport type {\n\tISnapshotTree,\n\tISummaryTree,\n\tITree,\n\tSummaryTree,\n\tISequencedDocumentMessage,\n} from \"@fluidframework/driver-definitions/internal\";\nimport type { TelemetryEventPropertyTypeExt } from \"@fluidframework/telemetry-utils/internal\";\n\nimport type {\n\tIGarbageCollectionData,\n\tIGarbageCollectionDetailsBase,\n} from \"./garbageCollectionDefinitions.js\";\n\n/**\n * Contains the aggregation data from a Tree/Subtree.\n * @legacy @beta\n */\nexport interface ISummaryStats {\n\ttreeNodeCount: number;\n\tblobNodeCount: number;\n\thandleNodeCount: number;\n\ttotalBlobSize: number;\n\tunreferencedBlobSize: number;\n}\n\n/**\n * Represents the summary tree for a node along with the statistics for that tree.\n * For example, for a given data store, it contains the data for data store along with a subtree for\n * each of its DDS.\n * Any component that implements IChannelContext, IFluidDataStoreChannel or extends SharedObject\n * will be taking part of the summarization process.\n * @legacy @beta\n */\nexport interface ISummaryTreeWithStats {\n\t/**\n\t * Represents an aggregation of node counts and blob sizes associated to the current summary information\n\t */\n\tstats: ISummaryStats;\n\t/**\n\t * A recursive data structure that will be converted to a snapshot tree and uploaded\n\t * to the backend.\n\t */\n\tsummary: ISummaryTree;\n}\n\n/**\n * Represents a summary at a current sequence number.\n * @legacy @beta\n */\nexport interface ISummarizeResult {\n\tstats: ISummaryStats;\n\tsummary: SummaryTree;\n}\n\n/**\n * Contains the same data as ISummaryResult but in order to avoid naming collisions,\n * the data store summaries are wrapped around an array of labels identified by pathPartsForChildren.\n *\n * @example\n *\n * ```typescript\n * id:\"\"\n * pathPartsForChildren: [\"path1\"]\n * stats: ...\n * summary:\n * ...\n * \"path1\":\n * ```\n * @legacy @beta\n */\nexport interface ISummarizeInternalResult extends ISummarizeResult {\n\tid: string;\n\t/**\n\t * Additional path parts between this node's ID and its children's IDs.\n\t */\n\tpathPartsForChildren?: string[];\n}\n\n/**\n * @experimental Can be deleted/changed at any time\n * Contains the necessary information to allow DDSes to do incremental summaries\n * @legacy @beta\n */\nexport interface IExperimentalIncrementalSummaryContext {\n\t/**\n\t * The sequence number of the summary generated that will be sent to the server.\n\t */\n\treadonly summarySequenceNumber: number;\n\t/**\n\t * The sequence number of the most recent summary that was acknowledged by the server.\n\t */\n\treadonly latestSummarySequenceNumber: number;\n\t/**\n\t * The path to the runtime/datastore/dds that is used to generate summary handles\n\t * Note: Summary handles are nodes of the summary tree that point to previous parts of the last successful summary\n\t * instead of being a blob or tree node\n\t *\n\t * This path contains the id of the data store and dds which should not be leaked to layers below them. Ideally,\n\t * a layer should not know its own id. This is important for channel unification work and there has been a lot of\n\t * work to remove these kinds of leakages. Some still exist, which have to be fixed but we should not be adding\n\t * more dependencies.\n\t */\n\t// TODO: remove summaryPath\n\treadonly summaryPath: string;\n}\n\n/**\n * @legacy @beta\n */\nexport type SummarizeInternalFn = (\n\tfullTree: boolean,\n\ttrackState: boolean,\n\ttelemetryContext?: ITelemetryContext,\n\tincrementalSummaryContext?: IExperimentalIncrementalSummaryContext,\n) => Promise<ISummarizeInternalResult>;\n\n/**\n * @legacy @beta\n */\nexport interface ISummarizerNodeConfig {\n\t/**\n\t * True to reuse previous handle when unchanged since last acked summary.\n\t * Defaults to true.\n\t */\n\treadonly canReuseHandle?: boolean;\n}\n\n/**\n * @legacy @beta\n */\nexport interface ISummarizerNodeConfigWithGC extends ISummarizerNodeConfig {\n\t/**\n\t * True if GC is disabled. If so, don't track GC related state for a summary.\n\t * This is propagated to all child nodes.\n\t */\n\treadonly gcDisabled?: boolean;\n}\n\n/**\n * @legacy @beta\n */\nexport enum CreateSummarizerNodeSource {\n\tFromSummary,\n\tFromAttach,\n\tLocal,\n}\n/**\n * @legacy @beta\n */\nexport type CreateChildSummarizerNodeParam =\n\t| {\n\t\t\ttype: CreateSummarizerNodeSource.FromSummary;\n\t }\n\t| {\n\t\t\ttype: CreateSummarizerNodeSource.FromAttach;\n\t\t\tsequenceNumber: number;\n\t\t\tsnapshot: ITree;\n\t }\n\t| {\n\t\t\ttype: CreateSummarizerNodeSource.Local;\n\t };\n\n/**\n * @legacy @beta\n */\nexport interface ISummarizerNode {\n\t/**\n\t * Latest successfully acked summary reference sequence number\n\t */\n\treadonly referenceSequenceNumber: number;\n\t/**\n\t * Marks the node as having a change with the given sequence number.\n\t * @param sequenceNumber - sequence number of change\n\t */\n\tinvalidate(sequenceNumber: number): void;\n\t/**\n\t * Calls the internal summarize function and handles internal state tracking.\n\t * @param fullTree - true to skip optimizations and always generate the full tree\n\t * @param trackState - indicates whether the summarizer node should track the state of the summary or not\n\t * @param telemetryContext - summary data passed through the layers for telemetry purposes\n\t */\n\tsummarize(\n\t\tfullTree: boolean,\n\t\ttrackState?: boolean,\n\t\ttelemetryContext?: ITelemetryContext,\n\t): Promise<ISummarizeResult>;\n\t/**\n\t * Checks if there are any additional path parts for children that need to\n\t * be loaded from the base summary. Additional path parts represent parts\n\t * of the path between this SummarizerNode and any child SummarizerNodes\n\t * that it might have. For example: if datastore \"a\" contains dds \"b\", but the\n\t * path is \"/a/.channels/b\", then the additional path part is \".channels\".\n\t * @param snapshot - the base summary to parse\n\t *\n\t * @deprecated The code now always assumes that all summary nodes have .channels\n\t * in their handle so there is no need to maintain any additional path information.\n\t */\n\tupdateBaseSummaryState(snapshot: ISnapshotTree): void;\n\t/**\n\t * Records an op representing a change to this node/subtree.\n\t * @param op - op of change to record\n\t */\n\trecordChange(op: ISequencedDocumentMessage): void;\n\n\tcreateChild(\n\t\t/**\n\t\t * Summarize function\n\t\t */\n\t\tsummarizeInternalFn: SummarizeInternalFn,\n\t\t/**\n\t\t * Initial id or path part of this node\n\t\t */\n\t\tid: string,\n\t\t/**\n\t\t * Information needed to create the node.\n\t\t * If it is from a base summary, it will assert that a summary has been seen.\n\t\t * Attach information if it is created from an attach op.\n\t\t * If it is local, it will throw unsupported errors on calls to summarize.\n\t\t */\n\t\tcreateParam: CreateChildSummarizerNodeParam,\n\t\t/**\n\t\t * Optional configuration affecting summarize behavior\n\t\t */\n\t\tconfig?: ISummarizerNodeConfig,\n\t): ISummarizerNode;\n\n\tgetChild(id: string): ISummarizerNode | undefined;\n\n\t/**\n\t * True if a summary is currently in progress\n\t */\n\tisSummaryInProgress?(): boolean;\n}\n\n/**\n * Extends the functionality of ISummarizerNode to support garbage collection. It adds / updates the following APIs:\n *\n * `usedRoutes`: The routes in this node that are currently in use.\n *\n * `getGCData`: A new API that can be used to get the garbage collection data for this node.\n *\n * `summarize`: Added a trackState flag which indicates whether the summarizer node should track the state of the\n * summary or not.\n *\n * `createChild`: Added the following params:\n *\n * - `getGCDataFn`: This gets the GC data from the caller. This must be provided in order for getGCData to work.\n *\n * - `getInitialGCDetailsFn`: This gets the initial GC details from the caller.\n *\n * `deleteChild`: Deletes a child node.\n *\n * `isReferenced`: This tells whether this node is referenced in the document or not.\n *\n * `updateUsedRoutes`: Used to notify this node of routes that are currently in use in it.\n * @legacy @beta\n */\nexport interface ISummarizerNodeWithGC extends ISummarizerNode {\n\tcreateChild(\n\t\t/**\n\t\t * Summarize function\n\t\t */\n\t\tsummarizeInternalFn: SummarizeInternalFn,\n\t\t/**\n\t\t * Initial id or path part of this node\n\t\t */\n\t\tid: string,\n\t\t/**\n\t\t * Information needed to create the node.\n\t\t * If it is from a base summary, it will assert that a summary has been seen.\n\t\t * Attach information if it is created from an attach op.\n\t\t * If it is local, it will throw unsupported errors on calls to summarize.\n\t\t */\n\t\tcreateParam: CreateChildSummarizerNodeParam,\n\t\t/**\n\t\t * Optional configuration affecting summarize behavior\n\t\t */\n\t\tconfig?: ISummarizerNodeConfigWithGC,\n\t\tgetGCDataFn?: (fullGC?: boolean) => Promise<IGarbageCollectionData>,\n\t\t/**\n\t\t * @deprecated The functionality to update child's base GC details is incorporated in the summarizer node.\n\t\t */\n\t\tgetBaseGCDetailsFn?: () => Promise<IGarbageCollectionDetailsBase>,\n\t): ISummarizerNodeWithGC;\n\n\t/**\n\t * Delete the child with the given id..\n\t */\n\tdeleteChild(id: string): void;\n\n\tgetChild(id: string): ISummarizerNodeWithGC | undefined;\n\n\t/**\n\t * Returns this node's data that is used for garbage collection. This includes a list of GC nodes that represent\n\t * this node. Each node has a set of outbound routes to other GC nodes in the document.\n\t * @param fullGC - true to bypass optimizations and force full generation of GC data.\n\t */\n\tgetGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;\n\n\t/**\n\t * Tells whether this node is being referenced in this document or not. Unreferenced node will get GC'd\n\t */\n\tisReferenced(): boolean;\n\n\t/**\n\t * After GC has run, called to notify this node of routes that are used in it. These are used for the following:\n\t * 1. To identify if this node is being referenced in the document or not.\n\t * 2. To identify if this node or any of its children's used routes changed since last summary.\n\t *\n\t * @param usedRoutes - The routes that are used in this node.\n\t */\n\tupdateUsedRoutes(usedRoutes: string[]): void;\n}\n\n/**\n * @internal\n */\nexport const channelsTreeName = \".channels\";\n\n/**\n * Contains telemetry data relevant to summarization workflows.\n * This object, in contrast to ITelemetryContext, is expected to be modified directly by various summarize methods.\n * @internal\n */\nexport interface ITelemetryContextExt {\n\t/**\n\t * Sets value for telemetry data being tracked.\n\t * @param prefix - unique prefix to tag this data with (ex: \"fluid:map:\")\n\t * @param property - property name of the telemetry data being tracked (ex: \"DirectoryCount\")\n\t * @param value - value to attribute to this summary telemetry data\n\t */\n\tset(prefix: string, property: string, value: TelemetryEventPropertyTypeExt): void;\n\n\t/**\n\t * Sets multiple values for telemetry data being tracked.\n\t * @param prefix - unique prefix to tag this data with (ex: \"fluid:summarize:\")\n\t * @param property - property name of the telemetry data being tracked (ex: \"Options\")\n\t * @param values - A set of values to attribute to this summary telemetry data.\n\t */\n\tsetMultiple(\n\t\tprefix: string,\n\t\tproperty: string,\n\t\tvalues: Record<string, TelemetryEventPropertyTypeExt>,\n\t): void;\n}\n\n/**\n * Contains telemetry data relevant to summarization workflows.\n * This object is expected to be modified directly by various summarize methods.\n * @legacy @beta\n */\nexport interface ITelemetryContext {\n\t/**\n\t * Sets value for telemetry data being tracked.\n\t * @param prefix - unique prefix to tag this data with (ex: \"fluid:map:\")\n\t * @param property - property name of the telemetry data being tracked (ex: \"DirectoryCount\")\n\t * @param value - value to attribute to this summary telemetry data\n\t */\n\tset(prefix: string, property: string, value: TelemetryBaseEventPropertyType): void;\n\n\t/**\n\t * Sets multiple values for telemetry data being tracked.\n\t * @param prefix - unique prefix to tag this data with (ex: \"fluid:summarize:\")\n\t * @param property - property name of the telemetry data being tracked (ex: \"Options\")\n\t * @param values - A set of values to attribute to this summary telemetry data.\n\t */\n\tsetMultiple(\n\t\tprefix: string,\n\t\tproperty: string,\n\t\tvalues: Record<string, TelemetryBaseEventPropertyType>,\n\t): void;\n}\n\n/**\n * @internal\n */\nexport const blobCountPropertyName = \"BlobCount\";\n\n/**\n * @internal\n */\nexport const totalBlobSizePropertyName = \"TotalBlobSize\";\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/runtime-definitions",
3
- "version": "2.70.0-360753",
3
+ "version": "2.70.0-361248",
4
4
  "description": "Fluid Runtime definitions",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -57,11 +57,11 @@
57
57
  "main": "lib/index.js",
58
58
  "types": "lib/public.d.ts",
59
59
  "dependencies": {
60
- "@fluidframework/container-definitions": "2.70.0-360753",
61
- "@fluidframework/core-interfaces": "2.70.0-360753",
62
- "@fluidframework/driver-definitions": "2.70.0-360753",
63
- "@fluidframework/id-compressor": "2.70.0-360753",
64
- "@fluidframework/telemetry-utils": "2.70.0-360753"
60
+ "@fluidframework/container-definitions": "2.70.0-361248",
61
+ "@fluidframework/core-interfaces": "2.70.0-361248",
62
+ "@fluidframework/driver-definitions": "2.70.0-361248",
63
+ "@fluidframework/id-compressor": "2.70.0-361248",
64
+ "@fluidframework/telemetry-utils": "2.70.0-361248"
65
65
  },
66
66
  "devDependencies": {
67
67
  "@arethetypeswrong/cli": "^0.17.1",
@@ -69,12 +69,12 @@
69
69
  "@fluid-tools/build-cli": "^0.58.3",
70
70
  "@fluidframework/build-common": "^2.0.3",
71
71
  "@fluidframework/build-tools": "^0.58.3",
72
- "@fluidframework/eslint-config-fluid": "^6.0.0",
72
+ "@fluidframework/eslint-config-fluid": "^6.1.0",
73
73
  "@fluidframework/runtime-definitions-previous": "npm:@fluidframework/runtime-definitions@2.63.0",
74
74
  "@microsoft/api-extractor": "7.52.11",
75
75
  "concurrently": "^8.2.1",
76
76
  "copyfiles": "^2.4.1",
77
- "eslint": "~8.55.0",
77
+ "eslint": "~8.57.1",
78
78
  "rimraf": "^4.4.0",
79
79
  "typescript": "~5.4.5"
80
80
  },
@@ -81,7 +81,7 @@ export enum FlushModeExperimental {
81
81
  * This feature requires a version of the loader which supports reference sequence numbers. If an older version of
82
82
  * the loader is used, the runtime will fall back on FlushMode.TurnBased.
83
83
  *
84
- * @experimental - Not ready for use
84
+ * @experimental Not ready for use
85
85
  */
86
86
  Async = 2,
87
87
  }
package/src/protocol.ts CHANGED
@@ -147,7 +147,7 @@ export interface IRuntimeStorageService {
147
147
  * Whether or not the object has been disposed.
148
148
  * If true, the object should be considered invalid, and its other state should be disregarded.
149
149
  *
150
- * @deprecated - This API is deprecated and will be removed in a future release. No replacement is planned as
150
+ * @deprecated This API is deprecated and will be removed in a future release. No replacement is planned as
151
151
  * it is unused in the DataStore layer.
152
152
  */
153
153
  readonly disposed?: boolean;
@@ -157,32 +157,32 @@ export interface IRuntimeStorageService {
157
157
  * @param error - Optional error indicating the reason for the disposal, if the object was
158
158
  * disposed as the result of an error.
159
159
  *
160
- * @deprecated - This API is deprecated and will be removed in a future release. No replacement is planned as
160
+ * @deprecated This API is deprecated and will be removed in a future release. No replacement is planned as
161
161
  * it is unused in the DataStore layer.
162
162
  */
163
163
  dispose?(error?: Error): void;
164
164
 
165
165
  /**
166
- * @deprecated - This will be removed in a future release. No replacement is planned as
166
+ * @deprecated This will be removed in a future release. No replacement is planned as
167
167
  * it is unused in the DataStore layer.
168
168
  */
169
169
  readonly policies?: IDocumentStorageServicePolicies | undefined;
170
170
 
171
171
  /**
172
- * @deprecated - This will be removed in a future release. No replacement is planned as
172
+ * @deprecated This will be removed in a future release. No replacement is planned as
173
173
  * it is unused in the DataStore layer.
174
174
  */
175
175
  // eslint-disable-next-line @rushstack/no-new-null
176
176
  getSnapshotTree(version?: IVersion, scenarioName?: string): Promise<ISnapshotTree | null>;
177
177
 
178
178
  /**
179
- * @deprecated - This will be removed in a future release. No replacement is planned as
179
+ * @deprecated This will be removed in a future release. No replacement is planned as
180
180
  * it is unused in the DataStore layer.
181
181
  */
182
182
  getSnapshot?(snapshotFetchOptions?: ISnapshotFetchOptions): Promise<ISnapshot>;
183
183
 
184
184
  /**
185
- * @deprecated - This will be removed in a future release. No replacement is planned as
185
+ * @deprecated This will be removed in a future release. No replacement is planned as
186
186
  * it is unused in the DataStore layer.
187
187
  */
188
188
  getVersions(
@@ -195,19 +195,19 @@ export interface IRuntimeStorageService {
195
195
  ): Promise<IVersion[]>;
196
196
 
197
197
  /**
198
- * @deprecated - This will be removed in a future release. No replacement is planned as
198
+ * @deprecated This will be removed in a future release. No replacement is planned as
199
199
  * it is unused in the DataStore layer.
200
200
  */
201
201
  createBlob(file: ArrayBufferLike): Promise<ICreateBlobResponse>;
202
202
 
203
203
  /**
204
- * @deprecated - This will be removed in a future release. No replacement is planned as
204
+ * @deprecated This will be removed in a future release. No replacement is planned as
205
205
  * it is unused in the DataStore layer.
206
206
  */
207
207
  uploadSummaryWithContext(summary: ISummaryTree, context: ISummaryContext): Promise<string>;
208
208
 
209
209
  /**
210
- * @deprecated - This will be removed in a future release. No replacement is planned as
210
+ * @deprecated This will be removed in a future release. No replacement is planned as
211
211
  * it is unused in the DataStore layer.
212
212
  */
213
213
  downloadSummary(handle: ISummaryHandle): Promise<ISummaryTree>;
package/src/summary.ts CHANGED
@@ -84,7 +84,7 @@ export interface ISummarizeInternalResult extends ISummarizeResult {
84
84
  }
85
85
 
86
86
  /**
87
- * @experimental - Can be deleted/changed at any time
87
+ * @experimental Can be deleted/changed at any time
88
88
  * Contains the necessary information to allow DDSes to do incremental summaries
89
89
  * @legacy @beta
90
90
  */