import type { CreateCrmTriggerInput, CrmTrigger, CrmTriggerLog, ListCrmTriggerLogsQuery, ListCrmTriggersQuery, Paginated, UpdateCrmTriggerInput } from '../../types'; import type { HttpClient } from '../../http'; /** * CRM triggers: fire a webhook when a contact changes. * * A trigger is three questions. `trigger` is which contact event to watch; * `when` narrows it to the fields that moved; `filters` requires the contact * itself to match a set of conditions -- the same DSL segments speak, flat * rather than wrapped. All three have to pass before `action` runs. * * `type: 'time'` triggers are stored and served but not dispatched: nothing * schedules them yet. */ export declare class CrmTriggers { private readonly http; constructor(http: HttpClient); /** * `GET /v1/audience/crm-triggers` -- offset paginated. `search` matches the * trigger name. * * Scope: `crm_triggers:read`. */ list(query?: Partial): Promise>; /** * `GET /v1/audience/crm-triggers/:id`. * * Scope: `crm_triggers:read`. */ get(id: string): Promise; /** * `POST /v1/audience/crm-triggers` -- 201 with the created trigger. * * Only `name` and `action` are required; the rest default to an active * `event` trigger on `edited` with no field narrowing and no filters, which * fires on every change to every contact. * * Scope: `crm_triggers:write`. */ create(input: CreateCrmTriggerInput): Promise; /** * `PATCH /v1/audience/crm-triggers/:id` -- a partial update. `when`, * `filters` and `action` replace their stored value rather than merging. * Pause a trigger with `{ active: false }` instead of deleting it; the * delivery history stays readable either way. * * Scope: `crm_triggers:write`. */ update(id: string, input: UpdateCrmTriggerInput): Promise; /** * `DELETE /v1/audience/crm-triggers/:id` -- 204, no body. * * Scope: `crm_triggers:write`. */ delete(id: string): Promise; /** * `GET /v1/audience/crm-triggers/logs` -- delivery history across every * trigger, or one trigger's with `{ trigger: id }`. Offset paginated, * newest first. * * Logs are written by the dispatcher, never by a caller, and the collection * expires them after 30 days -- there is no way to write or delete one. * Note the path: `logs` is a sibling of `:id`, not a child of it. * * Scope: `crm_triggers:read`. */ logs(query?: Partial): Promise>; }