import type { Readable } from 'stream'; import { type AddressState } from '../entities/customerAddress/customerAddressValidator.js'; import type { HeaderInfo, ValidationContext } from '../entities/definition.js'; import type { AddressPlan } from '../plan/customerAddressPlan.js'; import type { Clock } from '../ports/clock.js'; import type { EntityServices } from '../ports/services.js'; import type { CsvLimits } from '../reader/readCsv.js'; import type { WriteOutcome } from './categoryWriter.js'; export interface AddressWriterArgs { open: () => Readable; limits?: Partial; header: HeaderInfo; state: AddressState; plan: AddressPlan; /** The reading context: the store to ask, the mode, the time, the hash. */ context: ValidationContext; services: EntityServices; clock: Pick; /** * The job is a resumed one (IMP-07). An address is only ever added, so the * worker that died may have added the ones after the last place it saved: an * address that is already stored, the same in every column, is not added again. */ resumed?: boolean; include?: (unit: { unit: number; rowNumber: number; key: string; }) => boolean; signal?: AbortSignal; /** Rows whose customers are asked of the store together. */ batchSize?: number; } /** * Writes the addresses of a file that has been checked, in the order of the file * (they depend on nothing). Each is added to the customer with that e-mail, * through the services that the account page uses, so the seam, the validation * and the default flag are core's. A row is never matched with an address that * exists (D-18); the one exception is a resumed job (see `resumed`). */ export declare function writeCustomerAddresses(args: AddressWriterArgs): AsyncGenerator;