import type { PushBlob } from './transport.js'; import type { BlobEnvelope } from './envelope.js'; export interface QueueItem { idempotency_key: string; envelopes: BlobEnvelope[]; blobs: PushBlob[]; created_at: string; attempts: number; } export declare function loadQueue(path: string): QueueItem[]; export declare function enqueue(path: string, q: QueueItem[], envelopes: BlobEnvelope[], blobs: PushBlob[]): QueueItem[]; /** Send queued items oldest-first. On the first send error: bump that item's attempts, persist, * return { ok:false, sent: }. On full drain: persist (file removed when * empty), return { ok:true, sent: }. The caller acks every envelope in `sent`. */ export declare function flushQueue(path: string, q: QueueItem[], send: (item: QueueItem) => Promise): Promise<{ ok: boolean; sent: QueueItem[]; }>;