export interface GoodVibesCloudflareQueue { send(message: Body): Promise; } export interface GoodVibesCloudflareQueueMessage { readonly body: Body; ack?(): void; retry?(): void; } export interface GoodVibesCloudflareMessageBatch { readonly messages: readonly GoodVibesCloudflareQueueMessage[]; } export interface GoodVibesCloudflareExecutionContext { waitUntil(promise: Promise): 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 | undefined; } export type GoodVibesCloudflareQueuePayload = { readonly type: 'batch.tick'; readonly force?: boolean | undefined; readonly enqueuedAt?: number | undefined; } | { readonly type: 'batch.job.create'; readonly body: Record; 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; queue(batch: GoodVibesCloudflareMessageBatch, env: GoodVibesCloudflareWorkerEnv, ctx: GoodVibesCloudflareExecutionContext): Promise; scheduled(event: unknown, env: GoodVibesCloudflareWorkerEnv, ctx: GoodVibesCloudflareExecutionContext): Promise; } export declare function createGoodVibesCloudflareWorker(options?: GoodVibesCloudflareWorkerOptions): GoodVibesCloudflareWorker; //# sourceMappingURL=workers.d.ts.map