@chrt-inc/typescript-sdk 1.320.0 → 1.321.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 (284) hide show
  1. package/dist/cjs/Client.d.ts +6 -3
  2. package/dist/cjs/Client.js +36 -31
  3. package/dist/cjs/api/resources/drivers/client/Client.d.ts +59 -61
  4. package/dist/cjs/api/resources/drivers/client/Client.js +140 -139
  5. package/dist/cjs/api/resources/drivers/client/requests/DriverClientCreate1.d.ts +20 -0
  6. package/dist/cjs/api/resources/drivers/client/requests/{UpdateDriverDetailsReq.d.ts → DriverClientUpdate1.d.ts} +4 -5
  7. package/dist/cjs/api/resources/drivers/client/requests/DriverLastSeenReq.d.ts +1 -0
  8. package/dist/cjs/api/resources/drivers/client/requests/index.d.ts +2 -3
  9. package/dist/cjs/api/resources/index.d.ts +4 -1
  10. package/dist/cjs/api/resources/index.js +5 -2
  11. package/dist/cjs/api/resources/orders/client/Client.d.ts +13 -0
  12. package/dist/cjs/api/resources/orders/client/Client.js +59 -0
  13. package/dist/cjs/api/resources/taskArtifacts/client/Client.d.ts +79 -6
  14. package/dist/cjs/api/resources/taskArtifacts/client/Client.js +308 -6
  15. package/dist/cjs/api/resources/taskArtifacts/client/index.d.ts +1 -0
  16. package/dist/cjs/api/resources/taskArtifacts/client/index.js +15 -0
  17. package/dist/cjs/api/resources/taskArtifacts/client/requests/AddTaskArtifactReq.d.ts +19 -0
  18. package/dist/cjs/api/resources/taskArtifacts/client/requests/index.d.ts +1 -0
  19. package/dist/cjs/api/resources/taskArtifacts/resources/index.d.ts +2 -2
  20. package/dist/cjs/api/resources/taskArtifacts/resources/index.js +3 -3
  21. package/dist/cjs/api/resources/taskArtifacts/resources/{blurhash → s3Object}/client/Client.d.ts +9 -9
  22. package/dist/cjs/api/resources/taskArtifacts/resources/{blurhash → s3Object}/client/Client.js +11 -11
  23. package/dist/cjs/api/resources/taskArtifacts/resources/s3ObjectMetadata/client/Client.d.ts +47 -0
  24. package/dist/cjs/api/resources/taskArtifacts/resources/s3ObjectMetadata/client/Client.js +127 -0
  25. package/dist/cjs/api/resources/taskArtifacts/resources/s3ObjectMetadata/client/index.js +2 -0
  26. package/dist/cjs/api/resources/taskGroups/client/Client.d.ts +79 -33
  27. package/dist/cjs/api/resources/taskGroups/client/Client.js +220 -67
  28. package/dist/cjs/api/resources/taskGroups/client/requests/AddMessageReq.d.ts +13 -0
  29. package/dist/cjs/api/resources/taskGroups/client/requests/BodyPostAddS3ObjectV1OortTaskGroupsAddS3ObjectV1TaskGroupIdPost.d.ts +13 -0
  30. package/dist/cjs/api/resources/taskGroups/client/requests/SetFlightNumberReq.d.ts +1 -0
  31. package/dist/cjs/api/resources/taskGroups/client/requests/SetTaskOrderingReq.d.ts +3 -2
  32. package/dist/cjs/api/resources/taskGroups/client/requests/UpdateCourierOrgReq.d.ts +13 -0
  33. package/dist/cjs/api/resources/taskGroups/client/requests/UpdateCourierOrgReq.js +5 -0
  34. package/dist/cjs/api/resources/taskGroups/client/requests/UpdateDriverReq.d.ts +13 -0
  35. package/dist/cjs/api/resources/taskGroups/client/requests/UpdateDriverReq.js +5 -0
  36. package/dist/cjs/api/resources/taskGroups/client/requests/index.d.ts +4 -2
  37. package/dist/cjs/api/resources/taskGroups/resources/expanded/client/Client.d.ts +4 -0
  38. package/dist/cjs/api/resources/taskGroups/resources/expanded/client/Client.js +18 -2
  39. package/dist/cjs/api/resources/taskGroups/resources/expanded/client/requests/ExpandedListForCourierDriverV1Request.d.ts +4 -0
  40. package/dist/cjs/api/resources/taskGroups/resources/expanded/client/requests/ExpandedListForCourierOperatorsV1Request.d.ts +4 -0
  41. package/dist/cjs/api/resources/taskGroups/resources/index.d.ts +3 -0
  42. package/dist/cjs/api/resources/taskGroups/resources/index.js +4 -1
  43. package/dist/cjs/api/resources/{taskArtifacts/resources/images → taskGroups/resources/s3Object}/client/Client.d.ts +14 -7
  44. package/dist/cjs/api/resources/{taskArtifacts/resources/images → taskGroups/resources/s3Object}/client/Client.js +16 -10
  45. package/dist/cjs/api/resources/taskGroups/resources/s3Object/client/index.js +2 -0
  46. package/dist/cjs/api/resources/taskGroups/resources/s3Object/index.d.ts +1 -0
  47. package/dist/cjs/api/resources/taskGroups/resources/s3Object/index.js +17 -0
  48. package/dist/cjs/api/resources/taskGroups/resources/s3ObjectMetadata/client/Client.d.ts +47 -0
  49. package/dist/cjs/api/resources/taskGroups/resources/s3ObjectMetadata/client/Client.js +127 -0
  50. package/dist/cjs/api/resources/taskGroups/resources/s3ObjectMetadata/client/index.js +2 -0
  51. package/dist/cjs/api/resources/taskGroups/resources/s3ObjectMetadata/index.d.ts +1 -0
  52. package/dist/cjs/api/resources/taskGroups/resources/s3ObjectMetadata/index.js +17 -0
  53. package/dist/cjs/api/resources/taskGroups/resources/taskGroupId/client/Client.d.ts +59 -0
  54. package/dist/cjs/api/resources/taskGroups/resources/taskGroupId/client/Client.js +186 -0
  55. package/dist/cjs/api/resources/taskGroups/resources/taskGroupId/client/index.js +2 -0
  56. package/dist/cjs/api/resources/taskGroups/resources/taskGroupId/index.d.ts +1 -0
  57. package/dist/cjs/api/resources/taskGroups/resources/taskGroupId/index.js +17 -0
  58. package/dist/cjs/api/resources/tasks/client/Client.d.ts +107 -0
  59. package/dist/cjs/api/resources/tasks/client/Client.js +377 -0
  60. package/dist/cjs/api/resources/tasks/client/index.d.ts +2 -0
  61. package/dist/cjs/api/resources/tasks/client/index.js +17 -0
  62. package/dist/cjs/api/resources/tasks/client/requests/AddTaskToGroupReq.d.ts +21 -0
  63. package/dist/cjs/api/resources/tasks/client/requests/AddTaskToGroupReq.js +5 -0
  64. package/dist/cjs/api/resources/tasks/client/requests/index.d.ts +1 -0
  65. package/dist/cjs/api/resources/tasks/client/requests/index.js +2 -0
  66. package/dist/cjs/api/resources/tasks/index.d.ts +1 -0
  67. package/dist/cjs/api/resources/tasks/index.js +17 -0
  68. package/dist/cjs/api/types/Cargo1.d.ts +1 -0
  69. package/dist/cjs/api/types/CargoStatusEnum1.d.ts +2 -1
  70. package/dist/cjs/api/types/CargoStatusEnum1.js +1 -0
  71. package/dist/cjs/api/types/ChrtGroundCourierTaskActionEnum1.d.ts +2 -2
  72. package/dist/cjs/api/types/ChrtGroundCourierTaskActionEnum1.js +1 -1
  73. package/dist/cjs/api/types/Driver1.d.ts +6 -4
  74. package/dist/cjs/api/types/DriverStatusEnum.d.ts +3 -3
  75. package/dist/cjs/api/types/DriverStatusEnum.js +2 -2
  76. package/dist/cjs/api/types/DriverUpdateAvailabilityReq.d.ts +6 -0
  77. package/dist/cjs/api/types/DriverUpdateAvailabilityReq.js +5 -0
  78. package/dist/cjs/api/types/Task1.d.ts +1 -0
  79. package/dist/cjs/api/types/TaskArtifact1.d.ts +1 -0
  80. package/dist/cjs/api/types/TaskArtifactClientCreate1.d.ts +8 -0
  81. package/dist/cjs/api/types/TaskArtifactClientCreate1.js +5 -0
  82. package/dist/cjs/api/types/TaskArtifactS3ObjectMetadata1.d.ts +15 -0
  83. package/dist/cjs/api/types/TaskArtifactS3ObjectMetadata1.js +5 -0
  84. package/dist/cjs/api/types/TaskArtifactStatusEnum1.d.ts +2 -1
  85. package/dist/cjs/api/types/TaskArtifactStatusEnum1.js +1 -0
  86. package/dist/cjs/api/types/TaskClientUpdate1.d.ts +0 -1
  87. package/dist/cjs/api/types/TaskGroup1.d.ts +1 -0
  88. package/dist/cjs/api/types/TaskGroupS3ObjectMetadata1.d.ts +15 -0
  89. package/dist/cjs/api/types/TaskGroupS3ObjectMetadata1.js +5 -0
  90. package/dist/cjs/api/types/TaskGroupSortByEnum.d.ts +2 -1
  91. package/dist/cjs/api/types/TaskGroupSortByEnum.js +1 -0
  92. package/dist/cjs/api/types/TaskGroupStatusEnum1.d.ts +2 -1
  93. package/dist/cjs/api/types/TaskGroupStatusEnum1.js +1 -0
  94. package/dist/cjs/api/types/TaskStatusEnum1.d.ts +2 -1
  95. package/dist/cjs/api/types/TaskStatusEnum1.js +1 -0
  96. package/dist/cjs/api/types/index.d.ts +4 -0
  97. package/dist/cjs/api/types/index.js +4 -0
  98. package/dist/cjs/core/exports.d.ts +1 -0
  99. package/dist/cjs/core/exports.js +17 -0
  100. package/dist/cjs/core/file/exports.d.ts +1 -0
  101. package/dist/cjs/core/file/exports.js +2 -0
  102. package/dist/cjs/core/file/file.d.ts +5 -0
  103. package/dist/cjs/core/file/file.js +203 -0
  104. package/dist/cjs/core/file/index.d.ts +2 -0
  105. package/dist/cjs/core/file/index.js +18 -0
  106. package/dist/cjs/core/file/types.d.ts +66 -0
  107. package/dist/cjs/core/file/types.js +2 -0
  108. package/dist/cjs/core/form-data-utils/FormDataWrapper.d.ts +16 -0
  109. package/dist/cjs/core/form-data-utils/FormDataWrapper.js +208 -0
  110. package/dist/cjs/core/form-data-utils/encodeAsFormParameter.d.ts +1 -0
  111. package/dist/cjs/core/form-data-utils/encodeAsFormParameter.js +12 -0
  112. package/dist/cjs/core/form-data-utils/index.d.ts +2 -0
  113. package/dist/cjs/core/form-data-utils/index.js +20 -0
  114. package/dist/cjs/core/index.d.ts +2 -0
  115. package/dist/cjs/core/index.js +3 -1
  116. package/dist/cjs/exports.d.ts +1 -0
  117. package/dist/cjs/exports.js +17 -0
  118. package/dist/cjs/index.d.ts +1 -0
  119. package/dist/cjs/index.js +4 -0
  120. package/dist/cjs/version.d.ts +1 -1
  121. package/dist/cjs/version.js +1 -1
  122. package/dist/esm/Client.d.mts +6 -3
  123. package/dist/esm/Client.mjs +12 -7
  124. package/dist/esm/api/resources/drivers/client/Client.d.mts +59 -61
  125. package/dist/esm/api/resources/drivers/client/Client.mjs +140 -139
  126. package/dist/esm/api/resources/drivers/client/requests/DriverClientCreate1.d.mts +20 -0
  127. package/dist/esm/api/resources/drivers/client/requests/{UpdateDriverDetailsReq.d.mts → DriverClientUpdate1.d.mts} +4 -5
  128. package/dist/esm/api/resources/drivers/client/requests/DriverLastSeenReq.d.mts +1 -0
  129. package/dist/esm/api/resources/drivers/client/requests/index.d.mts +2 -3
  130. package/dist/esm/api/resources/index.d.mts +4 -1
  131. package/dist/esm/api/resources/index.mjs +4 -1
  132. package/dist/esm/api/resources/orders/client/Client.d.mts +13 -0
  133. package/dist/esm/api/resources/orders/client/Client.mjs +59 -0
  134. package/dist/esm/api/resources/taskArtifacts/client/Client.d.mts +79 -6
  135. package/dist/esm/api/resources/taskArtifacts/client/Client.mjs +275 -6
  136. package/dist/esm/api/resources/taskArtifacts/client/index.d.mts +1 -0
  137. package/dist/esm/api/resources/taskArtifacts/client/index.mjs +1 -1
  138. package/dist/esm/api/resources/taskArtifacts/client/requests/AddTaskArtifactReq.d.mts +19 -0
  139. package/dist/esm/api/resources/taskArtifacts/client/requests/index.d.mts +1 -0
  140. package/dist/esm/api/resources/taskArtifacts/resources/index.d.mts +2 -2
  141. package/dist/esm/api/resources/taskArtifacts/resources/index.mjs +2 -2
  142. package/dist/esm/api/resources/taskArtifacts/resources/{blurhash → s3Object}/client/Client.d.mts +9 -9
  143. package/dist/esm/api/resources/taskArtifacts/resources/{blurhash → s3Object}/client/Client.mjs +9 -9
  144. package/dist/esm/api/resources/taskArtifacts/resources/s3Object/client/index.d.mts +1 -0
  145. package/dist/esm/api/resources/taskArtifacts/resources/s3Object/client/index.mjs +1 -0
  146. package/dist/esm/api/resources/taskArtifacts/resources/s3ObjectMetadata/client/Client.d.mts +47 -0
  147. package/dist/esm/api/resources/taskArtifacts/resources/s3ObjectMetadata/client/Client.mjs +90 -0
  148. package/dist/esm/api/resources/taskArtifacts/resources/s3ObjectMetadata/client/index.d.mts +1 -0
  149. package/dist/esm/api/resources/taskArtifacts/resources/s3ObjectMetadata/client/index.mjs +1 -0
  150. package/dist/esm/api/resources/taskGroups/client/Client.d.mts +79 -33
  151. package/dist/esm/api/resources/taskGroups/client/Client.mjs +218 -65
  152. package/dist/esm/api/resources/taskGroups/client/requests/AddMessageReq.d.mts +13 -0
  153. package/dist/esm/api/resources/taskGroups/client/requests/BodyPostAddS3ObjectV1OortTaskGroupsAddS3ObjectV1TaskGroupIdPost.d.mts +13 -0
  154. package/dist/esm/api/resources/taskGroups/client/requests/SetFlightNumberReq.d.mts +1 -0
  155. package/dist/esm/api/resources/taskGroups/client/requests/SetTaskOrderingReq.d.mts +3 -2
  156. package/dist/esm/api/resources/taskGroups/client/requests/UpdateCourierOrgReq.d.mts +13 -0
  157. package/dist/esm/api/resources/taskGroups/client/requests/UpdateCourierOrgReq.mjs +4 -0
  158. package/dist/esm/api/resources/taskGroups/client/requests/UpdateDriverReq.d.mts +13 -0
  159. package/dist/esm/api/resources/taskGroups/client/requests/UpdateDriverReq.mjs +4 -0
  160. package/dist/esm/api/resources/taskGroups/client/requests/index.d.mts +4 -2
  161. package/dist/esm/api/resources/taskGroups/resources/expanded/client/Client.d.mts +4 -0
  162. package/dist/esm/api/resources/taskGroups/resources/expanded/client/Client.mjs +18 -2
  163. package/dist/esm/api/resources/taskGroups/resources/expanded/client/requests/ExpandedListForCourierDriverV1Request.d.mts +4 -0
  164. package/dist/esm/api/resources/taskGroups/resources/expanded/client/requests/ExpandedListForCourierOperatorsV1Request.d.mts +4 -0
  165. package/dist/esm/api/resources/taskGroups/resources/index.d.mts +3 -0
  166. package/dist/esm/api/resources/taskGroups/resources/index.mjs +3 -0
  167. package/dist/esm/api/resources/{taskArtifacts/resources/images → taskGroups/resources/s3Object}/client/Client.d.mts +14 -7
  168. package/dist/esm/api/resources/{taskArtifacts/resources/images → taskGroups/resources/s3Object}/client/Client.mjs +14 -8
  169. package/dist/esm/api/resources/taskGroups/resources/s3Object/client/index.d.mts +1 -0
  170. package/dist/esm/api/resources/taskGroups/resources/s3Object/client/index.mjs +1 -0
  171. package/dist/esm/api/resources/taskGroups/resources/s3Object/index.d.mts +1 -0
  172. package/dist/esm/api/resources/taskGroups/resources/s3Object/index.mjs +1 -0
  173. package/dist/esm/api/resources/taskGroups/resources/s3ObjectMetadata/client/Client.d.mts +47 -0
  174. package/dist/esm/api/resources/taskGroups/resources/s3ObjectMetadata/client/Client.mjs +90 -0
  175. package/dist/esm/api/resources/taskGroups/resources/s3ObjectMetadata/client/index.d.mts +1 -0
  176. package/dist/esm/api/resources/taskGroups/resources/s3ObjectMetadata/client/index.mjs +1 -0
  177. package/dist/esm/api/resources/taskGroups/resources/s3ObjectMetadata/index.d.mts +1 -0
  178. package/dist/esm/api/resources/taskGroups/resources/s3ObjectMetadata/index.mjs +1 -0
  179. package/dist/esm/api/resources/taskGroups/resources/taskGroupId/client/Client.d.mts +59 -0
  180. package/dist/esm/api/resources/taskGroups/resources/taskGroupId/client/Client.mjs +149 -0
  181. package/dist/esm/api/resources/taskGroups/resources/taskGroupId/client/index.d.mts +1 -0
  182. package/dist/esm/api/resources/taskGroups/resources/taskGroupId/client/index.mjs +1 -0
  183. package/dist/esm/api/resources/taskGroups/resources/taskGroupId/index.d.mts +1 -0
  184. package/dist/esm/api/resources/taskGroups/resources/taskGroupId/index.mjs +1 -0
  185. package/dist/esm/api/resources/tasks/client/Client.d.mts +107 -0
  186. package/dist/esm/api/resources/tasks/client/Client.mjs +340 -0
  187. package/dist/esm/api/resources/tasks/client/index.d.mts +2 -0
  188. package/dist/esm/api/resources/tasks/client/index.mjs +1 -0
  189. package/dist/esm/api/resources/tasks/client/requests/AddTaskToGroupReq.d.mts +21 -0
  190. package/dist/esm/api/resources/tasks/client/requests/AddTaskToGroupReq.mjs +4 -0
  191. package/dist/esm/api/resources/tasks/client/requests/index.d.mts +1 -0
  192. package/dist/esm/api/resources/tasks/client/requests/index.mjs +1 -0
  193. package/dist/esm/api/resources/tasks/index.d.mts +1 -0
  194. package/dist/esm/api/resources/tasks/index.mjs +1 -0
  195. package/dist/esm/api/types/Cargo1.d.mts +1 -0
  196. package/dist/esm/api/types/CargoStatusEnum1.d.mts +2 -1
  197. package/dist/esm/api/types/CargoStatusEnum1.mjs +1 -0
  198. package/dist/esm/api/types/ChrtGroundCourierTaskActionEnum1.d.mts +2 -2
  199. package/dist/esm/api/types/ChrtGroundCourierTaskActionEnum1.mjs +1 -1
  200. package/dist/esm/api/types/Driver1.d.mts +6 -4
  201. package/dist/esm/api/types/DriverStatusEnum.d.mts +3 -3
  202. package/dist/esm/api/types/DriverStatusEnum.mjs +2 -2
  203. package/dist/esm/api/types/DriverUpdateAvailabilityReq.d.mts +6 -0
  204. package/dist/esm/api/types/DriverUpdateAvailabilityReq.mjs +4 -0
  205. package/dist/esm/api/types/Task1.d.mts +1 -0
  206. package/dist/esm/api/types/TaskArtifact1.d.mts +1 -0
  207. package/dist/esm/api/types/TaskArtifactClientCreate1.d.mts +8 -0
  208. package/dist/esm/api/types/TaskArtifactClientCreate1.mjs +4 -0
  209. package/dist/esm/api/types/TaskArtifactS3ObjectMetadata1.d.mts +15 -0
  210. package/dist/esm/api/types/TaskArtifactS3ObjectMetadata1.mjs +4 -0
  211. package/dist/esm/api/types/TaskArtifactStatusEnum1.d.mts +2 -1
  212. package/dist/esm/api/types/TaskArtifactStatusEnum1.mjs +1 -0
  213. package/dist/esm/api/types/TaskClientUpdate1.d.mts +0 -1
  214. package/dist/esm/api/types/TaskGroup1.d.mts +1 -0
  215. package/dist/esm/api/types/TaskGroupS3ObjectMetadata1.d.mts +15 -0
  216. package/dist/esm/api/types/TaskGroupS3ObjectMetadata1.mjs +4 -0
  217. package/dist/esm/api/types/TaskGroupSortByEnum.d.mts +2 -1
  218. package/dist/esm/api/types/TaskGroupSortByEnum.mjs +1 -0
  219. package/dist/esm/api/types/TaskGroupStatusEnum1.d.mts +2 -1
  220. package/dist/esm/api/types/TaskGroupStatusEnum1.mjs +1 -0
  221. package/dist/esm/api/types/TaskStatusEnum1.d.mts +2 -1
  222. package/dist/esm/api/types/TaskStatusEnum1.mjs +1 -0
  223. package/dist/esm/api/types/index.d.mts +4 -0
  224. package/dist/esm/api/types/index.mjs +4 -0
  225. package/dist/esm/core/exports.d.mts +1 -0
  226. package/dist/esm/core/exports.mjs +1 -0
  227. package/dist/esm/core/file/exports.d.mts +1 -0
  228. package/dist/esm/core/file/exports.mjs +1 -0
  229. package/dist/esm/core/file/file.d.mts +5 -0
  230. package/dist/esm/core/file/file.mjs +167 -0
  231. package/dist/esm/core/file/index.d.mts +2 -0
  232. package/dist/esm/core/file/index.mjs +2 -0
  233. package/dist/esm/core/file/types.d.mts +66 -0
  234. package/dist/esm/core/file/types.mjs +1 -0
  235. package/dist/esm/core/form-data-utils/FormDataWrapper.d.mts +16 -0
  236. package/dist/esm/core/form-data-utils/FormDataWrapper.mjs +170 -0
  237. package/dist/esm/core/form-data-utils/encodeAsFormParameter.d.mts +1 -0
  238. package/dist/esm/core/form-data-utils/encodeAsFormParameter.mjs +9 -0
  239. package/dist/esm/core/form-data-utils/index.d.mts +2 -0
  240. package/dist/esm/core/form-data-utils/index.mjs +2 -0
  241. package/dist/esm/core/index.d.mts +2 -0
  242. package/dist/esm/core/index.mjs +2 -0
  243. package/dist/esm/exports.d.mts +1 -0
  244. package/dist/esm/exports.mjs +1 -0
  245. package/dist/esm/index.d.mts +1 -0
  246. package/dist/esm/index.mjs +1 -0
  247. package/dist/esm/version.d.mts +1 -1
  248. package/dist/esm/version.mjs +1 -1
  249. package/package.json +1 -1
  250. package/reference.md +1300 -206
  251. package/dist/cjs/api/resources/drivers/client/requests/DriverCreateReq.d.ts +0 -17
  252. package/dist/cjs/api/resources/drivers/client/requests/SetDriverActivationReq.d.ts +0 -14
  253. package/dist/cjs/api/resources/taskGroups/client/requests/UpdateTaskGroupCourierOrgReq.d.ts +0 -12
  254. package/dist/cjs/api/resources/taskGroups/client/requests/UpdateTaskGroupDriverReq.d.ts +0 -11
  255. package/dist/esm/api/resources/drivers/client/requests/DriverCreateReq.d.mts +0 -17
  256. package/dist/esm/api/resources/drivers/client/requests/SetDriverActivationReq.d.mts +0 -14
  257. package/dist/esm/api/resources/taskGroups/client/requests/UpdateTaskGroupCourierOrgReq.d.mts +0 -12
  258. package/dist/esm/api/resources/taskGroups/client/requests/UpdateTaskGroupDriverReq.d.mts +0 -11
  259. /package/dist/cjs/api/resources/drivers/client/requests/{DriverCreateReq.js → DriverClientCreate1.js} +0 -0
  260. /package/dist/cjs/api/resources/drivers/client/requests/{SetDriverActivationReq.js → DriverClientUpdate1.js} +0 -0
  261. /package/dist/cjs/api/resources/{drivers/client/requests/UpdateDriverDetailsReq.js → taskArtifacts/client/requests/AddTaskArtifactReq.js} +0 -0
  262. /package/dist/cjs/api/resources/taskArtifacts/{resources/blurhash/client → client/requests}/index.js +0 -0
  263. /package/dist/cjs/api/resources/taskArtifacts/resources/{blurhash → s3Object}/client/index.d.ts +0 -0
  264. /package/dist/cjs/api/resources/taskArtifacts/resources/{images → s3Object}/client/index.js +0 -0
  265. /package/dist/cjs/api/resources/taskArtifacts/resources/{blurhash → s3Object}/index.d.ts +0 -0
  266. /package/dist/cjs/api/resources/taskArtifacts/resources/{blurhash → s3Object}/index.js +0 -0
  267. /package/dist/cjs/api/resources/taskArtifacts/resources/{images → s3ObjectMetadata}/client/index.d.ts +0 -0
  268. /package/dist/cjs/api/resources/taskArtifacts/resources/{images → s3ObjectMetadata}/index.d.ts +0 -0
  269. /package/dist/cjs/api/resources/taskArtifacts/resources/{images → s3ObjectMetadata}/index.js +0 -0
  270. /package/dist/cjs/api/resources/taskGroups/client/requests/{UpdateTaskGroupCourierOrgReq.js → AddMessageReq.js} +0 -0
  271. /package/dist/cjs/api/resources/taskGroups/client/requests/{UpdateTaskGroupDriverReq.js → BodyPostAddS3ObjectV1OortTaskGroupsAddS3ObjectV1TaskGroupIdPost.js} +0 -0
  272. /package/dist/{esm/api/resources/taskArtifacts/resources/blurhash/client/index.d.mts → cjs/api/resources/taskGroups/resources/s3Object/client/index.d.ts} +0 -0
  273. /package/dist/{esm/api/resources/taskArtifacts/resources/blurhash/client/index.mjs → cjs/api/resources/taskGroups/resources/s3ObjectMetadata/client/index.d.ts} +0 -0
  274. /package/dist/{esm/api/resources/taskArtifacts/resources/images/client/index.d.mts → cjs/api/resources/taskGroups/resources/taskGroupId/client/index.d.ts} +0 -0
  275. /package/dist/esm/api/resources/drivers/client/requests/{DriverCreateReq.mjs → DriverClientCreate1.mjs} +0 -0
  276. /package/dist/esm/api/resources/drivers/client/requests/{SetDriverActivationReq.mjs → DriverClientUpdate1.mjs} +0 -0
  277. /package/dist/esm/api/resources/{drivers/client/requests/UpdateDriverDetailsReq.mjs → taskArtifacts/client/requests/AddTaskArtifactReq.mjs} +0 -0
  278. /package/dist/esm/api/resources/taskArtifacts/{resources/images/client → client/requests}/index.mjs +0 -0
  279. /package/dist/esm/api/resources/taskArtifacts/resources/{blurhash → s3Object}/index.d.mts +0 -0
  280. /package/dist/esm/api/resources/taskArtifacts/resources/{blurhash → s3Object}/index.mjs +0 -0
  281. /package/dist/esm/api/resources/taskArtifacts/resources/{images → s3ObjectMetadata}/index.d.mts +0 -0
  282. /package/dist/esm/api/resources/taskArtifacts/resources/{images → s3ObjectMetadata}/index.mjs +0 -0
  283. /package/dist/esm/api/resources/taskGroups/client/requests/{UpdateTaskGroupCourierOrgReq.mjs → AddMessageReq.mjs} +0 -0
  284. /package/dist/esm/api/resources/taskGroups/client/requests/{UpdateTaskGroupDriverReq.mjs → BodyPostAddS3ObjectV1OortTaskGroupsAddS3ObjectV1TaskGroupIdPost.mjs} +0 -0
