@chrt-inc/typescript-sdk 1.320.0 → 1.322.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 (277) 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 +76 -6
  14. package/dist/cjs/api/resources/taskArtifacts/client/Client.js +304 -7
  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 +6 -3
  21. package/dist/cjs/api/resources/taskArtifacts/resources/s3Object/client/Client.d.ts +90 -0
  22. package/dist/cjs/api/resources/taskArtifacts/resources/s3Object/client/Client.js +314 -0
  23. package/dist/cjs/api/resources/taskArtifacts/resources/s3Object/client/index.d.ts +2 -0
  24. package/dist/cjs/api/resources/taskArtifacts/resources/s3Object/client/index.js +17 -0
  25. package/dist/cjs/api/resources/taskArtifacts/resources/s3Object/client/requests/BodyPostTaskArtifactsS3ObjectAddV1OortTaskArtifactsS3ObjectAddV1TaskArtifactIdPost.d.ts +13 -0
  26. package/dist/cjs/api/resources/taskArtifacts/resources/s3Object/client/requests/index.d.ts +1 -0
  27. package/dist/cjs/api/resources/taskGroups/client/Client.d.ts +46 -33
  28. package/dist/cjs/api/resources/taskGroups/client/Client.js +89 -69
  29. package/dist/cjs/api/resources/taskGroups/client/requests/AddMessageReq.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 +3 -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/taskGroups/resources/s3Object/client/Client.d.ts +90 -0
  44. package/dist/cjs/api/resources/taskGroups/resources/s3Object/client/Client.js +314 -0
  45. package/dist/cjs/api/resources/taskGroups/resources/s3Object/client/index.d.ts +2 -0
  46. package/dist/cjs/api/resources/taskGroups/resources/s3Object/client/index.js +17 -0
  47. package/dist/cjs/api/resources/taskGroups/resources/s3Object/client/requests/BodyPostTaskGroupsS3ObjectAddV1OortTaskGroupsS3ObjectAddV1TaskGroupIdPost.d.ts +13 -0
  48. package/dist/cjs/api/resources/taskGroups/resources/s3Object/client/requests/BodyPostTaskGroupsS3ObjectAddV1OortTaskGroupsS3ObjectAddV1TaskGroupIdPost.js +5 -0
  49. package/dist/cjs/api/resources/taskGroups/resources/s3Object/client/requests/index.d.ts +1 -0
  50. package/dist/cjs/api/resources/taskGroups/resources/s3Object/client/requests/index.js +2 -0
  51. package/dist/cjs/api/resources/{taskArtifacts/resources/blurhash → taskGroups/resources/taskGroupId}/client/Client.d.ts +23 -10
  52. package/dist/cjs/api/resources/{taskArtifacts/resources/blurhash → taskGroups/resources/taskGroupId}/client/Client.js +71 -12
  53. package/dist/cjs/api/resources/taskGroups/resources/taskGroupId/client/index.js +2 -0
  54. package/dist/cjs/api/resources/taskGroups/resources/taskGroupId/index.d.ts +1 -0
  55. package/dist/cjs/api/resources/taskGroups/resources/taskGroupId/index.js +17 -0
  56. package/dist/cjs/api/resources/tasks/client/Client.d.ts +107 -0
  57. package/dist/cjs/api/resources/tasks/client/Client.js +377 -0
  58. package/dist/cjs/api/resources/tasks/client/index.d.ts +2 -0
  59. package/dist/cjs/api/resources/tasks/client/index.js +17 -0
  60. package/dist/cjs/api/resources/tasks/client/requests/AddTaskToGroupReq.d.ts +21 -0
  61. package/dist/cjs/api/resources/tasks/client/requests/AddTaskToGroupReq.js +5 -0
  62. package/dist/cjs/api/resources/tasks/client/requests/index.d.ts +1 -0
  63. package/dist/cjs/api/resources/tasks/client/requests/index.js +2 -0
  64. package/dist/cjs/api/resources/tasks/index.d.ts +1 -0
  65. package/dist/cjs/api/resources/tasks/index.js +17 -0
  66. package/dist/cjs/api/types/Cargo1.d.ts +1 -0
  67. package/dist/cjs/api/types/CargoStatusEnum1.d.ts +2 -1
  68. package/dist/cjs/api/types/CargoStatusEnum1.js +1 -0
  69. package/dist/cjs/api/types/ChrtGroundCourierTaskActionEnum1.d.ts +2 -2
  70. package/dist/cjs/api/types/ChrtGroundCourierTaskActionEnum1.js +1 -1
  71. package/dist/cjs/api/types/Driver1.d.ts +6 -4
  72. package/dist/cjs/api/types/DriverStatusEnum.d.ts +3 -3
  73. package/dist/cjs/api/types/DriverStatusEnum.js +2 -2
  74. package/dist/cjs/api/types/DriverUpdateAvailabilityReq.d.ts +6 -0
  75. package/dist/cjs/api/types/DriverUpdateAvailabilityReq.js +5 -0
  76. package/dist/cjs/api/types/Task1.d.ts +1 -0
  77. package/dist/cjs/api/types/TaskArtifact1.d.ts +1 -0
  78. package/dist/cjs/api/types/TaskArtifactClientCreate1.d.ts +8 -0
  79. package/dist/cjs/api/types/TaskArtifactClientCreate1.js +5 -0
  80. package/dist/cjs/api/types/TaskArtifactS3ObjectMetadata1.d.ts +15 -0
  81. package/dist/cjs/api/types/TaskArtifactS3ObjectMetadata1.js +5 -0
  82. package/dist/cjs/api/types/TaskArtifactStatusEnum1.d.ts +2 -1
  83. package/dist/cjs/api/types/TaskArtifactStatusEnum1.js +1 -0
  84. package/dist/cjs/api/types/TaskClientUpdate1.d.ts +0 -1
  85. package/dist/cjs/api/types/TaskGroup1.d.ts +1 -0
  86. package/dist/cjs/api/types/TaskGroupS3ObjectMetadata1.d.ts +15 -0
  87. package/dist/cjs/api/types/TaskGroupS3ObjectMetadata1.js +5 -0
  88. package/dist/cjs/api/types/TaskGroupSortByEnum.d.ts +2 -1
  89. package/dist/cjs/api/types/TaskGroupSortByEnum.js +1 -0
  90. package/dist/cjs/api/types/TaskGroupStatusEnum1.d.ts +2 -1
  91. package/dist/cjs/api/types/TaskGroupStatusEnum1.js +1 -0
  92. package/dist/cjs/api/types/TaskStatusEnum1.d.ts +2 -1
  93. package/dist/cjs/api/types/TaskStatusEnum1.js +1 -0
  94. package/dist/cjs/api/types/index.d.ts +4 -0
  95. package/dist/cjs/api/types/index.js +4 -0
  96. package/dist/cjs/core/exports.d.ts +1 -0
  97. package/dist/cjs/core/exports.js +17 -0
  98. package/dist/cjs/core/file/exports.d.ts +1 -0
  99. package/dist/cjs/core/file/exports.js +2 -0
  100. package/dist/cjs/core/file/file.d.ts +5 -0
  101. package/dist/cjs/core/file/file.js +203 -0
  102. package/dist/cjs/core/file/index.d.ts +2 -0
  103. package/dist/cjs/core/file/index.js +18 -0
  104. package/dist/cjs/core/file/types.d.ts +66 -0
  105. package/dist/cjs/core/file/types.js +2 -0
  106. package/dist/cjs/core/form-data-utils/FormDataWrapper.d.ts +16 -0
  107. package/dist/cjs/core/form-data-utils/FormDataWrapper.js +208 -0
  108. package/dist/cjs/core/form-data-utils/encodeAsFormParameter.d.ts +1 -0
  109. package/dist/cjs/core/form-data-utils/encodeAsFormParameter.js +12 -0
  110. package/dist/cjs/core/form-data-utils/index.d.ts +2 -0
  111. package/dist/cjs/core/form-data-utils/index.js +20 -0
  112. package/dist/cjs/core/index.d.ts +2 -0
  113. package/dist/cjs/core/index.js +3 -1
  114. package/dist/cjs/exports.d.ts +1 -0
  115. package/dist/cjs/exports.js +17 -0
  116. package/dist/cjs/index.d.ts +1 -0
  117. package/dist/cjs/index.js +4 -0
  118. package/dist/cjs/version.d.ts +1 -1
  119. package/dist/cjs/version.js +1 -1
  120. package/dist/esm/Client.d.mts +6 -3
  121. package/dist/esm/Client.mjs +12 -7
  122. package/dist/esm/api/resources/drivers/client/Client.d.mts +59 -61
  123. package/dist/esm/api/resources/drivers/client/Client.mjs +140 -139
  124. package/dist/esm/api/resources/drivers/client/requests/DriverClientCreate1.d.mts +20 -0
  125. package/dist/esm/api/resources/drivers/client/requests/{UpdateDriverDetailsReq.d.mts → DriverClientUpdate1.d.mts} +4 -5
  126. package/dist/esm/api/resources/drivers/client/requests/DriverLastSeenReq.d.mts +1 -0
  127. package/dist/esm/api/resources/drivers/client/requests/index.d.mts +2 -3
  128. package/dist/esm/api/resources/index.d.mts +4 -1
  129. package/dist/esm/api/resources/index.mjs +4 -1
  130. package/dist/esm/api/resources/orders/client/Client.d.mts +13 -0
  131. package/dist/esm/api/resources/orders/client/Client.mjs +59 -0
  132. package/dist/esm/api/resources/taskArtifacts/client/Client.d.mts +76 -6
  133. package/dist/esm/api/resources/taskArtifacts/client/Client.mjs +271 -7
  134. package/dist/esm/api/resources/taskArtifacts/client/index.d.mts +1 -0
  135. package/dist/esm/api/resources/taskArtifacts/client/index.mjs +1 -1
  136. package/dist/esm/api/resources/taskArtifacts/client/requests/AddTaskArtifactReq.d.mts +19 -0
  137. package/dist/esm/api/resources/taskArtifacts/client/requests/index.d.mts +1 -0
  138. package/dist/esm/api/resources/taskArtifacts/resources/index.d.mts +2 -2
  139. package/dist/esm/api/resources/taskArtifacts/resources/index.mjs +2 -2
  140. package/dist/esm/api/resources/taskArtifacts/resources/s3Object/client/Client.d.mts +90 -0
  141. package/dist/esm/api/resources/taskArtifacts/resources/s3Object/client/Client.mjs +277 -0
  142. package/dist/esm/api/resources/taskArtifacts/resources/s3Object/client/index.d.mts +2 -0
  143. package/dist/esm/api/resources/taskArtifacts/resources/s3Object/client/index.mjs +1 -0
  144. package/dist/esm/api/resources/taskArtifacts/resources/s3Object/client/requests/BodyPostTaskArtifactsS3ObjectAddV1OortTaskArtifactsS3ObjectAddV1TaskArtifactIdPost.d.mts +13 -0
  145. package/dist/esm/api/resources/taskArtifacts/resources/s3Object/client/requests/index.d.mts +1 -0
  146. package/dist/esm/api/resources/taskGroups/client/Client.d.mts +46 -33
  147. package/dist/esm/api/resources/taskGroups/client/Client.mjs +87 -67
  148. package/dist/esm/api/resources/taskGroups/client/requests/AddMessageReq.d.mts +13 -0
  149. package/dist/esm/api/resources/taskGroups/client/requests/SetFlightNumberReq.d.mts +1 -0
  150. package/dist/esm/api/resources/taskGroups/client/requests/SetTaskOrderingReq.d.mts +3 -2
  151. package/dist/esm/api/resources/taskGroups/client/requests/UpdateCourierOrgReq.d.mts +13 -0
  152. package/dist/esm/api/resources/taskGroups/client/requests/UpdateCourierOrgReq.mjs +4 -0
  153. package/dist/esm/api/resources/taskGroups/client/requests/UpdateDriverReq.d.mts +13 -0
  154. package/dist/esm/api/resources/taskGroups/client/requests/UpdateDriverReq.mjs +4 -0
  155. package/dist/esm/api/resources/taskGroups/client/requests/index.d.mts +3 -2
  156. package/dist/esm/api/resources/taskGroups/resources/expanded/client/Client.d.mts +4 -0
  157. package/dist/esm/api/resources/taskGroups/resources/expanded/client/Client.mjs +18 -2
  158. package/dist/esm/api/resources/taskGroups/resources/expanded/client/requests/ExpandedListForCourierDriverV1Request.d.mts +4 -0
  159. package/dist/esm/api/resources/taskGroups/resources/expanded/client/requests/ExpandedListForCourierOperatorsV1Request.d.mts +4 -0
  160. package/dist/esm/api/resources/taskGroups/resources/index.d.mts +3 -0
  161. package/dist/esm/api/resources/taskGroups/resources/index.mjs +3 -0
  162. package/dist/esm/api/resources/taskGroups/resources/s3Object/client/Client.d.mts +90 -0
  163. package/dist/esm/api/resources/taskGroups/resources/s3Object/client/Client.mjs +277 -0
  164. package/dist/esm/api/resources/taskGroups/resources/s3Object/client/index.d.mts +2 -0
  165. package/dist/esm/api/resources/taskGroups/resources/s3Object/client/index.mjs +1 -0
  166. package/dist/esm/api/resources/taskGroups/resources/s3Object/client/requests/BodyPostTaskGroupsS3ObjectAddV1OortTaskGroupsS3ObjectAddV1TaskGroupIdPost.d.mts +13 -0
  167. package/dist/esm/api/resources/taskGroups/resources/s3Object/client/requests/BodyPostTaskGroupsS3ObjectAddV1OortTaskGroupsS3ObjectAddV1TaskGroupIdPost.mjs +4 -0
  168. package/dist/esm/api/resources/taskGroups/resources/s3Object/client/requests/index.d.mts +1 -0
  169. package/dist/esm/api/resources/{taskArtifacts/resources/blurhash → taskGroups/resources/taskGroupId}/client/Client.d.mts +23 -10
  170. package/dist/esm/api/resources/taskGroups/resources/taskGroupId/client/Client.mjs +149 -0
  171. package/dist/esm/api/resources/taskGroups/resources/taskGroupId/index.d.mts +1 -0
  172. package/dist/esm/api/resources/taskGroups/resources/taskGroupId/index.mjs +1 -0
  173. package/dist/esm/api/resources/tasks/client/Client.d.mts +107 -0
  174. package/dist/esm/api/resources/tasks/client/Client.mjs +340 -0
  175. package/dist/esm/api/resources/tasks/client/index.d.mts +2 -0
  176. package/dist/esm/api/resources/tasks/client/index.mjs +1 -0
  177. package/dist/esm/api/resources/tasks/client/requests/AddTaskToGroupReq.d.mts +21 -0
  178. package/dist/esm/api/resources/tasks/client/requests/AddTaskToGroupReq.mjs +4 -0
  179. package/dist/esm/api/resources/tasks/client/requests/index.d.mts +1 -0
  180. package/dist/esm/api/resources/tasks/client/requests/index.mjs +1 -0
  181. package/dist/esm/api/resources/tasks/index.d.mts +1 -0
  182. package/dist/esm/api/resources/tasks/index.mjs +1 -0
  183. package/dist/esm/api/types/Cargo1.d.mts +1 -0
  184. package/dist/esm/api/types/CargoStatusEnum1.d.mts +2 -1
  185. package/dist/esm/api/types/CargoStatusEnum1.mjs +1 -0
  186. package/dist/esm/api/types/ChrtGroundCourierTaskActionEnum1.d.mts +2 -2
  187. package/dist/esm/api/types/ChrtGroundCourierTaskActionEnum1.mjs +1 -1
  188. package/dist/esm/api/types/Driver1.d.mts +6 -4
  189. package/dist/esm/api/types/DriverStatusEnum.d.mts +3 -3
  190. package/dist/esm/api/types/DriverStatusEnum.mjs +2 -2
  191. package/dist/esm/api/types/DriverUpdateAvailabilityReq.d.mts +6 -0
  192. package/dist/esm/api/types/DriverUpdateAvailabilityReq.mjs +4 -0
  193. package/dist/esm/api/types/Task1.d.mts +1 -0
  194. package/dist/esm/api/types/TaskArtifact1.d.mts +1 -0
  195. package/dist/esm/api/types/TaskArtifactClientCreate1.d.mts +8 -0
  196. package/dist/esm/api/types/TaskArtifactClientCreate1.mjs +4 -0
  197. package/dist/esm/api/types/TaskArtifactS3ObjectMetadata1.d.mts +15 -0
  198. package/dist/esm/api/types/TaskArtifactS3ObjectMetadata1.mjs +4 -0
  199. package/dist/esm/api/types/TaskArtifactStatusEnum1.d.mts +2 -1
  200. package/dist/esm/api/types/TaskArtifactStatusEnum1.mjs +1 -0
  201. package/dist/esm/api/types/TaskClientUpdate1.d.mts +0 -1
  202. package/dist/esm/api/types/TaskGroup1.d.mts +1 -0
  203. package/dist/esm/api/types/TaskGroupS3ObjectMetadata1.d.mts +15 -0
  204. package/dist/esm/api/types/TaskGroupS3ObjectMetadata1.mjs +4 -0
  205. package/dist/esm/api/types/TaskGroupSortByEnum.d.mts +2 -1
  206. package/dist/esm/api/types/TaskGroupSortByEnum.mjs +1 -0
  207. package/dist/esm/api/types/TaskGroupStatusEnum1.d.mts +2 -1
  208. package/dist/esm/api/types/TaskGroupStatusEnum1.mjs +1 -0
  209. package/dist/esm/api/types/TaskStatusEnum1.d.mts +2 -1
  210. package/dist/esm/api/types/TaskStatusEnum1.mjs +1 -0
  211. package/dist/esm/api/types/index.d.mts +4 -0
  212. package/dist/esm/api/types/index.mjs +4 -0
  213. package/dist/esm/core/exports.d.mts +1 -0
  214. package/dist/esm/core/exports.mjs +1 -0
  215. package/dist/esm/core/file/exports.d.mts +1 -0
  216. package/dist/esm/core/file/exports.mjs +1 -0
  217. package/dist/esm/core/file/file.d.mts +5 -0
  218. package/dist/esm/core/file/file.mjs +167 -0
  219. package/dist/esm/core/file/index.d.mts +2 -0
  220. package/dist/esm/core/file/index.mjs +2 -0
  221. package/dist/esm/core/file/types.d.mts +66 -0
  222. package/dist/esm/core/file/types.mjs +1 -0
  223. package/dist/esm/core/form-data-utils/FormDataWrapper.d.mts +16 -0
  224. package/dist/esm/core/form-data-utils/FormDataWrapper.mjs +170 -0
  225. package/dist/esm/core/form-data-utils/encodeAsFormParameter.d.mts +1 -0
  226. package/dist/esm/core/form-data-utils/encodeAsFormParameter.mjs +9 -0
  227. package/dist/esm/core/form-data-utils/index.d.mts +2 -0
  228. package/dist/esm/core/form-data-utils/index.mjs +2 -0
  229. package/dist/esm/core/index.d.mts +2 -0
  230. package/dist/esm/core/index.mjs +2 -0
  231. package/dist/esm/exports.d.mts +1 -0
  232. package/dist/esm/exports.mjs +1 -0
  233. package/dist/esm/index.d.mts +1 -0
  234. package/dist/esm/index.mjs +1 -0
  235. package/dist/esm/version.d.mts +1 -1
  236. package/dist/esm/version.mjs +1 -1
  237. package/package.json +1 -1
  238. package/reference.md +2047 -821
  239. package/dist/cjs/api/resources/drivers/client/requests/DriverCreateReq.d.ts +0 -17
  240. package/dist/cjs/api/resources/drivers/client/requests/SetDriverActivationReq.d.ts +0 -14
  241. package/dist/cjs/api/resources/taskArtifacts/resources/images/client/Client.d.ts +0 -39
  242. package/dist/cjs/api/resources/taskArtifacts/resources/images/client/Client.js +0 -121
  243. package/dist/cjs/api/resources/taskGroups/client/requests/UpdateTaskGroupCourierOrgReq.d.ts +0 -12
  244. package/dist/cjs/api/resources/taskGroups/client/requests/UpdateTaskGroupDriverReq.d.ts +0 -11
  245. package/dist/esm/api/resources/drivers/client/requests/DriverCreateReq.d.mts +0 -17
  246. package/dist/esm/api/resources/drivers/client/requests/SetDriverActivationReq.d.mts +0 -14
  247. package/dist/esm/api/resources/taskArtifacts/resources/blurhash/client/Client.mjs +0 -90
  248. package/dist/esm/api/resources/taskArtifacts/resources/images/client/Client.d.mts +0 -39
  249. package/dist/esm/api/resources/taskArtifacts/resources/images/client/Client.mjs +0 -84
  250. package/dist/esm/api/resources/taskGroups/client/requests/UpdateTaskGroupCourierOrgReq.d.mts +0 -12
  251. package/dist/esm/api/resources/taskGroups/client/requests/UpdateTaskGroupDriverReq.d.mts +0 -11
  252. /package/dist/cjs/api/resources/drivers/client/requests/{DriverCreateReq.js → DriverClientCreate1.js} +0 -0
  253. /package/dist/cjs/api/resources/drivers/client/requests/{SetDriverActivationReq.js → DriverClientUpdate1.js} +0 -0
  254. /package/dist/cjs/api/resources/{drivers/client/requests/UpdateDriverDetailsReq.js → taskArtifacts/client/requests/AddTaskArtifactReq.js} +0 -0
  255. /package/dist/cjs/api/resources/taskArtifacts/{resources/blurhash/client → client/requests}/index.js +0 -0
  256. /package/dist/cjs/api/resources/{taskGroups/client/requests/UpdateTaskGroupCourierOrgReq.js → taskArtifacts/resources/s3Object/client/requests/BodyPostTaskArtifactsS3ObjectAddV1OortTaskArtifactsS3ObjectAddV1TaskArtifactIdPost.js} +0 -0
  257. /package/dist/cjs/api/resources/taskArtifacts/resources/{images/client → s3Object/client/requests}/index.js +0 -0
  258. /package/dist/cjs/api/resources/taskArtifacts/resources/{blurhash → s3Object}/index.d.ts +0 -0
  259. /package/dist/cjs/api/resources/taskArtifacts/resources/{blurhash → s3Object}/index.js +0 -0
  260. /package/dist/cjs/api/resources/taskGroups/client/requests/{UpdateTaskGroupDriverReq.js → AddMessageReq.js} +0 -0
  261. /package/dist/cjs/api/resources/{taskArtifacts/resources/images → taskGroups/resources/s3Object}/index.d.ts +0 -0
  262. /package/dist/cjs/api/resources/{taskArtifacts/resources/images → taskGroups/resources/s3Object}/index.js +0 -0
  263. /package/dist/cjs/api/resources/{taskArtifacts/resources/blurhash → taskGroups/resources/taskGroupId}/client/index.d.ts +0 -0
  264. /package/dist/esm/api/resources/drivers/client/requests/{DriverCreateReq.mjs → DriverClientCreate1.mjs} +0 -0
  265. /package/dist/esm/api/resources/drivers/client/requests/{SetDriverActivationReq.mjs → DriverClientUpdate1.mjs} +0 -0
  266. /package/dist/esm/api/resources/{drivers/client/requests/UpdateDriverDetailsReq.mjs → taskArtifacts/client/requests/AddTaskArtifactReq.mjs} +0 -0
  267. /package/dist/esm/api/resources/taskArtifacts/{resources/blurhash/client → client/requests}/index.mjs +0 -0
  268. /package/dist/esm/api/resources/{taskGroups/client/requests/UpdateTaskGroupCourierOrgReq.mjs → taskArtifacts/resources/s3Object/client/requests/BodyPostTaskArtifactsS3ObjectAddV1OortTaskArtifactsS3ObjectAddV1TaskArtifactIdPost.mjs} +0 -0
  269. /package/dist/esm/api/resources/taskArtifacts/resources/{images/client → s3Object/client/requests}/index.mjs +0 -0
  270. /package/dist/esm/api/resources/taskArtifacts/resources/{blurhash → s3Object}/index.d.mts +0 -0
  271. /package/dist/esm/api/resources/taskArtifacts/resources/{blurhash → s3Object}/index.mjs +0 -0
  272. /package/dist/esm/api/resources/taskGroups/client/requests/{UpdateTaskGroupDriverReq.mjs → AddMessageReq.mjs} +0 -0
  273. /package/dist/{cjs/api/resources/taskArtifacts/resources/images/client/index.d.ts → esm/api/resources/taskGroups/resources/s3Object/client/requests/index.mjs} +0 -0
  274. /package/dist/esm/api/resources/{taskArtifacts/resources/images → taskGroups/resources/s3Object}/index.d.mts +0 -0
  275. /package/dist/esm/api/resources/{taskArtifacts/resources/images → taskGroups/resources/s3Object}/index.mjs +0 -0
  276. /package/dist/esm/api/resources/{taskArtifacts/resources/blurhash → taskGroups/resources/taskGroupId}/client/index.d.mts +0 -0
  277. /package/dist/esm/api/resources/{taskArtifacts/resources/images/client/index.d.mts → taskGroups/resources/taskGroupId/client/index.mjs} +0 -0
