@chrt-inc/typescript-sdk 1.863.0 → 1.866.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 (232) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/shipping/client/Client.d.ts +0 -3
  3. package/dist/cjs/api/resources/shipping/client/Client.js +16 -21
  4. package/dist/cjs/api/resources/shipping/resources/index.d.ts +1 -3
  5. package/dist/cjs/api/resources/shipping/resources/index.js +2 -4
  6. package/dist/cjs/api/resources/shipping/resources/orders/client/Client.d.ts +3 -0
  7. package/dist/cjs/api/resources/shipping/resources/orders/client/Client.js +7 -2
  8. package/dist/cjs/api/resources/shipping/resources/orders/index.d.ts +1 -1
  9. package/dist/cjs/api/resources/shipping/resources/orders/index.js +1 -1
  10. package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/client/Client.d.ts +212 -0
  11. package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/client/Client.js +254 -69
  12. package/dist/cjs/api/resources/shipping/resources/{orderDrafts/client/requests/BodyPostShippingOrderDraftsImageToTextV1.d.ts → orders/resources/drafts/client/requests/BodyPostShippingOrdersDraftsImageToTextV1.d.ts} +2 -2
  13. package/dist/{esm/api/resources/shipping/resources/orderDrafts/client/requests/OrderDraftsAddCoordinatorTaskListToApplyAtOrderStagingV1Request.d.mts → cjs/api/resources/shipping/resources/orders/resources/drafts/client/requests/DraftsAddCoordinatorTaskListToApplyAtOrderStagingV1Request.d.ts} +1 -1
  14. package/dist/cjs/api/resources/shipping/resources/{orderDrafts/client/requests/OrdersNewDraftReq.d.ts → orders/resources/drafts/client/requests/OrdersOpenDraftReq.d.ts} +2 -2
  15. package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/client/requests/index.d.ts +6 -0
  16. package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/index.d.ts +2 -1
  17. package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/index.js +2 -1
  18. package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/cargo/client/Client.d.ts +16 -16
  19. package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/cargo/client/Client.js +24 -24
  20. package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/cargo/client/requests/OrderDraftAddCargoReq.d.ts +1 -1
  21. package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/cargo/client/requests/OrderDraftUpdateCargoReq.d.ts +1 -1
  22. package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/expanded/client/Client.d.ts +5 -5
  23. package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/expanded/client/Client.js +11 -11
  24. package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/index.d.ts +0 -2
  25. package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/index.js +1 -3
  26. package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/task/client/Client.d.ts +10 -10
  27. package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/task/client/Client.js +16 -16
  28. package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/task/client/requests/OrderDraftAddTaskReqV1.d.ts +1 -1
  29. package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/task/client/requests/OrderDraftUpdateTaskReq.d.ts +1 -1
  30. package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskArtifact/client/Client.d.ts +7 -7
  31. package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskArtifact/client/Client.js +12 -12
  32. package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskArtifact/client/requests/OrderDraftAddTaskArtifactReq.d.ts +1 -1
  33. package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskGroup/client/Client.d.ts +25 -25
  34. package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskGroup/client/Client.js +41 -41
  35. package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskGroup/client/requests/OrderDraftAddTaskGroupReq.d.ts +1 -1
  36. package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskGroup/client/requests/SetVehicleTypeReq.d.ts +1 -1
  37. package/dist/cjs/api/resources/shipping/resources/orders/resources/index.d.ts +3 -0
  38. package/dist/cjs/api/resources/shipping/resources/orders/resources/index.js +4 -1
  39. package/dist/cjs/api/types/{OrdersNewDraftRes.d.ts → OrdersOpenDraftRes.d.ts} +1 -1
  40. package/dist/cjs/api/types/index.d.ts +1 -1
  41. package/dist/cjs/api/types/index.js +1 -1
  42. package/dist/cjs/version.d.ts +1 -1
  43. package/dist/cjs/version.js +1 -1
  44. package/dist/esm/Client.mjs +2 -2
  45. package/dist/esm/api/resources/shipping/client/Client.d.mts +0 -3
  46. package/dist/esm/api/resources/shipping/client/Client.mjs +0 -5
  47. package/dist/esm/api/resources/shipping/resources/index.d.mts +1 -3
  48. package/dist/esm/api/resources/shipping/resources/index.mjs +1 -3
  49. package/dist/esm/api/resources/shipping/resources/orders/client/Client.d.mts +3 -0
  50. package/dist/esm/api/resources/shipping/resources/orders/client/Client.mjs +5 -0
  51. package/dist/esm/api/resources/shipping/resources/orders/index.d.mts +1 -1
  52. package/dist/esm/api/resources/shipping/resources/orders/index.mjs +1 -1
  53. package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/client/Client.d.mts +212 -0
  54. package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/client/Client.mjs +242 -57
  55. package/dist/esm/api/resources/shipping/resources/{orderDrafts/client/requests/BodyPostShippingOrderDraftsImageToTextV1.d.mts → orders/resources/drafts/client/requests/BodyPostShippingOrdersDraftsImageToTextV1.d.mts} +2 -2
  56. package/dist/{cjs/api/resources/shipping/resources/orderDrafts/client/requests/OrderDraftsAddCoordinatorTaskListToApplyAtOrderStagingV1Request.d.ts → esm/api/resources/shipping/resources/orders/resources/drafts/client/requests/DraftsAddCoordinatorTaskListToApplyAtOrderStagingV1Request.d.mts} +1 -1
  57. package/dist/esm/api/resources/shipping/resources/{orderDrafts/client/requests/OrdersNewDraftReq.d.mts → orders/resources/drafts/client/requests/OrdersOpenDraftReq.d.mts} +2 -2
  58. package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/client/requests/index.d.mts +6 -0
  59. package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/index.d.mts +2 -1
  60. package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/index.mjs +2 -1
  61. package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/cargo/client/Client.d.mts +16 -16
  62. package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/cargo/client/Client.mjs +24 -24
  63. package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/cargo/client/requests/OrderDraftAddCargoReq.d.mts +1 -1
  64. package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/cargo/client/requests/OrderDraftUpdateCargoReq.d.mts +1 -1
  65. package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/expanded/client/Client.d.mts +5 -5
  66. package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/expanded/client/Client.mjs +11 -11
  67. package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/index.d.mts +0 -2
  68. package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/index.mjs +0 -2
  69. package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/task/client/Client.d.mts +10 -10
  70. package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/task/client/Client.mjs +16 -16
  71. package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/task/client/requests/OrderDraftAddTaskReqV1.d.mts +1 -1
  72. package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/task/client/requests/OrderDraftUpdateTaskReq.d.mts +1 -1
  73. package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskArtifact/client/Client.d.mts +7 -7
  74. package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskArtifact/client/Client.mjs +12 -12
  75. package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskArtifact/client/requests/OrderDraftAddTaskArtifactReq.d.mts +1 -1
  76. package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskGroup/client/Client.d.mts +25 -25
  77. package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskGroup/client/Client.mjs +41 -41
  78. package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskGroup/client/requests/OrderDraftAddTaskGroupReq.d.mts +1 -1
  79. package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskGroup/client/requests/SetVehicleTypeReq.d.mts +1 -1
  80. package/dist/esm/api/resources/shipping/resources/orders/resources/index.d.mts +3 -0
  81. package/dist/esm/api/resources/shipping/resources/orders/resources/index.mjs +3 -0
  82. package/dist/esm/api/types/{OrdersNewDraftRes.d.mts → OrdersOpenDraftRes.d.mts} +1 -1
  83. package/dist/esm/api/types/index.d.mts +1 -1
  84. package/dist/esm/api/types/index.mjs +1 -1
  85. package/dist/esm/version.d.mts +1 -1
  86. package/dist/esm/version.mjs +1 -1
  87. package/package.json +1 -1
  88. package/reference.md +1156 -1158
  89. package/dist/cjs/api/resources/shipping/resources/orderDrafts/client/Client.d.ts +0 -184
  90. package/dist/cjs/api/resources/shipping/resources/orderDrafts/client/requests/index.d.ts +0 -6
  91. package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/agentic/client/Client.d.ts +0 -65
  92. package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/agentic/client/Client.js +0 -258
  93. package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/agentic/index.d.ts +0 -2
  94. package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/agentic/index.js +0 -18
  95. package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/expanded/client/index.d.ts +0 -1
  96. package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/requests/index.js +0 -2
  97. package/dist/esm/api/resources/shipping/resources/orderDrafts/client/Client.d.mts +0 -184
  98. package/dist/esm/api/resources/shipping/resources/orderDrafts/client/requests/index.d.mts +0 -6
  99. package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/agentic/client/Client.d.mts +0 -65
  100. package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/agentic/client/Client.mjs +0 -221
  101. package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/agentic/index.d.mts +0 -2
  102. package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/agentic/index.mjs +0 -2
  103. package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/expanded/client/index.d.mts +0 -1
  104. package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/requests/index.mjs +0 -1
  105. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/client/index.d.ts +0 -0
  106. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/client/index.js +0 -0
  107. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts/client/requests/BodyPostShippingOrderDraftsImageToTextV1.js → orders/resources/drafts/client/requests/BodyPostShippingOrdersDraftsImageToTextV1.js} +0 -0
  108. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts/client/requests/OrderDraftsAddCoordinatorTaskListToApplyAtOrderStagingV1Request.js → orders/resources/drafts/client/requests/DraftsAddCoordinatorTaskListToApplyAtOrderStagingV1Request.js} +0 -0
  109. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/client/requests/OrdersDraftDeleteManyReq.d.ts +0 -0
  110. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/client/requests/OrdersDraftDeleteManyReq.js +0 -0
  111. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/client/requests/OrdersDraftUpdateReq.d.ts +0 -0
  112. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/client/requests/OrdersDraftUpdateReq.js +0 -0
  113. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts/client/requests/OrdersNewDraftReq.js → orders/resources/drafts/client/requests/OrdersOpenDraftReq.js} +0 -0
  114. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/client/requests/SetTaskGroupOrderingDraftReq.d.ts +0 -0
  115. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/client/requests/SetTaskGroupOrderingDraftReq.js +0 -0
  116. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/client/requests/index.js +0 -0
  117. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/cargo/client/index.d.ts +0 -0
  118. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/cargo/client/index.js +0 -0
  119. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/cargo/client/requests/OrderDraftAddCargoReq.js +0 -0
  120. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/cargo/client/requests/OrderDraftAssociateCargoWithTaskReq.d.ts +0 -0
  121. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/cargo/client/requests/OrderDraftAssociateCargoWithTaskReq.js +0 -0
  122. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/cargo/client/requests/OrderDraftUnassociateCargoWithTaskReq.d.ts +0 -0
  123. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/cargo/client/requests/OrderDraftUnassociateCargoWithTaskReq.js +0 -0
  124. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/cargo/client/requests/OrderDraftUpdateCargoReq.js +0 -0
  125. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/cargo/client/requests/index.d.ts +0 -0
  126. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts/resources/agentic/client → orders/resources/drafts/resources/cargo/client/requests}/index.js +0 -0
  127. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/cargo/index.d.ts +0 -0
  128. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/cargo/index.js +0 -0
  129. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts/resources/agentic → orders/resources/drafts/resources/expanded}/client/index.d.ts +0 -0
  130. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts/resources/cargo/client/requests → orders/resources/drafts/resources/expanded/client}/index.js +0 -0
  131. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/expanded/index.d.ts +0 -0
  132. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/expanded/index.js +0 -0
  133. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/task/client/index.d.ts +0 -0
  134. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/task/client/index.js +0 -0
  135. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/task/client/requests/OrderDraftAddTaskReqV1.js +0 -0
  136. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/task/client/requests/OrderDraftUpdateTaskReq.js +0 -0
  137. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/task/client/requests/index.d.ts +0 -0
  138. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts/resources/expanded/client → orders/resources/drafts/resources/task/client/requests}/index.js +0 -0
  139. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/task/index.d.ts +0 -0
  140. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/task/index.js +0 -0
  141. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskArtifact/client/index.d.ts +0 -0
  142. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskArtifact/client/index.js +0 -0
  143. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskArtifact/client/requests/OrderDraftAddTaskArtifactReq.js +0 -0
  144. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskArtifact/client/requests/index.d.ts +0 -0
  145. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts/resources/task → orders/resources/drafts/resources/taskArtifact}/client/requests/index.js +0 -0
  146. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskArtifact/index.d.ts +0 -0
  147. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskArtifact/index.js +0 -0
  148. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskGroup/client/index.d.ts +0 -0
  149. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskGroup/client/index.js +0 -0
  150. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskGroup/client/requests/OrderDraftAddExecutorReq.d.ts +0 -0
  151. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskGroup/client/requests/OrderDraftAddExecutorReq.js +0 -0
  152. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskGroup/client/requests/OrderDraftAddTaskGroupReq.js +0 -0
  153. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskGroup/client/requests/OrderDraftUpdateDriverReq.d.ts +0 -0
  154. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskGroup/client/requests/OrderDraftUpdateDriverReq.js +0 -0
  155. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskGroup/client/requests/SetRateSheetsReq.d.ts +0 -0
  156. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskGroup/client/requests/SetRateSheetsReq.js +0 -0
  157. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskGroup/client/requests/SetTaskOrderingDraftReq.d.ts +0 -0
  158. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskGroup/client/requests/SetTaskOrderingDraftReq.js +0 -0
  159. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskGroup/client/requests/SetVehicleTypeReq.js +0 -0
  160. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskGroup/client/requests/index.d.ts +0 -0
  161. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts/resources/taskArtifact → orders/resources/drafts/resources/taskGroup}/client/requests/index.js +0 -0
  162. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskGroup/index.d.ts +0 -0
  163. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskGroup/index.js +0 -0
  164. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts/resources/agentic → orders/resources/drafts}/types/OrderBuilderStreamEvent.d.ts +0 -0
  165. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts/resources/agentic → orders/resources/drafts}/types/OrderBuilderStreamEvent.js +0 -0
  166. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts/resources/agentic → orders/resources/drafts}/types/index.d.ts +0 -0
  167. /package/dist/cjs/api/resources/shipping/resources/{orderDrafts/resources/agentic → orders/resources/drafts}/types/index.js +0 -0
  168. /package/dist/cjs/api/types/{OrdersNewDraftRes.js → OrdersOpenDraftRes.js} +0 -0
  169. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/client/index.d.mts +0 -0
  170. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/client/index.mjs +0 -0
  171. /package/dist/esm/api/resources/shipping/resources/{orderDrafts/client/requests/BodyPostShippingOrderDraftsImageToTextV1.mjs → orders/resources/drafts/client/requests/BodyPostShippingOrdersDraftsImageToTextV1.mjs} +0 -0
  172. /package/dist/esm/api/resources/shipping/resources/{orderDrafts/client/requests/OrderDraftsAddCoordinatorTaskListToApplyAtOrderStagingV1Request.mjs → orders/resources/drafts/client/requests/DraftsAddCoordinatorTaskListToApplyAtOrderStagingV1Request.mjs} +0 -0
  173. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/client/requests/OrdersDraftDeleteManyReq.d.mts +0 -0
  174. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/client/requests/OrdersDraftDeleteManyReq.mjs +0 -0
  175. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/client/requests/OrdersDraftUpdateReq.d.mts +0 -0
  176. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/client/requests/OrdersDraftUpdateReq.mjs +0 -0
  177. /package/dist/esm/api/resources/shipping/resources/{orderDrafts/client/requests/OrdersNewDraftReq.mjs → orders/resources/drafts/client/requests/OrdersOpenDraftReq.mjs} +0 -0
  178. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/client/requests/SetTaskGroupOrderingDraftReq.d.mts +0 -0
  179. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/client/requests/SetTaskGroupOrderingDraftReq.mjs +0 -0
  180. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/client/requests/index.mjs +0 -0
  181. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/cargo/client/index.d.mts +0 -0
  182. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/cargo/client/index.mjs +0 -0
  183. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/cargo/client/requests/OrderDraftAddCargoReq.mjs +0 -0
  184. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/cargo/client/requests/OrderDraftAssociateCargoWithTaskReq.d.mts +0 -0
  185. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/cargo/client/requests/OrderDraftAssociateCargoWithTaskReq.mjs +0 -0
  186. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/cargo/client/requests/OrderDraftUnassociateCargoWithTaskReq.d.mts +0 -0
  187. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/cargo/client/requests/OrderDraftUnassociateCargoWithTaskReq.mjs +0 -0
  188. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/cargo/client/requests/OrderDraftUpdateCargoReq.mjs +0 -0
  189. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/cargo/client/requests/index.d.mts +0 -0
  190. /package/dist/esm/api/resources/shipping/resources/{orderDrafts/resources/agentic/client → orders/resources/drafts/resources/cargo/client/requests}/index.mjs +0 -0
  191. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/cargo/index.d.mts +0 -0
  192. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/cargo/index.mjs +0 -0
  193. /package/dist/esm/api/resources/shipping/resources/{orderDrafts/resources/agentic → orders/resources/drafts/resources/expanded}/client/index.d.mts +0 -0
  194. /package/dist/esm/api/resources/shipping/resources/{orderDrafts/resources/cargo/client/requests → orders/resources/drafts/resources/expanded/client}/index.mjs +0 -0
  195. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/expanded/index.d.mts +0 -0
  196. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/expanded/index.mjs +0 -0
  197. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/task/client/index.d.mts +0 -0
  198. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/task/client/index.mjs +0 -0
  199. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/task/client/requests/OrderDraftAddTaskReqV1.mjs +0 -0
  200. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/task/client/requests/OrderDraftUpdateTaskReq.mjs +0 -0
  201. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/task/client/requests/index.d.mts +0 -0
  202. /package/dist/esm/api/resources/shipping/resources/{orderDrafts/resources/expanded/client → orders/resources/drafts/resources/task/client/requests}/index.mjs +0 -0
  203. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/task/index.d.mts +0 -0
  204. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/task/index.mjs +0 -0
  205. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskArtifact/client/index.d.mts +0 -0
  206. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskArtifact/client/index.mjs +0 -0
  207. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskArtifact/client/requests/OrderDraftAddTaskArtifactReq.mjs +0 -0
  208. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskArtifact/client/requests/index.d.mts +0 -0
  209. /package/dist/esm/api/resources/shipping/resources/{orderDrafts/resources/task → orders/resources/drafts/resources/taskArtifact}/client/requests/index.mjs +0 -0
  210. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskArtifact/index.d.mts +0 -0
  211. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskArtifact/index.mjs +0 -0
  212. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskGroup/client/index.d.mts +0 -0
  213. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskGroup/client/index.mjs +0 -0
  214. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskGroup/client/requests/OrderDraftAddExecutorReq.d.mts +0 -0
  215. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskGroup/client/requests/OrderDraftAddExecutorReq.mjs +0 -0
  216. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskGroup/client/requests/OrderDraftAddTaskGroupReq.mjs +0 -0
  217. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskGroup/client/requests/OrderDraftUpdateDriverReq.d.mts +0 -0
  218. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskGroup/client/requests/OrderDraftUpdateDriverReq.mjs +0 -0
  219. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskGroup/client/requests/SetRateSheetsReq.d.mts +0 -0
  220. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskGroup/client/requests/SetRateSheetsReq.mjs +0 -0
  221. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskGroup/client/requests/SetTaskOrderingDraftReq.d.mts +0 -0
  222. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskGroup/client/requests/SetTaskOrderingDraftReq.mjs +0 -0
  223. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskGroup/client/requests/SetVehicleTypeReq.mjs +0 -0
  224. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskGroup/client/requests/index.d.mts +0 -0
  225. /package/dist/esm/api/resources/shipping/resources/{orderDrafts/resources/taskArtifact → orders/resources/drafts/resources/taskGroup}/client/requests/index.mjs +0 -0
  226. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskGroup/index.d.mts +0 -0
  227. /package/dist/esm/api/resources/shipping/resources/{orderDrafts → orders/resources/drafts}/resources/taskGroup/index.mjs +0 -0
  228. /package/dist/esm/api/resources/shipping/resources/{orderDrafts/resources/agentic → orders/resources/drafts}/types/OrderBuilderStreamEvent.d.mts +0 -0
  229. /package/dist/esm/api/resources/shipping/resources/{orderDrafts/resources/agentic → orders/resources/drafts}/types/OrderBuilderStreamEvent.mjs +0 -0
  230. /package/dist/esm/api/resources/shipping/resources/{orderDrafts/resources/agentic → orders/resources/drafts}/types/index.d.mts +0 -0
  231. /package/dist/esm/api/resources/shipping/resources/{orderDrafts/resources/agentic → orders/resources/drafts}/types/index.mjs +0 -0
  232. /package/dist/esm/api/types/{OrdersNewDraftRes.mjs → OrdersOpenDraftRes.mjs} +0 -0
