/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { Static } from "@sinclair/typebox";
export declare const version = 1;
export declare const validVersions: Set<number>;
/**
 * Top level length is implied from length of data array.
 * All content are of this shape.
 */
export declare const EncodedNestedArray: import("@sinclair/typebox").TNumber;
/**
 * Inline array.
 */
export declare const EncodedInlineArray: import("@sinclair/typebox").TObject<{
    length: import("@sinclair/typebox").TNumber;
    /**
     * All entries are this shape.
     */
    shape: import("@sinclair/typebox").TNumber;
}>;
/**
 * Encoded as `shape, ...[data for shape]`.
 *
 * Used for polymorphism.
 */
export declare const EncodedAnyShape: import("@sinclair/typebox").TLiteral<0>;
/**
 * Content of the encoded field is specified by the Shape referenced by the ShapeIndex.
 * This is a tuple for conciseness.
 */
export declare const EncodedFieldShape: import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber]>, import("@sinclair/typebox").TNumber]>;
export type EncodedFieldShape = Static<typeof EncodedFieldShape>;
declare enum CounterRelativeTo {
    PreviousNodeOfType_DepthFirstPreOrder = 0
}
declare enum CounterMode {
    Number = 0,
    UUID = 1
}
/**
 * Delta encoded value relative to a previous node's value.
 */
export declare const EncodedCounter: import("@sinclair/typebox").TObject<{
    relativeTo: import("@sinclair/typebox").TEnum<typeof CounterRelativeTo>;
    delta: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
    mode: import("@sinclair/typebox").TEnum<typeof CounterMode>;
}>;
/**
 * Shape of a value on a node.
 *
 * Due to limitations of TypeBox and differences between JavaScript objects, TypeScript types and JSON,
 * the case where no information about the value is captured in the shape is a bit confusing.
 * In TypeBox this is allowed by the user of this type putting it in an optional property.
 * In TypeScript it is modeled using `undefined`.
 * In JavaScript the property may be missing or explicitly `undefined`.
 * In JSON this will serialize as the property being omitted.
 * In this case, the value will be encoded as either:
 * - `false` (when there is no value) OR
 * - `true, value` when there is a value.
 *
 * For a more compact encoding, there are three options for the shape:
 * - `true`: there is a value, and it will simply be encoded by putting it in the output buffer (so `value`).
 * - `false`: there is never a value, and it takes up no space in the output buffer.
 * - `[value]`: there is a value, and its always the same.
 * Takes up no space in the output buffer: the value comes from the shape arrays's content.
 * It is wrapped in an array to differentiate value shape types.
 *
 * In the future other value shape formats may be added, likely as objects.
 *
 * @remarks
 * See {@link EncodedTreeShape} for usage.
 */
export declare const EncodedValueShape: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TAny>]>;
export type EncodedValueShape = undefined | Static<typeof EncodedValueShape>;
export declare const EncodedTreeShape: import("@sinclair/typebox").TObject<{
    /**
     * If not provided, inlined in data.
     */
    type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber]>>;
    value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TAny>]>>;
    /**
     * Fields with fixed (per key) shapes.
     * They are encoded in the order they are specified here.
     * To ensure the order is preserved, this is an array instead of an object with keys.
     */
    fields: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber]>, import("@sinclair/typebox").TNumber]>>>;
    /**
     * If undefined, no data. Otherwise, nested array of `[key, ...data]*`
     * Covers any fields beyond those in `fields`.
     */
    extraFields: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
}>;
/**
 * Discriminated union of chunk shapes.
 *
 * See {@link DiscriminatedUnionDispatcher} for more information on this pattern.
 */
export declare const EncodedChunkShape: import("@sinclair/typebox").TObject<{
    /**
     * {@link EncodedNestedArray} union member.
     */
    a: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
    /**
     * {@link EncodedInlineArray} union member.
     */
    b: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
        length: import("@sinclair/typebox").TNumber;
        /**
         * All entries are this shape.
         */
        shape: import("@sinclair/typebox").TNumber;
    }>>;
    /**
     * {@link EncodedTreeShape} union member.
     */
    c: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
        /**
         * If not provided, inlined in data.
         */
        type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber]>>;
        value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TAny>]>>;
        /**
         * Fields with fixed (per key) shapes.
         * They are encoded in the order they are specified here.
         * To ensure the order is preserved, this is an array instead of an object with keys.
         */
        fields: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber]>, import("@sinclair/typebox").TNumber]>>>;
        /**
         * If undefined, no data. Otherwise, nested array of `[key, ...data]*`
         * Covers any fields beyond those in `fields`.
         */
        extraFields: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
    }>>;
    /**
     * {@link EncodedAnyShape} union member.
     */
    d: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TLiteral<0>>;
}>;
export type EncodedChunkShape = Static<typeof EncodedChunkShape>;
export type EncodedNestedArray = Static<typeof EncodedNestedArray>;
export type EncodedInlineArray = Static<typeof EncodedInlineArray>;
export type EncodedTreeShape = Static<typeof EncodedTreeShape>;
export type EncodedAnyShape = Static<typeof EncodedAnyShape>;
export declare const EncodedFieldBatch: import("@sinclair/typebox").TObject<{
    data: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TAny>>;
    version: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TLiteral<number>]>;
    identifiers: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
    shapes: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
        /**
         * {@link EncodedNestedArray} union member.
         */
        a: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
        /**
         * {@link EncodedInlineArray} union member.
         */
        b: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
            length: import("@sinclair/typebox").TNumber;
            /**
             * All entries are this shape.
             */
            shape: import("@sinclair/typebox").TNumber;
        }>>;
        /**
         * {@link EncodedTreeShape} union member.
         */
        c: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
            /**
             * If not provided, inlined in data.
             */
            type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber]>>;
            value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TAny>]>>;
            /**
             * Fields with fixed (per key) shapes.
             * They are encoded in the order they are specified here.
             * To ensure the order is preserved, this is an array instead of an object with keys.
             */
            fields: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber]>, import("@sinclair/typebox").TNumber]>>>;
            /**
             * If undefined, no data. Otherwise, nested array of `[key, ...data]*`
             * Covers any fields beyond those in `fields`.
             */
            extraFields: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
        }>>;
        /**
         * {@link EncodedAnyShape} union member.
         */
        d: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TLiteral<0>>;
    }>>;
}>;
export type EncodedFieldBatch = Static<typeof EncodedFieldBatch>;
export {};
//# sourceMappingURL=format.d.ts.map