/**
 * Cloudflare HYPERDRIVE API
 *
 * Generated from Cloudflare TypeScript SDK.
 * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service hyperdrive
 */
import * as Schema from "effect/Schema";
import type * as HttpClient from "effect/unstable/http/HttpClient";
import * as API from "../client/api.ts";
import type { Credentials } from "../credentials.ts";
import { type DefaultErrors } from "../errors.ts";
declare const HyperdriveConfigNotFound_base: Schema.Class<HyperdriveConfigNotFound, Schema.TaggedStruct<"HyperdriveConfigNotFound", {
    readonly code: Schema.Number;
    readonly message: Schema.String;
}>, import("effect/Cause").YieldableError>;
export declare class HyperdriveConfigNotFound extends HyperdriveConfigNotFound_base {
}
declare const InvalidHyperdriveConfig_base: Schema.Class<InvalidHyperdriveConfig, Schema.TaggedStruct<"InvalidHyperdriveConfig", {
    readonly code: Schema.Number;
    readonly message: Schema.String;
}>, import("effect/Cause").YieldableError>;
export declare class InvalidHyperdriveConfig extends InvalidHyperdriveConfig_base {
}
declare const InvalidObjectIdentifier_base: Schema.Class<InvalidObjectIdentifier, Schema.TaggedStruct<"InvalidObjectIdentifier", {
    readonly code: Schema.Number;
    readonly message: Schema.String;
}>, import("effect/Cause").YieldableError>;
export declare class InvalidObjectIdentifier extends InvalidObjectIdentifier_base {
}
declare const MethodNotAllowed_base: Schema.Class<MethodNotAllowed, Schema.TaggedStruct<"MethodNotAllowed", {
    readonly code: Schema.Number;
    readonly message: Schema.String;
}>, import("effect/Cause").YieldableError>;
export declare class MethodNotAllowed extends MethodNotAllowed_base {
}
declare const PrivateHostNotAllowed_base: Schema.Class<PrivateHostNotAllowed, Schema.TaggedStruct<"PrivateHostNotAllowed", {
    readonly code: Schema.Number;
    readonly message: Schema.String;
}>, import("effect/Cause").YieldableError>;
export declare class PrivateHostNotAllowed extends PrivateHostNotAllowed_base {
}
export interface GetConfigRequest {
    hyperdriveId: string;
    /** Define configurations using a unique string identifier. */
    accountId: string;
}
export declare const GetConfigRequest: Schema.Schema<GetConfigRequest>;
export interface GetConfigResponse {
    /** Define configurations using a unique string identifier. */
    id: string;
    /** The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API. */
    name: string;
    origin: {
        database: string;
        host: string;
        port: number;
        scheme: "postgres" | "postgresql" | "mysql";
        user: string;
    } | {
        accessClientId: string;
        database: string;
        host: string;
        scheme: "postgres" | "postgresql" | "mysql";
        user: string;
    };
    caching?: {
        disabled?: boolean | null;
    } | {
        disabled?: boolean | null;
        maxAge?: number | null;
        staleWhileRevalidate?: number | null;
    } | null;
    /** Defines the creation time of the Hyperdrive configuration. */
    createdOn?: string | null;
    /** Defines the last modified time of the Hyperdrive configuration. */
    modifiedOn?: string | null;
    mtls?: {
        caCertificateId?: string | null;
        mtlsCertificateId?: string | null;
        sslmode?: string | null;
    } | null;
    /** The (soft) maximum number of connections the Hyperdrive is allowed to make to the origin database. */
    originConnectionLimit?: number | null;
}
export declare const GetConfigResponse: Schema.Schema<GetConfigResponse>;
export type GetConfigError = DefaultErrors | PrivateHostNotAllowed | HyperdriveConfigNotFound | InvalidObjectIdentifier;
export declare const getConfig: API.OperationMethod<GetConfigRequest, GetConfigResponse, GetConfigError, Credentials | HttpClient.HttpClient>;
export interface ListConfigsRequest {
    /** Define configurations using a unique string identifier. */
    accountId: string;
}
export declare const ListConfigsRequest: Schema.Schema<ListConfigsRequest>;
export interface ListConfigsResponse {
    result: {
        id: string;
        name: string;
        origin: {
            database: string;
            host: string;
            port: number;
            scheme: "postgres" | "postgresql" | "mysql";
            user: string;
        } | {
            accessClientId: string;
            database: string;
            host: string;
            scheme: "postgres" | "postgresql" | "mysql";
            user: string;
        };
        caching?: {
            disabled?: boolean | null;
        } | {
            disabled?: boolean | null;
            maxAge?: number | null;
            staleWhileRevalidate?: number | null;
        } | null;
        createdOn?: string | null;
        modifiedOn?: string | null;
        mtls?: {
            caCertificateId?: string | null;
            mtlsCertificateId?: string | null;
            sslmode?: string | null;
        } | null;
        originConnectionLimit?: number | null;
    }[];
}
export declare const ListConfigsResponse: Schema.Schema<ListConfigsResponse>;
export type ListConfigsError = DefaultErrors | PrivateHostNotAllowed | InvalidObjectIdentifier;
export declare const listConfigs: API.PaginatedOperationMethod<ListConfigsRequest, ListConfigsResponse, ListConfigsError, Credentials | HttpClient.HttpClient>;
export interface CreateConfigRequest {
    /** Path param: Define configurations using a unique string identifier. */
    accountId: string;
    /** Body param: The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API. */
    name: string;
    /** Body param: */
    origin: {
        database: string;
        host: string;
        password: string;
        port: number;
        scheme: "postgres" | "postgresql" | "mysql";
        user: string;
    } | {
        accessClientId: string;
        accessClientSecret: string;
        database: string;
        host: string;
        password: string;
        scheme: "postgres" | "postgresql" | "mysql";
        user: string;
    };
    /** Body param: */
    caching?: {
        disabled?: boolean;
    } | {
        disabled?: boolean;
        maxAge?: number;
        staleWhileRevalidate?: number;
    };
    /** Body param: */
    mtls?: {
        caCertificateId?: string;
        mtlsCertificateId?: string;
        sslmode?: string;
    };
    /** Body param: The (soft) maximum number of connections the Hyperdrive is allowed to make to the origin database. */
    originConnectionLimit?: number;
}
export declare const CreateConfigRequest: Schema.Schema<CreateConfigRequest>;
export interface CreateConfigResponse {
    /** Define configurations using a unique string identifier. */
    id: string;
    /** The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API. */
    name: string;
    origin: {
        database: string;
        host: string;
        port: number;
        scheme: "postgres" | "postgresql" | "mysql";
        user: string;
    } | {
        accessClientId: string;
        database: string;
        host: string;
        scheme: "postgres" | "postgresql" | "mysql";
        user: string;
    };
    caching?: {
        disabled?: boolean | null;
    } | {
        disabled?: boolean | null;
        maxAge?: number | null;
        staleWhileRevalidate?: number | null;
    } | null;
    /** Defines the creation time of the Hyperdrive configuration. */
    createdOn?: string | null;
    /** Defines the last modified time of the Hyperdrive configuration. */
    modifiedOn?: string | null;
    mtls?: {
        caCertificateId?: string | null;
        mtlsCertificateId?: string | null;
        sslmode?: string | null;
    } | null;
    /** The (soft) maximum number of connections the Hyperdrive is allowed to make to the origin database. */
    originConnectionLimit?: number | null;
}
export declare const CreateConfigResponse: Schema.Schema<CreateConfigResponse>;
export type CreateConfigError = DefaultErrors | PrivateHostNotAllowed | InvalidHyperdriveConfig | InvalidObjectIdentifier;
export declare const createConfig: API.OperationMethod<CreateConfigRequest, CreateConfigResponse, CreateConfigError, Credentials | HttpClient.HttpClient>;
export interface UpdateConfigRequest {
    hyperdriveId: string;
    /** Path param: Define configurations using a unique string identifier. */
    accountId: string;
    /** Body param: The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API. */
    name: string;
    /** Body param: */
    origin: {
        database: string;
        host: string;
        password: string;
        port: number;
        scheme: "postgres" | "postgresql" | "mysql";
        user: string;
    } | {
        accessClientId: string;
        accessClientSecret: string;
        database: string;
        host: string;
        password: string;
        scheme: "postgres" | "postgresql" | "mysql";
        user: string;
    };
    /** Body param: */
    caching?: {
        disabled?: boolean;
    } | {
        disabled?: boolean;
        maxAge?: number;
        staleWhileRevalidate?: number;
    };
    /** Body param: */
    mtls?: {
        caCertificateId?: string;
        mtlsCertificateId?: string;
        sslmode?: string;
    };
    /** Body param: The (soft) maximum number of connections the Hyperdrive is allowed to make to the origin database. */
    originConnectionLimit?: number;
}
export declare const UpdateConfigRequest: Schema.Schema<UpdateConfigRequest>;
export interface UpdateConfigResponse {
    /** Define configurations using a unique string identifier. */
    id: string;
    /** The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API. */
    name: string;
    origin: {
        database: string;
        host: string;
        port: number;
        scheme: "postgres" | "postgresql" | "mysql";
        user: string;
    } | {
        accessClientId: string;
        database: string;
        host: string;
        scheme: "postgres" | "postgresql" | "mysql";
        user: string;
    };
    caching?: {
        disabled?: boolean | null;
    } | {
        disabled?: boolean | null;
        maxAge?: number | null;
        staleWhileRevalidate?: number | null;
    } | null;
    /** Defines the creation time of the Hyperdrive configuration. */
    createdOn?: string | null;
    /** Defines the last modified time of the Hyperdrive configuration. */
    modifiedOn?: string | null;
    mtls?: {
        caCertificateId?: string | null;
        mtlsCertificateId?: string | null;
        sslmode?: string | null;
    } | null;
    /** The (soft) maximum number of connections the Hyperdrive is allowed to make to the origin database. */
    originConnectionLimit?: number | null;
}
export declare const UpdateConfigResponse: Schema.Schema<UpdateConfigResponse>;
export type UpdateConfigError = DefaultErrors | PrivateHostNotAllowed | HyperdriveConfigNotFound | InvalidObjectIdentifier | MethodNotAllowed;
export declare const updateConfig: API.OperationMethod<UpdateConfigRequest, UpdateConfigResponse, UpdateConfigError, Credentials | HttpClient.HttpClient>;
export interface PatchConfigRequest {
    hyperdriveId: string;
    /** Path param: Define configurations using a unique string identifier. */
    accountId: string;
    /** Body param: */
    caching?: {
        disabled?: boolean;
    } | {
        disabled?: boolean;
        maxAge?: number;
        staleWhileRevalidate?: number;
    };
    /** Body param: */
    mtls?: {
        caCertificateId?: string;
        mtlsCertificateId?: string;
        sslmode?: string;
    };
    /** Body param: The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API. */
    name?: string;
    /** Body param: */
    origin?: {
        database?: string;
        password?: string;
        scheme?: "postgres" | "postgresql" | "mysql";
        user?: string;
    } | {
        host: string;
        port: number;
    } | {
        accessClientId: string;
        accessClientSecret: string;
        host: string;
    };
    /** Body param: The (soft) maximum number of connections the Hyperdrive is allowed to make to the origin database. */
    originConnectionLimit?: number;
}
export declare const PatchConfigRequest: Schema.Schema<PatchConfigRequest>;
export interface PatchConfigResponse {
    /** Define configurations using a unique string identifier. */
    id: string;
    /** The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API. */
    name: string;
    origin: {
        database: string;
        host: string;
        port: number;
        scheme: "postgres" | "postgresql" | "mysql";
        user: string;
    } | {
        accessClientId: string;
        database: string;
        host: string;
        scheme: "postgres" | "postgresql" | "mysql";
        user: string;
    };
    caching?: {
        disabled?: boolean | null;
    } | {
        disabled?: boolean | null;
        maxAge?: number | null;
        staleWhileRevalidate?: number | null;
    } | null;
    /** Defines the creation time of the Hyperdrive configuration. */
    createdOn?: string | null;
    /** Defines the last modified time of the Hyperdrive configuration. */
    modifiedOn?: string | null;
    mtls?: {
        caCertificateId?: string | null;
        mtlsCertificateId?: string | null;
        sslmode?: string | null;
    } | null;
    /** The (soft) maximum number of connections the Hyperdrive is allowed to make to the origin database. */
    originConnectionLimit?: number | null;
}
export declare const PatchConfigResponse: Schema.Schema<PatchConfigResponse>;
export type PatchConfigError = DefaultErrors | PrivateHostNotAllowed | HyperdriveConfigNotFound | InvalidObjectIdentifier | MethodNotAllowed;
export declare const patchConfig: API.OperationMethod<PatchConfigRequest, PatchConfigResponse, PatchConfigError, Credentials | HttpClient.HttpClient>;
export interface DeleteConfigRequest {
    hyperdriveId: string;
    /** Define configurations using a unique string identifier. */
    accountId: string;
}
export declare const DeleteConfigRequest: Schema.Schema<DeleteConfigRequest>;
export type DeleteConfigResponse = unknown;
export declare const DeleteConfigResponse: Schema.Schema<DeleteConfigResponse>;
export type DeleteConfigError = DefaultErrors | PrivateHostNotAllowed | HyperdriveConfigNotFound | InvalidObjectIdentifier | MethodNotAllowed;
export declare const deleteConfig: API.OperationMethod<DeleteConfigRequest, DeleteConfigResponse, DeleteConfigError, Credentials | HttpClient.HttpClient>;
export {};
//# sourceMappingURL=hyperdrive.d.ts.map