@@ -0,0 +1,90 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as environments from "../../../../../../environments.js";
5
+ import * as core from "../../../../../../core/index.js";
6
+ import * as Chrt from "../../../../../index.js";
7
+ export declare namespace S3Object {
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 S3Object {
31
+ protected readonly _options: S3Object.Options;
32
+ constructor(_options?: S3Object.Options);
33
+ /**
34
+ * Retrieves the metadata for a task group S3 object, including blurhash for placeholder loading. | authz_personas=[courier_driver, courier_org_operators, shipper_org_operators, forwarder_org_operators] | () -> (TaskGroupS3ObjectMetadata1)
35
+ *
36
+ * @param {string} taskGroupS3ObjectMetadataId
37
+ * @param {S3Object.RequestOptions} requestOptions - Request-specific configuration.
38
+ *
39
+ * @throws {@link Chrt.UnprocessableEntityError}
40
+ *
41
+ * @example
42
+ * await client.taskGroups.s3Object.getS3ObjectMetadataV1("task_group_s3_object_metadata_id")
43
+ */
44
+ getS3ObjectMetadataV1(taskGroupS3ObjectMetadataId: string, requestOptions?: S3Object.RequestOptions): core.HttpResponsePromise<Chrt.TaskGroupS3ObjectMetadata1>;
45
+ private __getS3ObjectMetadataV1;
46
+ /**
47
+ * Streams a task group S3 object file from storage. | authz_personas=[courier_driver, courier_org_operators, shipper_org_operators, forwarder_org_operators] | () -> (StreamingResponse)
48
+ *
49
+ * @param {string} taskGroupS3ObjectMetadataId
50
+ * @param {S3Object.RequestOptions} requestOptions - Request-specific configuration.
51
+ *
52
+ * @throws {@link Chrt.UnprocessableEntityError}
53
+ *
54
+ * @example
55
+ * await client.taskGroups.s3Object.getV1("task_group_s3_object_metadata_id")
56
+ */
57
+ getV1(taskGroupS3ObjectMetadataId: string, requestOptions?: S3Object.RequestOptions): core.HttpResponsePromise<unknown>;
58
+ private __getV1;
59
+ /**
60
+ * Uploads an image file to a task group with automatic blurhash generation. | authz_personas=[courier_driver, courier_org_operators, forwarder_org_operators, shipper_org_operators] | (UploadFile) -> (bool)
61
+ *
62
+ * @param {string} taskGroupId
63
+ * @param {Chrt.taskGroups.BodyPostTaskGroupsS3ObjectAddV1OortTaskGroupsS3ObjectAddV1TaskGroupIdPost} request
64
+ * @param {S3Object.RequestOptions} requestOptions - Request-specific configuration.
65
+ *
66
+ * @throws {@link Chrt.UnprocessableEntityError}
67
+ *
68
+ * @example
69
+ * import { createReadStream } from "fs";
70
+ * await client.taskGroups.s3Object.addV1("task_group_id", {
71
+ * image: fs.createReadStream("/path/to/your/file")
72
+ * })
73
+ */
74
+ addV1(taskGroupId: string, request: Chrt.taskGroups.BodyPostTaskGroupsS3ObjectAddV1OortTaskGroupsS3ObjectAddV1TaskGroupIdPost, requestOptions?: S3Object.RequestOptions): core.HttpResponsePromise<boolean>;
75
+ private __addV1;
76
+ /**
77
+ * Deletes an S3 object metadata and the associated S3 object from a task group. Only the uploader or an operator from the uploading org can delete. | () -> (bool)
78
+ *
79
+ * @param {string} taskGroupS3ObjectMetadataId
80
+ * @param {S3Object.RequestOptions} requestOptions - Request-specific configuration.
81
+ *
82
+ * @throws {@link Chrt.UnprocessableEntityError}
83
+ *
84
+ * @example
85
+ * await client.taskGroups.s3Object.deleteV1("task_group_s3_object_metadata_id")
86
+ */
87
+ deleteV1(taskGroupS3ObjectMetadataId: string, requestOptions?: S3Object.RequestOptions): core.HttpResponsePromise<boolean>;
88
+ private __deleteV1;
89
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
90
+ }
@@ -0,0 +1,314 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
39
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
40
+ return new (P || (P = Promise))(function (resolve, reject) {
41
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
42
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
43
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
44
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
45
+ });
46
+ };
47
+ Object.defineProperty(exports, "__esModule", { value: true });
48
+ exports.S3Object = void 0;
49
+ const environments = __importStar(require("../../../../../../environments.js"));
50
+ const core = __importStar(require("../../../../../../core/index.js"));
51
+ const Chrt = __importStar(require("../../../../../index.js"));
52
+ const headers_js_1 = require("../../../../../../core/headers.js");
53
+ const errors = __importStar(require("../../../../../../errors/index.js"));
54
+ class S3Object {
55
+ constructor(_options = {}) {
56
+ this._options = _options;
57
+ }
58
+ /**
59
+ * Retrieves the metadata for a task group S3 object, including blurhash for placeholder loading. | authz_personas=[courier_driver, courier_org_operators, shipper_org_operators, forwarder_org_operators] | () -> (TaskGroupS3ObjectMetadata1)
60
+ *
61
+ * @param {string} taskGroupS3ObjectMetadataId
62
+ * @param {S3Object.RequestOptions} requestOptions - Request-specific configuration.
63
+ *
64
+ * @throws {@link Chrt.UnprocessableEntityError}
65
+ *
66
+ * @example
67
+ * await client.taskGroups.s3Object.getS3ObjectMetadataV1("task_group_s3_object_metadata_id")
68
+ */
69
+ getS3ObjectMetadataV1(taskGroupS3ObjectMetadataId, requestOptions) {
70
+ return core.HttpResponsePromise.fromPromise(this.__getS3ObjectMetadataV1(taskGroupS3ObjectMetadataId, requestOptions));
71
+ }
72
+ __getS3ObjectMetadataV1(taskGroupS3ObjectMetadataId, requestOptions) {
73
+ return __awaiter(this, void 0, void 0, function* () {
74
+ var _a, _b, _c, _d;
75
+ let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
76
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
77
+ 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_groups/s3_object/s3_object_metadata/v1/${encodeURIComponent(taskGroupS3ObjectMetadataId)}`),
78
+ method: "GET",
79
+ headers: _headers,
80
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
81
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
82
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
83
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
84
+ });
85
+ if (_response.ok) {
86
+ return { data: _response.body, rawResponse: _response.rawResponse };
87
+ }
88
+ if (_response.error.reason === "status-code") {
89
+ switch (_response.error.statusCode) {
90
+ case 422:
91
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
92
+ default:
93
+ throw new errors.ChrtError({
94
+ statusCode: _response.error.statusCode,
95
+ body: _response.error.body,
96
+ rawResponse: _response.rawResponse,
97
+ });
98
+ }
99
+ }
100
+ switch (_response.error.reason) {
101
+ case "non-json":
102
+ throw new errors.ChrtError({
103
+ statusCode: _response.error.statusCode,
104
+ body: _response.error.rawBody,
105
+ rawResponse: _response.rawResponse,
106
+ });
107
+ case "timeout":
108
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/task_groups/s3_object/s3_object_metadata/v1/{task_group_s3_object_metadata_id}.");
109
+ case "unknown":
110
+ throw new errors.ChrtError({
111
+ message: _response.error.errorMessage,
112
+ rawResponse: _response.rawResponse,
113
+ });
114
+ }
115
+ });
116
+ }
117
+ /**
118
+ * Streams a task group S3 object file from storage. | authz_personas=[courier_driver, courier_org_operators, shipper_org_operators, forwarder_org_operators] | () -> (StreamingResponse)
119
+ *
120
+ * @param {string} taskGroupS3ObjectMetadataId
121
+ * @param {S3Object.RequestOptions} requestOptions - Request-specific configuration.
122
+ *
123
+ * @throws {@link Chrt.UnprocessableEntityError}
124
+ *
125
+ * @example
126
+ * await client.taskGroups.s3Object.getV1("task_group_s3_object_metadata_id")
127
+ */
128
+ getV1(taskGroupS3ObjectMetadataId, requestOptions) {
129
+ return core.HttpResponsePromise.fromPromise(this.__getV1(taskGroupS3ObjectMetadataId, requestOptions));
130
+ }
131
+ __getV1(taskGroupS3ObjectMetadataId, requestOptions) {
132
+ return __awaiter(this, void 0, void 0, function* () {
133
+ var _a, _b, _c, _d;
134
+ let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
135
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
136
+ 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_groups/s3_object/v1/${encodeURIComponent(taskGroupS3ObjectMetadataId)}`),
137
+ method: "GET",
138
+ headers: _headers,
139
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
140
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
141
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
142
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
143
+ });
144
+ if (_response.ok) {
145
+ return { data: _response.body, rawResponse: _response.rawResponse };
146
+ }
147
+ if (_response.error.reason === "status-code") {
148
+ switch (_response.error.statusCode) {
149
+ case 422:
150
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
151
+ default:
152
+ throw new errors.ChrtError({
153
+ statusCode: _response.error.statusCode,
154
+ body: _response.error.body,
155
+ rawResponse: _response.rawResponse,
156
+ });
157
+ }
158
+ }
159
+ switch (_response.error.reason) {
160
+ case "non-json":
161
+ throw new errors.ChrtError({
162
+ statusCode: _response.error.statusCode,
163
+ body: _response.error.rawBody,
164
+ rawResponse: _response.rawResponse,
165
+ });
166
+ case "timeout":
167
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/task_groups/s3_object/v1/{task_group_s3_object_metadata_id}.");
168
+ case "unknown":
169
+ throw new errors.ChrtError({
170
+ message: _response.error.errorMessage,
171
+ rawResponse: _response.rawResponse,
172
+ });
173
+ }
174
+ });
175
+ }
176
+ /**
177
+ * Uploads an image file to a task group with automatic blurhash generation. | authz_personas=[courier_driver, courier_org_operators, forwarder_org_operators, shipper_org_operators] | (UploadFile) -> (bool)
178
+ *
179
+ * @param {string} taskGroupId
180
+ * @param {Chrt.taskGroups.BodyPostTaskGroupsS3ObjectAddV1OortTaskGroupsS3ObjectAddV1TaskGroupIdPost} request
181
+ * @param {S3Object.RequestOptions} requestOptions - Request-specific configuration.
182
+ *
183
+ * @throws {@link Chrt.UnprocessableEntityError}
184
+ *
185
+ * @example
186
+ * import { createReadStream } from "fs";
187
+ * await client.taskGroups.s3Object.addV1("task_group_id", {
188
+ * image: fs.createReadStream("/path/to/your/file")
189
+ * })
190
+ */
191
+ addV1(taskGroupId, request, requestOptions) {
192
+ return core.HttpResponsePromise.fromPromise(this.__addV1(taskGroupId, request, requestOptions));
193
+ }
194
+ __addV1(taskGroupId, request, requestOptions) {
195
+ return __awaiter(this, void 0, void 0, function* () {
196
+ var _a, _b, _c, _d;
197
+ const _request = yield core.newFormData();
198
+ yield _request.appendFile("image", request.image);
199
+ const _maybeEncodedRequest = yield _request.getRequest();
200
+ let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({ Authorization: yield this._getAuthorizationHeader() }, _maybeEncodedRequest.headers)), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
201
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
202
+ 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_groups/s3_object/add/v1/${encodeURIComponent(taskGroupId)}`),
203
+ method: "POST",
204
+ headers: _headers,
205
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
206
+ requestType: "file",
207
+ duplex: _maybeEncodedRequest.duplex,
208
+ body: _maybeEncodedRequest.body,
209
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
210
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
211
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
212
+ });
213
+ if (_response.ok) {
214
+ return { data: _response.body, rawResponse: _response.rawResponse };
215
+ }
216
+ if (_response.error.reason === "status-code") {
217
+ switch (_response.error.statusCode) {
218
+ case 422:
219
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
220
+ default:
221
+ throw new errors.ChrtError({
222
+ statusCode: _response.error.statusCode,
223
+ body: _response.error.body,
224
+ rawResponse: _response.rawResponse,
225
+ });
226
+ }
227
+ }
228
+ switch (_response.error.reason) {
229
+ case "non-json":
230
+ throw new errors.ChrtError({
231
+ statusCode: _response.error.statusCode,
232
+ body: _response.error.rawBody,
233
+ rawResponse: _response.rawResponse,
234
+ });
235
+ case "timeout":
236
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/task_groups/s3_object/add/v1/{task_group_id}.");
237
+ case "unknown":
238
+ throw new errors.ChrtError({
239
+ message: _response.error.errorMessage,
240
+ rawResponse: _response.rawResponse,
241
+ });
242
+ }
243
+ });
244
+ }
245
+ /**
246
+ * Deletes an S3 object metadata and the associated S3 object from a task group. Only the uploader or an operator from the uploading org can delete. | () -> (bool)
247
+ *
248
+ * @param {string} taskGroupS3ObjectMetadataId
249
+ * @param {S3Object.RequestOptions} requestOptions - Request-specific configuration.
250
+ *
251
+ * @throws {@link Chrt.UnprocessableEntityError}
252
+ *
253
+ * @example
254
+ * await client.taskGroups.s3Object.deleteV1("task_group_s3_object_metadata_id")
255
+ */
256
+ deleteV1(taskGroupS3ObjectMetadataId, requestOptions) {
257
+ return core.HttpResponsePromise.fromPromise(this.__deleteV1(taskGroupS3ObjectMetadataId, requestOptions));
258
+ }
259
+ __deleteV1(taskGroupS3ObjectMetadataId, requestOptions) {
260
+ return __awaiter(this, void 0, void 0, function* () {
261
+ var _a, _b, _c, _d;
262
+ let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
263
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
264
+ 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_groups/s3_object/delete/v1/${encodeURIComponent(taskGroupS3ObjectMetadataId)}`),
265
+ method: "DELETE",
266
+ headers: _headers,
267
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
268
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
269
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
270
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
271
+ });
272
+ if (_response.ok) {
273
+ return { data: _response.body, rawResponse: _response.rawResponse };
274
+ }
275
+ if (_response.error.reason === "status-code") {
276
+ switch (_response.error.statusCode) {
277
+ case 422:
278
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
279
+ default:
280
+ throw new errors.ChrtError({
281
+ statusCode: _response.error.statusCode,
282
+ body: _response.error.body,
283
+ rawResponse: _response.rawResponse,
284
+ });
285
+ }
286
+ }
287
+ switch (_response.error.reason) {
288
+ case "non-json":
289
+ throw new errors.ChrtError({
290
+ statusCode: _response.error.statusCode,
291
+ body: _response.error.rawBody,
292
+ rawResponse: _response.rawResponse,
293
+ });
294
+ case "timeout":
295
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /oort/task_groups/s3_object/delete/v1/{task_group_s3_object_metadata_id}.");
296
+ case "unknown":
297
+ throw new errors.ChrtError({
298
+ message: _response.error.errorMessage,
299
+ rawResponse: _response.rawResponse,
300
+ });
301
+ }
302
+ });
303
+ }
304
+ _getAuthorizationHeader() {
305
+ return __awaiter(this, void 0, void 0, function* () {
306
+ const bearer = yield core.Supplier.get(this._options.token);
307
+ if (bearer != null) {
308
+ return `Bearer ${bearer}`;
309
+ }
310
+ return undefined;
311
+ });
312
+ }
313
+ }
314
+ exports.S3Object = S3Object;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ export * from "./requests/index.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests/index.js"), exports);
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as core from "../../../../../../../core/index.js";
5
+ /**
6
+ * @example
7
+ * {
8
+ * image: fs.createReadStream("/path/to/your/file")
9
+ * }
10
+ */
11
+ export interface BodyPostTaskGroupsS3ObjectAddV1OortTaskGroupsS3ObjectAddV1TaskGroupIdPost {
12
+ image: core.file.Uploadable.FileLike;
13
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export { type BodyPostTaskGroupsS3ObjectAddV1OortTaskGroupsS3ObjectAddV1TaskGroupIdPost } from "./BodyPostTaskGroupsS3ObjectAddV1OortTaskGroupsS3ObjectAddV1TaskGroupIdPost.js";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import * as environments from "../../../../../../environments.js";
5
5
  import * as core from "../../../../../../core/index.js";
6
- export declare namespace Blurhash {
6
+ export declare namespace TaskGroupId {
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,34 @@ 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 TaskGroupId {
30
+ protected readonly _options: TaskGroupId.Options;
31
+ constructor(_options?: TaskGroupId.Options);
32
32
  /**
33
- * Retrieves the blurhash string for a task_artifact image for fast placeholder loading. | () -> (BlurHash)
33
+ * Retrieves the task group ID for the courier organization assigned to an order's task group. | authz_personas=[courier_org_operators] | () -> (PydanticObjectId)
34
34
  *
35
- * @param {string} taskArtifactS3ObjectMetadataId
36
- * @param {Blurhash.RequestOptions} requestOptions - Request-specific configuration.
35
+ * @param {string} orderIdOrShortId
36
+ * @param {TaskGroupId.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.taskGroups.taskGroupId.forCourierOperatorsV1("order_id_or_short_id")
42
42
  */
43
- getByMetadataIdV1(taskArtifactS3ObjectMetadataId: string, requestOptions?: Blurhash.RequestOptions): core.HttpResponsePromise<string>;
44
- private __getByMetadataIdV1;
43
+ forCourierOperatorsV1(orderIdOrShortId: string, requestOptions?: TaskGroupId.RequestOptions): core.HttpResponsePromise<string>;
44
+ private __forCourierOperatorsV1;
45
+ /**
46
+ * Retrieves the task group ID for the courier driver assigned to an order's task group. | authz_personas=[courier_driver] | () -> (PydanticObjectId)
47
+ *
48
+ * @param {string} orderIdOrShortId
49
+ * @param {TaskGroupId.RequestOptions} requestOptions - Request-specific configuration.
50
+ *
51
+ * @throws {@link Chrt.UnprocessableEntityError}
52
+ *
53
+ * @example
54
+ * await client.taskGroups.taskGroupId.forCourierDriverV1("order_id_or_short_id")
55
+ */
56
+ forCourierDriverV1(orderIdOrShortId: string, requestOptions?: TaskGroupId.RequestOptions): core.HttpResponsePromise<string>;
57
+ private __forCourierDriverV1;
45
58
  protected _getAuthorizationHeader(): Promise<string | undefined>;
46
59
  }
@@ -45,36 +45,36 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
45
45
  });
46
46
  };
