import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient"; import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient"; import * as core from "../../../../core"; import * as Extend from "../../../index"; export declare namespace WebhookSubscriptionsClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } export declare class WebhookSubscriptionsClient { protected readonly _options: NormalizedClientOptionsWithAuth; constructor(options: WebhookSubscriptionsClient.Options); /** * List webhook subscriptions. You can filter by `webhookEndpointId` to see all subscriptions for a given endpoint, or by `resourceId` to see all subscriptions for a given resource. * * @param {Extend.WebhookSubscriptionsListRequest} request * @param {WebhookSubscriptionsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Extend.BadRequestError} * @throws {@link Extend.UnauthorizedError} * @throws {@link Extend.PaymentRequiredError} * @throws {@link Extend.ForbiddenError} * @throws {@link Extend.NotFoundError} * @throws {@link Extend.UnprocessableEntityError} * @throws {@link Extend.TooManyRequestsError} * @throws {@link Extend.InternalServerError} * * @example * await client.webhookSubscriptions.list({ * nextPageToken: "xK9mLPqRtN3vS8wF5hB2cQ==:zWvUxYjM4nKpL7aDgE9HbTcR2mAyX3/Q+CNkfBSw1dZ=" * }) */ list(request?: Extend.WebhookSubscriptionsListRequest, requestOptions?: WebhookSubscriptionsClient.RequestOptions): core.HttpResponsePromise; private __list; /** * Create a resource-scoped webhook subscription on an existing webhook endpoint. * * Subscriptions let you receive events for a specific resource (e.g., a single extractor or workflow) rather than all resources of that type. The `enabledEvents` must be valid for the given `resourceType` and the endpoint's `apiVersion`. * * If a subscription already exists for the same endpoint and resource, it will be updated with the new `enabledEvents` instead of creating a duplicate. * * @param {Extend.WebhookSubscriptionsCreateRequest} request * @param {WebhookSubscriptionsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Extend.BadRequestError} * @throws {@link Extend.UnauthorizedError} * @throws {@link Extend.PaymentRequiredError} * @throws {@link Extend.ForbiddenError} * @throws {@link Extend.NotFoundError} * @throws {@link Extend.UnprocessableEntityError} * @throws {@link Extend.TooManyRequestsError} * @throws {@link Extend.InternalServerError} * * @example * await client.webhookSubscriptions.create({ * webhookEndpointId: "wh_Xj8mK2pL9nR4vT7qY5wZ", * resourceType: "extractor", * resourceId: "ex_Xj8mK2pL9nR4vT7qY5wZ", * enabledEvents: ["extract_run.processed", "extract_run.failed"] * }) */ create(request: Extend.WebhookSubscriptionsCreateRequest, requestOptions?: WebhookSubscriptionsClient.RequestOptions): core.HttpResponsePromise; private __create; /** * Retrieve a webhook subscription by ID. * * @param {string} id - The ID of the webhook subscription. * * Example: `"whes_Xj8mK2pL9nR4vT7qY5wZ"` * @param {Extend.WebhookSubscriptionsRetrieveRequest} request * @param {WebhookSubscriptionsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Extend.BadRequestError} * @throws {@link Extend.UnauthorizedError} * @throws {@link Extend.PaymentRequiredError} * @throws {@link Extend.ForbiddenError} * @throws {@link Extend.NotFoundError} * @throws {@link Extend.UnprocessableEntityError} * @throws {@link Extend.TooManyRequestsError} * @throws {@link Extend.InternalServerError} * * @example * await client.webhookSubscriptions.retrieve("webhook_subscription_id_here") */ retrieve(id: string, request?: Extend.WebhookSubscriptionsRetrieveRequest, requestOptions?: WebhookSubscriptionsClient.RequestOptions): core.HttpResponsePromise; private __retrieve; /** * Update the enabled events on a webhook subscription. * * @param {string} id - The ID of the webhook subscription to update. * * Example: `"whes_Xj8mK2pL9nR4vT7qY5wZ"` * @param {Extend.WebhookSubscriptionsUpdateRequest} request * @param {WebhookSubscriptionsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Extend.BadRequestError} * @throws {@link Extend.UnauthorizedError} * @throws {@link Extend.PaymentRequiredError} * @throws {@link Extend.ForbiddenError} * @throws {@link Extend.NotFoundError} * @throws {@link Extend.UnprocessableEntityError} * @throws {@link Extend.TooManyRequestsError} * @throws {@link Extend.InternalServerError} * * @example * await client.webhookSubscriptions.update("webhook_subscription_id_here", { * enabledEvents: ["extract_run.processed"] * }) */ update(id: string, request: Extend.WebhookSubscriptionsUpdateRequest, requestOptions?: WebhookSubscriptionsClient.RequestOptions): core.HttpResponsePromise; private __update; /** * Delete a webhook subscription. This operation is permanent and cannot be undone. * * @param {string} id - The ID of the webhook subscription to delete. * * Example: `"whes_Xj8mK2pL9nR4vT7qY5wZ"` * @param {Extend.WebhookSubscriptionsDeleteRequest} request * @param {WebhookSubscriptionsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Extend.BadRequestError} * @throws {@link Extend.UnauthorizedError} * @throws {@link Extend.PaymentRequiredError} * @throws {@link Extend.ForbiddenError} * @throws {@link Extend.NotFoundError} * @throws {@link Extend.UnprocessableEntityError} * @throws {@link Extend.TooManyRequestsError} * @throws {@link Extend.InternalServerError} * * @example * await client.webhookSubscriptions.delete("webhook_subscription_id_here") */ delete(id: string, request?: Extend.WebhookSubscriptionsDeleteRequest, requestOptions?: WebhookSubscriptionsClient.RequestOptions): core.HttpResponsePromise; private __delete; }