import type { DeepReadonly } from '../../../shared/src/json.ts';
import * as v from '../../../shared/src/valita.ts';
import type { PrimaryKey } from '../../../zero-protocol/src/primary-key.ts';
import type { SchemaValue } from '../../../zero-schema/src/table-schema.ts';
export declare const pgTypeClassSchema: v.Type<"e" | "b" | "d" | "c" | "p" | "r" | "m">;
export declare const pgReplicaIdentitySchema: v.Type<"n" | "d" | "f" | "i">;
export declare const columnSpec: v.ObjectType<{
    pos: v.Type<number>;
    dataType: v.Type<string>;
    pgTypeClass: v.Optional<"e" | "b" | "d" | "c" | "p" | "r" | "m">;
    elemPgTypeClass: v.Optional<"e" | "b" | "d" | "c" | "p" | "r" | "m" | null>;
    characterMaximumLength: v.Optional<number | null>;
    notNull: v.Optional<boolean | null>;
    dflt: v.Optional<string | null>;
}, undefined>;
export type ColumnSpec = Readonly<v.Infer<typeof columnSpec>>;
export declare const liteTableSpec: v.ObjectType<{
    name: v.Type<string>;
    columns: v.Type<Record<string, {
        pgTypeClass?: "e" | "b" | "d" | "c" | "p" | "r" | "m" | undefined;
        elemPgTypeClass?: "e" | "b" | "d" | "c" | "p" | "r" | "m" | null | undefined;
        characterMaximumLength?: number | null | undefined;
        notNull?: boolean | null | undefined;
        dflt?: string | null | undefined;
        pos: number;
        dataType: string;
    }>>;
    primaryKey: v.Optional<string[]>;
}, undefined>;
export declare const tableSpec: v.ObjectType<Omit<{
    name: v.Type<string>;
    columns: v.Type<Record<string, {
        pgTypeClass?: "e" | "b" | "d" | "c" | "p" | "r" | "m" | undefined;
        elemPgTypeClass?: "e" | "b" | "d" | "c" | "p" | "r" | "m" | null | undefined;
        characterMaximumLength?: number | null | undefined;
        notNull?: boolean | null | undefined;
        dflt?: string | null | undefined;
        pos: number;
        dataType: string;
    }>>;
    primaryKey: v.Optional<string[]>;
}, "schema"> & {
    schema: v.Type<string>;
}, undefined>;
export declare const publishedTableSpec: v.ObjectType<Omit<Omit<{
    name: v.Type<string>;
    columns: v.Type<Record<string, {
        pgTypeClass?: "e" | "b" | "d" | "c" | "p" | "r" | "m" | undefined;
        elemPgTypeClass?: "e" | "b" | "d" | "c" | "p" | "r" | "m" | null | undefined;
        characterMaximumLength?: number | null | undefined;
        notNull?: boolean | null | undefined;
        dflt?: string | null | undefined;
        pos: number;
        dataType: string;
    }>>;
    primaryKey: v.Optional<string[]>;
}, "schema"> & {
    schema: v.Type<string>;
}, "publications" | "columns" | "oid" | "replicaIdentity"> & {
    oid: v.Type<number>;
    columns: v.Type<Record<string, {
        pgTypeClass?: "e" | "b" | "d" | "c" | "p" | "r" | "m" | undefined;
        elemPgTypeClass?: "e" | "b" | "d" | "c" | "p" | "r" | "m" | null | undefined;
        characterMaximumLength?: number | null | undefined;
        notNull?: boolean | null | undefined;
        dflt?: string | null | undefined;
        pos: number;
        dataType: string;
        typeOID: number;
    }>>;
    replicaIdentity: v.Optional<"n" | "d" | "f" | "i">;
    publications: v.Type<Record<string, {
        rowFilter: string | null;
    }>>;
}, undefined>;
export type MutableLiteTableSpec = v.Infer<typeof liteTableSpec>;
export type LiteTableSpec = Readonly<MutableLiteTableSpec>;
export type LiteTableSpecWithKeys = Omit<LiteTableSpec, 'primaryKey'> & {
    /**
     * The key selected to act as the "primary key". Primary keys
     * are not explicitly set on the replica, but an appropriate
     * unique index is required.
     */
    primaryKey: PrimaryKey;
    /**
     * The union of all columns that are part of any unique index.
     * This is guaranteed to include any combination of columns that
     * can serve as a key.
     */
    unionKey: PrimaryKey;
    /**
     * All keys associated with a unique index over non-null
     * columns, i.e. suitable as a primary key.
     */
    allKeys: PrimaryKey[];
};
export type LiteAndZqlSpec = {
    tableSpec: LiteTableSpecWithKeys;
    zqlSpec: Record<string, SchemaValue>;
};
export type TableSpec = Readonly<v.Infer<typeof tableSpec>>;
export type PublishedTableSpec = Readonly<v.Infer<typeof publishedTableSpec>>;
export declare const directionSchema: v.Type<"ASC" | "DESC">;
export declare const liteIndexSpec: v.ObjectType<{
    name: v.Type<string>;
    tableName: v.Type<string>;
    unique: v.Type<boolean>;
    columns: v.Type<Record<string, "ASC" | "DESC">>;
}, undefined>;
export type MutableLiteIndexSpec = v.Infer<typeof liteIndexSpec>;
export type LiteIndexSpec = Readonly<MutableLiteIndexSpec>;
export declare const indexSpec: v.ObjectType<Omit<{
    name: v.Type<string>;
    tableName: v.Type<string>;
    unique: v.Type<boolean>;
    columns: v.Type<Record<string, "ASC" | "DESC">>;
}, "schema"> & {
    schema: v.Type<string>;
}, undefined>;
export type IndexSpec = DeepReadonly<v.Infer<typeof indexSpec>>;
export declare const publishedIndexSpec: v.ObjectType<Omit<Omit<{
    name: v.Type<string>;
    tableName: v.Type<string>;
    unique: v.Type<boolean>;
    columns: v.Type<Record<string, "ASC" | "DESC">>;
}, "schema"> & {
    schema: v.Type<string>;
}, "isReplicaIdentity" | "isImmediate"> & {
    isReplicaIdentity: v.Optional<boolean>;
    isImmediate: v.Optional<boolean>;
}, undefined>;
export type PublishedIndexSpec = DeepReadonly<v.Infer<typeof publishedIndexSpec>>;
//# sourceMappingURL=specs.d.ts.map