47
47
  Object.defineProperty(exports, "__esModule", { value: true });
48
- exports.Blurhash = void 0;
48
+ exports.TaskGroupId = void 0;
49
49
  const environments = __importStar(require("../../../../../../environments.js"));
50
50
  const core = __importStar(require("../../../../../../core/index.js"));
51
51
  const Chrt = __importStar(require("../../../../../index.js"));
52
52
  const headers_js_1 = require("../../../../../../core/headers.js");
53
53
  const errors = __importStar(require("../../../../../../errors/index.js"));
54
- class Blurhash {
54
+ class TaskGroupId {
55
55
  constructor(_options = {}) {
56
56
  this._options = _options;
57
57
  }
58
58
  /**
59
- * Retrieves the blurhash string for a task_artifact image for fast placeholder loading. | () -> (BlurHash)
59
+ * Retrieves the task group ID for the courier organization assigned to an order's task group. | authz_personas=[courier_org_operators] | () -> (PydanticObjectId)
60
60
  *
61
- * @param {string} taskArtifactS3ObjectMetadataId
62
- * @param {Blurhash.RequestOptions} requestOptions - Request-specific configuration.
61
+ * @param {string} orderIdOrShortId
62
+ * @param {TaskGroupId.RequestOptions} requestOptions - Request-specific configuration.
63
63
  *
64
64
  * @throws {@link Chrt.UnprocessableEntityError}
65
65
  *
66
66
  * @example
67
- * await client.taskArtifacts.blurhash.getByMetadataIdV1("task_artifact_s3_object_metadata_id")
67
+ * await client.taskGroups.taskGroupId.forCourierOperatorsV1("order_id_or_short_id")
68
68
  */
69
- getByMetadataIdV1(taskArtifactS3ObjectMetadataId, requestOptions) {
70
- return core.HttpResponsePromise.fromPromise(this.__getByMetadataIdV1(taskArtifactS3ObjectMetadataId, requestOptions));
69
+ forCourierOperatorsV1(orderIdOrShortId, requestOptions) {
70
+ return core.HttpResponsePromise.fromPromise(this.__forCourierOperatorsV1(orderIdOrShortId, requestOptions));
71
71
  }
72
- __getByMetadataIdV1(taskArtifactS3ObjectMetadataId, requestOptions) {
72
+ __forCourierOperatorsV1(orderIdOrShortId, requestOptions) {
73
73
  return __awaiter(this, void 0, void 0, function* () {
74
74
  var _a, _b, _c, _d;
75
75
  let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
76
76
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
77
- 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/blurhash/v1/${encodeURIComponent(taskArtifactS3ObjectMetadataId)}`),
77
+ 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_groups/task_group_id/for_courier_operators/v1/${encodeURIComponent(orderIdOrShortId)}`),
78
78
  method: "GET",
79
79
  headers: _headers,
80
80
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -105,7 +105,66 @@ class Blurhash {
105
105
  rawResponse: _response.rawResponse,
106
106
  });
107
107
  case "timeout":
108
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/task_artifacts/blurhash/v1/{task_artifact_s3_object_metadata_id}.");
108
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/task_groups/task_group_id/for_courier_operators/v1/{order_id_or_short_id}.");
109
+ case "unknown":
110
+ throw new errors.ChrtError({
111
+ message: _response.error.errorMessage,
112
+ rawResponse: _response.rawResponse,
113
+ });
114
+ }
115
+ });
116
+ }
117
+ /**
118
+ * Retrieves the task group ID for the courier driver assigned to an order's task group. | authz_personas=[courier_driver] | () -> (PydanticObjectId)
119
+ *
120
+ * @param {string} orderIdOrShortId
121
+ * @param {TaskGroupId.RequestOptions} requestOptions - Request-specific configuration.
122
+ *
123
+ * @throws {@link Chrt.UnprocessableEntityError}
124
+ *
125
+ * @example
126
+ * await client.taskGroups.taskGroupId.forCourierDriverV1("order_id_or_short_id")
127
+ */
128
+ forCourierDriverV1(orderIdOrShortId, requestOptions) {
129
+ return core.HttpResponsePromise.fromPromise(this.__forCourierDriverV1(orderIdOrShortId, requestOptions));
130
+ }
131
+ __forCourierDriverV1(orderIdOrShortId, requestOptions) {
132
+ return __awaiter(this, void 0, void 0, function* () {
133
+ var _a, _b, _c, _d;
134
+ let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
135
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
136
+ 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_groups/task_group_id/for_courier_driver/v1/${encodeURIComponent(orderIdOrShortId)}`),
137
+ method: "GET",
138
+ headers: _headers,
139
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
140
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
141
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
142
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
143
+ });
144
+ if (_response.ok) {
145
+ return { data: _response.body, rawResponse: _response.rawResponse };
146
+ }
147
+ if (_response.error.reason === "status-code") {
148
+ switch (_response.error.statusCode) {
149
+ case 422:
150
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
151
+ default:
152
+ throw new errors.ChrtError({
153
+ statusCode: _response.error.statusCode,
154
+ body: _response.error.body,
155
+ rawResponse: _response.rawResponse,
156
+ });
157
+ }
158
+ }
159
+ switch (_response.error.reason) {
160
+ case "non-json":
161
+ throw new errors.ChrtError({
162
+ statusCode: _response.error.statusCode,
163
+ body: _response.error.rawBody,
164
+ rawResponse: _response.rawResponse,
165
+ });
166
+ case "timeout":
167
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/task_groups/task_group_id/for_courier_driver/v1/{order_id_or_short_id}.");
109
168
  case "unknown":
110
169
  throw new errors.ChrtError({
111
170
  message: _response.error.errorMessage,
@@ -124,4 +183,4 @@ class Blurhash {
124
183
  });
125
184
  }
126
185
  }
127
- exports.Blurhash = Blurhash;
186
+ exports.TaskGroupId = TaskGroupId;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from "./client/index.js";