@samsarahq/samsara 7.0.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 (200) 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/resources/media/client/Client.d.ts +1 -1
  8. package/dist/cjs/api/resources/media/client/Client.js +1 -1
  9. package/dist/cjs/api/resources/media/client/requests/MediaRetrievalPostMediaRetrievalRequestBody.d.ts +1 -1
  10. package/dist/cjs/api/resources/previewApIs/client/Client.d.ts +73 -0
  11. package/dist/cjs/api/resources/previewApIs/client/Client.js +191 -0
  12. package/dist/cjs/api/resources/previewApIs/client/requests/ListAssociationsRequest.d.ts +17 -0
  13. package/dist/cjs/api/resources/previewApIs/client/requests/ListAssociationsRequest.js +3 -0
  14. package/dist/cjs/api/resources/previewApIs/client/requests/SafetyEventsV2PatchSafetyEventsV2BatchRequestBody.d.ts +31 -0
  15. package/dist/cjs/api/resources/previewApIs/client/requests/SafetyEventsV2PatchSafetyEventsV2BatchRequestBody.js +17 -0
  16. package/dist/cjs/api/resources/previewApIs/client/requests/index.d.ts +2 -0
  17. package/dist/cjs/api/resources/previewApIs/client/requests/index.js +3 -0
  18. package/dist/cjs/api/types/AssociationResponseBody.d.ts +15 -0
  19. package/dist/cjs/api/types/AssociationResponseBody.js +3 -0
  20. package/dist/cjs/api/types/AssociationsListAssociationsBadGatewayErrorResponseBody.d.ts +9 -0
  21. package/dist/cjs/api/types/AssociationsListAssociationsBadGatewayErrorResponseBody.js +3 -0
  22. package/dist/cjs/api/types/AssociationsListAssociationsGatewayTimeoutErrorResponseBody.d.ts +9 -0
  23. package/dist/cjs/api/types/AssociationsListAssociationsGatewayTimeoutErrorResponseBody.js +3 -0
  24. package/dist/cjs/api/types/AssociationsListAssociationsInternalServerErrorResponseBody.d.ts +9 -0
  25. package/dist/cjs/api/types/AssociationsListAssociationsInternalServerErrorResponseBody.js +3 -0
  26. package/dist/cjs/api/types/AssociationsListAssociationsMethodNotAllowedErrorResponseBody.d.ts +9 -0
  27. package/dist/cjs/api/types/AssociationsListAssociationsMethodNotAllowedErrorResponseBody.js +3 -0
  28. package/dist/cjs/api/types/AssociationsListAssociationsNotFoundErrorResponseBody.d.ts +9 -0
  29. package/dist/cjs/api/types/AssociationsListAssociationsNotFoundErrorResponseBody.js +3 -0
  30. package/dist/cjs/api/types/AssociationsListAssociationsNotImplementedErrorResponseBody.d.ts +9 -0
  31. package/dist/cjs/api/types/AssociationsListAssociationsNotImplementedErrorResponseBody.js +3 -0
  32. package/dist/cjs/api/types/AssociationsListAssociationsResponseBody.d.ts +6 -0
  33. package/dist/cjs/api/types/AssociationsListAssociationsResponseBody.js +3 -0
  34. package/dist/cjs/api/types/AssociationsListAssociationsServiceUnavailableErrorResponseBody.d.ts +9 -0
  35. package/dist/cjs/api/types/AssociationsListAssociationsServiceUnavailableErrorResponseBody.js +3 -0
  36. package/dist/cjs/api/types/AssociationsListAssociationsTooManyRequestsErrorResponseBody.d.ts +9 -0
  37. package/dist/cjs/api/types/AssociationsListAssociationsTooManyRequestsErrorResponseBody.js +3 -0
  38. package/dist/cjs/api/types/AssociationsListAssociationsUnauthorizedErrorResponseBody.d.ts +9 -0
  39. package/dist/cjs/api/types/AssociationsListAssociationsUnauthorizedErrorResponseBody.js +3 -0
  40. package/dist/cjs/api/types/DefectTypesResponseDataResponseBody.d.ts +9 -0
  41. package/dist/cjs/api/types/DefectTypesResponseDataResponseBody.js +6 -0
  42. package/dist/cjs/api/types/DvirDefectsObjectV20220913ResponseBody.d.ts +13 -0
  43. package/dist/cjs/api/types/DvirDefectsObjectV20220913ResponseBody.js +10 -0
  44. package/dist/cjs/api/types/MissingStateResponseBody.d.ts +10 -2
  45. package/dist/cjs/api/types/MissingStateResponseBody.js +9 -0
  46. package/dist/cjs/api/types/PatchSafetyEventsDismissalReasonBodyRequestBody.d.ts +18 -0
  47. package/dist/cjs/api/types/PatchSafetyEventsDismissalReasonBodyRequestBody.js +13 -0
  48. package/dist/cjs/api/types/PatchSafetyEventsResponseItemDataResponseBody.d.ts +7 -0
  49. package/dist/cjs/api/types/PatchSafetyEventsResponseItemDataResponseBody.js +3 -0
  50. package/dist/cjs/api/types/PatchSafetyEventsResponseItemResponseBody.d.ts +9 -0
  51. package/dist/cjs/api/types/PatchSafetyEventsResponseItemResponseBody.js +3 -0
  52. package/dist/cjs/api/types/RecoveryStateResponseBody.d.ts +10 -2
  53. package/dist/cjs/api/types/RecoveryStateResponseBody.js +9 -0
  54. package/dist/cjs/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsBadGatewayErrorResponseBody.d.ts +9 -0
  55. package/dist/cjs/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsBadGatewayErrorResponseBody.js +3 -0
  56. package/dist/cjs/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsGatewayTimeoutErrorResponseBody.d.ts +9 -0
  57. package/dist/cjs/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsGatewayTimeoutErrorResponseBody.js +3 -0
  58. package/dist/cjs/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsInternalServerErrorResponseBody.d.ts +9 -0
  59. package/dist/cjs/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsInternalServerErrorResponseBody.js +3 -0
  60. package/dist/cjs/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsMethodNotAllowedErrorResponseBody.d.ts +9 -0
  61. package/dist/cjs/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsMethodNotAllowedErrorResponseBody.js +3 -0
  62. package/dist/cjs/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsNotFoundErrorResponseBody.d.ts +9 -0
  63. package/dist/cjs/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsNotFoundErrorResponseBody.js +3 -0
  64. package/dist/cjs/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsNotImplementedErrorResponseBody.d.ts +9 -0
  65. package/dist/cjs/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsNotImplementedErrorResponseBody.js +3 -0
  66. package/dist/cjs/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsResponseBody.d.ts +4 -0
  67. package/dist/cjs/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsResponseBody.js +3 -0
  68. package/dist/cjs/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsServiceUnavailableErrorResponseBody.d.ts +9 -0
  69. package/dist/cjs/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsServiceUnavailableErrorResponseBody.js +3 -0
  70. package/dist/cjs/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsTooManyRequestsErrorResponseBody.d.ts +9 -0
  71. package/dist/cjs/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsTooManyRequestsErrorResponseBody.js +3 -0
  72. package/dist/cjs/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsUnauthorizedErrorResponseBody.d.ts +9 -0
  73. package/dist/cjs/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsUnauthorizedErrorResponseBody.js +3 -0
  74. package/dist/cjs/api/types/ResolveAssignmentByDetailsResponseBodyResponseBody.d.ts +9 -0
  75. package/dist/cjs/api/types/ResolveAssignmentByDetailsResponseBodyResponseBody.js +3 -0
  76. package/dist/cjs/api/types/SafetyEventsV2PatchSafetyEventsV2BatchBadGatewayErrorResponseBody.d.ts +9 -0
  77. package/dist/cjs/api/types/SafetyEventsV2PatchSafetyEventsV2BatchBadGatewayErrorResponseBody.js +3 -0
  78. package/dist/cjs/api/types/SafetyEventsV2PatchSafetyEventsV2BatchGatewayTimeoutErrorResponseBody.d.ts +9 -0
  79. package/dist/cjs/api/types/SafetyEventsV2PatchSafetyEventsV2BatchGatewayTimeoutErrorResponseBody.js +3 -0
  80. package/dist/cjs/api/types/SafetyEventsV2PatchSafetyEventsV2BatchInternalServerErrorResponseBody.d.ts +9 -0
  81. package/dist/cjs/api/types/SafetyEventsV2PatchSafetyEventsV2BatchInternalServerErrorResponseBody.js +3 -0
  82. package/dist/cjs/api/types/SafetyEventsV2PatchSafetyEventsV2BatchMethodNotAllowedErrorResponseBody.d.ts +9 -0
  83. package/dist/cjs/api/types/SafetyEventsV2PatchSafetyEventsV2BatchMethodNotAllowedErrorResponseBody.js +3 -0
  84. package/dist/cjs/api/types/SafetyEventsV2PatchSafetyEventsV2BatchNotFoundErrorResponseBody.d.ts +9 -0
  85. package/dist/cjs/api/types/SafetyEventsV2PatchSafetyEventsV2BatchNotFoundErrorResponseBody.js +3 -0
  86. package/dist/cjs/api/types/SafetyEventsV2PatchSafetyEventsV2BatchNotImplementedErrorResponseBody.d.ts +9 -0
  87. package/dist/cjs/api/types/SafetyEventsV2PatchSafetyEventsV2BatchNotImplementedErrorResponseBody.js +3 -0
  88. package/dist/cjs/api/types/SafetyEventsV2PatchSafetyEventsV2BatchResponseBody.d.ts +7 -0
  89. package/dist/cjs/api/types/SafetyEventsV2PatchSafetyEventsV2BatchResponseBody.js +3 -0
  90. package/dist/cjs/api/types/SafetyEventsV2PatchSafetyEventsV2BatchServiceUnavailableErrorResponseBody.d.ts +9 -0
  91. package/dist/cjs/api/types/SafetyEventsV2PatchSafetyEventsV2BatchServiceUnavailableErrorResponseBody.js +3 -0
  92. package/dist/cjs/api/types/SafetyEventsV2PatchSafetyEventsV2BatchTooManyRequestsErrorResponseBody.d.ts +9 -0
  93. package/dist/cjs/api/types/SafetyEventsV2PatchSafetyEventsV2BatchTooManyRequestsErrorResponseBody.js +3 -0
  94. package/dist/cjs/api/types/SafetyEventsV2PatchSafetyEventsV2BatchUnauthorizedErrorResponseBody.d.ts +9 -0
  95. package/dist/cjs/api/types/SafetyEventsV2PatchSafetyEventsV2BatchUnauthorizedErrorResponseBody.js +3 -0
  96. package/dist/cjs/api/types/index.d.ts +35 -0
  97. package/dist/cjs/api/types/index.js +35 -0
  98. package/dist/cjs/version.d.ts +1 -1
  99. package/dist/cjs/version.js +1 -1
  100. package/dist/esm/BaseClient.mjs +2 -2
  101. package/dist/esm/api/resources/betaApIs/client/Client.d.mts +31 -0
  102. package/dist/esm/api/resources/betaApIs/client/Client.mjs +88 -0
  103. package/dist/esm/api/resources/betaApIs/client/requests/ResolveAssignmentByDetailsResolveAssignmentByDetailsRequestBody.d.mts +13 -0
  104. package/dist/esm/api/resources/betaApIs/client/requests/ResolveAssignmentByDetailsResolveAssignmentByDetailsRequestBody.mjs +2 -0
  105. package/dist/esm/api/resources/betaApIs/client/requests/index.d.mts +1 -0
  106. package/dist/esm/api/resources/media/client/Client.d.mts +1 -1
  107. package/dist/esm/api/resources/media/client/Client.mjs +1 -1
  108. package/dist/esm/api/resources/media/client/requests/MediaRetrievalPostMediaRetrievalRequestBody.d.mts +1 -1
  109. package/dist/esm/api/resources/previewApIs/client/Client.d.mts +73 -0
  110. package/dist/esm/api/resources/previewApIs/client/Client.mjs +191 -0
  111. package/dist/esm/api/resources/previewApIs/client/requests/ListAssociationsRequest.d.mts +17 -0
  112. package/dist/esm/api/resources/previewApIs/client/requests/ListAssociationsRequest.mjs +2 -0
  113. package/dist/esm/api/resources/previewApIs/client/requests/SafetyEventsV2PatchSafetyEventsV2BatchRequestBody.d.mts +31 -0
  114. package/dist/esm/api/resources/previewApIs/client/requests/SafetyEventsV2PatchSafetyEventsV2BatchRequestBody.mjs +14 -0
  115. package/dist/esm/api/resources/previewApIs/client/requests/index.d.mts +2 -0
  116. package/dist/esm/api/resources/previewApIs/client/requests/index.mjs +1 -1
  117. package/dist/esm/api/types/AssociationResponseBody.d.mts +15 -0
  118. package/dist/esm/api/types/AssociationResponseBody.mjs +2 -0
  119. package/dist/esm/api/types/AssociationsListAssociationsBadGatewayErrorResponseBody.d.mts +9 -0
  120. package/dist/esm/api/types/AssociationsListAssociationsBadGatewayErrorResponseBody.mjs +2 -0
  121. package/dist/esm/api/types/AssociationsListAssociationsGatewayTimeoutErrorResponseBody.d.mts +9 -0
  122. package/dist/esm/api/types/AssociationsListAssociationsGatewayTimeoutErrorResponseBody.mjs +2 -0
  123. package/dist/esm/api/types/AssociationsListAssociationsInternalServerErrorResponseBody.d.mts +9 -0
  124. package/dist/esm/api/types/AssociationsListAssociationsInternalServerErrorResponseBody.mjs +2 -0
  125. package/dist/esm/api/types/AssociationsListAssociationsMethodNotAllowedErrorResponseBody.d.mts +9 -0
  126. package/dist/esm/api/types/AssociationsListAssociationsMethodNotAllowedErrorResponseBody.mjs +2 -0
  127. package/dist/esm/api/types/AssociationsListAssociationsNotFoundErrorResponseBody.d.mts +9 -0
  128. package/dist/esm/api/types/AssociationsListAssociationsNotFoundErrorResponseBody.mjs +2 -0
  129. package/dist/esm/api/types/AssociationsListAssociationsNotImplementedErrorResponseBody.d.mts +9 -0
  130. package/dist/esm/api/types/AssociationsListAssociationsNotImplementedErrorResponseBody.mjs +2 -0
  131. package/dist/esm/api/types/AssociationsListAssociationsResponseBody.d.mts +6 -0
  132. package/dist/esm/api/types/AssociationsListAssociationsResponseBody.mjs +2 -0
  133. package/dist/esm/api/types/AssociationsListAssociationsServiceUnavailableErrorResponseBody.d.mts +9 -0
  134. package/dist/esm/api/types/AssociationsListAssociationsServiceUnavailableErrorResponseBody.mjs +2 -0
  135. package/dist/esm/api/types/AssociationsListAssociationsTooManyRequestsErrorResponseBody.d.mts +9 -0
  136. package/dist/esm/api/types/AssociationsListAssociationsTooManyRequestsErrorResponseBody.mjs +2 -0
  137. package/dist/esm/api/types/AssociationsListAssociationsUnauthorizedErrorResponseBody.d.mts +9 -0
  138. package/dist/esm/api/types/AssociationsListAssociationsUnauthorizedErrorResponseBody.mjs +2 -0
  139. package/dist/esm/api/types/DefectTypesResponseDataResponseBody.d.mts +9 -0
  140. package/dist/esm/api/types/DefectTypesResponseDataResponseBody.mjs +6 -0
  141. package/dist/esm/api/types/DvirDefectsObjectV20220913ResponseBody.d.mts +13 -0
  142. package/dist/esm/api/types/DvirDefectsObjectV20220913ResponseBody.mjs +9 -1
  143. package/dist/esm/api/types/MissingStateResponseBody.d.mts +10 -2
  144. package/dist/esm/api/types/MissingStateResponseBody.mjs +8 -1
  145. package/dist/esm/api/types/PatchSafetyEventsDismissalReasonBodyRequestBody.d.mts +18 -0
  146. package/dist/esm/api/types/PatchSafetyEventsDismissalReasonBodyRequestBody.mjs +10 -0
  147. package/dist/esm/api/types/PatchSafetyEventsResponseItemDataResponseBody.d.mts +7 -0
  148. package/dist/esm/api/types/PatchSafetyEventsResponseItemDataResponseBody.mjs +2 -0
  149. package/dist/esm/api/types/PatchSafetyEventsResponseItemResponseBody.d.mts +9 -0
  150. package/dist/esm/api/types/PatchSafetyEventsResponseItemResponseBody.mjs +2 -0
  151. package/dist/esm/api/types/RecoveryStateResponseBody.d.mts +10 -2
  152. package/dist/esm/api/types/RecoveryStateResponseBody.mjs +8 -1
  153. package/dist/esm/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsBadGatewayErrorResponseBody.d.mts +9 -0
  154. package/dist/esm/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsBadGatewayErrorResponseBody.mjs +2 -0
  155. package/dist/esm/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsGatewayTimeoutErrorResponseBody.d.mts +9 -0
  156. package/dist/esm/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsGatewayTimeoutErrorResponseBody.mjs +2 -0
  157. package/dist/esm/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsInternalServerErrorResponseBody.d.mts +9 -0
  158. package/dist/esm/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsInternalServerErrorResponseBody.mjs +2 -0
  159. package/dist/esm/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsMethodNotAllowedErrorResponseBody.d.mts +9 -0
  160. package/dist/esm/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsMethodNotAllowedErrorResponseBody.mjs +2 -0
  161. package/dist/esm/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsNotFoundErrorResponseBody.d.mts +9 -0
  162. package/dist/esm/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsNotFoundErrorResponseBody.mjs +2 -0
  163. package/dist/esm/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsNotImplementedErrorResponseBody.d.mts +9 -0
  164. package/dist/esm/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsNotImplementedErrorResponseBody.mjs +2 -0
  165. package/dist/esm/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsResponseBody.d.mts +4 -0
  166. package/dist/esm/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsResponseBody.mjs +2 -0
  167. package/dist/esm/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsServiceUnavailableErrorResponseBody.d.mts +9 -0
  168. package/dist/esm/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsServiceUnavailableErrorResponseBody.mjs +2 -0
  169. package/dist/esm/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsTooManyRequestsErrorResponseBody.d.mts +9 -0
  170. package/dist/esm/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsTooManyRequestsErrorResponseBody.mjs +2 -0
  171. package/dist/esm/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsUnauthorizedErrorResponseBody.d.mts +9 -0
  172. package/dist/esm/api/types/ResolveAssignmentByDetailsResolveAssignmentByDetailsUnauthorizedErrorResponseBody.mjs +2 -0
  173. package/dist/esm/api/types/ResolveAssignmentByDetailsResponseBodyResponseBody.d.mts +9 -0
  174. package/dist/esm/api/types/ResolveAssignmentByDetailsResponseBodyResponseBody.mjs +2 -0
  175. package/dist/esm/api/types/SafetyEventsV2PatchSafetyEventsV2BatchBadGatewayErrorResponseBody.d.mts +9 -0
  176. package/dist/esm/api/types/SafetyEventsV2PatchSafetyEventsV2BatchBadGatewayErrorResponseBody.mjs +2 -0
  177. package/dist/esm/api/types/SafetyEventsV2PatchSafetyEventsV2BatchGatewayTimeoutErrorResponseBody.d.mts +9 -0
  178. package/dist/esm/api/types/SafetyEventsV2PatchSafetyEventsV2BatchGatewayTimeoutErrorResponseBody.mjs +2 -0
  179. package/dist/esm/api/types/SafetyEventsV2PatchSafetyEventsV2BatchInternalServerErrorResponseBody.d.mts +9 -0
  180. package/dist/esm/api/types/SafetyEventsV2PatchSafetyEventsV2BatchInternalServerErrorResponseBody.mjs +2 -0
  181. package/dist/esm/api/types/SafetyEventsV2PatchSafetyEventsV2BatchMethodNotAllowedErrorResponseBody.d.mts +9 -0
  182. package/dist/esm/api/types/SafetyEventsV2PatchSafetyEventsV2BatchMethodNotAllowedErrorResponseBody.mjs +2 -0
  183. package/dist/esm/api/types/SafetyEventsV2PatchSafetyEventsV2BatchNotFoundErrorResponseBody.d.mts +9 -0
  184. package/dist/esm/api/types/SafetyEventsV2PatchSafetyEventsV2BatchNotFoundErrorResponseBody.mjs +2 -0
  185. package/dist/esm/api/types/SafetyEventsV2PatchSafetyEventsV2BatchNotImplementedErrorResponseBody.d.mts +9 -0
  186. package/dist/esm/api/types/SafetyEventsV2PatchSafetyEventsV2BatchNotImplementedErrorResponseBody.mjs +2 -0
  187. package/dist/esm/api/types/SafetyEventsV2PatchSafetyEventsV2BatchResponseBody.d.mts +7 -0
  188. package/dist/esm/api/types/SafetyEventsV2PatchSafetyEventsV2BatchResponseBody.mjs +2 -0
  189. package/dist/esm/api/types/SafetyEventsV2PatchSafetyEventsV2BatchServiceUnavailableErrorResponseBody.d.mts +9 -0
  190. package/dist/esm/api/types/SafetyEventsV2PatchSafetyEventsV2BatchServiceUnavailableErrorResponseBody.mjs +2 -0
  191. package/dist/esm/api/types/SafetyEventsV2PatchSafetyEventsV2BatchTooManyRequestsErrorResponseBody.d.mts +9 -0
  192. package/dist/esm/api/types/SafetyEventsV2PatchSafetyEventsV2BatchTooManyRequestsErrorResponseBody.mjs +2 -0
  193. package/dist/esm/api/types/SafetyEventsV2PatchSafetyEventsV2BatchUnauthorizedErrorResponseBody.d.mts +9 -0
  194. package/dist/esm/api/types/SafetyEventsV2PatchSafetyEventsV2BatchUnauthorizedErrorResponseBody.mjs +2 -0
  195. package/dist/esm/api/types/index.d.mts +35 -0
  196. package/dist/esm/api/types/index.mjs +35 -0
  197. package/dist/esm/version.d.mts +1 -1
  198. package/dist/esm/version.mjs +1 -1
  199. package/package.json +1 -1
  200. package/reference.md +231 -1
