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 MaintenanceClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } export declare class MaintenanceClient { protected readonly _options: NormalizedClientOptionsWithAuth; constructor(options?: MaintenanceClient.Options); /** * Get DVIR defect types. * * Rate limit: 5 requests/sec (learn more about rate limits here). * * To use this endpoint, select **Read Defect Types** under the Maintenance 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.GetDefectTypesRequest} request * @param {MaintenanceClient.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.maintenance.getDefectTypes() */ getDefectTypes(request?: Samsara.GetDefectTypesRequest, requestOptions?: MaintenanceClient.RequestOptions): core.HttpResponsePromise; private __getDefectTypes; /** * Stream DVIR defects. * * Rate limit: 5 requests/sec (learn more about rate limits here). * * To use this endpoint, select **Read Defects** under the Maintenance 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.StreamDefectsRequest} request * @param {MaintenanceClient.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.maintenance.streamDefects({ * startTime: "startTime" * }) */ streamDefects(request: Samsara.StreamDefectsRequest, requestOptions?: MaintenanceClient.RequestOptions): core.HttpResponsePromise; private __streamDefects; /** * Get a single DVIR defect by ID. * * Rate limit: 10 requests/sec (learn more about rate limits here). * * To use this endpoint, select **Read Defects** under the Maintenance 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.GetDefectRequest} request * @param {MaintenanceClient.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.maintenance.getDefect({ * id: "id" * }) */ getDefect(request: Samsara.GetDefectRequest, requestOptions?: MaintenanceClient.RequestOptions): core.HttpResponsePromise; private __getDefect; /** * Returns a history/feed of changed DVIRs by updatedAtTime between startTime and endTime parameters. In case of missing `endTime` parameter it will return a never ending stream of data. * * Rate limit: 5 requests/sec (learn more about rate limits here). * * To use this endpoint, select **Read DVIRs** under the Maintenance 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.GetDvirsRequest} request * @param {MaintenanceClient.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.maintenance.getDvirs({ * startTime: "startTime" * }) */ getDvirs(request: Samsara.GetDvirsRequest, requestOptions?: MaintenanceClient.RequestOptions): core.HttpResponsePromise; private __getDvirs; /** * Get a single DVIR by ID. * * Rate limit: 10 requests/sec (learn more about rate limits here). * * To use this endpoint, select **Read DVIRs** under the Maintenance 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.GetDvirRequest} request * @param {MaintenanceClient.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.maintenance.getDvir({ * id: "id" * }) */ getDvir(request: Samsara.GetDvirRequest, requestOptions?: MaintenanceClient.RequestOptions): core.HttpResponsePromise; private __getDvir; /** * Updates a given defect. Can be used to resolve a defect by marking its `isResolved` field to `true`. * * **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 Defects** under the Maintenance category when creating or editing an API token. Learn More. * * @param {Samsara.DefectPatch} request * @param {MaintenanceClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.maintenance.updateDvirDefect({ * id: "id" * }) */ updateDvirDefect(request: Samsara.DefectPatch, requestOptions?: MaintenanceClient.RequestOptions): core.HttpResponsePromise; private __updateDvirDefect; /** * Creates a new mechanic DVIR in the organization. * * **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 DVIRs** under the Maintenance category when creating or editing an API token. Learn More. * * @param {Samsara.CreateDvirRequest} request * @param {MaintenanceClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.maintenance.createDvir({ * authorId: "11", * safetyStatus: "safe", * type: "mechanic" * }) */ createDvir(request: Samsara.CreateDvirRequest, requestOptions?: MaintenanceClient.RequestOptions): core.HttpResponsePromise; private __createDvir; /** * Resolves a given DVIR by marking its `isResolved` field to `true`. * * **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 DVIRs** under the Maintenance category when creating or editing an API token. Learn More. * * @param {Samsara.UpdateDvirRequest} request * @param {MaintenanceClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.maintenance.updateDvir({ * id: "id", * authorId: "11", * isResolved: true * }) */ updateDvir(request: Samsara.UpdateDvirRequest, requestOptions?: MaintenanceClient.RequestOptions): core.HttpResponsePromise; private __updateDvir; /** * > 🚧 This endpoint is still on our legacy API. * * Get list of the vehicles with any engine faults or check light data. * * **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 DVIRs** under the Maintenance category when creating or editing an API token. Learn More. * * @param {MaintenanceClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.maintenance.v1GetFleetMaintenanceList() */ v1GetFleetMaintenanceList(requestOptions?: MaintenanceClient.RequestOptions): core.HttpResponsePromise; private __v1GetFleetMaintenanceList; }