@chrt-inc/typescript-sdk 1.929.0 → 1.930.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 (180) 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 +10 -15
  4. package/dist/cjs/api/resources/shipping/resources/flights/client/Client.d.ts +6 -3
  5. package/dist/cjs/api/resources/shipping/resources/flights/client/Client.js +19 -11
  6. package/dist/cjs/api/resources/shipping/resources/flights/client/index.d.ts +1 -0
  7. package/dist/cjs/api/resources/shipping/resources/flights/client/index.js +15 -0
  8. package/dist/cjs/api/resources/shipping/resources/flights/client/requests/FlightsGetFlightTrackForFlightLegV1Request.d.ts +13 -0
  9. package/dist/cjs/api/resources/shipping/resources/flights/client/requests/index.d.ts +1 -0
  10. package/dist/cjs/api/resources/shipping/resources/index.d.ts +1 -2
  11. package/dist/cjs/api/resources/shipping/resources/index.js +2 -3
  12. package/dist/cjs/api/resources/shipping/resources/orders/client/Client.d.ts +103 -0
  13. package/dist/cjs/api/resources/shipping/resources/orders/client/Client.js +442 -0
  14. package/dist/{esm/api/resources/shipping/resources/orders/resources/drafts/client/requests/DraftsAddCoordinatorTaskListToApplyAtOrderStagingV1Request.d.mts → cjs/api/resources/shipping/resources/orders/client/requests/OrdersAddCoordinatorTaskListToApplyAtOrderStagingV1Request.d.ts} +1 -1
  15. package/dist/{esm/api/resources/shipping/resources/orders/resources/drafts/client/requests/OrdersDraftDeleteManyReq.d.mts → cjs/api/resources/shipping/resources/orders/client/requests/OrdersDeleteManyDraftsReq.d.ts} +1 -1
  16. package/dist/{esm/api/resources/shipping/resources/orders/resources/drafts/client/requests/SetTaskGroupOrderingDraftReq.d.mts → cjs/api/resources/shipping/resources/orders/client/requests/OrdersTaskGroupOrderingReq.d.ts} +2 -2
  17. package/dist/cjs/api/resources/shipping/resources/orders/{resources/drafts/client/requests/OrdersDraftUpdateReq.d.ts → client/requests/OrdersUpdateDraftReq.d.ts} +2 -2
  18. package/dist/cjs/api/resources/shipping/resources/orders/client/requests/index.d.ts +4 -0
  19. package/dist/cjs/api/resources/shipping/resources/orders/resources/cargo/client/Client.d.ts +13 -0
  20. package/dist/cjs/api/resources/shipping/resources/orders/resources/cargo/client/Client.js +59 -0
  21. package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/client/Client.d.ts +0 -109
  22. package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/client/Client.js +0 -452
  23. package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/client/requests/OrdersOpenDraftReq.d.ts +0 -2
  24. package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/client/requests/index.d.ts +0 -4
  25. package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/index.d.ts +0 -1
  26. package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/index.js +0 -1
  27. package/dist/cjs/api/resources/shipping/resources/orders/resources/taskGroup/client/Client.d.ts +13 -0
  28. package/dist/cjs/api/resources/shipping/resources/orders/resources/taskGroup/client/Client.js +59 -0
  29. package/dist/cjs/api/resources/tracking/resources/sessions/client/Client.d.ts +3 -2
  30. package/dist/cjs/api/resources/tracking/resources/sessions/client/Client.js +11 -7
  31. package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/SessionsFlightTrackV1Request.d.ts +4 -1
  32. package/dist/cjs/api/types/OrderLimitedForProvider1.d.ts +0 -1
  33. package/dist/cjs/api/types/OrderLimitedForShipper1.d.ts +0 -1
  34. package/dist/cjs/api/types/{OrdersDraftDeleteManyRes.d.ts → OrdersDeleteManyDraftsRes.d.ts} +1 -1
  35. package/dist/cjs/api/types/{OrdersDraftUpdateRes.d.ts → OrdersUpdateDraftRes.d.ts} +1 -1
  36. package/dist/cjs/api/types/index.d.ts +2 -9
  37. package/dist/cjs/api/types/index.js +2 -9
  38. package/dist/cjs/version.d.ts +1 -1
  39. package/dist/cjs/version.js +1 -1
  40. package/dist/esm/Client.mjs +2 -2
  41. package/dist/esm/api/resources/shipping/client/Client.d.mts +0 -3
  42. package/dist/esm/api/resources/shipping/client/Client.mjs +0 -5
  43. package/dist/esm/api/resources/shipping/resources/flights/client/Client.d.mts +6 -3
  44. package/dist/esm/api/resources/shipping/resources/flights/client/Client.mjs +19 -11
  45. package/dist/esm/api/resources/shipping/resources/flights/client/index.d.mts +1 -0
  46. package/dist/esm/api/resources/shipping/resources/flights/client/index.mjs +1 -1
  47. package/dist/esm/api/resources/shipping/resources/flights/client/requests/FlightsGetFlightTrackForFlightLegV1Request.d.mts +13 -0
  48. package/dist/esm/api/resources/shipping/resources/flights/client/requests/index.d.mts +1 -0
  49. package/dist/esm/api/resources/shipping/resources/index.d.mts +1 -2
  50. package/dist/esm/api/resources/shipping/resources/index.mjs +1 -2
  51. package/dist/esm/api/resources/shipping/resources/orders/client/Client.d.mts +103 -0
  52. package/dist/esm/api/resources/shipping/resources/orders/client/Client.mjs +442 -0
  53. package/dist/{cjs/api/resources/shipping/resources/orders/resources/drafts/client/requests/DraftsAddCoordinatorTaskListToApplyAtOrderStagingV1Request.d.ts → esm/api/resources/shipping/resources/orders/client/requests/OrdersAddCoordinatorTaskListToApplyAtOrderStagingV1Request.d.mts} +1 -1
  54. package/dist/{cjs/api/resources/shipping/resources/orders/resources/drafts/client/requests/OrdersDraftDeleteManyReq.d.ts → esm/api/resources/shipping/resources/orders/client/requests/OrdersDeleteManyDraftsReq.d.mts} +1 -1
  55. package/dist/{cjs/api/resources/shipping/resources/orders/resources/drafts/client/requests/SetTaskGroupOrderingDraftReq.d.ts → esm/api/resources/shipping/resources/orders/client/requests/OrdersTaskGroupOrderingReq.d.mts} +2 -2
  56. package/dist/esm/api/resources/shipping/resources/orders/{resources/drafts/client/requests/OrdersDraftUpdateReq.d.mts → client/requests/OrdersUpdateDraftReq.d.mts} +2 -2
  57. package/dist/esm/api/resources/shipping/resources/orders/client/requests/index.d.mts +4 -0
  58. package/dist/esm/api/resources/shipping/resources/orders/resources/cargo/client/Client.d.mts +13 -0
  59. package/dist/esm/api/resources/shipping/resources/orders/resources/cargo/client/Client.mjs +59 -0
  60. package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/client/Client.d.mts +0 -109
  61. package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/client/Client.mjs +0 -452
  62. package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/client/requests/OrdersOpenDraftReq.d.mts +0 -2
  63. package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/client/requests/index.d.mts +0 -4
  64. package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/index.d.mts +0 -1
  65. package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/index.mjs +0 -1
  66. package/dist/esm/api/resources/shipping/resources/orders/resources/taskGroup/client/Client.d.mts +13 -0
  67. package/dist/esm/api/resources/shipping/resources/orders/resources/taskGroup/client/Client.mjs +59 -0
  68. package/dist/esm/api/resources/tracking/resources/sessions/client/Client.d.mts +3 -2
  69. package/dist/esm/api/resources/tracking/resources/sessions/client/Client.mjs +11 -7
  70. package/dist/esm/api/resources/tracking/resources/sessions/client/requests/SessionsFlightTrackV1Request.d.mts +4 -1
  71. package/dist/esm/api/types/OrderLimitedForProvider1.d.mts +0 -1
  72. package/dist/esm/api/types/OrderLimitedForShipper1.d.mts +0 -1
  73. package/dist/esm/api/types/{OrdersDraftDeleteManyRes.d.mts → OrdersDeleteManyDraftsRes.d.mts} +1 -1
  74. package/dist/esm/api/types/{OrdersDraftUpdateRes.d.mts → OrdersUpdateDraftRes.d.mts} +1 -1
  75. package/dist/esm/api/types/index.d.mts +2 -9
  76. package/dist/esm/api/types/index.mjs +2 -9
  77. package/dist/esm/version.d.mts +1 -1
  78. package/dist/esm/version.mjs +1 -1
  79. package/package.json +1 -1
  80. package/reference.md +326 -935
  81. package/dist/cjs/api/resources/shipping/resources/orderTemplates/client/Client.d.ts +0 -182
  82. package/dist/cjs/api/resources/shipping/resources/orderTemplates/client/Client.js +0 -720
  83. package/dist/cjs/api/resources/shipping/resources/orderTemplates/client/index.d.ts +0 -2
  84. package/dist/cjs/api/resources/shipping/resources/orderTemplates/client/index.js +0 -17
  85. package/dist/cjs/api/resources/shipping/resources/orderTemplates/client/requests/OrderTemplateClientCreate1.d.ts +0 -33
  86. package/dist/cjs/api/resources/shipping/resources/orderTemplates/client/requests/OrderTemplateClientUpdate1.d.ts +0 -37
  87. package/dist/cjs/api/resources/shipping/resources/orderTemplates/client/requests/OrderTemplateRemoveReferenceReq.d.ts +0 -14
  88. package/dist/cjs/api/resources/shipping/resources/orderTemplates/client/requests/OrderTemplatesListV1Request.d.ts +0 -80
  89. package/dist/cjs/api/resources/shipping/resources/orderTemplates/client/requests/index.d.ts +0 -4
  90. package/dist/cjs/api/resources/shipping/resources/orderTemplates/index.d.ts +0 -1
  91. package/dist/cjs/api/resources/shipping/resources/orderTemplates/index.js +0 -17
  92. package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/client/requests/SetTaskGroupOrderingDraftReq.js +0 -5
  93. package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/resources/cargo/client/Client.d.ts +0 -46
  94. package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/resources/cargo/client/Client.js +0 -127
  95. package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/resources/cargo/client/index.d.ts +0 -1
  96. package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/resources/cargo/client/index.js +0 -2
  97. package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/resources/cargo/index.d.ts +0 -1
  98. package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/resources/cargo/index.js +0 -17
  99. package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/resources/index.d.ts +0 -2
  100. package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/resources/index.js +0 -38
  101. package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/resources/taskGroup/client/Client.d.ts +0 -46
  102. package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/resources/taskGroup/client/Client.js +0 -127
  103. package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/resources/taskGroup/client/index.d.ts +0 -1
  104. package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/resources/taskGroup/client/index.js +0 -2
  105. package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/resources/taskGroup/index.d.ts +0 -1
  106. package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/resources/taskGroup/index.js +0 -17
  107. package/dist/cjs/api/types/Order1.d.ts +0 -43
  108. package/dist/cjs/api/types/Order1.js +0 -5
  109. package/dist/cjs/api/types/OrderTemplate1.d.ts +0 -35
  110. package/dist/cjs/api/types/OrderTemplate1.js +0 -5
  111. package/dist/cjs/api/types/OrderTemplateExpanded1.d.ts +0 -16
  112. package/dist/cjs/api/types/OrderTemplateExpanded1.js +0 -5
  113. package/dist/cjs/api/types/OrderTemplateListRes.d.ts +0 -8
  114. package/dist/cjs/api/types/OrderTemplateListRes.js +0 -5
  115. package/dist/cjs/api/types/OrderTemplateOrgInfo1.d.ts +0 -10
  116. package/dist/cjs/api/types/OrderTemplateOrgInfo1.js +0 -5
  117. package/dist/cjs/api/types/OrderTemplateReferenceColumnEnum1.d.ts +0 -13
  118. package/dist/cjs/api/types/OrderTemplateReferenceColumnEnum1.js +0 -15
  119. package/dist/cjs/api/types/OrderTemplateSortByEnum.d.ts +0 -11
  120. package/dist/cjs/api/types/OrderTemplateSortByEnum.js +0 -13
  121. package/dist/cjs/api/types/OrdersDraftDeleteManyRes.js +0 -5
  122. package/dist/cjs/api/types/OrdersDraftUpdateRes.js +0 -5
  123. package/dist/esm/api/resources/shipping/resources/orderTemplates/client/Client.d.mts +0 -182
  124. package/dist/esm/api/resources/shipping/resources/orderTemplates/client/Client.mjs +0 -683
  125. package/dist/esm/api/resources/shipping/resources/orderTemplates/client/index.d.mts +0 -2
  126. package/dist/esm/api/resources/shipping/resources/orderTemplates/client/index.mjs +0 -1
  127. package/dist/esm/api/resources/shipping/resources/orderTemplates/client/requests/OrderTemplateClientCreate1.d.mts +0 -33
  128. package/dist/esm/api/resources/shipping/resources/orderTemplates/client/requests/OrderTemplateClientUpdate1.d.mts +0 -37
  129. package/dist/esm/api/resources/shipping/resources/orderTemplates/client/requests/OrderTemplateRemoveReferenceReq.d.mts +0 -14
  130. package/dist/esm/api/resources/shipping/resources/orderTemplates/client/requests/OrderTemplatesListV1Request.d.mts +0 -80
  131. package/dist/esm/api/resources/shipping/resources/orderTemplates/client/requests/index.d.mts +0 -4
  132. package/dist/esm/api/resources/shipping/resources/orderTemplates/index.d.mts +0 -1
  133. package/dist/esm/api/resources/shipping/resources/orderTemplates/index.mjs +0 -1
  134. package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/client/requests/SetTaskGroupOrderingDraftReq.mjs +0 -4
  135. package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/resources/cargo/client/Client.d.mts +0 -46
  136. package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/resources/cargo/client/Client.mjs +0 -90
  137. package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/resources/cargo/client/index.d.mts +0 -1
  138. package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/resources/cargo/client/index.mjs +0 -1
  139. package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/resources/cargo/index.d.mts +0 -1
  140. package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/resources/cargo/index.mjs +0 -1
  141. package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/resources/index.d.mts +0 -2
  142. package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/resources/index.mjs +0 -2
  143. package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/resources/taskGroup/client/Client.d.mts +0 -46
  144. package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/resources/taskGroup/client/Client.mjs +0 -90
  145. package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/resources/taskGroup/client/index.d.mts +0 -1
  146. package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/resources/taskGroup/client/index.mjs +0 -1
  147. package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/resources/taskGroup/index.d.mts +0 -1
  148. package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/resources/taskGroup/index.mjs +0 -1
  149. package/dist/esm/api/types/Order1.d.mts +0 -43
  150. package/dist/esm/api/types/Order1.mjs +0 -4
  151. package/dist/esm/api/types/OrderTemplate1.d.mts +0 -35
  152. package/dist/esm/api/types/OrderTemplate1.mjs +0 -4
  153. package/dist/esm/api/types/OrderTemplateExpanded1.d.mts +0 -16
  154. package/dist/esm/api/types/OrderTemplateExpanded1.mjs +0 -4
  155. package/dist/esm/api/types/OrderTemplateListRes.d.mts +0 -8
  156. package/dist/esm/api/types/OrderTemplateListRes.mjs +0 -4
  157. package/dist/esm/api/types/OrderTemplateOrgInfo1.d.mts +0 -10
  158. package/dist/esm/api/types/OrderTemplateOrgInfo1.mjs +0 -4
  159. package/dist/esm/api/types/OrderTemplateReferenceColumnEnum1.d.mts +0 -13
  160. package/dist/esm/api/types/OrderTemplateReferenceColumnEnum1.mjs +0 -12
  161. package/dist/esm/api/types/OrderTemplateSortByEnum.d.mts +0 -11
  162. package/dist/esm/api/types/OrderTemplateSortByEnum.mjs +0 -10
  163. package/dist/esm/api/types/OrdersDraftDeleteManyRes.mjs +0 -4
  164. package/dist/esm/api/types/OrdersDraftUpdateRes.mjs +0 -4
  165. /package/dist/cjs/api/resources/shipping/resources/{orderTemplates/client/requests/OrderTemplateClientCreate1.js → flights/client/requests/FlightsGetFlightTrackForFlightLegV1Request.js} +0 -0
  166. /package/dist/cjs/api/resources/shipping/resources/{orderTemplates → flights}/client/requests/index.js +0 -0
  167. /package/dist/cjs/api/resources/shipping/resources/{orderTemplates/client/requests/OrderTemplateClientUpdate1.js → orders/client/requests/OrdersAddCoordinatorTaskListToApplyAtOrderStagingV1Request.js} +0 -0
  168. /package/dist/cjs/api/resources/shipping/resources/{orderTemplates/client/requests/OrderTemplateRemoveReferenceReq.js → orders/client/requests/OrdersDeleteManyDraftsReq.js} +0 -0
  169. /package/dist/cjs/api/resources/shipping/resources/{orderTemplates/client/requests/OrderTemplatesListV1Request.js → orders/client/requests/OrdersTaskGroupOrderingReq.js} +0 -0
  170. /package/dist/cjs/api/resources/shipping/resources/orders/{resources/drafts/client/requests/DraftsAddCoordinatorTaskListToApplyAtOrderStagingV1Request.js → client/requests/OrdersUpdateDraftReq.js} +0 -0
  171. /package/dist/cjs/api/{resources/shipping/resources/orders/resources/drafts/client/requests/OrdersDraftDeleteManyReq.js → types/OrdersDeleteManyDraftsRes.js} +0 -0
  172. /package/dist/cjs/api/{resources/shipping/resources/orders/resources/drafts/client/requests/OrdersDraftUpdateReq.js → types/OrdersUpdateDraftRes.js} +0 -0
  173. /package/dist/esm/api/resources/shipping/resources/{orderTemplates/client/requests/OrderTemplateClientCreate1.mjs → flights/client/requests/FlightsGetFlightTrackForFlightLegV1Request.mjs} +0 -0
  174. /package/dist/esm/api/resources/shipping/resources/{orderTemplates → flights}/client/requests/index.mjs +0 -0
  175. /package/dist/esm/api/resources/shipping/resources/{orderTemplates/client/requests/OrderTemplateClientUpdate1.mjs → orders/client/requests/OrdersAddCoordinatorTaskListToApplyAtOrderStagingV1Request.mjs} +0 -0
  176. /package/dist/esm/api/resources/shipping/resources/{orderTemplates/client/requests/OrderTemplateRemoveReferenceReq.mjs → orders/client/requests/OrdersDeleteManyDraftsReq.mjs} +0 -0
  177. /package/dist/esm/api/resources/shipping/resources/{orderTemplates/client/requests/OrderTemplatesListV1Request.mjs → orders/client/requests/OrdersTaskGroupOrderingReq.mjs} +0 -0
  178. /package/dist/esm/api/resources/shipping/resources/orders/{resources/drafts/client/requests/DraftsAddCoordinatorTaskListToApplyAtOrderStagingV1Request.mjs → client/requests/OrdersUpdateDraftReq.mjs} +0 -0
  179. /package/dist/esm/api/{resources/shipping/resources/orders/resources/drafts/client/requests/OrdersDraftDeleteManyReq.mjs → types/OrdersDeleteManyDraftsRes.mjs} +0 -0
  180. /package/dist/esm/api/{resources/shipping/resources/orders/resources/drafts/client/requests/OrdersDraftUpdateReq.mjs → types/OrdersUpdateDraftRes.mjs} +0 -0
