import type { CreateExportHistoryInput, ExportHistory, ListExportHistoryQuery, Paginated } from '../../types'; import type { HttpClient } from '../../http'; /** * Export history: one row per bulk extract, moved by a worker through * `pending -> processing -> completed | failed`. * * `config` says what to write out, in the same vocabulary the contact list * speaks: a saved `segment`, an ad-hoc `filter`, or both -- sending both * narrows the segment. `fields` picks the columns; empty means the worker's * default set. * * When the run completes, `file` holds the storage key of the written file and * `count` the number of rows in it. */ export declare class Exports { private readonly http; constructor(http: HttpClient); /** * `GET /v1/audience/exports` -- offset paginated, newest first. `search` * matches the title; `module` and `status` are quick filters. * * Scope: `contacts:read`. */ list(query?: Partial): Promise>; /** * `GET /v1/audience/exports/:id` -- the row with its current `status`, * `count` and, once finished, `file`. This is the progress endpoint; a failed * run carries its reason in `error`. * * Scope: `contacts:read`. */ get(id: string): Promise; /** * `POST /v1/audience/exports` -- **202**, not 201: the row exists, but no * file has been written yet. The response is the row at `status: 'pending'` * with `count: 0` and no `file`. * * Creating an export needs only a title: the default config exports every * contact with the worker's default columns. * * Scope: `contacts:read` -- reading contacts out is a read, so an export can * be started with read-only access. */ create(input: CreateExportHistoryInput): Promise; /** * `DELETE /v1/audience/exports/:id` -- 204, no body. Removes the history row; * a file already written to storage is not deleted with it. * * Scope: `contacts:write`. */ delete(id: string): Promise; }