import type { CreateImportHistoryInput, ImportHistory, ListImportHistoryQuery, Paginated } from '../../types'; import type { HttpClient } from '../../http'; /** * Import history: one row per bulk load of contacts, and the record a worker * moves through `pending -> processing -> completed | failed`. * * Creating a row queues the work; the file itself is uploaded out of band and * named here by its storage key. `statistics` fills in as the worker walks the * file, so poll `get` to follow a run. * * The module is `contact` or `datastore` -- these rows are not contact-only, * which is why the route is `/imports` rather than `/contact-imports`. */ export declare class Imports { private readonly http; constructor(http: HttpClient); /** * `GET /v1/audience/imports` -- offset paginated, newest first. `search` * matches the title; `module` and `status` are quick filters. * * Scope: `contacts:read`. */ list(query?: Partial): Promise>; /** * `GET /v1/audience/imports/:id` -- the row with its current `status` and * `statistics`. This is the progress endpoint. * * Scope: `contacts:read`. */ get(id: string): Promise; /** * `POST /v1/audience/imports` -- **202**, not 201: the row exists, but * nothing has been read out of the file yet. The response is the row at * `status: 'pending'` with every counter at zero. * * `config.mapping` maps column headers to contact fields, and * `config.duplicateStrategy` decides what a row matching an existing contact * does. Unknown keys in `config` and `extra` are stored and handed back * untouched. * * Scope: `contacts:write`. */ create(input: CreateImportHistoryInput): Promise; /** * `DELETE /v1/audience/imports/:id` -- 204, no body. Removes the history row. * Contacts the import already created are not touched. * * Scope: `contacts:write`. */ delete(id: string): Promise; }