import { EngineService } from '../engine'; import { JobData, JobOutput, JobStatus, JobInterruptOptions } from '../../types/job'; import { ExportOptions, JobExport } from '../../types/exporter'; import { StringAnyType, StringStringType } from '../../types/serializer'; import { JobStatsInput, GetStatsOptions, IdsResponse, StatsResponse } from '../../types/stats'; import { StreamCode, StreamStatus } from '../../types/stream'; interface JobsContext { engine: EngineService | null; } /** * Exports the full job state as a structured JSON object. */ export declare function exportJob(instance: JobsContext, jobId: string, options?: ExportOptions): Promise; /** * Returns all raw key-value pairs for a job's HASH record. */ export declare function getRaw(instance: JobsContext, jobId: string): Promise; /** * Reporter-related method to get the status of a job. * @private */ export declare function getStats(instance: JobsContext, topic: string, query: JobStatsInput): Promise; /** * Returns the numeric status semaphore for a job. */ export declare function getStatus(instance: JobsContext, jobId: string): Promise; /** * Returns the structured job state (data and metadata) for a job. */ export declare function getState(instance: JobsContext, topic: string, jobId: string): Promise; /** * Returns specific searchable fields from a job's HASH record. */ export declare function getQueryState(instance: JobsContext, jobId: string, fields: string[]): Promise; /** * @private */ export declare function getIds(instance: JobsContext, topic: string, query: JobStatsInput, queryFacets?: string[]): Promise; /** * @private */ export declare function resolveQuery(instance: JobsContext, topic: string, query: JobStatsInput): Promise; /** * Interrupts (terminates) an active workflow job. */ export declare function interrupt(instance: JobsContext, topic: string, jobId: string, options?: JobInterruptOptions): Promise; /** * Requests cooperative cancellation of an active workflow job. * Writes a durable cancel marker to the job hash via the store. * The workflow detects this at its next durable operation and * throws CancelledFailure which can be caught for cleanup. */ export declare function cancel(instance: JobsContext, jobId: string): Promise; /** * Immediately deletes a completed job from the system. */ export declare function scrub(instance: JobsContext, jobId: string): Promise; /** * Sends a signal to a paused workflow, resuming its execution. */ export declare function signal(instance: JobsContext, topic: string, data: JobData, status?: StreamStatus, code?: StreamCode): Promise; /** * Fan-out variant of `signal()`. * @private */ export declare function signalAll(instance: JobsContext, hookTopic: string, data: JobData, query: JobStatsInput, queryFacets?: string[]): Promise; export {};