import type { ChannelWebhook, CreateChannelWebhookInput, ListChannelWebhooksQuery, Paginated, UpdateChannelWebhookInput } from '../../types'; import type { HttpClient } from '../../http'; /** * Channel webhooks: where a channel's message traffic is delivered. * * These carry conversation events -- `incoming`, `sent`, `delivered`, `read`, * `failed` -- plus the account-level notices Meta sends about templates, the * phone number and the WABA. Distinct from `crm.webhooks`, which carries * contact changes from the audience module. * * Each webhook subscribes to a set of events; several webhooks may watch the * same channel, and each gets its own copy. * * `meta` on a stored webhook is an audit trail -- who created or last changed * it and from where -- filled in by the service from the caller's identity and * IP. It is never accepted on a write. */ export declare class ChannelWebhooks { private readonly http; constructor(http: HttpClient); /** * `GET /v1/channels/:channelId/webhooks` -- offset paginated. `search` * matches the title and the URL; `active` and `event` are quick filters, * where `event` finds the webhooks subscribed to that one event. * * Scope: `channels:read`. */ list(channelId: string, query?: Partial): Promise>; /** * `GET /v1/channels/:channelId/webhooks/:id`. * * Scope: `channels:read`. */ get(channelId: string, id: string): Promise; /** * `POST /v1/channels/:channelId/webhooks` -- 201 with the created webhook. * * Only `url` and `events` are required; the title defaults to * `'CRM Channel Webhook'` and the webhook starts active. Webhooks created * through the API are recorded with `meta.source: 'API'`. * * Scope: `channels:write`. */ create(channelId: string, input: CreateChannelWebhookInput): Promise; /** * `PATCH /v1/channels/:channelId/webhooks/:id` -- a partial update; at least * one field is required. `events` replaces the subscription list rather than * adding to it. Pause delivery with `{ active: false }`. * * Scope: `channels:write`. */ update(channelId: string, id: string, input: UpdateChannelWebhookInput): Promise; /** * `DELETE /v1/channels/:channelId/webhooks/:id` -- 204. Delivery stops * immediately. * * Scope: `channels:write`. */ delete(channelId: string, id: string): Promise; }