@chrt-inc/typescript-sdk 1.318.0 → 1.320.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 (259) hide show
  1. package/dist/cjs/Client.d.ts +6 -3
  2. package/dist/cjs/Client.js +12 -7
  3. package/dist/cjs/api/resources/cargos/client/Client.d.ts +48 -0
  4. package/dist/cjs/api/resources/cargos/client/Client.js +131 -0
  5. package/dist/cjs/api/resources/cargos/index.d.ts +1 -0
  6. package/dist/cjs/{exports.js → api/resources/cargos/index.js} +1 -1
  7. package/dist/cjs/api/resources/connections/client/Client.d.ts +4 -4
  8. package/dist/cjs/api/resources/connections/client/Client.js +4 -4
  9. package/dist/cjs/api/resources/courierPayDriverPayouts/client/Client.d.ts +2 -2
  10. package/dist/cjs/api/resources/courierPayDriverPayouts/client/Client.js +2 -2
  11. package/dist/cjs/api/resources/courierPayDriverRateSheets/client/Client.d.ts +3 -3
  12. package/dist/cjs/api/resources/courierPayDriverRateSheets/client/Client.js +3 -3
  13. package/dist/cjs/api/resources/courierPayDriverStatements/client/Client.d.ts +2 -2
  14. package/dist/cjs/api/resources/courierPayDriverStatements/client/Client.js +2 -2
  15. package/dist/cjs/api/resources/dev/client/Client.d.ts +4 -4
  16. package/dist/cjs/api/resources/dev/client/Client.js +4 -4
  17. package/dist/cjs/api/resources/drivers/client/Client.d.ts +2 -2
  18. package/dist/cjs/api/resources/drivers/client/Client.js +2 -2
  19. package/dist/cjs/api/resources/index.d.ts +3 -3
  20. package/dist/cjs/api/resources/index.js +4 -4
  21. package/dist/cjs/api/resources/notifications/resources/courier/client/Client.d.ts +2 -2
  22. package/dist/cjs/api/resources/notifications/resources/courier/client/Client.js +2 -2
  23. package/dist/cjs/api/resources/notifications/resources/shipper/client/Client.d.ts +2 -2
  24. package/dist/cjs/api/resources/notifications/resources/shipper/client/Client.js +2 -2
  25. package/dist/cjs/api/resources/offChrtShipperOrg/client/Client.d.ts +3 -3
  26. package/dist/cjs/api/resources/offChrtShipperOrg/client/Client.js +3 -3
  27. package/dist/cjs/api/resources/orderDrafts/client/Client.d.ts +7 -17
  28. package/dist/cjs/api/resources/orderDrafts/client/Client.js +11 -68
  29. package/dist/cjs/api/resources/orderDrafts/client/requests/index.d.ts +0 -2
  30. package/dist/cjs/api/resources/orderDrafts/index.d.ts +1 -1
  31. package/dist/cjs/api/resources/orderDrafts/index.js +1 -1
  32. package/dist/cjs/api/resources/orderDrafts/resources/expanded/client/Client.d.ts +55 -0
  33. package/dist/cjs/api/resources/orderDrafts/resources/expanded/client/Client.js +158 -0
  34. package/dist/cjs/api/resources/orderDrafts/resources/expanded/client/index.d.ts +2 -0
  35. package/dist/cjs/{core/exports.js → api/resources/orderDrafts/resources/expanded/client/index.js} +1 -1
  36. package/dist/cjs/api/resources/orderDrafts/resources/expanded/client/requests/ExpandedListV1Request.d.ts +25 -0
  37. package/dist/cjs/api/resources/orderDrafts/resources/expanded/client/requests/index.d.ts +1 -0
  38. package/dist/cjs/api/resources/orderDrafts/resources/expanded/index.d.ts +2 -0
  39. package/dist/cjs/{core/form-data-utils → api/resources/orderDrafts/resources/expanded}/index.js +2 -4
  40. package/dist/cjs/api/resources/orderDrafts/resources/expanded/types/ExpandedListV1RequestSortOrder.d.ts +8 -0
  41. package/dist/cjs/api/resources/orderDrafts/resources/expanded/types/ExpandedListV1RequestSortOrder.js +10 -0
  42. package/dist/cjs/api/resources/orderDrafts/resources/expanded/types/index.d.ts +1 -0
  43. package/dist/cjs/{core/file → api/resources/orderDrafts/resources/expanded/types}/index.js +1 -2
  44. package/dist/cjs/api/resources/orderDrafts/resources/index.d.ts +3 -0
  45. package/dist/cjs/api/resources/orderDrafts/resources/index.js +4 -1
  46. package/dist/cjs/api/resources/orgInfoForConnections/resources/courier/client/Client.d.ts +1 -1
  47. package/dist/cjs/api/resources/orgInfoForConnections/resources/courier/client/Client.js +1 -1
  48. package/dist/cjs/api/resources/orgInfoForConnections/resources/forwarder/client/Client.d.ts +1 -1
  49. package/dist/cjs/api/resources/orgInfoForConnections/resources/forwarder/client/Client.js +1 -1
  50. package/dist/cjs/api/resources/orgInfoForConnections/resources/shipper/client/Client.d.ts +1 -1
  51. package/dist/cjs/api/resources/orgInfoForConnections/resources/shipper/client/Client.js +1 -1
  52. package/dist/cjs/api/resources/orgProfiles/client/Client.d.ts +1 -1
  53. package/dist/cjs/api/resources/orgProfiles/client/Client.js +1 -1
  54. package/dist/cjs/api/resources/orgs/client/Client.d.ts +5 -5
  55. package/dist/cjs/api/resources/orgs/client/Client.js +5 -5
  56. package/dist/cjs/api/resources/shipperContactInfo/client/Client.d.ts +36 -23
  57. package/dist/cjs/api/resources/shipperContactInfo/client/Client.js +94 -35
  58. package/dist/cjs/api/resources/shipperPayCourierLineItemGroups/client/Client.d.ts +2 -2
  59. package/dist/cjs/api/resources/shipperPayCourierLineItemGroups/client/Client.js +2 -2
  60. package/dist/cjs/api/resources/shipperPayCourierLineItemGroups/resources/courier/client/Client.d.ts +1 -1
  61. package/dist/cjs/api/resources/shipperPayCourierLineItemGroups/resources/courier/client/Client.js +1 -1
  62. package/dist/cjs/api/resources/shipperPayCourierLineItemGroups/resources/shipper/client/Client.d.ts +3 -3
  63. package/dist/cjs/api/resources/shipperPayCourierLineItemGroups/resources/shipper/client/Client.js +3 -3
  64. package/dist/cjs/api/resources/taskArtifactNotifications/client/Client.d.ts +2 -2
  65. package/dist/cjs/api/resources/taskArtifactNotifications/client/Client.js +2 -2
  66. package/dist/cjs/api/resources/taskArtifacts/client/Client.d.ts +0 -60
  67. package/dist/cjs/api/resources/taskArtifacts/client/Client.js +0 -246
  68. package/dist/cjs/api/resources/taskArtifacts/client/index.d.ts +0 -1
  69. package/dist/cjs/api/resources/taskArtifacts/client/index.js +0 -15
  70. package/dist/cjs/api/resources/taskArtifacts/resources/images/client/Client.d.ts +0 -31
  71. package/dist/cjs/api/resources/taskArtifacts/resources/images/client/Client.js +0 -128
  72. package/dist/cjs/api/resources/taskArtifacts/resources/images/client/index.d.ts +0 -1
  73. package/dist/cjs/api/resources/taskArtifacts/resources/images/client/index.js +0 -15
  74. package/dist/cjs/api/resources/taskArtifacts/resources/index.d.ts +0 -1
  75. package/dist/cjs/api/resources/taskArtifacts/resources/index.js +0 -4
  76. package/dist/cjs/api/resources/tracking/resources/devices/client/Client.d.ts +3 -3
  77. package/dist/cjs/api/resources/tracking/resources/devices/client/Client.js +3 -3
  78. package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/Client.d.ts +3 -3
  79. package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/Client.js +3 -3
  80. package/dist/cjs/api/resources/users/client/Client.d.ts +1 -1
  81. package/dist/cjs/api/resources/users/client/Client.js +1 -1
  82. package/dist/cjs/api/types/ChrtGroundCourierTaskActionEnum1.d.ts +2 -2
  83. package/dist/cjs/api/types/ChrtGroundCourierTaskActionEnum1.js +1 -1
  84. package/dist/cjs/api/types/{OrderDraftExpandedRes.d.ts → OrderDraftExpanded.d.ts} +5 -6
  85. package/dist/cjs/api/types/OrderDraftExpandedListRes.d.ts +1 -4
  86. package/dist/{esm/api/resources/taskArtifacts/client/requests/TaskArtifactUpdateCommentsReq.mjs → cjs/api/types/OrderDraftSortByEnum.d.ts} +1 -1
  87. package/dist/cjs/api/types/index.d.ts +2 -3
  88. package/dist/cjs/api/types/index.js +2 -3
  89. package/dist/cjs/core/index.d.ts +0 -2
  90. package/dist/cjs/core/index.js +1 -3
  91. package/dist/cjs/index.d.ts +0 -1
  92. package/dist/cjs/index.js +0 -4
  93. package/dist/cjs/version.d.ts +1 -1
  94. package/dist/cjs/version.js +1 -1
  95. package/dist/esm/Client.d.mts +6 -3
  96. package/dist/esm/Client.mjs +10 -5
  97. package/dist/esm/api/resources/cargos/client/Client.d.mts +48 -0
  98. package/dist/esm/api/resources/cargos/client/Client.mjs +94 -0
  99. package/dist/esm/api/resources/cargos/index.d.mts +1 -0
  100. package/dist/esm/api/resources/cargos/index.mjs +1 -0
  101. package/dist/esm/api/resources/connections/client/Client.d.mts +4 -4
  102. package/dist/esm/api/resources/connections/client/Client.mjs +4 -4
  103. package/dist/esm/api/resources/courierPayDriverPayouts/client/Client.d.mts +2 -2
  104. package/dist/esm/api/resources/courierPayDriverPayouts/client/Client.mjs +2 -2
  105. package/dist/esm/api/resources/courierPayDriverRateSheets/client/Client.d.mts +3 -3
  106. package/dist/esm/api/resources/courierPayDriverRateSheets/client/Client.mjs +3 -3
  107. package/dist/esm/api/resources/courierPayDriverStatements/client/Client.d.mts +2 -2
  108. package/dist/esm/api/resources/courierPayDriverStatements/client/Client.mjs +2 -2
  109. package/dist/esm/api/resources/dev/client/Client.d.mts +4 -4
  110. package/dist/esm/api/resources/dev/client/Client.mjs +4 -4
  111. package/dist/esm/api/resources/drivers/client/Client.d.mts +2 -2
  112. package/dist/esm/api/resources/drivers/client/Client.mjs +2 -2
  113. package/dist/esm/api/resources/index.d.mts +3 -3
  114. package/dist/esm/api/resources/index.mjs +3 -3
  115. package/dist/esm/api/resources/notifications/resources/courier/client/Client.d.mts +2 -2
  116. package/dist/esm/api/resources/notifications/resources/courier/client/Client.mjs +2 -2
  117. package/dist/esm/api/resources/notifications/resources/shipper/client/Client.d.mts +2 -2
  118. package/dist/esm/api/resources/notifications/resources/shipper/client/Client.mjs +2 -2
  119. package/dist/esm/api/resources/offChrtShipperOrg/client/Client.d.mts +3 -3
  120. package/dist/esm/api/resources/offChrtShipperOrg/client/Client.mjs +3 -3
  121. package/dist/esm/api/resources/orderDrafts/client/Client.d.mts +7 -17
  122. package/dist/esm/api/resources/orderDrafts/client/Client.mjs +11 -68
  123. package/dist/esm/api/resources/orderDrafts/client/requests/index.d.mts +0 -2
  124. package/dist/esm/api/resources/orderDrafts/index.d.mts +1 -1
  125. package/dist/esm/api/resources/orderDrafts/index.mjs +1 -1
  126. package/dist/esm/api/resources/orderDrafts/resources/expanded/client/Client.d.mts +55 -0
  127. package/dist/esm/api/resources/orderDrafts/resources/expanded/client/Client.mjs +121 -0
  128. package/dist/esm/api/resources/orderDrafts/resources/expanded/client/index.d.mts +2 -0
  129. package/dist/esm/api/resources/orderDrafts/resources/expanded/client/index.mjs +1 -0
  130. package/dist/esm/api/resources/orderDrafts/resources/expanded/client/requests/ExpandedListV1Request.d.mts +25 -0
  131. package/dist/esm/api/resources/orderDrafts/resources/expanded/client/requests/index.d.mts +1 -0
  132. package/dist/esm/api/resources/orderDrafts/resources/expanded/index.d.mts +2 -0
  133. package/dist/esm/api/resources/orderDrafts/resources/expanded/index.mjs +2 -0
  134. package/dist/esm/api/resources/orderDrafts/resources/expanded/types/ExpandedListV1RequestSortOrder.d.mts +8 -0
  135. package/dist/esm/api/resources/orderDrafts/resources/expanded/types/ExpandedListV1RequestSortOrder.mjs +7 -0
  136. package/dist/esm/api/resources/orderDrafts/resources/expanded/types/index.d.mts +1 -0
  137. package/dist/esm/api/resources/orderDrafts/resources/expanded/types/index.mjs +1 -0
  138. package/dist/esm/api/resources/orderDrafts/resources/index.d.mts +3 -0
  139. package/dist/esm/api/resources/orderDrafts/resources/index.mjs +3 -0
  140. package/dist/esm/api/resources/orgInfoForConnections/resources/courier/client/Client.d.mts +1 -1
  141. package/dist/esm/api/resources/orgInfoForConnections/resources/courier/client/Client.mjs +1 -1
  142. package/dist/esm/api/resources/orgInfoForConnections/resources/forwarder/client/Client.d.mts +1 -1
  143. package/dist/esm/api/resources/orgInfoForConnections/resources/forwarder/client/Client.mjs +1 -1
  144. package/dist/esm/api/resources/orgInfoForConnections/resources/shipper/client/Client.d.mts +1 -1
  145. package/dist/esm/api/resources/orgInfoForConnections/resources/shipper/client/Client.mjs +1 -1
  146. package/dist/esm/api/resources/orgProfiles/client/Client.d.mts +1 -1
  147. package/dist/esm/api/resources/orgProfiles/client/Client.mjs +1 -1
  148. package/dist/esm/api/resources/orgs/client/Client.d.mts +5 -5
  149. package/dist/esm/api/resources/orgs/client/Client.mjs +5 -5
  150. package/dist/esm/api/resources/shipperContactInfo/client/Client.d.mts +36 -23
  151. package/dist/esm/api/resources/shipperContactInfo/client/Client.mjs +94 -35
  152. package/dist/esm/api/resources/shipperPayCourierLineItemGroups/client/Client.d.mts +2 -2
  153. package/dist/esm/api/resources/shipperPayCourierLineItemGroups/client/Client.mjs +2 -2
  154. package/dist/esm/api/resources/shipperPayCourierLineItemGroups/resources/courier/client/Client.d.mts +1 -1
  155. package/dist/esm/api/resources/shipperPayCourierLineItemGroups/resources/courier/client/Client.mjs +1 -1
  156. package/dist/esm/api/resources/shipperPayCourierLineItemGroups/resources/shipper/client/Client.d.mts +3 -3
  157. package/dist/esm/api/resources/shipperPayCourierLineItemGroups/resources/shipper/client/Client.mjs +3 -3
  158. package/dist/esm/api/resources/taskArtifactNotifications/client/Client.d.mts +2 -2
  159. package/dist/esm/api/resources/taskArtifactNotifications/client/Client.mjs +2 -2
  160. package/dist/esm/api/resources/taskArtifacts/client/Client.d.mts +0 -60
  161. package/dist/esm/api/resources/taskArtifacts/client/Client.mjs +0 -213
  162. package/dist/esm/api/resources/taskArtifacts/client/index.d.mts +0 -1
  163. package/dist/esm/api/resources/taskArtifacts/client/index.mjs +1 -1
  164. package/dist/esm/api/resources/taskArtifacts/resources/images/client/Client.d.mts +0 -31
  165. package/dist/esm/api/resources/taskArtifacts/resources/images/client/Client.mjs +0 -128
  166. package/dist/esm/api/resources/taskArtifacts/resources/images/client/index.d.mts +0 -1
  167. package/dist/esm/api/resources/taskArtifacts/resources/images/client/index.mjs +1 -1
  168. package/dist/esm/api/resources/taskArtifacts/resources/index.d.mts +0 -1
  169. package/dist/esm/api/resources/taskArtifacts/resources/index.mjs +0 -1
  170. package/dist/esm/api/resources/tracking/resources/devices/client/Client.d.mts +3 -3
  171. package/dist/esm/api/resources/tracking/resources/devices/client/Client.mjs +3 -3
  172. package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/Client.d.mts +3 -3
  173. package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/Client.mjs +3 -3
  174. package/dist/esm/api/resources/users/client/Client.d.mts +1 -1
  175. package/dist/esm/api/resources/users/client/Client.mjs +1 -1
  176. package/dist/esm/api/types/ChrtGroundCourierTaskActionEnum1.d.mts +2 -2
  177. package/dist/esm/api/types/ChrtGroundCourierTaskActionEnum1.mjs +1 -1
  178. package/dist/esm/api/types/{OrderDraftExpandedRes.d.mts → OrderDraftExpanded.d.mts} +5 -6
  179. package/dist/esm/api/types/OrderDraftExpandedListRes.d.mts +1 -4
  180. package/dist/esm/api/types/OrderDraftSortByEnum.d.mts +4 -0
  181. package/dist/esm/api/types/index.d.mts +2 -3
  182. package/dist/esm/api/types/index.mjs +2 -3
  183. package/dist/esm/core/index.d.mts +0 -2
  184. package/dist/esm/core/index.mjs +0 -2
  185. package/dist/esm/index.d.mts +0 -1
  186. package/dist/esm/index.mjs +0 -1
  187. package/dist/esm/version.d.mts +1 -1
  188. package/dist/esm/version.mjs +1 -1
  189. package/package.json +1 -1
  190. package/reference.md +208 -396
  191. package/dist/cjs/api/resources/orderDrafts/client/requests/OrderDraftExpandedListReq.d.ts +0 -21
  192. package/dist/cjs/api/resources/orderDrafts/client/requests/OrderDraftExpandedReq.d.ts +0 -21
  193. package/dist/cjs/api/resources/taskArtifacts/client/requests/TaskArtifactAddToTaskReq.d.ts +0 -19
  194. package/dist/cjs/api/resources/taskArtifacts/client/requests/TaskArtifactUpdateCommentsReq.d.ts +0 -14
  195. package/dist/cjs/api/resources/taskArtifacts/client/requests/TaskArtifactUpdateCommentsReq.js +0 -5
  196. package/dist/cjs/api/resources/taskArtifacts/client/requests/index.d.ts +0 -2
  197. package/dist/cjs/api/resources/taskArtifacts/resources/images/client/requests/BodyPostTaskArtifactsUploadImageV1OortTaskArtifactsImagesUploadV1TaskArtifactIdPost.d.ts +0 -13
  198. package/dist/cjs/api/resources/taskArtifacts/resources/images/client/requests/BodyPostTaskArtifactsUploadImageV1OortTaskArtifactsImagesUploadV1TaskArtifactIdPost.js +0 -5
  199. package/dist/cjs/api/resources/taskArtifacts/resources/images/client/requests/index.d.ts +0 -1
  200. package/dist/cjs/api/types/OrderDraftExpandedRes.js +0 -5
  201. package/dist/cjs/api/types/TaskDraftExpanded.d.ts +0 -10
  202. package/dist/cjs/api/types/TaskDraftExpanded.js +0 -5
  203. package/dist/cjs/api/types/TaskGroupDraftExpanded.d.ts +0 -10
  204. package/dist/cjs/api/types/TaskGroupDraftExpanded.js +0 -5
  205. package/dist/cjs/core/exports.d.ts +0 -1
  206. package/dist/cjs/core/file/exports.d.ts +0 -1
  207. package/dist/cjs/core/file/exports.js +0 -2
  208. package/dist/cjs/core/file/file.d.ts +0 -5
  209. package/dist/cjs/core/file/file.js +0 -203
  210. package/dist/cjs/core/file/index.d.ts +0 -2
  211. package/dist/cjs/core/file/types.d.ts +0 -66
  212. package/dist/cjs/core/file/types.js +0 -2
  213. package/dist/cjs/core/form-data-utils/FormDataWrapper.d.ts +0 -16
  214. package/dist/cjs/core/form-data-utils/FormDataWrapper.js +0 -208
  215. package/dist/cjs/core/form-data-utils/encodeAsFormParameter.d.ts +0 -1
  216. package/dist/cjs/core/form-data-utils/encodeAsFormParameter.js +0 -12
  217. package/dist/cjs/core/form-data-utils/index.d.ts +0 -2
  218. package/dist/cjs/exports.d.ts +0 -1
  219. package/dist/esm/api/resources/orderDrafts/client/requests/OrderDraftExpandedListReq.d.mts +0 -21
  220. package/dist/esm/api/resources/orderDrafts/client/requests/OrderDraftExpandedReq.d.mts +0 -21
  221. package/dist/esm/api/resources/taskArtifacts/client/requests/TaskArtifactAddToTaskReq.d.mts +0 -19
  222. package/dist/esm/api/resources/taskArtifacts/client/requests/TaskArtifactUpdateCommentsReq.d.mts +0 -14
  223. package/dist/esm/api/resources/taskArtifacts/client/requests/index.d.mts +0 -2
  224. package/dist/esm/api/resources/taskArtifacts/resources/images/client/requests/BodyPostTaskArtifactsUploadImageV1OortTaskArtifactsImagesUploadV1TaskArtifactIdPost.d.mts +0 -13
  225. package/dist/esm/api/resources/taskArtifacts/resources/images/client/requests/BodyPostTaskArtifactsUploadImageV1OortTaskArtifactsImagesUploadV1TaskArtifactIdPost.mjs +0 -4
  226. package/dist/esm/api/resources/taskArtifacts/resources/images/client/requests/index.d.mts +0 -1
  227. package/dist/esm/api/types/OrderDraftExpandedRes.mjs +0 -4
  228. package/dist/esm/api/types/TaskDraftExpanded.d.mts +0 -10
  229. package/dist/esm/api/types/TaskDraftExpanded.mjs +0 -4
  230. package/dist/esm/api/types/TaskGroupDraftExpanded.d.mts +0 -10
  231. package/dist/esm/api/types/TaskGroupDraftExpanded.mjs +0 -4
  232. package/dist/esm/core/exports.d.mts +0 -1
  233. package/dist/esm/core/exports.mjs +0 -1
  234. package/dist/esm/core/file/exports.d.mts +0 -1
  235. package/dist/esm/core/file/file.d.mts +0 -5
  236. package/dist/esm/core/file/file.mjs +0 -167
  237. package/dist/esm/core/file/index.d.mts +0 -2
  238. package/dist/esm/core/file/index.mjs +0 -2
  239. package/dist/esm/core/file/types.d.mts +0 -66
  240. package/dist/esm/core/form-data-utils/FormDataWrapper.d.mts +0 -16
  241. package/dist/esm/core/form-data-utils/FormDataWrapper.mjs +0 -170
  242. package/dist/esm/core/form-data-utils/encodeAsFormParameter.d.mts +0 -1
  243. package/dist/esm/core/form-data-utils/encodeAsFormParameter.mjs +0 -9
  244. package/dist/esm/core/form-data-utils/index.d.mts +0 -2
  245. package/dist/esm/core/form-data-utils/index.mjs +0 -2
  246. package/dist/esm/exports.d.mts +0 -1
  247. package/dist/esm/exports.mjs +0 -1
  248. /package/dist/{esm/api/resources/taskArtifacts/client/requests/index.mjs → cjs/api/resources/cargos/client/index.d.ts} +0 -0
  249. /package/dist/cjs/api/resources/{taskArtifacts/client/requests → cargos/client}/index.js +0 -0
  250. /package/dist/cjs/api/resources/orderDrafts/{client/requests/OrderDraftExpandedListReq.js → resources/expanded/client/requests/ExpandedListV1Request.js} +0 -0
  251. /package/dist/cjs/api/resources/{taskArtifacts/resources/images → orderDrafts/resources/expanded}/client/requests/index.js +0 -0
  252. /package/dist/cjs/api/{resources/orderDrafts/client/requests/OrderDraftExpandedReq.js → types/OrderDraftExpanded.js} +0 -0
  253. /package/dist/cjs/api/{resources/taskArtifacts/client/requests/TaskArtifactAddToTaskReq.js → types/OrderDraftSortByEnum.js} +0 -0
  254. /package/dist/esm/api/resources/{taskArtifacts/resources/images/client/requests/index.mjs → cargos/client/index.d.mts} +0 -0
  255. /package/dist/esm/{core/file/exports.mjs → api/resources/cargos/client/index.mjs} +0 -0
  256. /package/dist/esm/api/resources/orderDrafts/{client/requests/OrderDraftExpandedListReq.mjs → resources/expanded/client/requests/ExpandedListV1Request.mjs} +0 -0
  257. /package/dist/esm/{core/file/types.mjs → api/resources/orderDrafts/resources/expanded/client/requests/index.mjs} +0 -0
  258. /package/dist/esm/api/{resources/orderDrafts/client/requests/OrderDraftExpandedReq.mjs → types/OrderDraftExpanded.mjs} +0 -0
  259. /package/dist/esm/api/{resources/taskArtifacts/client/requests/TaskArtifactAddToTaskReq.mjs → types/OrderDraftSortByEnum.mjs} +0 -0
