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 DriverVehicleAssignmentsClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } export declare class DriverVehicleAssignmentsClient { protected readonly _options: NormalizedClientOptionsWithAuth; constructor(options?: DriverVehicleAssignmentsClient.Options); /** * Get all driver-vehicle assignments for the requested drivers or vehicles in the requested time range. To fetch driver-vehicle assignments out of the vehicle trips' time ranges, assignmentType needs to be specified. Note: this endpoint replaces past endpoints to fetch assignments by driver or by vehicle. Visit [this migration guide](https://developers.samsara.com/docs/migrating-from-driver-vehicle-assignment-or-vehicle-driver-assignment-endpoints) for more information. * * Rate limit: 5 requests/sec (learn more about rate limits here). * * To use this endpoint, select **Read Assignments** under the Assignments 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.GetDriverVehicleAssignmentsRequest} request * @param {DriverVehicleAssignmentsClient.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.driverVehicleAssignments.getDriverVehicleAssignments({ * filterBy: "drivers" * }) */ getDriverVehicleAssignments(request: Samsara.GetDriverVehicleAssignmentsRequest, requestOptions?: DriverVehicleAssignmentsClient.RequestOptions): core.HttpResponsePromise; private __getDriverVehicleAssignments; /** * Assign vehicle drive-time to a driver via API. For a step-by-step instruction on how to leverage this endpoint, see [this guide](https://developers.samsara.com/docs/creating-driver-vehicle-assignments) * * Rate limit: 100 requests/min (learn more about rate limits here). * * To use this endpoint, select **Write Assignments** under the Assignments 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.DriverVehicleAssignmentsV2CreateDriverVehicleAssignmentRequestBody} request * @param {DriverVehicleAssignmentsClient.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.driverVehicleAssignments.createDriverVehicleAssignment({ * driverId: "494123", * vehicleId: "281474978683353" * }) */ createDriverVehicleAssignment(request: Samsara.DriverVehicleAssignmentsV2CreateDriverVehicleAssignmentRequestBody, requestOptions?: DriverVehicleAssignmentsClient.RequestOptions): core.HttpResponsePromise; private __createDriverVehicleAssignment; /** * Delete driver assignments that were created using the `POST fleet/driver-vehicle-assignments` endpoint for the requested vehicle in the requested time range. * * Rate limit: 100 requests/min (learn more about rate limits here). * * To use this endpoint, select **Write Assignments** under the Assignments 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.DriverVehicleAssignmentsV2DeleteDriverVehicleAssignmentsRequestBody} request * @param {DriverVehicleAssignmentsClient.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.driverVehicleAssignments.deleteDriverVehicleAssignments({ * vehicleId: "281474978683353" * }) */ deleteDriverVehicleAssignments(request: Samsara.DriverVehicleAssignmentsV2DeleteDriverVehicleAssignmentsRequestBody, requestOptions?: DriverVehicleAssignmentsClient.RequestOptions): core.HttpResponsePromise; private __deleteDriverVehicleAssignments; /** * Update driver assignments that were created using the `POST fleet/driver-vehicle-assignments`. Vehicle Id, Driver Id, and Start Time must match an existing assignment. * * Rate limit: 100 requests/min (learn more about rate limits here). * * To use this endpoint, select **Write Assignments** under the Assignments 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.DriverVehicleAssignmentsV2UpdateDriverVehicleAssignmentRequestBody} request * @param {DriverVehicleAssignmentsClient.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.driverVehicleAssignments.updateDriverVehicleAssignment({ * driverId: "494123", * startTime: "2019-06-13T19:08:25Z", * vehicleId: "281474978683353" * }) */ updateDriverVehicleAssignment(request: Samsara.DriverVehicleAssignmentsV2UpdateDriverVehicleAssignmentRequestBody, requestOptions?: DriverVehicleAssignmentsClient.RequestOptions): core.HttpResponsePromise; private __updateDriverVehicleAssignment; }