import type { HttpClient, RequestOptions } from "../http.js"; import { Paginated } from "../pagination.js"; import type { DeadJobsPage, DeadJobsParams, Document, DocumentDetail, Job, ListDocumentsParams, ListJobsParams, ListSourcesParams, ReplayJobParams, ReplayJobResult, ScanRecoveryPage, ScanRecoveryParams, Source } from "../types.js"; /** * Where material came from, what it became, and the work in between. * * Three resources rather than one because they answer three questions a caller * asks separately: a source is an ORIGIN, a document is the normalised form * that was kept, and a job is the work that is still running. Collapsing them * would make "nothing has appeared yet" indistinguishable from "it silently * failed", which is the whole reason jobs are visible at all. */ export declare class Sources { #private; constructor(http: HttpClient); list(params?: ListSourcesParams, options?: RequestOptions): Paginated; get(id: string, options?: RequestOptions): Promise; } export declare class Documents { #private; constructor(http: HttpClient); list(params?: ListDocumentsParams, options?: RequestOptions): Paginated; get(id: string, options?: RequestOptions): Promise; } export declare class Jobs { #private; constructor(http: HttpClient); list(params?: ListJobsParams, options?: RequestOptions): Paginated; /** * One job, by id. This is what `remember` hands back a reference to. * * `completed` is the terminal success state - the store's own word, not * `succeeded`. A caller polling for a state the API never writes waits * forever with nothing to show why. */ get(id: string, options?: RequestOptions): Promise; /** Read one bounded scan recovery page. Never follows cursors or enqueues work. */ scans(params?: ScanRecoveryParams, options?: RequestOptions): Promise; /** Owner credentials only; pm_space keys are denied by the API. One bounded page. */ dead(params?: DeadJobsParams, options?: RequestOptions): Promise; /** * Replay one job using owner credentials. Eligibility is checked by the API. * Never automatically resubmits, including on 429, timeout, or a malformed reply. * A failure can leave the outcome unknown: check jobs.get before another submission. */ replay(id: string, params?: ReplayJobParams, options?: RequestOptions): Promise; }