/**
* Samsara API
* # Overview Something new! Welcome Samsara\'s new and improved API. Check out our FAQ [here](https://developers.samsara.com/docs/introducing-our-next-generation-api) to see what\'s changed and learn how to get started.
Want to access the legacy API docs? You can find them [here](https://www.samsara.com/api-legacy).
*Note: Because this is a new set of APIs, we have not transitioned all endpoints over to this standard. Endpoints that still use the legacy standards are indicated in the reference documentation. If you can\'t find an API that you\'re looking for, we encourage you to look for it in our [legacy API docs](https://www.samsara.com/api-legacy) as we continue to transition all endpoints over. Check back here for updates!*
Submit your feedback [here](https://forms.gle/r4bs6HQshQAvBuwv6)! Samsara provides API endpoints so that you can build powerful applications and custom solutions with sensor data. Samsara has endpoints available to track and analyze sensors, vehicles, and entire fleets. The Samsara API is a [RESTful API](https://en.wikipedia.org/wiki/Representational_state_transfer). It uses standard [HTTP](https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol) authentication, verbs, and response codes, and it returns [JSON](http://www.json.org/) response bodies. If you\'re familiar with what you can build with a REST API, then this will be your go-to API reference. Visit [developers.samsara.com](https://developers.samsara.com) to find getting started guides and an API overview. If you have any questions, please visit https://samsara.com/help. ## Endpoints All our APIs can be accessed through HTTP requests to URLs like: ``` https://api.samsara.com/ ``` For EU customers, this URL will be: ``` https://api.eu.samsara.com/ ``` Note Legacy endpoints will have the URL: `https://api.samsara.com/v1/` or `https://api.eu.samsara.com/v1/` ## Authentication To authenticate your API request you will need to include your secret token. You can manage your API tokens in the [Dashboard](https://cloud.samsara.com). They are visible under `Settings->Organization->API Tokens`. Your API tokens carry many privileges, so be sure to keep them secure. Do not share your secret API tokens in publicly accessible areas such as GitHub, client-side code, and so on. Authentication to the API is performed via Bearer Token in the HTTP Authorization header. Provide your API token as the `access_token` value in an `Authorization: Bearer` header. You do not need to provide a password: ```curl Authorization: Bearer {access_token} ``` All API requests must be made over [HTTPS](https://en.wikipedia.org/wiki/HTTPS). Calls made over plain HTTP or without authentication will fail. ### OAuth2 If building an application for our marketplace, our API is accessible via. OAuth2 as well. | Type | Value | | ------------- |:-------------:| | Security scheme | OAuth2 | | OAuth2 Flow | accessCode | | Authorization URL | https://api.samsara.com/oauth2/authorize | | Token URL | https://api.samsara.com/oauth2/token | ## Common Patterns You can find more info about request methods, response codes, error codes, versioning, pagination, timestamps, and mini-objects [here](https://developers.samsara.com/docs/common-structures).
*
* The version of the OpenAPI document: 2024-11-18
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import type { Configuration } from '../configuration';
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
import { RequestArgs, BaseAPI } from '../base';
import { CarrierProposedAssignmentResponse } from '../samsara-models';
import { CreateCarrierProposedAssignmentRequest } from '../samsara-models';
import { ListCarrierProposedAssignmentResponse } from '../samsara-models';
/**
* CarrierProposedAssignmentsApi - axios parameter creator
* @export
*/
export declare const CarrierProposedAssignmentsApiAxiosParamCreator: (configuration?: Configuration) => {
/**
* Creates a new assignment that a driver can later use. Each driver can only have one future assignment. **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 Carrier-Proposed Assignments** under the Assignments category when creating or editing an API token. Learn More.
* @summary Create an assignment
* @param {CreateCarrierProposedAssignmentRequest} [carrierProposedAssignment] The assignment to create.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createCarrierProposedAssignment: (carrierProposedAssignment?: CreateCarrierProposedAssignmentRequest, options?: RawAxiosRequestConfig) => Promise;
/**
* Permanently delete an assignment. You can only delete assignments that are not yet active. To override a currently active assignment, create a new empty one, instead. **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 Carrier-Proposed Assignments** under the Assignments category when creating or editing an API token. Learn More.
* @summary Delete an assignment
* @param {string} id ID of the assignment.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteCarrierProposedAssignment: (id: string, options?: RawAxiosRequestConfig) => Promise;
/**
* Show the assignments created by the POST fleet/carrier-proposed-assignments. This endpoint will only show the assignments that are active for drivers and currently visible to them in the driver app. Once a proposed assignment has been accepted, the endpoint will not return any 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 Carrier-Proposed Assignments** under the Assignments category when creating or editing an API token. Learn More.
* @summary Retrieve assignments
* @param {number} [limit] The limit for how many objects will be in the response. Default and max for this value is 512 objects.
* @param {string} [after] If specified, this should be the endCursor value from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results.
* @param {Array} [driverIds] A filter on the data based on this comma-separated list of driver IDs and externalIds. Example: `driverIds=1234,5678,payroll:4841`
* @param {string} [activeTime] If specified, shows assignments that will be active at this time. Defaults to now, which would show current active assignments. In RFC 3339 format. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listCarrierProposedAssignments: (limit?: number, after?: string, driverIds?: Array, activeTime?: string, options?: RawAxiosRequestConfig) => Promise;
};
/**
* CarrierProposedAssignmentsApi - functional programming interface
* @export
*/
export declare const CarrierProposedAssignmentsApiFp: (configuration?: Configuration) => {
/**
* Creates a new assignment that a driver can later use. Each driver can only have one future assignment. **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 Carrier-Proposed Assignments** under the Assignments category when creating or editing an API token. Learn More.
* @summary Create an assignment
* @param {CreateCarrierProposedAssignmentRequest} [carrierProposedAssignment] The assignment to create.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createCarrierProposedAssignment(carrierProposedAssignment?: CreateCarrierProposedAssignmentRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>;
/**
* Permanently delete an assignment. You can only delete assignments that are not yet active. To override a currently active assignment, create a new empty one, instead. **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 Carrier-Proposed Assignments** under the Assignments category when creating or editing an API token. Learn More.
* @summary Delete an assignment
* @param {string} id ID of the assignment.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteCarrierProposedAssignment(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>;
/**
* Show the assignments created by the POST fleet/carrier-proposed-assignments. This endpoint will only show the assignments that are active for drivers and currently visible to them in the driver app. Once a proposed assignment has been accepted, the endpoint will not return any 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 Carrier-Proposed Assignments** under the Assignments category when creating or editing an API token. Learn More.
* @summary Retrieve assignments
* @param {number} [limit] The limit for how many objects will be in the response. Default and max for this value is 512 objects.
* @param {string} [after] If specified, this should be the endCursor value from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results.
* @param {Array} [driverIds] A filter on the data based on this comma-separated list of driver IDs and externalIds. Example: `driverIds=1234,5678,payroll:4841`
* @param {string} [activeTime] If specified, shows assignments that will be active at this time. Defaults to now, which would show current active assignments. In RFC 3339 format. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listCarrierProposedAssignments(limit?: number, after?: string, driverIds?: Array, activeTime?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>;
};
/**
* CarrierProposedAssignmentsApi - factory interface
* @export
*/
export declare const CarrierProposedAssignmentsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
* Creates a new assignment that a driver can later use. Each driver can only have one future assignment. **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 Carrier-Proposed Assignments** under the Assignments category when creating or editing an API token. Learn More.
* @summary Create an assignment
* @param {CarrierProposedAssignmentsApiCreateCarrierProposedAssignmentRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createCarrierProposedAssignment(requestParameters?: CarrierProposedAssignmentsApiCreateCarrierProposedAssignmentRequest, options?: RawAxiosRequestConfig): AxiosPromise;
/**
* Permanently delete an assignment. You can only delete assignments that are not yet active. To override a currently active assignment, create a new empty one, instead. **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 Carrier-Proposed Assignments** under the Assignments category when creating or editing an API token. Learn More.
* @summary Delete an assignment
* @param {CarrierProposedAssignmentsApiDeleteCarrierProposedAssignmentRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteCarrierProposedAssignment(requestParameters: CarrierProposedAssignmentsApiDeleteCarrierProposedAssignmentRequest, options?: RawAxiosRequestConfig): AxiosPromise;
/**
* Show the assignments created by the POST fleet/carrier-proposed-assignments. This endpoint will only show the assignments that are active for drivers and currently visible to them in the driver app. Once a proposed assignment has been accepted, the endpoint will not return any 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 Carrier-Proposed Assignments** under the Assignments category when creating or editing an API token. Learn More.
* @summary Retrieve assignments
* @param {CarrierProposedAssignmentsApiListCarrierProposedAssignmentsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listCarrierProposedAssignments(requestParameters?: CarrierProposedAssignmentsApiListCarrierProposedAssignmentsRequest, options?: RawAxiosRequestConfig): AxiosPromise;
};
/**
* Request parameters for createCarrierProposedAssignment operation in CarrierProposedAssignmentsApi.
* @export
* @interface CarrierProposedAssignmentsApiCreateCarrierProposedAssignmentRequest
*/
export interface CarrierProposedAssignmentsApiCreateCarrierProposedAssignmentRequest {
/**
* The assignment to create.
* @type {CreateCarrierProposedAssignmentRequest}
* @memberof CarrierProposedAssignmentsApiCreateCarrierProposedAssignment
*/
readonly carrierProposedAssignment?: CreateCarrierProposedAssignmentRequest;
}
/**
* Request parameters for deleteCarrierProposedAssignment operation in CarrierProposedAssignmentsApi.
* @export
* @interface CarrierProposedAssignmentsApiDeleteCarrierProposedAssignmentRequest
*/
export interface CarrierProposedAssignmentsApiDeleteCarrierProposedAssignmentRequest {
/**
* ID of the assignment.
* @type {string}
* @memberof CarrierProposedAssignmentsApiDeleteCarrierProposedAssignment
*/
readonly id: string;
}
/**
* Request parameters for listCarrierProposedAssignments operation in CarrierProposedAssignmentsApi.
* @export
* @interface CarrierProposedAssignmentsApiListCarrierProposedAssignmentsRequest
*/
export interface CarrierProposedAssignmentsApiListCarrierProposedAssignmentsRequest {
/**
* The limit for how many objects will be in the response. Default and max for this value is 512 objects.
* @type {number}
* @memberof CarrierProposedAssignmentsApiListCarrierProposedAssignments
*/
readonly limit?: number;
/**
* If specified, this should be the endCursor value from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results.
* @type {string}
* @memberof CarrierProposedAssignmentsApiListCarrierProposedAssignments
*/
readonly after?: string;
/**
* A filter on the data based on this comma-separated list of driver IDs and externalIds. Example: `driverIds=1234,5678,payroll:4841`
* @type {Array}
* @memberof CarrierProposedAssignmentsApiListCarrierProposedAssignments
*/
readonly driverIds?: Array;
/**
* If specified, shows assignments that will be active at this time. Defaults to now, which would show current active assignments. In RFC 3339 format. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00).
* @type {string}
* @memberof CarrierProposedAssignmentsApiListCarrierProposedAssignments
*/
readonly activeTime?: string;
}
/**
* CarrierProposedAssignmentsApi - object-oriented interface
* @export
* @class CarrierProposedAssignmentsApi
* @extends {BaseAPI}
*/
export declare class CarrierProposedAssignmentsApi extends BaseAPI {
/**
* Creates a new assignment that a driver can later use. Each driver can only have one future assignment. **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 Carrier-Proposed Assignments** under the Assignments category when creating or editing an API token. Learn More.
* @summary Create an assignment
* @param {CarrierProposedAssignmentsApiCreateCarrierProposedAssignmentRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof CarrierProposedAssignmentsApi
*/
createCarrierProposedAssignment(requestParameters?: CarrierProposedAssignmentsApiCreateCarrierProposedAssignmentRequest, options?: RawAxiosRequestConfig): Promise>;
/**
* Permanently delete an assignment. You can only delete assignments that are not yet active. To override a currently active assignment, create a new empty one, instead. **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 Carrier-Proposed Assignments** under the Assignments category when creating or editing an API token. Learn More.
* @summary Delete an assignment
* @param {CarrierProposedAssignmentsApiDeleteCarrierProposedAssignmentRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof CarrierProposedAssignmentsApi
*/
deleteCarrierProposedAssignment(requestParameters: CarrierProposedAssignmentsApiDeleteCarrierProposedAssignmentRequest, options?: RawAxiosRequestConfig): Promise>;
/**
* Show the assignments created by the POST fleet/carrier-proposed-assignments. This endpoint will only show the assignments that are active for drivers and currently visible to them in the driver app. Once a proposed assignment has been accepted, the endpoint will not return any 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 Carrier-Proposed Assignments** under the Assignments category when creating or editing an API token. Learn More.
* @summary Retrieve assignments
* @param {CarrierProposedAssignmentsApiListCarrierProposedAssignmentsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof CarrierProposedAssignmentsApi
*/
listCarrierProposedAssignments(requestParameters?: CarrierProposedAssignmentsApiListCarrierProposedAssignmentsRequest, options?: RawAxiosRequestConfig): Promise>;
}