/**
 * These types represent the _compiled_ config whereas `define-config` types represent the _source_ config.
 */
import type { LogContext } from '@rocicorp/logger';
import { type Config, type ParseOptions } from '../../../shared/src/options.ts';
import * as v from '../../../shared/src/valita.ts';
import { type NormalizedZeroConfig } from './normalize.ts';
export type { LogConfig } from '../../../otel/src/log-options.ts';
export declare const ZERO_ENV_VAR_PREFIX = "ZERO_";
export declare const appOptions: {
    id: {
        type: v.Type<string>;
        desc: string[];
    };
    publications: {
        type: v.Type<string[]>;
        desc: string[];
    };
};
export declare const shardOptions: {
    id: {
        type: v.Optional<string>;
        hidden: boolean;
    };
    num: {
        type: v.Type<number>;
        desc: string[];
        hidden: boolean;
    };
};
declare const replicaOptions: {
    file: {
        type: v.Type<string>;
        desc: string[];
    };
    vacuumIntervalHours: {
        type: v.Optional<number>;
        desc: string[];
    };
};
export type ReplicaOptions = Config<typeof replicaOptions>;
declare const perUserMutationLimit: {
    max: {
        type: v.Optional<number>;
        desc: string[];
    };
    windowMs: {
        type: v.Type<number>;
        desc: string[];
    };
};
export type RateLimit = Config<typeof perUserMutationLimit>;
declare const authOptions: {
    jwk: {
        type: v.Optional<string>;
        desc: string[];
        deprecated: string[];
    };
    jwksUrl: {
        type: v.Optional<string>;
        desc: string[];
        deprecated: string[];
    };
    secret: {
        type: v.Optional<string>;
        desc: string[];
        deprecated: string[];
    };
    issuer: {
        type: v.Optional<string>;
        desc: string[];
        deprecated: string[];
    };
    audience: {
        type: v.Optional<string>;
        desc: string[];
        deprecated: string[];
    };
};
/** @deprecated */
export type AuthConfig = Config<typeof authOptions>;
export declare const zeroOptions: {
    upstream: {
        db: {
            type: v.Type<string>;
            desc: string[];
        };
        type: {
            type: v.Type<"pg" | "custom">;
            desc: string[];
            hidden: boolean;
        };
        maxConns: {
            type: v.Type<number>;
            desc: string[];
        };
        maxConnsPerWorker: {
            type: v.Optional<number>;
            hidden: boolean;
        };
    };
    /** @deprecated */
    push: {
        url: {
            deprecated?: string[];
            type: v.Optional<string[]>;
            desc: string[];
        };
        apiKey: {
            deprecated?: string[];
            type: v.Optional<string>;
            desc: string[];
        };
        forwardCookies: {
            deprecated?: string[];
            type: v.Type<boolean>;
            desc: string[];
        };
        allowedClientHeaders: {
            deprecated?: string[];
            type: v.Optional<string[]>;
            desc: string[];
        };
    };
    mutate: {
        url: {
            deprecated?: string[];
            type: v.Optional<string[]>;
            desc: string[];
        };
        apiKey: {
            deprecated?: string[];
            type: v.Optional<string>;
            desc: string[];
        };
        forwardCookies: {
            deprecated?: string[];
            type: v.Type<boolean>;
            desc: string[];
        };
        allowedClientHeaders: {
            deprecated?: string[];
            type: v.Optional<string[]>;
            desc: string[];
        };
    };
    /** @deprecated */
    getQueries: {
        url: {
            deprecated?: string[];
            type: v.Optional<string[]>;
            desc: string[];
        };
        apiKey: {
            deprecated?: string[];
            type: v.Optional<string>;
            desc: string[];
        };
        forwardCookies: {
            deprecated?: string[];
            type: v.Type<boolean>;
            desc: string[];
        };
        allowedClientHeaders: {
            deprecated?: string[];
            type: v.Optional<string[]>;
            desc: string[];
        };
    };
    query: {
        url: {
            deprecated?: string[];
            type: v.Optional<string[]>;
            desc: string[];
        };
        apiKey: {
            deprecated?: string[];
            type: v.Optional<string>;
            desc: string[];
        };
        forwardCookies: {
            deprecated?: string[];
            type: v.Type<boolean>;
            desc: string[];
        };
        allowedClientHeaders: {
            deprecated?: string[];
            type: v.Optional<string[]>;
            desc: string[];
        };
    };
    cvr: {
        db: {
            type: v.Optional<string>;
            desc: string[];
        };
        maxConns: {
            type: v.Type<number>;
            desc: string[];
        };
        maxConnsPerWorker: {
            type: v.Optional<number>;
            hidden: boolean;
        };
        garbageCollectionInactivityThresholdHours: {
            type: v.Type<number>;
            desc: string[];
        };
        garbageCollectionInitialIntervalSeconds: {
            type: v.Type<number>;
            desc: string[];
        };
        garbageCollectionInitialBatchSize: {
            type: v.Type<number>;
            desc: string[];
        };
    };
    queryHydrationStats: {
        type: v.Optional<boolean>;
        desc: string[];
    };
    enableQueryPlanner: {
        type: v.Type<boolean>;
        desc: string[];
    };
    yieldThresholdMs: {
        type: v.Type<number>;
        desc: string[];
    };
    change: {
        db: {
            type: v.Optional<string>;
            desc: string[];
        };
        maxConns: {
            type: v.Type<number>;
            desc: string[];
        };
    };
    replica: {
        file: {
            type: v.Type<string>;
            desc: string[];
        };
        vacuumIntervalHours: {
            type: v.Optional<number>;
            desc: string[];
        };
    };
    log: {
        level: v.Type<"info" | "error" | "debug" | "warn">;
        format: {
            type: v.Type<"text" | "json">;
            desc: string[];
        };
        slowRowThreshold: {
            type: v.Type<number>;
            desc: string[];
        };
        slowHydrateThreshold: {
            type: v.Type<number>;
            desc: string[];
        };
        ivmSampling: {
            type: v.Type<number>;
            desc: string[];
        };
    };
    app: {
        id: {
            type: v.Type<string>;
            desc: string[];
        };
        publications: {
            type: v.Type<string[]>;
            desc: string[];
        };
    };
    shard: {
        id: {
            type: v.Optional<string>;
            hidden: boolean;
        };
        num: {
            type: v.Type<number>;
            desc: string[];
            hidden: boolean;
        };
    };
    /** @deprecated */
    auth: {
        jwk: {
            type: v.Optional<string>;
            desc: string[];
            deprecated: string[];
        };
        jwksUrl: {
            type: v.Optional<string>;
            desc: string[];
            deprecated: string[];
        };
        secret: {
            type: v.Optional<string>;
            desc: string[];
            deprecated: string[];
        };
        issuer: {
            type: v.Optional<string>;
            desc: string[];
            deprecated: string[];
        };
        audience: {
            type: v.Optional<string>;
            desc: string[];
            deprecated: string[];
        };
    };
    port: {
        type: v.Type<number>;
        desc: string[];
    };
    changeStreamer: {
        uri: {
            type: v.Optional<string>;
            desc: string[];
        };
        mode: {
            type: v.Type<"dedicated" | "discover">;
            desc: string[];
        };
        port: {
            type: v.Optional<number>;
            desc: string[];
        };
        /** @deprecated */
        address: {
            type: v.Optional<string>;
            deprecated: string[];
            hidden: boolean;
        };
        /** @deprecated */
        protocol: {
            type: v.Type<"ws" | "wss">;
            deprecated: string[];
            hidden: boolean;
        };
        discoveryInterfacePreferences: {
            type: v.Type<string[] | ("eth" | "en")[]>;
            desc: string[];
            hidden: boolean;
        };
        startupDelayMs: {
            type: v.Type<number>;
            desc: string[];
        };
        backPressureLimitHeapProportion: {
            type: v.Type<number>;
            desc: string[];
        };
    };
    taskID: {
        type: v.Optional<string>;
        desc: string[];
    };
    perUserMutationLimit: {
        max: {
            type: v.Optional<number>;
            desc: string[];
        };
        windowMs: {
            type: v.Type<number>;
            desc: string[];
        };
    };
    numSyncWorkers: {
        type: v.Optional<number>;
        desc: string[];
    };
    autoReset: {
        type: v.Type<boolean>;
        desc: string[];
    };
    adminPassword: {
        type: v.Optional<string>;
        desc: string[];
    };
    websocketCompression: {
        type: v.Type<boolean>;
        desc: string[];
    };
    websocketCompressionOptions: {
        type: v.Optional<string>;
        desc: string[];
    };
    websocketMaxPayloadBytes: {
        type: v.Type<number>;
        desc: string[];
    };
    litestream: {
        executable: {
            type: v.Optional<string>;
            desc: string[];
        };
        configPath: {
            type: v.Type<string>;
            desc: string[];
        };
        logLevel: {
            type: v.Type<"info" | "error" | "debug" | "warn">;
        };
        backupURL: {
            type: v.Optional<string>;
            desc: string[];
        };
        endpoint: {
            type: v.Optional<string>;
            desc: string[];
        };
        port: {
            type: v.Optional<number>;
            desc: string[];
        };
        checkpointThresholdMB: {
            type: v.Type<number>;
            desc: string[];
        };
        minCheckpointPageCount: {
            type: v.Optional<number>;
            desc: string[];
        };
        maxCheckpointPageCount: {
            type: v.Optional<number>;
            desc: string[];
        };
        incrementalBackupIntervalMinutes: {
            type: v.Type<number>;
            desc: string[];
        };
        snapshotBackupIntervalHours: {
            type: v.Type<number>;
            desc: string[];
        };
        restoreParallelism: {
            type: v.Type<number>;
            desc: string[];
        };
        multipartConcurrency: {
            type: v.Type<number>;
            desc: string[];
        };
        multipartSize: {
            type: v.Type<number>;
            desc: string[];
        };
    };
    storageDBTmpDir: {
        type: v.Optional<string>;
        desc: string[];
    };
    initialSync: {
        tableCopyWorkers: {
            type: v.Type<number>;
            desc: string[];
        };
        profileCopy: {
            type: v.Optional<boolean>;
            hidden: boolean;
            desc: string[];
        };
    };
    /** @deprecated */
    targetClientRowCount: {
        type: v.Type<number>;
        deprecated: string[];
        hidden: boolean;
    };
    lazyStartup: {
        type: v.Type<boolean>;
        desc: string[];
    };
    serverVersion: {
        type: v.Optional<string>;
        desc: string[];
    };
    enableTelemetry: {
        type: v.Type<boolean>;
        desc: string[];
    };
    cloudEvent: {
        sinkEnv: {
            type: v.Optional<string>;
            desc: string[];
        };
        extensionOverridesEnv: {
            type: v.Optional<string>;
            desc: string[];
        };
    };
};
export type ZeroConfig = Config<typeof zeroOptions>;
export declare function getZeroConfig(opts?: Omit<ParseOptions, 'envNamePrefix'>): ZeroConfig;
/**
 * Same as {@link getZeroConfig}, with an additional check that the
 * config has already been normalized (i.e. by the top level server/runner).
 */
export declare function getNormalizedZeroConfig(opts?: Omit<ParseOptions, 'envNamePrefix'>): NormalizedZeroConfig;
/**
 * Gets the server version from the config if provided. Otherwise it gets it
 * from the Zero package.json.
 */
export declare function getServerVersion(config: Pick<ZeroConfig, 'serverVersion'> | undefined): string;
export declare function isAdminPasswordValid(lc: LogContext, config: Pick<NormalizedZeroConfig, 'adminPassword'>, password: string | undefined): boolean;
export declare function resetWarnOnceState(): void;
//# sourceMappingURL=zero-config.d.ts.map