@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
@@ -0,0 +1,107 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as environments from "../../../../environments.mjs";
5
+ import * as core from "../../../../core/index.mjs";
6
+ import * as Chrt from "../../../index.mjs";
7
+ export declare namespace Tasks {
8
+ interface Options {
9
+ environment?: core.Supplier<environments.ChrtEnvironment | string>;
10
+ /** Specify a custom URL to connect the client to. */
11
+ baseUrl?: core.Supplier<string>;
12
+ token?: core.Supplier<core.BearerToken | undefined>;
13
+ /** Additional headers to include in requests. */
14
+ headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
15
+ fetcher?: core.FetchFunction;
16
+ }
17
+ interface RequestOptions {
18
+ /** The maximum time to wait for a response in seconds. */
19
+ timeoutInSeconds?: number;
20
+ /** The number of times to retry the request. Defaults to 2. */
21
+ maxRetries?: number;
22
+ /** A hook to abort the request. */
23
+ abortSignal?: AbortSignal;
24
+ /** Additional query string parameters to include in the request. */
25
+ queryParams?: Record<string, unknown>;
26
+ /** Additional headers to include in the request. */
27
+ headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
28
+ }
29
+ }
30
+ export declare class Tasks {
31
+ protected readonly _options: Tasks.Options;
32
+ constructor(_options?: Tasks.Options);
33
+ /**
34
+ * Adds a new task to a task group at a specific index. | authz_personas=[lig_org_operators] | (AddTaskToGroupReq) -> (PydanticObjectId)
35
+ *
36
+ * @param {string} taskGroupId
37
+ * @param {Chrt.AddTaskToGroupReq} request
38
+ * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
39
+ *
40
+ * @throws {@link Chrt.UnprocessableEntityError}
41
+ *
42
+ * @example
43
+ * await client.tasks.addToTaskGroupV1("task_group_id", {
44
+ * task: {
45
+ * schema_version: 1
46
+ * },
47
+ * status: "draft",
48
+ * index: 1
49
+ * })
50
+ */
51
+ addToTaskGroupV1(taskGroupId: string, request: Chrt.AddTaskToGroupReq, requestOptions?: Tasks.RequestOptions): core.HttpResponsePromise<string>;
52
+ private __addToTaskGroupV1;
53
+ /**
54
+ * Updates a task. Task must be in STAGED status. | authz_personas=[lig_org_operators] | (TaskClientUpdate1) -> (PydanticObjectId)
55
+ *
56
+ * @param {string} taskId
57
+ * @param {Chrt.TaskClientUpdate1} request
58
+ * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
59
+ *
60
+ * @throws {@link Chrt.UnprocessableEntityError}
61
+ *
62
+ * @example
63
+ * await client.tasks.updateV1("task_id", {})
64
+ */
65
+ updateV1(taskId: string, request: Chrt.TaskClientUpdate1, requestOptions?: Tasks.RequestOptions): core.HttpResponsePromise<string>;
66
+ private __updateV1;
67
+ /**
68
+ * Marks a task as COMPLETED. | authz_personas=[courier_driver, forwarder_org_operators, courier_org_operators] (depending on type) | () -> (bool)
69
+ *
70
+ * @param {string} taskId
71
+ * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
72
+ *
73
+ * @throws {@link Chrt.UnprocessableEntityError}
74
+ *
75
+ * @example
76
+ * await client.tasks.completeV1("task_id")
77
+ */
78
+ completeV1(taskId: string, requestOptions?: Tasks.RequestOptions): core.HttpResponsePromise<boolean>;
79
+ private __completeV1;
80
+ /**
81
+ * Marks a task as SKIPPED. | authz_personas=[courier_driver, forwarder_org_operators, courier_org_operators] (depending on type) | () -> (bool)
82
+ *
83
+ * @param {string} taskId
84
+ * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
85
+ *
86
+ * @throws {@link Chrt.UnprocessableEntityError}
87
+ *
88
+ * @example
89
+ * await client.tasks.skipV1("task_id")
90
+ */
91
+ skipV1(taskId: string, requestOptions?: Tasks.RequestOptions): core.HttpResponsePromise<boolean>;
92
+ private __skipV1;
93
+ /**
94
+ * Deletes a task. Task must be in STAGED status. | authz_personas=[lig_org_operators] | () -> (bool)
95
+ *
96
+ * @param {string} taskId
97
+ * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
98
+ *
99
+ * @throws {@link Chrt.UnprocessableEntityError}
100
+ *
101
+ * @example
102
+ * await client.tasks.deleteV1("task_id")
103
+ */
104
+ deleteV1(taskId: string, requestOptions?: Tasks.RequestOptions): core.HttpResponsePromise<boolean>;
105
+ private __deleteV1;
106
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
107
+ }
@@ -0,0 +1,340 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
5
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6
+ return new (P || (P = Promise))(function (resolve, reject) {
7
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
8
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
9
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
10
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
11
+ });
12
+ };
13
+ import * as environments from "../../../../environments.mjs";
14
+ import * as core from "../../../../core/index.mjs";
15
+ import * as Chrt from "../../../index.mjs";
16
+ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
17
+ import * as errors from "../../../../errors/index.mjs";
18
+ export class Tasks {
19
+ constructor(_options = {}) {
20
+ this._options = _options;
21
+ }
22
+ /**
23
+ * Adds a new task to a task group at a specific index. | authz_personas=[lig_org_operators] | (AddTaskToGroupReq) -> (PydanticObjectId)
24
+ *
25
+ * @param {string} taskGroupId
26
+ * @param {Chrt.AddTaskToGroupReq} request
27
+ * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
28
+ *
29
+ * @throws {@link Chrt.UnprocessableEntityError}
30
+ *
31
+ * @example
32
+ * await client.tasks.addToTaskGroupV1("task_group_id", {
33
+ * task: {
34
+ * schema_version: 1
35
+ * },
36
+ * status: "draft",
37
+ * index: 1
38
+ * })
39
+ */
40
+ addToTaskGroupV1(taskGroupId, request, requestOptions) {
41
+ return core.HttpResponsePromise.fromPromise(this.__addToTaskGroupV1(taskGroupId, request, requestOptions));
42
+ }
43
+ __addToTaskGroupV1(taskGroupId, request, requestOptions) {
44
+ return __awaiter(this, void 0, void 0, function* () {
45
+ var _a, _b, _c, _d;
46
+ 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);
47
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
48
+ 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/tasks/add_to_task_group/v1/${encodeURIComponent(taskGroupId)}`),
49
+ method: "PUT",
50
+ headers: _headers,
51
+ contentType: "application/json",
52
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
53
+ requestType: "json",
54
+ body: request,
55
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
56
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
57
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
58
+ });
59
+ if (_response.ok) {
60
+ return { data: _response.body, rawResponse: _response.rawResponse };
61
+ }
62
+ if (_response.error.reason === "status-code") {
63
+ switch (_response.error.statusCode) {
64
+ case 422:
65
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
66
+ default:
67
+ throw new errors.ChrtError({
68
+ statusCode: _response.error.statusCode,
69
+ body: _response.error.body,
70
+ rawResponse: _response.rawResponse,
71
+ });
72
+ }
73
+ }
74
+ switch (_response.error.reason) {
75
+ case "non-json":
76
+ throw new errors.ChrtError({
77
+ statusCode: _response.error.statusCode,
78
+ body: _response.error.rawBody,
79
+ rawResponse: _response.rawResponse,
80
+ });
81
+ case "timeout":
82
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling PUT /oort/tasks/add_to_task_group/v1/{task_group_id}.");
83
+ case "unknown":
84
+ throw new errors.ChrtError({
85
+ message: _response.error.errorMessage,
86
+ rawResponse: _response.rawResponse,
87
+ });
88
+ }
89
+ });
90
+ }
91
+ /**
92
+ * Updates a task. Task must be in STAGED status. | authz_personas=[lig_org_operators] | (TaskClientUpdate1) -> (PydanticObjectId)
93
+ *
94
+ * @param {string} taskId
95
+ * @param {Chrt.TaskClientUpdate1} request
96
+ * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
97
+ *
98
+ * @throws {@link Chrt.UnprocessableEntityError}
99
+ *
100
+ * @example
101
+ * await client.tasks.updateV1("task_id", {})
102
+ */
103
+ updateV1(taskId, request, requestOptions) {
104
+ return core.HttpResponsePromise.fromPromise(this.__updateV1(taskId, request, requestOptions));
105
+ }
106
+ __updateV1(taskId, request, requestOptions) {
107
+ return __awaiter(this, void 0, void 0, function* () {
108
+ var _a, _b, _c, _d;
109
+ 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);
110
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
111
+ 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/tasks/update/v1/${encodeURIComponent(taskId)}`),
112
+ method: "PATCH",
113
+ headers: _headers,
114
+ contentType: "application/json",
115
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
116
+ requestType: "json",
117
+ body: request,
118
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
119
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
120
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
121
+ });
122
+ if (_response.ok) {
123
+ return { data: _response.body, rawResponse: _response.rawResponse };
124
+ }
125
+ if (_response.error.reason === "status-code") {
126
+ switch (_response.error.statusCode) {
127
+ case 422:
128
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
129
+ default:
130
+ throw new errors.ChrtError({
131
+ statusCode: _response.error.statusCode,
132
+ body: _response.error.body,
133
+ rawResponse: _response.rawResponse,
134
+ });
135
+ }
136
+ }
137
+ switch (_response.error.reason) {
138
+ case "non-json":
139
+ throw new errors.ChrtError({
140
+ statusCode: _response.error.statusCode,
141
+ body: _response.error.rawBody,
142
+ rawResponse: _response.rawResponse,
143
+ });
144
+ case "timeout":
145
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /oort/tasks/update/v1/{task_id}.");
146
+ case "unknown":
147
+ throw new errors.ChrtError({
148
+ message: _response.error.errorMessage,
149
+ rawResponse: _response.rawResponse,
150
+ });
151
+ }
152
+ });
153
+ }
154
+ /**
155
+ * Marks a task as COMPLETED. | authz_personas=[courier_driver, forwarder_org_operators, courier_org_operators] (depending on type) | () -> (bool)
156
+ *
157
+ * @param {string} taskId
158
+ * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
159
+ *
160
+ * @throws {@link Chrt.UnprocessableEntityError}
161
+ *
162
+ * @example
163
+ * await client.tasks.completeV1("task_id")
164
+ */
165
+ completeV1(taskId, requestOptions) {
166
+ return core.HttpResponsePromise.fromPromise(this.__completeV1(taskId, requestOptions));
167
+ }
168
+ __completeV1(taskId, requestOptions) {
169
+ return __awaiter(this, void 0, void 0, function* () {
170
+ var _a, _b, _c, _d;
171
+ 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);
172
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
173
+ 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/tasks/complete/v1/${encodeURIComponent(taskId)}`),
174
+ method: "PUT",
175
+ headers: _headers,
176
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
177
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
178
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
179
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
180
+ });
181
+ if (_response.ok) {
182
+ return { data: _response.body, rawResponse: _response.rawResponse };
183
+ }
184
+ if (_response.error.reason === "status-code") {
185
+ switch (_response.error.statusCode) {
186
+ case 422:
187
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
188
+ default:
189
+ throw new errors.ChrtError({
190
+ statusCode: _response.error.statusCode,
191
+ body: _response.error.body,
192
+ rawResponse: _response.rawResponse,
193
+ });
194
+ }
195
+ }
196
+ switch (_response.error.reason) {
197
+ case "non-json":
198
+ throw new errors.ChrtError({
199
+ statusCode: _response.error.statusCode,
200
+ body: _response.error.rawBody,
201
+ rawResponse: _response.rawResponse,
202
+ });
203
+ case "timeout":
204
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling PUT /oort/tasks/complete/v1/{task_id}.");
205
+ case "unknown":
206
+ throw new errors.ChrtError({
207
+ message: _response.error.errorMessage,
208
+ rawResponse: _response.rawResponse,
209
+ });
210
+ }
211
+ });
212
+ }
213
+ /**
214
+ * Marks a task as SKIPPED. | authz_personas=[courier_driver, forwarder_org_operators, courier_org_operators] (depending on type) | () -> (bool)
215
+ *
216
+ * @param {string} taskId
217
+ * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
218
+ *
219
+ * @throws {@link Chrt.UnprocessableEntityError}
220
+ *
221
+ * @example
222
+ * await client.tasks.skipV1("task_id")
223
+ */
224
+ skipV1(taskId, requestOptions) {
225
+ return core.HttpResponsePromise.fromPromise(this.__skipV1(taskId, requestOptions));
226
+ }
227
+ __skipV1(taskId, requestOptions) {
228
+ return __awaiter(this, void 0, void 0, function* () {
229
+ var _a, _b, _c, _d;
230
+ 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);
231
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
232
+ 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/tasks/skip/v1/${encodeURIComponent(taskId)}`),
233
+ method: "PUT",
234
+ headers: _headers,
235
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
236
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
237
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
238
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
239
+ });
240
+ if (_response.ok) {
241
+ return { data: _response.body, rawResponse: _response.rawResponse };
242
+ }
243
+ if (_response.error.reason === "status-code") {
244
+ switch (_response.error.statusCode) {
245
+ case 422:
246
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
247
+ default:
248
+ throw new errors.ChrtError({
249
+ statusCode: _response.error.statusCode,
250
+ body: _response.error.body,
251
+ rawResponse: _response.rawResponse,
252
+ });
253
+ }
254
+ }
255
+ switch (_response.error.reason) {
256
+ case "non-json":
257
+ throw new errors.ChrtError({
258
+ statusCode: _response.error.statusCode,
259
+ body: _response.error.rawBody,
260
+ rawResponse: _response.rawResponse,
261
+ });
262
+ case "timeout":
263
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling PUT /oort/tasks/skip/v1/{task_id}.");
264
+ case "unknown":
265
+ throw new errors.ChrtError({
266
+ message: _response.error.errorMessage,
267
+ rawResponse: _response.rawResponse,
268
+ });
269
+ }
270
+ });
271
+ }
272
+ /**
273
+ * Deletes a task. Task must be in STAGED status. | authz_personas=[lig_org_operators] | () -> (bool)
274
+ *
275
+ * @param {string} taskId
276
+ * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
277
+ *
278
+ * @throws {@link Chrt.UnprocessableEntityError}
279
+ *
280
+ * @example
281
+ * await client.tasks.deleteV1("task_id")
282
+ */
283
+ deleteV1(taskId, requestOptions) {
284
+ return core.HttpResponsePromise.fromPromise(this.__deleteV1(taskId, requestOptions));
285
+ }
286
+ __deleteV1(taskId, requestOptions) {
287
+ return __awaiter(this, void 0, void 0, function* () {
288
+ var _a, _b, _c, _d;
289
+ 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);
290
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
291
+ 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/tasks/delete/v1/${encodeURIComponent(taskId)}`),
292
+ method: "DELETE",
293
+ headers: _headers,
294
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
295
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
296
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
297
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
298
+ });
299
+ if (_response.ok) {
300
+ return { data: _response.body, rawResponse: _response.rawResponse };
301
+ }
302
+ if (_response.error.reason === "status-code") {
303
+ switch (_response.error.statusCode) {
304
+ case 422:
305
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
306
+ default:
307
+ throw new errors.ChrtError({
308
+ statusCode: _response.error.statusCode,
309
+ body: _response.error.body,
310
+ rawResponse: _response.rawResponse,
311
+ });
312
+ }
313
+ }
314
+ switch (_response.error.reason) {
315
+ case "non-json":
316
+ throw new errors.ChrtError({
317
+ statusCode: _response.error.statusCode,
318
+ body: _response.error.rawBody,
319
+ rawResponse: _response.rawResponse,
320
+ });
321
+ case "timeout":
322
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /oort/tasks/delete/v1/{task_id}.");
323
+ case "unknown":
324
+ throw new errors.ChrtError({
325
+ message: _response.error.errorMessage,
326
+ rawResponse: _response.rawResponse,
327
+ });
328
+ }
329
+ });
330
+ }
331
+ _getAuthorizationHeader() {
332
+ return __awaiter(this, void 0, void 0, function* () {
333
+ const bearer = yield core.Supplier.get(this._options.token);
334
+ if (bearer != null) {
335
+ return `Bearer ${bearer}`;
336
+ }
337
+ return undefined;
338
+ });
339
+ }
340
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ export * from "./requests/index.mjs";
@@ -0,0 +1 @@
1
+ export * from "./requests/index.mjs";
@@ -0,0 +1,21 @@
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
+ * task: {
9
+ * schema_version: 1
10
+ * },
11
+ * status: "draft",
12
+ * index: 1
13
+ * }
14
+ */
15
+ export interface AddTaskToGroupReq {
16
+ task: Chrt.TaskClientCreate1;
17
+ /** Initial status of the task. Must respect ordering constraints (COMPLETED tasks strictly before STAGED tasks). */
18
+ status: Chrt.TaskStatusEnum1;
19
+ /** 0-based index of desired ordering */
20
+ index: number;
21
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1 @@
1
+ export { type AddTaskToGroupReq } from "./AddTaskToGroupReq.mjs";
@@ -0,0 +1 @@
1
+ export * from "./client/index.mjs";
@@ -0,0 +1 @@
1
+ export * from "./client/index.mjs";
@@ -26,5 +26,6 @@ export interface Cargo1 {
26
26
  staged_at_timestamp?: string | null;
27
27
  in_transit_at_timestamp?: string | null;
28
28
  delivered_at_timestamp?: string | null;
29
+ skipped_at_timestamp?: string | null;
29
30
  exception_at_timestamp?: string | null;
30
31
  }
@@ -1,11 +1,12 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export type CargoStatusEnum1 = "draft" | "staged" | "in_transit" | "delivered" | "exception";
4
+ export type CargoStatusEnum1 = "draft" | "staged" | "in_transit" | "delivered" | "skipped" | "exception";
5
5
  export declare const CargoStatusEnum1: {
6
6
  readonly Draft: "draft";
7
7
  readonly Staged: "staged";
8
8
  readonly InTransit: "in_transit";
9
9
  readonly Delivered: "delivered";
10
+ readonly Skipped: "skipped";
10
11
  readonly Exception: "exception";
11
12
  };
@@ -6,5 +6,6 @@ export const CargoStatusEnum1 = {
6
6
  Staged: "staged",
7
7
  InTransit: "in_transit",
8
8
  Delivered: "delivered",
9
+ Skipped: "skipped",
9
10
  Exception: "exception",
10
11
  };
@@ -18,11 +18,11 @@
18
18
  * - OTHER then PICKUP then no more tasks (because the cargo is not released after PICKUP)
19
19
  * - DELIVER then OTHER (because the cargo is not obtained before DELIVER)
20
20
  */
21
- export type ChrtGroundCourierTaskActionEnum1 = "chrt_ground_courier__pickup" | "chrt_ground_courier__recover_from_airline" | "chrt_ground_courier__deliver" | "chrt_ground_courier__tender_to_airline" | "chrt_ground_courier__consolidate" | "chrt_ground_courier__hold" | "chrt_ground_courier__other";
21
+ export type ChrtGroundCourierTaskActionEnum1 = "chrt_ground_courier__pickup" | "chrt_ground_courier__deliver" | "chrt_ground_courier__recover_from_airline" | "chrt_ground_courier__tender_to_airline" | "chrt_ground_courier__consolidate" | "chrt_ground_courier__hold" | "chrt_ground_courier__other";
22
22
  export declare const ChrtGroundCourierTaskActionEnum1: {
23
23
  readonly ChrtGroundCourierPickup: "chrt_ground_courier__pickup";
24
- readonly ChrtGroundCourierRecoverFromAirline: "chrt_ground_courier__recover_from_airline";
25
24
  readonly ChrtGroundCourierDeliver: "chrt_ground_courier__deliver";
25
+ readonly ChrtGroundCourierRecoverFromAirline: "chrt_ground_courier__recover_from_airline";
26
26
  readonly ChrtGroundCourierTenderToAirline: "chrt_ground_courier__tender_to_airline";
27
27
  readonly ChrtGroundCourierConsolidate: "chrt_ground_courier__consolidate";
28
28
  readonly ChrtGroundCourierHold: "chrt_ground_courier__hold";
@@ -3,8 +3,8 @@
3
3
  */
4
4
  export const ChrtGroundCourierTaskActionEnum1 = {
5
5
  ChrtGroundCourierPickup: "chrt_ground_courier__pickup",
6
- ChrtGroundCourierRecoverFromAirline: "chrt_ground_courier__recover_from_airline",
7
6
  ChrtGroundCourierDeliver: "chrt_ground_courier__deliver",
7
+ ChrtGroundCourierRecoverFromAirline: "chrt_ground_courier__recover_from_airline",
8
8
  ChrtGroundCourierTenderToAirline: "chrt_ground_courier__tender_to_airline",
9
9
  ChrtGroundCourierConsolidate: "chrt_ground_courier__consolidate",
10
10
  ChrtGroundCourierHold: "chrt_ground_courier__hold",
@@ -4,7 +4,6 @@
4
4
  import * as Chrt from "../index.mjs";
5
5
  export interface Driver1 {
6
6
  schema_version: number;
7
- active?: boolean | null;
8
7
  email_address_primary?: string | null;
9
8
  email_address_secondary?: string | null;
10
9
  phone_number_primary?: string | null;
@@ -12,12 +11,15 @@ export interface Driver1 {
12
11
  first_name?: string | null;
13
12
  last_name?: string | null;
14
13
  vehicle_types?: Chrt.VehicleTypeEnum[];
15
- status?: Chrt.DriverStatusEnum;
16
- last_seen_at_location?: Chrt.LocationFeature | null;
17
- last_seen_at_timestamp?: string | null;
18
14
  _id: string;
19
15
  /** Must be a string starting with `org_` */
20
16
  org_id: string;
21
17
  /** Must be a string starting with `user_` */
22
18
  user_id: string;
19
+ status?: Chrt.DriverStatusEnum;
20
+ available_according_to_driver?: boolean;
21
+ available_according_to_operators?: boolean;
22
+ non_terminal_task_group_ids?: string[];
23
+ last_seen_at_location?: Chrt.LocationFeature | null;
24
+ last_seen_at_timestamp?: string | null;
23
25
  }
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export type DriverStatusEnum = "not_assigned" | "assigned" | "route_in_progress";
4
+ export type DriverStatusEnum = "unassigned" | "assigned" | "in_progress";
5
5
  export declare const DriverStatusEnum: {
6
- readonly NotAssigned: "not_assigned";
6
+ readonly Unassigned: "unassigned";
7
7
  readonly Assigned: "assigned";
8
- readonly RouteInProgress: "route_in_progress";
8
+ readonly InProgress: "in_progress";
9
9
  };
@@ -2,7 +2,7 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export const DriverStatusEnum = {
5
- NotAssigned: "not_assigned",
5
+ Unassigned: "unassigned",
6
6
  Assigned: "assigned",
7
- RouteInProgress: "route_in_progress",
7
+ InProgress: "in_progress",
8
8
  };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface DriverUpdateAvailabilityReq {
5
+ available: boolean;
6
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -28,6 +28,7 @@ export interface Task1 {
28
28
  draft_started_at_timestamp: string;
29
29
  staged_at_timestamp?: string | null;
30
30
  completed_at_timestamp?: string | null;
31
+ skipped_at_timestamp?: string | null;
31
32
  exception_at_timestamp?: string | null;
32
33
  order_cancelled?: boolean;
33
34
  task_notification_email_ids?: string[];
@@ -27,5 +27,6 @@ export interface TaskArtifact1 {
27
27
  draft_started_at_timestamp: string;
28
28
  staged_at_timestamp?: string | null;
29
29
  completed_at_timestamp?: string | null;
30
+ skipped_at_timestamp?: string | null;
30
31
  exception_at_timestamp?: string | null;
31
32
  }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../index.mjs";
5
+ export interface TaskArtifactClientCreate1 {
6
+ schema_version: number;
7
+ type: Chrt.TaskArtifactTypeEnum1;
8
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};