@@ -45,58 +45,243 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
45
45
  });
46
46
  };
47
47
  Object.defineProperty(exports, "__esModule", { value: true });
48
- exports.OrderDrafts = 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
- const Client_js_1 = require("../resources/agentic/client/Client.js");
55
- const Client_js_2 = require("../resources/cargo/client/Client.js");
56
- const Client_js_3 = require("../resources/expanded/client/Client.js");
57
- const Client_js_4 = require("../resources/task/client/Client.js");
58
- const Client_js_5 = require("../resources/taskArtifact/client/Client.js");
59
- const Client_js_6 = require("../resources/taskGroup/client/Client.js");
60
- class OrderDrafts {
48
+ exports.Drafts = 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
+ const Client_js_1 = require("../resources/cargo/client/Client.js");
55
+ const Client_js_2 = require("../resources/expanded/client/Client.js");
56
+ const Client_js_3 = require("../resources/task/client/Client.js");
57
+ const Client_js_4 = require("../resources/taskArtifact/client/Client.js");
58
+ const Client_js_5 = require("../resources/taskGroup/client/Client.js");
59
+ class Drafts {
61
60
  constructor(_options = {}) {
62
61
  this._options = _options;
63
62
  }
64
- get agentic() {
65
- var _a;
66
- return ((_a = this._agentic) !== null && _a !== void 0 ? _a : (this._agentic = new Client_js_1.Agentic(this._options)));
67
- }
68
63
  get cargo() {
69
64
  var _a;
70
- return ((_a = this._cargo) !== null && _a !== void 0 ? _a : (this._cargo = new Client_js_2.Cargo(this._options)));
65
+ return ((_a = this._cargo) !== null && _a !== void 0 ? _a : (this._cargo = new Client_js_1.Cargo(this._options)));
71
66
  }
72
67
  get expanded() {
73
68
  var _a;
74
- return ((_a = this._expanded) !== null && _a !== void 0 ? _a : (this._expanded = new Client_js_3.Expanded(this._options)));
69
+ return ((_a = this._expanded) !== null && _a !== void 0 ? _a : (this._expanded = new Client_js_2.Expanded(this._options)));
75
70
  }
76
71
  get task() {
77
72
  var _a;
78
- return ((_a = this._task) !== null && _a !== void 0 ? _a : (this._task = new Client_js_4.Task(this._options)));
73
+ return ((_a = this._task) !== null && _a !== void 0 ? _a : (this._task = new Client_js_3.Task(this._options)));
79
74
  }
80
75
  get taskArtifact() {
81
76
  var _a;
82
- return ((_a = this._taskArtifact) !== null && _a !== void 0 ? _a : (this._taskArtifact = new Client_js_5.TaskArtifact(this._options)));
77
+ return ((_a = this._taskArtifact) !== null && _a !== void 0 ? _a : (this._taskArtifact = new Client_js_4.TaskArtifact(this._options)));
83
78
  }
84
79
  get taskGroup() {
85
80
  var _a;
86
- return ((_a = this._taskGroup) !== null && _a !== void 0 ? _a : (this._taskGroup = new Client_js_6.TaskGroup(this._options)));
81
+ return ((_a = this._taskGroup) !== null && _a !== void 0 ? _a : (this._taskGroup = new Client_js_5.TaskGroup(this._options)));
82
+ }
83
+ /**
84
+ * Creates a draft order, populating cargo, task groups, and tasks parsed from natural language or a template. | authz: min_org_role=operator | (OrderBuilderReq) -> (OrderBuilderRes)
85
+ *
86
+ * @param {Chrt.OrderBuilderReq} request
87
+ * @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
88
+ *
89
+ * @throws {@link Chrt.UnprocessableEntityError}
90
+ *
91
+ * @example
92
+ * await client.shipping.orders.drafts.buildV1({})
93
+ */
94
+ buildV1(request, requestOptions) {
95
+ return core.HttpResponsePromise.fromPromise(this.__buildV1(request, requestOptions));
96
+ }
97
+ __buildV1(request, requestOptions) {
98
+ return __awaiter(this, void 0, void 0, function* () {
99
+ var _a, _b, _c, _d;
100
+ 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);
101
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
102
+ 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, "shipping/orders/drafts/build/v1"),
103
+ method: "POST",
104
+ headers: _headers,
105
+ contentType: "application/json",
106
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
107
+ requestType: "json",
108
+ body: request,
109
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
110
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
111
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
112
+ });
113
+ if (_response.ok) {
114
+ return { data: _response.body, rawResponse: _response.rawResponse };
115
+ }
116
+ if (_response.error.reason === "status-code") {
117
+ switch (_response.error.statusCode) {
118
+ case 422:
119
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
120
+ default:
121
+ throw new errors.ChrtError({
122
+ statusCode: _response.error.statusCode,
123
+ body: _response.error.body,
124
+ rawResponse: _response.rawResponse,
125
+ });
126
+ }
127
+ }
128
+ switch (_response.error.reason) {
129
+ case "non-json":
130
+ throw new errors.ChrtError({
131
+ statusCode: _response.error.statusCode,
132
+ body: _response.error.rawBody,
133
+ rawResponse: _response.rawResponse,
134
+ });
135
+ case "timeout":
136
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /shipping/orders/drafts/build/v1.");
137
+ case "unknown":
138
+ throw new errors.ChrtError({
139
+ message: _response.error.errorMessage,
140
+ rawResponse: _response.rawResponse,
141
+ });
142
+ }
143
+ });
144
+ }
145
+ /**
146
+ * Reports whether an order builder request's references resolve. | authz: min_org_role=operator | (OrderBuilderReq) -> (OrderTemplateResolvabilityRes)
147
+ *
148
+ * @param {Chrt.OrderBuilderReq} request
149
+ * @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
150
+ *
151
+ * @throws {@link Chrt.UnprocessableEntityError}
152
+ *
153
+ * @example
154
+ * await client.shipping.orders.drafts.buildPrecheckV1({})
155
+ */
156
+ buildPrecheckV1(request, requestOptions) {
157
+ return core.HttpResponsePromise.fromPromise(this.__buildPrecheckV1(request, requestOptions));
158
+ }
159
+ __buildPrecheckV1(request, requestOptions) {
160
+ return __awaiter(this, void 0, void 0, function* () {
161
+ var _a, _b, _c, _d;
162
+ 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);
163
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
164
+ 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, "shipping/orders/drafts/build_precheck/v1"),
165
+ method: "POST",
166
+ headers: _headers,
167
+ contentType: "application/json",
168
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
169
+ requestType: "json",
170
+ body: request,
171
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
172
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
173
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
174
+ });
175
+ if (_response.ok) {
176
+ return { data: _response.body, rawResponse: _response.rawResponse };
177
+ }
178
+ if (_response.error.reason === "status-code") {
179
+ switch (_response.error.statusCode) {
180
+ case 422:
181
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
182
+ default:
183
+ throw new errors.ChrtError({
184
+ statusCode: _response.error.statusCode,
185
+ body: _response.error.body,
186
+ rawResponse: _response.rawResponse,
187
+ });
188
+ }
189
+ }
190
+ switch (_response.error.reason) {
191
+ case "non-json":
192
+ throw new errors.ChrtError({
193
+ statusCode: _response.error.statusCode,
194
+ body: _response.error.rawBody,
195
+ rawResponse: _response.rawResponse,
196
+ });
197
+ case "timeout":
198
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /shipping/orders/drafts/build_precheck/v1.");
199
+ case "unknown":
200
+ throw new errors.ChrtError({
201
+ message: _response.error.errorMessage,
202
+ rawResponse: _response.rawResponse,
203
+ });
204
+ }
205
+ });
206
+ }
207
+ /**
208
+ * Creates a draft order from natural language or a template and streams progress events via SSE. | authz: min_org_role=operator | (OrderBuilderReq) -> (OrderBuilderStreamEvent)
209
+ */
210
+ buildWithStreamingV1(request, requestOptions) {
211
+ return core.HttpResponsePromise.fromPromise(this.__buildWithStreamingV1(request, requestOptions));
212
+ }
213
+ __buildWithStreamingV1(request, requestOptions) {
214
+ return __awaiter(this, void 0, void 0, function* () {
215
+ var _a, _b, _c, _d;
216
+ 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);
217
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
218
+ 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, "shipping/orders/drafts/build_with_streaming/v1"),
219
+ method: "POST",
220
+ headers: _headers,
221
+ contentType: "application/json",
222
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
223
+ requestType: "json",
224
+ body: request,
225
+ responseType: "sse",
226
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
227
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
228
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
229
+ });
230
+ if (_response.ok) {
231
+ return {
232
+ data: new core.Stream({
233
+ stream: _response.body,
234
+ parse: (data) => data,
235
+ signal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
236
+ eventShape: {
237
+ type: "sse",
238
+ streamTerminator: "[DONE]",
239
+ },
240
+ }),
241
+ rawResponse: _response.rawResponse,
242
+ };
243
+ }
244
+ if (_response.error.reason === "status-code") {
245
+ switch (_response.error.statusCode) {
246
+ case 422:
247
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
248
+ default:
249
+ throw new errors.ChrtError({
250
+ statusCode: _response.error.statusCode,
251
+ body: _response.error.body,
252
+ rawResponse: _response.rawResponse,
253
+ });
254
+ }
255
+ }
256
+ switch (_response.error.reason) {
257
+ case "non-json":
258
+ throw new errors.ChrtError({
259
+ statusCode: _response.error.statusCode,
260
+ body: _response.error.rawBody,
261
+ rawResponse: _response.rawResponse,
262
+ });
263
+ case "timeout":
264
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /shipping/orders/drafts/build_with_streaming/v1.");
265
+ case "unknown":
266
+ throw new errors.ChrtError({
267
+ message: _response.error.errorMessage,
268
+ rawResponse: _response.rawResponse,
269
+ });
270
+ }
271
+ });
87
272
  }
