/**
 * Cloudflare KV API
 *
 * Generated from Cloudflare TypeScript SDK.
 * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service kv
 */
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 InvalidExpirationTtl_base: Schema.Class<InvalidExpirationTtl, Schema.TaggedStruct<"InvalidExpirationTtl", {
    readonly code: Schema.Number;
    readonly message: Schema.String;
}>, import("effect/Cause").YieldableError>;
export declare class InvalidExpirationTtl extends InvalidExpirationTtl_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 InvalidRequestBody_base: Schema.Class<InvalidRequestBody, Schema.TaggedStruct<"InvalidRequestBody", {
    readonly code: Schema.Number;
    readonly message: Schema.String;
}>, import("effect/Cause").YieldableError>;
export declare class InvalidRequestBody extends InvalidRequestBody_base {
}
declare const KeyNotFound_base: Schema.Class<KeyNotFound, Schema.TaggedStruct<"KeyNotFound", {
    readonly code: Schema.Number;
    readonly message: Schema.String;
}>, import("effect/Cause").YieldableError>;
export declare class KeyNotFound extends KeyNotFound_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 MinimumKeysRequired_base: Schema.Class<MinimumKeysRequired, Schema.TaggedStruct<"MinimumKeysRequired", {
    readonly code: Schema.Number;
    readonly message: Schema.String;
}>, import("effect/Cause").YieldableError>;
export declare class MinimumKeysRequired extends MinimumKeysRequired_base {
}
declare const NamespaceNotFound_base: Schema.Class<NamespaceNotFound, Schema.TaggedStruct<"NamespaceNotFound", {
    readonly code: Schema.Number;
    readonly message: Schema.String;
}>, import("effect/Cause").YieldableError>;
export declare class NamespaceNotFound extends NamespaceNotFound_base {
}
declare const NamespaceTitleAlreadyExists_base: Schema.Class<NamespaceTitleAlreadyExists, Schema.TaggedStruct<"NamespaceTitleAlreadyExists", {
    readonly code: Schema.Number;
    readonly message: Schema.String;
}>, import("effect/Cause").YieldableError>;
export declare class NamespaceTitleAlreadyExists extends NamespaceTitleAlreadyExists_base {
}
declare const TitleRequired_base: Schema.Class<TitleRequired, Schema.TaggedStruct<"TitleRequired", {
    readonly code: Schema.Number;
    readonly message: Schema.String;
}>, import("effect/Cause").YieldableError>;
export declare class TitleRequired extends TitleRequired_base {
}
export interface GetNamespaceRequest {
    namespaceId: string;
    /** Identifier. */
    accountId: string;
}
export declare const GetNamespaceRequest: Schema.Schema<GetNamespaceRequest>;
export interface GetNamespaceResponse {
    /** Namespace identifier tag. */
    id: string;
    /** A human-readable string name for a Namespace. */
    title: string;
    /** True if keys written on the URL will be URL-decoded before storing. For example, if set to "true", a key written on the URL as "%3F" will be stored as "?". */
    supportsUrlEncoding?: boolean | null;
}
export declare const GetNamespaceResponse: Schema.Schema<GetNamespaceResponse>;
export type GetNamespaceError = DefaultErrors | NamespaceNotFound | InvalidObjectIdentifier;
export declare const getNamespace: API.OperationMethod<GetNamespaceRequest, GetNamespaceResponse, GetNamespaceError, Credentials | HttpClient.HttpClient>;
export interface ListNamespacesRequest {
    /** Path param: Identifier. */
    accountId: string;
    page?: number;
    perPage?: number;
    /** Query param: Direction to order namespaces. */
    direction?: "asc" | "desc";
    /** Query param: Field to order results by. */
    order?: "id" | "title";
}
export declare const ListNamespacesRequest: Schema.Schema<ListNamespacesRequest>;
export interface ListNamespacesResponse {
    result: {
        id: string;
        title: string;
        supportsUrlEncoding?: boolean | null;
    }[];
    resultInfo?: {
        count?: number | null;
        page?: number | null;
        perPage?: number | null;
        totalCount?: number | null;
    } | null;
}
export declare const ListNamespacesResponse: Schema.Schema<ListNamespacesResponse>;
export type ListNamespacesError = DefaultErrors;
export declare const listNamespaces: API.PaginatedOperationMethod<ListNamespacesRequest, ListNamespacesResponse, ListNamespacesError, Credentials | HttpClient.HttpClient>;
export interface CreateNamespaceRequest {
    /** Path param: Identifier. */
    accountId: string;
    /** Body param: A human-readable string name for a Namespace. */
    title: string;
}
export declare const CreateNamespaceRequest: Schema.Schema<CreateNamespaceRequest>;
export interface CreateNamespaceResponse {
    /** Namespace identifier tag. */
    id: string;
    /** A human-readable string name for a Namespace. */
    title: string;
    /** True if keys written on the URL will be URL-decoded before storing. For example, if set to "true", a key written on the URL as "%3F" will be stored as "?". */
    supportsUrlEncoding?: boolean | null;
}
export declare const CreateNamespaceResponse: Schema.Schema<CreateNamespaceResponse>;
export type CreateNamespaceError = DefaultErrors | TitleRequired | InvalidObjectIdentifier | NamespaceTitleAlreadyExists;
export declare const createNamespace: API.OperationMethod<CreateNamespaceRequest, CreateNamespaceResponse, CreateNamespaceError, Credentials | HttpClient.HttpClient>;
export interface UpdateNamespaceRequest {
    namespaceId: string;
    /** Path param: Identifier. */
    accountId: string;
    /** Body param: A human-readable string name for a Namespace. */
    title: string;
}
export declare const UpdateNamespaceRequest: Schema.Schema<UpdateNamespaceRequest>;
export interface UpdateNamespaceResponse {
    /** Namespace identifier tag. */
    id: string;
    /** A human-readable string name for a Namespace. */
    title: string;
    /** True if keys written on the URL will be URL-decoded before storing. For example, if set to "true", a key written on the URL as "%3F" will be stored as "?". */
    supportsUrlEncoding?: boolean | null;
}
export declare const UpdateNamespaceResponse: Schema.Schema<UpdateNamespaceResponse>;
export type UpdateNamespaceError = DefaultErrors | NamespaceNotFound | TitleRequired | InvalidObjectIdentifier | NamespaceTitleAlreadyExists;
export declare const updateNamespace: API.OperationMethod<UpdateNamespaceRequest, UpdateNamespaceResponse, UpdateNamespaceError, Credentials | HttpClient.HttpClient>;
export interface DeleteNamespaceRequest {
    namespaceId: string;
    /** Identifier. */
    accountId: string;
}
export declare const DeleteNamespaceRequest: Schema.Schema<DeleteNamespaceRequest>;
export interface DeleteNamespaceResponse {
}
export declare const DeleteNamespaceResponse: Schema.Schema<DeleteNamespaceResponse>;
export type DeleteNamespaceError = DefaultErrors | MethodNotAllowed | NamespaceNotFound | InvalidObjectIdentifier;
export declare const deleteNamespace: API.OperationMethod<DeleteNamespaceRequest, DeleteNamespaceResponse, DeleteNamespaceError, Credentials | HttpClient.HttpClient>;
export interface BulkGetNamespacesRequest {
    namespaceId: string;
    /** Path param: Identifier. */
    accountId: string;
    /** Body param: Array of keys to retrieve (maximum of 100). */
    keys: string[];
    /** Body param: Whether to parse JSON values in the response. */
    type?: "text" | "json";
    /** Body param: Whether to include metadata in the response. */
    withMetadata?: boolean;
}
export declare const BulkGetNamespacesRequest: Schema.Schema<BulkGetNamespacesRequest>;
export type BulkGetNamespacesResponse = {
    values?: Record<string, unknown> | null;
};
export declare const BulkGetNamespacesResponse: Schema.Schema<BulkGetNamespacesResponse>;
export type BulkGetNamespacesError = DefaultErrors | InvalidRequestBody | MinimumKeysRequired | NamespaceNotFound | InvalidObjectIdentifier;
export declare const bulkGetNamespaces: API.OperationMethod<BulkGetNamespacesRequest, BulkGetNamespacesResponse, BulkGetNamespacesError, Credentials | HttpClient.HttpClient>;
export interface BulkDeleteNamespacesRequest {
    namespaceId: string;
    /** Path param: Identifier. */
    accountId: string;
    /** Body param: */
    body: string[];
}
export declare const BulkDeleteNamespacesRequest: Schema.Schema<BulkDeleteNamespacesRequest>;
export interface BulkDeleteNamespacesResponse {
    /** Number of keys successfully updated. */
    successfulKeyCount?: number | null;
    /** Name of the keys that failed to be fully updated. They should be retried. */
    unsuccessfulKeys?: string[] | null;
}
export declare const BulkDeleteNamespacesResponse: Schema.Schema<BulkDeleteNamespacesResponse>;
export type BulkDeleteNamespacesError = DefaultErrors | NamespaceNotFound | InvalidRequestBody | InvalidObjectIdentifier;
export declare const bulkDeleteNamespaces: API.OperationMethod<BulkDeleteNamespacesRequest, BulkDeleteNamespacesResponse, BulkDeleteNamespacesError, Credentials | HttpClient.HttpClient>;
export interface ListNamespaceKeysRequest {
    namespaceId: string;
    /** Path param: Identifier. */
    accountId: string;
    cursor?: string;
    /** Query param: Limits the number of keys returned in the response. The cursor attribute may be used to iterate over the next batch of keys if there are more than the limit. */
    limit?: number;
    /** Query param: Filters returned keys by a name prefix. Exact matches and any key names that begin with the prefix will be returned. */
    prefix?: string;
}
export declare const ListNamespaceKeysRequest: Schema.Schema<ListNamespaceKeysRequest>;
export interface ListNamespaceKeysResponse {
    result: {
        name: string;
        expiration?: number | null;
        metadata?: unknown | null;
    }[];
    resultInfo?: {
        cursors?: {
            after?: string | null;
        } | null;
    } | null;
}
export declare const ListNamespaceKeysResponse: Schema.Schema<ListNamespaceKeysResponse>;
export type ListNamespaceKeysError = DefaultErrors;
export declare const listNamespaceKeys: API.PaginatedOperationMethod<ListNamespaceKeysRequest, ListNamespaceKeysResponse, ListNamespaceKeysError, Credentials | HttpClient.HttpClient>;
export interface BulkGetNamespaceKeysRequest {
    namespaceId: string;
    /** Path param: Identifier. */
    accountId: string;
    /** Body param: Array of keys to retrieve (maximum of 100). */
    keys: string[];
    /** Body param: Whether to parse JSON values in the response. */
    type?: "text" | "json";
    /** Body param: Whether to include metadata in the response. */
    withMetadata?: boolean;
}
export declare const BulkGetNamespaceKeysRequest: Schema.Schema<BulkGetNamespaceKeysRequest>;
export type BulkGetNamespaceKeysResponse = {
    values?: Record<string, unknown> | null;
};
export declare const BulkGetNamespaceKeysResponse: Schema.Schema<BulkGetNamespaceKeysResponse>;
export type BulkGetNamespaceKeysError = DefaultErrors | InvalidRequestBody | NamespaceNotFound | InvalidObjectIdentifier;
export declare const bulkGetNamespaceKeys: API.OperationMethod<BulkGetNamespaceKeysRequest, BulkGetNamespaceKeysResponse, BulkGetNamespaceKeysError, Credentials | HttpClient.HttpClient>;
export interface BulkDeleteNamespaceKeysRequest {
    namespaceId: string;
    /** Path param: Identifier. */
    accountId: string;
    /** Body param: */
    body: string[];
}
export declare const BulkDeleteNamespaceKeysRequest: Schema.Schema<BulkDeleteNamespaceKeysRequest>;
export interface BulkDeleteNamespaceKeysResponse {
    /** Number of keys successfully updated. */
    successfulKeyCount?: number | null;
    /** Name of the keys that failed to be fully updated. They should be retried. */
    unsuccessfulKeys?: string[] | null;
}
export declare const BulkDeleteNamespaceKeysResponse: Schema.Schema<BulkDeleteNamespaceKeysResponse>;
export type BulkDeleteNamespaceKeysError = DefaultErrors | NamespaceNotFound | InvalidRequestBody | InvalidObjectIdentifier;
export declare const bulkDeleteNamespaceKeys: API.OperationMethod<BulkDeleteNamespaceKeysRequest, BulkDeleteNamespaceKeysResponse, BulkDeleteNamespaceKeysError, Credentials | HttpClient.HttpClient>;
export interface GetNamespaceMetadataRequest {
    namespaceId: string;
    keyName: string;
    /** Identifier. */
    accountId: string;
}
export declare const GetNamespaceMetadataRequest: Schema.Schema<GetNamespaceMetadataRequest>;
export type GetNamespaceMetadataResponse = unknown;
export declare const GetNamespaceMetadataResponse: Schema.Schema<GetNamespaceMetadataResponse>;
export type GetNamespaceMetadataError = DefaultErrors | KeyNotFound | NamespaceNotFound | InvalidObjectIdentifier;
export declare const getNamespaceMetadata: API.OperationMethod<GetNamespaceMetadataRequest, GetNamespaceMetadataResponse, GetNamespaceMetadataError, Credentials | HttpClient.HttpClient>;
export interface GetNamespaceValueRequest {
    namespaceId: string;
    keyName: string;
    /** Identifier. */
    accountId: string;
}
export declare const GetNamespaceValueRequest: Schema.Schema<GetNamespaceValueRequest>;
export type GetNamespaceValueResponse = unknown;
export declare const GetNamespaceValueResponse: Schema.Schema<GetNamespaceValueResponse>;
export type GetNamespaceValueError = DefaultErrors | KeyNotFound | NamespaceNotFound | InvalidObjectIdentifier;
export declare const getNamespaceValue: API.OperationMethod<GetNamespaceValueRequest, GetNamespaceValueResponse, GetNamespaceValueError, Credentials | HttpClient.HttpClient>;
export interface PutNamespaceValueRequest {
    namespaceId: string;
    keyName: string;
    /** Path param: Identifier. */
    accountId: string;
    /** Query param: Expires the key at a certain time, measured in number of seconds since the UNIX epoch. */
    expiration?: number;
    /** Query param: Expires the key after a number of seconds. Must be at least 60. */
    expirationTtl?: number;
    /** Body param: A byte sequence to be stored, up to 25 MiB in length. */
    value: string;
    /** Body param: Associates arbitrary JSON data with a key/value pair. */
    metadata?: unknown;
}
export declare const PutNamespaceValueRequest: Schema.Schema<PutNamespaceValueRequest>;
export interface PutNamespaceValueResponse {
}
export declare const PutNamespaceValueResponse: Schema.Schema<PutNamespaceValueResponse>;
export type PutNamespaceValueError = DefaultErrors | NamespaceNotFound | InvalidObjectIdentifier | InvalidExpirationTtl;
export declare const putNamespaceValue: API.OperationMethod<PutNamespaceValueRequest, PutNamespaceValueResponse, PutNamespaceValueError, Credentials | HttpClient.HttpClient>;
export interface DeleteNamespaceValueRequest {
    namespaceId: string;
    keyName: string;
    /** Identifier. */
    accountId: string;
}
export declare const DeleteNamespaceValueRequest: Schema.Schema<DeleteNamespaceValueRequest>;
export interface DeleteNamespaceValueResponse {
}
export declare const DeleteNamespaceValueResponse: Schema.Schema<DeleteNamespaceValueResponse>;
export type DeleteNamespaceValueError = DefaultErrors | NamespaceNotFound | InvalidObjectIdentifier;
export declare const deleteNamespaceValue: API.OperationMethod<DeleteNamespaceValueRequest, DeleteNamespaceValueResponse, DeleteNamespaceValueError, Credentials | HttpClient.HttpClient>;
export interface BulkPutNamespacesRequest {
    namespaceId: string;
    /** Path param: Identifier. */
    accountId: string;
    /** Body param: */
    body: {
        key: string;
        value: string;
        base64?: boolean;
        expiration?: number;
        expirationTtl?: number;
        metadata?: unknown;
    }[];
}
export declare const BulkPutNamespacesRequest: Schema.Schema<BulkPutNamespacesRequest>;
export interface BulkPutNamespacesResponse {
    /** Number of keys successfully updated. */
    successfulKeyCount?: number | null;
    /** Name of the keys that failed to be fully updated. They should be retried. */
    unsuccessfulKeys?: string[] | null;
}
export declare const BulkPutNamespacesResponse: Schema.Schema<BulkPutNamespacesResponse>;
export type BulkPutNamespacesError = DefaultErrors | InvalidRequestBody | NamespaceNotFound | InvalidObjectIdentifier;
export declare const bulkPutNamespaces: API.OperationMethod<BulkPutNamespacesRequest, BulkPutNamespacesResponse, BulkPutNamespacesError, Credentials | HttpClient.HttpClient>;
export interface BulkPutNamespaceKeysRequest {
    namespaceId: string;
    /** Path param: Identifier. */
    accountId: string;
    /** Body param: */
    body: {
        key: string;
        value: string;
        base64?: boolean;
        expiration?: number;
        expirationTtl?: number;
        metadata?: unknown;
    }[];
}
export declare const BulkPutNamespaceKeysRequest: Schema.Schema<BulkPutNamespaceKeysRequest>;
export interface BulkPutNamespaceKeysResponse {
    /** Number of keys successfully updated. */
    successfulKeyCount?: number | null;
    /** Name of the keys that failed to be fully updated. They should be retried. */
    unsuccessfulKeys?: string[] | null;
}
export declare const BulkPutNamespaceKeysResponse: Schema.Schema<BulkPutNamespaceKeysResponse>;
export type BulkPutNamespaceKeysError = DefaultErrors | InvalidRequestBody | NamespaceNotFound | InvalidObjectIdentifier;
export declare const bulkPutNamespaceKeys: API.OperationMethod<BulkPutNamespaceKeysRequest, BulkPutNamespaceKeysResponse, BulkPutNamespaceKeysError, Credentials | HttpClient.HttpClient>;
export {};
//# sourceMappingURL=kv.d.ts.map