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 WorkOrdersClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } export declare class WorkOrdersClient { protected readonly _options: NormalizedClientOptionsWithAuth; constructor(options?: WorkOrdersClient.Options); /** * Process an invoice scan to create or update a work order with AI-extracted data. Accepts base64 encoded invoice files (PDF, JPEG, PNG) up to 10MB. * * Rate limit: 100 requests/min (learn more about rate limits here). * * To use this endpoint, select **Write Work Orders** under the Work Orders 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.WorkOrdersPostInvoiceScanRequestBody} request * @param {WorkOrdersClient.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.workOrders.postInvoiceScan({ * file: { * base64Content: "JVBERi0xLjQKJeLjz9MKMyAwIG9iago8P...", * contentType: "application/pdf" * } * }) */ postInvoiceScan(request: Samsara.WorkOrdersPostInvoiceScanRequestBody, requestOptions?: WorkOrdersClient.RequestOptions): core.HttpResponsePromise; private __postInvoiceScan; /** * Gets service tasks. * * Rate limit: 5 requests/sec (learn more about rate limits here). * * To use this endpoint, select **Read Work Orders** under the Work Orders 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.GetServiceTasksRequest} request * @param {WorkOrdersClient.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.workOrders.getServiceTasks() */ getServiceTasks(request?: Samsara.GetServiceTasksRequest, requestOptions?: WorkOrdersClient.RequestOptions): core.HttpResponsePromise; private __getServiceTasks; /** * Gets work orders. * * Rate limit: 5 requests/sec (learn more about rate limits here). * * To use this endpoint, select **Read Work Orders** under the Work Orders 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.GetWorkOrdersRequest} request * @param {WorkOrdersClient.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.workOrders.getWorkOrders() */ getWorkOrders(request?: Samsara.GetWorkOrdersRequest, requestOptions?: WorkOrdersClient.RequestOptions): core.HttpResponsePromise; private __getWorkOrders; /** * Creates a work order. * * Rate limit: 100 requests/min (learn more about rate limits here). * * To use this endpoint, select **Write Work Orders** under the Work Orders 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.WorkOrdersPostWorkOrdersRequestBody} request * @param {WorkOrdersClient.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.workOrders.postWorkOrders({ * assetId: "12443" * }) */ postWorkOrders(request: Samsara.WorkOrdersPostWorkOrdersRequestBody, requestOptions?: WorkOrdersClient.RequestOptions): core.HttpResponsePromise; private __postWorkOrders; /** * Deletes a work order. * * Rate limit: 100 requests/min (learn more about rate limits here). * * To use this endpoint, select **Write Work Orders** under the Work Orders 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.DeleteWorkOrdersRequest} request * @param {WorkOrdersClient.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.workOrders.deleteWorkOrders({ * id: "id" * }) */ deleteWorkOrders(request: Samsara.DeleteWorkOrdersRequest, requestOptions?: WorkOrdersClient.RequestOptions): core.HttpResponsePromise; private __deleteWorkOrders; /** * Updates a work order. * * Rate limit: 100 requests/min (learn more about rate limits here). * * To use this endpoint, select **Write Work Orders** under the Work Orders 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.WorkOrdersPatchWorkOrdersRequestBody} request * @param {WorkOrdersClient.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.workOrders.patchWorkOrders({ * id: "5" * }) */ patchWorkOrders(request: Samsara.WorkOrdersPatchWorkOrdersRequestBody, requestOptions?: WorkOrdersClient.RequestOptions): core.HttpResponsePromise; private __patchWorkOrders; /** * Stream work orders. * * Rate limit: 5 requests/sec (learn more about rate limits here). * * To use this endpoint, select **Read Work Orders** under the Work Orders 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.StreamWorkOrdersRequest} request * @param {WorkOrdersClient.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.workOrders.streamWorkOrders({ * startTime: "startTime" * }) */ streamWorkOrders(request: Samsara.StreamWorkOrdersRequest, requestOptions?: WorkOrdersClient.RequestOptions): core.HttpResponsePromise; private __streamWorkOrders; }