import { B as BackendConfig, a as BackendType, A as AthenaJsonValue, b as AthenaConditionValue, c as AthenaConditionCastType, d as AthenaConditionArrayValue, e as AthenaConditionOperator, f as AthenaGatewayCallOptions, g as AthenaGatewayErrorDetails, h as AthenaJsonObject, i as AthenaRpcCallOptions, S as SchemaDef, j as AnyModelDef, D as DatabaseDef, M as ModelMetadata, k as ModelDef, R as RegistryDef, T as TenantKeyMap, l as TenantContext, m as RowOf, n as ModelAt, I as InsertOf, U as UpdateOf, o as SchemaIntrospectionProvider, p as IntrospectionSnapshot, q as IntrospectionColumn } from './types-BnzoaNRC.js';
export { r as AthenaGatewayErrorCode, s as AthenaJsonArray, t as AthenaJsonPrimitive, u as AthenaRpcFilter, v as AthenaRpcFilterOperator, w as AthenaRpcOrder, x as AthenaRpcPayload, y as Backend, z as IntrospectionInspectOptions, C as IntrospectionRelation, E as IntrospectionSchema, F as IntrospectionTable, G as IntrospectionTypeKind, H as ModelRelationKind, J as ModelRelationMetadata, K as TenantContextValue } from './types-BnzoaNRC.js';
import { A as AthenaAuthBindings, a as AthenaAuthClientConfig, b as AthenaAuthSdkClient } from './model-form-CVOtC8jq.js';
export { c as AthenaAuthAdminUserSessionRevokeBinding, d as AthenaAuthCallOptions, e as AthenaAuthCredentials, f as AthenaAuthEmailChangeResponse, g as AthenaAuthEndpointPath, h as AthenaAuthErrorCode, i as AthenaAuthErrorDetails, j as AthenaAuthGenericInput, k as AthenaAuthGenericQueryInput, l as AthenaAuthLinkedAccount, m as AthenaAuthMethod, n as AthenaAuthOrganization, o as AthenaAuthOrganizationBindings, p as AthenaAuthOrganizationInvitation, q as AthenaAuthOrganizationMember, r as AthenaAuthQueryPrimitive, s as AthenaAuthQueryValue, t as AthenaAuthRequestInput, u as AthenaAuthResetPasswordBinding, v as AthenaAuthResult, w as AthenaAuthRevokeSessionRequest, x as AthenaAuthSession, y as AthenaAuthSessionResponse, z as AthenaAuthSessionRevokeBinding, B as AthenaAuthSignInResponse, C as AthenaAuthSignOutResponse, D as AthenaAuthSocialRedirectResponse, E as AthenaAuthStatusResponse, F as AthenaAuthUser, G as AthenaChangeEmailRequest, H as AthenaChangePasswordRequest, I as AthenaDeleteUserCallbackRequest, J as AthenaDeleteUserRequest, K as AthenaDeleteUserResponse, L as AthenaEmailSignInRequest, M as AthenaEmailSignUpRequest, N as AthenaForgetPasswordRequest, O as AthenaGatewayError, P as AthenaLinkSocialRequest, Q as AthenaOAuthAccountTokenRequest, R as AthenaOAuthTokenBundle, S as AthenaResetPasswordRequest, T as AthenaSendVerificationEmailRequest, U as AthenaSocialSignInRequest, V as AthenaUnlinkAccountRequest, W as AthenaUpdateUserRequest, X as AthenaUsernameSignInRequest, Y as AthenaVerifyEmailRequest, Z as ModelFormAdapter, _ as ModelFormDefaults, $ as ModelFormNullishMode, a0 as ModelFormValues, a1 as ToModelFormDefaultsOptions, a2 as ToModelPayloadOptions, a3 as createModelFormAdapter, a4 as isAthenaGatewayError, a5 as toModelFormDefaults, a6 as toModelPayload } from './model-form-CVOtC8jq.js';
import { A as AthenaGeneratorConfig, L as LoadGeneratorConfigOptions, a as LoadedGeneratorConfig, N as NormalizedAthenaGeneratorConfig, G as GeneratedArtifacts, b as GeneratorProviderConfig, c as GeneratorExperimentalFlags, d as GeneratorSchemaSelection } from './pipeline-CQgV-Yfo.js';
export { e as GeneratedArtifact, f as GeneratorArtifactKind, g as GeneratorFeatureFlags, h as GeneratorNamingConfig, i as GeneratorOutputConfig, j as GeneratorOutputTargets, k as NamingStyle, R as RunGeneratorOptions, l as RunGeneratorResult, r as runSchemaGenerator } from './pipeline-CQgV-Yfo.js';

