@chrt-inc/typescript-sdk 1.935.0 → 1.949.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 (216) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/shippingIntegrations/client/Client.d.ts +6 -0
  3. package/dist/cjs/api/resources/shippingIntegrations/client/Client.js +22 -12
  4. package/dist/cjs/api/resources/shippingIntegrations/resources/atlas/resources/orders/client/Client.d.ts +0 -16
  5. package/dist/cjs/api/resources/shippingIntegrations/resources/atlas/resources/orders/client/Client.js +0 -71
  6. package/dist/cjs/api/resources/shippingIntegrations/resources/atlas/resources/orders/client/requests/index.d.ts +0 -1
  7. package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/client/Client.d.ts +26 -0
  8. package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/client/Client.js +22 -0
  9. package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/client/index.d.ts +1 -0
  10. package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/client/index.js +2 -0
  11. package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/index.d.ts +2 -0
  12. package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/index.js +18 -0
  13. package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/creds/client/Client.d.ts +119 -0
  14. package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/creds/client/Client.js +430 -0
  15. package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/creds/client/index.d.ts +2 -0
  16. package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/creds/client/index.js +17 -0
  17. package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/creds/client/requests/EcourierCredsClientCreate1.d.ts +26 -0
  18. package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/creds/client/requests/EcourierCredsClientUpdate1.d.ts +15 -0
  19. package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/creds/client/requests/index.d.ts +2 -0
  20. package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/creds/client/requests/index.js +2 -0
  21. package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/creds/index.d.ts +1 -0
  22. package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/creds/index.js +17 -0
  23. package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/index.d.ts +4 -0
  24. package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/index.js +43 -0
  25. package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/Client.d.ts +104 -0
  26. package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/Client.js +371 -0
  27. package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/index.d.ts +2 -0
  28. package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/index.js +17 -0
  29. package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/requests/EcourierOrderSyncOneReq.d.ts +15 -0
  30. package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/requests/EcourierOrderSyncOneReq.js +5 -0
  31. package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/requests/OrdersListV1Request.d.ts +48 -0
  32. package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/requests/OrdersListV1Request.js +5 -0
  33. package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/requests/index.d.ts +2 -0
  34. package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/requests/index.js +2 -0
  35. package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/orders/index.d.ts +1 -0
  36. package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/orders/index.js +17 -0
  37. package/dist/cjs/api/resources/shippingIntegrations/resources/index.d.ts +2 -0
  38. package/dist/cjs/api/resources/shippingIntegrations/resources/index.js +3 -1
  39. package/dist/cjs/api/resources/shippingIntegrations/resources/integrationExecutors/client/Client.d.ts +44 -0
  40. package/dist/cjs/api/resources/shippingIntegrations/resources/integrationExecutors/client/Client.js +121 -0
  41. package/dist/cjs/api/resources/shippingIntegrations/resources/integrationExecutors/client/index.d.ts +1 -0
  42. package/dist/cjs/api/resources/shippingIntegrations/resources/integrationExecutors/client/index.js +2 -0
  43. package/dist/cjs/api/resources/shippingIntegrations/resources/integrationExecutors/index.d.ts +1 -0
  44. package/dist/cjs/api/resources/shippingIntegrations/resources/integrationExecutors/index.js +17 -0
  45. package/dist/cjs/api/resources/shippingIntegrations/resources/orders/client/Client.d.ts +35 -2
  46. package/dist/cjs/api/resources/shippingIntegrations/resources/orders/client/Client.js +152 -4
  47. package/dist/cjs/api/resources/shippingIntegrations/resources/orders/client/requests/OrdersListForIntegrationExecutorOperatorsV1Request.d.ts +54 -0
  48. package/dist/cjs/api/resources/shippingIntegrations/resources/orders/client/requests/OrdersListForIntegrationExecutorOperatorsV1Request.js +5 -0
  49. package/dist/cjs/api/resources/shippingIntegrations/resources/orders/client/requests/OrdersListV1Request.d.ts +6 -0
  50. package/dist/cjs/api/resources/shippingIntegrations/resources/orders/client/requests/OrdersStatusSummaryV1Request.d.ts +6 -0
  51. package/dist/cjs/api/resources/shippingIntegrations/resources/orders/client/requests/index.d.ts +1 -0
  52. package/dist/cjs/api/resources/shippingIntegrations/resources/xcelerator/resources/orders/client/Client.d.ts +0 -16
  53. package/dist/cjs/api/resources/shippingIntegrations/resources/xcelerator/resources/orders/client/Client.js +0 -71
  54. package/dist/cjs/api/resources/shippingIntegrations/resources/xcelerator/resources/orders/client/requests/index.d.ts +0 -1
  55. package/dist/cjs/api/types/EcourierCredsLimited1.d.ts +29 -0
  56. package/dist/cjs/api/types/EcourierCredsLimited1.js +5 -0
  57. package/dist/cjs/api/types/EcourierCredsListRes.d.ts +8 -0
  58. package/dist/cjs/api/types/EcourierCredsListRes.js +5 -0
  59. package/dist/cjs/api/types/EcourierCredsTestRes.d.ts +11 -0
  60. package/dist/cjs/api/types/EcourierCredsTestRes.js +5 -0
  61. package/dist/cjs/api/types/EcourierOrder1.d.ts +19 -0
  62. package/dist/cjs/api/types/EcourierOrder1.js +5 -0
  63. package/dist/cjs/api/types/EcourierOrderCustomerResponse1.d.ts +16 -0
  64. package/dist/cjs/api/types/EcourierOrderCustomerResponse1.js +5 -0
  65. package/dist/cjs/api/types/EcourierOrderListRes.d.ts +8 -0
  66. package/dist/cjs/api/types/EcourierOrderListRes.js +5 -0
  67. package/dist/cjs/api/types/EcourierOrderResponse1.d.ts +43 -0
  68. package/dist/cjs/api/types/EcourierOrderResponse1.js +5 -0
  69. package/dist/cjs/api/types/EcourierOrderSortByEnum.d.ts +10 -0
  70. package/dist/cjs/api/types/EcourierOrderSortByEnum.js +12 -0
  71. package/dist/cjs/api/types/EcourierOrderStopResponse1.d.ts +27 -0
  72. package/dist/cjs/api/types/EcourierOrderStopResponse1.js +5 -0
  73. package/dist/cjs/api/types/FraytWebhookResponse.d.ts +7 -0
  74. package/dist/cjs/api/types/FraytWebhookResponse.js +5 -0
  75. package/dist/cjs/api/types/NotificationEventsForOrgsEnum.d.ts +6 -1
  76. package/dist/cjs/api/types/NotificationEventsForOrgsEnum.js +5 -0
  77. package/dist/cjs/api/types/NotificationEventsForUsersEnum.d.ts +6 -1
  78. package/dist/cjs/api/types/NotificationEventsForUsersEnum.js +5 -0
  79. package/dist/cjs/api/types/OrgShippingIntegrationEnum1.d.ts +2 -1
  80. package/dist/cjs/api/types/OrgShippingIntegrationEnum1.js +1 -0
  81. package/dist/cjs/api/types/ShippingIntegrationIntegrationExecutor.d.ts +17 -0
  82. package/dist/cjs/api/types/ShippingIntegrationIntegrationExecutor.js +5 -0
  83. package/dist/cjs/api/types/ShippingIntegrationIntegrationExecutorListRes.d.ts +8 -0
  84. package/dist/cjs/api/types/ShippingIntegrationIntegrationExecutorListRes.js +5 -0
  85. package/dist/cjs/api/types/ShippingIntegrationOrderCompletedAtProvenanceEnum1.d.ts +8 -0
  86. package/dist/cjs/api/types/ShippingIntegrationOrderCompletedAtProvenanceEnum1.js +10 -0
  87. package/dist/cjs/api/types/ShippingIntegrationOrderExpanded1.d.ts +3 -0
  88. package/dist/cjs/api/types/ShippingIntegrationOrderSortByEnum.d.ts +2 -1
  89. package/dist/cjs/api/types/ShippingIntegrationOrderSortByEnum.js +1 -0
  90. package/dist/cjs/api/types/ShippingIntegrationOrderStatusChange1.d.ts +17 -0
  91. package/dist/cjs/api/types/ShippingIntegrationOrderStatusChange1.js +5 -0
  92. package/dist/cjs/api/types/ShippingIntegrationOrderStatusChangedReq.d.ts +12 -0
  93. package/dist/cjs/api/types/ShippingIntegrationOrderStatusChangedReq.js +5 -0
  94. package/dist/cjs/api/types/ShippingIntegrationOrderStatusChangedRes.d.ts +6 -0
  95. package/dist/cjs/api/types/ShippingIntegrationOrderStatusChangedRes.js +5 -0
  96. package/dist/cjs/api/types/ShippingIntegrationOrderStatusChangedWebhookPayload.d.ts +37 -0
  97. package/dist/cjs/api/types/ShippingIntegrationOrderStatusChangedWebhookPayload.js +16 -0
  98. package/dist/cjs/api/types/ShippingIntegrationOrderTypeaheadFieldEnum.d.ts +5 -1
  99. package/dist/cjs/api/types/ShippingIntegrationOrderTypeaheadFieldEnum.js +5 -0
  100. package/dist/cjs/api/types/index.d.ts +17 -0
  101. package/dist/cjs/api/types/index.js +17 -0
  102. package/dist/cjs/version.d.ts +1 -1
  103. package/dist/cjs/version.js +1 -1
  104. package/dist/esm/Client.mjs +2 -2
  105. package/dist/esm/api/resources/shippingIntegrations/client/Client.d.mts +6 -0
  106. package/dist/esm/api/resources/shippingIntegrations/client/Client.mjs +10 -0
  107. package/dist/esm/api/resources/shippingIntegrations/resources/atlas/resources/orders/client/Client.d.mts +0 -16
  108. package/dist/esm/api/resources/shippingIntegrations/resources/atlas/resources/orders/client/Client.mjs +0 -71
  109. package/dist/esm/api/resources/shippingIntegrations/resources/atlas/resources/orders/client/requests/index.d.mts +0 -1
  110. package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/client/Client.d.mts +26 -0
  111. package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/client/Client.mjs +18 -0
  112. package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/client/index.d.mts +1 -0
  113. package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/client/index.mjs +1 -0
  114. package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/index.d.mts +2 -0
  115. package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/index.mjs +2 -0
  116. package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/creds/client/Client.d.mts +119 -0
  117. package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/creds/client/Client.mjs +393 -0
  118. package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/creds/client/index.d.mts +2 -0
  119. package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/creds/client/index.mjs +1 -0
  120. package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/creds/client/requests/EcourierCredsClientCreate1.d.mts +26 -0
  121. package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/creds/client/requests/EcourierCredsClientUpdate1.d.mts +15 -0
  122. package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/creds/client/requests/index.d.mts +2 -0
  123. package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/creds/client/requests/index.mjs +1 -0
  124. package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/creds/index.d.mts +1 -0
  125. package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/creds/index.mjs +1 -0
  126. package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/index.d.mts +4 -0
  127. package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/index.mjs +4 -0
  128. package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/Client.d.mts +104 -0
  129. package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/Client.mjs +334 -0
  130. package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/index.d.mts +2 -0
  131. package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/index.mjs +1 -0
  132. package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/requests/EcourierOrderSyncOneReq.d.mts +15 -0
  133. package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/requests/EcourierOrderSyncOneReq.mjs +4 -0
  134. package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/requests/OrdersListV1Request.d.mts +48 -0
  135. package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/requests/OrdersListV1Request.mjs +4 -0
  136. package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/requests/index.d.mts +2 -0
  137. package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/requests/index.mjs +1 -0
  138. package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/orders/index.d.mts +1 -0
  139. package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/orders/index.mjs +1 -0
  140. package/dist/esm/api/resources/shippingIntegrations/resources/index.d.mts +2 -0
  141. package/dist/esm/api/resources/shippingIntegrations/resources/index.mjs +2 -0
  142. package/dist/esm/api/resources/shippingIntegrations/resources/integrationExecutors/client/Client.d.mts +44 -0
  143. package/dist/esm/api/resources/shippingIntegrations/resources/integrationExecutors/client/Client.mjs +84 -0
  144. package/dist/esm/api/resources/shippingIntegrations/resources/integrationExecutors/client/index.d.mts +1 -0
  145. package/dist/esm/api/resources/shippingIntegrations/resources/integrationExecutors/client/index.mjs +1 -0
  146. package/dist/esm/api/resources/shippingIntegrations/resources/integrationExecutors/index.d.mts +1 -0
  147. package/dist/esm/api/resources/shippingIntegrations/resources/integrationExecutors/index.mjs +1 -0
  148. package/dist/esm/api/resources/shippingIntegrations/resources/orders/client/Client.d.mts +35 -2
  149. package/dist/esm/api/resources/shippingIntegrations/resources/orders/client/Client.mjs +152 -4
  150. package/dist/esm/api/resources/shippingIntegrations/resources/orders/client/requests/OrdersListForIntegrationExecutorOperatorsV1Request.d.mts +54 -0
  151. package/dist/esm/api/resources/shippingIntegrations/resources/orders/client/requests/OrdersListForIntegrationExecutorOperatorsV1Request.mjs +4 -0
  152. package/dist/esm/api/resources/shippingIntegrations/resources/orders/client/requests/OrdersListV1Request.d.mts +6 -0
  153. package/dist/esm/api/resources/shippingIntegrations/resources/orders/client/requests/OrdersStatusSummaryV1Request.d.mts +6 -0
  154. package/dist/esm/api/resources/shippingIntegrations/resources/orders/client/requests/index.d.mts +1 -0
  155. package/dist/esm/api/resources/shippingIntegrations/resources/xcelerator/resources/orders/client/Client.d.mts +0 -16
  156. package/dist/esm/api/resources/shippingIntegrations/resources/xcelerator/resources/orders/client/Client.mjs +0 -71
  157. package/dist/esm/api/resources/shippingIntegrations/resources/xcelerator/resources/orders/client/requests/index.d.mts +0 -1
  158. package/dist/esm/api/types/EcourierCredsLimited1.d.mts +29 -0
  159. package/dist/esm/api/types/EcourierCredsLimited1.mjs +4 -0
  160. package/dist/esm/api/types/EcourierCredsListRes.d.mts +8 -0
  161. package/dist/esm/api/types/EcourierCredsListRes.mjs +4 -0
  162. package/dist/esm/api/types/EcourierCredsTestRes.d.mts +11 -0
  163. package/dist/esm/api/types/EcourierCredsTestRes.mjs +4 -0
  164. package/dist/esm/api/types/EcourierOrder1.d.mts +19 -0
  165. package/dist/esm/api/types/EcourierOrder1.mjs +4 -0
  166. package/dist/esm/api/types/EcourierOrderCustomerResponse1.d.mts +16 -0
  167. package/dist/esm/api/types/EcourierOrderCustomerResponse1.mjs +4 -0
  168. package/dist/esm/api/types/EcourierOrderListRes.d.mts +8 -0
  169. package/dist/esm/api/types/EcourierOrderListRes.mjs +4 -0
  170. package/dist/esm/api/types/EcourierOrderResponse1.d.mts +43 -0
  171. package/dist/esm/api/types/EcourierOrderResponse1.mjs +4 -0
  172. package/dist/esm/api/types/EcourierOrderSortByEnum.d.mts +10 -0
  173. package/dist/esm/api/types/EcourierOrderSortByEnum.mjs +9 -0
  174. package/dist/esm/api/types/EcourierOrderStopResponse1.d.mts +27 -0
  175. package/dist/esm/api/types/EcourierOrderStopResponse1.mjs +4 -0
  176. package/dist/esm/api/types/FraytWebhookResponse.d.mts +7 -0
  177. package/dist/esm/api/types/FraytWebhookResponse.mjs +4 -0
  178. package/dist/esm/api/types/NotificationEventsForOrgsEnum.d.mts +6 -1
  179. package/dist/esm/api/types/NotificationEventsForOrgsEnum.mjs +5 -0
  180. package/dist/esm/api/types/NotificationEventsForUsersEnum.d.mts +6 -1
  181. package/dist/esm/api/types/NotificationEventsForUsersEnum.mjs +5 -0
  182. package/dist/esm/api/types/OrgShippingIntegrationEnum1.d.mts +2 -1
  183. package/dist/esm/api/types/OrgShippingIntegrationEnum1.mjs +1 -0
  184. package/dist/esm/api/types/ShippingIntegrationIntegrationExecutor.d.mts +17 -0
  185. package/dist/esm/api/types/ShippingIntegrationIntegrationExecutor.mjs +4 -0
  186. package/dist/esm/api/types/ShippingIntegrationIntegrationExecutorListRes.d.mts +8 -0
  187. package/dist/esm/api/types/ShippingIntegrationIntegrationExecutorListRes.mjs +4 -0
  188. package/dist/esm/api/types/ShippingIntegrationOrderCompletedAtProvenanceEnum1.d.mts +8 -0
  189. package/dist/esm/api/types/ShippingIntegrationOrderCompletedAtProvenanceEnum1.mjs +7 -0
  190. package/dist/esm/api/types/ShippingIntegrationOrderExpanded1.d.mts +3 -0
  191. package/dist/esm/api/types/ShippingIntegrationOrderSortByEnum.d.mts +2 -1
  192. package/dist/esm/api/types/ShippingIntegrationOrderSortByEnum.mjs +1 -0
  193. package/dist/esm/api/types/ShippingIntegrationOrderStatusChange1.d.mts +17 -0
  194. package/dist/esm/api/types/ShippingIntegrationOrderStatusChange1.mjs +4 -0
  195. package/dist/esm/api/types/ShippingIntegrationOrderStatusChangedReq.d.mts +12 -0
  196. package/dist/esm/api/types/ShippingIntegrationOrderStatusChangedReq.mjs +4 -0
  197. package/dist/esm/api/types/ShippingIntegrationOrderStatusChangedRes.d.mts +6 -0
  198. package/dist/esm/api/types/ShippingIntegrationOrderStatusChangedRes.mjs +4 -0
  199. package/dist/esm/api/types/ShippingIntegrationOrderStatusChangedWebhookPayload.d.mts +37 -0
  200. package/dist/esm/api/types/ShippingIntegrationOrderStatusChangedWebhookPayload.mjs +13 -0
  201. package/dist/esm/api/types/ShippingIntegrationOrderTypeaheadFieldEnum.d.mts +5 -1
  202. package/dist/esm/api/types/ShippingIntegrationOrderTypeaheadFieldEnum.mjs +4 -1
  203. package/dist/esm/api/types/index.d.mts +17 -0
  204. package/dist/esm/api/types/index.mjs +17 -0
  205. package/dist/esm/version.d.mts +1 -1
  206. package/dist/esm/version.mjs +1 -1
  207. package/package.json +1 -1
  208. package/reference.md +848 -162
  209. package/dist/cjs/api/resources/shippingIntegrations/resources/atlas/resources/orders/client/requests/OrdersTypeaheadV1Request.d.ts +0 -16
  210. package/dist/cjs/api/resources/shippingIntegrations/resources/xcelerator/resources/orders/client/requests/OrdersTypeaheadV1Request.d.ts +0 -16
  211. package/dist/esm/api/resources/shippingIntegrations/resources/atlas/resources/orders/client/requests/OrdersTypeaheadV1Request.d.mts +0 -16
  212. package/dist/esm/api/resources/shippingIntegrations/resources/xcelerator/resources/orders/client/requests/OrdersTypeaheadV1Request.d.mts +0 -16
  213. /package/dist/cjs/api/resources/shippingIntegrations/resources/{atlas/resources/orders/client/requests/OrdersTypeaheadV1Request.js → ecourier/resources/creds/client/requests/EcourierCredsClientCreate1.js} +0 -0
  214. /package/dist/cjs/api/resources/shippingIntegrations/resources/{xcelerator/resources/orders/client/requests/OrdersTypeaheadV1Request.js → ecourier/resources/creds/client/requests/EcourierCredsClientUpdate1.js} +0 -0
  215. /package/dist/esm/api/resources/shippingIntegrations/resources/{atlas/resources/orders/client/requests/OrdersTypeaheadV1Request.mjs → ecourier/resources/creds/client/requests/EcourierCredsClientCreate1.mjs} +0 -0
  216. /package/dist/esm/api/resources/shippingIntegrations/resources/{xcelerator/resources/orders/client/requests/OrdersTypeaheadV1Request.mjs → ecourier/resources/creds/client/requests/EcourierCredsClientUpdate1.mjs} +0 -0
