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 DocumentsClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } export declare class DocumentsClient { protected readonly _options: NormalizedClientOptionsWithAuth; constructor(options?: DocumentsClient.Options); /** * Returns a list of the organization document types. The legacy version of this endpoint can be found at [samsara.com/api-legacy](https://www.samsara.com/api-legacy#operation/getDriverDocumentTypesByOrgId). * * Rate limit: 5 requests/sec (learn more about rate limits here). * * To use this endpoint, select **Read Documents** 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.GetDocumentTypesRequest} request * @param {DocumentsClient.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.documents.getDocumentTypes() */ getDocumentTypes(request?: Samsara.GetDocumentTypesRequest, requestOptions?: DocumentsClient.RequestOptions): core.HttpResponsePromise; private __getDocumentTypes; /** * Get all documents for the given time range. The legacy version of this endpoint can be found at [samsara.com/api-legacy](https://www.samsara.com/api-legacy#operation/getDriverDocumentsByOrgId). * * Rate limit: 5 requests/sec (learn more about rate limits here). * * To use this endpoint, select **Read Documents** 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.GetDocumentsRequest} request * @param {DocumentsClient.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.documents.getDocuments({ * startTime: "startTime", * endTime: "endTime" * }) */ getDocuments(request: Samsara.GetDocumentsRequest, requestOptions?: DocumentsClient.RequestOptions): core.HttpResponsePromise; private __getDocuments; /** * Creates a single document. The legacy version of this endpoint can be found at [samsara.com/api-legacy](https://www.samsara.com/api-legacy#operation/createDriverDocument). * * Rate limit: 100 requests/min (learn more about rate limits here). * * To use this endpoint, select **Write Documents** 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.DocumentsPostDocumentRequestBody} request * @param {DocumentsClient.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.documents.postDocument({ * documentTypeId: "9814a1fa-f0c6-408b-bf85-51dc3bc71ac7", * driverId: "45646" * }) */ postDocument(request: Samsara.DocumentsPostDocumentRequestBody, requestOptions?: DocumentsClient.RequestOptions): core.HttpResponsePromise; private __postDocument; /** * Request creation of a document PDF. * * **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 Documents** under the Driver Workflow category when creating or editing an API token. Learn More. * * @param {Samsara.DocumentPdfGenerationRequest} request * @param {DocumentsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.documents.generateDocumentPdf({ * documentId: "6c8c0c01-206a-41a4-9d21-15b9978d04cb" * }) */ generateDocumentPdf(request: Samsara.DocumentPdfGenerationRequest, requestOptions?: DocumentsClient.RequestOptions): core.HttpResponsePromise; private __generateDocumentPdf; /** * Returns generation job status and download URL for a PDF. * * **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 Documents** under the Driver Workflow category when creating or editing an API token. Learn More. * * @param {Samsara.GetDocumentPdfRequest} request * @param {DocumentsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.documents.getDocumentPdf({ * id: "id" * }) */ getDocumentPdf(request: Samsara.GetDocumentPdfRequest, requestOptions?: DocumentsClient.RequestOptions): core.HttpResponsePromise; private __getDocumentPdf; /** * Returns a single document. The legacy version of this endpoint can be found at [samsara.com/api-legacy](https://www.samsara.com/api-legacy#operation/getDriverDocumentByIdAndDriverId). * * Rate limit: 25 requests/sec (learn more about rate limits here). * * To use this endpoint, select **Read Documents** 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.GetDocumentRequest} request * @param {DocumentsClient.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.documents.getDocument({ * id: "id" * }) */ getDocument(request: Samsara.GetDocumentRequest, requestOptions?: DocumentsClient.RequestOptions): core.HttpResponsePromise; private __getDocument; /** * Deletes a single document. The legacy version of this endpoint can be found at [samsara.com/api-legacy](https://www.samsara.com/api-legacy#operation/deleteDriverDocumentByIdAndDriverId). * * Rate limit: 100 requests/min (learn more about rate limits here). * * To use this endpoint, select **Write Documents** 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.DeleteDocumentRequest} request * @param {DocumentsClient.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.documents.deleteDocument({ * id: "id" * }) */ deleteDocument(request: Samsara.DeleteDocumentRequest, requestOptions?: DocumentsClient.RequestOptions): core.HttpResponsePromise; private __deleteDocument; }