@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
@@ -17,7 +17,9 @@ export * as dev from "./dev/index.mjs";
17
17
  export * as taskArtifactNotifications from "./taskArtifactNotifications/index.mjs";
18
18
  export * as drivers from "./drivers/index.mjs";
19
19
  export * as cargos from "./cargos/index.mjs";
20
+ export * as taskArtifacts from "./taskArtifacts/index.mjs";
20
21
  export * as offChrtShipperOrg from "./offChrtShipperOrg/index.mjs";
22
+ export * as tasks from "./tasks/index.mjs";
21
23
  export * as shipperContactInfo from "./shipperContactInfo/index.mjs";
22
24
  export * as orgs from "./orgs/index.mjs";
23
25
  export * as root from "./root/index.mjs";
@@ -25,7 +27,6 @@ export * as users from "./users/index.mjs";
25
27
  export * as utils from "./utils/index.mjs";
26
28
  export * as notifications from "./notifications/index.mjs";
27
29
  export * as orgInfoForConnections from "./orgInfoForConnections/index.mjs";
28
- export * as taskArtifacts from "./taskArtifacts/index.mjs";
29
30
  export * as tracking from "./tracking/index.mjs";
30
31
  export * from "./payments/client/requests/index.mjs";
31
32
  export * from "./courierPayDriverRateSheets/client/requests/index.mjs";
@@ -36,9 +37,11 @@ export * from "./orgProfiles/client/requests/index.mjs";
36
37
  export * from "./dev/client/requests/index.mjs";
37
38
  export * from "./taskArtifactNotifications/client/requests/index.mjs";
38
39
  export * from "./drivers/client/requests/index.mjs";
40
+ export * from "./taskArtifacts/client/requests/index.mjs";
39
41
  export * from "./offChrtShipperOrg/client/requests/index.mjs";
40
42
  export * from "./orderDrafts/client/requests/index.mjs";
41
43
  export * from "./taskGroups/client/requests/index.mjs";
44
+ export * from "./tasks/client/requests/index.mjs";
42
45
  export * from "./shipperContactInfo/client/requests/index.mjs";
43
46
  export * from "./orgs/client/requests/index.mjs";
44
47
  export * from "./utils/client/requests/index.mjs";
@@ -17,7 +17,9 @@ export * as dev from "./dev/index.mjs";
17
17
  export * as taskArtifactNotifications from "./taskArtifactNotifications/index.mjs";
18
18
  export * as drivers from "./drivers/index.mjs";
19
19
  export * as cargos from "./cargos/index.mjs";
20
+ export * as taskArtifacts from "./taskArtifacts/index.mjs";
20
21
  export * as offChrtShipperOrg from "./offChrtShipperOrg/index.mjs";
22
+ export * as tasks from "./tasks/index.mjs";
21
23
  export * as shipperContactInfo from "./shipperContactInfo/index.mjs";
22
24
  export * as orgs from "./orgs/index.mjs";
23
25
  export * as root from "./root/index.mjs";
@@ -25,7 +27,6 @@ export * as users from "./users/index.mjs";
25
27
  export * as utils from "./utils/index.mjs";
26
28
  export * as notifications from "./notifications/index.mjs";
27
29
  export * as orgInfoForConnections from "./orgInfoForConnections/index.mjs";
28
- export * as taskArtifacts from "./taskArtifacts/index.mjs";
29
30
  export * as tracking from "./tracking/index.mjs";
30
31
  export * from "./payments/client/requests/index.mjs";
31
32
  export * from "./courierPayDriverRateSheets/client/requests/index.mjs";
@@ -36,9 +37,11 @@ export * from "./orgProfiles/client/requests/index.mjs";
36
37
  export * from "./dev/client/requests/index.mjs";
37
38
  export * from "./taskArtifactNotifications/client/requests/index.mjs";
38
39
  export * from "./drivers/client/requests/index.mjs";