@@ -0,0 +1,104 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as environments from "../../../../../../../../environments.js";
5
+ import * as core from "../../../../../../../../core/index.js";
6
+ import * as Chrt from "../../../../../../../index.js";
7
+ export declare namespace Orders {
8
+ interface Options {
9
+ environment?: core.Supplier<environments.ChrtEnvironment | string>;
10
+ /** Specify a custom URL to connect the client to. */
11
+ baseUrl?: core.Supplier<string>;
12
+ token?: core.Supplier<core.BearerToken | undefined>;
13
+ /** Additional headers to include in requests. */
14
+ headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
15
+ fetcher?: core.FetchFunction;
16
+ }
17
+ interface RequestOptions {
18
+ /** The maximum time to wait for a response in seconds. */
19
+ timeoutInSeconds?: number;
20
+ /** The number of times to retry the request. Defaults to 2. */
21
+ maxRetries?: number;
22
+ /** A hook to abort the request. */
23
+ abortSignal?: AbortSignal;
24
+ /** Additional query string parameters to include in the request. */
25
+ queryParams?: Record<string, unknown>;
26
+ /** Additional headers to include in the request. */
27
+ headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
28
+ }
29
+ }
30
+ export declare class Orders {
31
+ protected readonly _options: Orders.Options;
32
+ constructor(_options?: Orders.Options);
33
+ /**
34
+ * Returns one mirrored e-Courier order by the provider's own order number. | () -> (EcourierOrder1)
35
+ *
36
+ * @param {string} providerOrgId - CHRT org ID of the courier whose e-Courier database holds the order
37
+ * @param {string} integrationOrderId - e-Courier's own order number for the order, as carried on a unified order row
38
+ * @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
39
+ *
40
+ * @throws {@link Chrt.UnprocessableEntityError}
41
+ *
42
+ * @example
43
+ * await client.shippingIntegrations.ecourier.orders.detailByIntegrationOrderIdV1("provider_org_id", "integration_order_id")
44
+ */
45
+ detailByIntegrationOrderIdV1(providerOrgId: string, integrationOrderId: string, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<Chrt.EcourierOrder1>;
46
+ private __detailByIntegrationOrderIdV1;
47
+ /**
48
+ * Returns one mirrored e-Courier order by its Mongo ObjectId. | () -> (EcourierOrder1)
49
+ *
50
+ * @param {string} id - Mongo ObjectId of the mirror document. e-Courier's own order number is the integration_order_id, accepted by the by_integration_order_id route.
51
+ * @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
52
+ *
53
+ * @throws {@link Chrt.UnprocessableEntityError}
54
+ *
55
+ * @example
56
+ * await client.shippingIntegrations.ecourier.orders.detailV1("id")
57
+ */
58
+ detailV1(id: string, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<Chrt.EcourierOrder1>;
59
+ private __detailV1;
60
+ /**
61
+ * Lists mirrored e-Courier orders for the caller's organization with filtering, sorting, and pagination. | () -> (EcourierOrderListRes)
62
+ *
63
+ * @param {Chrt.shippingIntegrations.ecourier.OrdersListV1Request} request
64
+ * @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
65
+ *
66
+ * @throws {@link Chrt.UnprocessableEntityError}
67
+ *
68
+ * @example
69
+ * await client.shippingIntegrations.ecourier.orders.listV1({
70
+ * sort_by: "mirrored_at_timestamp",
71
+ * sort_order: "asc",
72
+ * page: 1,
73
+ * page_size: 1,
74
+ * filter_provider_org_id: ["filter_provider_org_id"],
75
+ * filter_integration_order_id: "filter_integration_order_id",
76
+ * filter_provider_status_raw: "filter_provider_status_raw",
77
+ * filter_mirrored_at_timestamp_gte: "2024-01-15T09:30:00Z",
78
+ * filter_mirrored_at_timestamp_lte: "2024-01-15T09:30:00Z",
79
+ * filter_created_at_timestamp_gte: "2024-01-15T09:30:00Z",
80
+ * filter_created_at_timestamp_lte: "2024-01-15T09:30:00Z",
81
+ * filter_updated_at_timestamp_gte: "2024-01-15T09:30:00Z",
82
+ * filter_updated_at_timestamp_lte: "2024-01-15T09:30:00Z"
83
+ * })
84
+ */
85
+ listV1(request?: Chrt.shippingIntegrations.ecourier.OrdersListV1Request, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<Chrt.EcourierOrderListRes>;
86
+ private __listV1;
87
+ /**
88
+ * Fetches and mirrors one e-Courier order by the provider's own order number, updating the unified order list alongside it. | authz: min_org_role=operator | (EcourierOrderSyncOneReq) -> (EcourierOrder1)
89
+ *
90
+ * @param {Chrt.shippingIntegrations.ecourier.EcourierOrderSyncOneReq} request
91
+ * @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
92
+ *
93
+ * @throws {@link Chrt.UnprocessableEntityError}
94
+ *
95
+ * @example
96
+ * await client.shippingIntegrations.ecourier.orders.syncOneV1({
97
+ * integration_order_id: "integration_order_id",
98
+ * provider_org_id: "provider_org_id"
99
+ * })
100
+ */
101
+ syncOneV1(request: Chrt.shippingIntegrations.ecourier.EcourierOrderSyncOneReq, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<Chrt.EcourierOrder1>;
102
+ private __syncOneV1;
103
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
104
+ }
@@ -0,0 +1,371 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
39
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
40
+ return new (P || (P = Promise))(function (resolve, reject) {
41
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
42
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
43
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
44
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
45
+ });
46
+ };
47
+ Object.defineProperty(exports, "__esModule", { value: true });
48
+ exports.Orders = void 0;
49
+ const environments = __importStar(require("../../../../../../../../environments.js"));
50
+ const core = __importStar(require("../../../../../../../../core/index.js"));
51
+ const Chrt = __importStar(require("../../../../../../../index.js"));
52
+ const headers_js_1 = require("../../../../../../../../core/headers.js");
53
+ const errors = __importStar(require("../../../../../../../../errors/index.js"));
54
+ class Orders {
55
+ constructor(_options = {}) {
56
+ this._options = _options;
57
+ }
58
+ /**
59
+ * Returns one mirrored e-Courier order by the provider's own order number. | () -> (EcourierOrder1)
60
+ *
61
+ * @param {string} providerOrgId - CHRT org ID of the courier whose e-Courier database holds the order
62
+ * @param {string} integrationOrderId - e-Courier's own order number for the order, as carried on a unified order row
63
+ * @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
64
+ *
65
+ * @throws {@link Chrt.UnprocessableEntityError}
66
+ *
67
+ * @example
68
+ * await client.shippingIntegrations.ecourier.orders.detailByIntegrationOrderIdV1("provider_org_id", "integration_order_id")
69
+ */
70
+ detailByIntegrationOrderIdV1(providerOrgId, integrationOrderId, requestOptions) {
71
+ return core.HttpResponsePromise.fromPromise(this.__detailByIntegrationOrderIdV1(providerOrgId, integrationOrderId, requestOptions));
72
+ }
73
+ __detailByIntegrationOrderIdV1(providerOrgId, integrationOrderId, requestOptions) {
74
+ return __awaiter(this, void 0, void 0, function* () {
75
+ var _a, _b, _c, _d;
76
+ 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);
77
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
78
+ 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_integrations/ecourier/orders/by_integration_order_id/detail/v1/${encodeURIComponent(providerOrgId)}/${encodeURIComponent(integrationOrderId)}`),
79
+ method: "GET",
80
+ headers: _headers,
81
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
82
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
83
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
84
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
85
+ });
86
+ if (_response.ok) {
87
+ return { data: _response.body, rawResponse: _response.rawResponse };
88
+ }
89
+ if (_response.error.reason === "status-code") {
90
+ switch (_response.error.statusCode) {
91
+ case 422:
92
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
93
+ default:
94
+ throw new errors.ChrtError({
95
+ statusCode: _response.error.statusCode,
96
+ body: _response.error.body,
97
+ rawResponse: _response.rawResponse,
98
+ });
99
+ }
100
+ }
101
+ switch (_response.error.reason) {
102
+ case "non-json":
103
+ throw new errors.ChrtError({
104
+ statusCode: _response.error.statusCode,
105
+ body: _response.error.rawBody,
106
+ rawResponse: _response.rawResponse,
107
+ });
108
+ case "timeout":
109
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping_integrations/ecourier/orders/by_integration_order_id/detail/v1/{provider_org_id}/{integration_order_id}.");
110
+ case "unknown":
111
+ throw new errors.ChrtError({
112
+ message: _response.error.errorMessage,
113
+ rawResponse: _response.rawResponse,
114
+ });
115
+ }
116
+ });
117
+ }
118
+ /**
119
+ * Returns one mirrored e-Courier order by its Mongo ObjectId. | () -> (EcourierOrder1)
120
+ *
121
+ * @param {string} id - Mongo ObjectId of the mirror document. e-Courier's own order number is the integration_order_id, accepted by the by_integration_order_id route.
122
+ * @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
123
+ *
124
+ * @throws {@link Chrt.UnprocessableEntityError}
125
+ *
126
+ * @example
127
+ * await client.shippingIntegrations.ecourier.orders.detailV1("id")
128
+ */
129
+ detailV1(id, requestOptions) {
130
+ return core.HttpResponsePromise.fromPromise(this.__detailV1(id, requestOptions));
131
+ }
132
+ __detailV1(id, requestOptions) {
133
+ return __awaiter(this, void 0, void 0, function* () {
134
+ var _a, _b, _c, _d;
135
+ 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);
136
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
137
+ 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_integrations/ecourier/orders/detail/v1/${encodeURIComponent(id)}`),
138
+ method: "GET",
139
+ headers: _headers,
140
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
141
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
142
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
143
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
144
+ });
145
+ if (_response.ok) {
146
+ return { data: _response.body, rawResponse: _response.rawResponse };
147
+ }
148
+ if (_response.error.reason === "status-code") {
149
+ switch (_response.error.statusCode) {
150
+ case 422:
151
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
152
+ default:
153
+ throw new errors.ChrtError({
154
+ statusCode: _response.error.statusCode,
155
+ body: _response.error.body,
156
+ rawResponse: _response.rawResponse,
157
+ });
158
+ }
159
+ }
160
+ switch (_response.error.reason) {
161
+ case "non-json":
162
+ throw new errors.ChrtError({
163
+ statusCode: _response.error.statusCode,
164
+ body: _response.error.rawBody,
165
+ rawResponse: _response.rawResponse,
166
+ });
167
+ case "timeout":
168
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping_integrations/ecourier/orders/detail/v1/{id}.");
169
+ case "unknown":
170
+ throw new errors.ChrtError({
171
+ message: _response.error.errorMessage,
172
+ rawResponse: _response.rawResponse,
173
+ });
174
+ }
175
+ });
176
+ }
177
+ /**
178
+ * Lists mirrored e-Courier orders for the caller's organization with filtering, sorting, and pagination. | () -> (EcourierOrderListRes)
179
+ *
180
+ * @param {Chrt.shippingIntegrations.ecourier.OrdersListV1Request} request
181
+ * @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
182
+ *
183
+ * @throws {@link Chrt.UnprocessableEntityError}
184
+ *
185
+ * @example
186
+ * await client.shippingIntegrations.ecourier.orders.listV1({
187
+ * sort_by: "mirrored_at_timestamp",
188
+ * sort_order: "asc",
189
+ * page: 1,
190
+ * page_size: 1,
191
+ * filter_provider_org_id: ["filter_provider_org_id"],
192
+ * filter_integration_order_id: "filter_integration_order_id",
193
+ * filter_provider_status_raw: "filter_provider_status_raw",
194
+ * filter_mirrored_at_timestamp_gte: "2024-01-15T09:30:00Z",
195
+ * filter_mirrored_at_timestamp_lte: "2024-01-15T09:30:00Z",
196
+ * filter_created_at_timestamp_gte: "2024-01-15T09:30:00Z",
197
+ * filter_created_at_timestamp_lte: "2024-01-15T09:30:00Z",
198
+ * filter_updated_at_timestamp_gte: "2024-01-15T09:30:00Z",
199
+ * filter_updated_at_timestamp_lte: "2024-01-15T09:30:00Z"
200
+ * })
201
+ */
202
+ listV1(request = {}, requestOptions) {
203
+ return core.HttpResponsePromise.fromPromise(this.__listV1(request, requestOptions));
204
+ }
205
+ __listV1() {
206
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
207
+ var _a, _b, _c, _d, _e, _f;
208
+ const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, filter_provider_org_id: filterProviderOrgId, filter_integration_order_id: filterIntegrationOrderId, filter_provider_status_raw: filterProviderStatusRaw, filter_mirrored_at_timestamp_gte: filterMirroredAtTimestampGte, filter_mirrored_at_timestamp_lte: filterMirroredAtTimestampLte, filter_created_at_timestamp_gte: filterCreatedAtTimestampGte, filter_created_at_timestamp_lte: filterCreatedAtTimestampLte, filter_updated_at_timestamp_gte: filterUpdatedAtTimestampGte, filter_updated_at_timestamp_lte: filterUpdatedAtTimestampLte, } = request;
209
+ const _queryParams = {};
210
+ if (sortBy !== undefined) {
211
+ _queryParams["sort_by"] = sortBy;
212
+ }
213
+ if (sortOrder !== undefined) {
214
+ _queryParams["sort_order"] = sortOrder;
215
+ }
216
+ if (page !== undefined) {
217
+ _queryParams["page"] = (_a = page === null || page === void 0 ? void 0 : page.toString()) !== null && _a !== void 0 ? _a : null;
218
+ }
219
+ if (pageSize !== undefined) {
220
+ _queryParams["page_size"] = (_b = pageSize === null || pageSize === void 0 ? void 0 : pageSize.toString()) !== null && _b !== void 0 ? _b : null;
221
+ }
222
+ if (filterProviderOrgId !== undefined) {
223
+ if (Array.isArray(filterProviderOrgId)) {
224
+ _queryParams["filter_provider_org_id"] = filterProviderOrgId.map((item) => item);
225
+ }
226
+ else {
227
+ _queryParams["filter_provider_org_id"] = filterProviderOrgId;
228
+ }
229
+ }
230
+ if (filterIntegrationOrderId !== undefined) {
231
+ _queryParams["filter_integration_order_id"] = filterIntegrationOrderId;
232
+ }
233
+ if (filterProviderStatusRaw !== undefined) {
234
+ _queryParams["filter_provider_status_raw"] = filterProviderStatusRaw;
235
+ }
236
+ if (filterMirroredAtTimestampGte !== undefined) {
237
+ _queryParams["filter_mirrored_at_timestamp_gte"] = filterMirroredAtTimestampGte;
238
+ }
239
+ if (filterMirroredAtTimestampLte !== undefined) {
240
+ _queryParams["filter_mirrored_at_timestamp_lte"] = filterMirroredAtTimestampLte;
241
+ }
242
+ if (filterCreatedAtTimestampGte !== undefined) {
243
+ _queryParams["filter_created_at_timestamp_gte"] = filterCreatedAtTimestampGte;
244
+ }
245
+ if (filterCreatedAtTimestampLte !== undefined) {
246
+ _queryParams["filter_created_at_timestamp_lte"] = filterCreatedAtTimestampLte;
247
+ }
248
+ if (filterUpdatedAtTimestampGte !== undefined) {
249
+ _queryParams["filter_updated_at_timestamp_gte"] = filterUpdatedAtTimestampGte;
250
+ }
251
+ if (filterUpdatedAtTimestampLte !== undefined) {
252
+ _queryParams["filter_updated_at_timestamp_lte"] = filterUpdatedAtTimestampLte;
253
+ }
254
+ let _headers = (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
255
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
256
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ChrtEnvironment.Local, "shipping_integrations/ecourier/orders/list/v1"),
257
+ method: "GET",
258
+ headers: _headers,
259
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
260
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
261
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
262
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
263
+ });
264
+ if (_response.ok) {
265
+ return { data: _response.body, rawResponse: _response.rawResponse };
266
+ }
267
+ if (_response.error.reason === "status-code") {
268
+ switch (_response.error.statusCode) {
269
+ case 422:
270
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
271
+ default:
272
+ throw new errors.ChrtError({
273
+ statusCode: _response.error.statusCode,
274
+ body: _response.error.body,
275
+ rawResponse: _response.rawResponse,
276
+ });
277
+ }
278
+ }
279
+ switch (_response.error.reason) {
280
+ case "non-json":
281
+ throw new errors.ChrtError({
282
+ statusCode: _response.error.statusCode,
283
+ body: _response.error.rawBody,
284
+ rawResponse: _response.rawResponse,
285
+ });
286
+ case "timeout":
287
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping_integrations/ecourier/orders/list/v1.");
288
+ case "unknown":
289
+ throw new errors.ChrtError({
290
+ message: _response.error.errorMessage,
291
+ rawResponse: _response.rawResponse,
292
+ });
293
+ }
294
+ });
295
+ }
296
+ /**
297
+ * Fetches and mirrors one e-Courier order by the provider's own order number, updating the unified order list alongside it. | authz: min_org_role=operator | (EcourierOrderSyncOneReq) -> (EcourierOrder1)
298
+ *
299
+ * @param {Chrt.shippingIntegrations.ecourier.EcourierOrderSyncOneReq} request
300
+ * @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
301
+ *
302
+ * @throws {@link Chrt.UnprocessableEntityError}
303
+ *
304
+ * @example
305
+ * await client.shippingIntegrations.ecourier.orders.syncOneV1({
306
+ * integration_order_id: "integration_order_id",
307
+ * provider_org_id: "provider_org_id"
308
+ * })
309
+ */
310
+ syncOneV1(request, requestOptions) {
311
+ return core.HttpResponsePromise.fromPromise(this.__syncOneV1(request, requestOptions));
312
+ }
313
+ __syncOneV1(request, requestOptions) {
314
+ return __awaiter(this, void 0, void 0, function* () {
315
+ var _a, _b, _c, _d;
316
+ 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);
317
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
318
+ 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_integrations/ecourier/orders/sync_one/v1"),
319
+ method: "POST",
320
+ headers: _headers,
321
+ contentType: "application/json",
322
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
323
+ requestType: "json",
324
+ body: request,
325
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
326
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
327
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
328
+ });
329
+ if (_response.ok) {
330
+ return { data: _response.body, rawResponse: _response.rawResponse };
331
+ }
332
+ if (_response.error.reason === "status-code") {
333
+ switch (_response.error.statusCode) {
334
+ case 422:
335
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
336
+ default:
337
+ throw new errors.ChrtError({
338
+ statusCode: _response.error.statusCode,
339
+ body: _response.error.body,
340
+ rawResponse: _response.rawResponse,
341
+ });
342
+ }
343
+ }
344
+ switch (_response.error.reason) {
345
+ case "non-json":
346
+ throw new errors.ChrtError({
347
+ statusCode: _response.error.statusCode,
348
+ body: _response.error.rawBody,
349
+ rawResponse: _response.rawResponse,
350
+ });
351
+ case "timeout":
352
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /shipping_integrations/ecourier/orders/sync_one/v1.");
353
+ case "unknown":
354
+ throw new errors.ChrtError({
355
+ message: _response.error.errorMessage,
356
+ rawResponse: _response.rawResponse,
357
+ });
358
+ }
359
+ });
360
+ }
361
+ _getAuthorizationHeader() {
362
+ return __awaiter(this, void 0, void 0, function* () {
363
+ const bearer = yield core.Supplier.get(this._options.token);
364
+ if (bearer != null) {
365
+ return `Bearer ${bearer}`;
366
+ }
367
+ return undefined;
368
+ });
369
+ }
370
+ }
371
+ exports.Orders = Orders;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ export * from "./requests/index.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests/index.js"), exports);
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * integration_order_id: "integration_order_id",
8
+ * provider_org_id: "provider_org_id"
9
+ * }
10
+ */
11
+ export interface EcourierOrderSyncOneReq {
12
+ integration_order_id: string;
13
+ /** Must be a string starting with `org_` */
14
+ provider_org_id: string;
15
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,48 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../../../../../../../../index.js";
5
+ /**
6
+ * @example
7
+ * {
8
+ * sort_by: "mirrored_at_timestamp",
9
+ * sort_order: "asc",
10
+ * page: 1,
11
+ * page_size: 1,
12
+ * filter_provider_org_id: ["filter_provider_org_id"],
13
+ * filter_integration_order_id: "filter_integration_order_id",
14
+ * filter_provider_status_raw: "filter_provider_status_raw",
15
+ * filter_mirrored_at_timestamp_gte: "2024-01-15T09:30:00Z",
16
+ * filter_mirrored_at_timestamp_lte: "2024-01-15T09:30:00Z",
17
+ * filter_created_at_timestamp_gte: "2024-01-15T09:30:00Z",
18
+ * filter_created_at_timestamp_lte: "2024-01-15T09:30:00Z",
19
+ * filter_updated_at_timestamp_gte: "2024-01-15T09:30:00Z",
20
+ * filter_updated_at_timestamp_lte: "2024-01-15T09:30:00Z"
21
+ * }
22
+ */
23
+ export interface OrdersListV1Request {
24
+ /** Field to sort by. */
25
+ sort_by?: Chrt.EcourierOrderSortByEnum | null;
26
+ /** Sort order (asc or desc). */
27
+ sort_order?: Chrt.SortOrderEnum | null;
28
+ page?: number | null;
29
+ page_size?: number | null;
30
+ /** Filter by provider org ID(s) */
31
+ filter_provider_org_id?: (string | null) | (string | null)[];
32
+ /** Filter by e-Courier's exact order number */
33
+ filter_integration_order_id?: string | null;
34
+ /** Filter by e-Courier's raw OrderStatus letter. Not reliably operational; prefer the unified status on the cross-integration list. */
35
+ filter_provider_status_raw?: string | null;
36
+ /** Filter mirrored_at_timestamp >= value */
37
+ filter_mirrored_at_timestamp_gte?: string | null;
38
+ /** Filter mirrored_at_timestamp <= value */
39
+ filter_mirrored_at_timestamp_lte?: string | null;
40
+ /** Filter created_at_timestamp >= value */
41
+ filter_created_at_timestamp_gte?: string | null;
42
+ /** Filter created_at_timestamp <= value */
43
+ filter_created_at_timestamp_lte?: string | null;
44
+ /** Filter updated_at_timestamp >= value */
45
+ filter_updated_at_timestamp_gte?: string | null;
46
+ /** Filter updated_at_timestamp <= value */
47
+ filter_updated_at_timestamp_lte?: string | null;
48
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export { type OrdersListV1Request } from "./OrdersListV1Request.js";
2
+ export { type EcourierOrderSyncOneReq } from "./EcourierOrderSyncOneReq.js";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client/index.js"), exports);
@@ -1,8 +1,10 @@
1
1
  export * as connections from "./connections/index.js";
2
+ export * as integrationExecutors from "./integrationExecutors/index.js";
2
3
  export * as orders from "./orders/index.js";
3
4
  export * as atlas from "./atlas/index.js";
4
5
  export * as cxt from "./cxt/index.js";
5
6
  export * as dispatchScience from "./dispatchScience/index.js";
7
+ export * as ecourier from "./ecourier/index.js";
6
8
  export * as ontime360 from "./ontime360/index.js";
7
9
  export * as xcelerator from "./xcelerator/index.js";
8
10
  export * from "./orders/client/requests/index.js";
@@ -36,12 +36,14 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.xcelerator = exports.ontime360 = exports.dispatchScience = exports.cxt = exports.atlas = exports.orders = exports.connections = void 0;
39
+ exports.xcelerator = exports.ontime360 = exports.ecourier = exports.dispatchScience = exports.cxt = exports.atlas = exports.orders = exports.integrationExecutors = exports.connections = void 0;
40
40
  exports.connections = __importStar(require("./connections/index.js"));
41
+ exports.integrationExecutors = __importStar(require("./integrationExecutors/index.js"));
41
42
  exports.orders = __importStar(require("./orders/index.js"));
42
43
  exports.atlas = __importStar(require("./atlas/index.js"));
43
44
  exports.cxt = __importStar(require("./cxt/index.js"));
44
45
  exports.dispatchScience = __importStar(require("./dispatchScience/index.js"));
46
+ exports.ecourier = __importStar(require("./ecourier/index.js"));
45
47
  exports.ontime360 = __importStar(require("./ontime360/index.js"));
46
48
  exports.xcelerator = __importStar(require("./xcelerator/index.js"));
47
49
  __exportStar(require("./orders/client/requests/index.js"), exports);