import type { ProcessContext } from "../context.js"; import type { SyncMessageBodyEvent } from "../events.js"; /** * The ordered message ids to sync, plus a uid lookup when the event carried the * preferred `messages` shape. The uid map lets the body-sync service skip the * per-message DDB get; legacy events (ids only) leave it undefined and the * service resolves uids itself. */ export interface ResolvedBatch { messageIds: string[]; uidByMessageId?: Map; force: boolean; } export declare const resolveBatch: (event: SyncMessageBodyEvent) => ResolvedBatch; /** * Build the loud, structured error thrown when a batch still has failed * messages and SQS redelivery budget left. Throwing (rather than swallowing * into a fresh re-enqueue) is what lets a genuine processing failure reach * the body-dlq once `BODY_SYNC_MAX_ATTEMPTS` is exhausted — the SQS-level * redrive owns retry scheduling now, not this handler. */ export declare const buildRetryableFailureError: (failedMessageIds: string[], receiveCount: number, maxAttempts: number) => Error; export declare const syncMessageBody: (event: SyncMessageBodyEvent, ctx: ProcessContext, receiveCount: number) => Promise;