@fluidframework/runtime-definitions 2.53.1 → 2.60.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/api-report/{runtime-definitions.legacy.alpha.api.md → runtime-definitions.legacy.beta.api.md} +57 -57
  3. package/dist/attribution.d.ts +5 -10
  4. package/dist/attribution.d.ts.map +1 -1
  5. package/dist/attribution.js.map +1 -1
  6. package/dist/compatibilityDefinitions.d.ts +1 -2
  7. package/dist/compatibilityDefinitions.d.ts.map +1 -1
  8. package/dist/compatibilityDefinitions.js.map +1 -1
  9. package/dist/dataStoreContext.d.ts +17 -34
  10. package/dist/dataStoreContext.d.ts.map +1 -1
  11. package/dist/dataStoreContext.js +2 -4
  12. package/dist/dataStoreContext.js.map +1 -1
  13. package/dist/dataStoreFactory.d.ts +3 -6
  14. package/dist/dataStoreFactory.d.ts.map +1 -1
  15. package/dist/dataStoreFactory.js +1 -2
  16. package/dist/dataStoreFactory.js.map +1 -1
  17. package/dist/dataStoreRegistry.d.ts +7 -14
  18. package/dist/dataStoreRegistry.d.ts.map +1 -1
  19. package/dist/dataStoreRegistry.js +1 -2
  20. package/dist/dataStoreRegistry.js.map +1 -1
  21. package/dist/garbageCollectionDefinitions.d.ts +2 -4
  22. package/dist/garbageCollectionDefinitions.d.ts.map +1 -1
  23. package/dist/garbageCollectionDefinitions.js.map +1 -1
  24. package/dist/protocol.d.ts +8 -16
  25. package/dist/protocol.d.ts.map +1 -1
  26. package/dist/protocol.js.map +1 -1
  27. package/dist/summary.d.ts +13 -26
  28. package/dist/summary.d.ts.map +1 -1
  29. package/dist/summary.js +1 -2
  30. package/dist/summary.js.map +1 -1
  31. package/lib/attribution.d.ts +5 -10
  32. package/lib/attribution.d.ts.map +1 -1
  33. package/lib/attribution.js.map +1 -1
  34. package/lib/compatibilityDefinitions.d.ts +1 -2
  35. package/lib/compatibilityDefinitions.d.ts.map +1 -1
  36. package/lib/compatibilityDefinitions.js.map +1 -1
  37. package/lib/dataStoreContext.d.ts +17 -34
  38. package/lib/dataStoreContext.d.ts.map +1 -1
  39. package/lib/dataStoreContext.js +2 -4
  40. package/lib/dataStoreContext.js.map +1 -1
  41. package/lib/dataStoreFactory.d.ts +3 -6
  42. package/lib/dataStoreFactory.d.ts.map +1 -1
  43. package/lib/dataStoreFactory.js +1 -2
  44. package/lib/dataStoreFactory.js.map +1 -1
  45. package/lib/dataStoreRegistry.d.ts +7 -14
  46. package/lib/dataStoreRegistry.d.ts.map +1 -1
  47. package/lib/dataStoreRegistry.js +1 -2
  48. package/lib/dataStoreRegistry.js.map +1 -1
  49. package/lib/garbageCollectionDefinitions.d.ts +2 -4
  50. package/lib/garbageCollectionDefinitions.d.ts.map +1 -1
  51. package/lib/garbageCollectionDefinitions.js.map +1 -1
  52. package/lib/protocol.d.ts +8 -16
  53. package/lib/protocol.d.ts.map +1 -1
  54. package/lib/protocol.js.map +1 -1
  55. package/lib/summary.d.ts +13 -26
  56. package/lib/summary.d.ts.map +1 -1
  57. package/lib/summary.js +1 -2
  58. package/lib/summary.js.map +1 -1
  59. package/package.json +7 -7
  60. package/src/attribution.ts +5 -10
  61. package/src/compatibilityDefinitions.ts +1 -2
  62. package/src/dataStoreContext.ts +17 -34
  63. package/src/dataStoreFactory.ts +3 -6
  64. package/src/dataStoreRegistry.ts +7 -14
  65. package/src/garbageCollectionDefinitions.ts +2 -4
  66. package/src/protocol.ts +8 -16
  67. package/src/summary.ts +13 -26