40
+ export * from "./taskArtifacts/client/requests/index.mjs";
39
41
  export * from "./offChrtShipperOrg/client/requests/index.mjs";
40
42
  export * from "./orderDrafts/client/requests/index.mjs";
41
43
  export * from "./taskGroups/client/requests/index.mjs";
44
+ export * from "./tasks/client/requests/index.mjs";
42
45
  export * from "./shipperContactInfo/client/requests/index.mjs";
43
46
  export * from "./orgs/client/requests/index.mjs";
44
47
  export * from "./utils/client/requests/index.mjs";
@@ -45,5 +45,18 @@ export declare class Orders {
45
45
  */
46
46
  stageV1(orderId: string, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<boolean>;
47
47
  private __stageV1;
48
+ /**
49
+ * Cancels an order and all related task groups and tasks in a transaction. | authz_personas=[lig_org_operators] | () -> (bool)
50
+ *
51
+ * @param {string} orderId
52
+ * @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
53
+ *
54
+ * @throws {@link Chrt.UnprocessableEntityError}
55
+ *
56
+ * @example
57
+ * await client.orders.cancelV1("order_id")
58
+ */
59
+ cancelV1(orderId: string, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<boolean>;
60
+ private __cancelV1;
48
61
  protected _getAuthorizationHeader(): Promise<string | undefined>;
49
62
  }
@@ -83,6 +83,65 @@ export class Orders {
83
83
  }
84
84
  });
85
85
  }
