@chrt-inc/typescript-sdk 1.998.0 → 1.1000.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 (242) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/billingNew/client/Client.d.ts +3 -0
  3. package/dist/cjs/api/resources/billingNew/client/Client.js +5 -0
  4. package/dist/cjs/api/resources/billingNew/resources/billingPeriods/client/Client.d.ts +2 -2
  5. package/dist/cjs/api/resources/billingNew/resources/billingPeriods/client/Client.js +1 -1
  6. package/dist/cjs/api/resources/billingNew/resources/chrtGroundProviderRates/client/requests/ChrtGroundProviderRatesClientCreate1.d.ts +0 -3
  7. package/dist/cjs/api/resources/billingNew/resources/chrtGroundProviderRates/client/requests/ChrtGroundProviderRatesClientUpdate1.d.ts +0 -6
  8. package/dist/cjs/api/resources/billingNew/resources/index.d.ts +2 -0
  9. package/dist/cjs/api/resources/billingNew/resources/index.js +3 -1
  10. package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/Client.d.ts +17 -73
  11. package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/Client.js +50 -193
  12. package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/{resources/export/client → client}/requests/InvoiceLineItemExportListReq.d.ts +1 -0
  13. package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/requests/index.d.ts +1 -3
  14. package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/index.d.ts +0 -1
  15. package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/index.js +0 -1
  16. package/dist/cjs/api/resources/billingNew/resources/invoices/client/Client.d.ts +57 -32
  17. package/dist/cjs/api/resources/billingNew/resources/invoices/client/Client.js +169 -89
  18. package/dist/cjs/api/resources/billingNew/resources/invoices/client/requests/index.d.ts +0 -1
  19. package/dist/cjs/api/resources/billingNew/resources/orders/client/Client.d.ts +30 -3
  20. package/dist/cjs/api/resources/billingNew/resources/orders/client/Client.js +137 -6
  21. package/dist/cjs/api/resources/billingNew/resources/orders/client/requests/OrderBillingExpandedListReq.d.ts +7 -1
  22. package/dist/cjs/api/resources/billingNew/resources/orders/client/requests/index.d.ts +1 -0
  23. package/dist/cjs/api/resources/billingNew/resources/orders/index.d.ts +0 -1
  24. package/dist/cjs/api/resources/billingNew/resources/orders/index.js +0 -1
  25. package/dist/cjs/api/resources/billingNew/resources/taxConfigurations/client/Client.d.ts +128 -0
  26. package/dist/cjs/api/resources/billingNew/resources/taxConfigurations/client/Client.js +485 -0
  27. package/dist/cjs/api/resources/billingNew/resources/taxConfigurations/client/requests/TaxConfigurationClientCreate1.d.ts +21 -0
  28. package/dist/cjs/api/resources/billingNew/resources/taxConfigurations/client/requests/TaxConfigurationClientUpdate1.d.ts +12 -0
  29. package/dist/cjs/api/resources/billingNew/resources/taxConfigurations/client/requests/TaxConfigurationResolveReq.d.ts +14 -0
  30. package/dist/cjs/api/resources/billingNew/resources/taxConfigurations/client/requests/TaxConfigurationsListV1Request.d.ts +33 -0
  31. package/dist/cjs/api/resources/billingNew/resources/taxConfigurations/client/requests/index.d.ts +4 -0
  32. package/dist/cjs/api/resources/flights/client/Client.d.ts +1 -1
  33. package/dist/cjs/api/resources/flights/client/Client.js +1 -1
  34. package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/Client.d.ts +4 -0
  35. package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/Client.js +22 -2
  36. package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForProviderOperatorsV1Request.d.ts +6 -0
  37. package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForShipperOperatorsV1Request.d.ts +6 -0
  38. package/dist/cjs/api/types/BillingCurrencyCodeEnum1.d.ts +1 -2
  39. package/dist/cjs/api/types/BillingCurrencyCodeEnum1.js +0 -1
  40. package/dist/cjs/api/types/BillingPeriodCloseRes.d.ts +8 -0
  41. package/dist/cjs/api/types/CalculatedInvoiceTax1.d.ts +12 -0
  42. package/dist/cjs/api/types/ChrtGroundProviderRates1.d.ts +0 -3
  43. package/dist/cjs/api/types/{CreateInvoiceLineItemsFromAwbCostsInvoiceRes1.d.ts → CreateInvoiceLineItemsFromAwbCostsGroupRes1.d.ts} +2 -2
  44. package/dist/cjs/api/types/CreateInvoiceLineItemsFromAwbCostsRes.d.ts +1 -1
  45. package/dist/cjs/api/{resources/billingNew/resources/invoices/client/requests → types}/InvoiceClientCreate1.d.ts +1 -9
  46. package/dist/cjs/api/types/InvoiceCreateFromOrdersReq.d.ts +22 -0
  47. package/dist/cjs/api/types/InvoiceCreateFromOrdersRes.d.ts +14 -0
  48. package/dist/cjs/api/types/InvoiceCreateFromOrdersRes.js +5 -0
  49. package/dist/cjs/api/types/InvoiceCreateReq.d.ts +20 -0
  50. package/dist/cjs/api/types/InvoiceCreateReq.js +5 -0
  51. package/dist/cjs/api/types/InvoiceLineItem1.d.ts +1 -0
  52. package/dist/cjs/api/types/InvoiceLineItemExportListItem.d.ts +4 -2
  53. package/dist/cjs/api/types/InvoiceLineItemTypeEnum1.d.ts +2 -4
  54. package/dist/cjs/api/types/InvoiceLineItemTypeEnum1.js +1 -3
  55. package/dist/cjs/api/types/InvoicePreviewFromOrdersRes.d.ts +15 -0
  56. package/dist/cjs/api/types/InvoicePreviewFromOrdersRes.js +5 -0
  57. package/dist/cjs/api/types/InvoicePreviewRes.d.ts +10 -0
  58. package/dist/cjs/api/types/InvoicePreviewRes.js +5 -0
  59. package/dist/cjs/api/types/InvoiceTaxCalculation1.d.ts +12 -0
  60. package/dist/cjs/api/types/InvoiceTaxCalculation1.js +5 -0
  61. package/dist/cjs/api/types/Order1.d.ts +1 -0
  62. package/dist/cjs/api/types/OrderBillingExpandedListItem1.d.ts +7 -0
  63. package/dist/cjs/api/types/OrderBillingSortByEnum.d.ts +2 -1
  64. package/dist/cjs/api/types/OrderBillingSortByEnum.js +1 -0
  65. package/dist/cjs/api/types/OrderLimitedForProvider1.d.ts +1 -0
  66. package/dist/cjs/api/types/OrderLimitedForShipper1.d.ts +1 -0
  67. package/dist/cjs/api/types/OrderSortByEnum.d.ts +2 -1
  68. package/dist/cjs/api/types/OrderSortByEnum.js +1 -0
  69. package/dist/cjs/api/types/TaxConfiguration1.d.ts +24 -0
  70. package/dist/cjs/api/types/TaxConfiguration1.js +5 -0
  71. package/dist/cjs/api/types/TaxConfigurationListRes.d.ts +8 -0
  72. package/dist/cjs/api/types/TaxConfigurationListRes.js +5 -0
  73. package/dist/cjs/api/types/TaxConfigurationSortByEnum.d.ts +8 -0
  74. package/dist/cjs/api/types/TaxConfigurationSortByEnum.js +10 -0
  75. package/dist/cjs/api/types/{TaxRate1.d.ts → TaxRule1.d.ts} +2 -3
  76. package/dist/cjs/api/types/TaxRule1.js +5 -0
  77. package/dist/cjs/api/types/index.d.ts +14 -6
  78. package/dist/cjs/api/types/index.js +14 -6
  79. package/dist/cjs/version.d.ts +1 -1
  80. package/dist/cjs/version.js +1 -1
  81. package/dist/esm/Client.mjs +2 -2
  82. package/dist/esm/api/resources/billingNew/client/Client.d.mts +3 -0
  83. package/dist/esm/api/resources/billingNew/client/Client.mjs +5 -0
  84. package/dist/esm/api/resources/billingNew/resources/billingPeriods/client/Client.d.mts +2 -2
  85. package/dist/esm/api/resources/billingNew/resources/billingPeriods/client/Client.mjs +1 -1
  86. package/dist/esm/api/resources/billingNew/resources/chrtGroundProviderRates/client/requests/ChrtGroundProviderRatesClientCreate1.d.mts +0 -3
  87. package/dist/esm/api/resources/billingNew/resources/chrtGroundProviderRates/client/requests/ChrtGroundProviderRatesClientUpdate1.d.mts +0 -6
  88. package/dist/esm/api/resources/billingNew/resources/index.d.mts +2 -0
  89. package/dist/esm/api/resources/billingNew/resources/index.mjs +2 -0
  90. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/Client.d.mts +17 -73
  91. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/Client.mjs +50 -193
  92. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/{resources/export/client → client}/requests/InvoiceLineItemExportListReq.d.mts +1 -0
  93. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/index.d.mts +1 -3
  94. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/index.d.mts +0 -1
  95. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/index.mjs +0 -1
  96. package/dist/esm/api/resources/billingNew/resources/invoices/client/Client.d.mts +57 -32
  97. package/dist/esm/api/resources/billingNew/resources/invoices/client/Client.mjs +169 -89
  98. package/dist/esm/api/resources/billingNew/resources/invoices/client/requests/index.d.mts +0 -1
  99. package/dist/esm/api/resources/billingNew/resources/orders/client/Client.d.mts +30 -3
  100. package/dist/esm/api/resources/billingNew/resources/orders/client/Client.mjs +137 -6
  101. package/dist/esm/api/resources/billingNew/resources/orders/client/requests/OrderBillingExpandedListReq.d.mts +7 -1
  102. package/dist/esm/api/resources/billingNew/resources/orders/client/requests/index.d.mts +1 -0
  103. package/dist/esm/api/resources/billingNew/resources/orders/index.d.mts +0 -1
  104. package/dist/esm/api/resources/billingNew/resources/orders/index.mjs +0 -1
  105. package/dist/esm/api/resources/billingNew/resources/taxConfigurations/client/Client.d.mts +128 -0
  106. package/dist/esm/api/resources/billingNew/resources/taxConfigurations/client/Client.mjs +448 -0
  107. package/dist/esm/api/resources/billingNew/resources/taxConfigurations/client/requests/TaxConfigurationClientCreate1.d.mts +21 -0
  108. package/dist/esm/api/resources/billingNew/resources/taxConfigurations/client/requests/TaxConfigurationClientUpdate1.d.mts +12 -0
  109. package/dist/esm/api/resources/billingNew/resources/taxConfigurations/client/requests/TaxConfigurationResolveReq.d.mts +14 -0
  110. package/dist/esm/api/resources/billingNew/resources/taxConfigurations/client/requests/TaxConfigurationsListV1Request.d.mts +33 -0
  111. package/dist/esm/api/resources/billingNew/resources/taxConfigurations/client/requests/index.d.mts +4 -0
  112. package/dist/esm/api/resources/flights/client/Client.d.mts +1 -1
  113. package/dist/esm/api/resources/flights/client/Client.mjs +1 -1
  114. package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/Client.d.mts +4 -0
  115. package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/Client.mjs +22 -2
  116. package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForProviderOperatorsV1Request.d.mts +6 -0
  117. package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForShipperOperatorsV1Request.d.mts +6 -0
  118. package/dist/esm/api/types/BillingCurrencyCodeEnum1.d.mts +1 -2
  119. package/dist/esm/api/types/BillingCurrencyCodeEnum1.mjs +0 -1
  120. package/dist/esm/api/types/BillingPeriodCloseRes.d.mts +8 -0
  121. package/dist/esm/api/types/CalculatedInvoiceTax1.d.mts +12 -0
  122. package/dist/esm/api/types/ChrtGroundProviderRates1.d.mts +0 -3
  123. package/dist/esm/api/types/{CreateInvoiceLineItemsFromAwbCostsInvoiceRes1.d.mts → CreateInvoiceLineItemsFromAwbCostsGroupRes1.d.mts} +2 -2
  124. package/dist/esm/api/types/CreateInvoiceLineItemsFromAwbCostsRes.d.mts +1 -1
  125. package/dist/esm/api/{resources/billingNew/resources/invoices/client/requests → types}/InvoiceClientCreate1.d.mts +1 -9
  126. package/dist/esm/api/types/InvoiceCreateFromOrdersReq.d.mts +22 -0
  127. package/dist/esm/api/types/InvoiceCreateFromOrdersRes.d.mts +14 -0
  128. package/dist/esm/api/types/InvoiceCreateFromOrdersRes.mjs +4 -0
  129. package/dist/esm/api/types/InvoiceCreateReq.d.mts +20 -0
  130. package/dist/esm/api/types/InvoiceCreateReq.mjs +4 -0
  131. package/dist/esm/api/types/InvoiceLineItem1.d.mts +1 -0
  132. package/dist/esm/api/types/InvoiceLineItemExportListItem.d.mts +4 -2
  133. package/dist/esm/api/types/InvoiceLineItemTypeEnum1.d.mts +2 -4
  134. package/dist/esm/api/types/InvoiceLineItemTypeEnum1.mjs +1 -3
  135. package/dist/esm/api/types/InvoicePreviewFromOrdersRes.d.mts +15 -0
  136. package/dist/esm/api/types/InvoicePreviewFromOrdersRes.mjs +4 -0
  137. package/dist/esm/api/types/InvoicePreviewRes.d.mts +10 -0
  138. package/dist/esm/api/types/InvoicePreviewRes.mjs +4 -0
  139. package/dist/esm/api/types/InvoiceTaxCalculation1.d.mts +12 -0
  140. package/dist/esm/api/types/InvoiceTaxCalculation1.mjs +4 -0
  141. package/dist/esm/api/types/Order1.d.mts +1 -0
  142. package/dist/esm/api/types/OrderBillingExpandedListItem1.d.mts +7 -0
  143. package/dist/esm/api/types/OrderBillingSortByEnum.d.mts +2 -1
  144. package/dist/esm/api/types/OrderBillingSortByEnum.mjs +1 -0
  145. package/dist/esm/api/types/OrderLimitedForProvider1.d.mts +1 -0
  146. package/dist/esm/api/types/OrderLimitedForShipper1.d.mts +1 -0
  147. package/dist/esm/api/types/OrderSortByEnum.d.mts +2 -1
  148. package/dist/esm/api/types/OrderSortByEnum.mjs +1 -0
  149. package/dist/esm/api/types/TaxConfiguration1.d.mts +24 -0
  150. package/dist/esm/api/types/TaxConfiguration1.mjs +4 -0
  151. package/dist/esm/api/types/TaxConfigurationListRes.d.mts +8 -0
  152. package/dist/esm/api/types/TaxConfigurationListRes.mjs +4 -0
  153. package/dist/esm/api/types/TaxConfigurationSortByEnum.d.mts +8 -0
  154. package/dist/esm/api/types/TaxConfigurationSortByEnum.mjs +7 -0
  155. package/dist/esm/api/types/{TaxRate1.d.mts → TaxRule1.d.mts} +2 -3
  156. package/dist/esm/api/types/TaxRule1.mjs +4 -0
  157. package/dist/esm/api/types/index.d.mts +14 -6
  158. package/dist/esm/api/types/index.mjs +14 -6
  159. package/dist/esm/version.d.mts +1 -1
  160. package/dist/esm/version.mjs +1 -1
  161. package/package.json +1 -1
  162. package/reference.md +526 -219
  163. package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/requests/CreateInvoiceLineItemsFromAmountReq.d.ts +0 -32
  164. package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/requests/CreateInvoiceLineItemsFromLineItemsReq.d.ts +0 -46
  165. package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/requests/RecalculateOrderTaxInvoiceLineItemsReq.d.ts +0 -12
  166. package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/resources/export/client/Client.d.ts +0 -51
  167. package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/resources/export/client/Client.js +0 -153
  168. package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/resources/export/client/requests/index.d.ts +0 -1
  169. package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/resources/index.d.ts +0 -2
  170. package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/resources/index.js +0 -41
  171. package/dist/cjs/api/resources/billingNew/resources/orders/resources/index.d.ts +0 -2
  172. package/dist/cjs/api/resources/billingNew/resources/orders/resources/index.js +0 -41
  173. package/dist/cjs/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/client/Client.d.ts +0 -49
  174. package/dist/cjs/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/client/Client.js +0 -135
  175. package/dist/cjs/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/client/index.d.ts +0 -2
  176. package/dist/cjs/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/client/index.js +0 -17
  177. package/dist/cjs/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/client/requests/index.d.ts +0 -1
  178. package/dist/cjs/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/client/requests/index.js +0 -2
  179. package/dist/cjs/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/index.d.ts +0 -1
  180. package/dist/cjs/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/index.js +0 -17
  181. package/dist/cjs/api/types/CreateInvoiceLineItemsFromAmountRes.d.ts +0 -7
  182. package/dist/cjs/api/types/CreateInvoiceLineItemsFromLineItemsRes.d.ts +0 -7
  183. package/dist/cjs/api/types/InvoiceLineItemAmountTransformation1.d.ts +0 -8
  184. package/dist/cjs/api/types/InvoiceLineItemAmountTransformationTypeEnum1.d.ts +0 -9
  185. package/dist/cjs/api/types/InvoiceLineItemAmountTransformationTypeEnum1.js +0 -11
  186. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/CreateInvoiceLineItemsFromAmountReq.d.mts +0 -32
  187. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/CreateInvoiceLineItemsFromLineItemsReq.d.mts +0 -46
  188. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/RecalculateOrderTaxInvoiceLineItemsReq.d.mts +0 -12
  189. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/resources/export/client/Client.d.mts +0 -51
  190. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/resources/export/client/Client.mjs +0 -116
  191. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/resources/export/client/requests/index.d.mts +0 -1
  192. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/resources/index.d.mts +0 -2
  193. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/resources/index.mjs +0 -2
  194. package/dist/esm/api/resources/billingNew/resources/orders/resources/index.d.mts +0 -2
  195. package/dist/esm/api/resources/billingNew/resources/orders/resources/index.mjs +0 -2
  196. package/dist/esm/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/client/Client.d.mts +0 -49
  197. package/dist/esm/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/client/Client.mjs +0 -98
  198. package/dist/esm/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/client/index.d.mts +0 -2
  199. package/dist/esm/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/client/index.mjs +0 -1
  200. package/dist/esm/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/client/requests/index.d.mts +0 -1
  201. package/dist/esm/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/client/requests/index.mjs +0 -1
  202. package/dist/esm/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/index.d.mts +0 -1
  203. package/dist/esm/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/index.mjs +0 -1
  204. package/dist/esm/api/types/CreateInvoiceLineItemsFromAmountRes.d.mts +0 -7
  205. package/dist/esm/api/types/CreateInvoiceLineItemsFromLineItemsRes.d.mts +0 -7
  206. package/dist/esm/api/types/InvoiceLineItemAmountTransformation1.d.mts +0 -8
  207. package/dist/esm/api/types/InvoiceLineItemAmountTransformationTypeEnum1.d.mts +0 -9
  208. package/dist/esm/api/types/InvoiceLineItemAmountTransformationTypeEnum1.mjs +0 -8
  209. /package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/{resources/export/client → client}/requests/InvoiceLineItemExportListReq.js +0 -0
  210. /package/dist/cjs/api/resources/billingNew/resources/orders/{resources/rateSheetLineItems/client → client}/requests/OrderRateSheetLineItemsGenerateManyReq.d.ts +0 -0
  211. /package/dist/cjs/api/resources/billingNew/resources/orders/{resources/rateSheetLineItems/client → client}/requests/OrderRateSheetLineItemsGenerateManyReq.js +0 -0
  212. /package/dist/cjs/api/resources/billingNew/resources/{invoiceLineItems/resources/export → taxConfigurations}/client/index.d.ts +0 -0
  213. /package/dist/cjs/api/resources/billingNew/resources/{invoiceLineItems/resources/export → taxConfigurations}/client/index.js +0 -0
  214. /package/dist/cjs/api/resources/billingNew/resources/{invoiceLineItems/client/requests/CreateInvoiceLineItemsFromAmountReq.js → taxConfigurations/client/requests/TaxConfigurationClientCreate1.js} +0 -0
  215. /package/dist/cjs/api/resources/billingNew/resources/{invoiceLineItems/client/requests/CreateInvoiceLineItemsFromLineItemsReq.js → taxConfigurations/client/requests/TaxConfigurationClientUpdate1.js} +0 -0
  216. /package/dist/cjs/api/resources/billingNew/resources/{invoiceLineItems/client/requests/RecalculateOrderTaxInvoiceLineItemsReq.js → taxConfigurations/client/requests/TaxConfigurationResolveReq.js} +0 -0
  217. /package/dist/cjs/api/resources/billingNew/resources/{invoices/client/requests/InvoiceClientCreate1.js → taxConfigurations/client/requests/TaxConfigurationsListV1Request.js} +0 -0
  218. /package/dist/cjs/api/resources/billingNew/resources/{invoiceLineItems/resources/export → taxConfigurations}/client/requests/index.js +0 -0
  219. /package/dist/cjs/api/resources/billingNew/resources/{invoiceLineItems/resources/export → taxConfigurations}/index.d.ts +0 -0
  220. /package/dist/cjs/api/resources/billingNew/resources/{invoiceLineItems/resources/export → taxConfigurations}/index.js +0 -0
  221. /package/dist/cjs/api/types/{CreateInvoiceLineItemsFromAmountRes.js → BillingPeriodCloseRes.js} +0 -0
  222. /package/dist/cjs/api/types/{CreateInvoiceLineItemsFromAwbCostsInvoiceRes1.js → CalculatedInvoiceTax1.js} +0 -0
  223. /package/dist/cjs/api/types/{CreateInvoiceLineItemsFromLineItemsRes.js → CreateInvoiceLineItemsFromAwbCostsGroupRes1.js} +0 -0
  224. /package/dist/cjs/api/types/{InvoiceLineItemAmountTransformation1.js → InvoiceClientCreate1.js} +0 -0
  225. /package/dist/cjs/api/types/{TaxRate1.js → InvoiceCreateFromOrdersReq.js} +0 -0
  226. /package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/{resources/export/client → client}/requests/InvoiceLineItemExportListReq.mjs +0 -0
  227. /package/dist/esm/api/resources/billingNew/resources/orders/{resources/rateSheetLineItems/client → client}/requests/OrderRateSheetLineItemsGenerateManyReq.d.mts +0 -0
  228. /package/dist/esm/api/resources/billingNew/resources/orders/{resources/rateSheetLineItems/client → client}/requests/OrderRateSheetLineItemsGenerateManyReq.mjs +0 -0
  229. /package/dist/esm/api/resources/billingNew/resources/{invoiceLineItems/resources/export → taxConfigurations}/client/index.d.mts +0 -0
  230. /package/dist/esm/api/resources/billingNew/resources/{invoiceLineItems/resources/export → taxConfigurations}/client/index.mjs +0 -0
  231. /package/dist/esm/api/resources/billingNew/resources/{invoiceLineItems/client/requests/CreateInvoiceLineItemsFromAmountReq.mjs → taxConfigurations/client/requests/TaxConfigurationClientCreate1.mjs} +0 -0
  232. /package/dist/esm/api/resources/billingNew/resources/{invoiceLineItems/client/requests/CreateInvoiceLineItemsFromLineItemsReq.mjs → taxConfigurations/client/requests/TaxConfigurationClientUpdate1.mjs} +0 -0
  233. /package/dist/esm/api/resources/billingNew/resources/{invoiceLineItems/client/requests/RecalculateOrderTaxInvoiceLineItemsReq.mjs → taxConfigurations/client/requests/TaxConfigurationResolveReq.mjs} +0 -0
  234. /package/dist/esm/api/resources/billingNew/resources/{invoices/client/requests/InvoiceClientCreate1.mjs → taxConfigurations/client/requests/TaxConfigurationsListV1Request.mjs} +0 -0
  235. /package/dist/esm/api/resources/billingNew/resources/{invoiceLineItems/resources/export → taxConfigurations}/client/requests/index.mjs +0 -0
  236. /package/dist/esm/api/resources/billingNew/resources/{invoiceLineItems/resources/export → taxConfigurations}/index.d.mts +0 -0
  237. /package/dist/esm/api/resources/billingNew/resources/{invoiceLineItems/resources/export → taxConfigurations}/index.mjs +0 -0
  238. /package/dist/esm/api/types/{CreateInvoiceLineItemsFromAmountRes.mjs → BillingPeriodCloseRes.mjs} +0 -0
  239. /package/dist/esm/api/types/{CreateInvoiceLineItemsFromAwbCostsInvoiceRes1.mjs → CalculatedInvoiceTax1.mjs} +0 -0
  240. /package/dist/esm/api/types/{CreateInvoiceLineItemsFromLineItemsRes.mjs → CreateInvoiceLineItemsFromAwbCostsGroupRes1.mjs} +0 -0
  241. /package/dist/esm/api/types/{InvoiceLineItemAmountTransformation1.mjs → InvoiceClientCreate1.mjs} +0 -0
  242. /package/dist/esm/api/types/{TaxRate1.mjs → InvoiceCreateFromOrdersReq.mjs} +0 -0
