import type { JobAdmin } from '../../../services/ports/jobAdmin.js'; import type { JobRepoHarness } from './jobRepositoryContract.js'; /** The jobs as the API sees them, and the ways to set one up and look at its file. */ export interface JobAdminHarness extends JobRepoHarness { admin: JobAdmin; /** The chunks stored for a job, in the order of `seq`. */ chunksOf(jobId: number): Promise; /** Puts chunks on a job, as an upload that finished long ago did. */ seedChunks(jobId: number, chunks: Buffer[]): Promise; } /** * What every `JobAdmin` must do (§ 4.5, point 6; § 8.3, 8.4): the upload and its * swap, and the actions of the admin as compare-and-swaps that say why they * refuse. It runs against the double and against PostgreSQL. * * The real table has two unique indexes (one open job per entity, one import * queued or running), so a test with several jobs gives them different entities * and at most one that is queued or running. */ export declare function jobAdminContract(label: string, make: () => Promise): void;