import type { Manifold } from '../../core/pipework.js'; import type { Handler } from '../../request/di/types.js'; import type { TenantConfig } from '../../auth/tenant/types.js'; export interface ExecuteJobOptions { instance: Manifold; jobId?: string; jobType?: string; auth?: unknown; tenant?: string | null; /** * Tenant config carrying custom `sessionVars`. When provided alongside * `tenant`, the custom session variables are propagated in addition to * `pipework.tenant_id` — matching the HTTP surface's behaviour. */ tenantConfig?: TenantConfig | null; input?: unknown; /** Timeout for multi-database transaction setup when running a tenant job. */ transactionTimeoutMs?: number; /** The ingress kind for the opened trace — `'cron'` for schedule-fired jobs, `'job'` otherwise. */ entryKind?: 'job' | 'cron'; /** * Ends the job at the caller's deadline. On abort the job's in-flight query is * cancelled server-side so its transaction rolls back and its connection * returns to the pool, and `executeJob` rejects — with `signal.reason` when * that is an `Error`, otherwise a `JobAbortedError` (`name: 'AbortError'`) * naming the job. A handler that ignores the cancelled query keeps running; * the rejection is still delivered on time. */ signal?: AbortSignal; } export declare function executeJob, TReturn>(handler: Handler, options: ExecuteJobOptions): Promise; //# sourceMappingURL=execute.d.ts.map