import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"; import * as core from "../../../../core/index.js"; import * as Samsara from "../../../index.js"; export declare namespace WebhooksClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } export declare class WebhooksClient { protected readonly _options: NormalizedClientOptionsWithAuth; constructor(options?: WebhooksClient.Options); /** * List all webhooks belonging to a specific org. * * Rate limit: 5 requests/sec (learn more about rate limits here). * * To use this endpoint, select **Read Webhooks** under the Setup & Administration category when creating or editing an API token. Learn More. * * * **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team. * * @param {Samsara.ListWebhooksRequest} request * @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Samsara.UnauthorizedError} * @throws {@link Samsara.NotFoundError} * @throws {@link Samsara.MethodNotAllowedError} * @throws {@link Samsara.ContentTooLargeError} * @throws {@link Samsara.TooManyRequestsError} * @throws {@link Samsara.InternalServerError} * @throws {@link Samsara.NotImplementedError} * @throws {@link Samsara.BadGatewayError} * @throws {@link Samsara.ServiceUnavailableError} * @throws {@link Samsara.GatewayTimeoutError} * * @example * await client.webhooks.listWebhooks() */ listWebhooks(request?: Samsara.ListWebhooksRequest, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise; private __listWebhooks; /** * Create a webhook * * Rate limit: 100 requests/min (learn more about rate limits here). * * To use this endpoint, select **Write Webhooks** under the Setup & Administration category when creating or editing an API token. Learn More. * * * **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team. * * @param {Samsara.WebhooksPostWebhooksRequestBody} request * @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Samsara.UnauthorizedError} * @throws {@link Samsara.NotFoundError} * @throws {@link Samsara.MethodNotAllowedError} * @throws {@link Samsara.ContentTooLargeError} * @throws {@link Samsara.TooManyRequestsError} * @throws {@link Samsara.InternalServerError} * @throws {@link Samsara.NotImplementedError} * @throws {@link Samsara.BadGatewayError} * @throws {@link Samsara.ServiceUnavailableError} * @throws {@link Samsara.GatewayTimeoutError} * * @example * await client.webhooks.postWebhooks({ * name: "Webhook-123", * url: "https://www.Webhook-123.com/webhook/listener" * }) */ postWebhooks(request: Samsara.WebhooksPostWebhooksRequestBody, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise; private __postWebhooks; /** * Retrieve a webhook with given ID. * * Rate limit: 5 requests/sec (learn more about rate limits here). * * To use this endpoint, select **Read Webhooks** under the Setup & Administration category when creating or editing an API token. Learn More. * * * **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team. * * @param {Samsara.GetWebhookRequest} request * @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Samsara.UnauthorizedError} * @throws {@link Samsara.NotFoundError} * @throws {@link Samsara.MethodNotAllowedError} * @throws {@link Samsara.ContentTooLargeError} * @throws {@link Samsara.TooManyRequestsError} * @throws {@link Samsara.InternalServerError} * @throws {@link Samsara.NotImplementedError} * @throws {@link Samsara.BadGatewayError} * @throws {@link Samsara.ServiceUnavailableError} * @throws {@link Samsara.GatewayTimeoutError} * * @example * await client.webhooks.getWebhook({ * id: "id" * }) */ getWebhook(request: Samsara.GetWebhookRequest, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise; private __getWebhook; /** * Delete a webhook with the given ID. * * Rate limit: 100 requests/min (learn more about rate limits here). * * To use this endpoint, select **Write Webhooks** under the Setup & Administration category when creating or editing an API token. Learn More. * * * **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team. * * @param {Samsara.DeleteWebhookRequest} request * @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Samsara.UnauthorizedError} * @throws {@link Samsara.NotFoundError} * @throws {@link Samsara.MethodNotAllowedError} * @throws {@link Samsara.ContentTooLargeError} * @throws {@link Samsara.TooManyRequestsError} * @throws {@link Samsara.InternalServerError} * @throws {@link Samsara.NotImplementedError} * @throws {@link Samsara.BadGatewayError} * @throws {@link Samsara.ServiceUnavailableError} * @throws {@link Samsara.GatewayTimeoutError} * * @example * await client.webhooks.deleteWebhook({ * id: "id" * }) */ deleteWebhook(request: Samsara.DeleteWebhookRequest, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise; private __deleteWebhook; /** * Update a specific webhook's information. **Note** this implementation of patch uses [the JSON merge patch](https://tools.ietf.org/html/rfc7396) proposed standard. * This means that any fields included in the patch request will _overwrite_ fields which exist on the target resource. * For arrays, this means any array included in the request will _replace_ the array that exists at the specified path, it will not _add_ to the existing array * * Rate limit: 100 requests/min (learn more about rate limits here). * * To use this endpoint, select **Write Webhooks** under the Setup & Administration category when creating or editing an API token. Learn More. * * * **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team. * * @param {Samsara.WebhooksPatchWebhookRequestBody} request * @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Samsara.UnauthorizedError} * @throws {@link Samsara.NotFoundError} * @throws {@link Samsara.MethodNotAllowedError} * @throws {@link Samsara.ContentTooLargeError} * @throws {@link Samsara.TooManyRequestsError} * @throws {@link Samsara.InternalServerError} * @throws {@link Samsara.NotImplementedError} * @throws {@link Samsara.BadGatewayError} * @throws {@link Samsara.ServiceUnavailableError} * @throws {@link Samsara.GatewayTimeoutError} * * @example * await client.webhooks.patchWebhook({ * id: "id" * }) */ patchWebhook(request: Samsara.WebhooksPatchWebhookRequestBody, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise; private __patchWebhook; }