@@ -115,9 +115,9 @@ class Invoices {
115
115
  });
116
116
  }
117
117
  /**
118
- * Returns the matching draft invoice period, or creates one with an optional rolling-month default. | authz: allowed_org_types=[provider], min_org_role=operator | (InvoiceClientCreate1) -> (PydanticObjectId)
118
+ * Creates a new draft invoice, optionally attaching selected uninvoiced charges atomically. Omitted dates derive from completed deliveries; empty drafts and charges without completed delivery dates require explicit bounds. | authz: allowed_org_types=[provider], min_org_role=operator | (InvoiceCreateReq) -> (PydanticObjectId)
119
119
  *
120
- * @param {Chrt.billingNew.InvoiceClientCreate1} request
120
+ * @param {Chrt.InvoiceCreateReq} request
121
121
  * @param {Invoices.RequestOptions} requestOptions - Request-specific configuration.
122
122
  *
123
123
  * @throws {@link Chrt.UnprocessableEntityError}
@@ -181,87 +181,36 @@ class Invoices {
181
181
  });
182
182
  }
183
183
  /**
184
- * Hard-deletes a draft invoice and detaches its line items. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (bool)
184
+ * Creates one draft from matching order charges and reports skipped items. Billing period dates do not filter charges. | authz: allowed_org_types=[provider], min_org_role=operator | (InvoiceCreateFromOrdersReq) -> (InvoiceCreateFromOrdersRes)
185
185
  *
186
- * @param {string} invoiceId
186
+ * @param {Chrt.InvoiceCreateFromOrdersReq} request
187
187
  * @param {Invoices.RequestOptions} requestOptions - Request-specific configuration.
188
188
  *
189
189
  * @throws {@link Chrt.UnprocessableEntityError}
190
190
  *
191
191
  * @example
192
- * await client.billingNew.invoices.deleteV1("invoice_id")
193
- */
194
- deleteV1(invoiceId, requestOptions) {
195
- return core.HttpResponsePromise.fromPromise(this.__deleteV1(invoiceId, requestOptions));
196
- }
197
- __deleteV1(invoiceId, requestOptions) {
198
- return __awaiter(this, void 0, void 0, function* () {
199
- var _a, _b, _c, _d;
200
- 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);
201
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
202
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `billing_new/invoices/delete/v1/${encodeURIComponent(invoiceId)}`),
203
- method: "DELETE",
204
- headers: _headers,
205
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
206
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
207
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
208
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
209
- });
210
- if (_response.ok) {
211
- return { data: _response.body, rawResponse: _response.rawResponse };
212
- }
213
- if (_response.error.reason === "status-code") {
214
- switch (_response.error.statusCode) {
215
- case 422:
216
- throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
217
- default:
218
- throw new errors.ChrtError({
219
- statusCode: _response.error.statusCode,
220
- body: _response.error.body,
221
- rawResponse: _response.rawResponse,
222
- });
223
- }
224
- }
225
- switch (_response.error.reason) {
226
- case "non-json":
227
- throw new errors.ChrtError({
228
- statusCode: _response.error.statusCode,
229
- body: _response.error.rawBody,
230
- rawResponse: _response.rawResponse,
231
- });
232
- case "timeout":
233
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /billing_new/invoices/delete/v1/{invoice_id}.");
234
- case "unknown":
235
- throw new errors.ChrtError({
236
- message: _response.error.errorMessage,
237
- rawResponse: _response.rawResponse,
238
- });
239
- }
240
- });
241
- }
242
- /**
243
- * Retrieves an owner-scoped invoice with line-item orders, counterparties, and accounts expanded. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (InvoiceExpandedRes)
244
- *
245
- * @param {string} invoiceId
246
- * @param {Invoices.RequestOptions} requestOptions - Request-specific configuration.
247
- *
248
- * @throws {@link Chrt.UnprocessableEntityError}
249
- *
250
- * @example
251
- * await client.billingNew.invoices.getExpandedV1("invoice_id")
192
+ * await client.billingNew.invoices.createFromOrdersV1({
193
+ * currency_code: "USD",
194
+ * invoice_type: "accounts_receivable",
195
+ * order_ids: ["order_ids"],
196
+ * schema_version: 1
197
+ * })
252
198
  */
