import PgBoss from "pg-boss";
import { type TenantTx } from "@slackwsh/data";
export declare const JOB_QUEUES: readonly ["notifications", "email", "sms", "unfurl", "search_index", "media", "webhooks", "retention", "exports", "analytics"];
export type JobQueue = (typeof JOB_QUEUES)[number];
export interface NotificationJob {
    messageId: number;
    workspaceId: number;
    channelId: number;
    authorId: number;
}
export interface SearchIndexJob {
    messageId: number;
    workspaceId: number;
}
/**
 * Producer-only pg-boss. The worker process is what `work()`s the queues;
 * api/gateway only `send()` inside the write transaction (§4.3 / ADR-006).
 * `supervise: false` so N API nodes do not all run maintenance.
 */
export declare function getBoss(): Promise<PgBoss>;
export declare function stopBoss(): Promise<void>;
/** Insert a pg-boss job on the same connection as `tx` so commit/rollback is atomic. */
export declare function enqueueInTx(tx: TenantTx, queue: JobQueue, data: object): Promise<string | null>;
//# sourceMappingURL=jobs.d.ts.map