interface AthenaResult<T> {
    data: T | null;
    error: string | null;
    errorDetails?: AthenaGatewayErrorDetails | null;
    status: number;
    count?: number | null;
    raw: unknown;
}
type MutationSingleResult<Result> = Result extends Array<infer Item> ? Item | null : Result | null;
type AthenaRowShape = Record<string, AthenaJsonValue | undefined>;
type FilterColumnKey<Row> = Extract<keyof NonNullable<Row>, string>;
type ResolvedFilterColumnKey<Row> = [FilterColumnKey<Row>] extends [never] ? string : FilterColumnKey<Row>;
interface MutationQuery<Result> extends PromiseLike<AthenaResult<Result>> {
    select(columns?: string | string[], options?: AthenaGatewayCallOptions): Promise<AthenaResult<Result>>;
    returning(columns?: string | string[], options?: AthenaGatewayCallOptions): Promise<AthenaResult<Result>>;
    single(columns?: string | string[], options?: AthenaGatewayCallOptions): Promise<AthenaResult<MutationSingleResult<Result>>>;
    maybeSingle(columns?: string | string[], options?: AthenaGatewayCallOptions): Promise<AthenaResult<MutationSingleResult<Result>>>;
    then<TResult1 = AthenaResult<Result>, TResult2 = never>(onfulfilled?: ((value: AthenaResult<Result>) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | undefined | null): Promise<TResult1 | TResult2>;
    catch<TResult = never>(onrejected?: ((reason: unknown) => TResult | PromiseLike<TResult>) | undefined | null): Promise<AthenaResult<Result> | TResult>;
    finally(onfinally?: (() => void) | undefined | null): Promise<AthenaResult<Result>>;
}
interface OrderOptions {
    ascending?: boolean;
}
/** Shared filter chain - supports eq, limit, etc. in any order relative to select/update */
interface FilterChain<Self, Row> {
    eq(column: ResolvedFilterColumnKey<Row>, value: AthenaConditionValue): Self;
    eqCast(column: ResolvedFilterColumnKey<Row>, value: AthenaConditionValue, cast: AthenaConditionCastType): Self;
    eqUuid(column: ResolvedFilterColumnKey<Row>, value: string): Self;
    match(filters: Partial<Record<ResolvedFilterColumnKey<Row>, AthenaConditionValue>>): Self;
    range(from: number, to: number): Self;
    limit(count: number): Self;
    offset(count: number): Self;
    currentPage(value: number): Self;
    pageSize(value: number): Self;
    totalPages(value: number): Self;
    order(column: ResolvedFilterColumnKey<Row>, options?: OrderOptions): Self;
    gt(column: ResolvedFilterColumnKey<Row>, value: AthenaConditionValue): Self;
    gte(column: ResolvedFilterColumnKey<Row>, value: AthenaConditionValue): Self;
    lt(column: ResolvedFilterColumnKey<Row>, value: AthenaConditionValue): Self;
    lte(column: ResolvedFilterColumnKey<Row>, value: AthenaConditionValue): Self;
    neq(column: ResolvedFilterColumnKey<Row>, value: AthenaConditionValue): Self;
    like(column: ResolvedFilterColumnKey<Row>, value: AthenaConditionValue): Self;
    ilike(column: ResolvedFilterColumnKey<Row>, value: AthenaConditionValue): Self;
    is(column: ResolvedFilterColumnKey<Row>, value: AthenaConditionValue): Self;
    in(column: ResolvedFilterColumnKey<Row>, values: AthenaConditionArrayValue): Self;
    contains(column: ResolvedFilterColumnKey<Row>, values: AthenaConditionArrayValue): Self;
    containedBy(column: ResolvedFilterColumnKey<Row>, values: AthenaConditionArrayValue): Self;
    not(columnOrExpression: ResolvedFilterColumnKey<Row> | string, operator?: AthenaConditionOperator, value?: AthenaConditionValue): Self;
    or(expression: string): Self;
}
/** Chain returned by select() - supports filters and single/maybeSingle before execution */
interface SelectChain<Row, SelectedRow = Row> extends FilterChain<SelectChain<Row, SelectedRow>, Row>, PromiseLike<AthenaResult<SelectedRow[]>> {
    single<T = SelectedRow>(columns?: string | string[], options?: AthenaGatewayCallOptions): Promise<AthenaResult<T | null>>;
    maybeSingle<T = SelectedRow>(columns?: string | string[], options?: AthenaGatewayCallOptions): Promise<AthenaResult<T | null>>;
}
/** Chain returned by update() - supports filters before execution, plus select/returning */
interface UpdateChain<Row> extends FilterChain<UpdateChain<Row>, Row>, MutationQuery<Row[]> {
}
interface RpcFilterChain<Self> {
    eq(column: string, value: AthenaConditionValue): Self;
    neq(column: string, value: AthenaConditionValue): Self;
    gt(column: string, value: AthenaConditionValue): Self;
    gte(column: string, value: AthenaConditionValue): Self;
    lt(column: string, value: AthenaConditionValue): Self;
    lte(column: string, value: AthenaConditionValue): Self;
    like(column: string, value: AthenaConditionValue): Self;
    ilike(column: string, value: AthenaConditionValue): Self;
    is(column: string, value: AthenaConditionValue): Self;
    in(column: string, values: AthenaConditionArrayValue): Self;
}
interface RpcOrderOptions {
    ascending?: boolean;
}
interface RpcQueryBuilder<Row> extends RpcFilterChain<RpcQueryBuilder<Row>>, PromiseLike<AthenaResult<Row[]>> {
    select(columns?: string | string[], options?: AthenaRpcCallOptions): Promise<AthenaResult<Row[]>>;
    single<T = Row>(columns?: string | string[], options?: AthenaRpcCallOptions): Promise<AthenaResult<T | null>>;
    maybeSingle<T = Row>(columns?: string | string[], options?: AthenaRpcCallOptions): Promise<AthenaResult<T | null>>;
    order(column: string, options?: RpcOrderOptions): RpcQueryBuilder<Row>;
    limit(count: number): RpcQueryBuilder<Row>;
    offset(count: number): RpcQueryBuilder<Row>;
    range(from: number, to: number): RpcQueryBuilder<Row>;
}
interface TableQueryBuilder<Row, Insert = Partial<Row>, Update = Partial<Insert>> extends FilterChain<TableQueryBuilder<Row, Insert, Update>, Row> {
    select<T = Row>(columns?: string | string[], options?: AthenaGatewayCallOptions): SelectChain<Row, T>;
    insert(values: Insert, options?: AthenaGatewayCallOptions): MutationQuery<Row>;
    insert(values: Insert[], options?: AthenaGatewayCallOptions): MutationQuery<Row[]>;
    upsert(values: Insert, options?: AthenaGatewayCallOptions & {
        updateBody?: Update;
        onConflict?: string | string[];
    }): MutationQuery<Row>;
    upsert(values: Insert[], options?: AthenaGatewayCallOptions & {
        updateBody?: Update;
        onConflict?: string | string[];
    }): MutationQuery<Row[]>;
    update(values: Update, options?: AthenaGatewayCallOptions): UpdateChain<Row>;
    delete(options?: AthenaGatewayCallOptions & {
        resourceId?: string;
    }): MutationQuery<Row | null>;
    single<T = Row>(columns?: string | string[], options?: AthenaGatewayCallOptions): Promise<AthenaResult<T | null>>;
    maybeSingle<T = Row>(columns?: string | string[], options?: AthenaGatewayCallOptions): Promise<AthenaResult<T | null>>;
    reset(): TableQueryBuilder<Row, Insert, Update>;
}
interface AthenaSdkClient {
    from<Row = AthenaRowShape, Insert = Partial<Row>, Update = Partial<Insert>>(table: string): TableQueryBuilder<Row, Insert, Update>;
    rpc<Row = unknown, Args extends AthenaJsonObject = AthenaJsonObject>(fn: string, args?: Args, options?: AthenaRpcCallOptions): RpcQueryBuilder<Row>;
    query<Row = unknown>(query: string, options?: AthenaGatewayCallOptions): Promise<AthenaResult<Row[]>>;
}
interface AthenaSdkClientWithAuth extends AthenaSdkClient {
    auth: AthenaAuthBindings;
}
interface AthenaClientBuilder {
    /** Set the gateway base URL. */
    url(url: string): AthenaClientBuilder;
    /** Set the API key used for all requests. */
    key(apiKey: string): AthenaClientBuilder;
    /** Set the default backend routing strategy. */
    backend(backend: BackendConfig | BackendType): AthenaClientBuilder;
    /** Set the default Athena client routing key. */
    client(clientName: string): AthenaClientBuilder;
    /** Attach static headers to every request. */
    headers(headers: Record<string, string>): AthenaClientBuilder;
    /** Enable or disable health tracking metadata. */
    healthTracking(enabled: boolean): AthenaClientBuilder;
    /** Build the immutable Athena SDK client. */
    build(): AthenaSdkClientWithAuth;
}
/** Canonical Athena client factory with builder-based configuration. */
declare class AthenaClient {
    /** Create a fluent builder for a strongly-typed Athena SDK client. */
    static builder(): AthenaClientBuilder;
    /** Build a client from process environment variables. */
    static fromEnvironment(): AthenaSdkClientWithAuth;
}
interface AthenaCreateClientOptions extends Pick<AthenaGatewayCallOptions, 'client' | 'headers' | 'backend'> {
    auth?: AthenaAuthClientConfig;
}
/** Create client (convenience wrapper; use AthenaClient.builder() for full control) */
declare function createClient(url: string, apiKey: string, options?: AthenaCreateClientOptions): AthenaSdkClientWithAuth;

type AthenaErrorKind = 'unique_violation' | 'not_found' | 'validation' | 'auth' | 'rate_limit' | 'transient' | 'unknown';
declare const AthenaErrorKind: {
    readonly UniqueViolation: "unique_violation";
    readonly NotFound: "not_found";
    readonly Validation: "validation";
    readonly Auth: "auth";
    readonly RateLimit: "rate_limit";
    readonly Transient: "transient";
    readonly Unknown: "unknown";
};
type AthenaErrorCode = 'UNIQUE_VIOLATION' | 'NOT_FOUND' | 'VALIDATION_FAILED' | 'AUTH_UNAUTHORIZED' | 'AUTH_FORBIDDEN' | 'RATE_LIMITED' | 'NETWORK_UNAVAILABLE' | 'TRANSIENT_FAILURE' | 'HTTP_FAILURE' | 'UNKNOWN';
declare const AthenaErrorCode: {
    readonly UniqueViolation: "UNIQUE_VIOLATION";
    readonly NotFound: "NOT_FOUND";
    readonly ValidationFailed: "VALIDATION_FAILED";
    readonly AuthUnauthorized: "AUTH_UNAUTHORIZED";
    readonly AuthForbidden: "AUTH_FORBIDDEN";
    readonly RateLimited: "RATE_LIMITED";
    readonly NetworkUnavailable: "NETWORK_UNAVAILABLE";
    readonly TransientFailure: "TRANSIENT_FAILURE";
    readonly HttpFailure: "HTTP_FAILURE";
    readonly Unknown: "UNKNOWN";
};
type AthenaErrorCategory = 'transport' | 'client' | 'server' | 'database' | 'unknown';
declare const AthenaErrorCategory: {
    readonly Transport: "transport";
    readonly Client: "client";
    readonly Server: "server";
    readonly Database: "database";
    readonly Unknown: "unknown";
};
interface AthenaOperationContext {
    table?: string;
    operation?: string;
    identity?: string | Record<string, unknown>;
}
interface NormalizedAthenaError {
    kind: AthenaErrorKind;
    code: AthenaErrorCode;
    category: AthenaErrorCategory;
    retryable: boolean;
    status?: number;
    constraint?: string;
    table?: string;
    operation?: string;
    message: string;
    raw: unknown;
}
interface AthenaErrorInput {
    code: AthenaErrorCode;
    kind: AthenaErrorKind;
    category: AthenaErrorCategory;
    message: string;
    status?: number;
    retryable?: boolean;
    requestId?: string;
    context?: AthenaOperationContext;
    raw?: unknown;
}
interface UnwrapOptions {
    allowNull?: boolean;
    context?: AthenaOperationContext;
}
interface UnwrapOneOptions extends UnwrapOptions {
    requireExactlyOne?: boolean;
}
interface IntCoercionOptions {
    strictBigInt?: boolean;
    min?: number;
    max?: number;
}
type RetryBackoffStrategy = 'linear' | 'exponential' | ((attempt: number, error: unknown) => number);
interface RetryConfig {
    retries: number;
    baseDelayMs?: number;
    maxDelayMs?: number;
    backoff?: RetryBackoffStrategy;
    jitter?: boolean | number;
    shouldRetry?: (error: unknown, attempt: number) => boolean | Promise<boolean>;
}
interface RequireAffectedOptions {
    min?: number;
}
/**
 * Parses a string-based boolean flag with a deterministic fallback.
 *
 * Accepts common truthy/falsey token variants used by env vars and CLI flags.
 */
declare function parseBooleanFlag(rawValue: string | undefined, fallback: boolean): boolean;
declare class AthenaError extends Error {
    readonly code: AthenaErrorCode;
    readonly kind: AthenaErrorKind;
    readonly category: AthenaErrorCategory;
    readonly status?: number;
    readonly retryable: boolean;
    readonly requestId?: string;
    readonly context?: AthenaOperationContext;
    readonly raw?: unknown;
    constructor(input: AthenaErrorInput);
}
/**
 * Returns `true` when a result is successful (`2xx` status and no `error`).
 */
declare function isOk<T>(result: AthenaResult<T>): boolean;
/**
 * Normalizes any Athena failure shape into a stable, typed error envelope.
 *
 * Accepts `AthenaResult`, `AthenaGatewayError`, native `Error`, or unknown values.
 * Optional `context` can override inferred table/operation metadata for clearer diagnostics.
 */
declare function normalizeAthenaError(resultOrError: unknown, context?: AthenaOperationContext): NormalizedAthenaError;
/**
 * Unwraps a successful result into a row array.
 *
 * - Throws on failed results.
 * - Converts `null` data to an empty array.
 * - Wraps scalar data in a single-element array.
 */
declare function unwrapRows<T>(result: AthenaResult<T[] | T | null>, options?: UnwrapOptions): T[];
/**
 * Unwraps successful result data from `AthenaResult<T | null>`.
 *
 * By default, `null` data throws. Pass `{ allowNull: true }` to permit nullable payloads.
 */
declare function unwrap<T>(result: AthenaResult<T | null>, options: UnwrapOptions & {
    allowNull: true;
}): T | null;
declare function unwrap<T>(result: AthenaResult<T | null>, options?: UnwrapOptions): T;
/**
 * Unwraps the first row from a successful result that may contain arrays/scalars/null.
 *
 * - Throws on failed results.
 * - Throws when no row exists unless `allowNull: true` is provided.
 * - Optionally enforces exact cardinality via `requireExactlyOne`.
 */
declare function unwrapOne<T>(result: AthenaResult<T[] | T | null>, options: UnwrapOneOptions & {
    allowNull: true;
}): T | null;
declare function unwrapOne<T>(result: AthenaResult<T[] | T | null>, options?: UnwrapOneOptions): T;
/**
 * Asserts that an Athena result is successful.
 *
 * Returns the original result for fluent composition and throws `AthenaGatewayError` on failure.
 */
declare function requireSuccess<T>(result: AthenaResult<T>, context?: AthenaOperationContext): AthenaResult<T>;
/**
 * Enforces mutation postconditions based on `result.count`.
 *
 * - Validates success first.
 * - Requires a non-null count in the response.
 * - Validates `count >= min` (default: `1`).
 *
 * Useful for guaranteeing that critical writes actually affected rows.
 */
declare function requireAffected<T>(result: AthenaResult<T>, options?: RequireAffectedOptions, context?: AthenaOperationContext): number;
/**
 * Safely coerces `unknown` values into finite integers.
 *
 * Returns `null` when coercion fails or bounds/strict bigint checks are violated.
 */
declare function coerceInt(value: unknown, options?: IntCoercionOptions): number | null;
/**
 * Strict integer assertion wrapper around `coerceInt`.
 *
 * Throws a `TypeError` with the provided label when coercion fails.
 */
declare function assertInt(value: unknown, label?: string, options?: IntCoercionOptions): number;
/**
 * Retries an async operation with configurable backoff and retry policy.
 *
 * `retries` represents additional attempts after the first failure.
 * By default, transient and rate-limit errors are retried.
 */
declare function withRetry<T>(config: RetryConfig, fn: () => Promise<T>): Promise<T>;

/**
 * Immutable identifier object with consistent SQL rendering.
 */
interface SqlIdentifier {
    readonly segments: string[];
    toSql(): string;
    toString(): string;
}
/**
 * Creates a quoted identifier object from segment or dotted inputs.
 */
declare function identifier(...segments: string[]): SqlIdentifier;

/**
 * Declares a model contract with explicit metadata and typed row/insert/update shapes.
 */
declare function defineModel<Row, Insert = Partial<Row>, Update = Partial<Insert>, Meta extends ModelMetadata<Row> = ModelMetadata<Row>>(input: {
    meta: Meta;
}): ModelDef<Row, Insert, Update, Meta>;
/**
 * Declares a schema-level model map.
 */
declare function defineSchema<Models extends Record<string, AnyModelDef>>(models: Models): SchemaDef<Models>;
/**
 * Declares a database-level schema map.
 */
declare function defineDatabase<Schemas extends Record<string, SchemaDef<Record<string, AnyModelDef>>>>(schemas: Schemas): DatabaseDef<Schemas>;
/**
 * Declares a top-level multi-database registry.
 */
declare function defineRegistry<Databases extends Record<string, DatabaseDef<Record<string, SchemaDef<Record<string, AnyModelDef>>>>>>(databases: Databases): RegistryDef<Databases>;

type RegistryConstraint = RegistryDef<Record<string, DatabaseDef<Record<string, SchemaDef<Record<string, AnyModelDef>>>>>>;
/**
 * Options for creating typed Athena clients.
 */
interface TypedClientOptions<TMap extends TenantKeyMap = TenantKeyMap> extends Pick<AthenaGatewayCallOptions, 'backend' | 'client' | 'headers'> {
    tenantKeyMap?: TMap;
    tenantContext?: TenantContext<TMap>;
}
/**
 * Typed Athena client with registry-driven model resolution and tenant-context propagation.
 */
interface TypedAthenaClient<TRegistry extends RegistryConstraint, TTenantMap extends TenantKeyMap = Record<never, string>> extends AthenaSdkClient {
    readonly registry: TRegistry;
    readonly tenantKeyMap: Readonly<TTenantMap>;
    readonly tenantContext: TenantContext<TTenantMap>;
    withTenantContext(context: TenantContext<TTenantMap>): TypedAthenaClient<TRegistry, TTenantMap>;
    fromModel<TDatabase extends keyof TRegistry & string, TSchema extends keyof TRegistry[TDatabase]['schemas'] & string, TModel extends keyof TRegistry[TDatabase]['schemas'][TSchema]['models'] & string>(database: TDatabase, schema: TSchema, model: TModel): TableQueryBuilder<RowOf<ModelAt<TRegistry, TDatabase, TSchema, TModel>>, InsertOf<ModelAt<TRegistry, TDatabase, TSchema, TModel>>, UpdateOf<ModelAt<TRegistry, TDatabase, TSchema, TModel>>>;
}
/**
 * Creates a typed client bound to a registry contract and optional tenant header mapping.
 */
declare function createTypedClient<TRegistry extends RegistryConstraint, TTenantMap extends TenantKeyMap = Record<never, string>>(registry: TRegistry, url: string, apiKey: string, options?: TypedClientOptions<TTenantMap>): TypedAthenaClient<TRegistry, TTenantMap>;

/**
 * Constructor options for the PostgreSQL introspection provider.
 */
interface PostgresIntrospectionProviderOptions {
    connectionString: string;
    database?: string;
    schemas?: readonly string[];
}
/**
 * Creates a PostgreSQL-backed schema introspection provider.
 */
declare function createPostgresIntrospectionProvider(options: PostgresIntrospectionProviderOptions): SchemaIntrospectionProvider;

declare function normalizeGeneratorConfig(input: AthenaGeneratorConfig): NormalizedAthenaGeneratorConfig;
/**
 * Typed identity helper for authoring generator configs.
 */
declare function defineGeneratorConfig<TConfig extends AthenaGeneratorConfig>(config: TConfig): TConfig;
/**
 * Finds a supported generator config filename in the provided directory.
 */
declare function findGeneratorConfigPath(cwd?: string): string | undefined;
/**
 * Loads and normalizes `athena.config.*` from disk.
 */
declare function loadGeneratorConfig(options?: LoadGeneratorConfigOptions): Promise<LoadedGeneratorConfig>;

/**
 * Generates model/schema/database/registry source artifacts from an introspection snapshot.
 */
declare function generateArtifactsFromSnapshot(snapshot: IntrospectionSnapshot, config: AthenaGeneratorConfig | NormalizedAthenaGeneratorConfig): GeneratedArtifacts;

declare function resolvePostgresColumnType(column: IntrospectionColumn): string;

/**
 * Resolves a runtime introspection provider from generator config.
 */
declare function resolveGeneratorProvider(providerConfig: GeneratorProviderConfig, experimentalFlags: GeneratorExperimentalFlags): SchemaIntrospectionProvider;

declare const DEFAULT_POSTGRES_SCHEMAS: readonly ["public"];
/**
 * Normalizes schema selection from config or env-backed strings into a stable,
 * deduplicated list. Empty selections fall back to PostgreSQL's public schema.
 */
declare function normalizeSchemaSelection(input: GeneratorSchemaSelection | undefined): string[];
/**
 * Resolves the effective schema list for provider-backed generator runs.
 */
declare function resolveProviderSchemas(providerConfig: GeneratorProviderConfig): string[];

/**
 * @deprecated Prefer `createClient(...).auth` from `@xylex-group/athena`.
 */
declare function createAuthClient(config?: AthenaAuthClientConfig): AthenaAuthSdkClient;

export { AthenaAuthBindings, AthenaAuthClientConfig, AthenaAuthSdkClient, AthenaClient, AthenaConditionCastType, type AthenaCreateClientOptions, AthenaError, AthenaErrorCategory, AthenaErrorCode, type AthenaErrorInput, AthenaErrorKind, AthenaGatewayCallOptions, AthenaGatewayErrorDetails, AthenaGeneratorConfig, AthenaJsonObject, AthenaJsonValue, type AthenaOperationContext, type AthenaResult, AthenaRpcCallOptions, type AthenaSdkClient, type AthenaSdkClientWithAuth, BackendConfig, BackendType, DEFAULT_POSTGRES_SCHEMAS, DatabaseDef, GeneratedArtifacts, GeneratorExperimentalFlags, GeneratorProviderConfig, GeneratorSchemaSelection, InsertOf, type IntCoercionOptions, IntrospectionColumn, IntrospectionSnapshot, LoadGeneratorConfigOptions, LoadedGeneratorConfig, ModelAt, ModelDef, ModelMetadata, type NormalizedAthenaError, NormalizedAthenaGeneratorConfig, type PostgresIntrospectionProviderOptions, RegistryDef, type RequireAffectedOptions, type RetryBackoffStrategy, type RetryConfig, RowOf, type RpcOrderOptions, type RpcQueryBuilder, SchemaDef, SchemaIntrospectionProvider, type TableQueryBuilder, TenantContext, TenantKeyMap, type TypedAthenaClient, type TypedClientOptions, type UnwrapOneOptions, type UnwrapOptions, UpdateOf, assertInt, coerceInt, createAuthClient, createClient, createPostgresIntrospectionProvider, createTypedClient, defineDatabase, defineGeneratorConfig, defineModel, defineRegistry, defineSchema, findGeneratorConfigPath, generateArtifactsFromSnapshot, identifier, isOk, loadGeneratorConfig, normalizeAthenaError, normalizeGeneratorConfig, normalizeSchemaSelection, parseBooleanFlag, requireAffected, requireSuccess, resolveGeneratorProvider, resolvePostgresColumnType, resolveProviderSchemas, unwrap, unwrapOne, unwrapRows, withRetry };
