import type { CategoryPlan } from '../../../services/plan/categoryPlan.js'; import type { ImageFetcher } from '../../../services/images/types.js'; import type { StoreFixture } from '../../../services/ports/lookup.js'; import type { CsvLimits } from '../../../services/reader/readCsv.js'; import type { ImportMode } from '../../../services/types.js'; import type { CategoryWriterArgs, WriteOutcome } from '../../../services/write/categoryWriter.js'; import { FakeClock } from '../../../testing/FakeClock.js'; import { FakeImageFetcher } from '../../../testing/FakeImageFetcher.js'; import { MemoryLookup } from '../../../testing/MemoryLookup.js'; import { MemoryServices } from '../../../testing/MemoryServices.js'; import { RecordingServices } from '../../../testing/RecordingServices.js'; export declare const keyDeps: { sha256Hex: (text: string) => string; sanitizeFileName: (original: string) => string; }; export interface ImportRun { outcomes: WriteOutcome[]; plan: CategoryPlan; lookup: MemoryLookup; memory: MemoryServices; services: RecordingServices; images: FakeImageFetcher; clock: FakeClock; } export interface ImportOptions { mode?: ImportMode; store?: StoreFixture; resumed?: boolean; include?: CategoryWriterArgs['include']; batchSize?: number; limits?: Partial; signal?: AbortSignal; /** Set up failures before the run. */ prepare?: (run: Omit) => void; /** Stop after this many outcomes (the way the runner stops at the tenth failure). */ stopAfter?: number; /** Images fetched ahead of their rows at the same time (the writers' default is 1). */ imageConcurrency?: number; /** What the writer fetches images with, made from the fake (to measure the fetches). */ wrapImages?: (inner: FakeImageFetcher) => ImageFetcher; /** The page addresses, for the category writer's wait for the address of a new parent. */ pages?: CategoryWriterArgs['pages']; } /** * Index a category file, plan it and write it on an in-memory store, the way the * runner will: no validation first, so that the writer is shown on its own. */ export declare function importCategories(file: string, options?: ImportOptions): Promise; /** The same for a products file: indexed, planned and written, without a check first. */ export declare function importProducts(file: string, options?: ImportOptions): Promise>; /** The same for a customers file. */ export declare function importCustomers(file: string, options?: ImportOptions): Promise>; /** The same for a customer addresses file. */ export declare function importAddresses(file: string, options?: ImportOptions): Promise>;