import { a as EmailQueue } from "../packem_shared/types.d-B5iH_mgb.js"; import "../packem_shared/types.d-CyiC9uRC.js"; import 'node:buffer'; interface PgBossJob { data: unknown; id: string; /** pg-boss retry count (present when fetched with `includeMetadata`). */ retryCount?: number; } /** * The subset of a [pg-boss](https://github.com/timgit/pg-boss) instance this adapter uses (v10 API). */ interface PgBossLike { complete: (name: string, id: string) => Promise; fail: (name: string, id: string) => Promise; fetch: (name: string, options?: { batchSize?: number; includeMetadata?: boolean; }) => Promise; getQueueSize: (name: string) => Promise; send: (name: string, data: object, options?: { startAfter?: Date | number | string; }) => Promise; } /** * Options for {@link createPgBossQueue}. */ interface PgBossQueueOptions { /** * The pg-boss queue name. */ queueName: string; } /** * Creates an {@link EmailQueue} backed by pg-boss. * @param boss A started pg-boss instance (optional peer). * @param options Queue options. See {@link PgBossQueueOptions}. * @returns The pg-boss-backed queue. */ declare const createPgBossQueue: (boss: PgBossLike, options: PgBossQueueOptions) => EmailQueue; export { type PgBossLike, type PgBossQueueOptions, createPgBossQueue };