@samsarahq/samsara 11.10.2 → 11.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/betaApIs/client/Client.d.ts +28 -0
  3. package/dist/cjs/api/resources/betaApIs/client/Client.js +88 -0
  4. package/dist/cjs/api/resources/betaApIs/client/requests/ListDriverWorkflowsRequest.d.ts +13 -0
  5. package/dist/cjs/api/resources/betaApIs/client/requests/ListDriverWorkflowsRequest.js +3 -0
  6. package/dist/cjs/api/resources/betaApIs/client/requests/index.d.ts +1 -0
  7. package/dist/cjs/api/resources/betaApIs/types/ListDriverWorkflowsRequestWorkflowType.d.ts +9 -0
  8. package/dist/cjs/api/resources/betaApIs/types/ListDriverWorkflowsRequestWorkflowType.js +12 -0
  9. package/dist/cjs/api/resources/betaApIs/types/index.d.ts +1 -0
  10. package/dist/cjs/api/resources/betaApIs/types/index.js +1 -0
  11. package/dist/cjs/api/resources/readings/client/requests/GetReadingsHistoryRequest.d.ts +1 -0
  12. package/dist/cjs/api/resources/readings/client/requests/GetReadingsSnapshotRequest.d.ts +1 -0
  13. package/dist/cjs/api/types/ActionObjectRequestBody.d.ts +1 -0
  14. package/dist/cjs/api/types/ActionObjectResponseBody.d.ts +1 -0
  15. package/dist/cjs/api/types/DriverWorkflowObjectResponseBody.d.ts +23 -0
  16. package/dist/cjs/api/types/DriverWorkflowObjectResponseBody.js +16 -0
  17. package/dist/cjs/api/types/DriverWorkflowsListDriverWorkflowsBadGatewayErrorResponseBody.d.ts +9 -0
  18. package/dist/cjs/api/types/DriverWorkflowsListDriverWorkflowsBadGatewayErrorResponseBody.js +3 -0
  19. package/dist/cjs/api/types/DriverWorkflowsListDriverWorkflowsGatewayTimeoutErrorResponseBody.d.ts +9 -0
  20. package/dist/cjs/api/types/DriverWorkflowsListDriverWorkflowsGatewayTimeoutErrorResponseBody.js +3 -0
  21. package/dist/cjs/api/types/DriverWorkflowsListDriverWorkflowsInternalServerErrorResponseBody.d.ts +9 -0
  22. package/dist/cjs/api/types/DriverWorkflowsListDriverWorkflowsInternalServerErrorResponseBody.js +3 -0
  23. package/dist/cjs/api/types/DriverWorkflowsListDriverWorkflowsMethodNotAllowedErrorResponseBody.d.ts +9 -0
  24. package/dist/cjs/api/types/DriverWorkflowsListDriverWorkflowsMethodNotAllowedErrorResponseBody.js +3 -0
  25. package/dist/cjs/api/types/DriverWorkflowsListDriverWorkflowsNotFoundErrorResponseBody.d.ts +9 -0
  26. package/dist/cjs/api/types/DriverWorkflowsListDriverWorkflowsNotFoundErrorResponseBody.js +3 -0
  27. package/dist/cjs/api/types/DriverWorkflowsListDriverWorkflowsNotImplementedErrorResponseBody.d.ts +9 -0
  28. package/dist/cjs/api/types/DriverWorkflowsListDriverWorkflowsNotImplementedErrorResponseBody.js +3 -0
  29. package/dist/cjs/api/types/DriverWorkflowsListDriverWorkflowsResponseBody.d.ts +6 -0
  30. package/dist/cjs/api/types/DriverWorkflowsListDriverWorkflowsResponseBody.js +3 -0
  31. package/dist/cjs/api/types/DriverWorkflowsListDriverWorkflowsServiceUnavailableErrorResponseBody.d.ts +9 -0
  32. package/dist/cjs/api/types/DriverWorkflowsListDriverWorkflowsServiceUnavailableErrorResponseBody.js +3 -0
  33. package/dist/cjs/api/types/DriverWorkflowsListDriverWorkflowsTooManyRequestsErrorResponseBody.d.ts +9 -0
  34. package/dist/cjs/api/types/DriverWorkflowsListDriverWorkflowsTooManyRequestsErrorResponseBody.js +3 -0
  35. package/dist/cjs/api/types/DriverWorkflowsListDriverWorkflowsUnauthorizedErrorResponseBody.d.ts +9 -0
  36. package/dist/cjs/api/types/DriverWorkflowsListDriverWorkflowsUnauthorizedErrorResponseBody.js +3 -0
  37. package/dist/cjs/api/types/index.d.ts +11 -0
  38. package/dist/cjs/api/types/index.js +11 -0
  39. package/dist/cjs/version.d.ts +1 -1
  40. package/dist/cjs/version.js +1 -1
  41. package/dist/esm/BaseClient.mjs +2 -2
  42. package/dist/esm/api/resources/betaApIs/client/Client.d.mts +28 -0
  43. package/dist/esm/api/resources/betaApIs/client/Client.mjs +88 -0
  44. package/dist/esm/api/resources/betaApIs/client/requests/ListDriverWorkflowsRequest.d.mts +13 -0
  45. package/dist/esm/api/resources/betaApIs/client/requests/ListDriverWorkflowsRequest.mjs +2 -0
  46. package/dist/esm/api/resources/betaApIs/client/requests/index.d.mts +1 -0
  47. package/dist/esm/api/resources/betaApIs/types/ListDriverWorkflowsRequestWorkflowType.d.mts +9 -0
  48. package/dist/esm/api/resources/betaApIs/types/ListDriverWorkflowsRequestWorkflowType.mjs +9 -0
  49. package/dist/esm/api/resources/betaApIs/types/index.d.mts +1 -0
  50. package/dist/esm/api/resources/betaApIs/types/index.mjs +1 -0
  51. package/dist/esm/api/resources/readings/client/requests/GetReadingsHistoryRequest.d.mts +1 -0
  52. package/dist/esm/api/resources/readings/client/requests/GetReadingsSnapshotRequest.d.mts +1 -0
  53. package/dist/esm/api/types/ActionObjectRequestBody.d.mts +1 -0
  54. package/dist/esm/api/types/ActionObjectResponseBody.d.mts +1 -0
  55. package/dist/esm/api/types/DriverWorkflowObjectResponseBody.d.mts +23 -0
  56. package/dist/esm/api/types/DriverWorkflowObjectResponseBody.mjs +13 -0
  57. package/dist/esm/api/types/DriverWorkflowsListDriverWorkflowsBadGatewayErrorResponseBody.d.mts +9 -0
  58. package/dist/esm/api/types/DriverWorkflowsListDriverWorkflowsBadGatewayErrorResponseBody.mjs +2 -0
  59. package/dist/esm/api/types/DriverWorkflowsListDriverWorkflowsGatewayTimeoutErrorResponseBody.d.mts +9 -0
  60. package/dist/esm/api/types/DriverWorkflowsListDriverWorkflowsGatewayTimeoutErrorResponseBody.mjs +2 -0
  61. package/dist/esm/api/types/DriverWorkflowsListDriverWorkflowsInternalServerErrorResponseBody.d.mts +9 -0
  62. package/dist/esm/api/types/DriverWorkflowsListDriverWorkflowsInternalServerErrorResponseBody.mjs +2 -0
  63. package/dist/esm/api/types/DriverWorkflowsListDriverWorkflowsMethodNotAllowedErrorResponseBody.d.mts +9 -0
  64. package/dist/esm/api/types/DriverWorkflowsListDriverWorkflowsMethodNotAllowedErrorResponseBody.mjs +2 -0
  65. package/dist/esm/api/types/DriverWorkflowsListDriverWorkflowsNotFoundErrorResponseBody.d.mts +9 -0
  66. package/dist/esm/api/types/DriverWorkflowsListDriverWorkflowsNotFoundErrorResponseBody.mjs +2 -0
  67. package/dist/esm/api/types/DriverWorkflowsListDriverWorkflowsNotImplementedErrorResponseBody.d.mts +9 -0
  68. package/dist/esm/api/types/DriverWorkflowsListDriverWorkflowsNotImplementedErrorResponseBody.mjs +2 -0
  69. package/dist/esm/api/types/DriverWorkflowsListDriverWorkflowsResponseBody.d.mts +6 -0
  70. package/dist/esm/api/types/DriverWorkflowsListDriverWorkflowsResponseBody.mjs +2 -0
  71. package/dist/esm/api/types/DriverWorkflowsListDriverWorkflowsServiceUnavailableErrorResponseBody.d.mts +9 -0
  72. package/dist/esm/api/types/DriverWorkflowsListDriverWorkflowsServiceUnavailableErrorResponseBody.mjs +2 -0
  73. package/dist/esm/api/types/DriverWorkflowsListDriverWorkflowsTooManyRequestsErrorResponseBody.d.mts +9 -0
  74. package/dist/esm/api/types/DriverWorkflowsListDriverWorkflowsTooManyRequestsErrorResponseBody.mjs +2 -0
  75. package/dist/esm/api/types/DriverWorkflowsListDriverWorkflowsUnauthorizedErrorResponseBody.d.mts +9 -0
  76. package/dist/esm/api/types/DriverWorkflowsListDriverWorkflowsUnauthorizedErrorResponseBody.mjs +2 -0
  77. package/dist/esm/api/types/index.d.mts +11 -0
  78. package/dist/esm/api/types/index.mjs +11 -0
  79. package/dist/esm/version.d.mts +1 -1
  80. package/dist/esm/version.mjs +1 -1
  81. package/package.json +1 -1
  82. package/reference.md +70 -0
