/**
 * Cloudflare QUEUES API
 *
 * Generated from Cloudflare TypeScript SDK.
 * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service queues
 */
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 ConsumerAlreadyExists_base: Schema.Class<ConsumerAlreadyExists, Schema.TaggedStruct<"ConsumerAlreadyExists", {
    readonly code: Schema.Number;
    readonly message: Schema.String;
}>, import("effect/Cause").YieldableError>;
export declare class ConsumerAlreadyExists extends ConsumerAlreadyExists_base {
}
declare const ConsumerNotFound_base: Schema.Class<ConsumerNotFound, Schema.TaggedStruct<"ConsumerNotFound", {
    readonly code: Schema.Number;
    readonly message: Schema.String;
}>, import("effect/Cause").YieldableError>;
export declare class ConsumerNotFound extends ConsumerNotFound_base {
}
declare const InvalidMessageBody_base: Schema.Class<InvalidMessageBody, Schema.TaggedStruct<"InvalidMessageBody", {
    readonly code: Schema.Number;
    readonly message: Schema.String;
}>, import("effect/Cause").YieldableError>;
export declare class InvalidMessageBody extends InvalidMessageBody_base {
}
declare const InvalidQueueId_base: Schema.Class<InvalidQueueId, Schema.TaggedStruct<"InvalidQueueId", {
    readonly code: Schema.Number;
    readonly message: Schema.String;
}>, import("effect/Cause").YieldableError>;
export declare class InvalidQueueId extends InvalidQueueId_base {
}
declare const InvalidQueueName_base: Schema.Class<InvalidQueueName, Schema.TaggedStruct<"InvalidQueueName", {
    readonly code: Schema.Number;
    readonly message: Schema.String;
}>, import("effect/Cause").YieldableError>;
export declare class InvalidQueueName extends InvalidQueueName_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 InvalidRoute_base: Schema.Class<InvalidRoute, Schema.TaggedStruct<"InvalidRoute", {
    readonly code: Schema.Number;
    readonly message: Schema.String;
}>, import("effect/Cause").YieldableError>;
export declare class InvalidRoute extends InvalidRoute_base {
}
declare const QueueAlreadyExists_base: Schema.Class<QueueAlreadyExists, Schema.TaggedStruct<"QueueAlreadyExists", {
    readonly code: Schema.Number;
    readonly message: Schema.String;
}>, import("effect/Cause").YieldableError>;
export declare class QueueAlreadyExists extends QueueAlreadyExists_base {
}
declare const QueueHandlerMissing_base: Schema.Class<QueueHandlerMissing, Schema.TaggedStruct<"QueueHandlerMissing", {
    readonly code: Schema.Number;
    readonly message: Schema.String;
}>, import("effect/Cause").YieldableError>;
export declare class QueueHandlerMissing extends QueueHandlerMissing_base {
}
declare const QueueNotFound_base: Schema.Class<QueueNotFound, Schema.TaggedStruct<"QueueNotFound", {
    readonly code: Schema.Number;
    readonly message: Schema.String;
}>, import("effect/Cause").YieldableError>;
export declare class QueueNotFound extends QueueNotFound_base {
}
declare const UnrecognizedEventType_base: Schema.Class<UnrecognizedEventType, Schema.TaggedStruct<"UnrecognizedEventType", {
    readonly code: Schema.Number;
    readonly message: Schema.String;
}>, import("effect/Cause").YieldableError>;
export declare class UnrecognizedEventType extends UnrecognizedEventType_base {
}
declare const WorkerNotFound_base: Schema.Class<WorkerNotFound, Schema.TaggedStruct<"WorkerNotFound", {
    readonly code: Schema.Number;
    readonly message: Schema.String;
}>, import("effect/Cause").YieldableError>;
export declare class WorkerNotFound extends WorkerNotFound_base {
}
export interface GetConsumerRequest {
    queueId: string;
    consumerId: string;
    /** A Resource identifier. */
    accountId: string;
}
export declare const GetConsumerRequest: Schema.Schema<GetConsumerRequest>;
export type GetConsumerResponse = {
    consumerId?: string | null;
    createdOn?: string | null;
    queueId?: string | null;
    script?: string | null;
    settings?: {
        batchSize?: number | null;
        maxConcurrency?: number | null;
        maxRetries?: number | null;
        maxWaitTimeMs?: number | null;
        retryDelay?: number | null;
    } | null;
    type?: "worker" | null;
} | {
    consumerId?: string | null;
    createdOn?: string | null;
    queueId?: string | null;
    settings?: {
        batchSize?: number | null;
        maxRetries?: number | null;
        retryDelay?: number | null;
        visibilityTimeoutMs?: number | null;
    } | null;
    type?: "http_pull" | null;
};
export declare const GetConsumerResponse: Schema.Schema<GetConsumerResponse>;
export type GetConsumerError = DefaultErrors | InvalidRequestBody | QueueNotFound | ConsumerNotFound | InvalidRoute;
export declare const getConsumer: API.OperationMethod<GetConsumerRequest, GetConsumerResponse, GetConsumerError, Credentials | HttpClient.HttpClient>;
export interface ListConsumersRequest {
    queueId: string;
    /** A Resource identifier. */
    accountId: string;
}
export declare const ListConsumersRequest: Schema.Schema<ListConsumersRequest>;
export interface ListConsumersResponse {
    result: ({
        consumerId?: string | null;
        createdOn?: string | null;
        queueId?: string | null;
        script?: string | null;
        settings?: {
            batchSize?: number | null;
            maxConcurrency?: number | null;
            maxRetries?: number | null;
            maxWaitTimeMs?: number | null;
            retryDelay?: number | null;
        } | null;
        type?: "worker" | null;
    } | {
        consumerId?: string | null;
        createdOn?: string | null;
        queueId?: string | null;
        settings?: {
            batchSize?: number | null;
            maxRetries?: number | null;
            retryDelay?: number | null;
            visibilityTimeoutMs?: number | null;
        } | null;
        type?: "http_pull" | null;
    })[];
}
export declare const ListConsumersResponse: Schema.Schema<ListConsumersResponse>;
export type ListConsumersError = DefaultErrors | InvalidRequestBody | QueueNotFound | InvalidRoute;
export declare const listConsumers: API.PaginatedOperationMethod<ListConsumersRequest, ListConsumersResponse, ListConsumersError, Credentials | HttpClient.HttpClient>;
export interface CreateConsumerRequest {
    queueId: string;
    /** Path param: A Resource identifier. */
    accountId: string;
    /** Body param: */
    deadLetterQueue?: string;
    /** Body param: Name of a Worker */
    scriptName?: string;
    /** Body param: */
    settings?: {
        batchSize?: number;
        maxConcurrency?: number;
        maxRetries?: number;
        maxWaitTimeMs?: number;
        retryDelay?: number;
    };
    /** Body param: */
    type: "worker" | "http_pull";
}
export declare const CreateConsumerRequest: Schema.Schema<CreateConsumerRequest>;
export type CreateConsumerResponse = {
    consumerId?: string | null;
    createdOn?: string | null;
    queueId?: string | null;
    script?: string | null;
    settings?: {
        batchSize?: number | null;
        maxConcurrency?: number | null;
        maxRetries?: number | null;
        maxWaitTimeMs?: number | null;
        retryDelay?: number | null;
    } | null;
    type?: "worker" | null;
} | {
    consumerId?: string | null;
    createdOn?: string | null;
    queueId?: string | null;
    settings?: {
        batchSize?: number | null;
        maxRetries?: number | null;
        retryDelay?: number | null;
        visibilityTimeoutMs?: number | null;
    } | null;
    type?: "http_pull" | null;
};
export declare const CreateConsumerResponse: Schema.Schema<CreateConsumerResponse>;
export type CreateConsumerError = DefaultErrors | InvalidRequestBody | QueueNotFound | QueueHandlerMissing | ConsumerAlreadyExists | WorkerNotFound | InvalidRoute;
export declare const createConsumer: API.OperationMethod<CreateConsumerRequest, CreateConsumerResponse, CreateConsumerError, Credentials | HttpClient.HttpClient>;
export interface UpdateConsumerRequest {
    queueId: string;
    consumerId: string;
    /** Path param: A Resource identifier. */
    accountId: string;
    /** Body param: */
    deadLetterQueue?: string;
    /** Body param: Name of a Worker */
    scriptName?: string;
    /** Body param: */
    settings?: {
        batchSize?: number;
        maxConcurrency?: number;
        maxRetries?: number;
        maxWaitTimeMs?: number;
        retryDelay?: number;
    };
    /** Body param: */
    type?: "worker";
}
export declare const UpdateConsumerRequest: Schema.Schema<UpdateConsumerRequest>;
export type UpdateConsumerResponse = {
    consumerId?: string | null;
    createdOn?: string | null;
    queueId?: string | null;
    script?: string | null;
    settings?: {
        batchSize?: number | null;
        maxConcurrency?: number | null;
        maxRetries?: number | null;
        maxWaitTimeMs?: number | null;
        retryDelay?: number | null;
    } | null;
    type?: "worker" | null;
} | {
    consumerId?: string | null;
    createdOn?: string | null;
    queueId?: string | null;
    settings?: {
        batchSize?: number | null;
        maxRetries?: number | null;
        retryDelay?: number | null;
        visibilityTimeoutMs?: number | null;
    } | null;
    type?: "http_pull" | null;
};
export declare const UpdateConsumerResponse: Schema.Schema<UpdateConsumerResponse>;
export type UpdateConsumerError = DefaultErrors | InvalidRequestBody | QueueNotFound | QueueHandlerMissing | ConsumerNotFound | WorkerNotFound | InvalidRoute;
export declare const updateConsumer: API.OperationMethod<UpdateConsumerRequest, UpdateConsumerResponse, UpdateConsumerError, Credentials | HttpClient.HttpClient>;
export interface DeleteConsumerRequest {
    queueId: string;
    consumerId: string;
    /** A Resource identifier. */
    accountId: string;
}
export declare const DeleteConsumerRequest: Schema.Schema<DeleteConsumerRequest>;
export interface DeleteConsumerResponse {
    errors?: {
        code: number;
        message: string;
        documentationUrl?: string | null;
        source?: {
            pointer?: string | null;
        } | null;
    }[] | null;
    messages?: string[] | null;
    /** Indicates if the API call was successful or not. */
    success?: true | null;
}
export declare const DeleteConsumerResponse: Schema.Schema<DeleteConsumerResponse>;
export type DeleteConsumerError = DefaultErrors | InvalidRequestBody | QueueNotFound | ConsumerNotFound | InvalidRoute;
export declare const deleteConsumer: API.OperationMethod<DeleteConsumerRequest, DeleteConsumerResponse, DeleteConsumerError, Credentials | HttpClient.HttpClient>;
export interface BulkPushMessagesRequest {
    queueId: string;
    /** Path param: A Resource identifier. */
    accountId: string;
    /** Body param: The number of seconds to wait for attempting to deliver this batch to consumers */
    delaySeconds?: number;
    /** Body param: */
    messages?: ({
        body?: string;
        contentType?: "text";
        delaySeconds?: number;
    } | {
        body?: unknown;
        contentType?: "json";
        delaySeconds?: number;
    })[];
}
export declare const BulkPushMessagesRequest: Schema.Schema<BulkPushMessagesRequest>;
export interface BulkPushMessagesResponse {
    errors?: {
        code: number;
        message: string;
        documentationUrl?: string | null;
        source?: {
            pointer?: string | null;
        } | null;
    }[] | null;
    messages?: string[] | null;
    /** Indicates if the API call was successful or not. */
    success?: true | null;
}
export declare const BulkPushMessagesResponse: Schema.Schema<BulkPushMessagesResponse>;
export type BulkPushMessagesError = DefaultErrors | InvalidMessageBody | InvalidQueueId | InvalidRoute;
export declare const bulkPushMessages: API.OperationMethod<BulkPushMessagesRequest, BulkPushMessagesResponse, BulkPushMessagesError, Credentials | HttpClient.HttpClient>;
export interface PullMessageRequest {
    queueId: string;
    /** Path param: A Resource identifier. */
    accountId: string;
    /** Body param: The maximum number of messages to include in a batch. */
    batchSize?: number;
    /** Body param: The number of milliseconds that a message is exclusively leased. After the timeout, the message becomes available for another attempt. */
    visibilityTimeoutMs?: number;
}
export declare const PullMessageRequest: Schema.Schema<PullMessageRequest>;
export interface PullMessageResponse {
    /** The number of unacknowledged messages in the queue */
    messageBacklogCount?: number | null;
    messages?: {
        id?: string | null;
        attempts?: number | null;
        body?: string | null;
        leaseId?: string | null;
        metadata?: unknown | null;
        timestampMs?: number | null;
    }[] | null;
}
export declare const PullMessageResponse: Schema.Schema<PullMessageResponse>;
export type PullMessageError = DefaultErrors | InvalidRequestBody | InvalidQueueId | QueueNotFound | InvalidRoute;
export declare const pullMessage: API.OperationMethod<PullMessageRequest, PullMessageResponse, PullMessageError, Credentials | HttpClient.HttpClient>;
export interface PushMessageRequest {
    queueId: string;
    /** Path param: A Resource identifier. */
    accountId: string;
    /** Body param: */
    body?: string;
    /** Body param: */
    contentType?: "text";
    /** Body param: The number of seconds to wait for attempting to deliver this message to consumers */
    delaySeconds?: number;
}
export declare const PushMessageRequest: Schema.Schema<PushMessageRequest>;
export interface PushMessageResponse {
    errors?: {
        code: number;
        message: string;
        documentationUrl?: string | null;
        source?: {
            pointer?: string | null;
        } | null;
    }[] | null;
    messages?: string[] | null;
    /** Indicates if the API call was successful or not. */
    success?: true | null;
}
export declare const PushMessageResponse: Schema.Schema<PushMessageResponse>;
export type PushMessageError = DefaultErrors | InvalidMessageBody | InvalidQueueId | InvalidRoute;
export declare const pushMessage: API.OperationMethod<PushMessageRequest, PushMessageResponse, PushMessageError, Credentials | HttpClient.HttpClient>;
export interface AckMessageRequest {
    queueId: string;
    /** Path param: A Resource identifier. */
    accountId: string;
    /** Body param: */
    acks?: {
        leaseId?: string;
    }[];
    /** Body param: */
    retries?: {
        delaySeconds?: number;
        leaseId?: string;
    }[];
}
export declare const AckMessageRequest: Schema.Schema<AckMessageRequest>;
export interface AckMessageResponse {
    /** The number of messages that were succesfully acknowledged. */
    ackCount?: number | null;
    /** The number of messages that were succesfully retried. */
    retryCount?: number | null;
    warnings?: string[] | null;
}
export declare const AckMessageResponse: Schema.Schema<AckMessageResponse>;
export type AckMessageError = DefaultErrors | InvalidRequestBody | InvalidQueueId | QueueNotFound | InvalidRoute;
export declare const ackMessage: API.OperationMethod<AckMessageRequest, AckMessageResponse, AckMessageError, Credentials | HttpClient.HttpClient>;
export interface StartPurgeRequest {
    queueId: string;
    /** Path param: A Resource identifier. */
    accountId: string;
    /** Body param: Confimation that all messages will be deleted permanently. */
    deleteMessagesPermanently?: boolean;
}
export declare const StartPurgeRequest: Schema.Schema<StartPurgeRequest>;
export interface StartPurgeResponse {
    consumers?: ({
        consumerId?: string | null;
        createdOn?: string | null;
        queueId?: string | null;
        script?: string | null;
        settings?: {
            batchSize?: number | null;
            maxConcurrency?: number | null;
            maxRetries?: number | null;
            maxWaitTimeMs?: number | null;
            retryDelay?: number | null;
        } | null;
        type?: "worker" | null;
    } | {
        consumerId?: string | null;
        createdOn?: string | null;
        queueId?: string | null;
        settings?: {
            batchSize?: number | null;
            maxRetries?: number | null;
            retryDelay?: number | null;
            visibilityTimeoutMs?: number | null;
        } | null;
        type?: "http_pull" | null;
    })[] | null;
    consumersTotalCount?: number | null;
    createdOn?: string | null;
    modifiedOn?: string | null;
    producers?: ({
        script?: string | null;
        type?: "worker" | null;
    } | {
        bucketName?: string | null;
        type?: "r2_bucket" | null;
    })[] | null;
    producersTotalCount?: number | null;
    queueId?: string | null;
    queueName?: string | null;
    settings?: {
        deliveryDelay?: number | null;
        deliveryPaused?: boolean | null;
        messageRetentionPeriod?: number | null;
    } | null;
}
export declare const StartPurgeResponse: Schema.Schema<StartPurgeResponse>;
export type StartPurgeError = DefaultErrors | InvalidQueueId | InvalidRoute;
export declare const startPurge: API.OperationMethod<StartPurgeRequest, StartPurgeResponse, StartPurgeError, Credentials | HttpClient.HttpClient>;
export interface StatusPurgeRequest {
    queueId: string;
    /** A Resource identifier. */
    accountId: string;
}
export declare const StatusPurgeRequest: Schema.Schema<StatusPurgeRequest>;
export interface StatusPurgeResponse {
    /** Indicates if the last purge operation completed successfully. */
    completed?: string | null;
    /** Timestamp when the last purge operation started. */
    startedAt?: string | null;
}
export declare const StatusPurgeResponse: Schema.Schema<StatusPurgeResponse>;
export type StatusPurgeError = DefaultErrors | InvalidQueueId | InvalidRoute;
export declare const statusPurge: API.OperationMethod<StatusPurgeRequest, StatusPurgeResponse, StatusPurgeError, Credentials | HttpClient.HttpClient>;
export interface GetQueueRequest {
    queueId: string;
    /** A Resource identifier. */
    accountId: string;
}
export declare const GetQueueRequest: Schema.Schema<GetQueueRequest>;
export interface GetQueueResponse {
    consumers?: ({
        consumerId?: string | null;
        createdOn?: string | null;
        queueId?: string | null;
        script?: string | null;
        settings?: {
            batchSize?: number | null;
            maxConcurrency?: number | null;
            maxRetries?: number | null;
            maxWaitTimeMs?: number | null;
            retryDelay?: number | null;
        } | null;
        type?: "worker" | null;
    } | {
        consumerId?: string | null;
        createdOn?: string | null;
        queueId?: string | null;
        settings?: {
            batchSize?: number | null;
            maxRetries?: number | null;
            retryDelay?: number | null;
            visibilityTimeoutMs?: number | null;
        } | null;
        type?: "http_pull" | null;
    })[] | null;
    consumersTotalCount?: number | null;
    createdOn?: string | null;
    modifiedOn?: string | null;
    producers?: ({
        script?: string | null;
        type?: "worker" | null;
    } | {
        bucketName?: string | null;
        type?: "r2_bucket" | null;
    })[] | null;
    producersTotalCount?: number | null;
    queueId?: string | null;
    queueName?: string | null;
    settings?: {
        deliveryDelay?: number | null;
        deliveryPaused?: boolean | null;
        messageRetentionPeriod?: number | null;
    } | null;
}
export declare const GetQueueResponse: Schema.Schema<GetQueueResponse>;
export type GetQueueError = DefaultErrors | QueueNotFound | InvalidRoute;
export declare const getQueue: API.OperationMethod<GetQueueRequest, GetQueueResponse, GetQueueError, Credentials | HttpClient.HttpClient>;
export interface ListQueuesRequest {
    /** A Resource identifier. */
    accountId: string;
}
export declare const ListQueuesRequest: Schema.Schema<ListQueuesRequest>;
export interface ListQueuesResponse {
    result: {
        consumers?: ({
            consumerId?: string | null;
            createdOn?: string | null;
            queueId?: string | null;
            script?: string | null;
            settings?: {
                batchSize?: number | null;
                maxConcurrency?: number | null;
                maxRetries?: number | null;
                maxWaitTimeMs?: number | null;
                retryDelay?: number | null;
            } | null;
            type?: "worker" | null;
        } | {
            consumerId?: string | null;
            createdOn?: string | null;
            queueId?: string | null;
            settings?: {
                batchSize?: number | null;
                maxRetries?: number | null;
                retryDelay?: number | null;
                visibilityTimeoutMs?: number | null;
            } | null;
            type?: "http_pull" | null;
        })[] | null;
        consumersTotalCount?: number | null;
        createdOn?: string | null;
        modifiedOn?: string | null;
        producers?: ({
            script?: string | null;
            type?: "worker" | null;
        } | {
            bucketName?: string | null;
            type?: "r2_bucket" | null;
        })[] | null;
        producersTotalCount?: number | null;
        queueId?: string | null;
        queueName?: string | null;
        settings?: {
            deliveryDelay?: number | null;
            deliveryPaused?: boolean | null;
            messageRetentionPeriod?: number | null;
        } | null;
    }[];
}
export declare const ListQueuesResponse: Schema.Schema<ListQueuesResponse>;
export type ListQueuesError = DefaultErrors | InvalidRoute;
export declare const listQueues: API.PaginatedOperationMethod<ListQueuesRequest, ListQueuesResponse, ListQueuesError, Credentials | HttpClient.HttpClient>;
export interface CreateQueueRequest {
    /** Path param: A Resource identifier. */
    accountId: string;
    /** Body param: */
    queueName: string;
}
export declare const CreateQueueRequest: Schema.Schema<CreateQueueRequest>;
export interface CreateQueueResponse {
    consumers?: ({
        consumerId?: string | null;
        createdOn?: string | null;
        queueId?: string | null;
        script?: string | null;
        settings?: {
            batchSize?: number | null;
            maxConcurrency?: number | null;
            maxRetries?: number | null;
            maxWaitTimeMs?: number | null;
            retryDelay?: number | null;
        } | null;
        type?: "worker" | null;
    } | {
        consumerId?: string | null;
        createdOn?: string | null;
        queueId?: string | null;
        settings?: {
            batchSize?: number | null;
            maxRetries?: number | null;
            retryDelay?: number | null;
            visibilityTimeoutMs?: number | null;
        } | null;
        type?: "http_pull" | null;
    })[] | null;
    consumersTotalCount?: number | null;
    createdOn?: string | null;
    modifiedOn?: string | null;
    producers?: ({
        script?: string | null;
        type?: "worker" | null;
    } | {
        bucketName?: string | null;
        type?: "r2_bucket" | null;
    })[] | null;
    producersTotalCount?: number | null;
    queueId?: string | null;
    queueName?: string | null;
    settings?: {
        deliveryDelay?: number | null;
        deliveryPaused?: boolean | null;
        messageRetentionPeriod?: number | null;
    } | null;
}
export declare const CreateQueueResponse: Schema.Schema<CreateQueueResponse>;
export type CreateQueueError = DefaultErrors | QueueAlreadyExists | InvalidQueueName | InvalidRoute;
export declare const createQueue: API.OperationMethod<CreateQueueRequest, CreateQueueResponse, CreateQueueError, Credentials | HttpClient.HttpClient>;
export interface UpdateQueueRequest {
    queueId: string;
    /** Path param: A Resource identifier. */
    accountId: string;
    /** Body param: */
    queueName?: string;
    /** Body param: */
    settings?: {
        deliveryDelay?: number;
        deliveryPaused?: boolean;
        messageRetentionPeriod?: number;
    };
}
export declare const UpdateQueueRequest: Schema.Schema<UpdateQueueRequest>;
export interface UpdateQueueResponse {
    consumers?: ({
        consumerId?: string | null;
        createdOn?: string | null;
        queueId?: string | null;
        script?: string | null;
        settings?: {
            batchSize?: number | null;
            maxConcurrency?: number | null;
            maxRetries?: number | null;
            maxWaitTimeMs?: number | null;
            retryDelay?: number | null;
        } | null;
        type?: "worker" | null;
    } | {
        consumerId?: string | null;
        createdOn?: string | null;
        queueId?: string | null;
        settings?: {
            batchSize?: number | null;
            maxRetries?: number | null;
            retryDelay?: number | null;
            visibilityTimeoutMs?: number | null;
        } | null;
        type?: "http_pull" | null;
    })[] | null;
    consumersTotalCount?: number | null;
    createdOn?: string | null;
    modifiedOn?: string | null;
    producers?: ({
        script?: string | null;
        type?: "worker" | null;
    } | {
        bucketName?: string | null;
        type?: "r2_bucket" | null;
    })[] | null;
    producersTotalCount?: number | null;
    queueId?: string | null;
    queueName?: string | null;
    settings?: {
        deliveryDelay?: number | null;
        deliveryPaused?: boolean | null;
        messageRetentionPeriod?: number | null;
    } | null;
}
export declare const UpdateQueueResponse: Schema.Schema<UpdateQueueResponse>;
export type UpdateQueueError = DefaultErrors | InvalidQueueName | QueueNotFound | InvalidRoute;
export declare const updateQueue: API.OperationMethod<UpdateQueueRequest, UpdateQueueResponse, UpdateQueueError, Credentials | HttpClient.HttpClient>;
export interface PatchQueueRequest {
    queueId: string;
    /** Path param: A Resource identifier. */
    accountId: string;
    /** Body param: */
    queueName?: string;
    /** Body param: */
    settings?: {
        deliveryDelay?: number;
        deliveryPaused?: boolean;
        messageRetentionPeriod?: number;
    };
}
export declare const PatchQueueRequest: Schema.Schema<PatchQueueRequest>;
export interface PatchQueueResponse {
    consumers?: ({
        consumerId?: string | null;
        createdOn?: string | null;
        queueId?: string | null;
        script?: string | null;
        settings?: {
            batchSize?: number | null;
            maxConcurrency?: number | null;
            maxRetries?: number | null;
            maxWaitTimeMs?: number | null;
            retryDelay?: number | null;
        } | null;
        type?: "worker" | null;
    } | {
        consumerId?: string | null;
        createdOn?: string | null;
        queueId?: string | null;
        settings?: {
            batchSize?: number | null;
            maxRetries?: number | null;
            retryDelay?: number | null;
            visibilityTimeoutMs?: number | null;
        } | null;
        type?: "http_pull" | null;
    })[] | null;
    consumersTotalCount?: number | null;
    createdOn?: string | null;
    modifiedOn?: string | null;
    producers?: ({
        script?: string | null;
        type?: "worker" | null;
    } | {
        bucketName?: string | null;
        type?: "r2_bucket" | null;
    })[] | null;
    producersTotalCount?: number | null;
    queueId?: string | null;
    queueName?: string | null;
    settings?: {
        deliveryDelay?: number | null;
        deliveryPaused?: boolean | null;
        messageRetentionPeriod?: number | null;
    } | null;
}
export declare const PatchQueueResponse: Schema.Schema<PatchQueueResponse>;
export type PatchQueueError = DefaultErrors | QueueNotFound | InvalidRoute;
export declare const patchQueue: API.OperationMethod<PatchQueueRequest, PatchQueueResponse, PatchQueueError, Credentials | HttpClient.HttpClient>;
export interface DeleteQueueRequest {
    queueId: string;
    /** A Resource identifier. */
    accountId: string;
}
export declare const DeleteQueueRequest: Schema.Schema<DeleteQueueRequest>;
export interface DeleteQueueResponse {
    errors?: {
        code: number;
        message: string;
        documentationUrl?: string | null;
        source?: {
            pointer?: string | null;
        } | null;
    }[] | null;
    messages?: string[] | null;
    /** Indicates if the API call was successful or not. */
    success?: true | null;
}
export declare const DeleteQueueResponse: Schema.Schema<DeleteQueueResponse>;
export type DeleteQueueError = DefaultErrors | QueueNotFound | InvalidRoute;
export declare const deleteQueue: API.OperationMethod<DeleteQueueRequest, DeleteQueueResponse, DeleteQueueError, Credentials | HttpClient.HttpClient>;
export interface GetSubscriptionRequest {
    subscriptionId: string;
    /** A Resource identifier. */
    accountId: string;
}
export declare const GetSubscriptionRequest: Schema.Schema<GetSubscriptionRequest>;
export interface GetSubscriptionResponse {
    /** Unique identifier for the subscription */
    id: string;
    /** When the subscription was created */
    createdAt: string;
    /** Destination configuration for the subscription */
    destination: {
        queueId: string;
        type: "queues.queue";
    };
    /** Whether the subscription is active */
    enabled: boolean;
    /** List of event types this subscription handles */
    events: string[];
    /** When the subscription was last modified */
    modifiedAt: string;
    /** Name of the subscription */
    name: string;
    /** Source configuration for the subscription */
    source: {
        type?: "images" | null;
    } | {
        type?: "kv" | null;
    } | {
        type?: "r2" | null;
    } | {
        type?: "superSlurper" | null;
    } | {
        type?: "vectorize" | null;
    } | {
        modelName?: string | null;
        type?: "workersAi.model" | null;
    } | {
        type?: "workersBuilds.worker" | null;
        workerName?: string | null;
    } | {
        type?: "workflows.workflow" | null;
        workflowName?: string | null;
    };
}
export declare const GetSubscriptionResponse: Schema.Schema<GetSubscriptionResponse>;
export type GetSubscriptionError = DefaultErrors | UnrecognizedEventType;
export declare const getSubscription: API.OperationMethod<GetSubscriptionRequest, GetSubscriptionResponse, GetSubscriptionError, Credentials | HttpClient.HttpClient>;
export interface ListSubscriptionsRequest {
    /** Path param: A Resource identifier. */
    accountId: string;
    page?: number;
    perPage?: number;
    /** Query param: Sort direction */
    direction?: "asc" | "desc";
    /** Query param: Field to sort by */
    order?: "created_at" | "name" | "enabled" | "source";
}
export declare const ListSubscriptionsRequest: Schema.Schema<ListSubscriptionsRequest>;
export interface ListSubscriptionsResponse {
    result: {
        id: string;
        createdAt: string;
        destination: {
            queueId: string;
            type: "queues.queue";
        };
        enabled: boolean;
        events: string[];
        modifiedAt: string;
        name: string;
        source: {
            type?: "images" | null;
        } | {
            type?: "kv" | null;
        } | {
            type?: "r2" | null;
        } | {
            type?: "superSlurper" | null;
        } | {
            type?: "vectorize" | null;
        } | {
            modelName?: string | null;
            type?: "workersAi.model" | null;
        } | {
            type?: "workersBuilds.worker" | null;
            workerName?: string | null;
        } | {
            type?: "workflows.workflow" | null;
            workflowName?: string | null;
        };
    }[];
    resultInfo?: {
        count?: number | null;
        page?: number | null;
        perPage?: number | null;
        totalCount?: number | null;
    } | null;
}
export declare const ListSubscriptionsResponse: Schema.Schema<ListSubscriptionsResponse>;
export type ListSubscriptionsError = DefaultErrors;
export declare const listSubscriptions: API.PaginatedOperationMethod<ListSubscriptionsRequest, ListSubscriptionsResponse, ListSubscriptionsError, Credentials | HttpClient.HttpClient>;
export interface CreateSubscriptionRequest {
    /** Path param: A Resource identifier. */
    accountId: string;
    /** Body param: Destination configuration for the subscription */
    destination?: {
        queueId: string;
        type: "queues.queue";
    };
    /** Body param: Whether the subscription is active */
    enabled?: boolean;
    /** Body param: List of event types this subscription handles */
    events?: string[];
    /** Body param: Name of the subscription */
    name?: string;
    /** Body param: Source configuration for the subscription */
    source?: {
        type?: "images";
    } | {
        type?: "kv";
    } | {
        type?: "r2";
    } | {
        type?: "superSlurper";
    } | {
        type?: "vectorize";
    } | {
        modelName?: string;
        type?: "workersAi.model";
    } | {
        type?: "workersBuilds.worker";
        workerName?: string;
    } | {
        type?: "workflows.workflow";
        workflowName?: string;
    };
}
export declare const CreateSubscriptionRequest: Schema.Schema<CreateSubscriptionRequest>;
export interface CreateSubscriptionResponse {
    /** Unique identifier for the subscription */
    id: string;
    /** When the subscription was created */
    createdAt: string;
    /** Destination configuration for the subscription */
    destination: {
        queueId: string;
        type: "queues.queue";
    };
    /** Whether the subscription is active */
    enabled: boolean;
    /** List of event types this subscription handles */
    events: string[];
    /** When the subscription was last modified */
    modifiedAt: string;
    /** Name of the subscription */
    name: string;
    /** Source configuration for the subscription */
    source: {
        type?: "images" | null;
    } | {
        type?: "kv" | null;
    } | {
        type?: "r2" | null;
    } | {
        type?: "superSlurper" | null;
    } | {
        type?: "vectorize" | null;
    } | {
        modelName?: string | null;
        type?: "workersAi.model" | null;
    } | {
        type?: "workersBuilds.worker" | null;
        workerName?: string | null;
    } | {
        type?: "workflows.workflow" | null;
        workflowName?: string | null;
    };
}
export declare const CreateSubscriptionResponse: Schema.Schema<CreateSubscriptionResponse>;
export type CreateSubscriptionError = DefaultErrors | UnrecognizedEventType;
export declare const createSubscription: API.OperationMethod<CreateSubscriptionRequest, CreateSubscriptionResponse, CreateSubscriptionError, Credentials | HttpClient.HttpClient>;
export interface PatchSubscriptionRequest {
    subscriptionId: string;
    /** Path param: A Resource identifier. */
    accountId: string;
    /** Body param: Destination configuration for the subscription */
    destination?: {
        queueId: string;
        type: "queues.queue";
    };
    /** Body param: Whether the subscription is active */
    enabled?: boolean;
    /** Body param: List of event types this subscription handles */
    events?: string[];
    /** Body param: Name of the subscription */
    name?: string;
}
export declare const PatchSubscriptionRequest: Schema.Schema<PatchSubscriptionRequest>;
export interface PatchSubscriptionResponse {
    /** Unique identifier for the subscription */
    id: string;
    /** When the subscription was created */
    createdAt: string;
    /** Destination configuration for the subscription */
    destination: {
        queueId: string;
        type: "queues.queue";
    };
    /** Whether the subscription is active */
    enabled: boolean;
    /** List of event types this subscription handles */
    events: string[];
    /** When the subscription was last modified */
    modifiedAt: string;
    /** Name of the subscription */
    name: string;
    /** Source configuration for the subscription */
    source: {
        type?: "images" | null;
    } | {
        type?: "kv" | null;
    } | {
        type?: "r2" | null;
    } | {
        type?: "superSlurper" | null;
    } | {
        type?: "vectorize" | null;
    } | {
        modelName?: string | null;
        type?: "workersAi.model" | null;
    } | {
        type?: "workersBuilds.worker" | null;
        workerName?: string | null;
    } | {
        type?: "workflows.workflow" | null;
        workflowName?: string | null;
    };
}
export declare const PatchSubscriptionResponse: Schema.Schema<PatchSubscriptionResponse>;
export type PatchSubscriptionError = DefaultErrors | UnrecognizedEventType;
export declare const patchSubscription: API.OperationMethod<PatchSubscriptionRequest, PatchSubscriptionResponse, PatchSubscriptionError, Credentials | HttpClient.HttpClient>;
export interface DeleteSubscriptionRequest {
    subscriptionId: string;
    /** A Resource identifier. */
    accountId: string;
}
export declare const DeleteSubscriptionRequest: Schema.Schema<DeleteSubscriptionRequest>;
export interface DeleteSubscriptionResponse {
    /** Unique identifier for the subscription */
    id: string;
    /** When the subscription was created */
    createdAt: string;
    /** Destination configuration for the subscription */
    destination: {
        queueId: string;
        type: "queues.queue";
    };
    /** Whether the subscription is active */
    enabled: boolean;
    /** List of event types this subscription handles */
    events: string[];
    /** When the subscription was last modified */
    modifiedAt: string;
    /** Name of the subscription */
    name: string;
    /** Source configuration for the subscription */
    source: {
        type?: "images" | null;
    } | {
        type?: "kv" | null;
    } | {
        type?: "r2" | null;
    } | {
        type?: "superSlurper" | null;
    } | {
        type?: "vectorize" | null;
    } | {
        modelName?: string | null;
        type?: "workersAi.model" | null;
    } | {
        type?: "workersBuilds.worker" | null;
        workerName?: string | null;
    } | {
        type?: "workflows.workflow" | null;
        workflowName?: string | null;
    };
}
export declare const DeleteSubscriptionResponse: Schema.Schema<DeleteSubscriptionResponse>;
export type DeleteSubscriptionError = DefaultErrors | UnrecognizedEventType;
export declare const deleteSubscription: API.OperationMethod<DeleteSubscriptionRequest, DeleteSubscriptionResponse, DeleteSubscriptionError, Credentials | HttpClient.HttpClient>;
export {};
//# sourceMappingURL=queues.d.ts.map