import { Resource, BackgroundJob as BaseBackgroundJob } from 'wirejs-resources'; export type BackgroundJobDefinition = { absoluteId: string; }; /** * A function that will be executed in the background. * * Intended for longer-running work that will continue after an initial API response * to the client. * * ## WARNINGS * * 1. It may execute in a completely different environment that the one that invoked it. * DO NOT depend on global variables, closures, or other process state that is not lazily * created or constructed in-place by the script. * 2. Fire-and-forget behavior is undefined. As soon as the `Promise` returned by your * function resolves, the execution environment is free to terminate the process. * 3. In local development, **timeouts are not enforced.** (Yet.) */ export declare class BackgroundJob Promise> extends Resource implements Omit, '#private'> { static registeredJobs: Record>; constructor(scope: Resource | string, id: string, options: { handler: T; }); /** * Serializes parameter data and schedules background execution. * * **NOTE:** This resolves once the job is scheduled; *not when it completes!* * * @param data */ start(...args: Parameters): Promise; }