@samsarahq/samsara 7.1.0 → 7.2.0

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 (78) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/betaApIs/client/Client.d.ts +31 -0
  3. package/dist/cjs/api/resources/betaApIs/client/Client.js +88 -0
  4. package/dist/cjs/api/resources/betaApIs/client/requests/ResolveAssignmentByDetailsResolveAssignmentByDetailsRequestBody.d.ts +13 -0
  5. package/dist/cjs/api/resources/betaApIs/client/requests/ResolveAssignmentByDetailsResolveAssignmentByDetailsRequestBody.js +3 -0
  6. package/dist/cjs/api/resources/betaApIs/client/requests/index.d.ts +1 -0
  7. package/dist/cjs/api/types/DvirDefectsObjectV20220913ResponseBody.d.ts +13 -0
  8. package/dist/cjs/api/types/DvirDefectsObjectV20220913ResponseBody.js +10 -0
  9. package/dist/cjs/api/types/MissingStateResponseBody.d.ts +10 -2
  10. package/dist/cjs/api/types/MissingStateResponseBody.js +9 -0
  11. package/dist/cjs/api/types/RecoveryStateResponseBody.d.ts +10 -2
  12. package/dist/cjs/api/types/RecoveryStateResponseBody.js +9 -0
  13. package/dist/cjs/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsBadGatewayErrorResponseBody.d.ts +9 -0
  14. package/dist/cjs/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsBadGatewayErrorResponseBody.js +3 -0
  15. package/dist/cjs/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsGatewayTimeoutErrorResponseBody.d.ts +9 -0
  16. package/dist/cjs/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsGatewayTimeoutErrorResponseBody.js +3 -0
  17. package/dist/cjs/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsInternalServerErrorResponseBody.d.ts +9 -0
  18. package/dist/cjs/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsInternalServerErrorResponseBody.js +3 -0
  19. package/dist/cjs/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsMethodNotAllowedErrorResponseBody.d.ts +9 -0
  20. package/dist/cjs/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsMethodNotAllowedErrorResponseBody.js +3 -0
  21. package/dist/cjs/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsNotFoundErrorResponseBody.d.ts +9 -0
  22. package/dist/cjs/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsNotFoundErrorResponseBody.js +3 -0
  23. package/dist/cjs/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsNotImplementedErrorResponseBody.d.ts +9 -0
  24. package/dist/cjs/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsNotImplementedErrorResponseBody.js +3 -0
  25. package/dist/cjs/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsResponseBody.d.ts +4 -0
  26. package/dist/cjs/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsResponseBody.js +3 -0
  27. package/dist/cjs/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsServiceUnavailableErrorResponseBody.d.ts +9 -0
  28. package/dist/cjs/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsServiceUnavailableErrorResponseBody.js +3 -0
  29. package/dist/cjs/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsTooManyRequestsErrorResponseBody.d.ts +9 -0
  30. package/dist/cjs/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsTooManyRequestsErrorResponseBody.js +3 -0
  31. package/dist/cjs/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsUnauthorizedErrorResponseBody.d.ts +9 -0
  32. package/dist/cjs/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsUnauthorizedErrorResponseBody.js +3 -0
  33. package/dist/cjs/api/types/ResolveAssignmentByDetailsResponseBodyResponseBody.d.ts +9 -0
  34. package/dist/cjs/api/types/ResolveAssignmentByDetailsResponseBodyResponseBody.js +3 -0
  35. package/dist/cjs/api/types/index.d.ts +11 -0
  36. package/dist/cjs/api/types/index.js +11 -0
  37. package/dist/cjs/version.d.ts +1 -1
  38. package/dist/cjs/version.js +1 -1
  39. package/dist/esm/BaseClient.mjs +2 -2
  40. package/dist/esm/api/resources/betaApIs/client/Client.d.mts +31 -0
  41. package/dist/esm/api/resources/betaApIs/client/Client.mjs +88 -0
  42. package/dist/esm/api/resources/betaApIs/client/requests/ResolveAssignmentByDetailsResolveAssignmentByDetailsRequestBody.d.mts +13 -0
  43. package/dist/esm/api/resources/betaApIs/client/requests/ResolveAssignmentByDetailsResolveAssignmentByDetailsRequestBody.mjs +2 -0
  44. package/dist/esm/api/resources/betaApIs/client/requests/index.d.mts +1 -0
  45. package/dist/esm/api/types/DvirDefectsObjectV20220913ResponseBody.d.mts +13 -0
  46. package/dist/esm/api/types/DvirDefectsObjectV20220913ResponseBody.mjs +9 -1
  47. package/dist/esm/api/types/MissingStateResponseBody.d.mts +10 -2
  48. package/dist/esm/api/types/MissingStateResponseBody.mjs +8 -1
  49. package/dist/esm/api/types/RecoveryStateResponseBody.d.mts +10 -2
  50. package/dist/esm/api/types/RecoveryStateResponseBody.mjs +8 -1
  51. package/dist/esm/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsBadGatewayErrorResponseBody.d.mts +9 -0
  52. package/dist/esm/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsBadGatewayErrorResponseBody.mjs +2 -0
  53. package/dist/esm/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsGatewayTimeoutErrorResponseBody.d.mts +9 -0
  54. package/dist/esm/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsGatewayTimeoutErrorResponseBody.mjs +2 -0
  55. package/dist/esm/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsInternalServerErrorResponseBody.d.mts +9 -0
  56. package/dist/esm/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsInternalServerErrorResponseBody.mjs +2 -0
  57. package/dist/esm/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsMethodNotAllowedErrorResponseBody.d.mts +9 -0
  58. package/dist/esm/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsMethodNotAllowedErrorResponseBody.mjs +2 -0
  59. package/dist/esm/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsNotFoundErrorResponseBody.d.mts +9 -0
  60. package/dist/esm/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsNotFoundErrorResponseBody.mjs +2 -0
  61. package/dist/esm/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsNotImplementedErrorResponseBody.d.mts +9 -0
  62. package/dist/esm/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsNotImplementedErrorResponseBody.mjs +2 -0
  63. package/dist/esm/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsResponseBody.d.mts +4 -0
  64. package/dist/esm/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsResponseBody.mjs +2 -0
  65. package/dist/esm/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsServiceUnavailableErrorResponseBody.d.mts +9 -0
  66. package/dist/esm/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsServiceUnavailableErrorResponseBody.mjs +2 -0
  67. package/dist/esm/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsTooManyRequestsErrorResponseBody.d.mts +9 -0
  68. package/dist/esm/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsTooManyRequestsErrorResponseBody.mjs +2 -0
  69. package/dist/esm/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsUnauthorizedErrorResponseBody.d.mts +9 -0
  70. package/dist/esm/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsUnauthorizedErrorResponseBody.mjs +2 -0
  71. package/dist/esm/api/types/ResolveAssignmentByDetailsResponseBodyResponseBody.d.mts +9 -0
  72. package/dist/esm/api/types/ResolveAssignmentByDetailsResponseBodyResponseBody.mjs +2 -0
  73. package/dist/esm/api/types/index.d.mts +11 -0
  74. package/dist/esm/api/types/index.mjs +11 -0
  75. package/dist/esm/version.d.mts +1 -1
  76. package/dist/esm/version.mjs +1 -1
  77. package/package.json +1 -1
  78. package/reference.md +73 -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": "7.1.0",
