@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
@@ -26,6 +26,8 @@ import * as Chrt from "../../../../../../index.mjs";
26
26
  * filter_in_progress_at_timestamp_lte: "2024-01-15T09:30:00Z",
27
27
  * filter_completed_at_timestamp_gte: "2024-01-15T09:30:00Z",
28
28
  * filter_completed_at_timestamp_lte: "2024-01-15T09:30:00Z",
29
+ * filter_last_delivery_task_completed_at_timestamp_gte: "2024-01-15T09:30:00Z",
30
+ * filter_last_delivery_task_completed_at_timestamp_lte: "2024-01-15T09:30:00Z",
29
31
  * filter_cancelled_at_timestamp_gte: "2024-01-15T09:30:00Z",
30
32
  * filter_cancelled_at_timestamp_lte: "2024-01-15T09:30:00Z",
31
33
  * filter_exception_at_timestamp_gte: "2024-01-15T09:30:00Z",
@@ -33,7 +35,7 @@ import * as Chrt from "../../../../../../index.mjs";
33
35
  * }
34
36
  */
35
37
  export interface OrderBillingExpandedListReq {
36
- /** Order lifecycle timestamp used for sorting. */
38
+ /** Order lifecycle or last delivery completion timestamp used for sorting. */
37
39
  sort_by?: Chrt.OrderBillingSortByEnum | null;
38
40
  /** Sort order (asc or desc). */
39
41
  sort_order?: Chrt.SortOrderEnum | null;
@@ -65,6 +67,10 @@ export interface OrderBillingExpandedListReq {
65
67
  filter_in_progress_at_timestamp_lte?: string | null;
66
68
  filter_completed_at_timestamp_gte?: string | null;
67
69
  filter_completed_at_timestamp_lte?: string | null;
70
+ /** Filter by last delivery completion time, inclusive. */
71
+ filter_last_delivery_task_completed_at_timestamp_gte?: string | null;
72
+ /** Filter by last delivery completion time, inclusive. */
73
+ filter_last_delivery_task_completed_at_timestamp_lte?: string | null;
68
74
  filter_cancelled_at_timestamp_gte?: string | null;
69
75
  filter_cancelled_at_timestamp_lte?: string | null;
70
76
  filter_exception_at_timestamp_gte?: string | null;
@@ -1,2 +1,3 @@
1
1
  export { type OrdersListAwbBillingForCoordinatorOperatorsV1Request } from "./OrdersListAwbBillingForCoordinatorOperatorsV1Request.mjs";
2
2
  export { type OrderBillingExpandedListReq } from "./OrderBillingExpandedListReq.mjs";
3
+ export { type OrderRateSheetLineItemsGenerateManyReq } from "./OrderRateSheetLineItemsGenerateManyReq.mjs";
@@ -1,2 +1 @@
1
1
  export * from "./client/index.mjs";
2
- export * from "./resources/index.mjs";
@@ -1,2 +1 @@
1
1
  export * from "./client/index.mjs";
2
- export * from "./resources/index.mjs";
@@ -0,0 +1,128 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as environments from "../../../../../../environments.mjs";
5
+ import * as core from "../../../../../../core/index.mjs";
6
+ import * as Chrt from "../../../../../index.mjs";
7
+ export declare namespace TaxConfigurations {
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 TaxConfigurations {
31
+ protected readonly _options: TaxConfigurations.Options;
32
+ constructor(_options?: TaxConfigurations.Options);
33
+ /**
34
+ * Archives a tax configuration so future resolution falls back to the next applicable scope. Repeated archival is unchanged. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (TaxConfiguration1)
35
+ *
36
+ * @param {string} taxConfigurationId
37
+ * @param {TaxConfigurations.RequestOptions} requestOptions - Request-specific configuration.
38
+ *
39
+ * @throws {@link Chrt.UnprocessableEntityError}
40
+ *
41
+ * @example
42
+ * await client.billingNew.taxConfigurations.archiveV1("tax_configuration_id")
43
+ */
44
+ archiveV1(taxConfigurationId: string, requestOptions?: TaxConfigurations.RequestOptions): core.HttpResponsePromise<Chrt.TaxConfiguration1>;
45
+ private __archiveV1;
46
+ /**
47
+ * Creates a counterparty tax default or account override. Empty rules mean no tax. | authz: allowed_org_types=[provider], min_org_role=operator | (TaxConfigurationClientCreate1) -> (TaxConfiguration1)
48
+ *
49
+ * @param {Chrt.billingNew.TaxConfigurationClientCreate1} request
50
+ * @param {TaxConfigurations.RequestOptions} requestOptions - Request-specific configuration.
51
+ *
52
+ * @throws {@link Chrt.UnprocessableEntityError}
53
+ *
54
+ * @example
55
+ * await client.billingNew.taxConfigurations.createV1({
56
+ * name: "name",
57
+ * schema_version: 1
58
+ * })
59
+ */
60
+ createV1(request: Chrt.billingNew.TaxConfigurationClientCreate1, requestOptions?: TaxConfigurations.RequestOptions): core.HttpResponsePromise<Chrt.TaxConfiguration1>;
61
+ private __createV1;
62
+ /**
63
+ * Retrieves an active or archived tax configuration owned by the caller's organization. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (TaxConfiguration1)
64
+ *
65
+ * @param {string} taxConfigurationId
66
+ * @param {TaxConfigurations.RequestOptions} requestOptions - Request-specific configuration.
67
+ *
68
+ * @throws {@link Chrt.UnprocessableEntityError}
69
+ *
70
+ * @example
71
+ * await client.billingNew.taxConfigurations.getV1("tax_configuration_id")
72
+ */
73
+ getV1(taxConfigurationId: string, requestOptions?: TaxConfigurations.RequestOptions): core.HttpResponsePromise<Chrt.TaxConfiguration1>;
74
+ private __getV1;
75
+ /**
76
+ * Lists owner-scoped tax configurations with counterparty, account, archive, date, sorting, and pagination filters. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (TaxConfigurationListRes)
77
+ *
78
+ * @param {Chrt.billingNew.TaxConfigurationsListV1Request} request
79
+ * @param {TaxConfigurations.RequestOptions} requestOptions - Request-specific configuration.
80
+ *
81
+ * @throws {@link Chrt.UnprocessableEntityError}
82
+ *
83
+ * @example
84
+ * await client.billingNew.taxConfigurations.listV1({
85
+ * sort_by: "name",
86
+ * sort_order: "asc",
87
+ * page: 1,
88
+ * page_size: 1,
89
+ * filter_counterparty_org_id: "filter_counterparty_org_id",
90
+ * filter_counterparty_off_chrt_org_data_id: "filter_counterparty_off_chrt_org_data_id",
91
+ * filter_counterparty_driver_id: "filter_counterparty_driver_id",
92
+ * filter_shipper_account_id: "filter_shipper_account_id",
93
+ * filter_archived: true,
94
+ * filter_created_at_timestamp_gte: "2024-01-15T09:30:00Z",
95
+ * filter_created_at_timestamp_lte: "2024-01-15T09:30:00Z"
96
+ * })
97
+ */
98
+ listV1(request?: Chrt.billingNew.TaxConfigurationsListV1Request, requestOptions?: TaxConfigurations.RequestOptions): core.HttpResponsePromise<Chrt.TaxConfigurationListRes>;
99
+ private __listV1;
100
+ /**
101
+ * Resolves account taxes or the counterparty default; returns null when neither exists. Empty rules explicitly mean no tax. | authz: allowed_org_types=[provider], min_org_role=operator | (TaxConfigurationResolveReq) -> (TaxConfiguration1 | None)
102
+ *
103
+ * @param {Chrt.billingNew.TaxConfigurationResolveReq} request
104
+ * @param {TaxConfigurations.RequestOptions} requestOptions - Request-specific configuration.
105
+ *
106
+ * @throws {@link Chrt.UnprocessableEntityError}
107
+ *
108
+ * @example
109
+ * await client.billingNew.taxConfigurations.resolveV1()
110
+ */
111
+ resolveV1(request?: Chrt.billingNew.TaxConfigurationResolveReq, requestOptions?: TaxConfigurations.RequestOptions): core.HttpResponsePromise<(Chrt.TaxConfiguration1 | null) | undefined>;
112
+ private __resolveV1;
113
+ /**
114
+ * Updates an active tax configuration's name or rules. Empty rules explicitly mean no tax. | authz: allowed_org_types=[provider], min_org_role=operator | (TaxConfigurationClientUpdate1) -> (TaxConfiguration1)
115
+ *
116
+ * @param {string} taxConfigurationId
117
+ * @param {Chrt.billingNew.TaxConfigurationClientUpdate1} request
118
+ * @param {TaxConfigurations.RequestOptions} requestOptions - Request-specific configuration.
119
+ *
120
+ * @throws {@link Chrt.UnprocessableEntityError}
121
+ *
122
+ * @example
123
+ * await client.billingNew.taxConfigurations.updateV1("tax_configuration_id")
124
+ */
125
+ updateV1(taxConfigurationId: string, request?: Chrt.billingNew.TaxConfigurationClientUpdate1, requestOptions?: TaxConfigurations.RequestOptions): core.HttpResponsePromise<Chrt.TaxConfiguration1>;
126
+ private __updateV1;
127
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
128
+ }
@@ -0,0 +1,448 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
5
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6
+ return new (P || (P = Promise))(function (resolve, reject) {
7
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
8
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
9
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
10
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
11
+ });
12
+ };
13
+ import * as environments from "../../../../../../environments.mjs";
14
+ import * as core from "../../../../../../core/index.mjs";
15
+ import * as Chrt from "../../../../../index.mjs";
16
+ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers.mjs";
17
+ import * as errors from "../../../../../../errors/index.mjs";
18
+ export class TaxConfigurations {
19
+ constructor(_options = {}) {
20
+ this._options = _options;
21
+ }
22
+ /**
23
+ * Archives a tax configuration so future resolution falls back to the next applicable scope. Repeated archival is unchanged. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (TaxConfiguration1)
24
+ *
25
+ * @param {string} taxConfigurationId
26
+ * @param {TaxConfigurations.RequestOptions} requestOptions - Request-specific configuration.
27
+ *
28
+ * @throws {@link Chrt.UnprocessableEntityError}
29
+ *
30
+ * @example
31
+ * await client.billingNew.taxConfigurations.archiveV1("tax_configuration_id")
32
+ */
33
+ archiveV1(taxConfigurationId, requestOptions) {
34
+ return core.HttpResponsePromise.fromPromise(this.__archiveV1(taxConfigurationId, requestOptions));
35
+ }
36
+ __archiveV1(taxConfigurationId, requestOptions) {
37
+ return __awaiter(this, void 0, void 0, function* () {
38
+ var _a, _b, _c, _d;
39
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
40
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
41
+ 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/tax_configurations/archive/v1/${encodeURIComponent(taxConfigurationId)}`),
42
+ method: "POST",
43
+ headers: _headers,
44
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
45
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
46
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
47
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
48
+ });
49
+ if (_response.ok) {
50
+ return { data: _response.body, rawResponse: _response.rawResponse };
51
+ }
52
+ if (_response.error.reason === "status-code") {
53
+ switch (_response.error.statusCode) {
54
+ case 422:
55
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
56
+ default:
57
+ throw new errors.ChrtError({
58
+ statusCode: _response.error.statusCode,
59
+ body: _response.error.body,
60
+ rawResponse: _response.rawResponse,
61
+ });
62
+ }
63
+ }
64
+ switch (_response.error.reason) {
65
+ case "non-json":
66
+ throw new errors.ChrtError({
67
+ statusCode: _response.error.statusCode,
68
+ body: _response.error.rawBody,
69
+ rawResponse: _response.rawResponse,
70
+ });
71
+ case "timeout":
72
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /billing_new/tax_configurations/archive/v1/{tax_configuration_id}.");
73
+ case "unknown":
74
+ throw new errors.ChrtError({
75
+ message: _response.error.errorMessage,
76
+ rawResponse: _response.rawResponse,
77
+ });
78
+ }
79
+ });
80
+ }
81
+ /**
82
+ * Creates a counterparty tax default or account override. Empty rules mean no tax. | authz: allowed_org_types=[provider], min_org_role=operator | (TaxConfigurationClientCreate1) -> (TaxConfiguration1)
83
+ *
84
+ * @param {Chrt.billingNew.TaxConfigurationClientCreate1} request
85
+ * @param {TaxConfigurations.RequestOptions} requestOptions - Request-specific configuration.
86
+ *
87
+ * @throws {@link Chrt.UnprocessableEntityError}
88
+ *
89
+ * @example
90
+ * await client.billingNew.taxConfigurations.createV1({
91
+ * name: "name",
92
+ * schema_version: 1
93
+ * })
94
+ */
95
+ createV1(request, requestOptions) {
96
+ return core.HttpResponsePromise.fromPromise(this.__createV1(request, requestOptions));
97
+ }
98
+ __createV1(request, requestOptions) {
99
+ return __awaiter(this, void 0, void 0, function* () {
100
+ var _a, _b, _c, _d;
101
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
102
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
103
+ 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/tax_configurations/create/v1"),
104
+ method: "POST",
105
+ headers: _headers,
106
+ contentType: "application/json",
107
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
108
+ requestType: "json",
109
+ body: request,
110
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
111
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
112
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
113
+ });
114
+ if (_response.ok) {
115
+ return { data: _response.body, rawResponse: _response.rawResponse };
116
+ }
117
+ if (_response.error.reason === "status-code") {
118
+ switch (_response.error.statusCode) {
119
+ case 422:
120
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
121
+ default:
122
+ throw new errors.ChrtError({
123
+ statusCode: _response.error.statusCode,
124
+ body: _response.error.body,
125
+ rawResponse: _response.rawResponse,
126
+ });
127
+ }
128
+ }
129
+ switch (_response.error.reason) {
130
+ case "non-json":
131
+ throw new errors.ChrtError({
132
+ statusCode: _response.error.statusCode,
133
+ body: _response.error.rawBody,
134
+ rawResponse: _response.rawResponse,
135
+ });
136
+ case "timeout":
137
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /billing_new/tax_configurations/create/v1.");
138
+ case "unknown":
139
+ throw new errors.ChrtError({
140
+ message: _response.error.errorMessage,
141
+ rawResponse: _response.rawResponse,
142
+ });
143
+ }
144
+ });
145
+ }
146
+ /**
147
+ * Retrieves an active or archived tax configuration owned by the caller's organization. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (TaxConfiguration1)
148
+ *
149
+ * @param {string} taxConfigurationId
150
+ * @param {TaxConfigurations.RequestOptions} requestOptions - Request-specific configuration.
151
+ *
152
+ * @throws {@link Chrt.UnprocessableEntityError}
153
+ *
154
+ * @example
155
+ * await client.billingNew.taxConfigurations.getV1("tax_configuration_id")
156
+ */
157
+ getV1(taxConfigurationId, requestOptions) {
158
+ return core.HttpResponsePromise.fromPromise(this.__getV1(taxConfigurationId, requestOptions));
159
+ }
160
+ __getV1(taxConfigurationId, requestOptions) {
161
+ return __awaiter(this, void 0, void 0, function* () {
162
+ var _a, _b, _c, _d;
163
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
164
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
165
+ 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/tax_configurations/get/v1/${encodeURIComponent(taxConfigurationId)}`),
166
+ method: "GET",
167
+ headers: _headers,
168
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
169
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
170
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
171
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
172
+ });
173
+ if (_response.ok) {
174
+ return { data: _response.body, rawResponse: _response.rawResponse };
175
+ }
176
+ if (_response.error.reason === "status-code") {
177
+ switch (_response.error.statusCode) {
178
+ case 422:
179
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
180
+ default:
181
+ throw new errors.ChrtError({
182
+ statusCode: _response.error.statusCode,
183
+ body: _response.error.body,
184
+ rawResponse: _response.rawResponse,
185
+ });
186
+ }
187
+ }
188
+ switch (_response.error.reason) {
189
+ case "non-json":
190
+ throw new errors.ChrtError({
191
+ statusCode: _response.error.statusCode,
192
+ body: _response.error.rawBody,
193
+ rawResponse: _response.rawResponse,
194
+ });
195
+ case "timeout":
196
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /billing_new/tax_configurations/get/v1/{tax_configuration_id}.");
197
+ case "unknown":
198
+ throw new errors.ChrtError({
199
+ message: _response.error.errorMessage,
200
+ rawResponse: _response.rawResponse,
201
+ });
202
+ }
203
+ });
204
+ }
205
+ /**
206
+ * Lists owner-scoped tax configurations with counterparty, account, archive, date, sorting, and pagination filters. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (TaxConfigurationListRes)
207
+ *
208
+ * @param {Chrt.billingNew.TaxConfigurationsListV1Request} request
209
+ * @param {TaxConfigurations.RequestOptions} requestOptions - Request-specific configuration.
210
+ *
211
+ * @throws {@link Chrt.UnprocessableEntityError}
212
+ *
213
+ * @example
214
+ * await client.billingNew.taxConfigurations.listV1({
215
+ * sort_by: "name",
216
+ * sort_order: "asc",
217
+ * page: 1,
218
+ * page_size: 1,
219
+ * filter_counterparty_org_id: "filter_counterparty_org_id",
220
+ * filter_counterparty_off_chrt_org_data_id: "filter_counterparty_off_chrt_org_data_id",
221
+ * filter_counterparty_driver_id: "filter_counterparty_driver_id",
222
+ * filter_shipper_account_id: "filter_shipper_account_id",
223
+ * filter_archived: true,
224
+ * filter_created_at_timestamp_gte: "2024-01-15T09:30:00Z",
225
+ * filter_created_at_timestamp_lte: "2024-01-15T09:30:00Z"
226
+ * })
227
+ */
228
+ listV1(request = {}, requestOptions) {
229
+ return core.HttpResponsePromise.fromPromise(this.__listV1(request, requestOptions));
230
+ }
231
+ __listV1() {
232
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
233
+ var _a, _b, _c, _d, _e, _f, _g;
234
+ const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, filter_counterparty_org_id: filterCounterpartyOrgId, filter_counterparty_off_chrt_org_data_id: filterCounterpartyOffChrtOrgDataId, filter_counterparty_driver_id: filterCounterpartyDriverId, filter_shipper_account_id: filterShipperAccountId, filter_archived: filterArchived, filter_created_at_timestamp_gte: filterCreatedAtTimestampGte, filter_created_at_timestamp_lte: filterCreatedAtTimestampLte, } = request;
235
+ const _queryParams = {};
236
+ if (sortBy !== undefined) {
237
+ _queryParams["sort_by"] = sortBy;
238
+ }
239
+ if (sortOrder !== undefined) {
240
+ _queryParams["sort_order"] = sortOrder;
241
+ }
242
+ if (page !== undefined) {
243
+ _queryParams["page"] = (_a = page === null || page === void 0 ? void 0 : page.toString()) !== null && _a !== void 0 ? _a : null;
244
+ }
245
+ if (pageSize !== undefined) {
246
+ _queryParams["page_size"] = (_b = pageSize === null || pageSize === void 0 ? void 0 : pageSize.toString()) !== null && _b !== void 0 ? _b : null;
247
+ }
248
+ if (filterCounterpartyOrgId !== undefined) {
249
+ _queryParams["filter_counterparty_org_id"] = filterCounterpartyOrgId;
250
+ }
251
+ if (filterCounterpartyOffChrtOrgDataId !== undefined) {
252
+ _queryParams["filter_counterparty_off_chrt_org_data_id"] = filterCounterpartyOffChrtOrgDataId;
253
+ }
254
+ if (filterCounterpartyDriverId !== undefined) {
255
+ _queryParams["filter_counterparty_driver_id"] = filterCounterpartyDriverId;
256
+ }
257
+ if (filterShipperAccountId !== undefined) {
258
+ _queryParams["filter_shipper_account_id"] = filterShipperAccountId;
259
+ }
260
+ if (filterArchived !== undefined) {
261
+ _queryParams["filter_archived"] = (_c = filterArchived === null || filterArchived === void 0 ? void 0 : filterArchived.toString()) !== null && _c !== void 0 ? _c : null;
262
+ }
263
+ if (filterCreatedAtTimestampGte !== undefined) {
264
+ _queryParams["filter_created_at_timestamp_gte"] = filterCreatedAtTimestampGte;
265
+ }
266
+ if (filterCreatedAtTimestampLte !== undefined) {
267
+ _queryParams["filter_created_at_timestamp_lte"] = filterCreatedAtTimestampLte;
268
+ }
269
+ let _headers = mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
270
+ const _response = yield ((_e = this._options.fetcher) !== null && _e !== void 0 ? _e : core.fetcher)({
271
+ url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.ChrtEnvironment.Local, "billing_new/tax_configurations/list/v1"),
272
+ method: "GET",
273
+ headers: _headers,
274
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
275
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
276
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
277
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
278
+ });
279
+ if (_response.ok) {
280
+ return { data: _response.body, rawResponse: _response.rawResponse };
281
+ }
282
+ if (_response.error.reason === "status-code") {
283
+ switch (_response.error.statusCode) {
284
+ case 422:
285
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
286
+ default:
287
+ throw new errors.ChrtError({
288
+ statusCode: _response.error.statusCode,
289
+ body: _response.error.body,
290
+ rawResponse: _response.rawResponse,
291
+ });
292
+ }
293
+ }
294
+ switch (_response.error.reason) {
295
+ case "non-json":
296
+ throw new errors.ChrtError({
297
+ statusCode: _response.error.statusCode,
298
+ body: _response.error.rawBody,
299
+ rawResponse: _response.rawResponse,
300
+ });
301
+ case "timeout":
302
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /billing_new/tax_configurations/list/v1.");
303
+ case "unknown":
304
+ throw new errors.ChrtError({
305
+ message: _response.error.errorMessage,
306
+ rawResponse: _response.rawResponse,
307
+ });
308
+ }
309
+ });
310
+ }
311
+ /**
312
+ * Resolves account taxes or the counterparty default; returns null when neither exists. Empty rules explicitly mean no tax. | authz: allowed_org_types=[provider], min_org_role=operator | (TaxConfigurationResolveReq) -> (TaxConfiguration1 | None)
313
+ *
314
+ * @param {Chrt.billingNew.TaxConfigurationResolveReq} request
315
+ * @param {TaxConfigurations.RequestOptions} requestOptions - Request-specific configuration.
316
+ *
317
+ * @throws {@link Chrt.UnprocessableEntityError}
318
+ *
319
+ * @example
320
+ * await client.billingNew.taxConfigurations.resolveV1()
321
+ */
322
+ resolveV1(request = {}, requestOptions) {
323
+ return core.HttpResponsePromise.fromPromise(this.__resolveV1(request, requestOptions));
324
+ }
325
+ __resolveV1() {
326
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
327
+ var _a, _b, _c, _d;
328
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
329
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
330
+ 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/tax_configurations/resolve/v1"),
331
+ method: "POST",
332
+ headers: _headers,
333
+ contentType: "application/json",
334
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
335
+ requestType: "json",
336
+ body: request,
337
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
338
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
339
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
340
+ });
341
+ if (_response.ok) {
342
+ return {
343
+ data: _response.body,
344
+ rawResponse: _response.rawResponse,
345
+ };
346
+ }
347
+ if (_response.error.reason === "status-code") {
348
+ switch (_response.error.statusCode) {
349
+ case 422:
350
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
351
+ default:
352
+ throw new errors.ChrtError({
353
+ statusCode: _response.error.statusCode,
354
+ body: _response.error.body,
355
+ rawResponse: _response.rawResponse,
356
+ });
357
+ }
358
+ }
359
+ switch (_response.error.reason) {
360
+ case "non-json":
361
+ throw new errors.ChrtError({
362
+ statusCode: _response.error.statusCode,
363
+ body: _response.error.rawBody,
364
+ rawResponse: _response.rawResponse,
365
+ });
366
+ case "timeout":
367
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /billing_new/tax_configurations/resolve/v1.");
368
+ case "unknown":
369
+ throw new errors.ChrtError({
370
+ message: _response.error.errorMessage,
371
+ rawResponse: _response.rawResponse,
372
+ });
373
+ }
374
+ });
375
+ }
376
+ /**
377
+ * Updates an active tax configuration's name or rules. Empty rules explicitly mean no tax. | authz: allowed_org_types=[provider], min_org_role=operator | (TaxConfigurationClientUpdate1) -> (TaxConfiguration1)
378
+ *
379
+ * @param {string} taxConfigurationId
380
+ * @param {Chrt.billingNew.TaxConfigurationClientUpdate1} request
381
+ * @param {TaxConfigurations.RequestOptions} requestOptions - Request-specific configuration.
382
+ *
383
+ * @throws {@link Chrt.UnprocessableEntityError}
384
+ *
385
+ * @example
386
+ * await client.billingNew.taxConfigurations.updateV1("tax_configuration_id")
387
+ */
388
+ updateV1(taxConfigurationId, request = {}, requestOptions) {
389
+ return core.HttpResponsePromise.fromPromise(this.__updateV1(taxConfigurationId, request, requestOptions));
390
+ }
391
+ __updateV1(taxConfigurationId_1) {
392
+ return __awaiter(this, arguments, void 0, function* (taxConfigurationId, request = {}, requestOptions) {
393
+ var _a, _b, _c, _d;
394
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
395
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
396
+ 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/tax_configurations/update/v1/${encodeURIComponent(taxConfigurationId)}`),
397
+ method: "PATCH",
398
+ headers: _headers,
399
+ contentType: "application/json",
400
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
401
+ requestType: "json",
402
+ body: request,
403
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
404
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
405
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
406
+ });
407
+ if (_response.ok) {
408
+ return { data: _response.body, rawResponse: _response.rawResponse };
409
+ }
410
+ if (_response.error.reason === "status-code") {
411
+ switch (_response.error.statusCode) {
412
+ case 422:
413
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
414
+ default:
415
+ throw new errors.ChrtError({
416
+ statusCode: _response.error.statusCode,
417
+ body: _response.error.body,
418
+ rawResponse: _response.rawResponse,
419
+ });
420
+ }
421
+ }
422
+ switch (_response.error.reason) {
423
+ case "non-json":
424
+ throw new errors.ChrtError({
425
+ statusCode: _response.error.statusCode,
426
+ body: _response.error.rawBody,
427
+ rawResponse: _response.rawResponse,
428
+ });
429
+ case "timeout":
430
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /billing_new/tax_configurations/update/v1/{tax_configuration_id}.");
431
+ case "unknown":
432
+ throw new errors.ChrtError({
433
+ message: _response.error.errorMessage,
434
+ rawResponse: _response.rawResponse,
435
+ });
436
+ }
437
+ });
438
+ }
439
+ _getAuthorizationHeader() {
440
+ return __awaiter(this, void 0, void 0, function* () {
441
+ const bearer = yield core.Supplier.get(this._options.token);
442
+ if (bearer != null) {
443
+ return `Bearer ${bearer}`;
444
+ }
445
+ return undefined;
446
+ });
447
+ }
448
+ }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../../../../../../index.mjs";
5
+ /**
6
+ * @example
7
+ * {
8
+ * name: "name",
9
+ * schema_version: 1
10
+ * }
11
+ */
12
+ export interface TaxConfigurationClientCreate1 {
13
+ counterparty_driver_id?: string | null;
14
+ counterparty_off_chrt_org_data_id?: string | null;
15
+ /** Must be a string starting with `org_` */
16
+ counterparty_org_id?: string | null;
17
+ name: string;
18
+ schema_version: number;
19
+ shipper_account_id?: string | null;
20
+ tax_rules?: Chrt.TaxRule1[];
21
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../../../../../../index.mjs";
5
+ /**
6
+ * @example
7
+ * {}
8
+ */
9
+ export interface TaxConfigurationClientUpdate1 {
10
+ name?: string | null;
11
+ tax_rules?: Chrt.TaxRule1[];
12
+ }