/** What one row of a price file would do to one product. */ export interface IPriceRow { sku: string; product_id: number; name: string; /** What the shop has now. */ from: { regular: string; sale: string }; /** What the file asks for. */ to: { regular: string; sale: string }; /** ``change`` is the only one that gets written. */ status: 'change' | 'nochange' | 'not_found' | 'invalid'; /** The shop's normal price is not the one the file says it was. */ stale: boolean; /** Why it was refused, or what to look at. */ note: string; } /** What a whole file would do, before anything is written. */ export interface IPricePreview { items: IPriceRow[]; totals: { change: number; nochange: number; not_found: number; invalid: number; stale: number; }; currency: string; } /** Where a price import has got to. */ export interface IPriceJob { job_id: string; status: 'pending' | 'running' | 'done' | 'undone'; file: string; total: number; written: number; failed: number; remaining: number; undone: boolean; can_undo: boolean; /** When it was started, as a unix time; only on the list. */ created_at?: number; }