import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs"; import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs"; import * as core from "../../../../core/index.mjs"; import * as Samsara from "../../../index.mjs"; export declare namespace AlertsClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } export declare class AlertsClient { protected readonly _options: NormalizedClientOptionsWithAuth; constructor(options?: AlertsClient.Options); /** * Get specified Alert Configurations. * * The following trigger types are API enabled and will show up in the results: * Vehicle Speed * Ambient Temperature * Fuel Level (Percentage) * Vehicle DEF Level (Percentage) * Vehicle Battery * Gateway Unplugged * Dashcam Disconnected * Camera Connector Disconnected * Asset starts moving * Inside Geofence * Outside Geofence * Unassigned Driving * Driver HOS Violation * Vehicle Engine Idle * Asset Engine On * Asset Engine Off * Harsh Event * Scheduled Maintenance * Scheduled Maintenance by Odometer * Scheduled Maintenance by Engine Hours * Out of Route * GPS Signal Loss * Cell Signal Loss * Fault Code * Tire Faults * Gateway Disconnected * Panic Button * Tampering Detected * Asset Reading * If vehicle is severely speeding (as defined by your organization) * DVIR Submitted for Asset * Driver Document Submitted * Driver App Sign In * Driver App Sign Out * Geofence Entry * Geofence Exit * Route Stop ETA Alert * Driver Recorded * A safety event occurred with a driver assigned * A safety event occurred * Sudden Fuel Level Rise * Sudden Fuel Level Drop * Scheduled Date And Time * Training Assignment Due Soon * Training Assignment Past Due * Asset assignment past due * * Rate limit: 5 requests/sec (learn more about rate limits here). * * To use this endpoint, select **Read Alerts** under the Alerts 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.GetConfigurationsRequest} request * @param {AlertsClient.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.alerts.getConfigurations() */ getConfigurations(request?: Samsara.GetConfigurationsRequest, requestOptions?: AlertsClient.RequestOptions): core.HttpResponsePromise; private __getConfigurations; /** * Creates an alert configuration. * * Rate limit: 100 requests/min (learn more about rate limits here). * * To use this endpoint, select **Write Alerts** under the Alerts 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.AlertsPostConfigurationsRequestBody} request * @param {AlertsClient.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.alerts.postConfigurations({ * actions: [{ * actionTypeId: 1 * }], * isEnabled: true, * name: "My Harsh Event Alert", * scope: { * all: true * }, * triggers: [{ * triggerTypeId: 1000 * }] * }) */ postConfigurations(request: Samsara.AlertsPostConfigurationsRequestBody, requestOptions?: AlertsClient.RequestOptions): core.HttpResponsePromise; private __postConfigurations; /** * Delete an alert configuration. * * Rate limit: 100 requests/min (learn more about rate limits here). * * To use this endpoint, select **Write Alerts** under the Alerts 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.DeleteConfigurationsRequest} request * @param {AlertsClient.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.alerts.deleteConfigurations({ * id: "id" * }) */ deleteConfigurations(request: Samsara.DeleteConfigurationsRequest, requestOptions?: AlertsClient.RequestOptions): core.HttpResponsePromise; private __deleteConfigurations; /** * Updates an alert configuration. * * Rate limit: 100 requests/min (learn more about rate limits here). * * To use this endpoint, select **Write Alerts** under the Alerts 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.AlertsPatchConfigurationsRequestBody} request * @param {AlertsClient.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.alerts.patchConfigurations({ * id: "e1c5dffc-c7b7-47b0-a778-6a65de638abf" * }) */ patchConfigurations(request: Samsara.AlertsPatchConfigurationsRequestBody, requestOptions?: AlertsClient.RequestOptions): core.HttpResponsePromise; private __patchConfigurations; /** * Get Alert Incidents for specific Alert Configurations over a specified period of time. * * Rate limit: 10 requests/sec (learn more about rate limits here). * * To use this endpoint, select **Read Alerts** under the Alerts 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.GetIncidentsRequest} request * @param {AlertsClient.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.alerts.getIncidents({ * startTime: "startTime" * }) */ getIncidents(request: Samsara.GetIncidentsRequest, requestOptions?: AlertsClient.RequestOptions): core.HttpResponsePromise; private __getIncidents; }