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 RoutesClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } export declare class RoutesClient { protected readonly _options: NormalizedClientOptionsWithAuth; constructor(options?: RoutesClient.Options); /** * Returns multiple routes. The legacy version of this endpoint can be found at [samsara.com/api-legacy](https://www.samsara.com/api-legacy#operation/fetchAllDispatchRoutes). * * Rate limit: 5 requests/sec (learn more about rate limits here). * * To use this endpoint, select **Read Routes** under the Driver Workflow 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.FetchRoutesRequest} request * @param {RoutesClient.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.routes.fetchRoutes({ * startTime: "startTime", * endTime: "endTime" * }) */ fetchRoutes(request: Samsara.FetchRoutesRequest, requestOptions?: RoutesClient.RequestOptions): core.HttpResponsePromise; private __fetchRoutes; /** * Create a route. The legacy version of this endpoint can be found at [samsara.com/api-legacy](https://www.samsara.com/api-legacy#operation/createDispatchRoute). * * Rate limit: 100 requests/min (learn more about rate limits here). * * To use this endpoint, select **Write Routes** under the Driver Workflow 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.RoutesCreateRouteRequestBody} request * @param {RoutesClient.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.routes.createRoute({ * name: "Bid 123", * stops: [{}] * }) */ createRoute(request: Samsara.RoutesCreateRouteRequestBody, requestOptions?: RoutesClient.RequestOptions): core.HttpResponsePromise; private __createRoute; /** * Subscribes to a feed of immutable, append-only updates for routes. The initial request to this feed endpoint returns a cursor, which can be used on the next request to fetch updated routes that have had state changes since that request. * * The legacy version of this endpoint can be found at [samsara.com/api-legacy](https://www.samsara.com/api-legacy#operation/fetchAllRouteJobUpdates). * * Rate limit: 5 requests/sec (learn more about rate limits here). * * To use this endpoint, select **Read Routes** under the Driver Workflow 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.GetRoutesFeedRequest} request * @param {RoutesClient.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.routes.getRoutesFeed() */ getRoutesFeed(request?: Samsara.GetRoutesFeedRequest, requestOptions?: RoutesClient.RequestOptions): core.HttpResponsePromise; private __getRoutesFeed; /** * Returns a single route. The legacy version of this endpoint can be found at [samsara.com/api-legacy](https://www.samsara.com/api-legacy#operation/getDispatchRouteById). * * Rate limit: 25 requests/sec (learn more about rate limits here). * * To use this endpoint, select **Read Routes** under the Driver Workflow 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.FetchRouteRequest} request * @param {RoutesClient.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.routes.fetchRoute({ * id: "id" * }) */ fetchRoute(request: Samsara.FetchRouteRequest, requestOptions?: RoutesClient.RequestOptions): core.HttpResponsePromise; private __fetchRoute; /** * Delete a dispatch route and its associated stops. * * Rate limit: 100 requests/min (learn more about rate limits here). * * To use this endpoint, select **Write Routes** under the Driver Workflow 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.DeleteRouteRequest} request * @param {RoutesClient.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.routes.deleteRoute({ * id: "id" * }) */ deleteRoute(request: Samsara.DeleteRouteRequest, requestOptions?: RoutesClient.RequestOptions): core.HttpResponsePromise; private __deleteRoute; /** * Update a route. **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. * * The legacy version of this endpoint (which uses PUT instead of PATCH) can be found at [samsara.com/api-legacy](https://www.samsara.com/api-legacy#operation/updateDispatchRouteById). * * Rate limit: 100 requests/min (learn more about rate limits here). * * To use this endpoint, select **Write Routes** under the Driver Workflow 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.RoutesPatchRouteRequestBody} request * @param {RoutesClient.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.routes.patchRoute({ * id: "id" * }) */ patchRoute(request: Samsara.RoutesPatchRouteRequestBody, requestOptions?: RoutesClient.RequestOptions): core.HttpResponsePromise; private __patchRoute; /** * Retrieve routes for a specific plan. * * Rate limit: 10 requests/sec (learn more about rate limits here). * * To use this endpoint, select **Read Routes** under the Driver Workflow 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.ListHubPlanRoutesRequest} request * @param {RoutesClient.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.routes.listHubPlanRoutes({ * planId: "planId" * }) */ listHubPlanRoutes(request: Samsara.ListHubPlanRoutesRequest, requestOptions?: RoutesClient.RequestOptions): core.HttpResponsePromise; private __listHubPlanRoutes; /** * > 🚧 This endpoint is still on our legacy API. * * Delete a dispatch route and its associated jobs. * * **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. * * To use this endpoint, select **Write Routes** under the Driver Workflow category when creating or editing an API token. Learn More. * * @param {Samsara.InlineObject} request * @param {RoutesClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.routes.v1DeleteDispatchRouteById({ * route_id_or_external_id: "route_id_or_external_id" * }) */ v1DeleteDispatchRouteById(request: Samsara.InlineObject, requestOptions?: RoutesClient.RequestOptions): core.HttpResponsePromise; private __v1DeleteDispatchRouteById; }