import BackgroundJobsSocketRequest from "./socket-request.js"; export default class BackgroundJobsClient { configurationPromise: Promise; enqueueTimeoutMs: number; generationHandshakeTimeoutMs: number; explicitGenerationId: string | undefined; /** * Runs constructor. * @param {object} [args] - Options. * @param {import("../configuration.js").default} [args.configuration] - Configuration. * @param {number} [args.enqueueTimeoutMs] - Maximum time to wait for an enqueue acknowledgement in milliseconds (default: 5000). * @param {number} [args.generationHandshakeTimeoutMs] - Maximum time to wait for generation acknowledgement (default: 4000). * @param {string} [args.generationId] - Explicit release generation identity. */ constructor({ configuration, enqueueTimeoutMs, generationHandshakeTimeoutMs, generationId }?: { configuration?: import("../configuration.js").default; enqueueTimeoutMs?: number; generationHandshakeTimeoutMs?: number; generationId?: string; }); /** * Builds a one-shot client socket request from the resolved configuration. * @returns {Promise} - Socket request. */ _request(): Promise; /** * Runs enqueue. * @param {object} args - Options. * @param {string} args.jobName - Job name. * @param {Array>} args.args - Job args. * @param {import("./types.js").BackgroundJobOptions} [args.options] - Job options. * @param {string} [args.producerInvocationId] - Stable identity for one owned enqueue invocation. * @param {import("./types.js").BackgroundJobProducerProof} [args.producerProof] - Exact internal producer handoff. * @returns {Promise} - Job id. */ enqueue({ jobName, args, options, producerInvocationId, producerProof }: { jobName: string; args: Array>; options?: import("./types.js").BackgroundJobOptions; producerInvocationId?: string; producerProof?: import("./types.js").BackgroundJobProducerProof; }): Promise; /** * Atomically replaces the queued owner of a stable schedule key. * @param {object} args - Options. * @param {string} args.scheduleKey - Stable logical schedule key. * @param {string} args.jobName - Job name. * @param {Array>} args.args - Job args. * @param {import("./types.js").BackgroundJobOptions} [args.options] - Job options. * @returns {Promise} - Replacement result. */ replaceScheduled({ scheduleKey, jobName, args, options }: { scheduleKey: string; jobName: string; args: Array>; options?: import("./types.js").BackgroundJobOptions; }): Promise; /** * Cancels or detaches the current owner of a stable schedule key. * @param {object} args - Options. * @param {string} args.scheduleKey - Stable logical schedule key. * @returns {Promise} - Cancellation result. */ cancelScheduled({ scheduleKey }: { scheduleKey: string; }): Promise; /** * Reads current stable ownership and optional terminal history. * @param {{scheduleKey: string, includeLatestTerminal?: boolean}} args - Lookup request. * @returns {Promise} - Normalized stable schedule jobs. */ getScheduledJob({ scheduleKey, includeLatestTerminal }: { scheduleKey: string; includeLatestTerminal?: boolean; }): Promise; /** * Expedites a future queued stable owner without changing job identity. * @param {{scheduleKey: string}} args - Wake request. * @returns {Promise} - Wake result. */ wakeScheduled({ scheduleKey }: { scheduleKey: string; }): Promise; } //# sourceMappingURL=client.d.ts.map