@@ -1 +1 @@
1
- {"version":3,"file":"dataStoreContext.js","sourceRoot":"","sources":["../src/dataStoreContext.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAgDH;;;;GAIG;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;;;;;GAKG;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 {\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\n * @alpha\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\n * @alpha\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\n * @alpha\n */\nexport type VisibilityState = (typeof VisibilityState)[keyof typeof VisibilityState];\n\n/**\n * @legacy\n * @alpha\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\n * @alpha\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\n * @alpha\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\n * @alpha\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 * @experimental\n * @deprecated - These APIs are unstable, and can be changed at will. They should only be used with direct agreement with the Fluid Framework.\n * @legacy\n * @alpha\n * @sealed\n */\nexport interface CommitStagedChangesOptionsExperimental {\n\t/**\n\t * If true, intermediate states created by changes made while in staging mode will be \"squashed\" out of the\n\t * ops which were created during staging mode.\n\t * Defaults to false.\n\t * @remarks\n\t * The squash parameter is analogous to `git squash` but differs in a notable way: ops created by a client exiting staging mode\n\t * are not necessarily coalesced into a single op or something like it.\n\t * It still does have the desirable property that \"unnecessary changes\" (such as inserting some content then removing it) will\n\t * be removed from the set of submitted ops, which means it helps reduce network traffic and the chance of unwanted data being\n\t * persisted--even if only temporarily--in the document.\n\t *\n\t * By not attempting to reduce the set of changes to a single op a la `git squash`, we can better preserve the ordering of\n\t * changes that remote clients see such that they better align with the client which submitted the changes.\n\t */\n\tsquash?: boolean;\n}\n\n/**\n * @experimental\n * @deprecated - These APIs are unstable, and can be changed at will. They should only be used with direct agreement with the Fluid Framework.\n * @legacy\n * @alpha\n * @sealed\n */\nexport interface StageControlsExperimental {\n\t/**\n\t * Exit staging mode and commit to any changes made while in staging mode.\n\t * This will cause them to be sent to the ordering service, and subsequent changes\n\t * made by this container will additionally flow freely to the ordering service.\n\t * @param options - Options when committing changes.\n\t */\n\treadonly commitChanges: (options?: Partial<CommitStagedChangesOptionsExperimental>) => void;\n\t/**\n\t * Exit staging mode and discard any changes made while in staging mode.\n\t */\n\treadonly discardChanges: () => void;\n}\n\n/**\n * @experimental\n * @deprecated - These APIs are unstable, and can be changed at will. They should only be used with direct agreement with the Fluid Framework.\n * @legacy\n * @alpha\n * @sealed\n */\nexport interface IContainerRuntimeBaseExperimental extends IContainerRuntimeBase {\n\tenterStagingMode?(): StageControlsExperimental;\n\treadonly inStagingMode?: boolean;\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\n * @alpha\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\n * @alpha\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\n * @alpha\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\n * @alpha\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\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\n * @alpha\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\n * @alpha\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\n * @alpha\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;AAgDH;;;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 {\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 * @experimental\n * @deprecated - These APIs are unstable, and can be changed at will. They should only be used with direct agreement with the Fluid Framework.\n * @legacy @beta\n * @sealed\n */\nexport interface CommitStagedChangesOptionsExperimental {\n\t/**\n\t * If true, intermediate states created by changes made while in staging mode will be \"squashed\" out of the\n\t * ops which were created during staging mode.\n\t * Defaults to false.\n\t * @remarks\n\t * The squash parameter is analogous to `git squash` but differs in a notable way: ops created by a client exiting staging mode\n\t * are not necessarily coalesced into a single op or something like it.\n\t * It still does have the desirable property that \"unnecessary changes\" (such as inserting some content then removing it) will\n\t * be removed from the set of submitted ops, which means it helps reduce network traffic and the chance of unwanted data being\n\t * persisted--even if only temporarily--in the document.\n\t *\n\t * By not attempting to reduce the set of changes to a single op a la `git squash`, we can better preserve the ordering of\n\t * changes that remote clients see such that they better align with the client which submitted the changes.\n\t */\n\tsquash?: boolean;\n}\n\n/**\n * @experimental\n * @deprecated - These APIs are unstable, and can be changed at will. They should only be used with direct agreement with the Fluid Framework.\n * @legacy @beta\n * @sealed\n */\nexport interface StageControlsExperimental {\n\t/**\n\t * Exit staging mode and commit to any changes made while in staging mode.\n\t * This will cause them to be sent to the ordering service, and subsequent changes\n\t * made by this container will additionally flow freely to the ordering service.\n\t * @param options - Options when committing changes.\n\t */\n\treadonly commitChanges: (options?: Partial<CommitStagedChangesOptionsExperimental>) => void;\n\t/**\n\t * Exit staging mode and discard any changes made while in staging mode.\n\t */\n\treadonly discardChanges: () => void;\n}\n\n/**\n * @experimental\n * @deprecated - These APIs are unstable, and can be changed at will. They should only be used with direct agreement with the Fluid Framework.\n * @legacy @beta\n * @sealed\n */\nexport interface IContainerRuntimeBaseExperimental extends IContainerRuntimeBase {\n\tenterStagingMode?(): StageControlsExperimental;\n\treadonly inStagingMode?: boolean;\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\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"]}
@@ -4,13 +4,11 @@
4
4
  */
5
5
  import type { IFluidDataStoreChannel, IFluidDataStoreContext } from "./dataStoreContext.js";
6
6
  /**
7
- * @legacy
8
- * @alpha
7
+ * @legacy @beta
9
8
  */
10
9
  export declare const IFluidDataStoreFactory: keyof IProvideFluidDataStoreFactory;
11
10
  /**
12
- * @legacy
13
- * @alpha
11
+ * @legacy @beta
14
12
  */
