// This file is auto-generated by @hey-api/openapi-ts
import { client } from "./client.gen.js";
class _HeyApiClient {
    _client = client;
    constructor(args) {
        if (args?.client) {
            this._client = args.client;
        }
    }
}
export class ClickhouseClient extends _HeyApiClient {
    /**
     * Get list of available organizations
     * Returns a list with a single organization associated with the API key in the request.
     */
    listAvailableOrganizations(options) {
        return (options?.client ?? this._client).get({
            url: "/v1/organizations",
            ...options,
        });
    }
    /**
     * Get organization details
     * Returns details of a single organization. In order to get the details, the auth key must belong to the organization.
     */
    getOrganizationDetails(options) {
        return (options.client ?? this._client).get({
            url: "/v1/organizations/{organizationId}",
            ...options,
        });
    }
    /**
     * Update organization details
     * Updates organization fields. Requires ADMIN auth key role.
     */
    updateOrganizationDetails(options) {
        return (options.client ?? this._client).patch({
            url: "/v1/organizations/{organizationId}",
            ...options,
            headers: {
                "Content-Type": "application/json",
                ...options.headers,
            },
        });
    }
    /**
     * Get organization metrics
     * Returns prometheus metrics for all services in an organization.
     */
    getOrganizationMetrics(options) {
        return (options.client ?? this._client).get({
            url: "/v1/organizations/{organizationId}/prometheus",
            ...options,
        });
    }
    /**
     * List of organization services
     * Returns a list of all services in the organization.
     */
    listOrganizationServices(options) {
        return (options.client ?? this._client).get({
            url: "/v1/organizations/{organizationId}/services",
            ...options,
        });
    }
    /**
     * Create new service
     * Creates a new service in the organization, and returns the current service state and a password to access the service. The service is started asynchronously.
     */
    createNewService(options) {
        return (options.client ?? this._client).post({
            url: "/v1/organizations/{organizationId}/services",
            ...options,
            headers: {
                "Content-Type": "application/json",
                ...options.headers,
            },
        });
    }
    /**
     * Delete service
     * Deletes the service. The service must be in stopped state and is deleted asynchronously after this method call.
     */
    deleteService(options) {
        return (options.client ?? this._client).delete({
            url: "/v1/organizations/{organizationId}/services/{serviceId}",
            ...options,
        });
    }
    /**
     * Get service details
     * Returns a service that belongs to the organization
     */
    getServiceDetails(options) {
        return (options.client ?? this._client).get({
            url: "/v1/organizations/{organizationId}/services/{serviceId}",
            ...options,
        });
    }
    /**
     * Update service basic details
     * Updates basic service details like service name or IP access list.
     */
    updateServiceBasicDetails(options) {
        return (options.client ?? this._client).patch({
            url: "/v1/organizations/{organizationId}/services/{serviceId}",
            ...options,
            headers: {
                "Content-Type": "application/json",
                ...options.headers,
            },
        });
    }
    /**
     * Get private endpoint configuration
     * Information required to set up a private endpoint
     */
    getPrivateEndpointConfiguration(options) {
        return (options.client ?? this._client).get({
            url: "/v1/organizations/{organizationId}/services/{serviceId}/privateEndpointConfig",
            ...options,
        });
    }
    /**
     * Delete the service query endpoint for a given instance
     * This is an experimental feature. Please contact support to enable it.
     */
    deleteServiceQueryEndpointForInstance(options) {
        return (options.client ?? this._client).delete({
            url: "/v1/organizations/{organizationId}/services/{serviceId}/serviceQueryEndpoint",
            ...options,
        });
    }
    /**
     * Get the service query endpoint for a given instance
     * This is an experimental feature. Please contact support to enable it.
     */
    getServiceQueryEndpointForInstance(options) {
        return (options.client ?? this._client).get({
            url: "/v1/organizations/{organizationId}/services/{serviceId}/serviceQueryEndpoint",
            ...options,
        });
    }
    /**
     * Upsert the service query endpoint for a given instance
     * This is an experimental feature. Please contact support to enable it.
     */
    upsertServiceQueryEndpointForInstance(options) {
        return (options.client ?? this._client).post({
            url: "/v1/organizations/{organizationId}/services/{serviceId}/serviceQueryEndpoint",
            ...options,
            headers: {
                "Content-Type": "application/json",
                ...options.headers,
            },
        });
    }
    /**
     * Update service state
     * Starts or stop service
     */
    updateServiceState(options) {
        return (options.client ?? this._client).patch({
            url: "/v1/organizations/{organizationId}/services/{serviceId}/state",
            ...options,
            headers: {
                "Content-Type": "application/json",
                ...options.headers,
            },
        });
    }
    /**
     * Update service auto scaling settings
     * Updates minimum and maximum total memory limits and idle mode scaling behavior for the service. The memory settings are available only for "production" services and must be a multiple of 12 starting from 24GB. Please contact support to enable adjustment of numReplicas.
     * @deprecated
     */
    updateServiceAutoScalingSettings(options) {
        return (options.client ?? this._client).patch({
            url: "/v1/organizations/{organizationId}/services/{serviceId}/scaling",
            ...options,
            headers: {
                "Content-Type": "application/json",
                ...options.headers,
            },
        });
    }
    /**
     * Update service auto scaling settings
     * Updates minimum and maximum memory limits per replica and idle mode scaling behavior for the service. The memory settings are available only for "production" services and must be a multiple of 4 starting from 8GB. Please contact support to enable adjustment of numReplicas.
     */
    updateServiceAutoScalingSettings2(options) {
        return (options.client ?? this._client).patch({
            url: "/v1/organizations/{organizationId}/services/{serviceId}/replicaScaling",
            ...options,
            headers: {
                "Content-Type": "application/json",
                ...options.headers,
            },
        });
    }
    /**
     * Update service password
     * Sets a new password for the service
     */
    updateServicePassword(options) {
        return (options.client ?? this._client).patch({
            url: "/v1/organizations/{organizationId}/services/{serviceId}/password",
            ...options,
            headers: {
                "Content-Type": "application/json",
                ...options.headers,
            },
        });
    }
    /**
     * Create a private endpoint
     * Create a new private endpoint. The private endpoint will be associated with this service and organization
     */
    createPrivateEndpoint(options) {
        return (options.client ?? this._client).post({
            url: "/v1/organizations/{organizationId}/services/{serviceId}/privateEndpoint",
            ...options,
            headers: {
                "Content-Type": "application/json",
                ...options.headers,
            },
        });
    }
    /**
     * Get service metrics
     * Returns prometheus metrics for a service.
     */
    getServiceMetrics(options) {
        return (options.client ?? this._client).get({
            url: "/v1/organizations/{organizationId}/services/{serviceId}/prometheus",
            ...options,
        });
    }
    /**
     * List of service backups
     * Returns a list of all backups for the service. The most recent backups comes first in the list.
     */
    listServiceBackups(options) {
        return (options.client ?? this._client).get({
            url: "/v1/organizations/{organizationId}/services/{serviceId}/backups",
            ...options,
        });
    }
    /**
     * Get backup details
     * Returns a single backup info.
     */
    getBackupDetails(options) {
        return (options.client ?? this._client).get({
            url: "/v1/organizations/{organizationId}/services/{serviceId}/backups/{backupId}",
            ...options,
        });
    }
    /**
     * Get service backup configuration
     * Returns the service backup configuration.
     */
    getServiceBackupConfiguration(options) {
        return (options.client ?? this._client).get({
            url: "/v1/organizations/{organizationId}/services/{serviceId}/backupConfiguration",
            ...options,
        });
    }
    /**
     * Update service backup configuration
     * Updates service backup configuration. Requires ADMIN auth key role. Setting the properties with null value, will reset the properties to theirs default values.
     */
    updateServiceBackupConfiguration(options) {
        return (options.client ?? this._client).patch({
            url: "/v1/organizations/{organizationId}/services/{serviceId}/backupConfiguration",
            ...options,
            headers: {
                "Content-Type": "application/json",
                ...options.headers,
            },
        });
    }
    /**
     * Get list of all keys
     * Returns a list of all keys in the organization.
     */
    listAllKeys(options) {
        return (options.client ?? this._client).get({
            url: "/v1/organizations/{organizationId}/keys",
            ...options,
        });
    }
    /**
     * Create key
     * Creates new API key.
     */
    createKey(options) {
        return (options.client ?? this._client).post({
            url: "/v1/organizations/{organizationId}/keys",
            ...options,
            headers: {
                "Content-Type": "application/json",
                ...options.headers,
            },
        });
    }
    /**
     * Delete key
     * Deletes API key. Only a key not used to authenticate the active request can be deleted.
     */
    deleteKey(options) {
        return (options.client ?? this._client).delete({
            url: "/v1/organizations/{organizationId}/keys/{keyId}",
            ...options,
        });
    }
    /**
     * Get key details
     * Returns a single key details.
     */
    getKeyDetails(options) {
        return (options.client ?? this._client).get({
            url: "/v1/organizations/{organizationId}/keys/{keyId}",
            ...options,
        });
    }
    /**
     * Update key
     * Updates API key properties.
     */
    updateKey(options) {
        return (options.client ?? this._client).patch({
            url: "/v1/organizations/{organizationId}/keys/{keyId}",
            ...options,
            headers: {
                "Content-Type": "application/json",
                ...options.headers,
            },
        });
    }
    /**
     * List organization members
     * Returns a list of all members in the organization.
     */
    listOrganizationMembers(options) {
        return (options.client ?? this._client).get({
            url: "/v1/organizations/{organizationId}/members",
            ...options,
        });
    }
    /**
     * Remove an organization member
     * Removes a user from the organization
     */
    removeOrganizationMember(options) {
        return (options.client ?? this._client).delete({
            url: "/v1/organizations/{organizationId}/members/{userId}",
            ...options,
        });
    }
    /**
     * Get member details
     * Returns a single organization member details.
     */
    getMemberDetails(options) {
        return (options.client ?? this._client).get({
            url: "/v1/organizations/{organizationId}/members/{userId}",
            ...options,
        });
    }
    /**
     * Update organization member
     * Updates organization member role.
     */
    updateOrganizationMember(options) {
        return (options.client ?? this._client).patch({
            url: "/v1/organizations/{organizationId}/members/{userId}",
            ...options,
            headers: {
                "Content-Type": "application/json",
                ...options.headers,
            },
        });
    }
    /**
     * List all invitations
     * Returns list of all organization invitations.
     */
    listAllInvitations(options) {
        return (options.client ?? this._client).get({
            url: "/v1/organizations/{organizationId}/invitations",
            ...options,
        });
    }
    /**
     * Create an invitation
     * Creates organization invitation.
     */
    createInvitation(options) {
        return (options.client ?? this._client).post({
            url: "/v1/organizations/{organizationId}/invitations",
            ...options,
            headers: {
                "Content-Type": "application/json",
                ...options.headers,
            },
        });
    }
    /**
     * Delete organization invitation
     * Deletes a single organization invitation.
     */
    deleteOrganizationInvitation(options) {
        return (options.client ?? this._client).delete({
            url: "/v1/organizations/{organizationId}/invitations/{invitationId}",
            ...options,
        });
    }
    /**
     * Get invitation details
     * Returns details for a single organization invitation.
     */
    getInvitationDetails(options) {
        return (options.client ?? this._client).get({
            url: "/v1/organizations/{organizationId}/invitations/{invitationId}",
            ...options,
        });
    }
    /**
     * List of organization activities
     * Returns a list of all organization activities.
     */
    listOrganizationActivities(options) {
        return (options.client ?? this._client).get({
            url: "/v1/organizations/{organizationId}/activities",
            ...options,
        });
    }
    /**
     * Organization activity
     * Returns a single organization activity by ID.
     */
    organizationActivity(options) {
        return (options.client ?? this._client).get({
            url: "/v1/organizations/{organizationId}/activities/{activityId}",
            ...options,
        });
    }
    /**
     * Get organization usage costs
     * Returns a grand total and a list of daily, per-entity organization usage cost records for the organization in the queried time period (maximum 31 days). All days in both the request and the response are evaluated based on the UTC timezone.
     */
    getOrganizationUsageCosts(options) {
        return (options.client ?? this._client).get({
            url: "/v1/organizations/{organizationId}/usageCost",
            ...options,
        });
    }
    /**
     * List ClickPipes
     * **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Returns a list of ClickPipes.
     */
    listClickPipes(options) {
        return (options.client ?? this._client).get({
            url: "/v1/organizations/{organizationId}/services/{serviceId}/clickpipes",
            ...options,
        });
    }
    /**
     * Create ClickPipe
     * **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Create a new ClickPipe.
     */
    createClickPipe(options) {
        return (options.client ?? this._client).post({
            url: "/v1/organizations/{organizationId}/services/{serviceId}/clickpipes",
            ...options,
            headers: {
                "Content-Type": "application/json",
                ...options.headers,
            },
        });
    }
    /**
     * Delete ClickPipe
     * **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Delete the specified ClickPipe.
     */
    deleteClickPipe(options) {
        return (options.client ?? this._client).delete({
            url: "/v1/organizations/{organizationId}/services/{serviceId}/clickpipes/{clickPipeId}",
            ...options,
        });
    }
    /**
     * Get ClickPipe
     * **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Returns the specified ClickPipe.
     */
    getClickPipe(options) {
        return (options.client ?? this._client).get({
            url: "/v1/organizations/{organizationId}/services/{serviceId}/clickpipes/{clickPipeId}",
            ...options,
        });
    }
    /**
     * Update ClickPipe
     * **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Update the specified ClickPipe.
     */
    updateClickPipe(options) {
        return (options.client ?? this._client).patch({
            url: "/v1/organizations/{organizationId}/services/{serviceId}/clickpipes/{clickPipeId}",
            ...options,
            headers: {
                "Content-Type": "application/json",
                ...options.headers,
            },
        });
    }
    /**
     * Get ClickPipe settings
     * **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Returns the advanced settings for the specified ClickPipe.
     */
    getClickPipeSettings(options) {
        return (options.client ?? this._client).get({
            url: "/v1/organizations/{organizationId}/services/{serviceId}/clickpipes/{clickPipeId}/settings",
            ...options,
        });
    }
    /**
     * Update ClickPipe settings
     * **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Update the advanced settings for the specified ClickPipe. Send key-value pairs where values can be strings, numbers, or booleans.
     */
    updateClickPipeSettings(options) {
        return (options.client ?? this._client).put({
            url: "/v1/organizations/{organizationId}/services/{serviceId}/clickpipes/{clickPipeId}/settings",
            ...options,
            headers: {
                "Content-Type": "application/json",
                ...options.headers,
            },
        });
    }
    /**
     * Scaling ClickPipe
     * **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Change scaling settings for the specified ClickPipe.
     */
    scalingClickPipe(options) {
        return (options.client ?? this._client).patch({
            url: "/v1/organizations/{organizationId}/services/{serviceId}/clickpipes/{clickPipeId}/scaling",
            ...options,
            headers: {
                "Content-Type": "application/json",
                ...options.headers,
            },
        });
    }
    /**
     * Update ClickPipe state
     * **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Start, stop or resync ClickPipe. Stopping a ClickPipe will stop the ingestion process from any state. Starting is allowed for ClickPipes in the "Stopped" state or with a "Failed" state. Resyncing is only for Postgres pipes and can be done from any state.
     */
    updateClickPipeState(options) {
        return (options.client ?? this._client).patch({
            url: "/v1/organizations/{organizationId}/services/{serviceId}/clickpipes/{clickPipeId}/state",
            ...options,
            headers: {
                "Content-Type": "application/json",
                ...options.headers,
            },
        });
    }
    /**
     * Get CDC ClickPipes scaling
     * **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Get scaling settings for DB ClickPipes.
     *
     * The infrastructure is shared between all DB ClickPipes in the service, both for initial load and CDC. For billing purposes, 2 CPU cores and 8 GB of RAM [correspond](https://clickhouse.com/docs/cloud/manage/billing/overview#clickpipes-for-postgres-cdc) to one compute unit.
     *
     * **This endpoint becomes available once at least one DB ClickPipe was provisioned.**
     */
    getCdcClickPipesScaling(options) {
        return (options.client ?? this._client).get({
            url: "/v1/organizations/{organizationId}/services/{serviceId}/clickpipesCdcScaling",
            ...options,
        });
    }
    /**
     * Update CDC ClickPipes scaling
     * **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Update scaling settings for DB ClickPipes.
     *
     * The infrastructure is shared between all DB ClickPipes in the service, both for initial load and CDC. Scaling settings may take a few minutes to fully propagate.
     *
     * For billing purposes, 2 CPU cores and 8 GB of RAM [correspond](https://clickhouse.com/docs/cloud/manage/billing/overview#clickpipes-for-postgres-cdc) to one compute unit. If your organization tier changes, DB ClickPipes will be [rescaled](https://clickhouse.com/docs/cloud/manage/billing/overview#compute) appropriately.
     *
     * **This endpoint becomes available once at least one DB ClickPipe was provisioned.**
     */
    updateCdcClickPipesScaling(options) {
        return (options.client ?? this._client).patch({
            url: "/v1/organizations/{organizationId}/services/{serviceId}/clickpipesCdcScaling",
            ...options,
            headers: {
                "Content-Type": "application/json",
                ...options.headers,
            },
        });
    }
    /**
     * Get private endpoint configuration for region within cloud provider for an organization
     * Deprecated. Please follow [documentation](https://clickhouse.com/docs/manage/security/aws-privatelink#add-endpoint-id-to-services-allow-list) for the updated process.
     * @deprecated
     */
    getPrivateEndpointConfigurationForRegionWithinCloudProviderForOrganization(options) {
        return (options.client ?? this._client).get({
            url: "/v1/organizations/{organizationId}/privateEndpointConfig",
            ...options,
        });
    }
    /**
     * Create BYOC Infrastructure
     * Create a new BYOC Infrastructure in the organization. Returns the configuration of the newly created infrastructure
     */
    createByocInfrastructure(options) {
        return (options.client ?? this._client).post({
            url: "/v1/organizations/{organizationId}/byocInfrastructure",
            ...options,
            headers: {
                "Content-Type": "application/json",
                ...options.headers,
            },
        });
    }
    /**
     * Remove a BYOC infrastructure
     * Removes a BYOC Infrastructure from the organization
     */
    removeByocInfrastructure(options) {
        return (options.client ?? this._client).delete({
            url: "/v1/organizations/{organizationId}/byocInfrastructure/{byocInfrastructureId}",
            ...options,
        });
    }
    /**
     * List reverse private endpoints
     * **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Returns a list of reverse private endpoints for the specified service.
     */
    listReversePrivateEndpoints(options) {
        return (options.client ?? this._client).get({
            url: "/v1/organizations/{organizationId}/services/{serviceId}/clickpipesReversePrivateEndpoints",
            ...options,
        });
    }
    /**
     * Create reverse private endpoint
     * **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Create a new reverse private endpoint.
     */
    createReversePrivateEndpoint(options) {
        return (options.client ?? this._client).post({
            url: "/v1/organizations/{organizationId}/services/{serviceId}/clickpipesReversePrivateEndpoints",
            ...options,
            headers: {
                "Content-Type": "application/json",
                ...options.headers,
            },
        });
    }
    /**
     * Delete reverse private endpoint
     * **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Delete the reverse private endpoint with the specified ID.
     */
    deleteReversePrivateEndpoint(options) {
        return (options.client ?? this._client).delete({
            url: "/v1/organizations/{organizationId}/services/{serviceId}/clickpipesReversePrivateEndpoints/{reversePrivateEndpointId}",
            ...options,
        });
    }
    /**
     * Get reverse private endpoint
     * **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Returns the reverse private endpoint with the specified ID.
     */
    getReversePrivateEndpoint(options) {
        return (options.client ?? this._client).get({
            url: "/v1/organizations/{organizationId}/services/{serviceId}/clickpipesReversePrivateEndpoints/{reversePrivateEndpointId}",
            ...options,
        });
    }
}
//# sourceMappingURL=sdk.gen.js.map