@@ -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.0.0",
48
- "User-Agent": "@samsarahq/samsara/7.0.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";
@@ -98,7 +98,7 @@ export declare class MediaClient {
98
98
  * @example
99
99
  * await client.media.postMediaRetrieval({
100
100
  * endTime: "2019-06-13T19:08:55Z",
101
- * inputs: ["dashcamRoadFacing", "dashcamRoadFacing", "dashcamRoadFacing", "dashcamRoadFacing"],
101
+ * inputs: ["dashcamRoadFacing", "dashcamRoadFacing"],
102
102
  * mediaType: "image",
103
103
  * startTime: "2019-06-13T19:08:25Z",
104
104
  * vehicleId: "1234"
@@ -274,7 +274,7 @@ class MediaClient {
274
274
  * @example
275
275
  * await client.media.postMediaRetrieval({
276
276
  * endTime: "2019-06-13T19:08:55Z",
277
- * inputs: ["dashcamRoadFacing", "dashcamRoadFacing", "dashcamRoadFacing", "dashcamRoadFacing"],
277
+ * inputs: ["dashcamRoadFacing", "dashcamRoadFacing"],
278
278
  * mediaType: "image",
279
279
  * startTime: "2019-06-13T19:08:25Z",
280
280
  * vehicleId: "1234"
@@ -2,7 +2,7 @@
2
2
  * @example
3
3
  * {
4
4
  * endTime: "2019-06-13T19:08:55Z",
5
- * inputs: ["dashcamRoadFacing", "dashcamRoadFacing", "dashcamRoadFacing", "dashcamRoadFacing"],
5
+ * inputs: ["dashcamRoadFacing", "dashcamRoadFacing"],
6
6
  * mediaType: "image",
7
7
  * startTime: "2019-06-13T19:08:25Z",
8
8
  * vehicleId: "1234"
@@ -10,6 +10,43 @@ export declare namespace PreviewApIsClient {
10
10
  export declare class PreviewApIsClient {
11
11
  protected readonly _options: NormalizedClientOptionsWithAuth<PreviewApIsClient.Options>;
12
12
  constructor(options?: PreviewApIsClient.Options);
13
+ /**
14
+ * List associations between vehicles and peripheral devices within a given time range. Associations represent the relationship between a central device (vehicle) and a peripheral device (e.g. asset tag). An association with a null endTime is still active.
15
+ *
16
+ * <b>Rate limit:</b> 5 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
17
+ *
18
+ * To use this endpoint, select **Read Assets** under the Assets 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>
19
+ *
20
+ * Endpoints in this section are in Preview. These APIs are not functional and are instead for soliciting feedback from our API users on the intended design of this API. Additionally, it is not guaranteed that we will be releasing an endpoint included in this section to production. This means that developers should **NOT** rely on these APIs to build business critical applications
21
+ *
22
+ * - Samsara may change the structure of a preview API's interface without versioning or any notice to API users.
23
+ *
24
+ * - When an endpoint becomes generally available, it will be announced in the API [changelog](https://developers.samsara.com/changelog).
25
+ *
26
+ *
27
+ * **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.
28
+ *
29
+ * @param {Samsara.ListAssociationsRequest} request
30
+ * @param {PreviewApIsClient.RequestOptions} requestOptions - Request-specific configuration.
31
+ *
32
+ * @throws {@link Samsara.UnauthorizedError}
33
+ * @throws {@link Samsara.NotFoundError}
34
+ * @throws {@link Samsara.MethodNotAllowedError}
35
+ * @throws {@link Samsara.TooManyRequestsError}
36
+ * @throws {@link Samsara.InternalServerError}
37
+ * @throws {@link Samsara.NotImplementedError}
38
+ * @throws {@link Samsara.BadGatewayError}
39
+ * @throws {@link Samsara.ServiceUnavailableError}
40
+ * @throws {@link Samsara.GatewayTimeoutError}
41
+ *
42
+ * @example
43
+ * await client.previewApIs.listAssociations({
44
+ * startTime: "startTime",
45
+ * endTime: "endTime"
46
+ * })
47
+ */
48
+ listAssociations(request: Samsara.ListAssociationsRequest, requestOptions?: PreviewApIsClient.RequestOptions): core.HttpResponsePromise<Samsara.AssociationsListAssociationsResponseBody>;
49
+ private __listAssociations;
13
50
  /**
14
51
  * Creates a short-lived auth token for a driver.
15
52
  *
@@ -118,4 +155,40 @@ export declare class PreviewApIsClient {
118
155
  */
119
156
  unlockVehicle(request: Samsara.UnlockVehicleRequest, requestOptions?: PreviewApIsClient.RequestOptions): core.HttpResponsePromise<void>;
120
157
  private __unlockVehicle;
158
+ /**
159
+ * Asynchronously update eventState and/or context labels for one or more Safety Events. Returns 202 Accepted immediately. State changes propagate asynchronously; use GET /safety-events to confirm updated state. If any safetyEventIds are not found, the entire request fails with 404 before any mutations are executed. If both eventState and label fields are provided, the two mutations execute serially and are not transactional — a label mutation failure will not roll back a successful state change.
160
+ *
161
+ * <b>Rate limit:</b> 5 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
162
+ *
163
+ * To use this endpoint, select **Write Safety Events & Scores** under the Safety & Cameras 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>
164
+ *
165
+ * Endpoints in this section are in Preview. These APIs are not functional and are instead for soliciting feedback from our API users on the intended design of this API. Additionally, it is not guaranteed that we will be releasing an endpoint included in this section to production. This means that developers should **NOT** rely on these APIs to build business critical applications
166
+ *
167
+ * - Samsara may change the structure of a preview API's interface without versioning or any notice to API users.
168
+ *
169
+ * - When an endpoint becomes generally available, it will be announced in the API [changelog](https://developers.samsara.com/changelog).
170
+ *
171
+ *
172
+ * **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.
173
+ *
174
+ * @param {Samsara.SafetyEventsV2PatchSafetyEventsV2BatchRequestBody} request
175
+ * @param {PreviewApIsClient.RequestOptions} requestOptions - Request-specific configuration.
176
+ *
177
+ * @throws {@link Samsara.UnauthorizedError}
178
+ * @throws {@link Samsara.NotFoundError}
179
+ * @throws {@link Samsara.MethodNotAllowedError}
180
+ * @throws {@link Samsara.TooManyRequestsError}
181
+ * @throws {@link Samsara.InternalServerError}
182
+ * @throws {@link Samsara.NotImplementedError}
183
+ * @throws {@link Samsara.BadGatewayError}
184
+ * @throws {@link Samsara.ServiceUnavailableError}
185
+ * @throws {@link Samsara.GatewayTimeoutError}
186
+ *
187
+ * @example
188
+ * await client.previewApIs.patchSafetyEventsV2Batch({
189
+ * safetyEventIds: ["bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590", "bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590"]
190
+ * })
191
+ */
192
+ patchSafetyEventsV2Batch(request: Samsara.SafetyEventsV2PatchSafetyEventsV2BatchRequestBody, requestOptions?: PreviewApIsClient.RequestOptions): core.HttpResponsePromise<Samsara.SafetyEventsV2PatchSafetyEventsV2BatchResponseBody>;
193
+ private __patchSafetyEventsV2Batch;
121
194
  }
@@ -55,6 +55,104 @@ class PreviewApIsClient {
55
55
  constructor(options = {}) {
56
56
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
57
57
  }
58
+ /**
59
+ * List associations between vehicles and peripheral devices within a given time range. Associations represent the relationship between a central device (vehicle) and a peripheral device (e.g. asset tag). An association with a null endTime is still active.
60
+ *
61
+ * <b>Rate limit:</b> 5 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
62
+ *
63
+ * To use this endpoint, select **Read Assets** under the Assets 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>
64
+ *
65
+ * Endpoints in this section are in Preview. These APIs are not functional and are instead for soliciting feedback from our API users on the intended design of this API. Additionally, it is not guaranteed that we will be releasing an endpoint included in this section to production. This means that developers should **NOT** rely on these APIs to build business critical applications
66
+ *
67
+ * - Samsara may change the structure of a preview API's interface without versioning or any notice to API users.
68
+ *
69
+ * - When an endpoint becomes generally available, it will be announced in the API [changelog](https://developers.samsara.com/changelog).
70
+ *
71
+ *
72
+ * **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.
73
+ *
74
+ * @param {Samsara.ListAssociationsRequest} request
75
+ * @param {PreviewApIsClient.RequestOptions} requestOptions - Request-specific configuration.
76
+ *
77
+ * @throws {@link Samsara.UnauthorizedError}
78
+ * @throws {@link Samsara.NotFoundError}
79
+ * @throws {@link Samsara.MethodNotAllowedError}
80
+ * @throws {@link Samsara.TooManyRequestsError}
81
+ * @throws {@link Samsara.InternalServerError}
82
+ * @throws {@link Samsara.NotImplementedError}
83
+ * @throws {@link Samsara.BadGatewayError}
84
+ * @throws {@link Samsara.ServiceUnavailableError}
85
+ * @throws {@link Samsara.GatewayTimeoutError}
86
+ *
87
+ * @example
88
+ * await client.previewApIs.listAssociations({
89
+ * startTime: "startTime",
90
+ * endTime: "endTime"
91
+ * })
92
+ */
93
+ listAssociations(request, requestOptions) {
94
+ return core.HttpResponsePromise.fromPromise(this.__listAssociations(request, requestOptions));
95
+ }
96
+ __listAssociations(request, requestOptions) {
97
+ return __awaiter(this, void 0, void 0, function* () {
98
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
99
+ const { peripheralIds, startTime, endTime, after } = request;
100
+ const _queryParams = {
101
+ peripheralIds,
102
+ startTime,
103
+ endTime,
104
+ after,
105
+ };
106
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
107
+ 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);
108
+ const _response = yield core.fetcher({
109
+ 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, "preview/fleet/assets/associations"),
110
+ method: "GET",
111
+ headers: _headers,
112
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
113
+ 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,
114
+ 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,
115
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
116
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
117
+ logging: this._options.logging,
118
+ });
119
+ if (_response.ok) {
120
+ return {
121
+ data: _response.body,
122
+ rawResponse: _response.rawResponse,
123
+ };
124
+ }
125
+ if (_response.error.reason === "status-code") {
126
+ switch (_response.error.statusCode) {
127
+ case 401:
128
+ throw new Samsara.UnauthorizedError(_response.error.body, _response.rawResponse);
129
+ case 404:
130
+ throw new Samsara.NotFoundError(_response.error.body, _response.rawResponse);
131
+ case 405:
132
+ throw new Samsara.MethodNotAllowedError(_response.error.body, _response.rawResponse);
133
+ case 429:
134
+ throw new Samsara.TooManyRequestsError(_response.error.body, _response.rawResponse);
135
+ case 500:
136
+ throw new Samsara.InternalServerError(_response.error.body, _response.rawResponse);
137
+ case 501:
138
+ throw new Samsara.NotImplementedError(_response.error.body, _response.rawResponse);
139
+ case 502:
140
+ throw new Samsara.BadGatewayError(_response.error.body, _response.rawResponse);
141
+ case 503:
142
+ throw new Samsara.ServiceUnavailableError(_response.error.body, _response.rawResponse);
143
+ case 504:
144
+ throw new Samsara.GatewayTimeoutError(_response.error.body, _response.rawResponse);
145
+ default:
146
+ throw new errors.SamsaraError({
147
+ statusCode: _response.error.statusCode,
148
+ body: _response.error.body,
149
+ rawResponse: _response.rawResponse,
150
+ });
151
+ }
152
+ }
153
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/preview/fleet/assets/associations");
154
+ });
155
+ }
58
156
  /**
59
157
  * Creates a short-lived auth token for a driver.
60
158
  *
@@ -324,5 +422,98 @@ class PreviewApIsClient {
324
422
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/preview/fleet/vehicles/{id}/lock");
325
423
  });
326
424
  }
425
+ /**
426
+ * Asynchronously update eventState and/or context labels for one or more Safety Events. Returns 202 Accepted immediately. State changes propagate asynchronously; use GET /safety-events to confirm updated state. If any safetyEventIds are not found, the entire request fails with 404 before any mutations are executed. If both eventState and label fields are provided, the two mutations execute serially and are not transactional — a label mutation failure will not roll back a successful state change.
427
+ *
428
+ * <b>Rate limit:</b> 5 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
429
+ *
430
+ * To use this endpoint, select **Write Safety Events & Scores** under the Safety & Cameras 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>
431
+ *
432
+ * Endpoints in this section are in Preview. These APIs are not functional and are instead for soliciting feedback from our API users on the intended design of this API. Additionally, it is not guaranteed that we will be releasing an endpoint included in this section to production. This means that developers should **NOT** rely on these APIs to build business critical applications
433
+ *
434
+ * - Samsara may change the structure of a preview API's interface without versioning or any notice to API users.
435
+ *
436
+ * - When an endpoint becomes generally available, it will be announced in the API [changelog](https://developers.samsara.com/changelog).
437
+ *
438
+ *
439
+ * **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.
440
+ *
441
+ * @param {Samsara.SafetyEventsV2PatchSafetyEventsV2BatchRequestBody} request
442
+ * @param {PreviewApIsClient.RequestOptions} requestOptions - Request-specific configuration.
443
+ *
444
+ * @throws {@link Samsara.UnauthorizedError}
445
+ * @throws {@link Samsara.NotFoundError}
446
+ * @throws {@link Samsara.MethodNotAllowedError}
447
+ * @throws {@link Samsara.TooManyRequestsError}
448
+ * @throws {@link Samsara.InternalServerError}
449
+ * @throws {@link Samsara.NotImplementedError}
450
+ * @throws {@link Samsara.BadGatewayError}
451
+ * @throws {@link Samsara.ServiceUnavailableError}
452
+ * @throws {@link Samsara.GatewayTimeoutError}
453
+ *
454
+ * @example
455
+ * await client.previewApIs.patchSafetyEventsV2Batch({
456
+ * safetyEventIds: ["bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590", "bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590"]
457
+ * })
458
+ */
459
+ patchSafetyEventsV2Batch(request, requestOptions) {
460
+ return core.HttpResponsePromise.fromPromise(this.__patchSafetyEventsV2Batch(request, requestOptions));
461
+ }
462
+ __patchSafetyEventsV2Batch(request, requestOptions) {
463
+ return __awaiter(this, void 0, void 0, function* () {
464
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
465
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
466
+ 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);
467
+ const _response = yield core.fetcher({
468
+ 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, "preview/safety-events/batch"),
469
+ method: "PATCH",
470
+ headers: _headers,
471
+ contentType: "application/json",
472
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
473
+ requestType: "json",
474
+ body: request,
475
+ 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,
476
+ 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,
477
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
478
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
479
+ logging: this._options.logging,
480
+ });
481
+ if (_response.ok) {
482
+ return {
483
+ data: _response.body,
484
+ rawResponse: _response.rawResponse,
485
+ };
486
+ }
487
+ if (_response.error.reason === "status-code") {
488
+ switch (_response.error.statusCode) {
489
+ case 401:
490
+ throw new Samsara.UnauthorizedError(_response.error.body, _response.rawResponse);
491
+ case 404:
492
+ throw new Samsara.NotFoundError(_response.error.body, _response.rawResponse);
493
+ case 405:
494
+ throw new Samsara.MethodNotAllowedError(_response.error.body, _response.rawResponse);
495
+ case 429:
496
+ throw new Samsara.TooManyRequestsError(_response.error.body, _response.rawResponse);
497
+ case 500:
498
+ throw new Samsara.InternalServerError(_response.error.body, _response.rawResponse);
499
+ case 501:
500
+ throw new Samsara.NotImplementedError(_response.error.body, _response.rawResponse);
501
+ case 502:
502
+ throw new Samsara.BadGatewayError(_response.error.body, _response.rawResponse);
503
+ case 503:
504
+ throw new Samsara.ServiceUnavailableError(_response.error.body, _response.rawResponse);
505
+ case 504:
506
+ throw new Samsara.GatewayTimeoutError(_response.error.body, _response.rawResponse);
507
+ default:
508
+ throw new errors.SamsaraError({
509
+ statusCode: _response.error.statusCode,
510
+ body: _response.error.body,
511
+ rawResponse: _response.rawResponse,
512
+ });
513
+ }
514
+ }
515
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/preview/safety-events/batch");
516
+ });
517
+ }
327
518
  }
328
519
  exports.PreviewApIsClient = PreviewApIsClient;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * startTime: "startTime",
5
+ * endTime: "endTime"
6
+ * }
7
+ */
8
+ export interface ListAssociationsRequest {
9
+ /** A comma-separated list of peripheral asset IDs to filter associations by. (Example: 1234,5678) */
10
+ peripheralIds?: string | string[];
11
+ /** A start time in RFC 3339 format. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00). */
12
+ startTime: string;
13
+ /** An end time in RFC 3339 format. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00). */
14
+ endTime: string;
15
+ /** 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. */
16
+ after?: string;
17
+ }
@@ -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,31 @@
1
+ import type * as Samsara from "../../../../index.js";
2
+ /**
3
+ * @example
4
+ * {
5
+ * safetyEventIds: ["bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590", "bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590"]
6
+ * }
7
+ */
8
+ export interface SafetyEventsV2PatchSafetyEventsV2BatchRequestBody {
9
+ /** Context label IDs to add to the Safety Events. */
10
+ contextLabelIdsToAdd?: string[];
11
+ /** Context label IDs to remove from the Safety Events. */
12
+ contextLabelIdsToRemove?: string[];
13
+ dismissalReason?: Samsara.PatchSafetyEventsDismissalReasonBodyRequestBody;
14
+ /** The new state to apply to all specified Safety Events. Valid values: `needsReview`, `reviewed`, `needsCoaching`, `coached`, `dismissed`, `needsRecognition`, `recognized` */
15
+ eventState?: SafetyEventsV2PatchSafetyEventsV2BatchRequestBody.EventState;
16
+ /** IDs of the Safety Events to update. Maximum 200. */
17
+ safetyEventIds: string[];
18
+ }
19
+ export declare namespace SafetyEventsV2PatchSafetyEventsV2BatchRequestBody {
20
+ /** The new state to apply to all specified Safety Events. Valid values: `needsReview`, `reviewed`, `needsCoaching`, `coached`, `dismissed`, `needsRecognition`, `recognized` */
21
+ const EventState: {
22
+ readonly NeedsReview: "needsReview";
23
+ readonly Reviewed: "reviewed";
24
+ readonly NeedsCoaching: "needsCoaching";
25
+ readonly Coached: "coached";
26
+ readonly Dismissed: "dismissed";
27
+ readonly NeedsRecognition: "needsRecognition";
28
+ readonly Recognized: "recognized";
29
+ };
30
+ type EventState = (typeof EventState)[keyof typeof EventState];
31
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.SafetyEventsV2PatchSafetyEventsV2BatchRequestBody = void 0;
5
+ var SafetyEventsV2PatchSafetyEventsV2BatchRequestBody;
6
+ (function (SafetyEventsV2PatchSafetyEventsV2BatchRequestBody) {
7
+ /** The new state to apply to all specified Safety Events. Valid values: `needsReview`, `reviewed`, `needsCoaching`, `coached`, `dismissed`, `needsRecognition`, `recognized` */
8
+ SafetyEventsV2PatchSafetyEventsV2BatchRequestBody.EventState = {
9
+ NeedsReview: "needsReview",
10
+ Reviewed: "reviewed",
11
+ NeedsCoaching: "needsCoaching",
12
+ Coached: "coached",
13
+ Dismissed: "dismissed",
14
+ NeedsRecognition: "needsRecognition",
15
+ Recognized: "recognized",
16
+ };
17
+ })(SafetyEventsV2PatchSafetyEventsV2BatchRequestBody || (exports.SafetyEventsV2PatchSafetyEventsV2BatchRequestBody = SafetyEventsV2PatchSafetyEventsV2BatchRequestBody = {}));
@@ -1,3 +1,5 @@
1
1
  export type { DriversAuthTokenCreateDriverAuthTokenRequestBody } from "./DriversAuthTokenCreateDriverAuthTokenRequestBody.js";
2
+ export type { ListAssociationsRequest } from "./ListAssociationsRequest.js";
2
3
  export type { LockVehicleRequest } from "./LockVehicleRequest.js";
4
+ export { SafetyEventsV2PatchSafetyEventsV2BatchRequestBody } from "./SafetyEventsV2PatchSafetyEventsV2BatchRequestBody.js";
3
5
  export type { UnlockVehicleRequest } from "./UnlockVehicleRequest.js";
@@ -1,2 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SafetyEventsV2PatchSafetyEventsV2BatchRequestBody = void 0;
4
+ var SafetyEventsV2PatchSafetyEventsV2BatchRequestBody_js_1 = require("./SafetyEventsV2PatchSafetyEventsV2BatchRequestBody.js");
5
+ Object.defineProperty(exports, "SafetyEventsV2PatchSafetyEventsV2BatchRequestBody", { enumerable: true, get: function () { return SafetyEventsV2PatchSafetyEventsV2BatchRequestBody_js_1.SafetyEventsV2PatchSafetyEventsV2BatchRequestBody; } });
@@ -0,0 +1,15 @@
1
+ /**
2
+ * An association between a vehicle (central device) and a peripheral device.
3
+ */
4
+ export interface AssociationResponseBody {
5
+ /** The time when this association ended, in RFC 3339 format. Null if the association is still active. */
6
+ associationEndTime?: string | undefined;
7
+ /** The time when this association started, in RFC 3339 format. */
8
+ associationStartTime: string;
9
+ /** The Samsara ID of the peripheral device in this association. */
10
+ peripheralId: string;
11
+ /** The human-readable name of the peripheral device, if available. */
12
+ peripheralName?: string | undefined;
13
+ /** The Samsara ID of the vehicle (central device) in this association. */
14
+ vehicleId: string;
15
+ }
@@ -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
+ * Bad Gateway
3
+ */
4
+ export interface AssociationsListAssociationsBadGatewayErrorResponseBody {
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 });