88
273
  /**
89
274
  * Adds a coordinator task list with an optional department override to apply when the draft order is staged. | authz_personas=[coordinator_org_operators] | (UTCDatetime | None) -> (bool)
90
275
  *
91
276
  * @param {string} orderId
92
277
  * @param {string} taskListId
93
- * @param {Chrt.shipping.OrderDraftsAddCoordinatorTaskListToApplyAtOrderStagingV1Request} request
94
- * @param {OrderDrafts.RequestOptions} requestOptions - Request-specific configuration.
278
+ * @param {Chrt.shipping.orders.DraftsAddCoordinatorTaskListToApplyAtOrderStagingV1Request} request
279
+ * @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
95
280
  *
96
281
  * @throws {@link Chrt.UnprocessableEntityError}
97
282
  *
98
283
  * @example
99
- * await client.shipping.orderDrafts.addCoordinatorTaskListToApplyAtOrderStagingV1("order_id", "task_list_id", {
284
+ * await client.shipping.orders.drafts.addCoordinatorTaskListToApplyAtOrderStagingV1("order_id", "task_list_id", {
100
285
  * department_id: "department_id",
101
286
  * body: "2024-01-15T09:30:00Z"
102
287
  * })
@@ -114,7 +299,7 @@ class OrderDrafts {
114
299
  }
115
300
  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);
116
301
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
117
- 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, `shipping/order_drafts/coordinator_task_lists_to_apply_at_order_staging/add/v1/${encodeURIComponent(orderId)}/${encodeURIComponent(taskListId)}`),
302
+ 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, `shipping/orders/drafts/coordinator_task_lists_to_apply_at_order_staging/add/v1/${encodeURIComponent(orderId)}/${encodeURIComponent(taskListId)}`),
118
303
  method: "POST",
119
304
  headers: _headers,
120
305
  contentType: "application/json",
@@ -148,7 +333,7 @@ class OrderDrafts {
148
333
  rawResponse: _response.rawResponse,
149
334
  });
150
335
  case "timeout":
151
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /shipping/order_drafts/coordinator_task_lists_to_apply_at_order_staging/add/v1/{order_id}/{task_list_id}.");
336
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /shipping/orders/drafts/coordinator_task_lists_to_apply_at_order_staging/add/v1/{order_id}/{task_list_id}.");
152
337
  case "unknown":
153
338
  throw new errors.ChrtError({
154
339
  message: _response.error.errorMessage,
@@ -162,12 +347,12 @@ class OrderDrafts {
162
347
  *
163
348
  * @param {string} orderId
164
349
  * @param {string} taskListId
165
- * @param {OrderDrafts.RequestOptions} requestOptions - Request-specific configuration.
350
+ * @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
166
351
  *
167
352
  * @throws {@link Chrt.UnprocessableEntityError}
168
353
  *
169
354
  * @example
170
- * await client.shipping.orderDrafts.removeCoordinatorTaskListToApplyAtOrderStagingV1("order_id", "task_list_id")
355
+ * await client.shipping.orders.drafts.removeCoordinatorTaskListToApplyAtOrderStagingV1("order_id", "task_list_id")
171
356
  */
