/*! * Copyright (c) Microsoft Corporation and contributors. All rights reserved. * Licensed under the MIT License. */ import type { ISnapshotTree, ISequencedDocumentMessage } from "@fluidframework/driver-definitions/internal"; import { type ISummaryTreeWithStats, type IRuntimeStorageService } from "@fluidframework/runtime-definitions/internal"; import type { IGCMetadata } from "../gc/index.js"; import type { IDocumentSchema } from "./documentSchema.js"; /** * @deprecated This interface will no longer be exported in the future(AB#8004). * @legacy @beta */ export type OmitAttributesVersions = Omit; /** * @deprecated This interface will no longer be exported in the future(AB#8004). * @legacy @beta */ export interface IFluidDataStoreAttributes0 { readonly snapshotFormatVersion?: undefined; readonly summaryFormatVersion?: undefined; pkg: string; /** * This tells whether a data store is root. Root data stores are never collected. * Non-root data stores may be collected if they are not used. If this is not present, default it to * true. This will ensure that older data stores are incorrectly collected. */ readonly isRootDataStore?: boolean; } /** * @deprecated This interface will no longer be exported in the future(AB#8004). * @legacy @beta */ export interface IFluidDataStoreAttributes1 extends OmitAttributesVersions { readonly snapshotFormatVersion: "0.1"; readonly summaryFormatVersion?: undefined; } /** * @deprecated This interface will no longer be exported in the future(AB#8004). * @legacy @beta */ export interface IFluidDataStoreAttributes2 extends OmitAttributesVersions { /** * Switch from snapshotFormatVersion to summaryFormatVersion */ readonly snapshotFormatVersion?: undefined; readonly summaryFormatVersion: 2; /** * True if channels are not isolated in .channels subtrees, otherwise isolated. * This is required in both datastore attributes as well as the root container, * because reused summary handles may cause different format versions in each * datastore subtree within the summary. */ readonly disableIsolatedChannels?: true; } /** * Added IFluidDataStoreAttributes similar to IChannelAttributes which will tell the attributes of a * store like the package, snapshotFormatVersion to take different decisions based on a particular * snapshotFormatVersion. * * @deprecated This interface will no longer be exported in the future(AB#8004). * * @legacy @beta * */ export type ReadFluidDataStoreAttributes = IFluidDataStoreAttributes0 | IFluidDataStoreAttributes1 | IFluidDataStoreAttributes2; export type WriteFluidDataStoreAttributes = IFluidDataStoreAttributes1 | IFluidDataStoreAttributes2; export declare function getAttributesFormatVersion(attributes: ReadFluidDataStoreAttributes): number; export declare function hasIsolatedChannels(attributes: ReadFluidDataStoreAttributes): boolean; /** * @internal */ export interface IContainerRuntimeMetadata extends ICreateContainerMetadata, IGCMetadata { readonly summaryFormatVersion: 1; /** * @deprecated used by old (prior to 2.0 RC3) runtimes */ readonly message?: ISummaryMetadataMessage; /** * The last message processed at the time of summary. Only primitive property types are added to the summary. */ readonly lastMessage?: ISummaryMetadataMessage; /** * True if channels are not isolated in .channels subtrees, otherwise isolated. */ readonly disableIsolatedChannels?: true; /** * The summary number for a container's summary. Incremented on summaries throughout its lifetime. */ readonly summaryNumber?: number; /** * GUID to identify a document in telemetry */ readonly telemetryDocumentId?: string; readonly documentSchema?: IDocumentSchema; } /** * @internal */ export interface ICreateContainerMetadata { /** * Runtime version of the container when it was first created */ createContainerRuntimeVersion?: string; /** * Timestamp of the container when it was first created */ createContainerTimestamp?: number; } /** * The properties of an ISequencedDocumentMessage to be stored in the metadata blob in summary. * @internal */ export type ISummaryMetadataMessage = Pick; /** * Extracts the properties from an ISequencedDocumentMessage as defined by ISummaryMetadataMessage. This message is * added to the metadata blob in summary. */ export declare const extractSummaryMetadataMessage: (message?: ISequencedDocumentMessage) => ISummaryMetadataMessage | undefined; export declare function getMetadataFormatVersion(metadata?: IContainerRuntimeMetadata): number; export declare const aliasBlobName = ".aliases"; export declare const metadataBlobName = ".metadata"; export declare const chunksBlobName = ".chunks"; export declare const recentBatchInfoBlobName = ".recentBatchInfo"; export declare const electedSummarizerBlobName = ".electedSummarizer"; export declare const idCompressorBlobName = ".idCompressor"; export declare function rootHasIsolatedChannels(metadata?: IContainerRuntimeMetadata): boolean; export declare const protocolTreeName = ".protocol"; /** * List of tree IDs at the container level which are reserved. * This is for older versions of summaries that do not yet have an * isolated data stores namespace. Without the namespace, this must * be used to prevent name collisions with data store IDs. */ export declare const nonDataStorePaths: string[]; export declare const dataStoreAttributesBlobName = ".component"; /** * Modifies summary tree and stats to put tree under .channels tree. * * @param summarizeResult - Summary tree and stats to modify * * @example * * Converts from: * * ```typescript * { * type: SummaryType.Tree, * tree: { a: {...}, b: {...}, c: {...} }, * } * ``` * * to: * * ```typescript * { * type: SummaryType.Tree, * tree: { * ".channels": { * type: SummaryType.Tree, * tree: { a: {...}, b: {...}, c: {...} } * }, * }, * } * ``` * * And adds +1 to treeNodeCount in stats. */ export declare function wrapSummaryInChannelsTree(summarizeResult: ISummaryTreeWithStats): void; export declare function getFluidDataStoreAttributes(storage: IRuntimeStorageService, snapshot: ISnapshotTree): Promise; export { blobHeadersBlobName } from "@fluidframework/driver-utils/internal"; //# sourceMappingURL=summaryFormat.d.ts.map