/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { type Static, type TSchema } from "@sinclair/typebox";
import { type Values } from "../../util/index.js";
import type { ForestRootId } from "./detachedFieldIndexTypes.js";
/**
 * The format version for the detached field index.
 */
export declare const DetachedFieldIndexFormatVersion: {
    readonly v1: import("../../util/brand.js").Brand<1, "DetachedFieldIndexFormatVersion">;
    readonly v2: import("../../util/brand.js").Brand<2, "DetachedFieldIndexFormatVersion">;
};
export type DetachedFieldIndexFormatVersion = Values<typeof DetachedFieldIndexFormatVersion>;
/**
 * The ID of a detached node. Is not globally unique on.
 * A `RevisionTag` + `DetachId` pair is globally unique and eventually consistent across clients.
 */
export declare const DetachId: import("@sinclair/typebox").TNumber;
/**
 * The ID of a root node in the forest associated with the owning checkout. Is unique for that forest.
 * Is not consistent across clients.
 */
export declare const ForestRootIdSchema: import("@sinclair/typebox").TUnsafe<ForestRootId>;
/**
 * A mapping from a range of the detached node IDs the corresponding range root IDs.
 * The detached node IDs need to be qualified with a revision (stored in the containing `EncodedRootsForRevision`).
 * Note: the length of the range (currently always 1) can be looked up in the forest.
 */
export declare const RootRange: import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TUnsafe<ForestRootId>]>;
export type RootRange = Static<typeof RootRange>;
export declare const RootRanges: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TUnsafe<ForestRootId>]>>;
export type RootRanges = Static<typeof RootRanges>;
/**
 * For all the roots detached in a revision, represents a mapping from the detached node ID to corresponding root ID.
 */
export declare const EncodedRootsForRevision: <Schema extends TSchema>(tRevisionTag: Schema) => import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[Schema, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TUnsafe<ForestRootId>]>>]>, import("@sinclair/typebox").TTuple<[Schema, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TUnsafe<ForestRootId>]>]>;
export type EncodedRootsForRevision = Static<ReturnType<typeof EncodedRootsForRevision>>;
export declare const Format: <TVersion extends DetachedFieldIndexFormatVersion, TRevisionTagSchema extends TSchema>(tVersion: TVersion, tRevisionTag: TRevisionTagSchema) => import("@sinclair/typebox").TObject<{
    version: import("@sinclair/typebox").TLiteral<TVersion>;
    data: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[TRevisionTagSchema, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TUnsafe<ForestRootId>]>>]>, import("@sinclair/typebox").TTuple<[TRevisionTagSchema, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TUnsafe<ForestRootId>]>]>>;
    maxId: import("@sinclair/typebox").TUnsafe<ForestRootId>;
}>;
export type Format = Static<ReturnType<typeof Format>>;
//# sourceMappingURL=detachedFieldIndexFormatCommon.d.ts.map