253
- getExpandedV1(invoiceId, requestOptions) {
254
- return core.HttpResponsePromise.fromPromise(this.__getExpandedV1(invoiceId, requestOptions));
199
+ createFromOrdersV1(request, requestOptions) {
200
+ return core.HttpResponsePromise.fromPromise(this.__createFromOrdersV1(request, requestOptions));
255
201
  }
256
- __getExpandedV1(invoiceId, requestOptions) {
202
+ __createFromOrdersV1(request, requestOptions) {
257
203
  return __awaiter(this, void 0, void 0, function* () {
258
204
  var _a, _b, _c, _d;
259
205
  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);
260
206
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
261
- 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, `billing_new/invoices/expanded/v1/${encodeURIComponent(invoiceId)}`),
262
- method: "GET",
207
+ 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, "billing_new/invoices/create_from_orders/v1"),
208
+ method: "POST",
263
209
  headers: _headers,
210
+ contentType: "application/json",
264
211
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
212
+ requestType: "json",
213
+ body: request,
265
214
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
266
215
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
267
216
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -289,7 +238,7 @@ class Invoices {
289
238
  rawResponse: _response.rawResponse,
290
239
  });
291
240
  case "timeout":
292
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /billing_new/invoices/expanded/v1/{invoice_id}.");
241
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /billing_new/invoices/create_from_orders/v1.");
293
242
  case "unknown":
294
243
  throw new errors.ChrtError({
295
244
  message: _response.error.errorMessage,
@@ -299,27 +248,26 @@ class Invoices {
299
248
  });
300
249
  }
301
250
  /**
302
- * Attaches one line item to a draft invoice, moving it from another draft invoice when needed, and synchronizes both invoices. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (Invoice1)
251
+ * Hard-deletes a draft invoice and detaches its line items. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (bool)
303
252
  *
304
253
  * @param {string} invoiceId
305
- * @param {string} invoiceLineItemId
306
254
  * @param {Invoices.RequestOptions} requestOptions - Request-specific configuration.
307
255
  *
308
256
  * @throws {@link Chrt.UnprocessableEntityError}
309
257
  *
310
258
  * @example
311
- * await client.billingNew.invoices.addLineItemV1("invoice_id", "invoice_line_item_id")
259
+ * await client.billingNew.invoices.deleteV1("invoice_id")
312
260
  */
313
- addLineItemV1(invoiceId, invoiceLineItemId, requestOptions) {
314
- return core.HttpResponsePromise.fromPromise(this.__addLineItemV1(invoiceId, invoiceLineItemId, requestOptions));
261
+ deleteV1(invoiceId, requestOptions) {
262
+ return core.HttpResponsePromise.fromPromise(this.__deleteV1(invoiceId, requestOptions));
315
263
  }
316
- __addLineItemV1(invoiceId, invoiceLineItemId, requestOptions) {
264
+ __deleteV1(invoiceId, requestOptions) {
317
265
  return __awaiter(this, void 0, void 0, function* () {
318
266
  var _a, _b, _c, _d;
319
267
  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);
320
268
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
321
- 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, `billing_new/invoices/line_item/add/v1/${encodeURIComponent(invoiceId)}/${encodeURIComponent(invoiceLineItemId)}`),
322
- method: "POST",
269
+ 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, `billing_new/invoices/delete/v1/${encodeURIComponent(invoiceId)}`),
270
+ method: "DELETE",
323
271
  headers: _headers,
324
272
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
325
273
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -349,7 +297,7 @@ class Invoices {
349
297
  rawResponse: _response.rawResponse,
350
298
  });
351
299
  case "timeout":
352
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /billing_new/invoices/line_item/add/v1/{invoice_id}/{invoice_line_item_id}.");
300
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /billing_new/invoices/delete/v1/{invoice_id}.");
353
301
  case "unknown":
354
302
  throw new errors.ChrtError({
355
303
  message: _response.error.errorMessage,
@@ -359,27 +307,26 @@ class Invoices {
359
307
  });
360
308
  }
361
309
  /**
362
- * Detaches one line item from a draft invoice and synchronizes the invoice total and accounts. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (Invoice1)
310
+ * Retrieves an owner-scoped invoice with line-item orders, counterparties, and accounts expanded. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (InvoiceExpandedRes)
363
311
  *
364
312
  * @param {string} invoiceId
365
- * @param {string} invoiceLineItemId
366
313
  * @param {Invoices.RequestOptions} requestOptions - Request-specific configuration.
367
314
  *
368
315
  * @throws {@link Chrt.UnprocessableEntityError}
369
316
  *
370
317
  * @example
371
- * await client.billingNew.invoices.removeLineItemV1("invoice_id", "invoice_line_item_id")
318
+ * await client.billingNew.invoices.getExpandedV1("invoice_id")
372
319
  */
373
- removeLineItemV1(invoiceId, invoiceLineItemId, requestOptions) {
374
- return core.HttpResponsePromise.fromPromise(this.__removeLineItemV1(invoiceId, invoiceLineItemId, requestOptions));
320
+ getExpandedV1(invoiceId, requestOptions) {
321
+ return core.HttpResponsePromise.fromPromise(this.__getExpandedV1(invoiceId, requestOptions));
375
322
  }
376
- __removeLineItemV1(invoiceId, invoiceLineItemId, requestOptions) {
323
+ __getExpandedV1(invoiceId, requestOptions) {
377
324
  return __awaiter(this, void 0, void 0, function* () {
378
325
  var _a, _b, _c, _d;
379
326
  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);
380
327
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
381
- 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, `billing_new/invoices/line_item/remove/v1/${encodeURIComponent(invoiceId)}/${encodeURIComponent(invoiceLineItemId)}`),
382
- method: "DELETE",
328
+ 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, `billing_new/invoices/expanded/v1/${encodeURIComponent(invoiceId)}`),
329
+ method: "GET",
383
330
  headers: _headers,
384
331
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
385
332
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -409,7 +356,7 @@ class Invoices {
409
356
  rawResponse: _response.rawResponse,
410
357
  });
411
358
  case "timeout":
412
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /billing_new/invoices/line_item/remove/v1/{invoice_id}/{invoice_line_item_id}.");
359
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /billing_new/invoices/expanded/v1/{invoice_id}.");
413
360
  case "unknown":
414
361
  throw new errors.ChrtError({
415
362
  message: _response.error.errorMessage,
@@ -419,7 +366,7 @@ class Invoices {
419
366
  });
420
367
  }
421
368
  /**
422
- * Attaches existing line items to a draft invoice, moving them from any other draft invoices, and synchronizes all affected invoice totals and accounts. | authz: allowed_org_types=[provider], min_org_role=operator | (InvoiceLineItemsAddReq) -> (Invoice1)
369
+ * Attaches uninvoiced line items to a draft invoice and refreshes its totals and accounts. | authz: allowed_org_types=[provider], min_org_role=operator | (InvoiceLineItemsAddReq) -> (Invoice1)
423
370
  *
424
371
  * @param {string} invoiceId
425
372
  * @param {Chrt.billingNew.InvoiceLineItemsAddReq} request
@@ -689,6 +636,139 @@ class Invoices {
689
636
  }
690
637
  });
691
638
  }
639
+ /**
640
+ * Previews exact uninvoiced charges, current resolved taxes, and explicit or derived billing dates without saving. | authz: allowed_org_types=[provider], min_org_role=operator | (InvoiceCreateReq) -> (InvoicePreviewRes)
641
+ *
642
+ * @param {Chrt.InvoiceCreateReq} request
643
+ * @param {Invoices.RequestOptions} requestOptions - Request-specific configuration.
644
+ *
645
+ * @throws {@link Chrt.UnprocessableEntityError}
646
+ *
647
+ * @example
648
+ * await client.billingNew.invoices.previewV1({
649
+ * currency_code: "USD",
650
+ * invoice_type: "accounts_receivable",
651
+ * schema_version: 1
652
+ * })
653
+ */
654
+ previewV1(request, requestOptions) {
655
+ return core.HttpResponsePromise.fromPromise(this.__previewV1(request, requestOptions));
656
+ }
657
+ __previewV1(request, requestOptions) {
658
+ return __awaiter(this, void 0, void 0, function* () {
659
+ var _a, _b, _c, _d;
660
+ 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);
661
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
662
+ 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, "billing_new/invoices/preview/v1"),
663
+ method: "POST",
664
+ headers: _headers,
665
+ contentType: "application/json",
666
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
667
+ requestType: "json",
668
+ body: request,
669
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
670
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
671
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
672
+ });
673
+ if (_response.ok) {
674
+ return { data: _response.body, rawResponse: _response.rawResponse };
675
+ }
676
+ if (_response.error.reason === "status-code") {
677
+ switch (_response.error.statusCode) {
678
+ case 422:
679
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
680
+ default:
681
+ throw new errors.ChrtError({
682
+ statusCode: _response.error.statusCode,
683
+ body: _response.error.body,
684
+ rawResponse: _response.rawResponse,
685
+ });
686
+ }
687
+ }
688
+ switch (_response.error.reason) {
689
+ case "non-json":
690
+ throw new errors.ChrtError({
691
+ statusCode: _response.error.statusCode,
692
+ body: _response.error.rawBody,
693
+ rawResponse: _response.rawResponse,
694
+ });
695
+ case "timeout":
696
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /billing_new/invoices/preview/v1.");
697
+ case "unknown":
698
+ throw new errors.ChrtError({
699
+ message: _response.error.errorMessage,
700
+ rawResponse: _response.rawResponse,
701
+ });
702
+ }
703
+ });
704
+ }
705
+ /**
706
+ * Selects matching uninvoiced ordinary charges, reports omitted items, and previews current taxes and billing dates without saving. Period dates do not filter charges. | authz: allowed_org_types=[provider], min_org_role=operator | (InvoiceCreateFromOrdersReq) -> (InvoicePreviewFromOrdersRes)
707
+ *
708
+ * @param {Chrt.InvoiceCreateFromOrdersReq} request
709
+ * @param {Invoices.RequestOptions} requestOptions - Request-specific configuration.
710
+ *
711
+ * @throws {@link Chrt.UnprocessableEntityError}
712
+ *
713
+ * @example
714
+ * await client.billingNew.invoices.previewFromOrdersV1({
715
+ * currency_code: "USD",
716
+ * invoice_type: "accounts_receivable",
717
+ * order_ids: ["order_ids"],
718
+ * schema_version: 1
719
+ * })
720
+ */
721
+ previewFromOrdersV1(request, requestOptions) {
722
+ return core.HttpResponsePromise.fromPromise(this.__previewFromOrdersV1(request, requestOptions));
723
+ }
724
+ __previewFromOrdersV1(request, requestOptions) {
725
+ return __awaiter(this, void 0, void 0, function* () {
726
+ var _a, _b, _c, _d;
727
+ 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);
728
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
729
+ 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, "billing_new/invoices/preview_from_orders/v1"),
730
+ method: "POST",
731
+ headers: _headers,
732
+ contentType: "application/json",
733
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
734
+ requestType: "json",
735
+ body: request,
736
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
737
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
738
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
739
+ });
740
+ if (_response.ok) {
741
+ return { data: _response.body, rawResponse: _response.rawResponse };
742
+ }
743
+ if (_response.error.reason === "status-code") {
744
+ switch (_response.error.statusCode) {
745
+ case 422:
746
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
747
+ default:
748
+ throw new errors.ChrtError({
749
+ statusCode: _response.error.statusCode,
750
+ body: _response.error.body,
751
+ rawResponse: _response.rawResponse,
752
+ });
753
+ }
754
+ }
755
+ switch (_response.error.reason) {
756
+ case "non-json":
757
+ throw new errors.ChrtError({
758
+ statusCode: _response.error.statusCode,
759
+ body: _response.error.rawBody,
760
+ rawResponse: _response.rawResponse,
761
+ });
762
+ case "timeout":
763
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /billing_new/invoices/preview_from_orders/v1.");
764
+ case "unknown":
765
+ throw new errors.ChrtError({
766
+ message: _response.error.errorMessage,
767
+ rawResponse: _response.rawResponse,
768
+ });
769
+ }
770
+ });
771
+ }
692
772
  /**
693
773
  * Updates the name or description of a draft invoice owned by the caller's organization. | authz: allowed_org_types=[provider], min_org_role=operator | (InvoiceClientUpdate1) -> (bool)
694
774
  *
@@ -1,4 +1,3 @@
1
- export { type InvoiceClientCreate1 } from "./InvoiceClientCreate1.js";
2
1
  export { type InvoiceLineItemsAddReq } from "./InvoiceLineItemsAddReq.js";
3
2
  export { type InvoiceLineItemsRemoveReq } from "./InvoiceLineItemsRemoveReq.js";
4
3
  export { type InvoicesListV1Request } from "./InvoicesListV1Request.js";
@@ -4,7 +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 { RateSheetLineItems } from "../resources/rateSheetLineItems/client/Client.js";
8
7
  export declare namespace Orders {
9
8
  interface Options {
10
9
  environment?: core.Supplier<environments.ChrtEnvironment | string>;
@@ -30,9 +29,7 @@ export declare namespace Orders {
30
29
  }
31
30
  export declare class Orders {
32
31
  protected readonly _options: Orders.Options;
33
- protected _rateSheetLineItems: RateSheetLineItems | undefined;
34
32
  constructor(_options?: Orders.Options);
35
- get rateSheetLineItems(): RateSheetLineItems;
36
33
  /**
37
34
  * Lists completed, unbilled AWBs with delivery account allocations. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (OrderAwbBillingListRes)
38
35
  *
@@ -80,6 +77,8 @@ export declare class Orders {
80
77
  * filter_in_progress_at_timestamp_lte: "2024-01-15T09:30:00Z",
81
78
  * filter_completed_at_timestamp_gte: "2024-01-15T09:30:00Z",
82
79
  * filter_completed_at_timestamp_lte: "2024-01-15T09:30:00Z",
80
+ * filter_last_delivery_task_completed_at_timestamp_gte: "2024-01-15T09:30:00Z",
81
+ * filter_last_delivery_task_completed_at_timestamp_lte: "2024-01-15T09:30:00Z",
83
82
  * filter_cancelled_at_timestamp_gte: "2024-01-15T09:30:00Z",
84
83
  * filter_cancelled_at_timestamp_lte: "2024-01-15T09:30:00Z",
85
84
  * filter_exception_at_timestamp_gte: "2024-01-15T09:30:00Z",
@@ -88,5 +87,33 @@ export declare class Orders {
88
87
  */