48
- "User-Agent": "@samsarahq/samsara/7.1.0",
47
+ "X-Fern-SDK-Version": "7.2.0",
48
+ "User-Agent": "@samsarahq/samsara/7.2.0",
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",
@@ -640,6 +640,37 @@ export declare class BetaApIsClient {
640
640
  */
641
641
  listCarbCtcVehicleHistory(request: Samsara.ListCarbCtcVehicleHistoryRequest, requestOptions?: BetaApIsClient.RequestOptions): core.HttpResponsePromise<Samsara.CarbCtcListCarbCtcVehicleHistoryResponseBody>;
642
642
  private __listCarbCtcVehicleHistory;
643
+ /**
644
+ * Resolves a driver by name within an organization via voice sign-in, then creates a driver-vehicle assignment via the Driver Assignment Service.
645
+ *
646
+ * <b>Rate limit:</b> 100 requests/min (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
647
+ *
648
+ * To use this endpoint, select **Write Assignments** under the Assignments 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>
649
+ *
650
+ *
651
+ * **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.
652
+ *
653
+ * @param {Samsara.ResolveAssignmentByDetailsResolveAssignmentByDetailsRequestBody} request
654
+ * @param {BetaApIsClient.RequestOptions} requestOptions - Request-specific configuration.
655
+ *
656
+ * @throws {@link Samsara.UnauthorizedError}
657
+ * @throws {@link Samsara.NotFoundError}
658
+ * @throws {@link Samsara.MethodNotAllowedError}
659
+ * @throws {@link Samsara.TooManyRequestsError}
660
+ * @throws {@link Samsara.InternalServerError}
661
+ * @throws {@link Samsara.NotImplementedError}
662
+ * @throws {@link Samsara.BadGatewayError}
663
+ * @throws {@link Samsara.ServiceUnavailableError}
664
+ * @throws {@link Samsara.GatewayTimeoutError}
665
+ *
666
+ * @example
667
+ * await client.betaApIs.resolveAssignmentByDetails({
668
+ * driverName: "Jane Doe",
669
+ * vehicleId: "281474978683353"
670
+ * })
671
+ */
672
+ resolveAssignmentByDetails(request: Samsara.ResolveAssignmentByDetailsResolveAssignmentByDetailsRequestBody, requestOptions?: BetaApIsClient.RequestOptions): core.HttpResponsePromise<Samsara.ResolveAssignmentByDetailsResolveAssignmentByDetailsResponseBody>;
673
+ private __resolveAssignmentByDetails;
643
674
  /**
644
675
  * Returns the list of vendor categories available for maintenance vendors.
645
676
  *
@@ -1949,6 +1949,94 @@ class BetaApIsClient {
1949
1949
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/fleet/carb-ctc/vehicles/history");
1950
1950
  });
1951
1951
  }
1952
+ /**
1953
+ * Resolves a driver by name within an organization via voice sign-in, then creates a driver-vehicle assignment via the Driver Assignment Service.
1954
+ *
1955
+ * <b>Rate limit:</b> 100 requests/min (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
1956
+ *
1957
+ * To use this endpoint, select **Write Assignments** under the Assignments 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>
1958
+ *
1959
+ *
1960
+ * **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.
1961
+ *
1962
+ * @param {Samsara.ResolveAssignmentByDetailsResolveAssignmentByDetailsRequestBody} request
1963
+ * @param {BetaApIsClient.RequestOptions} requestOptions - Request-specific configuration.
1964
+ *
1965
+ * @throws {@link Samsara.UnauthorizedError}
1966
+ * @throws {@link Samsara.NotFoundError}
1967
+ * @throws {@link Samsara.MethodNotAllowedError}
1968
+ * @throws {@link Samsara.TooManyRequestsError}
1969
+ * @throws {@link Samsara.InternalServerError}
1970
+ * @throws {@link Samsara.NotImplementedError}
1971
+ * @throws {@link Samsara.BadGatewayError}
1972
+ * @throws {@link Samsara.ServiceUnavailableError}
1973
+ * @throws {@link Samsara.GatewayTimeoutError}
1974
+ *
1975
+ * @example
1976
+ * await client.betaApIs.resolveAssignmentByDetails({
1977
+ * driverName: "Jane Doe",
1978
+ * vehicleId: "281474978683353"
1979
+ * })
1980
+ */
1981
+ resolveAssignmentByDetails(request, requestOptions) {
1982
+ return core.HttpResponsePromise.fromPromise(this.__resolveAssignmentByDetails(request, requestOptions));
1983
+ }
1984
+ __resolveAssignmentByDetails(request, requestOptions) {
1985
+ return __awaiter(this, void 0, void 0, function* () {
1986
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
1987
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
1988
+ 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);
1989
+ const _response = yield core.fetcher({
1990
+ 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/voice-sign-in/resolve-assignment"),
1991
+ method: "POST",
1992
+ headers: _headers,
1993
+ contentType: "application/json",
1994
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1995
+ requestType: "json",
1996
+ body: request,
1997
+ 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,
1998
+ 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,
1999
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2000
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
2001
+ logging: this._options.logging,
2002
+ });
2003
+ if (_response.ok) {
2004
+ return {
2005
+ data: _response.body,
2006
+ rawResponse: _response.rawResponse,
2007
+ };
2008
+ }
2009
+ if (_response.error.reason === "status-code") {
2010
+ switch (_response.error.statusCode) {
2011
+ case 401:
2012
+ throw new Samsara.UnauthorizedError(_response.error.body, _response.rawResponse);
2013
+ case 404:
2014
+ throw new Samsara.NotFoundError(_response.error.body, _response.rawResponse);
2015
+ case 405:
2016
+ throw new Samsara.MethodNotAllowedError(_response.error.body, _response.rawResponse);
2017
+ case 429:
2018
+ throw new Samsara.TooManyRequestsError(_response.error.body, _response.rawResponse);
2019
+ case 500:
2020
+ throw new Samsara.InternalServerError(_response.error.body, _response.rawResponse);
2021
+ case 501:
2022
+ throw new Samsara.NotImplementedError(_response.error.body, _response.rawResponse);
2023
+ case 502:
2024
+ throw new Samsara.BadGatewayError(_response.error.body, _response.rawResponse);
2025
+ case 503:
2026
+ throw new Samsara.ServiceUnavailableError(_response.error.body, _response.rawResponse);
2027
+ case 504:
2028
+ throw new Samsara.GatewayTimeoutError(_response.error.body, _response.rawResponse);
2029
+ default:
2030
+ throw new errors.SamsaraError({
2031
+ statusCode: _response.error.statusCode,
2032
+ body: _response.error.body,
2033
+ rawResponse: _response.rawResponse,
2034
+ });
2035
+ }
2036
+ }
2037
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/fleet/drivers/voice-sign-in/resolve-assignment");
2038
+ });
2039
+ }
1952
2040
  /**
1953
2041
  * Returns the list of vendor categories available for maintenance vendors.
1954
2042
  *
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * driverName: "Jane Doe",
5
+ * vehicleId: "281474978683353"
6
+ * }
7
+ */
8
+ export interface ResolveAssignmentByDetailsResolveAssignmentByDetailsRequestBody {
9
+ /** The full name of the driver to resolve. */
10
+ driverName: string;
11
+ /** The vehicle ID. This can be either a unique Samsara ID or an external ID for the vehicle. */
12
+ vehicleId: string;
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 });
@@ -58,6 +58,7 @@ export type { QualificationsPostQualificationRecordRequestBody } from "./Qualifi
58
58
  export type { QualificationsUnarchiveQualificationRecordRequestBody } from "./QualificationsUnarchiveQualificationRecordRequestBody.js";