@@ -36,9 +36,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.tracking = exports.orgInfoForConnections = exports.notifications = exports.utils = exports.users = exports.root = exports.orgs = exports.shipperContactInfo = exports.orderDrafts = exports.offChrtShipperOrg = exports.taskArtifacts = exports.drivers = exports.taskArtifactNotifications = exports.dev = exports.orgProfiles = exports.shipperPayCourierStatements = exports.shipperPayCourierRateSheets = exports.shipperPayCourierPayments = exports.shipperPayCourierLineItemGroups = exports.courierPayDriverStatements = exports.courierPayDriverRateSheets = exports.courierPayDriverPayouts = exports.courierPayDriverLineItemGroups = exports.payments = exports.taskGroups = exports.orders = exports.connections = void 0;
39
+ exports.tracking = exports.taskArtifacts = exports.orgInfoForConnections = exports.notifications = exports.utils = exports.users = exports.root = exports.orgs = exports.shipperContactInfo = exports.offChrtShipperOrg = exports.cargos = exports.drivers = exports.taskArtifactNotifications = exports.dev = exports.orgProfiles = exports.shipperPayCourierStatements = exports.shipperPayCourierRateSheets = exports.shipperPayCourierPayments = exports.shipperPayCourierLineItemGroups = exports.courierPayDriverStatements = exports.courierPayDriverRateSheets = exports.courierPayDriverPayouts = exports.courierPayDriverLineItemGroups = exports.payments = exports.taskGroups = exports.orders = exports.orderDrafts = exports.connections = void 0;
40
40
  exports.connections = __importStar(require("./connections/index.js"));
