import * as v from '../../shared/src/valita.ts';
export declare const upstreamSchema: v.UnionType<[v.TupleType<[v.Type<"initConnection">, v.ObjectType<{
    desiredQueriesPatch: v.ArrayType<v.UnionType<[v.ObjectType<Omit<{
        op: v.Type<"put">;
        hash: v.Type<string>;
        ttl: v.Optional<number>;
    }, "name" | "ast" | "args"> & {
        ast: v.Optional<import("./ast.ts").AST>;
        name: v.Optional<string>;
        args: v.Optional<readonly import("../../shared/src/json.ts").ReadonlyJSONValue[]>;
    }, undefined>, v.ObjectType<{
        op: v.Type<"del">;
        hash: v.Type<string>;
    }, undefined>, v.ObjectType<{
        op: v.Type<"clear">;
    }, undefined>]>>;
    clientSchema: v.Optional<{
        tables: Record<string, {
            columns: Record<string, {
                type: import("./client-schema.ts").ValueType;
            }>;
            primaryKey: string[];
        }>;
    }>;
    deleted: v.Optional<{
        readonly clientIDs?: readonly string[] | undefined;
        readonly clientGroupIDs?: readonly string[] | undefined;
    }>;
    userPushURL: v.Optional<string>;
    userPushHeaders: v.Optional<Record<string, string>>;
    userQueryURL: v.Optional<string>;
    userQueryHeaders: v.Optional<Record<string, string>>;
    activeClients: v.Optional<string[]>;
}, undefined>]>, v.TupleType<[v.Type<"ping">, v.ObjectType<{}, undefined>]>, v.TupleType<[v.Type<"deleteClients">, v.UnionType<[v.ObjectType<Readonly<{
    clientIDs: v.Optional<readonly string[]>;
    clientGroupIDs: v.Optional<readonly string[]>;
}>, undefined>]>]>, v.TupleType<[v.Type<"changeDesiredQueries">, v.ObjectType<{
    desiredQueriesPatch: v.ArrayType<v.UnionType<[v.ObjectType<Omit<{
        op: v.Type<"put">;
        hash: v.Type<string>;
        ttl: v.Optional<number>;
    }, "name" | "ast" | "args"> & {
        ast: v.Optional<import("./ast.ts").AST>;
        name: v.Optional<string>;
        args: v.Optional<readonly import("../../shared/src/json.ts").ReadonlyJSONValue[]>;
    }, undefined>, v.ObjectType<{
        op: v.Type<"del">;
        hash: v.Type<string>;
    }, undefined>, v.ObjectType<{
        op: v.Type<"clear">;
    }, undefined>]>>;
}, undefined>]>, v.TupleType<[v.Type<"pull">, v.ObjectType<{
    clientGroupID: v.Type<string>;
    cookie: v.UnionType<[v.Type<string>, v.Type<null>]>;
    requestID: v.Type<string>;
}, undefined>]>, v.TupleType<[v.Type<"updateAuth">, v.ObjectType<{
    auth: v.Type<string>;
}, undefined>]>, v.TupleType<[v.Type<"push">, v.ObjectType<{
    clientGroupID: v.Type<string>;
    mutations: v.ArrayType<v.UnionType<[v.ObjectType<{
        type: v.Type<"crud">;
        id: v.Type<number>;
        clientID: v.Type<string>;
        name: v.Type<"_zero_crud">;
        args: v.TupleType<[v.ObjectType<{
            ops: v.ArrayType<v.UnionType<[v.ObjectType<{
                op: v.Type<"insert">;
                tableName: v.Type<string>;
                primaryKey: v.Type<readonly [string, ...string[]]>;
                value: v.Type<Readonly<Record<string, import("../../shared/src/json.ts").ReadonlyJSONValue | undefined>>>;
            }, undefined>, v.ObjectType<{
                op: v.Type<"upsert">;
                tableName: v.Type<string>;
                primaryKey: v.Type<readonly [string, ...string[]]>;
                value: v.Type<Readonly<Record<string, import("../../shared/src/json.ts").ReadonlyJSONValue | undefined>>>;
            }, undefined>, v.ObjectType<{
                op: v.Type<"update">;
                tableName: v.Type<string>;
                primaryKey: v.Type<readonly [string, ...string[]]>;
                value: v.Type<Readonly<Record<string, import("../../shared/src/json.ts").ReadonlyJSONValue | undefined>>>;
            }, undefined>, v.ObjectType<{
                op: v.Type<"delete">;
                tableName: v.Type<string>;
                primaryKey: v.Type<readonly [string, ...string[]]>;
                value: v.Type<Readonly<Record<string, string | number | boolean>>>;
            }, undefined>]>>;
        }, undefined>]>;
        timestamp: v.Type<number>;
    }, undefined>, v.ObjectType<{
        type: v.Type<"custom">;
        id: v.Type<number>;
        clientID: v.Type<string>;
        name: v.Type<string>;
        args: v.ArrayType<v.Type<import("../../shared/src/json.ts").ReadonlyJSONValue>>;
        timestamp: v.Type<number>;
    }, undefined>]>>;
    pushVersion: v.Type<number>;
    schemaVersion: v.Optional<number>;
    timestamp: v.Type<number>;
    requestID: v.Type<string>;
    auth: v.Optional<string>;
}, undefined>]>, v.TupleType<[v.Type<"closeConnection">, v.ArrayType<v.Type<unknown>>]>, v.TupleType<[v.Type<"inspect">, v.UnionType<[v.ObjectType<Omit<{
    id: v.Type<string>;
}, "op" | "clientID"> & {
    op: v.Type<"queries">;
    clientID: v.Optional<string>;
}, undefined>, v.ObjectType<Omit<{
    id: v.Type<string>;
}, "op"> & {
    op: v.Type<"metrics">;
}, undefined>, v.ObjectType<Omit<{
    id: v.Type<string>;
}, "op"> & {
    op: v.Type<"version">;
}, undefined>, v.ObjectType<Omit<{
    id: v.Type<string>;
}, "value" | "op"> & {
    op: v.Type<"authenticate">;
    value: v.Type<string>;
}, undefined>, v.ObjectType<Omit<{
    id: v.Type<string>;
}, "value" | "name" | "op" | "options" | "ast" | "args"> & {
    op: v.Type<"analyze-query">;
    value: v.Optional<import("./ast.ts").AST>;
    options: v.Optional<{
        vendedRows?: boolean | undefined;
        syncedRows?: boolean | undefined;
        joinPlans?: boolean | undefined;
    }>;
    ast: v.Optional<import("./ast.ts").AST>;
    name: v.Optional<string>;
    args: v.Optional<readonly import("../../shared/src/json.ts").ReadonlyJSONValue[]>;
}, undefined>]>]>, v.TupleType<[v.Type<"ackMutationResponses">, v.ObjectType<{
    id: v.Type<number>;
    clientID: v.Type<string>;
}, undefined>]>]>;
export type Upstream = v.Infer<typeof upstreamSchema>;
//# sourceMappingURL=up.d.ts.map