import type { CreateSegmentInput, ListSegmentsQuery, Paginated, Segment, UpdateSegmentInput } from '../../types'; import type { HttpClient } from '../../http'; /** * Segments: a saved contact filter under a name. * * Nothing is materialised -- a segment holds no contact ids. It covers whatever * its conditions match at the moment it is next run, whether that is * `contacts.list({ segment })`, an export, or a campaign. */ export declare class Segments { private readonly http; constructor(http: HttpClient); /** * `GET /v1/audience/segments` -- offset paginated. `search` matches the * segment name and description. * * Scope: `segments:read`. */ list(query?: Partial): Promise>; /** * `GET /v1/audience/segments/:id`. * * Scope: `segments:read`. */ get(id: string): Promise; /** * `POST /v1/audience/segments` -- 201 with the created segment. * * The filter is validated on write rather than when first run, so a segment * that stores cannot fail later for a condition that never parsed. * * Scope: `segments:write`. */ create(input: CreateSegmentInput): Promise; /** * `PATCH /v1/audience/segments/:id` -- a partial update. Sending `filter` * replaces the whole condition list; there is no per-condition edit. * * Scope: `segments:write`. */ update(id: string, input: UpdateSegmentInput): Promise; /** * `DELETE /v1/audience/segments/:id` -- 204, no body. Contacts are untouched: * a segment never owned them. * * Scope: `segments:write`. */ delete(id: string): Promise; }