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 TrailersClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } export declare class TrailersClient { protected readonly _options: NormalizedClientOptionsWithAuth; constructor(options?: TrailersClient.Options); /** * List all trailers. * * Rate limit: 5 requests/sec (learn more about rate limits here). * * To use this endpoint, select **Read Trailers** under the Trailers 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.ListTrailersRequest} request * @param {TrailersClient.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.trailers.listTrailers() */ listTrailers(request?: Samsara.ListTrailersRequest, requestOptions?: TrailersClient.RequestOptions): core.HttpResponsePromise; private __listTrailers; /** * Creates a new trailer asset. * * Rate limit: 100 requests/min (learn more about rate limits here). * * To use this endpoint, select **Write Trailers** under the Trailers 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.TrailersCreateTrailerRequestBody} request * @param {TrailersClient.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.trailers.createTrailer({ * name: "Trailer-123" * }) */ createTrailer(request: Samsara.TrailersCreateTrailerRequestBody, requestOptions?: TrailersClient.RequestOptions): core.HttpResponsePromise; private __createTrailer; /** * Returns the last known stats of all trailers at the given `time`. If no `time` is specified, the current time is used. * * Rate limit: 25 requests/sec (learn more about rate limits here). * * To use this endpoint, select **Read Trailer Statistics** under the Trailers 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.GetTrailerStatsSnapshotRequest} request * @param {TrailersClient.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.trailers.getTrailerStatsSnapshot({ * types: "types" * }) */ getTrailerStatsSnapshot(request: Samsara.GetTrailerStatsSnapshotRequest, requestOptions?: TrailersClient.RequestOptions): core.HttpResponsePromise; private __getTrailerStatsSnapshot; /** * Follow a feed of trailer stats. * * The first call to this endpoint will provide the most recent stats for each trailer and an `endCursor`. * * Providing the `endCursor` value to the `after` query parameter will fetch all updates since the previous API call. * * If `hasNextPage` is false, no new data is immediately available. Please wait a minimum of 5 seconds before making a subsequent request. * * Each page includes every trailer in the current device page, even when a requested stat type has no datapoints. For example, a trailer without recent GPS data is returned with an empty `gps` array rather than being omitted from the response. An empty stat array typically indicates the gateway has not reported that stat recently due to an unhealthy or low-battery gateway, or because the trailer has been inactive. * * Rate limit: 25 requests/sec (learn more about rate limits here). * * To use this endpoint, select **Read Trailer Statistics** under the Trailers 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.GetTrailerStatsFeedRequest} request * @param {TrailersClient.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.trailers.getTrailerStatsFeed({ * types: "types" * }) */ getTrailerStatsFeed(request: Samsara.GetTrailerStatsFeedRequest, requestOptions?: TrailersClient.RequestOptions): core.HttpResponsePromise; private __getTrailerStatsFeed; /** * Returns trailer stats during the given time range for all trailers. This can be optionally filtered by tags or specific trailer IDs. * * Rate limit: 10 requests/sec (learn more about rate limits here). * * To use this endpoint, select **Read Trailer Statistics** under the Trailers 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.GetTrailerStatsHistoryRequest} request * @param {TrailersClient.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.trailers.getTrailerStatsHistory({ * startTime: "startTime", * endTime: "endTime", * types: "types" * }) */ getTrailerStatsHistory(request: Samsara.GetTrailerStatsHistoryRequest, requestOptions?: TrailersClient.RequestOptions): core.HttpResponsePromise; private __getTrailerStatsHistory; /** * Retrieve a trailer with given ID. * * Rate limit: 5 requests/sec (learn more about rate limits here). * * To use this endpoint, select **Read Trailers** under the Trailers 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.GetTrailerRequest} request * @param {TrailersClient.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.trailers.getTrailer({ * id: "id" * }) */ getTrailer(request: Samsara.GetTrailerRequest, requestOptions?: TrailersClient.RequestOptions): core.HttpResponsePromise; private __getTrailer; /** * Delete a trailer with the given ID. * * Rate limit: 100 requests/min (learn more about rate limits here). * * To use this endpoint, select **Write Trailers** under the Trailers 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.DeleteTrailerRequest} request * @param {TrailersClient.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.trailers.deleteTrailer({ * id: "id" * }) */ deleteTrailer(request: Samsara.DeleteTrailerRequest, requestOptions?: TrailersClient.RequestOptions): core.HttpResponsePromise; private __deleteTrailer; /** * Update a trailer. **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 Trailers** under the Trailers 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.TrailersUpdateTrailerRequestBody} request * @param {TrailersClient.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.trailers.updateTrailer({ * id: "id" * }) */ updateTrailer(request: Samsara.TrailersUpdateTrailerRequestBody, requestOptions?: TrailersClient.RequestOptions): core.HttpResponsePromise; private __updateTrailer; }