172
357
  removeCoordinatorTaskListToApplyAtOrderStagingV1(orderId, taskListId, requestOptions) {
173
358
  return core.HttpResponsePromise.fromPromise(this.__removeCoordinatorTaskListToApplyAtOrderStagingV1(orderId, taskListId, requestOptions));
@@ -177,7 +362,7 @@ class OrderDrafts {
177
362
  var _a, _b, _c, _d;
178
363
  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);
179
364
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
180
- 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, `shipping/order_drafts/coordinator_task_lists_to_apply_at_order_staging/remove/v1/${encodeURIComponent(orderId)}/${encodeURIComponent(taskListId)}`),
365
+ 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, `shipping/orders/drafts/coordinator_task_lists_to_apply_at_order_staging/remove/v1/${encodeURIComponent(orderId)}/${encodeURIComponent(taskListId)}`),
181
366
  method: "POST",
182
367
  headers: _headers,
183
368
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -208,7 +393,7 @@ class OrderDrafts {
208
393
  rawResponse: _response.rawResponse,
209
394
  });
210
395
  case "timeout":
211
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /shipping/order_drafts/coordinator_task_lists_to_apply_at_order_staging/remove/v1/{order_id}/{task_list_id}.");
396
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /shipping/orders/drafts/coordinator_task_lists_to_apply_at_order_staging/remove/v1/{order_id}/{task_list_id}.");
212
397
  case "unknown":