15
13
  export interface IProvideFluidDataStoreFactory {
16
14
  readonly IFluidDataStoreFactory: IFluidDataStoreFactory;
@@ -29,8 +27,7 @@ export interface IProvideFluidDataStoreFactory {
29
27
  * The factory is responsible for creating new instances of data stores and loading existing ones.
30
28
  * The factory ensures that the data store is correctly initialized.
31
29
  *
32
- * @legacy
33
- * @alpha
30
+ * @legacy @beta
34
31
  */
35
32
  export interface IFluidDataStoreFactory extends IProvideFluidDataStoreFactory {
36
33
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"dataStoreFactory.d.ts","sourceRoot":"","sources":["../src/dataStoreFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE5F;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,MAAM,6BAClB,CAAC;AAE1B;;;GAGG;AACH,MAAM,WAAW,6BAA6B;IAC7C,QAAQ,CAAC,sBAAsB,EAAE,sBAAsB,CAAC;CACxD;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,sBAAuB,SAAQ,6BAA6B;IAC5E;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;;;;;;;;;;OAaG;IACH,oBAAoB,CACnB,OAAO,EAAE,sBAAsB,EAC/B,QAAQ,EAAE,OAAO,GACf,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAEnC;;;;;;;;;;;;;;;;OAgBG;IACH,eAAe,CAAC,CAAC,OAAO,EAAE,sBAAsB,GAAG;QAClD,QAAQ,CAAC,OAAO,EAAE,sBAAsB,CAAC;KACzC,CAAC;CACF"}
1
+ {"version":3,"file":"dataStoreFactory.d.ts","sourceRoot":"","sources":["../src/dataStoreFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE5F;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,MAAM,6BAClB,CAAC;AAE1B;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC7C,QAAQ,CAAC,sBAAsB,EAAE,sBAAsB,CAAC;CACxD;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,sBAAuB,SAAQ,6BAA6B;IAC5E;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;;;;;;;;;;OAaG;IACH,oBAAoB,CACnB,OAAO,EAAE,sBAAsB,EAC/B,QAAQ,EAAE,OAAO,GACf,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAEnC;;;;;;;;;;;;;;;;OAgBG;IACH,eAAe,CAAC,CAAC,OAAO,EAAE,sBAAsB,GAAG;QAClD,QAAQ,CAAC,OAAO,EAAE,sBAAsB,CAAC;KACzC,CAAC;CACF"}
@@ -3,8 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  /**
6
- * @legacy
7
- * @alpha
6
+ * @legacy @beta
8
7
  */
9
8
  export const IFluidDataStoreFactory = "IFluidDataStoreFactory";
10
9
  //# sourceMappingURL=dataStoreFactory.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dataStoreFactory.js","sourceRoot":"","sources":["../src/dataStoreFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAClC,wBAAwB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IFluidDataStoreChannel, IFluidDataStoreContext } from \"./dataStoreContext.js\";\n\n/**\n * @legacy\n * @alpha\n */\nexport const IFluidDataStoreFactory: keyof IProvideFluidDataStoreFactory =\n\t\"IFluidDataStoreFactory\";\n\n/**\n * @legacy\n * @alpha\n */\nexport interface IProvideFluidDataStoreFactory {\n\treadonly IFluidDataStoreFactory: IFluidDataStoreFactory;\n}\n\n/**\n * The `IFluidDataStoreFactory` interface is responsible for creating data stores.\n * A data store is a component that manages a specific set of data and its operations.\n * It encapsulates the logic for data management, synchronization, and interaction\n * with other components within a Fluid container.\n *\n * Data stores are fundamental building blocks in the Fluid Framework. They are used\n * to store and manage state, handle operations, and provide APIs for interacting\n * with the data. Each data store type is associated with a unique identifier (its `type` member)\n * and is typically provided to consumers through a data store registry.\n *\n * The factory is responsible for creating new instances of data stores and loading existing ones.\n * The factory ensures that the data store is correctly initialized.\n *\n * @legacy\n * @alpha\n */\nexport interface IFluidDataStoreFactory extends IProvideFluidDataStoreFactory {\n\t/**\n\t * Uniquely identifies the type of data store created by this factory.\n\t */\n\ttype: string;\n\n\t/**\n\t * Asynchronously generates the runtime for the data store from the given context.\n\t * @remarks\n\t * Once created, the data store should be bound to the context.\n\t *\n\t * This method supports both creation and loading paths. It is important to differentiate\n\t * between the two based on the `existing` parameter:\n\t * - When `existing` is false, this method creates a new data store.\n\t * - When `existing` is true, it loads a pre-existing data store.\n\t *\n\t * @param context - The context for the data store, providing necessary information and services.\n\t * @param existing - A boolean indicating whether the data store is being instantiated from an existing file.\n\t * @returns A promise that resolves to the created data store channel.\n\t */\n\tinstantiateDataStore(\n\t\tcontext: IFluidDataStoreContext,\n\t\texisting: boolean,\n\t): Promise<IFluidDataStoreChannel>;\n\n\t/**\n\t * Synchronously creates a new runtime for a new data store from the provided context.\n\t *\n\t * @remarks\n\t * This method enables a synchronous creation path. Specifically, if this factory is registered\n\t * as a child factory in another data store's registry, and the registry synchronously provides\n\t * this factory, it becomes eligible for synchronous creation via the parent data store's context.\n\t * After creation, all subsequent loads of a data store created through this method will utilize\n\t * the asynchronous `instantiateDataStore` method on this factory.\n\t *\n\t * Note: This method is optional. Not all data stores can or will support a synchronous creation path,\n\t * as being synchronous imposes limitations on the capabilities that can be used. Generally, this\n\t * creation path should only be implemented when synchronous creation is necessary.\n\t *\n\t * @param context - The context for the data store, providing the necessary information and services.\n\t * @returns An object containing the runtime of the created data store channel.\n\t */\n\tcreateDataStore?(context: IFluidDataStoreContext): {\n\t\treadonly runtime: IFluidDataStoreChannel;\n\t};\n}\n"]}
1
+ {"version":3,"file":"dataStoreFactory.js","sourceRoot":"","sources":["../src/dataStoreFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAClC,wBAAwB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IFluidDataStoreChannel, IFluidDataStoreContext } from \"./dataStoreContext.js\";\n\n/**\n * @legacy @beta\n */\nexport const IFluidDataStoreFactory: keyof IProvideFluidDataStoreFactory =\n\t\"IFluidDataStoreFactory\";\n\n/**\n * @legacy @beta\n */\nexport interface IProvideFluidDataStoreFactory {\n\treadonly IFluidDataStoreFactory: IFluidDataStoreFactory;\n}\n\n/**\n * The `IFluidDataStoreFactory` interface is responsible for creating data stores.\n * A data store is a component that manages a specific set of data and its operations.\n * It encapsulates the logic for data management, synchronization, and interaction\n * with other components within a Fluid container.\n *\n * Data stores are fundamental building blocks in the Fluid Framework. They are used\n * to store and manage state, handle operations, and provide APIs for interacting\n * with the data. Each data store type is associated with a unique identifier (its `type` member)\n * and is typically provided to consumers through a data store registry.\n *\n * The factory is responsible for creating new instances of data stores and loading existing ones.\n * The factory ensures that the data store is correctly initialized.\n *\n * @legacy @beta\n */\nexport interface IFluidDataStoreFactory extends IProvideFluidDataStoreFactory {\n\t/**\n\t * Uniquely identifies the type of data store created by this factory.\n\t */\n\ttype: string;\n\n\t/**\n\t * Asynchronously generates the runtime for the data store from the given context.\n\t * @remarks\n\t * Once created, the data store should be bound to the context.\n\t *\n\t * This method supports both creation and loading paths. It is important to differentiate\n\t * between the two based on the `existing` parameter:\n\t * - When `existing` is false, this method creates a new data store.\n\t * - When `existing` is true, it loads a pre-existing data store.\n\t *\n\t * @param context - The context for the data store, providing necessary information and services.\n\t * @param existing - A boolean indicating whether the data store is being instantiated from an existing file.\n\t * @returns A promise that resolves to the created data store channel.\n\t */\n\tinstantiateDataStore(\n\t\tcontext: IFluidDataStoreContext,\n\t\texisting: boolean,\n\t): Promise<IFluidDataStoreChannel>;\n\n\t/**\n\t * Synchronously creates a new runtime for a new data store from the provided context.\n\t *\n\t * @remarks\n\t * This method enables a synchronous creation path. Specifically, if this factory is registered\n\t * as a child factory in another data store's registry, and the registry synchronously provides\n\t * this factory, it becomes eligible for synchronous creation via the parent data store's context.\n\t * After creation, all subsequent loads of a data store created through this method will utilize\n\t * the asynchronous `instantiateDataStore` method on this factory.\n\t *\n\t * Note: This method is optional. Not all data stores can or will support a synchronous creation path,\n\t * as being synchronous imposes limitations on the capabilities that can be used. Generally, this\n\t * creation path should only be implemented when synchronous creation is necessary.\n\t *\n\t * @param context - The context for the data store, providing the necessary information and services.\n\t * @returns An object containing the runtime of the created data store channel.\n\t */\n\tcreateDataStore?(context: IFluidDataStoreContext): {\n\t\treadonly runtime: IFluidDataStoreChannel;\n\t};\n}\n"]}
@@ -6,22 +6,19 @@ import type { IProvideFluidDataStoreFactory } from "./dataStoreFactory.js";
6
6
  /**
7
7
  * A single registry entry that may be used to create data stores
8
8
  * It has to have either factory or registry, or both.
9
- * @legacy
10
- * @alpha
9
+ * @legacy @beta
11
10
  */
12
11
  export type FluidDataStoreRegistryEntry = Readonly<Partial<IProvideFluidDataStoreRegistry & IProvideFluidDataStoreFactory>>;
13
12
  /**
14
13
  * An associated pair of an identifier and registry entry.
15
14
  * Registry entries may be dynamically loaded.
16
- * @legacy
17
- * @alpha
15
+ * @legacy @beta
18
16
  */
19
17
  export type NamedFluidDataStoreRegistryEntry = [string, Promise<FluidDataStoreRegistryEntry>];
20
18
  /**
21
19
  * An associated pair of an identifier and registry entry.
22
20
  * Registry entries may be dynamically loaded.
23
- * @legacy
24
- * @alpha
21
+ * @legacy @beta
25
22
  */
26
23
  export type NamedFluidDataStoreRegistryEntry2 = [
27
24
  string,
@@ -29,18 +26,15 @@ export type NamedFluidDataStoreRegistryEntry2 = [
29
26
  ];
30
27
  /**
31
28
  * An iterable identifier/registry entry pair list
32
- * @legacy
33
- * @alpha
29
+ * @legacy @beta
34
30
  */
35
31
  export type NamedFluidDataStoreRegistryEntries = Iterable<NamedFluidDataStoreRegistryEntry2>;
36
32
  /**
37
- * @legacy
38
- * @alpha
33
+ * @legacy @beta
39
34
  */
40
35
  export declare const IFluidDataStoreRegistry: keyof IProvideFluidDataStoreRegistry;
41
36
  /**
42
- * @legacy
43
- * @alpha
37
+ * @legacy @beta
44
38
  */
45
39
  export interface IProvideFluidDataStoreRegistry {
46
40
  readonly IFluidDataStoreRegistry: IFluidDataStoreRegistry;
@@ -48,8 +42,7 @@ export interface IProvideFluidDataStoreRegistry {
48
42
  /**
49
43
  * An association of identifiers to data store registry entries, where the
50
44
  * entries can be used to create data stores.
51
- * @legacy
52
- * @alpha
45
+ * @legacy @beta
53
46
  */
54
47
  export interface IFluidDataStoreRegistry extends IProvideFluidDataStoreRegistry {
55
48
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"dataStoreRegistry.d.ts","sourceRoot":"","sources":["../src/dataStoreRegistry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AAE3E;;;;;GAKG;AACH,MAAM,MAAM,2BAA2B,GAAG,QAAQ,CACjD,OAAO,CAAC,8BAA8B,GAAG,6BAA6B,CAAC,CACvE,CAAC;AACF;;;;;GAKG;AACH,MAAM,MAAM,gCAAgC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,2BAA2B,CAAC,CAAC,CAAC;AAE9F;;;;;GAKG;AACH,MAAM,MAAM,iCAAiC,GAAG;IAC/C,MAAM;IACN,OAAO,CAAC,2BAA2B,CAAC,GAAG,2BAA2B;CAClE,CAAC;AACF;;;;GAIG;AACH,MAAM,MAAM,kCAAkC,GAAG,QAAQ,CAAC,iCAAiC,CAAC,CAAC;AAE7F;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,MAAM,8BAClB,CAAC;AAE3B;;;GAGG;AACH,MAAM,WAAW,8BAA8B;IAC9C,QAAQ,CAAC,uBAAuB,EAAE,uBAAuB,CAAC;CAC1D;AAED;;;;;GAKG;AACH,MAAM,WAAW,uBAAwB,SAAQ,8BAA8B;IAC9E;;;;;;;;;OASG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,2BAA2B,GAAG,SAAS,CAAC,CAAC;IAEpE;;;;;;;;;OASG;IACH,OAAO,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,2BAA2B,GAAG,SAAS,CAAC;CAChE"}
1
+ {"version":3,"file":"dataStoreRegistry.d.ts","sourceRoot":"","sources":["../src/dataStoreRegistry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AAE3E;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GAAG,QAAQ,CACjD,OAAO,CAAC,8BAA8B,GAAG,6BAA6B,CAAC,CACvE,CAAC;AACF;;;;GAIG;AACH,MAAM,MAAM,gCAAgC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,2BAA2B,CAAC,CAAC,CAAC;AAE9F;;;;GAIG;AACH,MAAM,MAAM,iCAAiC,GAAG;IAC/C,MAAM;IACN,OAAO,CAAC,2BAA2B,CAAC,GAAG,2BAA2B;CAClE,CAAC;AACF;;;GAGG;AACH,MAAM,MAAM,kCAAkC,GAAG,QAAQ,CAAC,iCAAiC,CAAC,CAAC;AAE7F;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,MAAM,8BAClB,CAAC;AAE3B;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC9C,QAAQ,CAAC,uBAAuB,EAAE,uBAAuB,CAAC;CAC1D;AAED;;;;GAIG;AACH,MAAM,WAAW,uBAAwB,SAAQ,8BAA8B;IAC9E;;;;;;;;;OASG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,2BAA2B,GAAG,SAAS,CAAC,CAAC;IAEpE;;;;;;;;;OASG;IACH,OAAO,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,2BAA2B,GAAG,SAAS,CAAC;CAChE"}
@@ -3,8 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  /**
6
- * @legacy
7
- * @alpha
6
+ * @legacy @beta
8
7
  */
9
8
  export const IFluidDataStoreRegistry = "IFluidDataStoreRegistry";
10
9
  //# sourceMappingURL=dataStoreRegistry.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dataStoreRegistry.js","sourceRoot":"","sources":["../src/dataStoreRegistry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAsCH;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GACnC,yBAAyB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IProvideFluidDataStoreFactory } from \"./dataStoreFactory.js\";\n\n/**\n * A single registry entry that may be used to create data stores\n * It has to have either factory or registry, or both.\n * @legacy\n * @alpha\n */\nexport type FluidDataStoreRegistryEntry = Readonly<\n\tPartial<IProvideFluidDataStoreRegistry & IProvideFluidDataStoreFactory>\n>;\n/**\n * An associated pair of an identifier and registry entry.\n * Registry entries may be dynamically loaded.\n * @legacy\n * @alpha\n */\nexport type NamedFluidDataStoreRegistryEntry = [string, Promise<FluidDataStoreRegistryEntry>];\n\n/**\n * An associated pair of an identifier and registry entry.\n * Registry entries may be dynamically loaded.\n * @legacy\n * @alpha\n */\nexport type NamedFluidDataStoreRegistryEntry2 = [\n\tstring,\n\tPromise<FluidDataStoreRegistryEntry> | FluidDataStoreRegistryEntry,\n];\n/**\n * An iterable identifier/registry entry pair list\n * @legacy\n * @alpha\n */\nexport type NamedFluidDataStoreRegistryEntries = Iterable<NamedFluidDataStoreRegistryEntry2>;\n\n/**\n * @legacy\n * @alpha\n */\nexport const IFluidDataStoreRegistry: keyof IProvideFluidDataStoreRegistry =\n\t\"IFluidDataStoreRegistry\";\n\n/**\n * @legacy\n * @alpha\n */\nexport interface IProvideFluidDataStoreRegistry {\n\treadonly IFluidDataStoreRegistry: IFluidDataStoreRegistry;\n}\n\n/**\n * An association of identifiers to data store registry entries, where the\n * entries can be used to create data stores.\n * @legacy\n * @alpha\n */\nexport interface IFluidDataStoreRegistry extends IProvideFluidDataStoreRegistry {\n\t/**\n\t * Retrieves a data store registry entry by its identifier.\n\t *\n\t * @remarks\n\t * The `get` function plays a crucial role in the lifecycle of a data store by providing access to the registry entry\n\t * associated with a given identifier. This registry entry can then be used to create or load a data store.\n\t *\n\t * @param name - The unique identifier of the data store registry entry to retrieve.\n\t * @returns A promise that resolves to the data store registry entry, or the entry itself, or undefined if not found.\n\t */\n\tget(name: string): Promise<FluidDataStoreRegistryEntry | undefined>;\n\n\t/**\n\t * Synchronously retrieves a data store registry entry by its identifier.\n\t *\n\t * @remarks\n\t * The `get` function plays a crucial role in the lifecycle of a data store by providing access to the registry entry\n\t * associated with a given identifier. This registry entry can then be used to create or load a data store.\n\t *\n\t * @param name - The unique identifier of the data store registry entry to retrieve.\n\t * @returns The data store registry entry, or the entry itself, or undefined if not found.\n\t */\n\tgetSync?(name: string): FluidDataStoreRegistryEntry | undefined;\n}\n"]}
1
+ {"version":3,"file":"dataStoreRegistry.js","sourceRoot":"","sources":["../src/dataStoreRegistry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAkCH;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GACnC,yBAAyB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IProvideFluidDataStoreFactory } from \"./dataStoreFactory.js\";\n\n/**\n * A single registry entry that may be used to create data stores\n * It has to have either factory or registry, or both.\n * @legacy @beta\n */\nexport type FluidDataStoreRegistryEntry = Readonly<\n\tPartial<IProvideFluidDataStoreRegistry & IProvideFluidDataStoreFactory>\n>;\n/**\n * An associated pair of an identifier and registry entry.\n * Registry entries may be dynamically loaded.\n * @legacy @beta\n */\nexport type NamedFluidDataStoreRegistryEntry = [string, Promise<FluidDataStoreRegistryEntry>];\n\n/**\n * An associated pair of an identifier and registry entry.\n * Registry entries may be dynamically loaded.\n * @legacy @beta\n */\nexport type NamedFluidDataStoreRegistryEntry2 = [\n\tstring,\n\tPromise<FluidDataStoreRegistryEntry> | FluidDataStoreRegistryEntry,\n];\n/**\n * An iterable identifier/registry entry pair list\n * @legacy @beta\n */\nexport type NamedFluidDataStoreRegistryEntries = Iterable<NamedFluidDataStoreRegistryEntry2>;\n\n/**\n * @legacy @beta\n */\nexport const IFluidDataStoreRegistry: keyof IProvideFluidDataStoreRegistry =\n\t\"IFluidDataStoreRegistry\";\n\n/**\n * @legacy @beta\n */\nexport interface IProvideFluidDataStoreRegistry {\n\treadonly IFluidDataStoreRegistry: IFluidDataStoreRegistry;\n}\n\n/**\n * An association of identifiers to data store registry entries, where the\n * entries can be used to create data stores.\n * @legacy @beta\n */\nexport interface IFluidDataStoreRegistry extends IProvideFluidDataStoreRegistry {\n\t/**\n\t * Retrieves a data store registry entry by its identifier.\n\t *\n\t * @remarks\n\t * The `get` function plays a crucial role in the lifecycle of a data store by providing access to the registry entry\n\t * associated with a given identifier. This registry entry can then be used to create or load a data store.\n\t *\n\t * @param name - The unique identifier of the data store registry entry to retrieve.\n\t * @returns A promise that resolves to the data store registry entry, or the entry itself, or undefined if not found.\n\t */\n\tget(name: string): Promise<FluidDataStoreRegistryEntry | undefined>;\n\n\t/**\n\t * Synchronously retrieves a data store registry entry by its identifier.\n\t *\n\t * @remarks\n\t * The `get` function plays a crucial role in the lifecycle of a data store by providing access to the registry entry\n\t * associated with a given identifier. This registry entry can then be used to create or load a data store.\n\t *\n\t * @param name - The unique identifier of the data store registry entry to retrieve.\n\t * @returns The data store registry entry, or the entry itself, or undefined if not found.\n\t */\n\tgetSync?(name: string): FluidDataStoreRegistryEntry | undefined;\n}\n"]}
@@ -35,8 +35,7 @@ export declare const gcDataBlobKey = ".gcdata";
35
35
  /**
36
36
  * Garbage collection data returned by nodes in a Container.
37
37
  * Used for running GC in the Container.
38
- * @legacy
39
- * @alpha
38
+ * @legacy @beta
40
39
  */
41
40
  export interface IGarbageCollectionData {
42
41
  /**
@@ -48,8 +47,7 @@ export interface IGarbageCollectionData {
48
47
  }
49
48
  /**
50
49
  * GC details provided to each node during creation.
51
- * @legacy
52
- * @alpha
50
+ * @legacy @beta
53
51
  */
54
52
  export interface IGarbageCollectionDetailsBase {
55
53
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"garbageCollectionDefinitions.d.ts","sourceRoot":"","sources":["../src/garbageCollectionDefinitions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AACH,eAAO,MAAM,SAAS,OAAO,CAAC;AAC9B;;;;GAIG;AACH,eAAO,MAAM,YAAY,SAAS,CAAC;AACnC;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,iBAAiB,CAAC;AACjD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,mBAAmB,CAAC;AACjD;;;;GAIG;AACH,eAAO,MAAM,aAAa,YAAY,CAAC;AAEvC;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACtC;;OAEG;IACH,OAAO,EAAE;QAAE,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;KAAE,CAAC;CACpC;AAED;;;;GAIG;AACH,MAAM,WAAW,6BAA6B;IAC7C;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB;;OAEG;IACH,MAAM,CAAC,EAAE,sBAAsB,CAAC;CAChC"}
1
+ {"version":3,"file":"garbageCollectionDefinitions.d.ts","sourceRoot":"","sources":["../src/garbageCollectionDefinitions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AACH,eAAO,MAAM,SAAS,OAAO,CAAC;AAC9B;;;;GAIG;AACH,eAAO,MAAM,YAAY,SAAS,CAAC;AACnC;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,iBAAiB,CAAC;AACjD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,mBAAmB,CAAC;AACjD;;;;GAIG;AACH,eAAO,MAAM,aAAa,YAAY,CAAC;AAEvC;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACtC;;OAEG;IACH,OAAO,EAAE;QAAE,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;KAAE,CAAC;CACpC;AAED;;;GAGG;AACH,MAAM,WAAW,6BAA6B;IAC7C;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB;;OAEG;IACH,MAAM,CAAC,EAAE,sBAAsB,CAAC;CAChC"}
@@ -1 +1 @@
1
- {"version":3,"file":"garbageCollectionDefinitions.js","sourceRoot":"","sources":["../src/garbageCollectionDefinitions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,CAAC;AAC9B;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC;AACnC;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,cAAc,CAAC;AACjD;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,gBAAgB,CAAC;AACjD;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,SAAS,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * The key for the GC tree in summary.\n *\n * @internal\n */\nexport const gcTreeKey = \"gc\";\n/**\n * The prefix for GC blobs in the GC tree in summary.\n *\n * @internal\n */\nexport const gcBlobPrefix = \"__gc\";\n/**\n * The key for tombstone blob in the GC tree in summary.\n *\n * @internal\n */\nexport const gcTombstoneBlobKey = \"__tombstones\";\n/**\n * The key for deleted nodes blob in the GC tree in summary.\n *\n * @internal\n */\nexport const gcDeletedBlobKey = \"__deletedNodes\";\n/**\n * The key for the GC Data blob in attach summaries.\n *\n * @internal\n */\nexport const gcDataBlobKey = \".gcdata\";\n\n/**\n * Garbage collection data returned by nodes in a Container.\n * Used for running GC in the Container.\n * @legacy\n * @alpha\n */\nexport interface IGarbageCollectionData {\n\t/**\n\t * The GC nodes of a Fluid object in the Container. Each node has an id and a set of routes to other GC nodes.\n\t */\n\tgcNodes: { [id: string]: string[] };\n}\n\n/**\n * GC details provided to each node during creation.\n * @legacy\n * @alpha\n */\nexport interface IGarbageCollectionDetailsBase {\n\t/**\n\t * A list of routes to Fluid objects that are used in this node.\n\t */\n\tusedRoutes?: string[];\n\t/**\n\t * The GC data of this node.\n\t */\n\tgcData?: IGarbageCollectionData;\n}\n"]}
1
+ {"version":3,"file":"garbageCollectionDefinitions.js","sourceRoot":"","sources":["../src/garbageCollectionDefinitions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,CAAC;AAC9B;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC;AACnC;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,cAAc,CAAC;AACjD;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,gBAAgB,CAAC;AACjD;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,SAAS,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * The key for the GC tree in summary.\n *\n * @internal\n */\nexport const gcTreeKey = \"gc\";\n/**\n * The prefix for GC blobs in the GC tree in summary.\n *\n * @internal\n */\nexport const gcBlobPrefix = \"__gc\";\n/**\n * The key for tombstone blob in the GC tree in summary.\n *\n * @internal\n */\nexport const gcTombstoneBlobKey = \"__tombstones\";\n/**\n * The key for deleted nodes blob in the GC tree in summary.\n *\n * @internal\n */\nexport const gcDeletedBlobKey = \"__deletedNodes\";\n/**\n * The key for the GC Data blob in attach summaries.\n *\n * @internal\n */\nexport const gcDataBlobKey = \".gcdata\";\n\n/**\n * Garbage collection data returned by nodes in a Container.\n * Used for running GC in the Container.\n * @legacy @beta\n */\nexport interface IGarbageCollectionData {\n\t/**\n\t * The GC nodes of a Fluid object in the Container. Each node has an id and a set of routes to other GC nodes.\n\t */\n\tgcNodes: { [id: string]: string[] };\n}\n\n/**\n * GC details provided to each node during creation.\n * @legacy @beta\n */\nexport interface IGarbageCollectionDetailsBase {\n\t/**\n\t * A list of routes to Fluid objects that are used in this node.\n\t */\n\tusedRoutes?: string[];\n\t/**\n\t * The GC data of this node.\n\t */\n\tgcData?: IGarbageCollectionData;\n}\n"]}
package/lib/protocol.d.ts CHANGED
@@ -6,8 +6,7 @@ import type { TypedMessage } from "@fluidframework/core-interfaces/internal";
6
6
  import type { ITree, ISignalMessage, ISequencedDocumentMessage, IDocumentStorageServicePolicies, IVersion, ISnapshotTree, ISnapshotFetchOptions, ISnapshot, FetchSource, ICreateBlobResponse, ISummaryTree, ISummaryHandle, ISummaryContext } from "@fluidframework/driver-definitions/internal";
7
7
  /**
8
8
  * An envelope wraps the contents with the intended target
9
- * @legacy
10
- * @alpha
9
+ * @legacy @beta
11
10
  */
12
11
  export interface IEnvelope {
13
12
  /**
@@ -21,8 +20,7 @@ export interface IEnvelope {
21
20
  }
22
21
  /**
23
22
  * Represents ISignalMessage with its type.
24
- * @legacy
25
- * @alpha
23
+ * @legacy @beta
26
24
  */
27
25
  export interface IInboundSignalMessage<TMessage extends TypedMessage = TypedMessage> extends ISignalMessage<TMessage> {
28
26
  readonly type: TMessage["type"];
@@ -30,8 +28,7 @@ export interface IInboundSignalMessage<TMessage extends TypedMessage = TypedMess
30
28
  /**
31
29
  * Message send by client attaching local data structure.
32
30
  * Contains snapshot of data structure which is the current state of this data structure.
33
- * @legacy
34
- * @alpha
31
+ * @legacy @beta
35
32
  */
36
33
  export interface IAttachMessage {
37
34
  /**
@@ -52,8 +49,7 @@ export interface IAttachMessage {
52
49
  * but it should not be used when creating a new attach op.
53
50
  * Older versions of attach messages could have null snapshots,
54
51
  * so this gives correct typings for writing backward compatible code.
55
- * @legacy
56
- * @alpha
52
+ * @legacy @beta
57
53
  */
58
54
  export type InboundAttachMessage = Omit<IAttachMessage, "snapshot"> & {
59
55
  snapshot: IAttachMessage["snapshot"] | null;
@@ -63,14 +59,12 @@ export type InboundAttachMessage = Omit<IAttachMessage, "snapshot"> & {
63
59
  * It is the same as ISequencedDocumentMessage, but without the contents and clientSequenceNumbers
64
60
  * which are sent separately. The contents are modified at multiple layers in the stack so having it
65
61
  * separate doesn't require packing and unpacking the entire message.
66
- * @alpha
67
- * @legacy
62
+ * @legacy @beta
68
63
  */
69
64
  export type ISequencedMessageEnvelope = Omit<ISequencedDocumentMessage, "contents" | "clientSequenceNumber">;
70
65
  /**
71
66
  * These are the contents of a runtime message as it is processed throughout the stack.
72
- * @alpha
73
- * @legacy
67
+ * @legacy @beta
74
68
  * @sealed
75
69
  */
76
70
  export interface IRuntimeMessagesContent {
@@ -89,8 +83,7 @@ export interface IRuntimeMessagesContent {
89
83
  }
90
84
  /**
91
85
  * A collection of messages that are processed by the runtime.
92
- * @alpha
93
- * @legacy
86
+ * @legacy @beta
94
87
  * @sealed
95
88
  */
96
89
  export interface IRuntimeMessageCollection {
@@ -110,8 +103,7 @@ export interface IRuntimeMessageCollection {
110
103
  /**
111
104
  * Interface to provide access to snapshot blobs to DataStore layer.
112
105
  *
113
- * @legacy
114
- * @alpha
106
+ * @legacy @beta
115
107
  */
116
108
  export interface IRuntimeStorageService {
117
109
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AAC7E,OAAO,KAAK,EACX,KAAK,EACL,cAAc,EACd,yBAAyB,EACzB,+BAA+B,EAC/B,QAAQ,EACR,aAAa,EACb,qBAAqB,EACrB,SAAS,EACT,WAAW,EACX,mBAAmB,EACnB,YAAY,EACZ,cAAc,EACd,eAAe,EACf,MAAM,6CAA6C,CAAC;AAErD;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACzB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IAEH,QAAQ,EAAE,GAAG,CAAC;CACd;AAED;;;;GAIG;AACH,MAAM,WAAW,qBAAqB,CAAC,QAAQ,SAAS,YAAY,GAAG,YAAY,CAClF,SAAQ,cAAc,CAAC,QAAQ,CAAC;IAChC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;CAChC;AAED;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC9B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC;CAChB;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,GAAG;IAErE,QAAQ,EAAE,cAAc,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC;CAC5C,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAC3C,yBAAyB,EACzB,UAAU,GAAG,sBAAsB,CACnC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,WAAW,uBAAuB;IACvC;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B;;OAEG;IACH,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAClC;;OAEG;IACH,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;CACtC;AAED;;;;;GAKG;AACH,MAAM,WAAW,yBAAyB;IACzC;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,yBAAyB,CAAC;IAC7C;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,QAAQ,CAAC,eAAe,EAAE,SAAS,uBAAuB,EAAE,CAAC;CAC7D;AAED;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACtC;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAE/C;;;;;;OAMG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAE5B;;;;;;;OAOG;IACH,OAAO,CAAC,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IAE9B;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,+BAA+B,GAAG,SAAS,CAAC;IAEhE;;;OAGG;IAEH,eAAe,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC;IAE1F;;;OAGG;IACH,WAAW,CAAC,CAAC,oBAAoB,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;IAE/E;;;OAGG;IACH,WAAW,CAGV,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,KAAK,EAAE,MAAM,EACb,YAAY,CAAC,EAAE,MAAM,EACrB,WAAW,CAAC,EAAE,WAAW,GACvB,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IAEvB;;;OAGG;IACH,UAAU,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAEhE;;;OAGG;IACH,wBAAwB,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAE3F;;;OAGG;IACH,eAAe,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;CAC/D"}
1
+ {"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AAC7E,OAAO,KAAK,EACX,KAAK,EACL,cAAc,EACd,yBAAyB,EACzB,+BAA+B,EAC/B,QAAQ,EACR,aAAa,EACb,qBAAqB,EACrB,SAAS,EACT,WAAW,EACX,mBAAmB,EACnB,YAAY,EACZ,cAAc,EACd,eAAe,EACf,MAAM,6CAA6C,CAAC;AAErD;;;GAGG;AACH,MAAM,WAAW,SAAS;IACzB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IAEH,QAAQ,EAAE,GAAG,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB,CAAC,QAAQ,SAAS,YAAY,GAAG,YAAY,CAClF,SAAQ,cAAc,CAAC,QAAQ,CAAC;IAChC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;CAChC;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC9B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC;CAChB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,GAAG;IAErE,QAAQ,EAAE,cAAc,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC;CAC5C,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAC3C,yBAAyB,EACzB,UAAU,GAAG,sBAAsB,CACnC,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACvC;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B;;OAEG;IACH,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAClC;;OAEG;IACH,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;CACtC;AAED;;;;GAIG;AACH,MAAM,WAAW,yBAAyB;IACzC;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,yBAAyB,CAAC;IAC7C;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,QAAQ,CAAC,eAAe,EAAE,SAAS,uBAAuB,EAAE,CAAC;CAC7D;AAED;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACtC;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAE/C;;;;;;OAMG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAE5B;;;;;;;OAOG;IACH,OAAO,CAAC,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IAE9B;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,+BAA+B,GAAG,SAAS,CAAC;IAEhE;;;OAGG;IAEH,eAAe,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC;IAE1F;;;OAGG;IACH,WAAW,CAAC,CAAC,oBAAoB,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;IAE/E;;;OAGG;IACH,WAAW,CAGV,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,KAAK,EAAE,MAAM,EACb,YAAY,CAAC,EAAE,MAAM,EACrB,WAAW,CAAC,EAAE,WAAW,GACvB,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IAEvB;;;OAGG;IACH,UAAU,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAEhE;;;OAGG;IACH,wBAAwB,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAE3F;;;OAGG;IACH,eAAe,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;CAC/D"}
@@ -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\n * @alpha\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\n * @alpha\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\n * @alpha\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\n * @alpha\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 * @alpha\n * @legacy\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 * @alpha\n * @legacy\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 * @alpha\n * @legacy\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\n * @alpha\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
@@ -8,8 +8,7 @@ import type { TelemetryEventPropertyTypeExt } from "@fluidframework/telemetry-ut
8
8
  import type { IGarbageCollectionData, IGarbageCollectionDetailsBase } from "./garbageCollectionDefinitions.js";
9
9
  /**
10
10
  * Contains the aggregation data from a Tree/Subtree.
11
- * @legacy
12
- * @alpha
11
+ * @legacy @beta
13
12
  */
14
13
  export interface ISummaryStats {
15
14
  treeNodeCount: number;
@@ -24,8 +23,7 @@ export interface ISummaryStats {
24
23
  * each of its DDS.
25
24
  * Any component that implements IChannelContext, IFluidDataStoreChannel or extends SharedObject
26
25
  * will be taking part of the summarization process.
27
- * @legacy
28
- * @alpha
26
+ * @legacy @beta
29
27
  */
30
28
  export interface ISummaryTreeWithStats {
31
29
  /**
@@ -40,8 +38,7 @@ export interface ISummaryTreeWithStats {
40
38
  }
41
39
  /**
42
40
  * Represents a summary at a current sequence number.
43
- * @legacy
44
- * @alpha
41
+ * @legacy @beta
45
42
  */
46
43
  export interface ISummarizeResult {
47
44
  stats: ISummaryStats;
@@ -61,8 +58,7 @@ export interface ISummarizeResult {
61
58
  * ...
62
59
  * "path1":
63
60
  * ```
64
- * @legacy
65
- * @alpha
61
+ * @legacy @beta
66
62
  */
67
63
  export interface ISummarizeInternalResult extends ISummarizeResult {
68
64
  id: string;
@@ -74,8 +70,7 @@ export interface ISummarizeInternalResult extends ISummarizeResult {
74
70
  /**
75
71
  * @experimental - Can be deleted/changed at any time
76
72
  * Contains the necessary information to allow DDSes to do incremental summaries
77
- * @legacy
78
- * @alpha
73
+ * @legacy @beta
79
74
  */
80
75
  export interface IExperimentalIncrementalSummaryContext {
81
76
  /**
@@ -99,13 +94,11 @@ export interface IExperimentalIncrementalSummaryContext {
99
94
  readonly summaryPath: string;
100
95
  }
101
96
  /**
102
- * @legacy
103
- * @alpha
97
+ * @legacy @beta
104
98
  */
105
99
  export type SummarizeInternalFn = (fullTree: boolean, trackState: boolean, telemetryContext?: ITelemetryContext, incrementalSummaryContext?: IExperimentalIncrementalSummaryContext) => Promise<ISummarizeInternalResult>;
106
100
  /**
107
- * @legacy
108
- * @alpha
101
+ * @legacy @beta
109
102
  */
110
103
  export interface ISummarizerNodeConfig {
111
104
  /**
@@ -115,8 +108,7 @@ export interface ISummarizerNodeConfig {
115
108
  readonly canReuseHandle?: boolean;
116
109
  }
117
110
  /**
118
- * @legacy
119
- * @alpha
111
+ * @legacy @beta
120
112
  */
121
113
  export interface ISummarizerNodeConfigWithGC extends ISummarizerNodeConfig {
122
114
  /**
@@ -126,8 +118,7 @@ export interface ISummarizerNodeConfigWithGC extends ISummarizerNodeConfig {
126
118
  readonly gcDisabled?: boolean;
127
119
  }
128
120
  /**
129
- * @legacy
130
- * @alpha
121
+ * @legacy @beta
131
122
  */
132
123
  export declare enum CreateSummarizerNodeSource {
133
124
  FromSummary = 0,
@@ -135,8 +126,7 @@ export declare enum CreateSummarizerNodeSource {
135
126
  Local = 2
136
127
  }
137
128
  /**
138
- * @legacy
139
- * @alpha
129
+ * @legacy @beta
140
130
  */
141
131
  export type CreateChildSummarizerNodeParam = {
142
132
  type: CreateSummarizerNodeSource.FromSummary;
@@ -148,8 +138,7 @@ export type CreateChildSummarizerNodeParam = {
148
138
  type: CreateSummarizerNodeSource.Local;
149
139
  };
150
140
  /**
151
- * @legacy
152
- * @alpha
141
+ * @legacy @beta
153
142
  */
154
143
  export interface ISummarizerNode {
155
144
  /**
@@ -232,8 +221,7 @@ export interface ISummarizerNode {
232
221
  * `isReferenced`: This tells whether this node is referenced in the document or not.
233
222
  *
234
223
  * `updateUsedRoutes`: Used to notify this node of routes that are currently in use in it.
235
- * @legacy
236
- * @alpha
224
+ * @legacy @beta
237
225
  */
238
226
  export interface ISummarizerNodeWithGC extends ISummarizerNode {
239
227
  createChild(
@@ -312,8 +300,7 @@ export interface ITelemetryContextExt {
312
300
  /**
313
301
  * Contains telemetry data relevant to summarization workflows.
314
302
  * This object is expected to be modified directly by various summarize methods.
315
- * @legacy
316
- * @alpha
303
+ * @legacy @beta
317
304
  */
318
305
  export interface ITelemetryContext {
319
306
  /**