import { FileFormat, type Destination, type DataMovementJob, type ListMovementLogsResponse, type Transformation, type CursorPaging } from '@wix/bex-utils/@wix/ambassador-hub-v1-job/types';
import type { PatternsErrorHandler } from '../../model';
import type { HttpClient } from '../../model/httpClient';
export interface HubJobClientDeps {
    httpClient: HttpClient;
    errorHandler: PatternsErrorHandler;
}
export interface SubmitImportJobParams {
    /** File id returned by `uploadFile`. */
    fileId: string;
    /**
     * Where the job writes. A union (`wixDataCollection`, `storesCatalogProducts`,
     * …) so platformized services pass their own variant — the client stays
     * neutral to that choice (see plan O6).
     */
    destination: Destination;
    /** Job name (the original file name). */
    name?: string;
    /** Source file format. Defaults to CSV. */
    fileFormat?: FileFormat;
    transformations?: Transformation[];
}
/**
 * Thin wrapper over the Hub Job (data-movement) API used by the server-side
 * import. Each call goes through `errorHandler.withErrorHandler` and the
 * container's `httpClient`, mirroring `ExportState`.
 *
 * Holds no observable state — it's a standalone unit consumed by `ImportState`.
 */
export interface HubJobClient {
    /**
     * Reserves an upload URL, PUTs the file, and returns its `fileId`.
     * Cancellation is handled at the job level via `terminateJob`, not by
     * aborting this upload.
     */
    uploadFile(file: File): Promise<string>;
    /** Submits an import job from an uploaded file; returns the `jobId`. */
    submitImportJob(params: SubmitImportJobParams): Promise<string>;
    /** Fetches a job's current state (status + progress) for polling. */
    getJob(jobId: string): Promise<DataMovementJob>;
    /** Requests termination of a running job. Does not roll back written rows. */
    terminateJob(jobId: string): Promise<void>;
    /** Lists per-row movement logs (source of the failed-rows report). */
    listMovementLogs(jobId: string, paging?: CursorPaging): Promise<ListMovementLogsResponse>;
}
export declare function createHubJobClient({ httpClient, errorHandler, }: HubJobClientDeps): HubJobClient;
//# sourceMappingURL=hubJobClient.d.ts.map