import { JobStatus, type DataMovementJob } from '@wix/bex-utils/@wix/ambassador-hub-v1-job/types';
export declare const JOB_POLL_INTERVAL_MS = 2000;
/** A job is terminal once it has succeeded, partially succeeded, or failed. */
export declare function isTerminalJobStatus(status?: JobStatus): boolean;
export interface PollImportJobOptions {
    intervalMs?: number;
    /** Called with every fetched job, including the terminal one. */
    onProgress?: (job: DataMovementJob) => void;
    /** Polling stops and resolves `null` as soon as this returns true. */
    isCancelled?: () => boolean;
    /** Overridable wait between polls (tests inject a controllable timer). */
    wait?: (ms: number) => Promise<void>;
}
/**
 * Polls a data-movement job until it reaches a terminal status, then resolves
 * with the terminal job. Resolves `null` if cancelled mid-poll. Pure async unit
 * (no MobX) so `ImportState` stays thin and this is testable on its own.
 */
export declare function pollImportJob(getJob: (jobId: string) => Promise<DataMovementJob>, jobId: string, options?: PollImportJobOptions): Promise<DataMovementJob | null>;
//# sourceMappingURL=importJobPoller.d.ts.map