213
398
  throw new errors.ChrtError({
214
399
  message: _response.error.errorMessage,
@@ -221,12 +406,12 @@ class OrderDrafts {
221
406
  * Deletes a draft order and all associated entities. | authz_personas=[draft_creator_org_operator] | () -> (bool)
222
407
  *
223
408
  * @param {string} orderId
224
- * @param {OrderDrafts.RequestOptions} requestOptions - Request-specific configuration.
409
+ * @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
225
410
  *
226
411
  * @throws {@link Chrt.UnprocessableEntityError}
227
412
  *
228
413
  * @example
229
- * await client.shipping.orderDrafts.deleteV1("order_id")
414
+ * await client.shipping.orders.drafts.deleteV1("order_id")
230
415
  */
231
416
  deleteV1(orderId, requestOptions) {
232
417
  return core.HttpResponsePromise.fromPromise(this.__deleteV1(orderId, requestOptions));
@@ -236,7 +421,7 @@ class OrderDrafts {
236
421
  var _a, _b, _c, _d;
237
422
  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);
238
423
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
239
- 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, `shipping/order_drafts/delete/v1/${encodeURIComponent(orderId)}`),
424
+ 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, `shipping/orders/drafts/delete/v1/${encodeURIComponent(orderId)}`),
240
425
  method: "DELETE",
241
426
  headers: _headers,
242
427
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -267,7 +452,7 @@ class OrderDrafts {
267
452
  rawResponse: _response.rawResponse,
268
453
  });
269
454
  case "timeout":
270
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /shipping/order_drafts/delete/v1/{order_id}.");
455
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /shipping/orders/drafts/delete/v1/{order_id}.");
271
456
  case "unknown":
272
457
  throw new errors.ChrtError({
273
458
  message: _response.error.errorMessage,
@@ -279,13 +464,13 @@ class OrderDrafts {
279
464
  /**
280
465
  * Deletes multiple draft orders and associated entities, skipping drafts with billing links. | authz_personas=[draft_creator_org_operator] | (OrdersDraftDeleteManyReq) -> (OrdersDraftDeleteManyRes)
281
466
  *
282
- * @param {Chrt.shipping.OrdersDraftDeleteManyReq} request
283
- * @param {OrderDrafts.RequestOptions} requestOptions - Request-specific configuration.
467
+ * @param {Chrt.shipping.orders.OrdersDraftDeleteManyReq} request
468
+ * @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
284
469
  *
285
470
  * @throws {@link Chrt.UnprocessableEntityError}
286
471
  *
287
472
  * @example
288
- * await client.shipping.orderDrafts.deleteManyV1({
473
+ * await client.shipping.orders.drafts.deleteManyV1({
289
474
  * order_ids: ["order_ids"]
290
475
  * })
291
476
  */
@@ -297,7 +482,7 @@ class OrderDrafts {
297
482
  var _a, _b, _c, _d;
298
483
  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);
299
484
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
300
- 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, "shipping/order_drafts/delete_many/v1"),
485
+ 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, "shipping/orders/drafts/delete_many/v1"),
301
486
  method: "DELETE",
302
487
  headers: _headers,
303
488
  contentType: "application/json",
@@ -331,7 +516,7 @@ class OrderDrafts {
331
516
  rawResponse: _response.rawResponse,
332
517
  });
333
518
  case "timeout":
334
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /shipping/order_drafts/delete_many/v1.");
519
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /shipping/orders/drafts/delete_many/v1.");
335
520
  case "unknown":
336
521
  throw new errors.ChrtError({
337
522
  message: _response.error.errorMessage,
@@ -343,14 +528,14 @@ class OrderDrafts {
343
528
  /**
344
529
  * Converts an order screenshot into lightly structured text for the AI order builder. | authz: min_org_role=operator | (UploadFile) -> (str)
345
530
  *
346
- * @param {Chrt.shipping.BodyPostShippingOrderDraftsImageToTextV1} request
347
- * @param {OrderDrafts.RequestOptions} requestOptions - Request-specific configuration.
531
+ * @param {Chrt.shipping.orders.BodyPostShippingOrdersDraftsImageToTextV1} request
532
+ * @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
348
533
  *
349
534
  * @throws {@link Chrt.UnprocessableEntityError}
350
535
  *
351
536
  * @example
352
537
  * import { createReadStream } from "fs";
353
- * await client.shipping.orderDrafts.imageToTextV1({
538
+ * await client.shipping.orders.drafts.imageToTextV1({
354
539
  * file: fs.createReadStream("/path/to/your/file")
355
540
  * })
356
541
  */
@@ -365,7 +550,7 @@ class OrderDrafts {
365
550
  const _maybeEncodedRequest = yield _request.getRequest();
366
551
  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);
367
552
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
368
- 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, "shipping/order_drafts/image_to_text/v1"),
553
+ 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, "shipping/orders/drafts/image_to_text/v1"),
369
554
  method: "POST",
370
555
  headers: _headers,
371
556
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -399,7 +584,7 @@ class OrderDrafts {
399
584
  rawResponse: _response.rawResponse,
400
585
  });
401
586
  case "timeout":
402
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /shipping/order_drafts/image_to_text/v1.");
587
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /shipping/orders/drafts/image_to_text/v1.");
403
588
  case "unknown":
404
589
  throw new errors.ChrtError({
405
590
  message: _response.error.errorMessage,
@@ -409,25 +594,25 @@ class OrderDrafts {
409
594
  });
410
595
  }
411
596
  /**
412
- * Creates a new draft order with org assignments based on caller's organization type. | authz: min_org_role=operator | (OrdersNewDraftReq) -> (OrdersNewDraftRes)
597
+ * Opens a new draft order shell with org assignments based on caller's organization type. | authz: min_org_role=operator | (OrdersOpenDraftReq) -> (OrdersOpenDraftRes)
413
598
  *
414
- * @param {Chrt.shipping.OrdersNewDraftReq} request
415
- * @param {OrderDrafts.RequestOptions} requestOptions - Request-specific configuration.
599
+ * @param {Chrt.shipping.orders.OrdersOpenDraftReq} request
600
+ * @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
416
601
  *
417
602
  * @throws {@link Chrt.UnprocessableEntityError}
418
603
  *
419
604
  * @example
420
- * await client.shipping.orderDrafts.newV1()
605
+ * await client.shipping.orders.drafts.openV1()
421
606
  */
422
- newV1(request = {}, requestOptions) {
423
- return core.HttpResponsePromise.fromPromise(this.__newV1(request, requestOptions));
607
+ openV1(request = {}, requestOptions) {
608
+ return core.HttpResponsePromise.fromPromise(this.__openV1(request, requestOptions));
424
609
  }
425
- __newV1() {
610
+ __openV1() {
426
611
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
427
612
  var _a, _b, _c, _d;
428
613
  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);
429
614
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
430
- 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, "shipping/order_drafts/new/v1"),
615
+ 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, "shipping/orders/drafts/open/v1"),
431
616
  method: "POST",
432
617
  headers: _headers,
433
618
  contentType: "application/json",
@@ -461,7 +646,7 @@ class OrderDrafts {
461
646
  rawResponse: _response.rawResponse,
462
647
  });