@@ -44,8 +44,8 @@ function normalizeClientOptions(options) {
44
44
  const headers = (0, headers_js_1.mergeHeaders)({
45
45
  "X-Fern-Language": "JavaScript",
46
46
  "X-Fern-SDK-Name": "@samsarahq/samsara",
47
- "X-Fern-SDK-Version": "11.10.2",
48
- "User-Agent": "@samsarahq/samsara/11.10.2",
47
+ "X-Fern-SDK-Version": "11.11.1",
48
+ "User-Agent": "@samsarahq/samsara/11.11.1",
49
49
  "X-Fern-Runtime": core.RUNTIME.type,
50
50
  "X-Fern-Runtime-Version": core.RUNTIME.version,
51
51
  "X-Samsara-Version": (_a = options === null || options === void 0 ? void 0 : options.version) !== null && _a !== void 0 ? _a : "2025-06-11",
@@ -665,6 +665,34 @@ export declare class BetaApIsClient {
665
665
  */
666
666
  postDriverWorkflowAssignment(request: Samsara.DriverWorkflowAssignmentsPostDriverWorkflowAssignmentRequestBody, requestOptions?: BetaApIsClient.RequestOptions): core.HttpResponsePromise<Samsara.DriverWorkflowAssignmentsPostDriverWorkflowAssignmentResponseBody>;
667
667
  private __postDriverWorkflowAssignment;
668
+ /**
669
+ * List the driver app workflows configured for the organization. Use the returned workflow IDs to reference workflows from the driver create/update APIs or from the driver workflow assignment API. Workflows are organization-scoped and unique per organization.
670
+ *
671
+ * <b>Rate limit:</b> 10 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
672
+ *
673
+ * To use this endpoint, select **Read Drivers** under the Drivers category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
674
+ *
675
+ *
676
+ * **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.
677
+ *
678
+ * @param {Samsara.ListDriverWorkflowsRequest} request
679
+ * @param {BetaApIsClient.RequestOptions} requestOptions - Request-specific configuration.
680
+ *
681
+ * @throws {@link Samsara.UnauthorizedError}
682
+ * @throws {@link Samsara.NotFoundError}
683
+ * @throws {@link Samsara.MethodNotAllowedError}
684
+ * @throws {@link Samsara.TooManyRequestsError}
685
+ * @throws {@link Samsara.InternalServerError}
686
+ * @throws {@link Samsara.NotImplementedError}
687
+ * @throws {@link Samsara.BadGatewayError}
688
+ * @throws {@link Samsara.ServiceUnavailableError}
689
+ * @throws {@link Samsara.GatewayTimeoutError}
690
+ *
691
+ * @example
692
+ * await client.betaApIs.listDriverWorkflows()
693
+ */
694
+ listDriverWorkflows(request?: Samsara.ListDriverWorkflowsRequest, requestOptions?: BetaApIsClient.RequestOptions): core.HttpResponsePromise<Samsara.DriverWorkflowsListDriverWorkflowsResponseBody>;
695
+ private __listDriverWorkflows;
668
696
  /**
669
697
  * Returns the list of vendor categories available for maintenance vendors.
670
698
  *
@@ -2004,6 +2004,94 @@ class BetaApIsClient {
2004
2004
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/fleet/drivers/workflow-assignments");
2005
2005
  });
2006
2006
  }
2007
+ /**
2008
+ * List the driver app workflows configured for the organization. Use the returned workflow IDs to reference workflows from the driver create/update APIs or from the driver workflow assignment API. Workflows are organization-scoped and unique per organization.
2009
+ *
2010
+ * <b>Rate limit:</b> 10 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
2011
+ *
2012
+ * To use this endpoint, select **Read Drivers** under the Drivers category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
2013
+ *
2014
+ *
2015
+ * **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.
2016
+ *
2017
+ * @param {Samsara.ListDriverWorkflowsRequest} request
2018
+ * @param {BetaApIsClient.RequestOptions} requestOptions - Request-specific configuration.
2019
+ *
2020
+ * @throws {@link Samsara.UnauthorizedError}
2021
+ * @throws {@link Samsara.NotFoundError}
2022
+ * @throws {@link Samsara.MethodNotAllowedError}
2023
+ * @throws {@link Samsara.TooManyRequestsError}
2024
+ * @throws {@link Samsara.InternalServerError}
2025
+ * @throws {@link Samsara.NotImplementedError}
2026
+ * @throws {@link Samsara.BadGatewayError}
2027
+ * @throws {@link Samsara.ServiceUnavailableError}
2028
+ * @throws {@link Samsara.GatewayTimeoutError}
2029
+ *
2030
+ * @example
2031
+ * await client.betaApIs.listDriverWorkflows()
2032
+ */
2033
+ listDriverWorkflows(request = {}, requestOptions) {
2034
+ return core.HttpResponsePromise.fromPromise(this.__listDriverWorkflows(request, requestOptions));
2035
+ }
2036
+ __listDriverWorkflows() {
2037
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
2038
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
2039
+ const { after, limit, workflowType } = request;
2040
+ const _queryParams = {
2041
+ after,
2042
+ limit,
2043
+ workflowType: workflowType != null ? workflowType : undefined,
2044
+ };
2045
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
2046
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "X-Samsara-Version": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
2047
+ const _response = yield core.fetcher({
2048
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SamsaraEnvironment.ProductionApi, "fleet/drivers/workflows"),
2049
+ method: "GET",
2050
+ headers: _headers,
2051
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
2052
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
2053
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
2054
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2055
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
2056
+ logging: this._options.logging,
2057
+ });
2058
+ if (_response.ok) {
2059
+ return {
2060
+ data: _response.body,
2061
+ rawResponse: _response.rawResponse,
2062
+ };
2063
+ }
2064
+ if (_response.error.reason === "status-code") {
2065
+ switch (_response.error.statusCode) {
2066
+ case 401:
2067
+ throw new Samsara.UnauthorizedError(_response.error.body, _response.rawResponse);
2068
+ case 404:
2069
+ throw new Samsara.NotFoundError(_response.error.body, _response.rawResponse);
2070
+ case 405:
2071
+ throw new Samsara.MethodNotAllowedError(_response.error.body, _response.rawResponse);
2072
+ case 429:
2073
+ throw new Samsara.TooManyRequestsError(_response.error.body, _response.rawResponse);
2074
+ case 500:
2075
+ throw new Samsara.InternalServerError(_response.error.body, _response.rawResponse);
2076
+ case 501:
2077
+ throw new Samsara.NotImplementedError(_response.error.body, _response.rawResponse);
2078
+ case 502:
2079
+ throw new Samsara.BadGatewayError(_response.error.body, _response.rawResponse);
2080
+ case 503:
2081
+ throw new Samsara.ServiceUnavailableError(_response.error.body, _response.rawResponse);
2082
+ case 504:
2083
+ throw new Samsara.GatewayTimeoutError(_response.error.body, _response.rawResponse);
2084
+ default:
2085
+ throw new errors.SamsaraError({
2086
+ statusCode: _response.error.statusCode,
2087
+ body: _response.error.body,
2088
+ rawResponse: _response.rawResponse,
2089
+ });
2090
+ }
2091
+ }
2092
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/fleet/drivers/workflows");
2093
+ });
2094
+ }
2007
2095
  /**
2008
2096
  * Returns the list of vendor categories available for maintenance vendors.
2009
2097
  *
@@ -0,0 +1,13 @@
1
+ import type * as Samsara from "../../../../index.js";
2
+ /**
3
+ * @example
4
+ * {}
5
+ */
6
+ export interface ListDriverWorkflowsRequest {
7
+ /** 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. */
8
+ after?: string;
9
+ /** The limit for how many objects will be in the response. Default and max for this value is 512 objects. */
10
+ limit?: number;
11
+ /** Filter the result to workflows of a specific type. When omitted, workflows of all types are returned. Valid values: `startOfDay`, `endOfDay`, `assetSelection`, `leaveAsset`, `ridershipSafetyCheck`, `stopArrival` */
12
+ workflowType?: Samsara.ListDriverWorkflowsRequestWorkflowType;
13
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -43,6 +43,7 @@ export type { JobsPatchJobRequestBody } from "./JobsPatchJobRequestBody.js";
43
43
  export type { ListAssetAssignmentsRequest } from "./ListAssetAssignmentsRequest.js";
44
44
  export type { ListAssociationsRequest } from "./ListAssociationsRequest.js";
45
45
  export type { ListDeviceRecoveryMissingAssetsRequest } from "./ListDeviceRecoveryMissingAssetsRequest.js";
46
+ export type { ListDriverWorkflowsRequest } from "./ListDriverWorkflowsRequest.js";
46
47
  export type { ListHubRouteTemplatesRequest } from "./ListHubRouteTemplatesRequest.js";
47
48
  export type { ListMaintenanceVendorsRequest } from "./ListMaintenanceVendorsRequest.js";
48
49
  export type { ListPlanOrdersRequest } from "./ListPlanOrdersRequest.js";
@@ -0,0 +1,9 @@
1
+ export declare const ListDriverWorkflowsRequestWorkflowType: {
2
+ readonly StartOfDay: "startOfDay";
3
+ readonly EndOfDay: "endOfDay";
4
+ readonly AssetSelection: "assetSelection";
5
+ readonly LeaveAsset: "leaveAsset";
6
+ readonly RidershipSafetyCheck: "ridershipSafetyCheck";
7
+ readonly StopArrival: "stopArrival";
8
+ };
9
+ export type ListDriverWorkflowsRequestWorkflowType = (typeof ListDriverWorkflowsRequestWorkflowType)[keyof typeof ListDriverWorkflowsRequestWorkflowType];
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.ListDriverWorkflowsRequestWorkflowType = void 0;
5
+ exports.ListDriverWorkflowsRequestWorkflowType = {
6
+ StartOfDay: "startOfDay",
7
+ EndOfDay: "endOfDay",
8
+ AssetSelection: "assetSelection",
9
+ LeaveAsset: "leaveAsset",
10
+ RidershipSafetyCheck: "ridershipSafetyCheck",
11
+ StopArrival: "stopArrival",
12
+ };
@@ -4,3 +4,4 @@ export * from "./GetHosEldEventsRequestDriverActivationStatus.js";
4
4
  export * from "./GetJobsRequestStatus.js";
5
5
  export * from "./GetQualificationRecordsStreamRequestEntityType.js";
6
6
  export * from "./GetQualificationTypesRequestEntityType.js";
7
+ export * from "./ListDriverWorkflowsRequestWorkflowType.js";
@@ -20,3 +20,4 @@ __exportStar(require("./GetHosEldEventsRequestDriverActivationStatus.js"), expor
20
20
  __exportStar(require("./GetJobsRequestStatus.js"), exports);
21
21
  __exportStar(require("./GetQualificationRecordsStreamRequestEntityType.js"), exports);
22
22
  __exportStar(require("./GetQualificationTypesRequestEntityType.js"), exports);
23
+ __exportStar(require("./ListDriverWorkflowsRequestWorkflowType.js"), exports);
@@ -46,6 +46,7 @@ export interface GetReadingsHistoryRequest {
46
46
  * * `dpfLampStatus` (DPF Lamp Status): Status of the Diesel Particulate Filter warning lamp. (values: off | on | blinking)
47
47
  * * `dpfSootLoadPercent` (DPF Soot Load): Diesel Particulate Filter soot load percentage. (percent)
48
48
  * * `ecuHistoryTotalRunTime` (ECU Total Run Time): Total engine run time from ECU in seconds. (second)
49
+ * * `ecuNativeDoorStatus` (Door Status (ECU)): Indicates whether the vehicle door is open or closed based on the native ECU diagnostic signal. (values: unknown | closed | open)
49
50
  * * `engineExhaustTemperature` (Engine Exhaust Temperature): Temperature of the engine exhaust (celsius)
50
51
  * * `engineHours` (Engine Hours (ECU)): Represents the total engine runtime in hours as reported by the ECU. (second)
51
52
  * * `engineHoursDigioBased` (Engine Hours (Synthetic - Aux input)): Represents the synthetic total engine runtime in hours based on auxiliary input. (millisecond)
@@ -46,6 +46,7 @@ export interface GetReadingsSnapshotRequest {
46
46
  * * `dpfLampStatus` (DPF Lamp Status): Status of the Diesel Particulate Filter warning lamp. (values: off | on | blinking)
47
47
  * * `dpfSootLoadPercent` (DPF Soot Load): Diesel Particulate Filter soot load percentage. (percent)
48
48
  * * `ecuHistoryTotalRunTime` (ECU Total Run Time): Total engine run time from ECU in seconds. (second)
49
+ * * `ecuNativeDoorStatus` (Door Status (ECU)): Indicates whether the vehicle door is open or closed based on the native ECU diagnostic signal. (values: unknown | closed | open)
49
50
  * * `engineExhaustTemperature` (Engine Exhaust Temperature): Temperature of the engine exhaust (celsius)
50
51
  * * `engineHours` (Engine Hours (ECU)): Represents the total engine runtime in hours as reported by the ECU. (second)
51
52
  * * `engineHoursDigioBased` (Engine Hours (Synthetic - Aux input)): Represents the synthetic total engine runtime in hours based on auxiliary input. (millisecond)
@@ -8,6 +8,7 @@ export interface ActionObjectRequestBody {
8
8
  * The id of the of the action type. Reference the following list for the ids:
9
9
  * The following action types are in Beta:
10
10
  * Driver App Push = 5
11
+ * Functions = 14
11
12
  * The following action types are Stable:
12
13
  * Notification (Email, Text, Samsara Fleet Push) = 1
13
14
  * Dashboard Notification = 3
@@ -8,6 +8,7 @@ export interface ActionObjectResponseBody {
8
8
  * The id of the of the action type. Reference the following list for the ids:
9
9
  * The following action types are in Beta:
10
10
  * Driver App Push = 5
11
+ * Functions = 14
11
12
  * The following action types are Stable:
12
13
  * Notification (Email, Text, Samsara Fleet Push) = 1
13
14
  * Dashboard Notification = 3
@@ -0,0 +1,23 @@
1
+ /**
2
+ * A driver app workflow configured for the organization.
3
+ */
4
+ export interface DriverWorkflowObjectResponseBody {
5
+ /** The unique identifier of the workflow. Use this value when referring to the workflow from other APIs (e.g. driver create/update or driver workflow assignment). */
6
+ id: string;
7
+ /** The name of the workflow as configured by the organization. */
8
+ name: string;
9
+ /** The type of workflow. Indicates which point in the driver's day the workflow is triggered at. Valid values: `startOfDay`, `endOfDay`, `assetSelection`, `leaveAsset`, `ridershipSafetyCheck`, `stopArrival` */
10
+ workflowType: DriverWorkflowObjectResponseBody.WorkflowType;
11
+ }
12
+ export declare namespace DriverWorkflowObjectResponseBody {
13
+ /** The type of workflow. Indicates which point in the driver's day the workflow is triggered at. Valid values: `startOfDay`, `endOfDay`, `assetSelection`, `leaveAsset`, `ridershipSafetyCheck`, `stopArrival` */
14
+ const WorkflowType: {
15
+ readonly StartOfDay: "startOfDay";
16
+ readonly EndOfDay: "endOfDay";
17
+ readonly AssetSelection: "assetSelection";
18
+ readonly LeaveAsset: "leaveAsset";
19
+ readonly RidershipSafetyCheck: "ridershipSafetyCheck";
20
+ readonly StopArrival: "stopArrival";
21
+ };
22
+ type WorkflowType = (typeof WorkflowType)[keyof typeof WorkflowType];
23
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.DriverWorkflowObjectResponseBody = void 0;
5
+ var DriverWorkflowObjectResponseBody;
6
+ (function (DriverWorkflowObjectResponseBody) {
7
+ /** The type of workflow. Indicates which point in the driver's day the workflow is triggered at. Valid values: `startOfDay`, `endOfDay`, `assetSelection`, `leaveAsset`, `ridershipSafetyCheck`, `stopArrival` */
8
+ DriverWorkflowObjectResponseBody.WorkflowType = {
9
+ StartOfDay: "startOfDay",
10
+ EndOfDay: "endOfDay",
11
+ AssetSelection: "assetSelection",
12
+ LeaveAsset: "leaveAsset",
13
+ RidershipSafetyCheck: "ridershipSafetyCheck",
14
+ StopArrival: "stopArrival",
15
+ };
16
+ })(DriverWorkflowObjectResponseBody || (exports.DriverWorkflowObjectResponseBody = DriverWorkflowObjectResponseBody = {}));
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Bad Gateway
3
+ */
4
+ export interface DriverWorkflowsListDriverWorkflowsBadGatewayErrorResponseBody {
5
+ /** Message of error */
6
+ message: string;
7
+ /** The request ID; used when reaching out to support for issues with requests. */
8
+ requestId: string;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Gateway timeout
3
+ */
4
+ export interface DriverWorkflowsListDriverWorkflowsGatewayTimeoutErrorResponseBody {
5
+ /** Message of error */
6
+ message: string;
7
+ /** The request ID; used when reaching out to support for issues with requests. */
8
+ requestId: string;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * An internal server error occurred
3
+ */
4
+ export interface DriverWorkflowsListDriverWorkflowsInternalServerErrorResponseBody {
5
+ /** Message of error */
6
+ message: string;
7
+ /** The request ID; used when reaching out to support for issues with requests. */
8
+ requestId: string;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Method not allowed
3
+ */
4
+ export interface DriverWorkflowsListDriverWorkflowsMethodNotAllowedErrorResponseBody {
5
+ /** Message of error */
6
+ message: string;
7
+ /** The request ID; used when reaching out to support for issues with requests. */
8
+ requestId: string;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Resource not found
3
+ */
4
+ export interface DriverWorkflowsListDriverWorkflowsNotFoundErrorResponseBody {
5
+ /** Message of error */
6
+ message: string;
7
+ /** The request ID; used when reaching out to support for issues with requests. */
8
+ requestId: string;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Requested endpoint is not yet implemented
3
+ */
4
+ export interface DriverWorkflowsListDriverWorkflowsNotImplementedErrorResponseBody {
5
+ /** Message of error */
6
+ message: string;
7
+ /** The request ID; used when reaching out to support for issues with requests. */
8
+ requestId: string;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ import type * as Samsara from "../index.js";
2
+ export interface DriverWorkflowsListDriverWorkflowsResponseBody {
3
+ /** The workflows configured for the organization. */
4
+ data: Samsara.DriverWorkflowObjectResponseBody[];
5
+ pagination: Samsara.GoaPaginationResponseResponseBody;
6
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Service unavailable
3
+ */
4
+ export interface DriverWorkflowsListDriverWorkflowsServiceUnavailableErrorResponseBody {
5
+ /** Message of error */
6
+ message: string;
7
+ /** The request ID; used when reaching out to support for issues with requests. */
8
+ requestId: string;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Too many requests
3
+ */
4
+ export interface DriverWorkflowsListDriverWorkflowsTooManyRequestsErrorResponseBody {
5
+ /** Message of error */
6
+ message: string;
7
+ /** The request ID; used when reaching out to support for issues with requests. */
8
+ requestId: string;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Unauthorized
3
+ */
4
+ export interface DriverWorkflowsListDriverWorkflowsUnauthorizedErrorResponseBody {
5
+ /** Message of error */
6
+ message: string;
7
+ /** The request ID; used when reaching out to support for issues with requests. */
8
+ requestId: string;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -729,6 +729,17 @@ export * from "./DriverWorkflowAssignmentsPostDriverWorkflowAssignmentResponseBo
729
729
  export * from "./DriverWorkflowAssignmentsPostDriverWorkflowAssignmentServiceUnavailableErrorResponseBody.js";
730
730
  export * from "./DriverWorkflowAssignmentsPostDriverWorkflowAssignmentTooManyRequestsErrorResponseBody.js";
731
731
  export * from "./DriverWorkflowAssignmentsPostDriverWorkflowAssignmentUnauthorizedErrorResponseBody.js";
732
+ export * from "./DriverWorkflowObjectResponseBody.js";
733
+ export * from "./DriverWorkflowsListDriverWorkflowsBadGatewayErrorResponseBody.js";
734
+ export * from "./DriverWorkflowsListDriverWorkflowsGatewayTimeoutErrorResponseBody.js";
735
+ export * from "./DriverWorkflowsListDriverWorkflowsInternalServerErrorResponseBody.js";
736
+ export * from "./DriverWorkflowsListDriverWorkflowsMethodNotAllowedErrorResponseBody.js";
737
+ export * from "./DriverWorkflowsListDriverWorkflowsNotFoundErrorResponseBody.js";
738
+ export * from "./DriverWorkflowsListDriverWorkflowsNotImplementedErrorResponseBody.js";
739
+ export * from "./DriverWorkflowsListDriverWorkflowsResponseBody.js";
740
+ export * from "./DriverWorkflowsListDriverWorkflowsServiceUnavailableErrorResponseBody.js";
741
+ export * from "./DriverWorkflowsListDriverWorkflowsTooManyRequestsErrorResponseBody.js";
742
+ export * from "./DriverWorkflowsListDriverWorkflowsUnauthorizedErrorResponseBody.js";
732
743
  export * from "./DriveTimeDurationMs.js";
733
744
  export * from "./DutyStatusDurationObjectResponseBody.js";
734
745
  export * from "./Dvir.js";
@@ -745,6 +745,17 @@ __exportStar(require("./DriverWorkflowAssignmentsPostDriverWorkflowAssignmentRes
745
745
  __exportStar(require("./DriverWorkflowAssignmentsPostDriverWorkflowAssignmentServiceUnavailableErrorResponseBody.js"), exports);
746
746
  __exportStar(require("./DriverWorkflowAssignmentsPostDriverWorkflowAssignmentTooManyRequestsErrorResponseBody.js"), exports);
747
747
  __exportStar(require("./DriverWorkflowAssignmentsPostDriverWorkflowAssignmentUnauthorizedErrorResponseBody.js"), exports);
748
+ __exportStar(require("./DriverWorkflowObjectResponseBody.js"), exports);
749
+ __exportStar(require("./DriverWorkflowsListDriverWorkflowsBadGatewayErrorResponseBody.js"), exports);
750
+ __exportStar(require("./DriverWorkflowsListDriverWorkflowsGatewayTimeoutErrorResponseBody.js"), exports);
751
+ __exportStar(require("./DriverWorkflowsListDriverWorkflowsInternalServerErrorResponseBody.js"), exports);
752
+ __exportStar(require("./DriverWorkflowsListDriverWorkflowsMethodNotAllowedErrorResponseBody.js"), exports);
753
+ __exportStar(require("./DriverWorkflowsListDriverWorkflowsNotFoundErrorResponseBody.js"), exports);
754
+ __exportStar(require("./DriverWorkflowsListDriverWorkflowsNotImplementedErrorResponseBody.js"), exports);
755
+ __exportStar(require("./DriverWorkflowsListDriverWorkflowsResponseBody.js"), exports);
756
+ __exportStar(require("./DriverWorkflowsListDriverWorkflowsServiceUnavailableErrorResponseBody.js"), exports);
757
+ __exportStar(require("./DriverWorkflowsListDriverWorkflowsTooManyRequestsErrorResponseBody.js"), exports);
758
+ __exportStar(require("./DriverWorkflowsListDriverWorkflowsUnauthorizedErrorResponseBody.js"), exports);
748
759
  __exportStar(require("./DriveTimeDurationMs.js"), exports);
749
760
  __exportStar(require("./DutyStatusDurationObjectResponseBody.js"), exports);
750
761
  __exportStar(require("./Dvir.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "11.10.2";
1
+ export declare const SDK_VERSION = "11.11.1";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "11.10.2";
4
+ exports.SDK_VERSION = "11.11.1";
@@ -7,8 +7,8 @@ export function normalizeClientOptions(options) {
7
7
  const headers = mergeHeaders({
8
8
  "X-Fern-Language": "JavaScript",
9
9
  "X-Fern-SDK-Name": "@samsarahq/samsara",
10
- "X-Fern-SDK-Version": "11.10.2",
11
- "User-Agent": "@samsarahq/samsara/11.10.2",
10
+ "X-Fern-SDK-Version": "11.11.1",
11
+ "User-Agent": "@samsarahq/samsara/11.11.1",
12
12
  "X-Fern-Runtime": core.RUNTIME.type,
13
13
  "X-Fern-Runtime-Version": core.RUNTIME.version,
14
14
  "X-Samsara-Version": (_a = options === null || options === void 0 ? void 0 : options.version) !== null && _a !== void 0 ? _a : "2025-06-11",
@@ -665,6 +665,34 @@ export declare class BetaApIsClient {
665
665
  */
666
666
  postDriverWorkflowAssignment(request: Samsara.DriverWorkflowAssignmentsPostDriverWorkflowAssignmentRequestBody, requestOptions?: BetaApIsClient.RequestOptions): core.HttpResponsePromise<Samsara.DriverWorkflowAssignmentsPostDriverWorkflowAssignmentResponseBody>;
667
667
  private __postDriverWorkflowAssignment;
668
+ /**
669
+ * List the driver app workflows configured for the organization. Use the returned workflow IDs to reference workflows from the driver create/update APIs or from the driver workflow assignment API. Workflows are organization-scoped and unique per organization.
670
+ *
671
+ * <b>Rate limit:</b> 10 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
672
+ *
673
+ * To use this endpoint, select **Read Drivers** under the Drivers category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
674
+ *
675
+ *
676
+ * **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.
677
+ *
678
+ * @param {Samsara.ListDriverWorkflowsRequest} request
679
+ * @param {BetaApIsClient.RequestOptions} requestOptions - Request-specific configuration.
680
+ *
681
+ * @throws {@link Samsara.UnauthorizedError}
682
+ * @throws {@link Samsara.NotFoundError}
683
+ * @throws {@link Samsara.MethodNotAllowedError}
684
+ * @throws {@link Samsara.TooManyRequestsError}
685
+ * @throws {@link Samsara.InternalServerError}
686
+ * @throws {@link Samsara.NotImplementedError}
687
+ * @throws {@link Samsara.BadGatewayError}
688
+ * @throws {@link Samsara.ServiceUnavailableError}
689
+ * @throws {@link Samsara.GatewayTimeoutError}
690
+ *
691
+ * @example
692
+ * await client.betaApIs.listDriverWorkflows()
693
+ */
694
+ listDriverWorkflows(request?: Samsara.ListDriverWorkflowsRequest, requestOptions?: BetaApIsClient.RequestOptions): core.HttpResponsePromise<Samsara.DriverWorkflowsListDriverWorkflowsResponseBody>;
695
+ private __listDriverWorkflows;
668
696
  /**
669
697
  * Returns the list of vendor categories available for maintenance vendors.
670
698
  *
@@ -1968,6 +1968,94 @@ export class BetaApIsClient {
1968
1968
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/fleet/drivers/workflow-assignments");
1969
1969
  });
1970
1970
  }
1971
+ /**
1972
+ * List the driver app workflows configured for the organization. Use the returned workflow IDs to reference workflows from the driver create/update APIs or from the driver workflow assignment API. Workflows are organization-scoped and unique per organization.
1973
+ *
1974
+ * <b>Rate limit:</b> 10 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
1975
+ *
1976
+ * To use this endpoint, select **Read Drivers** under the Drivers category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
1977
+ *
1978
+ *
1979
+ * **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.
1980
+ *
1981
+ * @param {Samsara.ListDriverWorkflowsRequest} request
1982
+ * @param {BetaApIsClient.RequestOptions} requestOptions - Request-specific configuration.
1983
+ *
1984
+ * @throws {@link Samsara.UnauthorizedError}
1985
+ * @throws {@link Samsara.NotFoundError}
1986
+ * @throws {@link Samsara.MethodNotAllowedError}
1987
+ * @throws {@link Samsara.TooManyRequestsError}
1988
+ * @throws {@link Samsara.InternalServerError}
1989
+ * @throws {@link Samsara.NotImplementedError}
1990
+ * @throws {@link Samsara.BadGatewayError}
1991
+ * @throws {@link Samsara.ServiceUnavailableError}
1992
+ * @throws {@link Samsara.GatewayTimeoutError}
1993
+ *
1994
+ * @example
1995
+ * await client.betaApIs.listDriverWorkflows()
1996
+ */
1997
+ listDriverWorkflows(request = {}, requestOptions) {
1998
+ return core.HttpResponsePromise.fromPromise(this.__listDriverWorkflows(request, requestOptions));
1999
+ }
2000
+ __listDriverWorkflows() {
2001
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
2002
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
2003
+ const { after, limit, workflowType } = request;
2004
+ const _queryParams = {
2005
+ after,
2006
+ limit,
2007
+ workflowType: workflowType != null ? workflowType : undefined,
2008
+ };
2009
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
2010
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "X-Samsara-Version": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
2011
+ const _response = yield core.fetcher({
2012
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SamsaraEnvironment.ProductionApi, "fleet/drivers/workflows"),
2013
+ method: "GET",
2014
+ headers: _headers,
2015
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
2016
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
2017
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
2018
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2019
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
2020
+ logging: this._options.logging,
2021
+ });
2022
+ if (_response.ok) {
2023
+ return {
2024
+ data: _response.body,
2025
+ rawResponse: _response.rawResponse,
2026
+ };
2027
+ }
2028
+ if (_response.error.reason === "status-code") {
2029
+ switch (_response.error.statusCode) {
2030
+ case 401:
2031
+ throw new Samsara.UnauthorizedError(_response.error.body, _response.rawResponse);
2032
+ case 404:
2033
+ throw new Samsara.NotFoundError(_response.error.body, _response.rawResponse);
2034
+ case 405:
2035
+ throw new Samsara.MethodNotAllowedError(_response.error.body, _response.rawResponse);
2036
+ case 429:
2037
+ throw new Samsara.TooManyRequestsError(_response.error.body, _response.rawResponse);
2038
+ case 500:
2039
+ throw new Samsara.InternalServerError(_response.error.body, _response.rawResponse);
2040
+ case 501:
2041
+ throw new Samsara.NotImplementedError(_response.error.body, _response.rawResponse);
2042
+ case 502:
2043
+ throw new Samsara.BadGatewayError(_response.error.body, _response.rawResponse);
2044
+ case 503:
2045
+ throw new Samsara.ServiceUnavailableError(_response.error.body, _response.rawResponse);
2046
+ case 504:
2047
+ throw new Samsara.GatewayTimeoutError(_response.error.body, _response.rawResponse);
2048
+ default:
2049
+ throw new errors.SamsaraError({
2050
+ statusCode: _response.error.statusCode,
2051
+ body: _response.error.body,
2052
+ rawResponse: _response.rawResponse,
2053
+ });
2054
+ }
2055
+ }
2056
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/fleet/drivers/workflows");
2057
+ });
2058
+ }
1971
2059
  /**
1972
2060
  * Returns the list of vendor categories available for maintenance vendors.
1973
2061
  *
@@ -0,0 +1,13 @@
1
+ import type * as Samsara from "../../../../index.mjs";
2
+ /**
3
+ * @example
4
+ * {}
5
+ */
6
+ export interface ListDriverWorkflowsRequest {
7
+ /** 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. */
8
+ after?: string;
9
+ /** The limit for how many objects will be in the response. Default and max for this value is 512 objects. */
10
+ limit?: number;
11
+ /** Filter the result to workflows of a specific type. When omitted, workflows of all types are returned. Valid values: `startOfDay`, `endOfDay`, `assetSelection`, `leaveAsset`, `ridershipSafetyCheck`, `stopArrival` */
12
+ workflowType?: Samsara.ListDriverWorkflowsRequestWorkflowType;
13
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -43,6 +43,7 @@ export type { JobsPatchJobRequestBody } from "./JobsPatchJobRequestBody.mjs";
43
43
  export type { ListAssetAssignmentsRequest } from "./ListAssetAssignmentsRequest.mjs";
44
44
  export type { ListAssociationsRequest } from "./ListAssociationsRequest.mjs";
45
45
  export type { ListDeviceRecoveryMissingAssetsRequest } from "./ListDeviceRecoveryMissingAssetsRequest.mjs";
46
+ export type { ListDriverWorkflowsRequest } from "./ListDriverWorkflowsRequest.mjs";
46
47
  export type { ListHubRouteTemplatesRequest } from "./ListHubRouteTemplatesRequest.mjs";
47
48
  export type { ListMaintenanceVendorsRequest } from "./ListMaintenanceVendorsRequest.mjs";
48
49
  export type { ListPlanOrdersRequest } from "./ListPlanOrdersRequest.mjs";
@@ -0,0 +1,9 @@
1
+ export declare const ListDriverWorkflowsRequestWorkflowType: {
2
+ readonly StartOfDay: "startOfDay";
3
+ readonly EndOfDay: "endOfDay";
4
+ readonly AssetSelection: "assetSelection";
5
+ readonly LeaveAsset: "leaveAsset";
6
+ readonly RidershipSafetyCheck: "ridershipSafetyCheck";
7
+ readonly StopArrival: "stopArrival";
8
+ };
9
+ export type ListDriverWorkflowsRequestWorkflowType = (typeof ListDriverWorkflowsRequestWorkflowType)[keyof typeof ListDriverWorkflowsRequestWorkflowType];
@@ -0,0 +1,9 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export const ListDriverWorkflowsRequestWorkflowType = {
3
+ StartOfDay: "startOfDay",
4
+ EndOfDay: "endOfDay",
5
+ AssetSelection: "assetSelection",
6
+ LeaveAsset: "leaveAsset",
7
+ RidershipSafetyCheck: "ridershipSafetyCheck",
8
+ StopArrival: "stopArrival",
9
+ };
@@ -4,3 +4,4 @@ export * from "./GetHosEldEventsRequestDriverActivationStatus.mjs";
4
4
  export * from "./GetJobsRequestStatus.mjs";
5
5
  export * from "./GetQualificationRecordsStreamRequestEntityType.mjs";
6
6
  export * from "./GetQualificationTypesRequestEntityType.mjs";
7
+ export * from "./ListDriverWorkflowsRequestWorkflowType.mjs";
@@ -4,3 +4,4 @@ export * from "./GetHosEldEventsRequestDriverActivationStatus.mjs";
4
4
  export * from "./GetJobsRequestStatus.mjs";
5
5
  export * from "./GetQualificationRecordsStreamRequestEntityType.mjs";
6
6
  export * from "./GetQualificationTypesRequestEntityType.mjs";
7
+ export * from "./ListDriverWorkflowsRequestWorkflowType.mjs";
@@ -46,6 +46,7 @@ export interface GetReadingsHistoryRequest {
46
46
  * * `dpfLampStatus` (DPF Lamp Status): Status of the Diesel Particulate Filter warning lamp. (values: off | on | blinking)
47
47
  * * `dpfSootLoadPercent` (DPF Soot Load): Diesel Particulate Filter soot load percentage. (percent)
48
48
  * * `ecuHistoryTotalRunTime` (ECU Total Run Time): Total engine run time from ECU in seconds. (second)
49
+ * * `ecuNativeDoorStatus` (Door Status (ECU)): Indicates whether the vehicle door is open or closed based on the native ECU diagnostic signal. (values: unknown | closed | open)
49
50
  * * `engineExhaustTemperature` (Engine Exhaust Temperature): Temperature of the engine exhaust (celsius)
50
51
  * * `engineHours` (Engine Hours (ECU)): Represents the total engine runtime in hours as reported by the ECU. (second)
51
52
  * * `engineHoursDigioBased` (Engine Hours (Synthetic - Aux input)): Represents the synthetic total engine runtime in hours based on auxiliary input. (millisecond)
@@ -46,6 +46,7 @@ export interface GetReadingsSnapshotRequest {
46
46
  * * `dpfLampStatus` (DPF Lamp Status): Status of the Diesel Particulate Filter warning lamp. (values: off | on | blinking)
47
47
  * * `dpfSootLoadPercent` (DPF Soot Load): Diesel Particulate Filter soot load percentage. (percent)
48
48
  * * `ecuHistoryTotalRunTime` (ECU Total Run Time): Total engine run time from ECU in seconds. (second)
49
+ * * `ecuNativeDoorStatus` (Door Status (ECU)): Indicates whether the vehicle door is open or closed based on the native ECU diagnostic signal. (values: unknown | closed | open)
49
50
  * * `engineExhaustTemperature` (Engine Exhaust Temperature): Temperature of the engine exhaust (celsius)
50
51
  * * `engineHours` (Engine Hours (ECU)): Represents the total engine runtime in hours as reported by the ECU. (second)
51
52
  * * `engineHoursDigioBased` (Engine Hours (Synthetic - Aux input)): Represents the synthetic total engine runtime in hours based on auxiliary input. (millisecond)
@@ -8,6 +8,7 @@ export interface ActionObjectRequestBody {
8
8
  * The id of the of the action type. Reference the following list for the ids:
9
9
  * The following action types are in Beta:
10
10
  * Driver App Push = 5
11
+ * Functions = 14
11
12
  * The following action types are Stable:
12
13
  * Notification (Email, Text, Samsara Fleet Push) = 1
13
14
  * Dashboard Notification = 3
@@ -8,6 +8,7 @@ export interface ActionObjectResponseBody {
8
8
  * The id of the of the action type. Reference the following list for the ids:
9
9
  * The following action types are in Beta:
10
10
  * Driver App Push = 5
11
+ * Functions = 14
11
12
  * The following action types are Stable:
12
13
  * Notification (Email, Text, Samsara Fleet Push) = 1
13
14
  * Dashboard Notification = 3
@@ -0,0 +1,23 @@
1
+ /**
2
+ * A driver app workflow configured for the organization.
3
+ */
4
+ export interface DriverWorkflowObjectResponseBody {
5
+ /** The unique identifier of the workflow. Use this value when referring to the workflow from other APIs (e.g. driver create/update or driver workflow assignment). */
6
+ id: string;
7
+ /** The name of the workflow as configured by the organization. */
8
+ name: string;
9
+ /** The type of workflow. Indicates which point in the driver's day the workflow is triggered at. Valid values: `startOfDay`, `endOfDay`, `assetSelection`, `leaveAsset`, `ridershipSafetyCheck`, `stopArrival` */
10
+ workflowType: DriverWorkflowObjectResponseBody.WorkflowType;
11
+ }
12
+ export declare namespace DriverWorkflowObjectResponseBody {
13
+ /** The type of workflow. Indicates which point in the driver's day the workflow is triggered at. Valid values: `startOfDay`, `endOfDay`, `assetSelection`, `leaveAsset`, `ridershipSafetyCheck`, `stopArrival` */
14
+ const WorkflowType: {
15
+ readonly StartOfDay: "startOfDay";
16
+ readonly EndOfDay: "endOfDay";
17
+ readonly AssetSelection: "assetSelection";
18
+ readonly LeaveAsset: "leaveAsset";
19
+ readonly RidershipSafetyCheck: "ridershipSafetyCheck";
20
+ readonly StopArrival: "stopArrival";
21
+ };
22
+ type WorkflowType = (typeof WorkflowType)[keyof typeof WorkflowType];
23
+ }
@@ -0,0 +1,13 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export var DriverWorkflowObjectResponseBody;
3
+ (function (DriverWorkflowObjectResponseBody) {
4
+ /** The type of workflow. Indicates which point in the driver's day the workflow is triggered at. Valid values: `startOfDay`, `endOfDay`, `assetSelection`, `leaveAsset`, `ridershipSafetyCheck`, `stopArrival` */
5
+ DriverWorkflowObjectResponseBody.WorkflowType = {
6
+ StartOfDay: "startOfDay",
7
+ EndOfDay: "endOfDay",
8
+ AssetSelection: "assetSelection",
9
+ LeaveAsset: "leaveAsset",
10
+ RidershipSafetyCheck: "ridershipSafetyCheck",
11
+ StopArrival: "stopArrival",
12
+ };
13
+ })(DriverWorkflowObjectResponseBody || (DriverWorkflowObjectResponseBody = {}));
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Bad Gateway
3
+ */
4
+ export interface DriverWorkflowsListDriverWorkflowsBadGatewayErrorResponseBody {
5
+ /** Message of error */
6
+ message: string;
7
+ /** The request ID; used when reaching out to support for issues with requests. */
8
+ requestId: string;
9
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Gateway timeout
3
+ */
4
+ export interface DriverWorkflowsListDriverWorkflowsGatewayTimeoutErrorResponseBody {
5
+ /** Message of error */
6
+ message: string;
7
+ /** The request ID; used when reaching out to support for issues with requests. */
8
+ requestId: string;
9
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * An internal server error occurred
3
+ */
4
+ export interface DriverWorkflowsListDriverWorkflowsInternalServerErrorResponseBody {
5
+ /** Message of error */
6
+ message: string;
7
+ /** The request ID; used when reaching out to support for issues with requests. */
8
+ requestId: string;
9
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Method not allowed
3
+ */
4
+ export interface DriverWorkflowsListDriverWorkflowsMethodNotAllowedErrorResponseBody {
5
+ /** Message of error */
6
+ message: string;
7
+ /** The request ID; used when reaching out to support for issues with requests. */
8
+ requestId: string;
9
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Resource not found
3
+ */
4
+ export interface DriverWorkflowsListDriverWorkflowsNotFoundErrorResponseBody {
5
+ /** Message of error */
6
+ message: string;
7
+ /** The request ID; used when reaching out to support for issues with requests. */
8
+ requestId: string;
9
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Requested endpoint is not yet implemented
3
+ */
4
+ export interface DriverWorkflowsListDriverWorkflowsNotImplementedErrorResponseBody {
5
+ /** Message of error */
6
+ message: string;
7
+ /** The request ID; used when reaching out to support for issues with requests. */
8
+ requestId: string;
9
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,6 @@
1
+ import type * as Samsara from "../index.mjs";
2
+ export interface DriverWorkflowsListDriverWorkflowsResponseBody {
3
+ /** The workflows configured for the organization. */
4
+ data: Samsara.DriverWorkflowObjectResponseBody[];
5
+ pagination: Samsara.GoaPaginationResponseResponseBody;
6
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Service unavailable
3
+ */
4
+ export interface DriverWorkflowsListDriverWorkflowsServiceUnavailableErrorResponseBody {
5
+ /** Message of error */
6
+ message: string;
7
+ /** The request ID; used when reaching out to support for issues with requests. */
8
+ requestId: string;
9
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Too many requests
3
+ */
4
+ export interface DriverWorkflowsListDriverWorkflowsTooManyRequestsErrorResponseBody {
5
+ /** Message of error */
6
+ message: string;
7
+ /** The request ID; used when reaching out to support for issues with requests. */
8
+ requestId: string;
9
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Unauthorized
3
+ */
4
+ export interface DriverWorkflowsListDriverWorkflowsUnauthorizedErrorResponseBody {
5
+ /** Message of error */
6
+ message: string;
7
+ /** The request ID; used when reaching out to support for issues with requests. */
8
+ requestId: string;
9
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -729,6 +729,17 @@ export * from "./DriverWorkflowAssignmentsPostDriverWorkflowAssignmentResponseBo
729
729
  export * from "./DriverWorkflowAssignmentsPostDriverWorkflowAssignmentServiceUnavailableErrorResponseBody.mjs";
730
730
  export * from "./DriverWorkflowAssignmentsPostDriverWorkflowAssignmentTooManyRequestsErrorResponseBody.mjs";
731
731
  export * from "./DriverWorkflowAssignmentsPostDriverWorkflowAssignmentUnauthorizedErrorResponseBody.mjs";
732
+ export * from "./DriverWorkflowObjectResponseBody.mjs";
733
+ export * from "./DriverWorkflowsListDriverWorkflowsBadGatewayErrorResponseBody.mjs";
734
+ export * from "./DriverWorkflowsListDriverWorkflowsGatewayTimeoutErrorResponseBody.mjs";
735
+ export * from "./DriverWorkflowsListDriverWorkflowsInternalServerErrorResponseBody.mjs";
736
+ export * from "./DriverWorkflowsListDriverWorkflowsMethodNotAllowedErrorResponseBody.mjs";
737
+ export * from "./DriverWorkflowsListDriverWorkflowsNotFoundErrorResponseBody.mjs";
738
+ export * from "./DriverWorkflowsListDriverWorkflowsNotImplementedErrorResponseBody.mjs";
739
+ export * from "./DriverWorkflowsListDriverWorkflowsResponseBody.mjs";
740
+ export * from "./DriverWorkflowsListDriverWorkflowsServiceUnavailableErrorResponseBody.mjs";
741
+ export * from "./DriverWorkflowsListDriverWorkflowsTooManyRequestsErrorResponseBody.mjs";
742
+ export * from "./DriverWorkflowsListDriverWorkflowsUnauthorizedErrorResponseBody.mjs";
732
743
  export * from "./DriveTimeDurationMs.mjs";
733
744
  export * from "./DutyStatusDurationObjectResponseBody.mjs";
734
745
  export * from "./Dvir.mjs";
@@ -729,6 +729,17 @@ export * from "./DriverWorkflowAssignmentsPostDriverWorkflowAssignmentResponseBo
729
729
  export * from "./DriverWorkflowAssignmentsPostDriverWorkflowAssignmentServiceUnavailableErrorResponseBody.mjs";
730
730
  export * from "./DriverWorkflowAssignmentsPostDriverWorkflowAssignmentTooManyRequestsErrorResponseBody.mjs";
731
731
  export * from "./DriverWorkflowAssignmentsPostDriverWorkflowAssignmentUnauthorizedErrorResponseBody.mjs";
732
+ export * from "./DriverWorkflowObjectResponseBody.mjs";
733
+ export * from "./DriverWorkflowsListDriverWorkflowsBadGatewayErrorResponseBody.mjs";
734
+ export * from "./DriverWorkflowsListDriverWorkflowsGatewayTimeoutErrorResponseBody.mjs";
735
+ export * from "./DriverWorkflowsListDriverWorkflowsInternalServerErrorResponseBody.mjs";
736
+ export * from "./DriverWorkflowsListDriverWorkflowsMethodNotAllowedErrorResponseBody.mjs";
737
+ export * from "./DriverWorkflowsListDriverWorkflowsNotFoundErrorResponseBody.mjs";
738
+ export * from "./DriverWorkflowsListDriverWorkflowsNotImplementedErrorResponseBody.mjs";
739
+ export * from "./DriverWorkflowsListDriverWorkflowsResponseBody.mjs";
740
+ export * from "./DriverWorkflowsListDriverWorkflowsServiceUnavailableErrorResponseBody.mjs";
741
+ export * from "./DriverWorkflowsListDriverWorkflowsTooManyRequestsErrorResponseBody.mjs";
742
+ export * from "./DriverWorkflowsListDriverWorkflowsUnauthorizedErrorResponseBody.mjs";
732
743
  export * from "./DriveTimeDurationMs.mjs";
733
744
  export * from "./DutyStatusDurationObjectResponseBody.mjs";
734
745
  export * from "./Dvir.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "11.10.2";
1
+ export declare const SDK_VERSION = "11.11.1";
@@ -1 +1 @@
1
- export const SDK_VERSION = "11.10.2";
1
+ export const SDK_VERSION = "11.11.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@samsarahq/samsara",
3
- "version": "11.10.2",
3
+ "version": "11.11.1",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
package/reference.md CHANGED
@@ -3065,6 +3065,76 @@ await client.betaApIs.postDriverWorkflowAssignment({
3065
3065
  </dl>
3066
3066
 
3067
3067
 
3068
+ </dd>
3069
+ </dl>
3070
+ </details>
3071
+
3072
+ <details><summary><code>client.betaApIs.<a href="/src/api/resources/betaApIs/client/Client.ts">listDriverWorkflows</a>({ ...params }) -> Samsara.DriverWorkflowsListDriverWorkflowsResponseBody</code></summary>
3073
+ <dl>
3074
+ <dd>
3075
+
3076
+ #### 📝 Description
3077
+
3078
+ <dl>
3079
+ <dd>
3080
+
3081
+ <dl>
3082
+ <dd>
3083
+
3084
+ List the driver app workflows configured for the organization. Use the returned workflow IDs to reference workflows from the driver create/update APIs or from the driver workflow assignment API. Workflows are organization-scoped and unique per organization.
3085
+
3086
+ <b>Rate limit:</b> 10 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
3087
+
3088
+ To use this endpoint, select **Read Drivers** under the Drivers category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
3089
+
3090
+
3091
+ **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.
3092
+ </dd>
3093
+ </dl>
3094
+ </dd>
3095
+ </dl>
3096
+
3097
+ #### 🔌 Usage
3098
+
3099
+ <dl>
3100
+ <dd>
3101
+
3102
+ <dl>
3103
+ <dd>
3104
+
3105
+ ```typescript
3106
+ await client.betaApIs.listDriverWorkflows();
3107
+
3108
+ ```
3109
+ </dd>
3110
+ </dl>
3111
+ </dd>
3112
+ </dl>
3113
+
3114
+ #### ⚙️ Parameters
3115
+
3116
+ <dl>
3117
+ <dd>
3118
+
3119
+ <dl>
3120
+ <dd>
3121
+
3122
+ **request:** `Samsara.ListDriverWorkflowsRequest`
3123
+
3124
+ </dd>
3125
+ </dl>
3126
+
3127
+ <dl>
3128
+ <dd>
3129
+
3130
+ **requestOptions:** `BetaApIsClient.RequestOptions`
3131
+
3132
+ </dd>
3133
+ </dl>
3134
+ </dd>
3135
+ </dl>
3136
+
3137
+
3068
3138
  </dd>
3069
3139
  </dl>
3070
3140
  </details>