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 HoursOfServiceClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } export declare class HoursOfServiceClient { protected readonly _options: NormalizedClientOptionsWithAuth; constructor(options?: HoursOfServiceClient.Options); /** * Get the current HOS status for all drivers. Note that this includes inactive as well as active drivers. The legacy version of this endpoint can be found at [samsara.com/api-legacy](https://www.samsara.com/api-legacy#operation/getFleetHosLogsSummary). * * **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 **Read ELD Compliance Settings (US)** under the Compliance category when creating or editing an API token. Learn More. * * @param {Samsara.GetHosClocksRequest} request * @param {HoursOfServiceClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.hoursOfService.getHosClocks() */ getHosClocks(request?: Samsara.GetHosClocksRequest, requestOptions?: HoursOfServiceClient.RequestOptions): core.HttpResponsePromise; private __getHosClocks; /** * Get summarized daily Hours of Service charts for the specified drivers. * * The time range for a log is defined by the `driver`'s `eldDayStartHour`. This value is configurable per driver. * * The `startDate` and `endDate` parameters indicate the date range you'd like to retrieve daily logs for. A daily log will be returned if its `startTime` is on any of the days within in this date range (inclusive of `startDate` and `endDate`). * * **Note:** If data is still being uploaded from the Samsara Driver App, it may not be completely reflected in the response from this endpoint. The best practice is to wait a couple of days before querying this endpoint to make sure that all data from the Samsara Driver App has been uploaded. * * If you are using the legacy version of this endpoint and looking for its documentation, you can find it [here](https://www.samsara.com/api-legacy#operation/getFleetDriversHosDailyLogs). * * Rate limit: 5 requests/sec (learn more about rate limits here). * * To use this endpoint, select **Read ELD Compliance Settings (US)** under the Compliance 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.GetHosDailyLogsRequest} request * @param {HoursOfServiceClient.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.hoursOfService.getHosDailyLogs() */ getHosDailyLogs(request?: Samsara.GetHosDailyLogsRequest, requestOptions?: HoursOfServiceClient.RequestOptions): core.HttpResponsePromise; private __getHosDailyLogs; /** * Returns HOS logs between a given `startTime` and `endTime`. The logs can be further filtered using tags or by providing a list of driver IDs (including external IDs). The legacy version of this endpoint can be found at [samsara.com/api-legacy](https://www.samsara.com/api-legacy#operation/getFleetHosLogs). * * **Note:** If data is still being uploaded from the Samsara Driver App, it may not be completely reflected in the response from this endpoint. The best practice is to wait a couple of days before querying this endpoint to make sure that all data from the Samsara Driver App has been uploaded. * * Rate limit: 5 requests/sec (learn more about rate limits here). * * **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 **Read ELD Compliance Settings (US)** under the Compliance category when creating or editing an API token. Learn More. * * @param {Samsara.GetHosLogsRequest} request * @param {HoursOfServiceClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.hoursOfService.getHosLogs() */ getHosLogs(request?: Samsara.GetHosLogsRequest, requestOptions?: HoursOfServiceClient.RequestOptions): core.HttpResponsePromise; private __getHosLogs; /** * Get active Hours of Service violations for the specified drivers. * * The day object time range for a violation is defined by the `driver`'s `eldDayStartHour`. This value is configurable per driver. * * The `startTime` and `endTime` parameters indicate the datetime range you'd like to retrieve violations for. A violation will be returned if its `violationStartTime` falls within this datetime range (inclusive of `startTime` and `endTime`) * * **Note:** The following are all the violation types with a short explanation about what each of them means: `californiaMealbreakMissed` (Missed California Meal Break), `cycleHoursOn` (Cycle Limit), `cycleOffHoursAfterOnDutyHours` (Cycle 2 Limit), `dailyDrivingHours` (Daily Driving Limit), `dailyOffDutyDeferralAddToDay2Consecutive` (Daily Off-Duty Deferral: Add To Day2 Consecutive), `dailyOffDutyDeferralNotPartMandatory` (Daily Off-Duty Deferral: Not Part Of Mandatory), `dailyOffDutyDeferralTwoDayDrivingLimit` (Daily Off-Duty Deferral: 2 Day Driving Limit), `dailyOffDutyDeferralTwoDayOffDuty` (Daily Off-Duty Deferral: 2 Day Off Duty), `dailyOffDutyNonResetHours` (Daily Off-Duty Time: Non-Reset), `dailyOffDutyTotalHours` (Daily Off-Duty Time), `dailyOnDutyHours` (Daily On-Duty Limit), `mandatory24HoursOffDuty` (24 Hours of Off Duty required), `restbreakMissed` (Missed Rest Break), `shiftDrivingHours` (Shift Driving Limit), `shiftHours` (Shift Duty Limit), `shiftOnDutyHours` (Shift On-Duty Limit), `unsubmittedLogs` (Missing Driver Certification) * * Rate limit: 5 requests/sec (learn more about rate limits here). * * To use this endpoint, select **Read ELD Compliance Settings (US)** under the Compliance 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.GetHosViolationsRequest} request * @param {HoursOfServiceClient.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.hoursOfService.getHosViolations() */ getHosViolations(request?: Samsara.GetHosViolationsRequest, requestOptions?: HoursOfServiceClient.RequestOptions): core.HttpResponsePromise; private __getHosViolations; /** * > 🚧 This endpoint is still on our legacy API. * * Set an individual driver’s current duty status to 'On Duty' or 'Off Duty'. * * To ensure compliance with the ELD Mandate, only authenticated drivers can make direct duty status changes on their own logbook. Any system external to the Samsara Driver App using this endpoint to trigger duty status changes must ensure that such changes are only triggered directly by the driver in question and that the driver has been properly authenticated. This endpoint should not be used to algorithmically trigger duty status changes nor should it be used by personnel besides the driver to trigger duty status changes on the driver’s behalf. Carriers and their drivers are ultimately responsible for maintaining accurate logs and should confirm that their use of the endpoint is compliant with the ELD Mandate. * * **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 ELD Hours of Service (US)** under the Compliance category when creating or editing an API token. Learn More. * * @param {Samsara.InlineObject1} request * @param {HoursOfServiceClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.hoursOfService.setCurrentDutyStatus({ * driver_id: 1000000, * duty_status: "ON_DUTY" * }) */ setCurrentDutyStatus(request: Samsara.InlineObject1, requestOptions?: HoursOfServiceClient.RequestOptions): core.HttpResponsePromise; private __setCurrentDutyStatus; /** * > 🚧 This endpoint is still on our legacy API. * * Get the HOS (hours of service) signin and signout logs for the specified driver. The response includes 4 fields that are now deprecated. * * **Note:** If data is still being uploaded from the Samsara Driver App, it may not be completely reflected in the response from this endpoint. The best practice is to wait a couple of days before querying this endpoint to make sure that all data from the Samsara Driver App has been uploaded. * * **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 **Read ELD Hours of Service (US)** under the Compliance category when creating or editing an API token. Learn More. * * @param {Samsara.V1GetFleetHosAuthenticationLogsRequest} request * @param {HoursOfServiceClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.hoursOfService.v1GetFleetHosAuthenticationLogs({ * driverId: 1000000, * startMs: 1000000, * endMs: 1000000 * }) */ v1GetFleetHosAuthenticationLogs(request: Samsara.V1GetFleetHosAuthenticationLogsRequest, requestOptions?: HoursOfServiceClient.RequestOptions): core.HttpResponsePromise; private __v1GetFleetHosAuthenticationLogs; }