@@ -4,8 +4,6 @@
4
4
  import * as environments from "../../../../../../../../environments.js";
5
5
  import * as core from "../../../../../../../../core/index.js";
6
6
  import * as Chrt from "../../../../../../../index.js";
7
- import { Cargo } from "../resources/cargo/client/Client.js";
8
- import { TaskGroup } from "../resources/taskGroup/client/Client.js";
9
7
  export declare namespace Drafts {
10
8
  interface Options {
11
9
  environment?: core.Supplier<environments.ChrtEnvironment | string>;
@@ -31,43 +29,7 @@ export declare namespace Drafts {
31
29
  }
32
30
  export declare class Drafts {
33
31
  protected readonly _options: Drafts.Options;
34
- protected _cargo: Cargo | undefined;
35
- protected _taskGroup: TaskGroup | undefined;
36
32
  constructor(_options?: Drafts.Options);
37
- get cargo(): Cargo;
38
- get taskGroup(): TaskGroup;
39
- /**
40
- * 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)
41
- *
42
- * @param {string} orderId
43
- * @param {string} taskListId
44
- * @param {Chrt.shipping.orders.DraftsAddCoordinatorTaskListToApplyAtOrderStagingV1Request} request
45
- * @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
46
- *
47
- * @throws {@link Chrt.UnprocessableEntityError}
48
- *
49
- * @example
50
- * await client.shipping.orders.drafts.addCoordinatorTaskListToApplyAtOrderStagingV1("order_id", "task_list_id", {
51
- * department_id: "department_id",
52
- * body: "2024-01-15T09:30:00Z"
53
- * })
54
- */
55
- addCoordinatorTaskListToApplyAtOrderStagingV1(orderId: string, taskListId: string, request?: Chrt.shipping.orders.DraftsAddCoordinatorTaskListToApplyAtOrderStagingV1Request, requestOptions?: Drafts.RequestOptions): core.HttpResponsePromise<boolean>;
56
- private __addCoordinatorTaskListToApplyAtOrderStagingV1;
57
- /**
58
- * Removes a pending coordinator staging task list from a draft order. | authz_personas=[coordinator_org_operators] | () -> (bool)
59
- *
60
- * @param {string} orderId
61
- * @param {string} taskListId
62
- * @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
63
- *
64
- * @throws {@link Chrt.UnprocessableEntityError}
65
- *
66
- * @example
67
- * await client.shipping.orders.drafts.removeCoordinatorTaskListToApplyAtOrderStagingV1("order_id", "task_list_id")
68
- */
69
- removeCoordinatorTaskListToApplyAtOrderStagingV1(orderId: string, taskListId: string, requestOptions?: Drafts.RequestOptions): core.HttpResponsePromise<boolean>;
70
- private __removeCoordinatorTaskListToApplyAtOrderStagingV1;
71
33
  /**
72
34
  * Creates a draft Order through one of three paths: (1) provide only order_template_new_id to load the saved template's core and record that template as the Order's provenance; (2) provide only order_template_new_core to materialize an ad hoc submitted core without template provenance; (3) provide both to record and validate the saved template as provenance while materializing the submitted core, without modifying the saved template. | authz: min_org_role=operator | (OrdersCreateDraftFromOrderTemplateNewReq) -> (OrdersOpenDraftRes)
73
35
  *
@@ -81,34 +43,6 @@ export declare class Drafts {
81
43
  */
82
44
  createFromOrderTemplateNewV1(request?: Chrt.shipping.orders.OrdersCreateDraftFromOrderTemplateNewReq, requestOptions?: Drafts.RequestOptions): core.HttpResponsePromise<Chrt.OrdersOpenDraftRes>;
83
45
  private __createFromOrderTemplateNewV1;
84
- /**
85
- * Deletes a draft order and all associated entities. | authz_personas=[draft_creator_org_operator] | () -> (bool)
86
- *
87
- * @param {string} orderId
88
- * @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
89
- *
90
- * @throws {@link Chrt.UnprocessableEntityError}
91
- *
92
- * @example
93
- * await client.shipping.orders.drafts.deleteV1("order_id")
94
- */
95
- deleteV1(orderId: string, requestOptions?: Drafts.RequestOptions): core.HttpResponsePromise<boolean>;
96
- private __deleteV1;
97
- /**
98
- * Deletes multiple draft orders and associated entities. | authz_personas=[draft_creator_org_operator] | (OrdersDraftDeleteManyReq) -> (OrdersDraftDeleteManyRes)
99
- *
100
- * @param {Chrt.shipping.orders.OrdersDraftDeleteManyReq} request
101
- * @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
102
- *
103
- * @throws {@link Chrt.UnprocessableEntityError}
104
- *
105
- * @example
106
- * await client.shipping.orders.drafts.deleteManyV1({
107
- * order_ids: ["order_ids"]
108
- * })
109
- */
110
- deleteManyV1(request: Chrt.shipping.orders.OrdersDraftDeleteManyReq, requestOptions?: Drafts.RequestOptions): core.HttpResponsePromise<Chrt.OrdersDraftDeleteManyRes>;
111
- private __deleteManyV1;
112
46
  /**
113
47
  * Opens a new draft order shell with org assignments based on caller's organization type. | authz: min_org_role=operator | (OrdersOpenDraftReq) -> (OrdersOpenDraftRes)
114
48
  *
@@ -122,48 +56,5 @@ export declare class Drafts {
122
56
  */
123
57
  openV1(request?: Chrt.shipping.orders.OrdersOpenDraftReq, requestOptions?: Drafts.RequestOptions): core.HttpResponsePromise<Chrt.OrdersOpenDraftRes>;
124
58
  private __openV1;
125
- /**
126
- * Sets the ordering of task groups within a draft order. Must provide all task group IDs with no duplicates. | (SetTaskGroupOrderingDraftReq) -> (bool)
127
- *
128
- * @param {string} orderId
129
- * @param {Chrt.shipping.orders.SetTaskGroupOrderingDraftReq} request
130
- * @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
131
- *
132
- * @throws {@link Chrt.UnprocessableEntityError}
133
- *
134
- * @example
135
- * await client.shipping.orders.drafts.setTaskGroupOrderingV1("order_id", {
136
- * task_group_ids: ["task_group_ids"]
137
- * })
138
- */
139
- setTaskGroupOrderingV1(orderId: string, request: Chrt.shipping.orders.SetTaskGroupOrderingDraftReq, requestOptions?: Drafts.RequestOptions): core.HttpResponsePromise<boolean>;
140
- private __setTaskGroupOrderingV1;
141
- /**
142
- * Updates coordinator and/or shipper org assignments for a draft order. | authz_personas=[draft_creator_org_operator] | (OrdersDraftUpdateReq) -> (OrdersDraftUpdateRes)
143
- *
144
- * @param {string} orderId
145
- * @param {Chrt.shipping.orders.OrdersDraftUpdateReq} request
146
- * @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
147
- *
148
- * @throws {@link Chrt.UnprocessableEntityError}
149
- *
150
- * @example
151
- * await client.shipping.orders.drafts.updateV1("order_id")
152
- */
153
- updateV1(orderId: string, request?: Chrt.shipping.orders.OrdersDraftUpdateReq, requestOptions?: Drafts.RequestOptions): core.HttpResponsePromise<Chrt.OrdersDraftUpdateRes>;
154
- private __updateV1;
155
- /**
156
- * Validates the draft order for staging and returns requirement results. | () -> (OrderDraftValidationResult)
157
- *
158
- * @param {string} orderId
159
- * @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
160
- *
161
- * @throws {@link Chrt.UnprocessableEntityError}
162
- *
163
- * @example
164
- * await client.shipping.orders.drafts.validateV1("order_id")
165
- */
166
- validateV1(orderId: string, requestOptions?: Drafts.RequestOptions): core.HttpResponsePromise<Chrt.OrderDraftValidationResult>;
167
- private __validateV1;
168
59
  protected _getAuthorizationHeader(): Promise<string | undefined>;
169
60
  }
@@ -51,152 +51,10 @@ const core = __importStar(require("../../../../../../../../core/index.js"));
51
51
  const Chrt = __importStar(require("../../../../../../../index.js"));
52
52
  const headers_js_1 = require("../../../../../../../../core/headers.js");
53
53
  const errors = __importStar(require("../../../../../../../../errors/index.js"));
54
- const Client_js_1 = require("../resources/cargo/client/Client.js");
55
- const Client_js_2 = require("../resources/taskGroup/client/Client.js");
56
54
  class Drafts {
57
55
  constructor(_options = {}) {
58
56
  this._options = _options;
59
57
  }
60
- get cargo() {
61
- var _a;
62
- return ((_a = this._cargo) !== null && _a !== void 0 ? _a : (this._cargo = new Client_js_1.Cargo(this._options)));
63
- }
64
- get taskGroup() {
65
- var _a;
66
- return ((_a = this._taskGroup) !== null && _a !== void 0 ? _a : (this._taskGroup = new Client_js_2.TaskGroup(this._options)));
67
- }
68
- /**
69
- * 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)
70
- *
71
- * @param {string} orderId
72
- * @param {string} taskListId
73
- * @param {Chrt.shipping.orders.DraftsAddCoordinatorTaskListToApplyAtOrderStagingV1Request} request
74
- * @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
75
- *
76
- * @throws {@link Chrt.UnprocessableEntityError}
77
- *
78
- * @example
79
- * await client.shipping.orders.drafts.addCoordinatorTaskListToApplyAtOrderStagingV1("order_id", "task_list_id", {
80
- * department_id: "department_id",
81
- * body: "2024-01-15T09:30:00Z"
82
- * })
83
- */
84
- addCoordinatorTaskListToApplyAtOrderStagingV1(orderId, taskListId, request = {}, requestOptions) {
85
- return core.HttpResponsePromise.fromPromise(this.__addCoordinatorTaskListToApplyAtOrderStagingV1(orderId, taskListId, request, requestOptions));
86
- }
87
- __addCoordinatorTaskListToApplyAtOrderStagingV1(orderId_1, taskListId_1) {
88
- return __awaiter(this, arguments, void 0, function* (orderId, taskListId, request = {}, requestOptions) {
89
- var _a, _b, _c, _d;
90
- const { department_id: departmentId, body: _body } = request;
91
- const _queryParams = {};
92
- if (departmentId !== undefined) {
93
- _queryParams["department_id"] = departmentId;
94
- }
95
- 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);
96
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
97
- 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)}`),
98
- method: "POST",
99
- headers: _headers,
100
- contentType: "application/json",
101
- queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
102
- requestType: "json",
103
- body: _body != null ? _body : undefined,
104
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
105
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
106
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
107
- });
108
- if (_response.ok) {
109
- return { data: _response.body, rawResponse: _response.rawResponse };
110
- }
111
- if (_response.error.reason === "status-code") {
112
- switch (_response.error.statusCode) {
113
- case 422:
114
- throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
115
- default:
116
- throw new errors.ChrtError({
117
- statusCode: _response.error.statusCode,
118
- body: _response.error.body,
119
- rawResponse: _response.rawResponse,
120
- });
121
- }
122
- }
123
- switch (_response.error.reason) {
124
- case "non-json":
125
- throw new errors.ChrtError({
126
- statusCode: _response.error.statusCode,
127
- body: _response.error.rawBody,
128
- rawResponse: _response.rawResponse,
129
- });
130
- case "timeout":
131
- 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}.");
132
- case "unknown":
133
- throw new errors.ChrtError({
134
- message: _response.error.errorMessage,
135
- rawResponse: _response.rawResponse,
136
- });
137
- }
138
- });
139
- }
140
- /**
141
- * Removes a pending coordinator staging task list from a draft order. | authz_personas=[coordinator_org_operators] | () -> (bool)
142
- *
143
- * @param {string} orderId
144
- * @param {string} taskListId
145
- * @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
146
- *
147
- * @throws {@link Chrt.UnprocessableEntityError}
148
- *
149
- * @example
150
- * await client.shipping.orders.drafts.removeCoordinatorTaskListToApplyAtOrderStagingV1("order_id", "task_list_id")
151
- */
152
- removeCoordinatorTaskListToApplyAtOrderStagingV1(orderId, taskListId, requestOptions) {
153
- return core.HttpResponsePromise.fromPromise(this.__removeCoordinatorTaskListToApplyAtOrderStagingV1(orderId, taskListId, requestOptions));
154
- }
155
- __removeCoordinatorTaskListToApplyAtOrderStagingV1(orderId, taskListId, requestOptions) {
156
- return __awaiter(this, void 0, void 0, function* () {
157
- var _a, _b, _c, _d;
158
- 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);
159
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
160
- 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)}`),
161
- method: "POST",
162
- headers: _headers,
163
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
164
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
165
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
166
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
167
- });
168
- if (_response.ok) {
169
- return { data: _response.body, rawResponse: _response.rawResponse };
170
- }
171
- if (_response.error.reason === "status-code") {
172
- switch (_response.error.statusCode) {
173
- case 422:
174
- throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
175
- default:
176
- throw new errors.ChrtError({
177
- statusCode: _response.error.statusCode,
178
- body: _response.error.body,
179
- rawResponse: _response.rawResponse,
180
- });
181
- }
182
- }
183
- switch (_response.error.reason) {
184
- case "non-json":
185
- throw new errors.ChrtError({
186
- statusCode: _response.error.statusCode,
187
- body: _response.error.rawBody,
188
- rawResponse: _response.rawResponse,
189
- });
190
- case "timeout":
191
- 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}.");
192
- case "unknown":
193
- throw new errors.ChrtError({
194
- message: _response.error.errorMessage,
195
- rawResponse: _response.rawResponse,
196
- });
197
- }
198
- });
199
- }
200
58
  /**
201
59
  * Creates a draft Order through one of three paths: (1) provide only order_template_new_id to load the saved template's core and record that template as the Order's provenance; (2) provide only order_template_new_core to materialize an ad hoc submitted core without template provenance; (3) provide both to record and validate the saved template as provenance while materializing the submitted core, without modifying the saved template. | authz: min_org_role=operator | (OrdersCreateDraftFromOrderTemplateNewReq) -> (OrdersOpenDraftRes)
202
60
  *
@@ -259,129 +117,6 @@ class Drafts {
259
117
  }
260
118
  });
261
119
  }
262
- /**
263
- * Deletes a draft order and all associated entities. | authz_personas=[draft_creator_org_operator] | () -> (bool)
264
- *
265
- * @param {string} orderId
266
- * @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
267
- *
268
- * @throws {@link Chrt.UnprocessableEntityError}
269
- *
270
- * @example
271
- * await client.shipping.orders.drafts.deleteV1("order_id")
272
- */
273
- deleteV1(orderId, requestOptions) {
274
- return core.HttpResponsePromise.fromPromise(this.__deleteV1(orderId, requestOptions));
275
- }
276
- __deleteV1(orderId, requestOptions) {
277
- return __awaiter(this, void 0, void 0, function* () {
278
- var _a, _b, _c, _d;
279
- 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);
280
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
281
- 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)}`),
282
- method: "DELETE",
283
- headers: _headers,
284
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
285
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
286
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
287
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
288
- });
289
- if (_response.ok) {
290
- return { data: _response.body, rawResponse: _response.rawResponse };
291
- }
292
- if (_response.error.reason === "status-code") {
293
- switch (_response.error.statusCode) {
294
- case 422:
295
- throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
296
- default:
297
- throw new errors.ChrtError({
298
- statusCode: _response.error.statusCode,
299
- body: _response.error.body,
300
- rawResponse: _response.rawResponse,
301
- });
302
- }
303
- }
304
- switch (_response.error.reason) {
305
- case "non-json":
306
- throw new errors.ChrtError({
307
- statusCode: _response.error.statusCode,
308
- body: _response.error.rawBody,
309
- rawResponse: _response.rawResponse,
310
- });
311
- case "timeout":
312
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /shipping/orders/drafts/delete/v1/{order_id}.");
313
- case "unknown":
314
- throw new errors.ChrtError({
315
- message: _response.error.errorMessage,
316
- rawResponse: _response.rawResponse,
317
- });
318
- }
319
- });
320
- }
321
- /**
322
- * Deletes multiple draft orders and associated entities. | authz_personas=[draft_creator_org_operator] | (OrdersDraftDeleteManyReq) -> (OrdersDraftDeleteManyRes)
323
- *
324
- * @param {Chrt.shipping.orders.OrdersDraftDeleteManyReq} request
325
- * @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
326
- *
327
- * @throws {@link Chrt.UnprocessableEntityError}
328
- *
329
- * @example
330
- * await client.shipping.orders.drafts.deleteManyV1({
331
- * order_ids: ["order_ids"]
332
- * })
333
- */
334
- deleteManyV1(request, requestOptions) {
335
- return core.HttpResponsePromise.fromPromise(this.__deleteManyV1(request, requestOptions));
336
- }
337
- __deleteManyV1(request, requestOptions) {
338
- return __awaiter(this, void 0, void 0, function* () {
339
- var _a, _b, _c, _d;
340
- 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);
341
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
342
- 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"),
343
- method: "DELETE",
344
- headers: _headers,
345
- contentType: "application/json",
346
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
347
- requestType: "json",
348
- body: request,
349
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
350
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
351
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
352
- });
353
- if (_response.ok) {
354
- return { data: _response.body, rawResponse: _response.rawResponse };
355
- }
356
- if (_response.error.reason === "status-code") {
357
- switch (_response.error.statusCode) {
358
- case 422:
359
- throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
360
- default:
361
- throw new errors.ChrtError({
362
- statusCode: _response.error.statusCode,
363
- body: _response.error.body,
364
- rawResponse: _response.rawResponse,
365
- });
366
- }
367
- }
368
- switch (_response.error.reason) {
369
- case "non-json":
370
- throw new errors.ChrtError({
371
- statusCode: _response.error.statusCode,
372
- body: _response.error.rawBody,
373
- rawResponse: _response.rawResponse,
374
- });
375
- case "timeout":
376
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /shipping/orders/drafts/delete_many/v1.");
377
- case "unknown":
378
- throw new errors.ChrtError({
379
- message: _response.error.errorMessage,
380
- rawResponse: _response.rawResponse,
381
- });
382
- }
383
- });
384
- }
385
120
  /**
386
121
  * Opens a new draft order shell with org assignments based on caller's organization type. | authz: min_org_role=operator | (OrdersOpenDraftReq) -> (OrdersOpenDraftRes)
387
122
  *
@@ -444,193 +179,6 @@ class Drafts {
444
179
  }
445
180
  });
446
181
  }
447
- /**
448
- * Sets the ordering of task groups within a draft order. Must provide all task group IDs with no duplicates. | (SetTaskGroupOrderingDraftReq) -> (bool)
449
- *
450
- * @param {string} orderId
451
- * @param {Chrt.shipping.orders.SetTaskGroupOrderingDraftReq} request
452
- * @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
453
- *
454
- * @throws {@link Chrt.UnprocessableEntityError}
455
- *
456
- * @example
457
- * await client.shipping.orders.drafts.setTaskGroupOrderingV1("order_id", {
458
- * task_group_ids: ["task_group_ids"]
459
- * })
460
- */
461
- setTaskGroupOrderingV1(orderId, request, requestOptions) {
462
- return core.HttpResponsePromise.fromPromise(this.__setTaskGroupOrderingV1(orderId, request, requestOptions));
463
- }
464
- __setTaskGroupOrderingV1(orderId, request, requestOptions) {
465
- return __awaiter(this, void 0, void 0, function* () {
466
- var _a, _b, _c, _d;
467
- 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);
468
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
469
- 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)}`),
470
- method: "PUT",
471
- headers: _headers,
472
- contentType: "application/json",
473
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
474
- requestType: "json",
475
- body: request,
476
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
477
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
478
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
479
- });
480
- if (_response.ok) {
481
- return { data: _response.body, rawResponse: _response.rawResponse };
482
- }
483
- if (_response.error.reason === "status-code") {
484
- switch (_response.error.statusCode) {
485
- case 422:
486
- throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
487
- default:
488
- throw new errors.ChrtError({
489
- statusCode: _response.error.statusCode,
490
- body: _response.error.body,
491
- rawResponse: _response.rawResponse,
492
- });
493
- }
494
- }
495
- switch (_response.error.reason) {
496
- case "non-json":
497
- throw new errors.ChrtError({
498
- statusCode: _response.error.statusCode,
499
- body: _response.error.rawBody,
500
- rawResponse: _response.rawResponse,
501
- });
502
- case "timeout":
503
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling PUT /shipping/orders/drafts/set_task_group_ordering/v1/{order_id}.");
504
- case "unknown":
505
- throw new errors.ChrtError({
506
- message: _response.error.errorMessage,
507
- rawResponse: _response.rawResponse,
508
- });
509
- }
510
- });
511
- }
512
- /**
513
- * Updates coordinator and/or shipper org assignments for a draft order. | authz_personas=[draft_creator_org_operator] | (OrdersDraftUpdateReq) -> (OrdersDraftUpdateRes)
514
- *
515
- * @param {string} orderId
516
- * @param {Chrt.shipping.orders.OrdersDraftUpdateReq} request
517
- * @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
518
- *
519
- * @throws {@link Chrt.UnprocessableEntityError}
520
- *
521
- * @example
522
- * await client.shipping.orders.drafts.updateV1("order_id")
523
- */
524
- updateV1(orderId, request = {}, requestOptions) {
525
- return core.HttpResponsePromise.fromPromise(this.__updateV1(orderId, request, requestOptions));
526
- }
527
- __updateV1(orderId_1) {
528
- return __awaiter(this, arguments, void 0, function* (orderId, request = {}, requestOptions) {
529
- var _a, _b, _c, _d;
530
- 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);
531
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
532
- 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)}`),
533
- method: "PATCH",
534
- headers: _headers,
535
- contentType: "application/json",
536
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
537
- requestType: "json",
538
- body: request,
539
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
540
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
541
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
542
- });
543
- if (_response.ok) {
544
- return { data: _response.body, rawResponse: _response.rawResponse };
545
- }
546
- if (_response.error.reason === "status-code") {
547
- switch (_response.error.statusCode) {
548
- case 422:
549
- throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
550
- default:
551
- throw new errors.ChrtError({
552
- statusCode: _response.error.statusCode,
553
- body: _response.error.body,
554
- rawResponse: _response.rawResponse,
555
- });
556
- }
557
- }
558
- switch (_response.error.reason) {
559
- case "non-json":
560
- throw new errors.ChrtError({
561
- statusCode: _response.error.statusCode,
562
- body: _response.error.rawBody,
563
- rawResponse: _response.rawResponse,
564
- });
565
- case "timeout":
566
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /shipping/orders/drafts/update/v1/{order_id}.");
567
- case "unknown":
568
- throw new errors.ChrtError({
569
- message: _response.error.errorMessage,
570
- rawResponse: _response.rawResponse,
571
- });
572
- }
573
- });
574
- }
575
- /**
576
- * Validates the draft order for staging and returns requirement results. | () -> (OrderDraftValidationResult)
577
- *
578
- * @param {string} orderId
579
- * @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
580
- *
581
- * @throws {@link Chrt.UnprocessableEntityError}
582
- *
583
- * @example
584
- * await client.shipping.orders.drafts.validateV1("order_id")
585
- */
586
- validateV1(orderId, requestOptions) {
587
- return core.HttpResponsePromise.fromPromise(this.__validateV1(orderId, requestOptions));
588
- }
589
- __validateV1(orderId, requestOptions) {
590
- return __awaiter(this, void 0, void 0, function* () {
591
- var _a, _b, _c, _d;
592
- 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);
593
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
594
- 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)}`),
595
- method: "GET",
596
- headers: _headers,
597
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
598
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
599
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
600
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
601
- });
602
- if (_response.ok) {
603
- return { data: _response.body, rawResponse: _response.rawResponse };
604
- }
605
- if (_response.error.reason === "status-code") {
606
- switch (_response.error.statusCode) {
607
- case 422:
608
- throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
609
- default:
610
- throw new errors.ChrtError({
611
- statusCode: _response.error.statusCode,
612
- body: _response.error.body,
613
- rawResponse: _response.rawResponse,
614
- });
615
- }
616
- }
617
- switch (_response.error.reason) {
618
- case "non-json":
619
- throw new errors.ChrtError({
620
- statusCode: _response.error.statusCode,
621
- body: _response.error.rawBody,
622
- rawResponse: _response.rawResponse,
623
- });
624
- case "timeout":
625
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping/orders/drafts/validate/v1/{order_id}.");
626
- case "unknown":
627
- throw new errors.ChrtError({
628
- message: _response.error.errorMessage,
629
- rawResponse: _response.rawResponse,
630
- });
631
- }
632
- });
633
- }
634
182
  _getAuthorizationHeader() {
635
183
  return __awaiter(this, void 0, void 0, function* () {
636
184
  const bearer = yield core.Supplier.get(this._options.token);
@@ -16,8 +16,6 @@ export interface OrdersOpenDraftReq {
16
16
  /** Must be a URL-safe string of 1-64 characters. Allowed characters: A-Z, a-z, 0-9, '.', '_', '~', '-' (RFC 3986 unreserved). */
17
17
  off_chrt_reference_id?: string | null;
18
18
  off_chrt_shipper_org_data_id?: string | null;
19
- /** Saved order template that seeded this draft. Used as template-build provenance. */
20
- order_template_id?: string | null;
21
19
  service_line?: Chrt.ServiceLineEnum;
22
20
  /** Must be a string starting with `org_` */
23
21
  shipper_org_id?: string | null;
@@ -1,6 +1,2 @@
1
- export { type DraftsAddCoordinatorTaskListToApplyAtOrderStagingV1Request } from "./DraftsAddCoordinatorTaskListToApplyAtOrderStagingV1Request.js";
2
1
  export { type OrdersCreateDraftFromOrderTemplateNewReq } from "./OrdersCreateDraftFromOrderTemplateNewReq.js";
3
- export { type OrdersDraftDeleteManyReq } from "./OrdersDraftDeleteManyReq.js";
4
2
  export { type OrdersOpenDraftReq } from "./OrdersOpenDraftReq.js";
5
- export { type SetTaskGroupOrderingDraftReq } from "./SetTaskGroupOrderingDraftReq.js";
6
- export { type OrdersDraftUpdateReq } from "./OrdersDraftUpdateReq.js";
@@ -1,2 +1 @@
1
1
  export * from "./client/index.js";
2
- export * from "./resources/index.js";
@@ -15,4 +15,3 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./client/index.js"), exports);
18
- __exportStar(require("./resources/index.js"), exports);