463
648
  case "timeout":
464
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /shipping/order_drafts/new/v1.");
649
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /shipping/orders/drafts/open/v1.");
465
650
  case "unknown":
466
651
  throw new errors.ChrtError({
467
652
  message: _response.error.errorMessage,
@@ -474,13 +659,13 @@ class OrderDrafts {
474
659
  * Sets the ordering of task groups within a draft order. Must provide all task group IDs with no duplicates. | (SetTaskGroupOrderingDraftReq) -> (bool)
475
660
  *
476
661
  * @param {string} orderId
477
- * @param {Chrt.shipping.SetTaskGroupOrderingDraftReq} request
478
- * @param {OrderDrafts.RequestOptions} requestOptions - Request-specific configuration.
662
+ * @param {Chrt.shipping.orders.SetTaskGroupOrderingDraftReq} request
663
+ * @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
479
664
  *
480
665
  * @throws {@link Chrt.UnprocessableEntityError}
481
666
  *
482
667
  * @example
483
- * await client.shipping.orderDrafts.setTaskGroupOrderingV1("order_id", {
668
+ * await client.shipping.orders.drafts.setTaskGroupOrderingV1("order_id", {
484
669
  * task_group_ids: ["task_group_ids"]
485
670
  * })
486
671
  */
@@ -492,7 +677,7 @@ class OrderDrafts {
492
677
  var _a, _b, _c, _d;
493
678
  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);
494
679
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
495
- 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, `shipping/order_drafts/set_task_group_ordering/v1/${encodeURIComponent(orderId)}`),
680
+ 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, `shipping/orders/drafts/set_task_group_ordering/v1/${encodeURIComponent(orderId)}`),
496
681
  method: "PUT",
497
682
  headers: _headers,
498
683
  contentType: "application/json",
@@ -526,7 +711,7 @@ class OrderDrafts {
526
711
  rawResponse: _response.rawResponse,
527
712
  });
528
713
  case "timeout":
529
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling PUT /shipping/order_drafts/set_task_group_ordering/v1/{order_id}.");
714
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling PUT /shipping/orders/drafts/set_task_group_ordering/v1/{order_id}.");
530
715
  case "unknown":
531
716
  throw new errors.ChrtError({
532
717
  message: _response.error.errorMessage,
@@ -539,13 +724,13 @@ class OrderDrafts {
539
724
  * Updates coordinator and/or shipper org assignments for a draft order. | authz_personas=[draft_creator_org_operator] | (OrdersDraftUpdateReq) -> (OrdersDraftUpdateRes)
540
725
  *
541
726
  * @param {string} orderId
542
- * @param {Chrt.shipping.OrdersDraftUpdateReq} request
543
- * @param {OrderDrafts.RequestOptions} requestOptions - Request-specific configuration.
727
+ * @param {Chrt.shipping.orders.OrdersDraftUpdateReq} request
728
+ * @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
544
729
  *
545
730
  * @throws {@link Chrt.UnprocessableEntityError}
546
731
  *
547
732
  * @example
548
- * await client.shipping.orderDrafts.updateV1("order_id")
733
+ * await client.shipping.orders.drafts.updateV1("order_id")
549
734
  */
550
735
  updateV1(orderId, request = {}, requestOptions) {
551
736
  return core.HttpResponsePromise.fromPromise(this.__updateV1(orderId, request, requestOptions));
@@ -555,7 +740,7 @@ class OrderDrafts {
555
740
  var _a, _b, _c, _d;
556
741
  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);
557
742
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
558
- 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, `shipping/order_drafts/update/v1/${encodeURIComponent(orderId)}`),
743
+ 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, `shipping/orders/drafts/update/v1/${encodeURIComponent(orderId)}`),
559
744
  method: "PATCH",
560
745
  headers: _headers,
561
746
  contentType: "application/json",
@@ -589,7 +774,7 @@ class OrderDrafts {
589
774
  rawResponse: _response.rawResponse,
590
775
  });
591
776
  case "timeout":
592
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /shipping/order_drafts/update/v1/{order_id}.");
777
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /shipping/orders/drafts/update/v1/{order_id}.");
593
778
  case "unknown":
594
779
  throw new errors.ChrtError({
595
780
  message: _response.error.errorMessage,
@@ -602,12 +787,12 @@ class OrderDrafts {
602
787
  * Validates the draft order for staging and returns requirement results. | () -> (OrderDraftValidationResult)
603
788
  *
604
789
  * @param {string} orderId
605
- * @param {OrderDrafts.RequestOptions} requestOptions - Request-specific configuration.
790
+ * @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
606
791
  *
607
792
  * @throws {@link Chrt.UnprocessableEntityError}
608
793
  *
609
794
  * @example
610
- * await client.shipping.orderDrafts.validateV1("order_id")
795
+ * await client.shipping.orders.drafts.validateV1("order_id")
611
796
  */
612
797
  validateV1(orderId, requestOptions) {
613
798
  return core.HttpResponsePromise.fromPromise(this.__validateV1(orderId, requestOptions));
@@ -617,7 +802,7 @@ class OrderDrafts {
617
802
  var _a, _b, _c, _d;
618
803
  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);
619
804
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
620
- 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, `shipping/order_drafts/validate/v1/${encodeURIComponent(orderId)}`),
805
+ 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, `shipping/orders/drafts/validate/v1/${encodeURIComponent(orderId)}`),
621
806
  method: "GET",
622
807
  headers: _headers,
623
808
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -648,7 +833,7 @@ class OrderDrafts {
648
833
  rawResponse: _response.rawResponse,
649
834
  });
650
835
  case "timeout":
651
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping/order_drafts/validate/v1/{order_id}.");
836
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping/orders/drafts/validate/v1/{order_id}.");
652
837
  case "unknown":
653
838
  throw new errors.ChrtError({
654
839
  message: _response.error.errorMessage,
@@ -667,4 +852,4 @@ class OrderDrafts {
667
852
  });
668
853
  }
669
854
  }
670
- exports.OrderDrafts = OrderDrafts;
855
+ exports.Drafts = Drafts;
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- import * as core from "../../../../../../../core/index.js";
4
+ import * as core from "../../../../../../../../../core/index.js";
5
5
  /**
6
6
  * @example
7
7
  * {
8
8
  * file: fs.createReadStream("/path/to/your/file")
9
9
  * }
10
10
  */
11
- export interface BodyPostShippingOrderDraftsImageToTextV1 {
11
+ export interface BodyPostShippingOrdersDraftsImageToTextV1 {
12
12
  file: core.file.Uploadable.FileLike;
13
13
  }
@@ -8,7 +8,7 @@
8
8
  * body: "2024-01-15T09:30:00Z"
9
9
  * }
10
10
  */
11
- export interface OrderDraftsAddCoordinatorTaskListToApplyAtOrderStagingV1Request {
11
+ export interface DraftsAddCoordinatorTaskListToApplyAtOrderStagingV1Request {
12
12
  department_id?: string | null;
13
13
  body?: string | null;
14
14
  }
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- import * as Chrt from "../../../../../../index.js";
4
+ import * as Chrt from "../../../../../../../../index.js";
5
5
  /**
6
6
  * @example
7
7
  * {}
8
8
  */
9
- export interface OrdersNewDraftReq {
9
+ export interface OrdersOpenDraftReq {
10
10
  /** Must be a string starting with `org_` */
11
11
  coordinator_org_id?: string | null;
12
12
  /** Optional key, unique per caller org, that makes draft creation idempotent: re-sending the same key returns the already-created draft instead of creating a duplicate. */
@@ -0,0 +1,6 @@
1
+ export { type DraftsAddCoordinatorTaskListToApplyAtOrderStagingV1Request } from "./DraftsAddCoordinatorTaskListToApplyAtOrderStagingV1Request.js";
2
+ export { type OrdersDraftDeleteManyReq } from "./OrdersDraftDeleteManyReq.js";
3
+ export { type BodyPostShippingOrdersDraftsImageToTextV1 } from "./BodyPostShippingOrdersDraftsImageToTextV1.js";
4
+ export { type OrdersOpenDraftReq } from "./OrdersOpenDraftReq.js";
5
+ export { type SetTaskGroupOrderingDraftReq } from "./SetTaskGroupOrderingDraftReq.js";
6
+ export { type OrdersDraftUpdateReq } from "./OrdersDraftUpdateReq.js";
@@ -1,2 +1,3 @@
1
- export * from "./resources/index.js";
1
+ export * from "./types/index.js";
2
2
  export * from "./client/index.js";
3
+ export * from "./resources/index.js";