89
88
  listExpandedForCoordinatorOperatorsV1(request?: Chrt.billingNew.OrderBillingExpandedListReq, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<Chrt.OrderBillingExpandedListRes>;
90
89
  private __listExpandedForCoordinatorOperatorsV1;
90
+ /**
91
+ * Regenerates uninvoiced rate-sheet charges per Order, reporting skips and failures. Detach existing charges before regeneration. | authz: allowed_org_types=[provider], min_org_role=operator | authz_personas=[coordinator_org_operators] | (OrderRateSheetLineItemsGenerateManyReq) -> (OrderRateSheetLineItemsGenerateManyRes)
92
+ *
93
+ * @param {Chrt.billingNew.OrderRateSheetLineItemsGenerateManyReq} request
94
+ * @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
95
+ *
96
+ * @throws {@link Chrt.UnprocessableEntityError}
97
+ *
98
+ * @example
99
+ * await client.billingNew.orders.generateRateSheetLineItemsManyV1({
100
+ * order_ids: ["order_ids"]
101
+ * })
102
+ */
103
+ generateRateSheetLineItemsManyV1(request: Chrt.billingNew.OrderRateSheetLineItemsGenerateManyReq, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<Chrt.OrderRateSheetLineItemsGenerateManyRes>;
104
+ private __generateRateSheetLineItemsManyV1;
105
+ /**
106
+ * Estimates current taxes for uninvoiced ordinary charges grouped by counterparty, direction, and currency. Returns an empty list when no charges qualify. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (list[InvoicePreviewRes])
107
+ *
108
+ * @param {string} orderId
109
+ * @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
110
+ *
111
+ * @throws {@link Chrt.UnprocessableEntityError}
112
+ *
113
+ * @example
114
+ * await client.billingNew.orders.taxEstimatesV1("order_id")
115
+ */
116
+ taxEstimatesV1(orderId: string, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<Chrt.InvoicePreviewRes[]>;
117
+ private __taxEstimatesV1;
91
118
  protected _getAuthorizationHeader(): Promise<string | undefined>;
92
119
  }
@@ -62,15 +62,10 @@ const core = __importStar(require("../../../../../../core/index.js"));
62
62
  const Chrt = __importStar(require("../../../../../index.js"));
63
63
  const headers_js_1 = require("../../../../../../core/headers.js");
64
64
  const errors = __importStar(require("../../../../../../errors/index.js"));
65
- const Client_js_1 = require("../resources/rateSheetLineItems/client/Client.js");
66
65
  class Orders {
67
66
  constructor(_options = {}) {
68
67
  this._options = _options;
69
68
  }
70
- get rateSheetLineItems() {
71
- var _a;
72
- return ((_a = this._rateSheetLineItems) !== null && _a !== void 0 ? _a : (this._rateSheetLineItems = new Client_js_1.RateSheetLineItems(this._options)));
73
- }
74
69
  /**
75
70
  * Lists completed, unbilled AWBs with delivery account allocations. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (OrderAwbBillingListRes)
76
71
  *
@@ -172,6 +167,8 @@ class Orders {
172
167
  * filter_in_progress_at_timestamp_lte: "2024-01-15T09:30:00Z",
173
168
  * filter_completed_at_timestamp_gte: "2024-01-15T09:30:00Z",
174
169
  * filter_completed_at_timestamp_lte: "2024-01-15T09:30:00Z",
170
+ * filter_last_delivery_task_completed_at_timestamp_gte: "2024-01-15T09:30:00Z",
171
+ * filter_last_delivery_task_completed_at_timestamp_lte: "2024-01-15T09:30:00Z",
175
172
  * filter_cancelled_at_timestamp_gte: "2024-01-15T09:30:00Z",
176
173
  * filter_cancelled_at_timestamp_lte: "2024-01-15T09:30:00Z",
177
174
  * filter_exception_at_timestamp_gte: "2024-01-15T09:30:00Z",
@@ -184,7 +181,7 @@ class Orders {
184
181
  __listExpandedForCoordinatorOperatorsV1() {
185
182
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
186
183
  var _a, _b, _c, _d, _e, _f;
187
- const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, search, filter_status: filterStatus, filter_awb_number: filterAwbNumber, filter_shipper_org_id: filterShipperOrgId, filter_off_chrt_shipper_org_data_id: filterOffChrtShipperOrgDataId, filter_coordinator_shipper_account_ids: filterCoordinatorShipperAccountIds, filter_executor_org_id: filterExecutorOrgId, filter_off_chrt_executor_org_data_id: filterOffChrtExecutorOrgDataId, filter_coordinator_labels: filterCoordinatorLabels, filter_draft_started_at_timestamp_gte: filterDraftStartedAtTimestampGte, filter_draft_started_at_timestamp_lte: filterDraftStartedAtTimestampLte, filter_staged_at_timestamp_gte: filterStagedAtTimestampGte, filter_staged_at_timestamp_lte: filterStagedAtTimestampLte, filter_in_progress_at_timestamp_gte: filterInProgressAtTimestampGte, filter_in_progress_at_timestamp_lte: filterInProgressAtTimestampLte, filter_completed_at_timestamp_gte: filterCompletedAtTimestampGte, filter_completed_at_timestamp_lte: filterCompletedAtTimestampLte, filter_cancelled_at_timestamp_gte: filterCancelledAtTimestampGte, filter_cancelled_at_timestamp_lte: filterCancelledAtTimestampLte, filter_exception_at_timestamp_gte: filterExceptionAtTimestampGte, filter_exception_at_timestamp_lte: filterExceptionAtTimestampLte } = request, _body = __rest(request, ["sort_by", "sort_order", "page", "page_size", "search", "filter_status", "filter_awb_number", "filter_shipper_org_id", "filter_off_chrt_shipper_org_data_id", "filter_coordinator_shipper_account_ids", "filter_executor_org_id", "filter_off_chrt_executor_org_data_id", "filter_coordinator_labels", "filter_draft_started_at_timestamp_gte", "filter_draft_started_at_timestamp_lte", "filter_staged_at_timestamp_gte", "filter_staged_at_timestamp_lte", "filter_in_progress_at_timestamp_gte", "filter_in_progress_at_timestamp_lte", "filter_completed_at_timestamp_gte", "filter_completed_at_timestamp_lte", "filter_cancelled_at_timestamp_gte", "filter_cancelled_at_timestamp_lte", "filter_exception_at_timestamp_gte", "filter_exception_at_timestamp_lte"]);
184
+ const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, search, filter_status: filterStatus, filter_awb_number: filterAwbNumber, filter_shipper_org_id: filterShipperOrgId, filter_off_chrt_shipper_org_data_id: filterOffChrtShipperOrgDataId, filter_coordinator_shipper_account_ids: filterCoordinatorShipperAccountIds, filter_executor_org_id: filterExecutorOrgId, filter_off_chrt_executor_org_data_id: filterOffChrtExecutorOrgDataId, filter_coordinator_labels: filterCoordinatorLabels, filter_draft_started_at_timestamp_gte: filterDraftStartedAtTimestampGte, filter_draft_started_at_timestamp_lte: filterDraftStartedAtTimestampLte, filter_staged_at_timestamp_gte: filterStagedAtTimestampGte, filter_staged_at_timestamp_lte: filterStagedAtTimestampLte, filter_in_progress_at_timestamp_gte: filterInProgressAtTimestampGte, filter_in_progress_at_timestamp_lte: filterInProgressAtTimestampLte, filter_completed_at_timestamp_gte: filterCompletedAtTimestampGte, filter_completed_at_timestamp_lte: filterCompletedAtTimestampLte, filter_last_delivery_task_completed_at_timestamp_gte: filterLastDeliveryTaskCompletedAtTimestampGte, filter_last_delivery_task_completed_at_timestamp_lte: filterLastDeliveryTaskCompletedAtTimestampLte, filter_cancelled_at_timestamp_gte: filterCancelledAtTimestampGte, filter_cancelled_at_timestamp_lte: filterCancelledAtTimestampLte, filter_exception_at_timestamp_gte: filterExceptionAtTimestampGte, filter_exception_at_timestamp_lte: filterExceptionAtTimestampLte } = request, _body = __rest(request, ["sort_by", "sort_order", "page", "page_size", "search", "filter_status", "filter_awb_number", "filter_shipper_org_id", "filter_off_chrt_shipper_org_data_id", "filter_coordinator_shipper_account_ids", "filter_executor_org_id", "filter_off_chrt_executor_org_data_id", "filter_coordinator_labels", "filter_draft_started_at_timestamp_gte", "filter_draft_started_at_timestamp_lte", "filter_staged_at_timestamp_gte", "filter_staged_at_timestamp_lte", "filter_in_progress_at_timestamp_gte", "filter_in_progress_at_timestamp_lte", "filter_completed_at_timestamp_gte", "filter_completed_at_timestamp_lte", "filter_last_delivery_task_completed_at_timestamp_gte", "filter_last_delivery_task_completed_at_timestamp_lte", "filter_cancelled_at_timestamp_gte", "filter_cancelled_at_timestamp_lte", "filter_exception_at_timestamp_gte", "filter_exception_at_timestamp_lte"]);
188
185
  const _queryParams = {};
189
186
  if (sortBy !== undefined) {
190
187
  _queryParams["sort_by"] = sortBy;
@@ -264,6 +261,14 @@ class Orders {
264
261
  if (filterCompletedAtTimestampLte !== undefined) {
265
262
  _queryParams["filter_completed_at_timestamp_lte"] = filterCompletedAtTimestampLte;
266
263
  }
264
+ if (filterLastDeliveryTaskCompletedAtTimestampGte !== undefined) {
265
+ _queryParams["filter_last_delivery_task_completed_at_timestamp_gte"] =
266
+ filterLastDeliveryTaskCompletedAtTimestampGte;
267
+ }
268
+ if (filterLastDeliveryTaskCompletedAtTimestampLte !== undefined) {
269
+ _queryParams["filter_last_delivery_task_completed_at_timestamp_lte"] =
270
+ filterLastDeliveryTaskCompletedAtTimestampLte;
271
+ }
267
272
  if (filterCancelledAtTimestampGte !== undefined) {
268
273
  _queryParams["filter_cancelled_at_timestamp_gte"] = filterCancelledAtTimestampGte;
269
274
  }
@@ -321,6 +326,132 @@ class Orders {
321
326
  }
322
327
  });
323
328
  }
329
+ /**
330
+ * Regenerates uninvoiced rate-sheet charges per Order, reporting skips and failures. Detach existing charges before regeneration. | authz: allowed_org_types=[provider], min_org_role=operator | authz_personas=[coordinator_org_operators] | (OrderRateSheetLineItemsGenerateManyReq) -> (OrderRateSheetLineItemsGenerateManyRes)
331
+ *
332
+ * @param {Chrt.billingNew.OrderRateSheetLineItemsGenerateManyReq} request
333
+ * @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
334
+ *
335
+ * @throws {@link Chrt.UnprocessableEntityError}
336
+ *
337
+ * @example
338
+ * await client.billingNew.orders.generateRateSheetLineItemsManyV1({
339
+ * order_ids: ["order_ids"]
340
+ * })
341
+ */
342
+ generateRateSheetLineItemsManyV1(request, requestOptions) {
343
+ return core.HttpResponsePromise.fromPromise(this.__generateRateSheetLineItemsManyV1(request, requestOptions));
344
+ }
345
+ __generateRateSheetLineItemsManyV1(request, requestOptions) {
346
+ return __awaiter(this, void 0, void 0, function* () {
347
+ var _a, _b, _c, _d;
348
+ 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);
349
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
350
+ 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, "billing_new/orders/rate_sheet_line_items/generate_many/v1"),
351
+ method: "POST",
352
+ headers: _headers,
353
+ contentType: "application/json",
354
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
355
+ requestType: "json",
356
+ body: request,
357
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
358
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
359
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
360
+ });
361
+ if (_response.ok) {
362
+ return {
363
+ data: _response.body,
364
+ rawResponse: _response.rawResponse,
365
+ };
366
+ }
367
+ if (_response.error.reason === "status-code") {
368
+ switch (_response.error.statusCode) {
369
+ case 422:
370
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
371
+ default:
372
+ throw new errors.ChrtError({
373
+ statusCode: _response.error.statusCode,
374
+ body: _response.error.body,
375
+ rawResponse: _response.rawResponse,
376
+ });
377
+ }
378
+ }
379
+ switch (_response.error.reason) {
380
+ case "non-json":
381
+ throw new errors.ChrtError({
382
+ statusCode: _response.error.statusCode,
383
+ body: _response.error.rawBody,
384
+ rawResponse: _response.rawResponse,
385
+ });
386
+ case "timeout":
387
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /billing_new/orders/rate_sheet_line_items/generate_many/v1.");
388
+ case "unknown":
389
+ throw new errors.ChrtError({
390
+ message: _response.error.errorMessage,
391
+ rawResponse: _response.rawResponse,
392
+ });
393
+ }
394
+ });
395
+ }
396
+ /**
397
+ * Estimates current taxes for uninvoiced ordinary charges grouped by counterparty, direction, and currency. Returns an empty list when no charges qualify. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (list[InvoicePreviewRes])
398
+ *
399
+ * @param {string} orderId
400
+ * @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
401
+ *
402
+ * @throws {@link Chrt.UnprocessableEntityError}
403
+ *
404
+ * @example
405
+ * await client.billingNew.orders.taxEstimatesV1("order_id")
406
+ */
407
+ taxEstimatesV1(orderId, requestOptions) {
408
+ return core.HttpResponsePromise.fromPromise(this.__taxEstimatesV1(orderId, requestOptions));
409
+ }
410
+ __taxEstimatesV1(orderId, requestOptions) {
411
+ return __awaiter(this, void 0, void 0, function* () {
412
+ var _a, _b, _c, _d;
413
+ 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);
414
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
415
+ 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, `billing_new/orders/tax_estimates/v1/${encodeURIComponent(orderId)}`),
416
+ method: "GET",
417
+ headers: _headers,
418
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
419
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
420
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
421
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
422
+ });
423
+ if (_response.ok) {
424
+ return { data: _response.body, rawResponse: _response.rawResponse };
425
+ }
426
+ if (_response.error.reason === "status-code") {
427
+ switch (_response.error.statusCode) {
428
+ case 422:
429
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
430
+ default:
431
+ throw new errors.ChrtError({
432
+ statusCode: _response.error.statusCode,
433
+ body: _response.error.body,
434
+ rawResponse: _response.rawResponse,
435
+ });
436
+ }
437
+ }
438
+ switch (_response.error.reason) {
439
+ case "non-json":
440
+ throw new errors.ChrtError({
441
+ statusCode: _response.error.statusCode,
442
+ body: _response.error.rawBody,
443
+ rawResponse: _response.rawResponse,
444
+ });
445
+ case "timeout":
446
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /billing_new/orders/tax_estimates/v1/{order_id}.");
447
+ case "unknown":
448
+ throw new errors.ChrtError({
449
+ message: _response.error.errorMessage,
450
+ rawResponse: _response.rawResponse,
451
+ });
452
+ }
453
+ });
454
+ }
324
455
  _getAuthorizationHeader() {
325
456
  return __awaiter(this, void 0, void 0, function* () {
326
457
  const bearer = yield core.Supplier.get(this._options.token);