41
41
  __exportStar(require("./connections/types/index.js"), exports);
42
+ exports.orderDrafts = __importStar(require("./orderDrafts/index.js"));
42
43
  exports.orders = __importStar(require("./orders/index.js"));
43
44
  exports.taskGroups = __importStar(require("./taskGroups/index.js"));
44
45
  exports.payments = __importStar(require("./payments/index.js"));
@@ -54,9 +55,8 @@ exports.orgProfiles = __importStar(require("./orgProfiles/index.js"));
54
55
  exports.dev = __importStar(require("./dev/index.js"));
55
56
  exports.taskArtifactNotifications = __importStar(require("./taskArtifactNotifications/index.js"));
56
57
  exports.drivers = __importStar(require("./drivers/index.js"));
57
- exports.taskArtifacts = __importStar(require("./taskArtifacts/index.js"));
58
+ exports.cargos = __importStar(require("./cargos/index.js"));
58
59
  exports.offChrtShipperOrg = __importStar(require("./offChrtShipperOrg/index.js"));
59
- exports.orderDrafts = __importStar(require("./orderDrafts/index.js"));
60
60
  exports.shipperContactInfo = __importStar(require("./shipperContactInfo/index.js"));
61
61
  exports.orgs = __importStar(require("./orgs/index.js"));