59
59
  export type { ReadingsPostReadingsRequestBody } from "./ReadingsPostReadingsRequestBody.js";
60
60
  export type { ReportsCreateReportRunRequestBody } from "./ReportsCreateReportRunRequestBody.js";
61
+ export type { ResolveAssignmentByDetailsResolveAssignmentByDetailsRequestBody } from "./ResolveAssignmentByDetailsResolveAssignmentByDetailsRequestBody.js";
61
62
  export type { RidershipAccountsCreateRidershipAccountRequestBody } from "./RidershipAccountsCreateRidershipAccountRequestBody.js";
62
63
  export type { RidershipAccountsUpdateRidershipAccountRequestBody } from "./RidershipAccountsUpdateRidershipAccountRequestBody.js";
63
64
  export { RidershipPassengersCreateRidershipPassengerRequestBody } from "./RidershipPassengersCreateRidershipPassengerRequestBody.js";
@@ -7,8 +7,12 @@ export interface DvirDefectsObjectV20220913ResponseBody {
7
7
  comment?: string | undefined;
8
8
  /** Time when the defect was created. UTC timestamp in RFC 3339 format. */
9
9
  createdAtTime: string;
10
+ /** The severity of the DVIR defect. Valid values: `minor`, `major`, `unspecified` */
11
+ defectSeverity?: DvirDefectsObjectV20220913ResponseBody.DefectSeverity | undefined;
10
12
  /** The type of DVIR defect. */
11
13
  defectType: string;
14
+ /** The ID of the DVIR defect type. */
15
+ defectTypeId?: string | undefined;
12
16
  /** The ID of the defect. */
13
17
  id: string;
14
18
  /** Signifies if this defect is resolved. */
@@ -23,3 +27,12 @@ export interface DvirDefectsObjectV20220913ResponseBody {
23
27
  trailer?: Samsara.GoaTrailerTinyResponseResponseBody | undefined;
24
28
  vehicle?: Samsara.VehicleWithGatewayTinyResponseResponseBody | undefined;
25
29
  }
30
+ export declare namespace DvirDefectsObjectV20220913ResponseBody {
31
+ /** The severity of the DVIR defect. Valid values: `minor`, `major`, `unspecified` */
32
+ const DefectSeverity: {
33
+ readonly Minor: "minor";
34
+ readonly Major: "major";
35
+ readonly Unspecified: "unspecified";
36
+ };
37
+ type DefectSeverity = (typeof DefectSeverity)[keyof typeof DefectSeverity];
38
+ }
@@ -1,3 +1,13 @@
1
1
  "use strict";
2
2
  // This file was auto-generated by Fern from our API Definition.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.DvirDefectsObjectV20220913ResponseBody = void 0;
5
+ var DvirDefectsObjectV20220913ResponseBody;
6
+ (function (DvirDefectsObjectV20220913ResponseBody) {
7
+ /** The severity of the DVIR defect. Valid values: `minor`, `major`, `unspecified` */
8
+ DvirDefectsObjectV20220913ResponseBody.DefectSeverity = {
9
+ Minor: "minor",
10
+ Major: "major",
11
+ Unspecified: "unspecified",
12
+ };
13
+ })(DvirDefectsObjectV20220913ResponseBody || (exports.DvirDefectsObjectV20220913ResponseBody = DvirDefectsObjectV20220913ResponseBody = {}));
@@ -11,10 +11,18 @@ export interface MissingStateResponseBody {
11
11
  note?: string | undefined;
12
12
  /** Users subscribed to location update notifications for this asset. */
13
13
  notification_recipients?: Samsara.NotificationRecipientResponseResponseBody[] | undefined;
14
+ /** The source of the last update to this recovery state. Defaults to `dashboard` if not explicitly set. Valid values: `dashboard`, `api` */
15
+ update_source?: MissingStateResponseBody.UpdateSource | undefined;
14
16
  /** Timestamp when the asset was marked as missing, in milliseconds since epoch. */
15
17
  updated_at_ms: number;
16
18
  /** The ID of the user who marked the asset as missing. */
17
19
  updated_by_user_id?: number | undefined;
18
- /** The unique UUID of this recovery state record. */
19
- uuid: string;
20
+ }
21
+ export declare namespace MissingStateResponseBody {
22
+ /** The source of the last update to this recovery state. Defaults to `dashboard` if not explicitly set. Valid values: `dashboard`, `api` */
23
+ const UpdateSource: {
24
+ readonly Dashboard: "dashboard";
25
+ readonly Api: "api";
26
+ };
27
+ type UpdateSource = (typeof UpdateSource)[keyof typeof UpdateSource];
20
28
  }
@@ -1,3 +1,12 @@
1
1
  "use strict";
2
2
  // This file was auto-generated by Fern from our API Definition.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.MissingStateResponseBody = void 0;
5
+ var MissingStateResponseBody;
6
+ (function (MissingStateResponseBody) {
7
+ /** The source of the last update to this recovery state. Defaults to `dashboard` if not explicitly set. Valid values: `dashboard`, `api` */
8
+ MissingStateResponseBody.UpdateSource = {
9
+ Dashboard: "dashboard",
10
+ Api: "api",
11
+ };
12
+ })(MissingStateResponseBody || (exports.MissingStateResponseBody = MissingStateResponseBody = {}));
@@ -13,10 +13,18 @@ export interface RecoveryStateResponseBody {
13
13
  notification_recipients?: Samsara.NotificationRecipientResponseResponseBody[] | undefined;
14
14
  /** Photos associated with the recovery event. URLs are temporary and expire at url_expires_at_ms. */
15
15
  recovery_photos?: Samsara.RecoveryPhotoResponseBody[] | undefined;
16
+ /** The source of the last update to this recovery state. Defaults to `dashboard` if not explicitly set. Valid values: `dashboard`, `api` */
17
+ update_source?: RecoveryStateResponseBody.UpdateSource | undefined;
16
18
  /** Timestamp when the recovery state was last updated, in milliseconds since epoch. */
17
19
  updated_at_ms: number;
18
20
  /** The ID of the user who last updated the recovery state. */
19
21
  updated_by_user_id?: number | undefined;
20
- /** The unique UUID of this recovery state record. */
21
- uuid: string;
22
+ }
23
+ export declare namespace RecoveryStateResponseBody {
24
+ /** The source of the last update to this recovery state. Defaults to `dashboard` if not explicitly set. Valid values: `dashboard`, `api` */
25
+ const UpdateSource: {
26
+ readonly Dashboard: "dashboard";
27
+ readonly Api: "api";
28
+ };
29
+ type UpdateSource = (typeof UpdateSource)[keyof typeof UpdateSource];
22
30
  }
@@ -1,3 +1,12 @@
1
1
  "use strict";
2
2
  // This file was auto-generated by Fern from our API Definition.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.RecoveryStateResponseBody = void 0;
5
+ var RecoveryStateResponseBody;
6
+ (function (RecoveryStateResponseBody) {
7
+ /** The source of the last update to this recovery state. Defaults to `dashboard` if not explicitly set. Valid values: `dashboard`, `api` */
8
+ RecoveryStateResponseBody.UpdateSource = {
9
+ Dashboard: "dashboard",
10
+ Api: "api",
11
+ };
12
+ })(RecoveryStateResponseBody || (exports.RecoveryStateResponseBody = RecoveryStateResponseBody = {}));
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Bad Gateway
3
+ */
4
+ export interface ResolveAssignmentByDetailsResolveAssignmentByDetailsBadGatewayErrorResponseBody {
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 ResolveAssignmentByDetailsResolveAssignmentByDetailsGatewayTimeoutErrorResponseBody {
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 ResolveAssignmentByDetailsResolveAssignmentByDetailsInternalServerErrorResponseBody {
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 ResolveAssignmentByDetailsResolveAssignmentByDetailsMethodNotAllowedErrorResponseBody {
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 ResolveAssignmentByDetailsResolveAssignmentByDetailsNotFoundErrorResponseBody {
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 ResolveAssignmentByDetailsResolveAssignmentByDetailsNotImplementedErrorResponseBody {
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,4 @@
1
+ import type * as Samsara from "../index.js";
2
+ export interface ResolveAssignmentByDetailsResolveAssignmentByDetailsResponseBody {
3
+ data: Samsara.ResolveAssignmentByDetailsResponseBodyResponseBody;
4
+ }
@@ -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 ResolveAssignmentByDetailsResolveAssignmentByDetailsServiceUnavailableErrorResponseBody {
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 ResolveAssignmentByDetailsResolveAssignmentByDetailsTooManyRequestsErrorResponseBody {
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 ResolveAssignmentByDetailsResolveAssignmentByDetailsUnauthorizedErrorResponseBody {
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
+ * Response body containing the resolved driver information.
3
+ */
4
+ export interface ResolveAssignmentByDetailsResponseBodyResponseBody {
5
+ /** The resolved Samsara driver ID. */
6
+ driverId: string;
7
+ /** The matched driver name. */
8
+ driverName: 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 });
@@ -1882,6 +1882,17 @@ export * from "./ReportsGetReportRunsResponseBody.js";
1882
1882
  export * from "./ReportsGetReportRunsServiceUnavailableErrorResponseBody.js";
1883
1883
  export * from "./ReportsGetReportRunsTooManyRequestsErrorResponseBody.js";
1884
1884
  export * from "./ReportsGetReportRunsUnauthorizedErrorResponseBody.js";
1885
+ export * from "./ResolveAssignmentByDetailsResolveAssignmentByDetailsBadGatewayErrorResponseBody.js";
1886
+ export * from "./ResolveAssignmentByDetailsResolveAssignmentByDetailsGatewayTimeoutErrorResponseBody.js";
1887
+ export * from "./ResolveAssignmentByDetailsResolveAssignmentByDetailsInternalServerErrorResponseBody.js";
1888
+ export * from "./ResolveAssignmentByDetailsResolveAssignmentByDetailsMethodNotAllowedErrorResponseBody.js";
1889
+ export * from "./ResolveAssignmentByDetailsResolveAssignmentByDetailsNotFoundErrorResponseBody.js";
1890
+ export * from "./ResolveAssignmentByDetailsResolveAssignmentByDetailsNotImplementedErrorResponseBody.js";
1891
+ export * from "./ResolveAssignmentByDetailsResolveAssignmentByDetailsResponseBody.js";
1892
+ export * from "./ResolveAssignmentByDetailsResolveAssignmentByDetailsServiceUnavailableErrorResponseBody.js";
1893
+ export * from "./ResolveAssignmentByDetailsResolveAssignmentByDetailsTooManyRequestsErrorResponseBody.js";
1894
+ export * from "./ResolveAssignmentByDetailsResolveAssignmentByDetailsUnauthorizedErrorResponseBody.js";
1895
+ export * from "./ResolveAssignmentByDetailsResponseBodyResponseBody.js";
1885
1896
  export * from "./ResolvedBy.js";
1886
1897
  export * from "./ReverseGeo.js";
1887
1898
  export * from "./ReverseGeoObjectResponseBody.js";
@@ -1898,6 +1898,17 @@ __exportStar(require("./ReportsGetReportRunsResponseBody.js"), exports);
1898
1898
  __exportStar(require("./ReportsGetReportRunsServiceUnavailableErrorResponseBody.js"), exports);
1899
1899
  __exportStar(require("./ReportsGetReportRunsTooManyRequestsErrorResponseBody.js"), exports);
1900
1900
  __exportStar(require("./ReportsGetReportRunsUnauthorizedErrorResponseBody.js"), exports);
1901
+ __exportStar(require("./ResolveAssignmentByDetailsResolveAssignmentByDetailsBadGatewayErrorResponseBody.js"), exports);
1902
+ __exportStar(require("./ResolveAssignmentByDetailsResolveAssignmentByDetailsGatewayTimeoutErrorResponseBody.js"), exports);
1903
+ __exportStar(require("./ResolveAssignmentByDetailsResolveAssignmentByDetailsInternalServerErrorResponseBody.js"), exports);
1904
+ __exportStar(require("./ResolveAssignmentByDetailsResolveAssignmentByDetailsMethodNotAllowedErrorResponseBody.js"), exports);
1905
+ __exportStar(require("./ResolveAssignmentByDetailsResolveAssignmentByDetailsNotFoundErrorResponseBody.js"), exports);
1906
+ __exportStar(require("./ResolveAssignmentByDetailsResolveAssignmentByDetailsNotImplementedErrorResponseBody.js"), exports);
1907
+ __exportStar(require("./ResolveAssignmentByDetailsResolveAssignmentByDetailsResponseBody.js"), exports);
1908
+ __exportStar(require("./ResolveAssignmentByDetailsResolveAssignmentByDetailsServiceUnavailableErrorResponseBody.js"), exports);
1909
+ __exportStar(require("./ResolveAssignmentByDetailsResolveAssignmentByDetailsTooManyRequestsErrorResponseBody.js"), exports);
1910
+ __exportStar(require("./ResolveAssignmentByDetailsResolveAssignmentByDetailsUnauthorizedErrorResponseBody.js"), exports);
1911
+ __exportStar(require("./ResolveAssignmentByDetailsResponseBodyResponseBody.js"), exports);
1901
1912
  __exportStar(require("./ResolvedBy.js"), exports);
1902
1913
  __exportStar(require("./ReverseGeo.js"), exports);
1903
1914
  __exportStar(require("./ReverseGeoObjectResponseBody.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "7.1.0";
1
+ export declare const SDK_VERSION = "7.2.0";
@@ -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 = "7.1.0";
4
+ exports.SDK_VERSION = "7.2.0";
@@ -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": "7.1.0",
11
- "User-Agent": "@samsarahq/samsara/7.1.0",
10
+ "X-Fern-SDK-Version": "7.2.0",
11
+ "User-Agent": "@samsarahq/samsara/7.2.0",
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",
@@ -640,6 +640,37 @@ export declare class BetaApIsClient {
640
640
  */
641
641
  listCarbCtcVehicleHistory(request: Samsara.ListCarbCtcVehicleHistoryRequest, requestOptions?: BetaApIsClient.RequestOptions): core.HttpResponsePromise<Samsara.CarbCtcListCarbCtcVehicleHistoryResponseBody>;
642
642
  private __listCarbCtcVehicleHistory;
643
+ /**
644
+ * Resolves a driver by name within an organization via voice sign-in, then creates a driver-vehicle assignment via the Driver Assignment Service.
645
+ *
646
+ * <b>Rate limit:</b> 100 requests/min (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
647
+ *
648
+ * To use this endpoint, select **Write Assignments** under the Assignments 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>
649
+ *
650
+ *
651
+ * **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.
652
+ *
653
+ * @param {Samsara.ResolveAssignmentByDetailsResolveAssignmentByDetailsRequestBody} request
654
+ * @param {BetaApIsClient.RequestOptions} requestOptions - Request-specific configuration.
655
+ *
656
+ * @throws {@link Samsara.UnauthorizedError}
657
+ * @throws {@link Samsara.NotFoundError}
658
+ * @throws {@link Samsara.MethodNotAllowedError}
659
+ * @throws {@link Samsara.TooManyRequestsError}
660
+ * @throws {@link Samsara.InternalServerError}
661
+ * @throws {@link Samsara.NotImplementedError}
662
+ * @throws {@link Samsara.BadGatewayError}
663
+ * @throws {@link Samsara.ServiceUnavailableError}
664
+ * @throws {@link Samsara.GatewayTimeoutError}
665
+ *
666
+ * @example
667
+ * await client.betaApIs.resolveAssignmentByDetails({
668
+ * driverName: "Jane Doe",
669
+ * vehicleId: "281474978683353"
670
+ * })
671
+ */
672
+ resolveAssignmentByDetails(request: Samsara.ResolveAssignmentByDetailsResolveAssignmentByDetailsRequestBody, requestOptions?: BetaApIsClient.RequestOptions): core.HttpResponsePromise<Samsara.ResolveAssignmentByDetailsResolveAssignmentByDetailsResponseBody>;
673
+ private __resolveAssignmentByDetails;
643
674
  /**
644
675
  * Returns the list of vendor categories available for maintenance vendors.
645
676
  *
@@ -1913,6 +1913,94 @@ export class BetaApIsClient {
1913
1913
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/fleet/carb-ctc/vehicles/history");
1914
1914
  });
1915
1915
  }
1916
+ /**
1917
+ * Resolves a driver by name within an organization via voice sign-in, then creates a driver-vehicle assignment via the Driver Assignment Service.
1918
+ *
1919
+ * <b>Rate limit:</b> 100 requests/min (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
1920
+ *
1921
+ * To use this endpoint, select **Write Assignments** under the Assignments 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>
1922
+ *
1923
+ *
1924
+ * **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.
1925
+ *
1926
+ * @param {Samsara.ResolveAssignmentByDetailsResolveAssignmentByDetailsRequestBody} request
1927
+ * @param {BetaApIsClient.RequestOptions} requestOptions - Request-specific configuration.
1928
+ *
1929
+ * @throws {@link Samsara.UnauthorizedError}
1930
+ * @throws {@link Samsara.NotFoundError}
1931
+ * @throws {@link Samsara.MethodNotAllowedError}
1932
+ * @throws {@link Samsara.TooManyRequestsError}
1933
+ * @throws {@link Samsara.InternalServerError}
1934
+ * @throws {@link Samsara.NotImplementedError}
1935
+ * @throws {@link Samsara.BadGatewayError}
1936
+ * @throws {@link Samsara.ServiceUnavailableError}
1937
+ * @throws {@link Samsara.GatewayTimeoutError}
1938
+ *
1939
+ * @example
1940
+ * await client.betaApIs.resolveAssignmentByDetails({
1941
+ * driverName: "Jane Doe",
1942
+ * vehicleId: "281474978683353"
1943
+ * })
1944
+ */
1945
+ resolveAssignmentByDetails(request, requestOptions) {
1946
+ return core.HttpResponsePromise.fromPromise(this.__resolveAssignmentByDetails(request, requestOptions));
1947
+ }
1948
+ __resolveAssignmentByDetails(request, requestOptions) {
1949
+ return __awaiter(this, void 0, void 0, function* () {
1950
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
1951
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
1952
+ 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);
1953
+ const _response = yield core.fetcher({
1954
+ 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/voice-sign-in/resolve-assignment"),
1955
+ method: "POST",
1956
+ headers: _headers,
1957
+ contentType: "application/json",
1958
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1959
+ requestType: "json",
1960
+ body: request,
1961
+ 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,
1962
+ 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,
1963
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1964
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
1965
+ logging: this._options.logging,
1966
+ });
1967
+ if (_response.ok) {
1968
+ return {
1969
+ data: _response.body,
1970
+ rawResponse: _response.rawResponse,
1971
+ };
1972
+ }
1973
+ if (_response.error.reason === "status-code") {
1974
+ switch (_response.error.statusCode) {
1975
+ case 401:
1976
+ throw new Samsara.UnauthorizedError(_response.error.body, _response.rawResponse);
1977
+ case 404:
1978
+ throw new Samsara.NotFoundError(_response.error.body, _response.rawResponse);
1979
+ case 405:
1980
+ throw new Samsara.MethodNotAllowedError(_response.error.body, _response.rawResponse);
1981
+ case 429:
1982
+ throw new Samsara.TooManyRequestsError(_response.error.body, _response.rawResponse);
1983
+ case 500:
1984
+ throw new Samsara.InternalServerError(_response.error.body, _response.rawResponse);
1985
+ case 501:
1986
+ throw new Samsara.NotImplementedError(_response.error.body, _response.rawResponse);
1987
+ case 502:
1988
+ throw new Samsara.BadGatewayError(_response.error.body, _response.rawResponse);
1989
+ case 503:
1990
+ throw new Samsara.ServiceUnavailableError(_response.error.body, _response.rawResponse);
1991
+ case 504:
1992
+ throw new Samsara.GatewayTimeoutError(_response.error.body, _response.rawResponse);
1993
+ default:
1994
+ throw new errors.SamsaraError({
1995
+ statusCode: _response.error.statusCode,
1996
+ body: _response.error.body,
1997
+ rawResponse: _response.rawResponse,
1998
+ });
1999
+ }
2000
+ }
2001
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/fleet/drivers/voice-sign-in/resolve-assignment");
2002
+ });
2003
+ }
1916
2004
  /**
1917
2005
  * Returns the list of vendor categories available for maintenance vendors.
1918
2006
  *
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * driverName: "Jane Doe",
5
+ * vehicleId: "281474978683353"
6
+ * }
7
+ */
8
+ export interface ResolveAssignmentByDetailsResolveAssignmentByDetailsRequestBody {
9
+ /** The full name of the driver to resolve. */
10
+ driverName: string;
11
+ /** The vehicle ID. This can be either a unique Samsara ID or an external ID for the vehicle. */
12
+ vehicleId: string;
13
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -58,6 +58,7 @@ export type { QualificationsPostQualificationRecordRequestBody } from "./Qualifi
58
58
  export type { QualificationsUnarchiveQualificationRecordRequestBody } from "./QualificationsUnarchiveQualificationRecordRequestBody.mjs";
59
59
  export type { ReadingsPostReadingsRequestBody } from "./ReadingsPostReadingsRequestBody.mjs";
60
60
  export type { ReportsCreateReportRunRequestBody } from "./ReportsCreateReportRunRequestBody.mjs";
61
+ export type { ResolveAssignmentByDetailsResolveAssignmentByDetailsRequestBody } from "./ResolveAssignmentByDetailsResolveAssignmentByDetailsRequestBody.mjs";
61
62
  export type { RidershipAccountsCreateRidershipAccountRequestBody } from "./RidershipAccountsCreateRidershipAccountRequestBody.mjs";
62
63
  export type { RidershipAccountsUpdateRidershipAccountRequestBody } from "./RidershipAccountsUpdateRidershipAccountRequestBody.mjs";
63
64
  export { RidershipPassengersCreateRidershipPassengerRequestBody } from "./RidershipPassengersCreateRidershipPassengerRequestBody.mjs";
@@ -7,8 +7,12 @@ export interface DvirDefectsObjectV20220913ResponseBody {
7
7
  comment?: string | undefined;
8
8
  /** Time when the defect was created. UTC timestamp in RFC 3339 format. */
9
9
  createdAtTime: string;
10
+ /** The severity of the DVIR defect. Valid values: `minor`, `major`, `unspecified` */
11
+ defectSeverity?: DvirDefectsObjectV20220913ResponseBody.DefectSeverity | undefined;
10
12
  /** The type of DVIR defect. */
11
13
  defectType: string;
14
+ /** The ID of the DVIR defect type. */
15
+ defectTypeId?: string | undefined;
12
16
  /** The ID of the defect. */
13
17
  id: string;
14
18
  /** Signifies if this defect is resolved. */
@@ -23,3 +27,12 @@ export interface DvirDefectsObjectV20220913ResponseBody {
23
27
  trailer?: Samsara.GoaTrailerTinyResponseResponseBody | undefined;
24
28
  vehicle?: Samsara.VehicleWithGatewayTinyResponseResponseBody | undefined;
25
29
  }
30
+ export declare namespace DvirDefectsObjectV20220913ResponseBody {
31
+ /** The severity of the DVIR defect. Valid values: `minor`, `major`, `unspecified` */
32
+ const DefectSeverity: {
33
+ readonly Minor: "minor";
34
+ readonly Major: "major";
35
+ readonly Unspecified: "unspecified";
36
+ };
37
+ type DefectSeverity = (typeof DefectSeverity)[keyof typeof DefectSeverity];
38
+ }
@@ -1,2 +1,10 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
- export {};
2
+ export var DvirDefectsObjectV20220913ResponseBody;
3
+ (function (DvirDefectsObjectV20220913ResponseBody) {
4
+ /** The severity of the DVIR defect. Valid values: `minor`, `major`, `unspecified` */
5
+ DvirDefectsObjectV20220913ResponseBody.DefectSeverity = {
6
+ Minor: "minor",
7
+ Major: "major",
8
+ Unspecified: "unspecified",
9
+ };
10
+ })(DvirDefectsObjectV20220913ResponseBody || (DvirDefectsObjectV20220913ResponseBody = {}));
@@ -11,10 +11,18 @@ export interface MissingStateResponseBody {
11
11
  note?: string | undefined;
12
12
  /** Users subscribed to location update notifications for this asset. */
13
13
  notification_recipients?: Samsara.NotificationRecipientResponseResponseBody[] | undefined;
14
+ /** The source of the last update to this recovery state. Defaults to `dashboard` if not explicitly set. Valid values: `dashboard`, `api` */
15
+ update_source?: MissingStateResponseBody.UpdateSource | undefined;
14
16
  /** Timestamp when the asset was marked as missing, in milliseconds since epoch. */
15
17
  updated_at_ms: number;
16
18
  /** The ID of the user who marked the asset as missing. */
17
19
  updated_by_user_id?: number | undefined;
18
- /** The unique UUID of this recovery state record. */
19
- uuid: string;
20
+ }
21
+ export declare namespace MissingStateResponseBody {
22
+ /** The source of the last update to this recovery state. Defaults to `dashboard` if not explicitly set. Valid values: `dashboard`, `api` */
23
+ const UpdateSource: {
24
+ readonly Dashboard: "dashboard";
25
+ readonly Api: "api";
26
+ };
27
+ type UpdateSource = (typeof UpdateSource)[keyof typeof UpdateSource];
20
28
  }
@@ -1,2 +1,9 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
- export {};
2
+ export var MissingStateResponseBody;
3
+ (function (MissingStateResponseBody) {
4
+ /** The source of the last update to this recovery state. Defaults to `dashboard` if not explicitly set. Valid values: `dashboard`, `api` */
5
+ MissingStateResponseBody.UpdateSource = {
6
+ Dashboard: "dashboard",
7
+ Api: "api",
8
+ };
9
+ })(MissingStateResponseBody || (MissingStateResponseBody = {}));
@@ -13,10 +13,18 @@ export interface RecoveryStateResponseBody {
13
13
  notification_recipients?: Samsara.NotificationRecipientResponseResponseBody[] | undefined;
14
14
  /** Photos associated with the recovery event. URLs are temporary and expire at url_expires_at_ms. */
15
15
  recovery_photos?: Samsara.RecoveryPhotoResponseBody[] | undefined;
16
+ /** The source of the last update to this recovery state. Defaults to `dashboard` if not explicitly set. Valid values: `dashboard`, `api` */
17
+ update_source?: RecoveryStateResponseBody.UpdateSource | undefined;
16
18
  /** Timestamp when the recovery state was last updated, in milliseconds since epoch. */
17
19
  updated_at_ms: number;
18
20
  /** The ID of the user who last updated the recovery state. */
19
21
  updated_by_user_id?: number | undefined;
20
- /** The unique UUID of this recovery state record. */
21
- uuid: string;
22
+ }
23
+ export declare namespace RecoveryStateResponseBody {
24
+ /** The source of the last update to this recovery state. Defaults to `dashboard` if not explicitly set. Valid values: `dashboard`, `api` */
25
+ const UpdateSource: {
26
+ readonly Dashboard: "dashboard";
27
+ readonly Api: "api";
28
+ };
29
+ type UpdateSource = (typeof UpdateSource)[keyof typeof UpdateSource];
22
30
  }
@@ -1,2 +1,9 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
- export {};
2
+ export var RecoveryStateResponseBody;
3
+ (function (RecoveryStateResponseBody) {
4
+ /** The source of the last update to this recovery state. Defaults to `dashboard` if not explicitly set. Valid values: `dashboard`, `api` */
5
+ RecoveryStateResponseBody.UpdateSource = {
6
+ Dashboard: "dashboard",
7
+ Api: "api",
8
+ };
9
+ })(RecoveryStateResponseBody || (RecoveryStateResponseBody = {}));
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Bad Gateway
3
+ */
4
+ export interface ResolveAssignmentByDetailsResolveAssignmentByDetailsBadGatewayErrorResponseBody {
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 ResolveAssignmentByDetailsResolveAssignmentByDetailsGatewayTimeoutErrorResponseBody {
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 ResolveAssignmentByDetailsResolveAssignmentByDetailsInternalServerErrorResponseBody {
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 ResolveAssignmentByDetailsResolveAssignmentByDetailsMethodNotAllowedErrorResponseBody {
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 ResolveAssignmentByDetailsResolveAssignmentByDetailsNotFoundErrorResponseBody {
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 ResolveAssignmentByDetailsResolveAssignmentByDetailsNotImplementedErrorResponseBody {
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,4 @@
1
+ import type * as Samsara from "../index.mjs";
2
+ export interface ResolveAssignmentByDetailsResolveAssignmentByDetailsResponseBody {
3
+ data: Samsara.ResolveAssignmentByDetailsResponseBodyResponseBody;
4
+ }
@@ -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 ResolveAssignmentByDetailsResolveAssignmentByDetailsServiceUnavailableErrorResponseBody {
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 ResolveAssignmentByDetailsResolveAssignmentByDetailsTooManyRequestsErrorResponseBody {
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 ResolveAssignmentByDetailsResolveAssignmentByDetailsUnauthorizedErrorResponseBody {
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
+ * Response body containing the resolved driver information.
3
+ */
4
+ export interface ResolveAssignmentByDetailsResponseBodyResponseBody {
5
+ /** The resolved Samsara driver ID. */
6
+ driverId: string;
7
+ /** The matched driver name. */
8
+ driverName: string;
9
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -1882,6 +1882,17 @@ export * from "./ReportsGetReportRunsResponseBody.mjs";
1882
1882
  export * from "./ReportsGetReportRunsServiceUnavailableErrorResponseBody.mjs";
1883
1883
  export * from "./ReportsGetReportRunsTooManyRequestsErrorResponseBody.mjs";
1884
1884
  export * from "./ReportsGetReportRunsUnauthorizedErrorResponseBody.mjs";
1885
+ export * from "./ResolveAssignmentByDetailsResolveAssignmentByDetailsBadGatewayErrorResponseBody.mjs";
1886
+ export * from "./ResolveAssignmentByDetailsResolveAssignmentByDetailsGatewayTimeoutErrorResponseBody.mjs";
1887
+ export * from "./ResolveAssignmentByDetailsResolveAssignmentByDetailsInternalServerErrorResponseBody.mjs";
1888
+ export * from "./ResolveAssignmentByDetailsResolveAssignmentByDetailsMethodNotAllowedErrorResponseBody.mjs";
1889
+ export * from "./ResolveAssignmentByDetailsResolveAssignmentByDetailsNotFoundErrorResponseBody.mjs";
1890
+ export * from "./ResolveAssignmentByDetailsResolveAssignmentByDetailsNotImplementedErrorResponseBody.mjs";
1891
+ export * from "./ResolveAssignmentByDetailsResolveAssignmentByDetailsResponseBody.mjs";
1892
+ export * from "./ResolveAssignmentByDetailsResolveAssignmentByDetailsServiceUnavailableErrorResponseBody.mjs";
1893
+ export * from "./ResolveAssignmentByDetailsResolveAssignmentByDetailsTooManyRequestsErrorResponseBody.mjs";
1894
+ export * from "./ResolveAssignmentByDetailsResolveAssignmentByDetailsUnauthorizedErrorResponseBody.mjs";
1895
+ export * from "./ResolveAssignmentByDetailsResponseBodyResponseBody.mjs";
1885
1896
  export * from "./ResolvedBy.mjs";
1886
1897
  export * from "./ReverseGeo.mjs";
1887
1898
  export * from "./ReverseGeoObjectResponseBody.mjs";
@@ -1882,6 +1882,17 @@ export * from "./ReportsGetReportRunsResponseBody.mjs";
1882
1882
  export * from "./ReportsGetReportRunsServiceUnavailableErrorResponseBody.mjs";
1883
1883
  export * from "./ReportsGetReportRunsTooManyRequestsErrorResponseBody.mjs";
1884
1884
  export * from "./ReportsGetReportRunsUnauthorizedErrorResponseBody.mjs";
1885
+ export * from "./ResolveAssignmentByDetailsResolveAssignmentByDetailsBadGatewayErrorResponseBody.mjs";
1886
+ export * from "./ResolveAssignmentByDetailsResolveAssignmentByDetailsGatewayTimeoutErrorResponseBody.mjs";
1887
+ export * from "./ResolveAssignmentByDetailsResolveAssignmentByDetailsInternalServerErrorResponseBody.mjs";
1888
+ export * from "./ResolveAssignmentByDetailsResolveAssignmentByDetailsMethodNotAllowedErrorResponseBody.mjs";
1889
+ export * from "./ResolveAssignmentByDetailsResolveAssignmentByDetailsNotFoundErrorResponseBody.mjs";
1890
+ export * from "./ResolveAssignmentByDetailsResolveAssignmentByDetailsNotImplementedErrorResponseBody.mjs";
1891
+ export * from "./ResolveAssignmentByDetailsResolveAssignmentByDetailsResponseBody.mjs";
1892
+ export * from "./ResolveAssignmentByDetailsResolveAssignmentByDetailsServiceUnavailableErrorResponseBody.mjs";
1893
+ export * from "./ResolveAssignmentByDetailsResolveAssignmentByDetailsTooManyRequestsErrorResponseBody.mjs";
1894
+ export * from "./ResolveAssignmentByDetailsResolveAssignmentByDetailsUnauthorizedErrorResponseBody.mjs";
1895
+ export * from "./ResolveAssignmentByDetailsResponseBodyResponseBody.mjs";
1885
1896
  export * from "./ResolvedBy.mjs";
1886
1897
  export * from "./ReverseGeo.mjs";
1887
1898
  export * from "./ReverseGeoObjectResponseBody.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "7.1.0";
1
+ export declare const SDK_VERSION = "7.2.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "7.1.0";
1
+ export const SDK_VERSION = "7.2.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@samsarahq/samsara",
3
- "version": "7.1.0",
3
+ "version": "7.2.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
package/reference.md CHANGED
@@ -2997,6 +2997,79 @@ await client.betaApIs.listCarbCtcVehicleHistory({
2997
2997
  </dl>
2998
2998
 
2999
2999
 
3000
+ </dd>
3001
+ </dl>
3002
+ </details>
3003
+
3004
+ <details><summary><code>client.betaApIs.<a href="/src/api/resources/betaApIs/client/Client.ts">resolveAssignmentByDetails</a>({ ...params }) -> Samsara.ResolveAssignmentByDetailsResolveAssignmentByDetailsResponseBody</code></summary>
3005
+ <dl>
3006
+ <dd>
3007
+
3008
+ #### 📝 Description
3009
+
3010
+ <dl>
3011
+ <dd>
3012
+
3013
+ <dl>
3014
+ <dd>
3015
+
3016
+ Resolves a driver by name within an organization via voice sign-in, then creates a driver-vehicle assignment via the Driver Assignment Service.
3017
+
3018
+ <b>Rate limit:</b> 100 requests/min (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
3019
+
3020
+ To use this endpoint, select **Write Assignments** under the Assignments 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>
3021
+
3022
+
3023
+ **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.
3024
+ </dd>
3025
+ </dl>
3026
+ </dd>
3027
+ </dl>
3028
+
3029
+ #### 🔌 Usage
3030
+
3031
+ <dl>
3032
+ <dd>
3033
+
3034
+ <dl>
3035
+ <dd>
3036
+
3037
+ ```typescript
3038
+ await client.betaApIs.resolveAssignmentByDetails({
3039
+ driverName: "Jane Doe",
3040
+ vehicleId: "281474978683353"
3041
+ });
3042
+
3043
+ ```
3044
+ </dd>
3045
+ </dl>
3046
+ </dd>
3047
+ </dl>
3048
+
3049
+ #### ⚙️ Parameters
3050
+
3051
+ <dl>
3052
+ <dd>
3053
+
3054
+ <dl>
3055
+ <dd>
3056
+
3057
+ **request:** `Samsara.ResolveAssignmentByDetailsResolveAssignmentByDetailsRequestBody`
3058
+
3059
+ </dd>
3060
+ </dl>
3061
+
3062
+ <dl>
3063
+ <dd>
3064
+
3065
+ **requestOptions:** `BetaApIsClient.RequestOptions`
3066
+
3067
+ </dd>
3068
+ </dl>
3069
+ </dd>
3070
+ </dl>
3071
+
3072
+
3000
3073
  </dd>
3001
3074
  </dl>
3002
3075
  </details>