@@ -20,22 +20,22 @@ export class Drivers {
20
20
  this._options = _options;
21
21
  }
22
22
  /**
23
- * Lists all organization members paired with their driver information if they are drivers. | () -> (list[OrgMembersAndDrivers])
23
+ * Retrieves driver information for the caller within their organization. | () -> (Driver1)
24
24
  *
25
25
  * @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
26
26
  *
27
27
  * @example
28
- * await client.drivers.listOrgMembersAndDriversV1()
28
+ * await client.drivers.getForCallerV1()
29
29
  */
30
- listOrgMembersAndDriversV1(requestOptions) {
31
- return core.HttpResponsePromise.fromPromise(this.__listOrgMembersAndDriversV1(requestOptions));
30
+ getForCallerV1(requestOptions) {
31
+ return core.HttpResponsePromise.fromPromise(this.__getForCallerV1(requestOptions));
32
32
  }
33
- __listOrgMembersAndDriversV1(requestOptions) {
33
+ __getForCallerV1(requestOptions) {
34
34
  return __awaiter(this, void 0, void 0, function* () {
35
35
  var _a, _b, _c, _d;
36
36
  let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
37
37
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
38
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "oort/drivers/org_members_and_drivers/list/v1"),
38
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "oort/drivers/for_caller/v1"),
39
39
  method: "GET",
40
40
  headers: _headers,
41
41
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -61,7 +61,7 @@ export class Drivers {
61
61
  rawResponse: _response.rawResponse,
62
62
  });
63
63
  case "timeout":
64
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/drivers/org_members_and_drivers/list/v1.");
64
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/drivers/for_caller/v1.");
65
65
  case "unknown":
66
66
  throw new errors.ChrtError({
67
67
  message: _response.error.errorMessage,
@@ -71,22 +71,25 @@ export class Drivers {
71
71
  });
72
72
  }
73
73
  /**
74
- * Lists all drivers belonging to the caller's organization. | () -> (list[Driver1])
74
+ * Retrieves detailed driver information by driver ID within the organization. | () -> (Driver1)
75
75
  *
76
+ * @param {string} driverId
76
77
  * @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
77
78
  *
79
+ * @throws {@link Chrt.UnprocessableEntityError}
80
+ *
78
81
  * @example
79
- * await client.drivers.listV1()
82
+ * await client.drivers.getByDriverIdV1("driver_id")
80
83
  */
81
- listV1(requestOptions) {
82
- return core.HttpResponsePromise.fromPromise(this.__listV1(requestOptions));
84
+ getByDriverIdV1(driverId, requestOptions) {
85
+ return core.HttpResponsePromise.fromPromise(this.__getByDriverIdV1(driverId, requestOptions));
83
86
  }
84
- __listV1(requestOptions) {
87
+ __getByDriverIdV1(driverId, requestOptions) {
85
88
  return __awaiter(this, void 0, void 0, function* () {
86
89
  var _a, _b, _c, _d;
87
90
  let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
88
91
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
89
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "oort/drivers/list/v1"),
92
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `oort/drivers/v1/${encodeURIComponent(driverId)}`),
90
93
  method: "GET",
91
94
  headers: _headers,
92
95
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -98,11 +101,16 @@ export class Drivers {
98
101
  return { data: _response.body, rawResponse: _response.rawResponse };
99
102
  }
100
103
  if (_response.error.reason === "status-code") {
101
- throw new errors.ChrtError({
102
- statusCode: _response.error.statusCode,
103
- body: _response.error.body,
104
- rawResponse: _response.rawResponse,
105
- });
104
+ switch (_response.error.statusCode) {
105
+ case 422:
106
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
107
+ default:
108
+ throw new errors.ChrtError({
109
+ statusCode: _response.error.statusCode,
110
+ body: _response.error.body,
111
+ rawResponse: _response.rawResponse,
112
+ });
113
+ }
106
114
  }
107
115
  switch (_response.error.reason) {
108
116
  case "non-json":
@@ -112,7 +120,7 @@ export class Drivers {
112
120
  rawResponse: _response.rawResponse,
113
121
  });
114
122
  case "timeout":
115
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/drivers/list/v1.");
123
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/drivers/v1/{driver_id}.");
116
124
  case "unknown":
117
125
  throw new errors.ChrtError({
118
126
  message: _response.error.errorMessage,
@@ -122,36 +130,25 @@ export class Drivers {
122
130
  });
123
131
  }
124
132
  /**
125
- * Creates a new driver profile for an organization member with optional vehicle type assignments. | (DriverCreateReq) -> (PydanticObjectId)
133
+ * Lists all organization members paired with their driver information if they are drivers. | () -> (list[OrgMembersAndDrivers])
126
134
  *
127
- * @param {Chrt.DriverCreateReq} request
128
135
  * @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
129
136
  *
130
- * @throws {@link Chrt.UnprocessableEntityError}
131
- *
132
137
  * @example
133
- * await client.drivers.createV1({
134
- * org_member: {
135
- * role: "owner",
136
- * user_id: "user_id"
137
- * }
138
- * })
138
+ * await client.drivers.listOrgMembersAndDriversV1()
139
139
  */
140
- createV1(request, requestOptions) {
141
- return core.HttpResponsePromise.fromPromise(this.__createV1(request, requestOptions));
140
+ listOrgMembersAndDriversV1(requestOptions) {
141
+ return core.HttpResponsePromise.fromPromise(this.__listOrgMembersAndDriversV1(requestOptions));
142
142
  }
143
- __createV1(request, requestOptions) {
143
+ __listOrgMembersAndDriversV1(requestOptions) {
144
144
  return __awaiter(this, void 0, void 0, function* () {
145
145
  var _a, _b, _c, _d;
146
146
  let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
147
147
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
148
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "oort/drivers/create/v1"),
149
- method: "POST",
148
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "oort/drivers/org_members_and_drivers/list/v1"),
149
+ method: "GET",
150
150
  headers: _headers,
151
- contentType: "application/json",
152
151
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
153
- requestType: "json",
154
- body: request,
155
152
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
156
153
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
157
154
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -160,16 +157,11 @@ export class Drivers {
160
157
  return { data: _response.body, rawResponse: _response.rawResponse };
161
158
  }
162
159
  if (_response.error.reason === "status-code") {
163
- switch (_response.error.statusCode) {
164
- case 422:
165
- throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
166
- default:
167
- throw new errors.ChrtError({
168
- statusCode: _response.error.statusCode,
169
- body: _response.error.body,
170
- rawResponse: _response.rawResponse,
171
- });
172
- }
160
+ throw new errors.ChrtError({
161
+ statusCode: _response.error.statusCode,
162
+ body: _response.error.body,
163
+ rawResponse: _response.rawResponse,
164
+ });
173
165
  }
174
166
  switch (_response.error.reason) {
175
167
  case "non-json":
@@ -179,7 +171,7 @@ export class Drivers {
179
171
  rawResponse: _response.rawResponse,
180
172
  });
181
173
  case "timeout":
182
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/drivers/create/v1.");
174
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/drivers/org_members_and_drivers/list/v1.");
183
175
  case "unknown":
184
176
  throw new errors.ChrtError({
185
177
  message: _response.error.errorMessage,
@@ -189,22 +181,22 @@ export class Drivers {
189
181
  });
190
182
  }
191
183
  /**
192
- * Retrieves driver information for the caller within their organization. | () -> (Driver1)
184
+ * Lists all drivers belonging to the caller's organization. | () -> (list[Driver1])
193
185
  *
194
186
  * @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
195
187
  *
196
188
  * @example
197
- * await client.drivers.getV1()
189
+ * await client.drivers.listV1()
198
190
  */
199
- getV1(requestOptions) {
200
- return core.HttpResponsePromise.fromPromise(this.__getV1(requestOptions));
191
+ listV1(requestOptions) {
192
+ return core.HttpResponsePromise.fromPromise(this.__listV1(requestOptions));
201
193
  }
202
- __getV1(requestOptions) {
194
+ __listV1(requestOptions) {
203
195
  return __awaiter(this, void 0, void 0, function* () {
204
196
  var _a, _b, _c, _d;
205
197
  let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
206
198
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
207
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "oort/drivers/by_jwt_user_id/v1"),
199
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "oort/drivers/list/v1"),
208
200
  method: "GET",
209
201
  headers: _headers,
210
202
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -230,7 +222,7 @@ export class Drivers {
230
222
  rawResponse: _response.rawResponse,
231
223
  });
232
224
  case "timeout":
233
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/drivers/by_jwt_user_id/v1.");
225
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/drivers/list/v1.");
234
226
  case "unknown":
235
227
  throw new errors.ChrtError({
236
228
  message: _response.error.errorMessage,
@@ -240,28 +232,33 @@ export class Drivers {
240
232
  });
241
233
  }
242
234
  /**
243
- * Retrieves detailed driver information by driver ID within the organization. | () -> (Driver1)
235
+ * Creates a new driver profile for the caller. Returns existing driver ID if one already exists. Courier orgs only, min role: operator. | (DriverClientCreate1) -> (PydanticObjectId)
244
236
  *
245
- * @param {string} driverId
237
+ * @param {Chrt.DriverClientCreate1} request
246
238
  * @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
247
239
  *
248
240
  * @throws {@link Chrt.UnprocessableEntityError}
249
241
  *
250
242
  * @example
251
- * await client.drivers.getByDriverIdV1("driver_id")
243
+ * await client.drivers.createV1({
244
+ * schema_version: 1
245
+ * })
252
246
  */
253
- getByDriverIdV1(driverId, requestOptions) {
254
- return core.HttpResponsePromise.fromPromise(this.__getByDriverIdV1(driverId, requestOptions));
247
+ createV1(request, requestOptions) {
248
+ return core.HttpResponsePromise.fromPromise(this.__createV1(request, requestOptions));
255
249
  }
256
- __getByDriverIdV1(driverId, requestOptions) {
250
+ __createV1(request, requestOptions) {
257
251
  return __awaiter(this, void 0, void 0, function* () {
258
252
  var _a, _b, _c, _d;
259
253
  let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
260
254
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
261
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `oort/drivers/v1/${encodeURIComponent(driverId)}`),
262
- method: "GET",
255
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "oort/drivers/create/v1"),
256
+ method: "POST",
263
257
  headers: _headers,
258
+ contentType: "application/json",
264
259
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
260
+ requestType: "json",
261
+ body: request,
265
262
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
266
263
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
267
264
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -289,7 +286,7 @@ export class Drivers {
289
286
  rawResponse: _response.rawResponse,
290
287
  });
291
288
  case "timeout":
292
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/drivers/v1/{driver_id}.");
289
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/drivers/create/v1.");
293
290
  case "unknown":
294
291
  throw new errors.ChrtError({
295
292
  message: _response.error.errorMessage,
@@ -299,28 +296,32 @@ export class Drivers {
299
296
  });
300
297
  }
301
298
  /**
302
- * Deletes a driver from the organization and removes them from associated rate sheets. | () -> (bool)
299
+ * Updates driver contact details and vehicle type assignments. Courier orgs only; caller must be the driver (self) or an operator+. | (DriverClientUpdate1) -> (bool)
303
300
  *
304
301
  * @param {string} driverId
302
+ * @param {Chrt.DriverClientUpdate1} request
305
303
  * @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
306
304
  *
307
305
  * @throws {@link Chrt.UnprocessableEntityError}
308
306
  *
309
307
  * @example
310
- * await client.drivers.deleteV1("driver_id")
308
+ * await client.drivers.updateV1("driver_id")
311
309
  */
312
- deleteV1(driverId, requestOptions) {
313
- return core.HttpResponsePromise.fromPromise(this.__deleteV1(driverId, requestOptions));
310
+ updateV1(driverId, request = {}, requestOptions) {
311
+ return core.HttpResponsePromise.fromPromise(this.__updateV1(driverId, request, requestOptions));
314
312
  }
315
- __deleteV1(driverId, requestOptions) {
316
- return __awaiter(this, void 0, void 0, function* () {
313
+ __updateV1(driverId_1) {
314
+ return __awaiter(this, arguments, void 0, function* (driverId, request = {}, requestOptions) {
317
315
  var _a, _b, _c, _d;
318
316
  let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
319
317
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
320
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `oort/drivers/v1/${encodeURIComponent(driverId)}`),
321
- method: "DELETE",
318
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `oort/drivers/update/v1/${encodeURIComponent(driverId)}`),
319
+ method: "PATCH",
322
320
  headers: _headers,
321
+ contentType: "application/json",
323
322
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
323
+ requestType: "json",
324
+ body: request,
324
325
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
325
326
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
326
327
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -348,7 +349,7 @@ export class Drivers {
348
349
  rawResponse: _response.rawResponse,
349
350
  });
350
351
  case "timeout":
351
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /oort/drivers/v1/{driver_id}.");
352
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /oort/drivers/update/v1/{driver_id}.");
352
353
  case "unknown":
353
354
  throw new errors.ChrtError({
354
355
  message: _response.error.errorMessage,
@@ -358,28 +359,36 @@ export class Drivers {
358
359
  });
359
360
  }
360
361
  /**
361
- * Sets the activation status of a driver (active/inactive) within the organization. | (SetDriverActivationReq) -> (bool)
362
+ * Updates the caller's driver last known location and timestamp for tracking. Only updates if timestamp is newer than existing (DB-side validation). Returns False if driver not found or timestamp is stale. | (DriverLastSeenReq) -> (bool)
362
363
  *
363
- * @param {Chrt.SetDriverActivationReq} request
364
+ * @param {Chrt.DriverLastSeenReq} request
364
365
  * @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
365
366
  *
366
367
  * @throws {@link Chrt.UnprocessableEntityError}
367
368
  *
368
369
  * @example
369
- * await client.drivers.setActivationV1({
370
- * driver_object_id: "driver_object_id",
371
- * active: true
370
+ * await client.drivers.updateLastSeenV1({
371
+ * location: {
372
+ * type: "Feature",
373
+ * geometry: {
374
+ * type: "GeometryCollection",
375
+ * geometries: [{
376
+ * type: "LineString",
377
+ * coordinates: [[]]
378
+ * }]
379
+ * }
380
+ * }
372
381
  * })
373
382
  */
374
- setActivationV1(request, requestOptions) {
375
- return core.HttpResponsePromise.fromPromise(this.__setActivationV1(request, requestOptions));
383
+ updateLastSeenV1(request, requestOptions) {
384
+ return core.HttpResponsePromise.fromPromise(this.__updateLastSeenV1(request, requestOptions));
376
385
  }
377
- __setActivationV1(request, requestOptions) {
386
+ __updateLastSeenV1(request, requestOptions) {
378
387
  return __awaiter(this, void 0, void 0, function* () {
379
388
  var _a, _b, _c, _d;
380
389
  let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
381
390
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
382
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "oort/drivers/set_activation/v1"),
391
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "oort/drivers/last_seen/update/v1"),
383
392
  method: "POST",
384
393
  headers: _headers,
385
394
  contentType: "application/json",
@@ -413,7 +422,7 @@ export class Drivers {
413
422
  rawResponse: _response.rawResponse,
414
423
  });
415
424
  case "timeout":
416
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/drivers/set_activation/v1.");
425
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/drivers/last_seen/update/v1.");
417
426
  case "unknown":
418
427
  throw new errors.ChrtError({
419
428
  message: _response.error.errorMessage,
@@ -423,42 +432,25 @@ export class Drivers {
423
432
  });
424
433
  }
425
434
  /**
426
- * Updates the driver's last known location and timestamp for tracking purposes. | (DriverLastSeenReq) -> (bool)
435
+ * Clears the driver's last known location and timestamp. | () -> (bool)
427
436
  *
428
- * @param {Chrt.DriverLastSeenReq} request
429
437
  * @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
430
438
  *
431
- * @throws {@link Chrt.UnprocessableEntityError}
432
- *
433
439
  * @example
434
- * await client.drivers.lastSeenV1({
435
- * location: {
436
- * type: "Feature",
437
- * geometry: {
438
- * type: "GeometryCollection",
439
- * geometries: [{
440
- * type: "LineString",
441
- * coordinates: [[]]
442
- * }]
443
- * }
444
- * }
445
- * })
440
+ * await client.drivers.clearLastSeenV1()
446
441
  */
447
- lastSeenV1(request, requestOptions) {
448
- return core.HttpResponsePromise.fromPromise(this.__lastSeenV1(request, requestOptions));
442
+ clearLastSeenV1(requestOptions) {
443
+ return core.HttpResponsePromise.fromPromise(this.__clearLastSeenV1(requestOptions));
449
444
  }
450
- __lastSeenV1(request, requestOptions) {
445
+ __clearLastSeenV1(requestOptions) {
451
446
  return __awaiter(this, void 0, void 0, function* () {
452
447
  var _a, _b, _c, _d;
453
448
  let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
454
449
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
455
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "oort/drivers/last_seen/v1"),
450
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "oort/drivers/last_seen/clear/v1"),
456
451
  method: "POST",
457
452
  headers: _headers,
458
- contentType: "application/json",
459
453
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
460
- requestType: "json",
461
- body: request,
462
454
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
463
455
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
464
456
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -467,16 +459,11 @@ export class Drivers {
467
459
  return { data: _response.body, rawResponse: _response.rawResponse };
468
460
  }
469
461
  if (_response.error.reason === "status-code") {
470
- switch (_response.error.statusCode) {
471
- case 422:
472
- throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
473
- default:
474
- throw new errors.ChrtError({
475
- statusCode: _response.error.statusCode,
476
- body: _response.error.body,
477
- rawResponse: _response.rawResponse,
478
- });
479
- }
462
+ throw new errors.ChrtError({
463
+ statusCode: _response.error.statusCode,
464
+ body: _response.error.body,
465
+ rawResponse: _response.rawResponse,
466
+ });
480
467
  }
481
468
  switch (_response.error.reason) {
482
469
  case "non-json":
@@ -486,7 +473,7 @@ export class Drivers {
486
473
  rawResponse: _response.rawResponse,
487
474
  });
488
475
  case "timeout":
489
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/drivers/last_seen/v1.");
476
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/drivers/last_seen/clear/v1.");
490
477
  case "unknown":
491
478
  throw new errors.ChrtError({
492
479
  message: _response.error.errorMessage,
@@ -496,25 +483,33 @@ export class Drivers {
496
483
  });
497
484
  }
498
485
  /**
499
- * Clears the driver's last known location and timestamp. | () -> (bool)
486
+ * Updates the caller's driver availability status. Must have status UNASSIGNED to set availability to False; always allows setting to True. Courier orgs only. | (DriverUpdateAvailabilityReq) -> (bool)
500
487
  *
488
+ * @param {Chrt.DriverUpdateAvailabilityReq} request
501
489
  * @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
502
490
  *
491
+ * @throws {@link Chrt.UnprocessableEntityError}
492
+ *
503
493
  * @example
504
- * await client.drivers.lastSeenClearV1()
494
+ * await client.drivers.updateAvailabilityAccordingToDriverV1({
495
+ * available: true
496
+ * })
505
497
  */
506
- lastSeenClearV1(requestOptions) {
507
- return core.HttpResponsePromise.fromPromise(this.__lastSeenClearV1(requestOptions));
498
+ updateAvailabilityAccordingToDriverV1(request, requestOptions) {
499
+ return core.HttpResponsePromise.fromPromise(this.__updateAvailabilityAccordingToDriverV1(request, requestOptions));
508
500
  }
509
- __lastSeenClearV1(requestOptions) {
501
+ __updateAvailabilityAccordingToDriverV1(request, requestOptions) {
510
502
  return __awaiter(this, void 0, void 0, function* () {
511
503
  var _a, _b, _c, _d;
512
504
  let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
513
505
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
514
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "oort/drivers/last_seen/clear/v1"),
515
- method: "POST",
506
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "oort/drivers/update_availability/according_to_driver/v1"),
507
+ method: "PATCH",
516
508
  headers: _headers,
509
+ contentType: "application/json",
517
510
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
511
+ requestType: "json",
512
+ body: request,
518
513
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
519
514
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
520
515
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -523,11 +518,16 @@ export class Drivers {
523
518
  return { data: _response.body, rawResponse: _response.rawResponse };
524
519
  }
525
520
  if (_response.error.reason === "status-code") {
526
- throw new errors.ChrtError({
527
- statusCode: _response.error.statusCode,
528
- body: _response.error.body,
529
- rawResponse: _response.rawResponse,
530
- });
521
+ switch (_response.error.statusCode) {
522
+ case 422:
523
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
524
+ default:
525
+ throw new errors.ChrtError({
526
+ statusCode: _response.error.statusCode,
527
+ body: _response.error.body,
528
+ rawResponse: _response.rawResponse,
529
+ });
530
+ }
531
531
  }
532
532
  switch (_response.error.reason) {
533
533
  case "non-json":
@@ -537,7 +537,7 @@ export class Drivers {
537
537
  rawResponse: _response.rawResponse,
538
538
  });
539
539
  case "timeout":
540
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/drivers/last_seen/clear/v1.");
540
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /oort/drivers/update_availability/according_to_driver/v1.");
541
541
  case "unknown":
542
542
  throw new errors.ChrtError({
543
543
  message: _response.error.errorMessage,
@@ -547,27 +547,28 @@ export class Drivers {
547
547
  });
548
548
  }
549
549
  /**
550
- * Updates driver contact details and vehicle type assignments within the organization. | (UpdateDriverDetailsReq) -> (bool)
550
+ * Updates a driver's availability status. Must have status UNASSIGNED to set availability to False; always allows setting to True. Courier orgs only, min role: operator. | (DriverUpdateAvailabilityReq) -> (bool)
551
551
  *
552
- * @param {Chrt.UpdateDriverDetailsReq} request
552
+ * @param {string} driverId
553
+ * @param {Chrt.DriverUpdateAvailabilityReq} request
553
554
  * @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
554
555
  *
555
556
  * @throws {@link Chrt.UnprocessableEntityError}
556
557
  *
557
558
  * @example
558
- * await client.drivers.updateDriverV1({
559
- * driver_object_id: "driver_object_id"
559
+ * await client.drivers.updateAvailabilityAccordingToOperatorsV1("driver_id", {
560
+ * available: true
560
561
  * })
561
562
  */
562
- updateDriverV1(request, requestOptions) {
563
- return core.HttpResponsePromise.fromPromise(this.__updateDriverV1(request, requestOptions));
563
+ updateAvailabilityAccordingToOperatorsV1(driverId, request, requestOptions) {
564
+ return core.HttpResponsePromise.fromPromise(this.__updateAvailabilityAccordingToOperatorsV1(driverId, request, requestOptions));
564
565
  }
565
- __updateDriverV1(request, requestOptions) {
566
+ __updateAvailabilityAccordingToOperatorsV1(driverId, request, requestOptions) {
566
567
  return __awaiter(this, void 0, void 0, function* () {
567
568
  var _a, _b, _c, _d;
568
569
  let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
569
570
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
570
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "oort/drivers/update/v1"),
571
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `oort/drivers/update_availability/according_to_operators/v1/${encodeURIComponent(driverId)}`),
571
572
  method: "PATCH",
572
573
  headers: _headers,
573
574
  contentType: "application/json",
@@ -601,7 +602,7 @@ export class Drivers {
601
602
  rawResponse: _response.rawResponse,
602
603
  });
603
604
  case "timeout":
604
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /oort/drivers/update/v1.");
605
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /oort/drivers/update_availability/according_to_operators/v1/{driver_id}.");
605
606
  case "unknown":
606
607
  throw new errors.ChrtError({
607
608
  message: _response.error.errorMessage,
@@ -0,0 +1,20 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../../../../index.mjs";
5
+ /**
6
+ * @example
7
+ * {
8
+ * schema_version: 1
9
+ * }
10
+ */
11
+ export interface DriverClientCreate1 {
12
+ schema_version: number;
13
+ email_address_primary?: string | null;
14
+ email_address_secondary?: string | null;
15
+ phone_number_primary?: string | null;
16
+ phone_number_secondary?: string | null;
17
+ first_name?: string | null;
18
+ last_name?: string | null;
19
+ vehicle_types?: Chrt.VehicleTypeEnum[];
20
+ }
@@ -4,15 +4,14 @@
4
4
  import * as Chrt from "../../../../index.mjs";
5
5
  /**
6
6
  * @example
7
- * {
8
- * driver_object_id: "driver_object_id"
9
- * }
7
+ * {}
10
8
  */
11
- export interface UpdateDriverDetailsReq {
12
- driver_object_id: string;
9
+ export interface DriverClientUpdate1 {
13
10
  email_address_primary?: string | null;
14
11
  email_address_secondary?: string | null;
15
12
  phone_number_primary?: string | null;
16
13
  phone_number_secondary?: string | null;
14
+ first_name?: string | null;
15
+ last_name?: string | null;
17
16
  vehicle_types?: Chrt.VehicleTypeEnum[] | null;
18
17
  }
@@ -19,4 +19,5 @@ import * as Chrt from "../../../../index.mjs";
19
19
  */
20
20
  export interface DriverLastSeenReq {
21
21
  location: Chrt.LocationFeature;
22
+ timestamp?: string | null;
22
23
  }
@@ -1,4 +1,3 @@
1
- export { type DriverCreateReq } from "./DriverCreateReq.mjs";
2
- export { type SetDriverActivationReq } from "./SetDriverActivationReq.mjs";
1
+ export { type DriverClientCreate1 } from "./DriverClientCreate1.mjs";
2
+ export { type DriverClientUpdate1 } from "./DriverClientUpdate1.mjs";
3
3
  export { type DriverLastSeenReq } from "./DriverLastSeenReq.mjs";
4
- export { type UpdateDriverDetailsReq } from "./UpdateDriverDetailsReq.mjs";