import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs"; import * as core from "../../../../core/index.mjs"; import * as Pinnacle from "../../../index.mjs"; export declare namespace Webhooks { interface Options extends BaseClientOptions { } interface RequestOptions extends BaseRequestOptions { } } export declare class Webhooks { protected readonly _options: Webhooks.Options; constructor(_options: Webhooks.Options); /** * Retrieve all webhook that are set up to receive events for specific URLs or phone numbers. * * @param {Pinnacle.GetWebhookParams} request * @param {Webhooks.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Pinnacle.BadRequestError} * @throws {@link Pinnacle.UnauthorizedError} * @throws {@link Pinnacle.ForbiddenError} * @throws {@link Pinnacle.InternalServerError} * * @example * await client.webhooks.get({ * identifiers: ["https://www.pinnacle.sh/payment", "+14155678901", "https://www.pinnacle.sh/sms-callback", "+14153456659"] * }) */ get(request: Pinnacle.GetWebhookParams, requestOptions?: Webhooks.RequestOptions): core.HttpResponsePromise; private __get; /** * List all webhooks with optional filtering and pagination. Results are sorted by creation date, newest first. * * @param {Pinnacle.ListWebhooksParams} request * @param {Webhooks.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Pinnacle.BadRequestError} * @throws {@link Pinnacle.UnauthorizedError} * @throws {@link Pinnacle.InternalServerError} * * @example * await client.webhooks.list() */ list(request?: Pinnacle.ListWebhooksParams, requestOptions?: Webhooks.RequestOptions): core.HttpResponsePromise; private __list; /** * Attach a webhook to one or more senders (phone numbers or RCS agent IDs) to receive real-time event notifications.
* * You can attach an existing webhook by providing its ID, or create a new webhook by specifying a name and URL. Supports bulk operations with up to 50 senders per request.
* * Subscriptions are additive — attaching new senders does not remove existing ones. Re-attaching the same sender updates the event type filter without creating duplicates.
* * **Custom headers** may be provided in either case via the optional `headers` field. When attaching a new webhook, the headers are stored on the webhook and sent on every delivery. When attaching an existing `webhookId`, supplying `headers` **overwrites** the stored headers on that webhook — omit the field to leave them unchanged, or pass an empty object `{}` to clear them. The reserved `PINNACLE-SIGNING-SECRET` header is always set by Pinnacle and cannot be overridden. * * @param {Pinnacle.AttachWebhookParams} request * @param {Webhooks.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Pinnacle.BadRequestError} * @throws {@link Pinnacle.UnauthorizedError} * @throws {@link Pinnacle.NotFoundError} * @throws {@link Pinnacle.InternalServerError} * * @example * await client.webhooks.attach({ * senders: ["+14155551234", "agent_abc123"] * }) */ attach(request: Pinnacle.AttachWebhookParams, requestOptions?: Webhooks.RequestOptions): core.HttpResponsePromise; private __attach; /** * Detach a webhook from one or more senders (phone numbers or RCS agent IDs) to stop receiving event notifications.
* * The webhook itself is not deleted and remains available for use with other senders. Works regardless of webhook status. Supports bulk operations with up to 50 senders per request. * * @param {Pinnacle.DetachWebhookParams} request * @param {Webhooks.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Pinnacle.BadRequestError} * @throws {@link Pinnacle.UnauthorizedError} * @throws {@link Pinnacle.NotFoundError} * @throws {@link Pinnacle.InternalServerError} * * @example * await client.webhooks.detach({ * webhookId: "webhookId", * senders: ["+14155551234", "agent_abc123"] * }) */ detach(request: Pinnacle.DetachWebhookParams, requestOptions?: Webhooks.RequestOptions): core.HttpResponsePromise; private __detach; protected _getCustomAuthorizationHeaders(): Promise>; }