export interface GoodVibesCloudflareQueue<Body = unknown> {
    send(message: Body): Promise<void>;
}
export interface GoodVibesCloudflareQueueMessage<Body = unknown> {
    readonly body: Body;
    ack?(): void;
    retry?(): void;
}
export interface GoodVibesCloudflareMessageBatch<Body = unknown> {
    readonly messages: readonly GoodVibesCloudflareQueueMessage<Body>[];
}
export interface GoodVibesCloudflareExecutionContext {
    waitUntil(promise: Promise<unknown>): void;
}
export interface GoodVibesCloudflareWorkerEnv {
    GOODVIBES_DAEMON_URL?: string | undefined;
    GOODVIBES_OPERATOR_TOKEN?: string | undefined;
    GOODVIBES_WORKER_TOKEN?: string | undefined;
    GOODVIBES_QUEUE_JOB_PAYLOADS?: string | undefined;
    GOODVIBES_BATCH_QUEUE?: GoodVibesCloudflareQueue<GoodVibesCloudflareQueuePayload> | undefined;
}
export type GoodVibesCloudflareQueuePayload = {
    readonly type: 'batch.tick';
    readonly force?: boolean | undefined;
    readonly enqueuedAt?: number | undefined;
} | {
    readonly type: 'batch.job.create';
    readonly body: Record<string, unknown>;
    readonly enqueuedAt?: number | undefined;
};
export interface GoodVibesCloudflareWorkerOptions {
    readonly daemonUrl?: string | undefined;
    readonly authToken?: string | undefined;
    readonly workerAuthToken?: string | undefined;
    readonly queueJobPayloads?: boolean | undefined;
    /**
     * Explicitly allow unauthenticated non-health endpoints.
     * Default is false: GOODVIBES_WORKER_TOKEN or workerAuthToken is required.
     */
    readonly allowUnauthenticated?: boolean | undefined;
    readonly maxRequestBodyBytes?: number | undefined;
}
export interface GoodVibesCloudflareWorker {
    fetch(request: Request, env: GoodVibesCloudflareWorkerEnv, ctx: GoodVibesCloudflareExecutionContext): Promise<Response>;
    queue(batch: GoodVibesCloudflareMessageBatch<GoodVibesCloudflareQueuePayload>, env: GoodVibesCloudflareWorkerEnv, ctx: GoodVibesCloudflareExecutionContext): Promise<void>;
    scheduled(event: unknown, env: GoodVibesCloudflareWorkerEnv, ctx: GoodVibesCloudflareExecutionContext): Promise<void>;
}
export declare function createGoodVibesCloudflareWorker(options?: GoodVibesCloudflareWorkerOptions): GoodVibesCloudflareWorker;
//# sourceMappingURL=workers.d.ts.map