86
+ /**
87
+ * Cancels an order and all related task groups and tasks in a transaction. | authz_personas=[lig_org_operators] | () -> (bool)
88
+ *
89
+ * @param {string} orderId
90
+ * @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
91
+ *
92
+ * @throws {@link Chrt.UnprocessableEntityError}
93
+ *
94
+ * @example
95
+ * await client.orders.cancelV1("order_id")
96
+ */
97
+ cancelV1(orderId, requestOptions) {
98
+ return core.HttpResponsePromise.fromPromise(this.__cancelV1(orderId, requestOptions));
99
+ }
100
+ __cancelV1(orderId, requestOptions) {
101
+ return __awaiter(this, void 0, void 0, function* () {
102
+ var _a, _b, _c, _d;
103
+ 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);
104
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
105
+ 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/orders/cancel/v1/${encodeURIComponent(orderId)}`),
106
+ method: "PUT",
107
+ headers: _headers,
108
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
109
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
110
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
111
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
112
+ });
113
+ if (_response.ok) {
114
+ return { data: _response.body, rawResponse: _response.rawResponse };
115
+ }
116
+ if (_response.error.reason === "status-code") {
117
+ switch (_response.error.statusCode) {
118
+ case 422:
119
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
120
+ default:
121
+ throw new errors.ChrtError({
122
+ statusCode: _response.error.statusCode,
123
+ body: _response.error.body,
124
+ rawResponse: _response.rawResponse,
125
+ });
126
+ }
127
+ }
128
+ switch (_response.error.reason) {
129
+ case "non-json":
130
+ throw new errors.ChrtError({
131
+ statusCode: _response.error.statusCode,
132
+ body: _response.error.rawBody,
133
+ rawResponse: _response.rawResponse,
134
+ });
135
+ case "timeout":
136
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling PUT /oort/orders/cancel/v1/{order_id}.");
137
+ case "unknown":
138
+ throw new errors.ChrtError({
139
+ message: _response.error.errorMessage,
140
+ rawResponse: _response.rawResponse,
141
+ });
142
+ }
143
+ });
144
+ }
86
145
  _getAuthorizationHeader() {
87
146
  return __awaiter(this, void 0, void 0, function* () {
88
147
  const bearer = yield core.Supplier.get(this._options.token);
@@ -3,8 +3,9 @@
3
3
  */
4
4
  import * as environments from "../../../../environments.mjs";
5
5
  import * as core from "../../../../core/index.mjs";
6
- import { Images } from "../resources/images/client/Client.mjs";
7
- import { Blurhash } from "../resources/blurhash/client/Client.mjs";
6
+ import * as Chrt from "../../../index.mjs";
7
+ import { S3ObjectMetadata } from "../resources/s3ObjectMetadata/client/Client.mjs";
8
+ import { S3Object } from "../resources/s3Object/client/Client.mjs";
8
9
  export declare namespace TaskArtifacts {
9
10
  interface Options {
10
11
  environment?: core.Supplier<environments.ChrtEnvironment | string>;
@@ -15,12 +16,84 @@ export declare namespace TaskArtifacts {
15
16
  headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
16
17
  fetcher?: core.FetchFunction;
17
18
  }
19
+ interface RequestOptions {
20
+ /** The maximum time to wait for a response in seconds. */
21
+ timeoutInSeconds?: number;
22
+ /** The number of times to retry the request. Defaults to 2. */
23
+ maxRetries?: number;
24
+ /** A hook to abort the request. */
25
+ abortSignal?: AbortSignal;
26
+ /** Additional query string parameters to include in the request. */
27
+ queryParams?: Record<string, unknown>;
28
+ /** Additional headers to include in the request. */
29
+ headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
30
+ }
18
31
  }
19
32
  export declare class TaskArtifacts {
20
33
  protected readonly _options: TaskArtifacts.Options;
21
- protected _images: Images | undefined;
22
- protected _blurhash: Blurhash | undefined;
34
+ protected _s3ObjectMetadata: S3ObjectMetadata | undefined;
35
+ protected _s3Object: S3Object | undefined;
23
36
  constructor(_options?: TaskArtifacts.Options);
24
- get images(): Images;
25
- get blurhash(): Blurhash;
37
+ get s3ObjectMetadata(): S3ObjectMetadata;
38
+ get s3Object(): S3Object;
39
+ /**
40
+ * Adds a new task artifact to a task. | authz_personas=[courier_driver, courier_org_operators, forwarder_org_operators] | (AddTaskArtifactReq) -> (PydanticObjectId)
41
+ *
42
+ * @param {string} taskId
43
+ * @param {Chrt.AddTaskArtifactReq} request
44
+ * @param {TaskArtifacts.RequestOptions} requestOptions - Request-specific configuration.
45
+ *
46
+ * @throws {@link Chrt.UnprocessableEntityError}
47
+ *
48
+ * @example
49
+ * await client.taskArtifacts.addToTaskV1("task_id", {
50
+ * task_artifact: {
51
+ * schema_version: 1,
52
+ * type: "image"
53
+ * },
54
+ * status: "draft"
55
+ * })
56
+ */
57
+ addToTaskV1(taskId: string, request: Chrt.AddTaskArtifactReq, requestOptions?: TaskArtifacts.RequestOptions): core.HttpResponsePromise<string>;
58
+ private __addToTaskV1;
59
+ /**
60
+ * Marks a task artifact as COMPLETED. | authz_personas=[courier_driver, courier_org_operators, forwarder_org_operators] | () -> (bool)
61
+ *
62
+ * @param {string} taskArtifactId
63
+ * @param {TaskArtifacts.RequestOptions} requestOptions - Request-specific configuration.
64
+ *
65
+ * @throws {@link Chrt.UnprocessableEntityError}
66
+ *
67
+ * @example
68
+ * await client.taskArtifacts.completeV1("task_artifact_id")
69
+ */
70
+ completeV1(taskArtifactId: string, requestOptions?: TaskArtifacts.RequestOptions): core.HttpResponsePromise<boolean>;
71
+ private __completeV1;
72
+ /**
73
+ * Marks a task artifact as SKIPPED. | authz_personas=[courier_driver, courier_org_operators, forwarder_org_operators] | () -> (bool)
74
+ *
75
+ * @param {string} taskArtifactId
76
+ * @param {TaskArtifacts.RequestOptions} requestOptions - Request-specific configuration.
77
+ *
78
+ * @throws {@link Chrt.UnprocessableEntityError}
79
+ *
80
+ * @example
81
+ * await client.taskArtifacts.skipV1("task_artifact_id")
82
+ */
83
+ skipV1(taskArtifactId: string, requestOptions?: TaskArtifacts.RequestOptions): core.HttpResponsePromise<boolean>;
84
+ private __skipV1;
85
+ /**
86
+ * Deletes a task artifact. | authz_personas=[lig_org_operators] | () -> (bool)
87
+ *
88
+ * @param {string} taskArtifactId
89
+ * @param {TaskArtifacts.RequestOptions} requestOptions - Request-specific configuration.
90
+ *
91
+ * @throws {@link Chrt.UnprocessableEntityError}
92
+ *
93
+ * @example
94
+ * await client.taskArtifacts.deleteV1("task_artifact_id")
95
+ */
96
+ deleteV1(taskArtifactId: string, requestOptions?: TaskArtifacts.RequestOptions): core.HttpResponsePromise<boolean>;
97
+ private __deleteV1;
98
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
26
99
  }
@@ -1,18 +1,287 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- import { Images } from "../resources/images/client/Client.mjs";
5
- import { Blurhash } from "../resources/blurhash/client/Client.mjs";
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
+ import { S3ObjectMetadata } from "../resources/s3ObjectMetadata/client/Client.mjs";
19
+ import { S3Object } from "../resources/s3Object/client/Client.mjs";
6
20
  export class TaskArtifacts {
7
21
  constructor(_options = {}) {
8
22
  this._options = _options;
9
23
  }
10
- get images() {
24
+ get s3ObjectMetadata() {
11
25
  var _a;
12
- return ((_a = this._images) !== null && _a !== void 0 ? _a : (this._images = new Images(this._options)));
26
+ return ((_a = this._s3ObjectMetadata) !== null && _a !== void 0 ? _a : (this._s3ObjectMetadata = new S3ObjectMetadata(this._options)));
13
27
  }
14
- get blurhash() {
28
+ get s3Object() {
15
29
  var _a;
16
- return ((_a = this._blurhash) !== null && _a !== void 0 ? _a : (this._blurhash = new Blurhash(this._options)));
30
+ return ((_a = this._s3Object) !== null && _a !== void 0 ? _a : (this._s3Object = new S3Object(this._options)));
31
+ }
32
+ /**
33
+ * Adds a new task artifact to a task. | authz_personas=[courier_driver, courier_org_operators, forwarder_org_operators] | (AddTaskArtifactReq) -> (PydanticObjectId)
34
+ *
35
+ * @param {string} taskId
36
+ * @param {Chrt.AddTaskArtifactReq} request
37
+ * @param {TaskArtifacts.RequestOptions} requestOptions - Request-specific configuration.
38
+ *
39
+ * @throws {@link Chrt.UnprocessableEntityError}
40
+ *
41
+ * @example
42
+ * await client.taskArtifacts.addToTaskV1("task_id", {
43
+ * task_artifact: {
44
+ * schema_version: 1,
45
+ * type: "image"
46
+ * },
47
+ * status: "draft"
48
+ * })
49
+ */
50
+ addToTaskV1(taskId, request, requestOptions) {
51
+ return core.HttpResponsePromise.fromPromise(this.__addToTaskV1(taskId, request, requestOptions));
52
+ }
53
+ __addToTaskV1(taskId, request, requestOptions) {
54
+ return __awaiter(this, void 0, void 0, function* () {
55
+ var _a, _b, _c, _d;
56
+ 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);
57
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
58
+ 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/task_artifacts/add_to_task/v1/${encodeURIComponent(taskId)}`),
59
+ method: "PUT",
60
+ headers: _headers,
61
+ contentType: "application/json",
62
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
63
+ requestType: "json",
64
+ body: request,
65
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
66
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
67
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
68
+ });
69
+ if (_response.ok) {
70
+ return { data: _response.body, rawResponse: _response.rawResponse };
71
+ }
72
+ if (_response.error.reason === "status-code") {
73
+ switch (_response.error.statusCode) {
74
+ case 422:
75
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
76
+ default:
77
+ throw new errors.ChrtError({
78
+ statusCode: _response.error.statusCode,
79
+ body: _response.error.body,
80
+ rawResponse: _response.rawResponse,
81
+ });
82
+ }
83
+ }
84
+ switch (_response.error.reason) {
85
+ case "non-json":
86
+ throw new errors.ChrtError({
87
+ statusCode: _response.error.statusCode,
88
+ body: _response.error.rawBody,
89
+ rawResponse: _response.rawResponse,
90
+ });
91
+ case "timeout":
92
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling PUT /oort/task_artifacts/add_to_task/v1/{task_id}.");
93
+ case "unknown":
94
+ throw new errors.ChrtError({
95
+ message: _response.error.errorMessage,
96
+ rawResponse: _response.rawResponse,
97
+ });
98
+ }
99
+ });
100
+ }
101
+ /**
102
+ * Marks a task artifact as COMPLETED. | authz_personas=[courier_driver, courier_org_operators, forwarder_org_operators] | () -> (bool)
103
+ *
104
+ * @param {string} taskArtifactId
105
+ * @param {TaskArtifacts.RequestOptions} requestOptions - Request-specific configuration.
106
+ *
107
+ * @throws {@link Chrt.UnprocessableEntityError}
108
+ *
109
+ * @example
110
+ * await client.taskArtifacts.completeV1("task_artifact_id")
111
+ */
112
+ completeV1(taskArtifactId, requestOptions) {
113
+ return core.HttpResponsePromise.fromPromise(this.__completeV1(taskArtifactId, requestOptions));
114
+ }
115
+ __completeV1(taskArtifactId, requestOptions) {
116
+ return __awaiter(this, void 0, void 0, function* () {
117
+ var _a, _b, _c, _d;
118
+ 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);
119
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
120
+ 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/task_artifacts/complete/v1/${encodeURIComponent(taskArtifactId)}`),
121
+ method: "PUT",
122
+ headers: _headers,
123
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
124
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
125
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
126
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
127
+ });
128
+ if (_response.ok) {
129
+ return { data: _response.body, rawResponse: _response.rawResponse };
130
+ }
131
+ if (_response.error.reason === "status-code") {
132
+ switch (_response.error.statusCode) {
133
+ case 422:
134
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
135
+ default:
136
+ throw new errors.ChrtError({
137
+ statusCode: _response.error.statusCode,
138
+ body: _response.error.body,
139
+ rawResponse: _response.rawResponse,
140
+ });
141
+ }
142
+ }
143
+ switch (_response.error.reason) {
144
+ case "non-json":
145
+ throw new errors.ChrtError({
146
+ statusCode: _response.error.statusCode,
147
+ body: _response.error.rawBody,
148
+ rawResponse: _response.rawResponse,
149
+ });
150
+ case "timeout":
151
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling PUT /oort/task_artifacts/complete/v1/{task_artifact_id}.");
152
+ case "unknown":
153
+ throw new errors.ChrtError({
154
+ message: _response.error.errorMessage,
155
+ rawResponse: _response.rawResponse,
156
+ });
157
+ }
158
+ });
159
+ }
160
+ /**
161
+ * Marks a task artifact as SKIPPED. | authz_personas=[courier_driver, courier_org_operators, forwarder_org_operators] | () -> (bool)
162
+ *
163
+ * @param {string} taskArtifactId
164
+ * @param {TaskArtifacts.RequestOptions} requestOptions - Request-specific configuration.
165
+ *
166
+ * @throws {@link Chrt.UnprocessableEntityError}
167
+ *
168
+ * @example
169
+ * await client.taskArtifacts.skipV1("task_artifact_id")
170
+ */
171
+ skipV1(taskArtifactId, requestOptions) {
172
+ return core.HttpResponsePromise.fromPromise(this.__skipV1(taskArtifactId, requestOptions));
173
+ }
174
+ __skipV1(taskArtifactId, requestOptions) {
175
+ return __awaiter(this, void 0, void 0, function* () {
176
+ var _a, _b, _c, _d;
177
+ 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);
178
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
179
+ 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/task_artifacts/skip/v1/${encodeURIComponent(taskArtifactId)}`),
180
+ method: "PUT",
181
+ headers: _headers,
182
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
183
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
184
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
185
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
186
+ });
187
+ if (_response.ok) {
188
+ return { data: _response.body, rawResponse: _response.rawResponse };
189
+ }
190
+ if (_response.error.reason === "status-code") {
191
+ switch (_response.error.statusCode) {
192
+ case 422:
193
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
194
+ default:
195
+ throw new errors.ChrtError({
196
+ statusCode: _response.error.statusCode,
197
+ body: _response.error.body,
198
+ rawResponse: _response.rawResponse,
199
+ });
200
+ }
201
+ }
202
+ switch (_response.error.reason) {
203
+ case "non-json":
204
+ throw new errors.ChrtError({
205
+ statusCode: _response.error.statusCode,
206
+ body: _response.error.rawBody,
207
+ rawResponse: _response.rawResponse,
208
+ });
209
+ case "timeout":
210
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling PUT /oort/task_artifacts/skip/v1/{task_artifact_id}.");
211
+ case "unknown":
212
+ throw new errors.ChrtError({
213
+ message: _response.error.errorMessage,
214
+ rawResponse: _response.rawResponse,
215
+ });
216
+ }
217
+ });
218
+ }
219
+ /**
220
+ * Deletes a task artifact. | authz_personas=[lig_org_operators] | () -> (bool)
221
+ *
222
+ * @param {string} taskArtifactId
223
+ * @param {TaskArtifacts.RequestOptions} requestOptions - Request-specific configuration.
224
+ *
225
+ * @throws {@link Chrt.UnprocessableEntityError}
226
+ *
227
+ * @example
228
+ * await client.taskArtifacts.deleteV1("task_artifact_id")
229
+ */
230
+ deleteV1(taskArtifactId, requestOptions) {
231
+ return core.HttpResponsePromise.fromPromise(this.__deleteV1(taskArtifactId, requestOptions));
232
+ }
233
+ __deleteV1(taskArtifactId, requestOptions) {
234
+ return __awaiter(this, void 0, void 0, function* () {
235
+ var _a, _b, _c, _d;
236
+ 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);
237
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
238
+ 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/task_artifacts/delete/v1/${encodeURIComponent(taskArtifactId)}`),
239
+ method: "DELETE",
240
+ headers: _headers,
241
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
242
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
243
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
244
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
245
+ });
246
+ if (_response.ok) {
247
+ return { data: _response.body, rawResponse: _response.rawResponse };
248
+ }
249
+ if (_response.error.reason === "status-code") {
250
+ switch (_response.error.statusCode) {
251
+ case 422:
252
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
253
+ default:
254
+ throw new errors.ChrtError({
255
+ statusCode: _response.error.statusCode,
256
+ body: _response.error.body,
257
+ rawResponse: _response.rawResponse,
258
+ });
259
+ }
260
+ }
261
+ switch (_response.error.reason) {
262
+ case "non-json":
263
+ throw new errors.ChrtError({
264
+ statusCode: _response.error.statusCode,
265
+ body: _response.error.rawBody,
266
+ rawResponse: _response.rawResponse,
267
+ });
268
+ case "timeout":
269
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /oort/task_artifacts/delete/v1/{task_artifact_id}.");
270
+ case "unknown":
271
+ throw new errors.ChrtError({
272
+ message: _response.error.errorMessage,
273
+ rawResponse: _response.rawResponse,
274
+ });
275
+ }
276
+ });
277
+ }
278
+ _getAuthorizationHeader() {
279
+ return __awaiter(this, void 0, void 0, function* () {
280
+ const bearer = yield core.Supplier.get(this._options.token);
281
+ if (bearer != null) {
282
+ return `Bearer ${bearer}`;
283
+ }
284
+ return undefined;
285
+ });
17
286
  }
18
287
  }
@@ -1 +1,2 @@
1
1
  export {};
2
+ export * from "./requests/index.mjs";
@@ -1 +1 @@
1
- export {};
1
+ export * from "./requests/index.mjs";
@@ -0,0 +1,19 @@
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_artifact: {
9
+ * schema_version: 1,
10
+ * type: "image"
11
+ * },
12
+ * status: "draft"
13
+ * }
14
+ */
15
+ export interface AddTaskArtifactReq {
16
+ task_artifact: Chrt.TaskArtifactClientCreate1;
17
+ /** Initial status of the task artifact. */
18
+ status: Chrt.TaskArtifactStatusEnum1;
19
+ }
@@ -0,0 +1 @@
1
+ export { type AddTaskArtifactReq } from "./AddTaskArtifactReq.mjs";
@@ -1,2 +1,2 @@
1
- export * as images from "./images/index.mjs";
2
- export * as blurhash from "./blurhash/index.mjs";
1
+ export * as s3ObjectMetadata from "./s3ObjectMetadata/index.mjs";
2
+ export * as s3Object from "./s3Object/index.mjs";
@@ -1,2 +1,2 @@
1
- export * as images from "./images/index.mjs";
2
- export * as blurhash from "./blurhash/index.mjs";
1
+ export * as s3ObjectMetadata from "./s3ObjectMetadata/index.mjs";
2
+ export * as s3Object from "./s3Object/index.mjs";
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import * as environments from "../../../../../../environments.mjs";
5
5
  import * as core from "../../../../../../core/index.mjs";
6
- export declare namespace Blurhash {
6
+ export declare namespace S3Object {
7
7
  interface Options {
8
8
  environment?: core.Supplier<environments.ChrtEnvironment | string>;
9
9
  /** Specify a custom URL to connect the client to. */
@@ -26,21 +26,21 @@ export declare namespace Blurhash {
26
26
  headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
27
27
  }
28
28
  }
29
- export declare class Blurhash {
30
- protected readonly _options: Blurhash.Options;
31
- constructor(_options?: Blurhash.Options);
29
+ export declare class S3Object {
30
+ protected readonly _options: S3Object.Options;
31
+ constructor(_options?: S3Object.Options);
32
32
  /**
33
- * Retrieves the blurhash string for a task_artifact image for fast placeholder loading. | () -> (BlurHash)
33
+ * Streams a task artifact S3 object file from storage. | authz_personas=[courier_driver, courier_org_operators, shipper_org_operators, forwarder_org_operators] | () -> (StreamingResponse)
34
34
  *
35
35
  * @param {string} taskArtifactS3ObjectMetadataId
36
- * @param {Blurhash.RequestOptions} requestOptions - Request-specific configuration.
36
+ * @param {S3Object.RequestOptions} requestOptions - Request-specific configuration.
37
37
  *
38
38
  * @throws {@link Chrt.UnprocessableEntityError}
39
39
  *
40
40
  * @example
41
- * await client.taskArtifacts.blurhash.getByMetadataIdV1("task_artifact_s3_object_metadata_id")
41
+ * await client.taskArtifacts.s3Object.getV1("task_artifact_s3_object_metadata_id")
42
42
  */
43
- getByMetadataIdV1(taskArtifactS3ObjectMetadataId: string, requestOptions?: Blurhash.RequestOptions): core.HttpResponsePromise<string>;
44
- private __getByMetadataIdV1;
43
+ getV1(taskArtifactS3ObjectMetadataId: string, requestOptions?: S3Object.RequestOptions): core.HttpResponsePromise<unknown>;
44
+ private __getV1;
45
45
  protected _getAuthorizationHeader(): Promise<string | undefined>;
46
46
  }