62
62
  exports.root = __importStar(require("./root/index.js"));
@@ -64,6 +64,7 @@ exports.users = __importStar(require("./users/index.js"));
64
64
  exports.utils = __importStar(require("./utils/index.js"));
65
65
  exports.notifications = __importStar(require("./notifications/index.js"));
66
66
  exports.orgInfoForConnections = __importStar(require("./orgInfoForConnections/index.js"));
67
+ exports.taskArtifacts = __importStar(require("./taskArtifacts/index.js"));
67
68
  exports.tracking = __importStar(require("./tracking/index.js"));
68
69
  __exportStar(require("./payments/client/requests/index.js"), exports);
69
70
  __exportStar(require("./courierPayDriverRateSheets/client/requests/index.js"), exports);
@@ -74,7 +75,6 @@ __exportStar(require("./orgProfiles/client/requests/index.js"), exports);
74
75
  __exportStar(require("./dev/client/requests/index.js"), exports);
75
76
  __exportStar(require("./taskArtifactNotifications/client/requests/index.js"), exports);
76
77
  __exportStar(require("./drivers/client/requests/index.js"), exports);
77
- __exportStar(require("./taskArtifacts/client/requests/index.js"), exports);
78
78
  __exportStar(require("./offChrtShipperOrg/client/requests/index.js"), exports);
79
79
  __exportStar(require("./orderDrafts/client/requests/index.js"), exports);
80
80
  __exportStar(require("./taskGroups/client/requests/index.js"), exports);
@@ -31,7 +31,7 @@ export declare class Courier {
31
31
  protected readonly _options: Courier.Options;
32
32
  constructor(_options?: Courier.Options);
33
33
  /**
34
- * Retrieves notification preferences for the authenticated courier organization. | () -> (CourierNotificationPreferences1)
34
+ * Retrieves notification preferences for the caller's courier organization. | () -> (CourierNotificationPreferences1)
35
35
  *
36
36
  * @param {Courier.RequestOptions} requestOptions - Request-specific configuration.
37
37
  *
@@ -41,7 +41,7 @@ export declare class Courier {
41
41
  getPreferencesV1(requestOptions?: Courier.RequestOptions): core.HttpResponsePromise<Chrt.CourierNotificationPreferences1>;
42
42
  private __getPreferencesV1;
43
43
  /**
44
- * Creates or updates notification preferences for the authenticated courier organization. | (CourierNotificationPreferencesClientCreate1) -> (PydanticObjectId)
44
+ * Creates or updates notification preferences for the caller's courier organization. | (CourierNotificationPreferencesClientCreate1) -> (PydanticObjectId)
45
45
  *
46
46
  * @param {Chrt.notifications.CourierNotificationPreferencesClientCreate1} request
47
47
  * @param {Courier.RequestOptions} requestOptions - Request-specific configuration.
@@ -56,7 +56,7 @@ class Courier {
56
56
  this._options = _options;
57
57
  }
58
58
  /**
59
- * Retrieves notification preferences for the authenticated courier organization. | () -> (CourierNotificationPreferences1)
59
+ * Retrieves notification preferences for the caller's courier organization. | () -> (CourierNotificationPreferences1)
60
60
  *
61
61
  * @param {Courier.RequestOptions} requestOptions - Request-specific configuration.
62
62
  *
@@ -107,7 +107,7 @@ class Courier {
107
107
  });
108
108
  }
109
109
  /**
110
- * Creates or updates notification preferences for the authenticated courier organization. | (CourierNotificationPreferencesClientCreate1) -> (PydanticObjectId)
110
+ * Creates or updates notification preferences for the caller's courier organization. | (CourierNotificationPreferencesClientCreate1) -> (PydanticObjectId)
111
111
  *
112
112
  * @param {Chrt.notifications.CourierNotificationPreferencesClientCreate1} request
113
113
  * @param {Courier.RequestOptions} requestOptions - Request-specific configuration.
@@ -31,7 +31,7 @@ export declare class Shipper {
31
31
  protected readonly _options: Shipper.Options;
32
32
  constructor(_options?: Shipper.Options);
33
33
  /**
34
- * Retrieves notification preferences for the authenticated shipper organization. | () -> (ShipperNotificationPreferences1)
34
+ * Retrieves notification preferences for the caller's shipper organization. | () -> (ShipperNotificationPreferences1)
35
35
  *
36
36
  * @param {Shipper.RequestOptions} requestOptions - Request-specific configuration.
37
37
  *
@@ -41,7 +41,7 @@ export declare class Shipper {
41
41
  getPreferencesV1(requestOptions?: Shipper.RequestOptions): core.HttpResponsePromise<Chrt.ShipperNotificationPreferences1>;
42
42
  private __getPreferencesV1;
43
43
  /**
44
- * Creates or updates notification preferences for the authenticated shipper organization. | (ShipperNotificationPreferencesClientCreate1) -> (PydanticObjectId)
44
+ * Creates or updates notification preferences for the caller's shipper organization. | (ShipperNotificationPreferencesClientCreate1) -> (PydanticObjectId)
45
45
  *
46
46
  * @param {Chrt.notifications.ShipperNotificationPreferencesClientCreate1} request
47
47
  * @param {Shipper.RequestOptions} requestOptions - Request-specific configuration.
@@ -56,7 +56,7 @@ class Shipper {
56
56
  this._options = _options;
57
57
  }
58
58
  /**
59
- * Retrieves notification preferences for the authenticated shipper organization. | () -> (ShipperNotificationPreferences1)
59
+ * Retrieves notification preferences for the caller's shipper organization. | () -> (ShipperNotificationPreferences1)
60
60
  *
61
61
  * @param {Shipper.RequestOptions} requestOptions - Request-specific configuration.
62
62
  *
@@ -107,7 +107,7 @@ class Shipper {
107
107
  });
108
108
  }
109
109
  /**
110
- * Creates or updates notification preferences for the authenticated shipper organization. | (ShipperNotificationPreferencesClientCreate1) -> (PydanticObjectId)
110
+ * Creates or updates notification preferences for the caller's shipper organization. | (ShipperNotificationPreferencesClientCreate1) -> (PydanticObjectId)
111
111
  *
112
112
  * @param {Chrt.notifications.ShipperNotificationPreferencesClientCreate1} request
113
113
  * @param {Shipper.RequestOptions} requestOptions - Request-specific configuration.
@@ -47,7 +47,7 @@ export declare class OffChrtShipperOrg {
47
47
  createV1(request: Chrt.OffChrtShipperOrgClientCreate1, requestOptions?: OffChrtShipperOrg.RequestOptions): core.HttpResponsePromise<string>;
48
48
  private __createV1;
49
49
  /**
50
- * Lists all off-platform shipper organizations created by the authenticated organization. | () -> (list[OffChrtShipperOrg1])
50
+ * Lists all off-platform shipper organizations created by the caller's organization. | () -> (list[OffChrtShipperOrg1])
51
51
  *
52
52
  * @param {OffChrtShipperOrg.RequestOptions} requestOptions - Request-specific configuration.
53
53
  *
@@ -70,7 +70,7 @@ export declare class OffChrtShipperOrg {
70
70
  getByIdV1(id: string, requestOptions?: OffChrtShipperOrg.RequestOptions): core.HttpResponsePromise<Chrt.OffChrtShipperOrg1>;
71
71
  private __getByIdV1;
72
72
  /**
73
- * Deletes off-platform shipper organization owned by the authenticated organization. | () -> (bool)
73
+ * Deletes off-platform shipper organization owned by the caller's organization. | () -> (bool)
74
74
  *
75
75
  * @param {string} id
76
76
  * @param {OffChrtShipperOrg.RequestOptions} requestOptions - Request-specific configuration.
@@ -83,7 +83,7 @@ export declare class OffChrtShipperOrg {
83
83
  deleteByIdV1(id: string, requestOptions?: OffChrtShipperOrg.RequestOptions): core.HttpResponsePromise<boolean>;
84
84
  private __deleteByIdV1;
85
85
  /**
86
- * Updates existing off-platform shipper organization owned by the authenticated organization. | (OffChrtShipperOrgClientUpdate1) -> (bool)
86
+ * Updates existing off-platform shipper organization owned by the caller's organization. | (OffChrtShipperOrgClientUpdate1) -> (bool)
87
87
  *
88
88
  * @param {string} id
89
89
  * @param {Chrt.OffChrtShipperOrgClientUpdate1} request
@@ -121,7 +121,7 @@ class OffChrtShipperOrg {
121
121
  });
122
122
  }
123
123
  /**
124
- * Lists all off-platform shipper organizations created by the authenticated organization. | () -> (list[OffChrtShipperOrg1])
124
+ * Lists all off-platform shipper organizations created by the caller's organization. | () -> (list[OffChrtShipperOrg1])
125
125
  *
126
126
  * @param {OffChrtShipperOrg.RequestOptions} requestOptions - Request-specific configuration.
127
127
  *
@@ -231,7 +231,7 @@ class OffChrtShipperOrg {
231
231
  });
232
232
  }
233
233
  /**
234
- * Deletes off-platform shipper organization owned by the authenticated organization. | () -> (bool)
234
+ * Deletes off-platform shipper organization owned by the caller's organization. | () -> (bool)
235
235
  *
236
236
  * @param {string} id
237
237
  * @param {OffChrtShipperOrg.RequestOptions} requestOptions - Request-specific configuration.
@@ -290,7 +290,7 @@ class OffChrtShipperOrg {
290
290
  });
291
291
  }
292
292
  /**
293
- * Updates existing off-platform shipper organization owned by the authenticated organization. | (OffChrtShipperOrgClientUpdate1) -> (bool)
293
+ * Updates existing off-platform shipper organization owned by the caller's organization. | (OffChrtShipperOrgClientUpdate1) -> (bool)
294
294
  *
295
295
  * @param {string} id
296
296
  * @param {Chrt.OffChrtShipperOrgClientUpdate1} request
@@ -8,6 +8,7 @@ import { TaskGroup } from "../resources/taskGroup/client/Client.js";
8
8
  import { Task } from "../resources/task/client/Client.js";
9
9
  import { TaskArtifact } from "../resources/taskArtifact/client/Client.js";
10
10
  import { Cargo } from "../resources/cargo/client/Client.js";
11
+ import { Expanded } from "../resources/expanded/client/Client.js";
11
12
  export declare namespace OrderDrafts {
12
13
  interface Options {
13
14
  environment?: core.Supplier<environments.ChrtEnvironment | string>;
@@ -37,11 +38,13 @@ export declare class OrderDrafts {
37
38
  protected _task: Task | undefined;
38
39
  protected _taskArtifact: TaskArtifact | undefined;
39
40
  protected _cargo: Cargo | undefined;
41
+ protected _expanded: Expanded | undefined;
40
42
  constructor(_options?: OrderDrafts.Options);
41
43
  get taskGroup(): TaskGroup;
42
44
  get task(): Task;
43
45
  get taskArtifact(): TaskArtifact;
44
46
  get cargo(): Cargo;
47
+ get expanded(): Expanded;
45
48
  /**
46
49
  * Creates a new draft order with org assignments based on caller's organization type. | (OrdersNewDraftReq) -> (OrdersNewDraftRes)
47
50
  *
@@ -84,32 +87,19 @@ export declare class OrderDrafts {
84
87
  deleteV1(orderId: string, requestOptions?: OrderDrafts.RequestOptions): core.HttpResponsePromise<boolean>;
85
88
  private __deleteV1;
86
89
  /**
87
- * Fetches a single draft order with optional expanded related data. Only the creator of the draft order can access it. | (OrderDraftExpandedReq) -> (OrderDraftExpandedRes)
90
+ * Fetches a single draft order with optional expanded related data. Only the creator of the draft order can access it. | (OrderAndTaskGroupExpandedReq) -> (OrderDraftExpanded)
88
91
  *
89
92
  * @param {string} orderIdOrShortId
90
- * @param {Chrt.OrderDraftExpandedReq} request
93
+ * @param {Chrt.OrderAndTaskGroupExpandedReq} request
91
94
  * @param {OrderDrafts.RequestOptions} requestOptions - Request-specific configuration.
92
95
  *
93
96
  * @throws {@link Chrt.UnprocessableEntityError}
94
97
  *
95
98
  * @example
96
- * await client.orderDrafts.expandedV1("order_id_or_short_id")
99
+ * await client.orderDrafts.expandedV1("order_id_or_short_id", {})
97
100
  */
98
- expandedV1(orderIdOrShortId: string, request?: Chrt.OrderDraftExpandedReq, requestOptions?: OrderDrafts.RequestOptions): core.HttpResponsePromise<Chrt.OrderDraftExpandedRes>;
101
+ expandedV1(orderIdOrShortId: string, request: Chrt.OrderAndTaskGroupExpandedReq, requestOptions?: OrderDrafts.RequestOptions): core.HttpResponsePromise<Chrt.OrderDraftExpanded>;
99
102
  private __expandedV1;
100
- /**
101
- * Lists all draft orders created by the authenticated user with optional expanded related data. | (OrderDraftExpandedListReq) -> (OrderDraftExpandedListRes)
102
- *
103
- * @param {Chrt.OrderDraftExpandedListReq} request
104
- * @param {OrderDrafts.RequestOptions} requestOptions - Request-specific configuration.
105
- *
106
- * @throws {@link Chrt.UnprocessableEntityError}
107
- *
108
- * @example
109
- * await client.orderDrafts.expandedListV1()
110
- */
111
- expandedListV1(request?: Chrt.OrderDraftExpandedListReq, requestOptions?: OrderDrafts.RequestOptions): core.HttpResponsePromise<Chrt.OrderDraftExpandedListRes>;
112
- private __expandedListV1;
113
103
  /**
114
104
  * Checks whether the draft order satisfies all requirements to move into staging. | () -> (bool)
115
105
  *
@@ -55,6 +55,7 @@ const Client_js_1 = require("../resources/taskGroup/client/Client.js");
55
55
  const Client_js_2 = require("../resources/task/client/Client.js");
56
56
  const Client_js_3 = require("../resources/taskArtifact/client/Client.js");
57
57
  const Client_js_4 = require("../resources/cargo/client/Client.js");
58
+ const Client_js_5 = require("../resources/expanded/client/Client.js");
58
59
  class OrderDrafts {
59
60
  constructor(_options = {}) {
60
61
  this._options = _options;
@@ -75,6 +76,10 @@ class OrderDrafts {
75
76
  var _a;
76
77
  return ((_a = this._cargo) !== null && _a !== void 0 ? _a : (this._cargo = new Client_js_4.Cargo(this._options)));
77
78
  }
79
+ get expanded() {
80
+ var _a;
81
+ return ((_a = this._expanded) !== null && _a !== void 0 ? _a : (this._expanded = new Client_js_5.Expanded(this._options)));
82
+ }
78
83
  /**
79
84
  * Creates a new draft order with org assignments based on caller's organization type. | (OrdersNewDraftReq) -> (OrdersNewDraftRes)
80
85
  *
@@ -261,22 +266,22 @@ class OrderDrafts {
261
266
  });
262
267
  }
263
268
  /**
264
- * Fetches a single draft order with optional expanded related data. Only the creator of the draft order can access it. | (OrderDraftExpandedReq) -> (OrderDraftExpandedRes)
269
+ * Fetches a single draft order with optional expanded related data. Only the creator of the draft order can access it. | (OrderAndTaskGroupExpandedReq) -> (OrderDraftExpanded)
265
270
  *
266
271
  * @param {string} orderIdOrShortId
267
- * @param {Chrt.OrderDraftExpandedReq} request
272
+ * @param {Chrt.OrderAndTaskGroupExpandedReq} request
268
273
  * @param {OrderDrafts.RequestOptions} requestOptions - Request-specific configuration.
269
274
  *
270
275
  * @throws {@link Chrt.UnprocessableEntityError}
271
276
  *
272
277
  * @example
273
- * await client.orderDrafts.expandedV1("order_id_or_short_id")
278
+ * await client.orderDrafts.expandedV1("order_id_or_short_id", {})
274
279
  */
275
- expandedV1(orderIdOrShortId, request = {}, requestOptions) {
280
+ expandedV1(orderIdOrShortId, request, requestOptions) {
276
281
  return core.HttpResponsePromise.fromPromise(this.__expandedV1(orderIdOrShortId, request, requestOptions));
277
282
  }
278
- __expandedV1(orderIdOrShortId_1) {
279
- return __awaiter(this, arguments, void 0, function* (orderIdOrShortId, request = {}, requestOptions) {
283
+ __expandedV1(orderIdOrShortId, request, requestOptions) {
284
+ return __awaiter(this, void 0, void 0, function* () {
280
285
  var _a, _b, _c, _d;
281
286
  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);
282
287
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
@@ -323,68 +328,6 @@ class OrderDrafts {
323
328
  }
324
329
  });
325
330
  }
326
- /**
327
- * Lists all draft orders created by the authenticated user with optional expanded related data. | (OrderDraftExpandedListReq) -> (OrderDraftExpandedListRes)
328
- *
329
- * @param {Chrt.OrderDraftExpandedListReq} request
330
- * @param {OrderDrafts.RequestOptions} requestOptions - Request-specific configuration.
331
- *
332
- * @throws {@link Chrt.UnprocessableEntityError}
333
- *
334
- * @example
335
- * await client.orderDrafts.expandedListV1()
336
- */
337
- expandedListV1(request = {}, requestOptions) {
338
- return core.HttpResponsePromise.fromPromise(this.__expandedListV1(request, requestOptions));
339
- }
340
- __expandedListV1() {
341
- return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
342
- var _a, _b, _c, _d;
343
- 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);
344
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
345
- 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/order_drafts/expanded/list/v1"),
346
- method: "POST",
347
- headers: _headers,
348
- contentType: "application/json",
349
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
350
- requestType: "json",
351
- body: request,
352
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
353
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
354
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
355
- });
356
- if (_response.ok) {
357
- return { data: _response.body, rawResponse: _response.rawResponse };
358
- }
359
- if (_response.error.reason === "status-code") {
360
- switch (_response.error.statusCode) {
361
- case 422:
362
- throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
363
- default:
364
- throw new errors.ChrtError({
365
- statusCode: _response.error.statusCode,
366
- body: _response.error.body,
367
- rawResponse: _response.rawResponse,
368
- });
369
- }
370
- }
371
- switch (_response.error.reason) {
372
- case "non-json":
373
- throw new errors.ChrtError({
374
- statusCode: _response.error.statusCode,
375
- body: _response.error.rawBody,
376
- rawResponse: _response.rawResponse,
377
- });
378
- case "timeout":
379
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/order_drafts/expanded/list/v1.");
380
- case "unknown":
381
- throw new errors.ChrtError({
382
- message: _response.error.errorMessage,
383
- rawResponse: _response.rawResponse,
384
- });
385
- }
386
- });
387
- }
388
331
  /**
389
332
  * Checks whether the draft order satisfies all requirements to move into staging. | () -> (bool)
390
333
  *
@@ -1,4 +1,2 @@
1
1
  export { type OrdersNewDraftReq } from "./OrdersNewDraftReq.js";
2
2
  export { type OrdersDraftUpdateReq } from "./OrdersDraftUpdateReq.js";
3
- export { type OrderDraftExpandedReq } from "./OrderDraftExpandedReq.js";
4
- export { type OrderDraftExpandedListReq } from "./OrderDraftExpandedListReq.js";
@@ -1,2 +1,2 @@
1
- export * from "./client/index.js";
2
1
  export * from "./resources/index.js";
2
+ export * from "./client/index.js";
@@ -14,5 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./client/index.js"), exports);
18
17
  __exportStar(require("./resources/index.js"), exports);
18
+ __exportStar(require("./client/index.js"), exports);
@@ -0,0 +1,55 @@
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 Expanded {
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 Expanded {
31
+ protected readonly _options: Expanded.Options;
32
+ constructor(_options?: Expanded.Options);
33
+ /**
34
+ * Lists expanded draft orders for the creator with filtering, sorting, and pagination. | (OrderAndTaskGroupExpandedReq) -> (OrderDraftExpandedListRes)
35
+ *
36
+ * @param {Chrt.orderDrafts.ExpandedListV1Request} request
37
+ * @param {Expanded.RequestOptions} requestOptions - Request-specific configuration.
38
+ *
39
+ * @throws {@link Chrt.UnprocessableEntityError}
40
+ *
41
+ * @example
42
+ * await client.orderDrafts.expanded.listV1({
43
+ * sort_by: "draft_started_at_timestamp",
44
+ * sort_order: "ascending",
45
+ * page: 1,
46
+ * page_size: 1,
47
+ * filter_draft_started_at_timestamp_lte: "2024-01-15T09:30:00Z",
48
+ * filter_draft_started_at_timestamp_gte: "2024-01-15T09:30:00Z",
49
+ * body: {}
50
+ * })
51
+ */
52
+ listV1(request: Chrt.orderDrafts.ExpandedListV1Request, requestOptions?: Expanded.RequestOptions): core.HttpResponsePromise<Chrt.OrderDraftExpandedListRes>;
53
+ private __listV1;
54
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
55
+ }
@@ -0,0 +1,158 @@
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.Expanded = 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 Expanded {
55
+ constructor(_options = {}) {
56
+ this._options = _options;
57
+ }
58
+ /**
59
+ * Lists expanded draft orders for the creator with filtering, sorting, and pagination. | (OrderAndTaskGroupExpandedReq) -> (OrderDraftExpandedListRes)
60
+ *
61
+ * @param {Chrt.orderDrafts.ExpandedListV1Request} request
62
+ * @param {Expanded.RequestOptions} requestOptions - Request-specific configuration.
63
+ *
64
+ * @throws {@link Chrt.UnprocessableEntityError}
65
+ *
66
+ * @example
67
+ * await client.orderDrafts.expanded.listV1({
68
+ * sort_by: "draft_started_at_timestamp",
69
+ * sort_order: "ascending",
70
+ * page: 1,
71
+ * page_size: 1,
72
+ * filter_draft_started_at_timestamp_lte: "2024-01-15T09:30:00Z",
73
+ * filter_draft_started_at_timestamp_gte: "2024-01-15T09:30:00Z",
74
+ * body: {}
75
+ * })
76
+ */
77
+ listV1(request, requestOptions) {
78
+ return core.HttpResponsePromise.fromPromise(this.__listV1(request, requestOptions));
79
+ }
80
+ __listV1(request, requestOptions) {
81
+ return __awaiter(this, void 0, void 0, function* () {
82
+ var _a, _b, _c, _d, _e, _f;
83
+ const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, filter_draft_started_at_timestamp_lte: filterDraftStartedAtTimestampLte, filter_draft_started_at_timestamp_gte: filterDraftStartedAtTimestampGte, body: _body, } = request;
84
+ const _queryParams = {};
85
+ if (sortBy !== undefined) {
86
+ _queryParams["sort_by"] = sortBy;
87
+ }
88
+ if (sortOrder !== undefined) {
89
+ _queryParams["sort_order"] = sortOrder;
90
+ }
91
+ if (page !== undefined) {
92
+ _queryParams["page"] = (_a = page === null || page === void 0 ? void 0 : page.toString()) !== null && _a !== void 0 ? _a : null;
93
+ }
94
+ if (pageSize !== undefined) {
95
+ _queryParams["page_size"] = (_b = pageSize === null || pageSize === void 0 ? void 0 : pageSize.toString()) !== null && _b !== void 0 ? _b : null;
96
+ }
97
+ if (filterDraftStartedAtTimestampLte !== undefined) {
98
+ _queryParams["filter_draft_started_at_timestamp_lte"] = filterDraftStartedAtTimestampLte;
99
+ }
100
+ if (filterDraftStartedAtTimestampGte !== undefined) {
101
+ _queryParams["filter_draft_started_at_timestamp_gte"] = filterDraftStartedAtTimestampGte;
102
+ }
103
+ let _headers = (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
104
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
105
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ChrtEnvironment.Local, "oort/order_drafts/expanded/list/v1"),
106
+ method: "POST",
107
+ headers: _headers,
108
+ contentType: "application/json",
109
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
110
+ requestType: "json",
111
+ body: _body,
112
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
113
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
114
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
115
+ });
116
+ if (_response.ok) {
117
+ return { data: _response.body, rawResponse: _response.rawResponse };
118
+ }
119
+ if (_response.error.reason === "status-code") {
120
+ switch (_response.error.statusCode) {
121
+ case 422:
122
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
123
+ default:
124
+ throw new errors.ChrtError({
125
+ statusCode: _response.error.statusCode,
126
+ body: _response.error.body,
127
+ rawResponse: _response.rawResponse,
128
+ });
129
+ }
130
+ }
131
+ switch (_response.error.reason) {
132
+ case "non-json":
133
+ throw new errors.ChrtError({
134
+ statusCode: _response.error.statusCode,
135
+ body: _response.error.rawBody,
136
+ rawResponse: _response.rawResponse,
137
+ });
138
+ case "timeout":
139
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/order_drafts/expanded/list/v1.");
140
+ case "unknown":
141
+ throw new errors.ChrtError({
142
+ message: _response.error.errorMessage,
143
+ rawResponse: _response.rawResponse,
144
+ });
145
+ }
146
+ });
147
+ }
148
+ _getAuthorizationHeader() {
149
+ return __awaiter(this, void 0, void 0, function* () {
150
+ const bearer = yield core.Supplier.get(this._options.token);
151
+ if (bearer != null) {
152
+ return `Bearer ${bearer}`;
153
+ }
154
+ return undefined;
155
+ });
156
+ }
157
+ }
158
+ exports.Expanded = Expanded;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ export * from "./requests/index.js";
@@ -14,4 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./file/exports.js"), exports);
17
+ __exportStar(require("./requests/index.js"), exports);
@@ -0,0 +1,25 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../../../../../../index.js";
5
+ /**
6
+ * @example
7
+ * {
8
+ * sort_by: "draft_started_at_timestamp",
9
+ * sort_order: "ascending",
10
+ * page: 1,
11
+ * page_size: 1,
12
+ * filter_draft_started_at_timestamp_lte: "2024-01-15T09:30:00Z",
13
+ * filter_draft_started_at_timestamp_gte: "2024-01-15T09:30:00Z",
14
+ * body: {}
15
+ * }
16
+ */
17
+ export interface ExpandedListV1Request {
18
+ sort_by?: Chrt.OrderDraftSortByEnum | null;
19
+ sort_order?: Chrt.orderDrafts.ExpandedListV1RequestSortOrder | null;
20
+ page?: number | null;
21
+ page_size?: number | null;
22
+ filter_draft_started_at_timestamp_lte?: string | null;
23
+ filter_draft_started_at_timestamp_gte?: string | null;
24
+ body: Chrt.OrderAndTaskGroupExpandedReq;
25
+ }
@@ -0,0 +1 @@
1
+ export { type ExpandedListV1Request } from "./ExpandedListV1Request.js";
@@ -0,0 +1,2 @@
1
+ export * from "./types/index.js";
2
+ export * from "./client/index.js";
@@ -14,7 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.encodeAsFormParameter = void 0;
18
- var encodeAsFormParameter_js_1 = require("./encodeAsFormParameter.js");
19
- Object.defineProperty(exports, "encodeAsFormParameter", { enumerable: true, get: function () { return encodeAsFormParameter_js_1.encodeAsFormParameter; } });
20
- __exportStar(require("./FormDataWrapper.js"), exports);
17
+ __exportStar(require("./types/index.js"), exports);
18
+ __exportStar(require("./client/index.js"), exports);