@chrt-inc/typescript-sdk 1.998.0 → 1.999.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 (214) 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 +28 -3
  20. package/dist/cjs/api/resources/billingNew/resources/orders/client/Client.js +126 -5
  21. package/dist/cjs/api/resources/billingNew/resources/orders/client/requests/index.d.ts +1 -0
  22. package/dist/cjs/api/resources/billingNew/resources/orders/index.d.ts +0 -1
  23. package/dist/cjs/api/resources/billingNew/resources/orders/index.js +0 -1
  24. package/dist/cjs/api/resources/billingNew/resources/taxConfigurations/client/Client.d.ts +128 -0
  25. package/dist/cjs/api/resources/billingNew/resources/taxConfigurations/client/Client.js +485 -0
  26. package/dist/cjs/api/resources/billingNew/resources/taxConfigurations/client/requests/TaxConfigurationClientCreate1.d.ts +21 -0
  27. package/dist/cjs/api/resources/billingNew/resources/taxConfigurations/client/requests/TaxConfigurationClientUpdate1.d.ts +12 -0
  28. package/dist/cjs/api/resources/billingNew/resources/taxConfigurations/client/requests/TaxConfigurationResolveReq.d.ts +14 -0
  29. package/dist/cjs/api/resources/billingNew/resources/taxConfigurations/client/requests/TaxConfigurationsListV1Request.d.ts +33 -0
  30. package/dist/cjs/api/resources/billingNew/resources/taxConfigurations/client/requests/index.d.ts +4 -0
  31. package/dist/cjs/api/resources/flights/client/Client.d.ts +1 -1
  32. package/dist/cjs/api/resources/flights/client/Client.js +1 -1
  33. package/dist/cjs/api/types/BillingCurrencyCodeEnum1.d.ts +1 -2
  34. package/dist/cjs/api/types/BillingCurrencyCodeEnum1.js +0 -1
  35. package/dist/cjs/api/types/BillingPeriodCloseRes.d.ts +8 -0
  36. package/dist/cjs/api/types/CalculatedInvoiceTax1.d.ts +12 -0
  37. package/dist/cjs/api/types/ChrtGroundProviderRates1.d.ts +0 -3
  38. package/dist/cjs/api/types/{CreateInvoiceLineItemsFromAwbCostsInvoiceRes1.d.ts → CreateInvoiceLineItemsFromAwbCostsGroupRes1.d.ts} +2 -2
  39. package/dist/cjs/api/types/CreateInvoiceLineItemsFromAwbCostsRes.d.ts +1 -1
  40. package/dist/cjs/api/{resources/billingNew/resources/invoices/client/requests → types}/InvoiceClientCreate1.d.ts +1 -9
  41. package/dist/cjs/api/types/InvoiceCreateFromOrdersReq.d.ts +22 -0
  42. package/dist/cjs/api/types/InvoiceCreateFromOrdersRes.d.ts +14 -0
  43. package/dist/cjs/api/types/InvoiceCreateFromOrdersRes.js +5 -0
  44. package/dist/cjs/api/types/InvoiceCreateReq.d.ts +20 -0
  45. package/dist/cjs/api/types/InvoiceCreateReq.js +5 -0
  46. package/dist/cjs/api/types/InvoiceLineItemExportListItem.d.ts +3 -2
  47. package/dist/cjs/api/types/InvoiceLineItemTypeEnum1.d.ts +2 -4
  48. package/dist/cjs/api/types/InvoiceLineItemTypeEnum1.js +1 -3
  49. package/dist/cjs/api/types/InvoicePreviewFromOrdersRes.d.ts +15 -0
  50. package/dist/cjs/api/types/InvoicePreviewFromOrdersRes.js +5 -0
  51. package/dist/cjs/api/types/InvoicePreviewRes.d.ts +10 -0
  52. package/dist/cjs/api/types/InvoicePreviewRes.js +5 -0
  53. package/dist/cjs/api/types/InvoiceTaxCalculation1.d.ts +12 -0
  54. package/dist/cjs/api/types/InvoiceTaxCalculation1.js +5 -0
  55. package/dist/cjs/api/types/TaxConfiguration1.d.ts +24 -0
  56. package/dist/cjs/api/types/TaxConfiguration1.js +5 -0
  57. package/dist/cjs/api/types/TaxConfigurationListRes.d.ts +8 -0
  58. package/dist/cjs/api/types/TaxConfigurationListRes.js +5 -0
  59. package/dist/cjs/api/types/TaxConfigurationSortByEnum.d.ts +8 -0
  60. package/dist/cjs/api/types/TaxConfigurationSortByEnum.js +10 -0
  61. package/dist/cjs/api/types/{TaxRate1.d.ts → TaxRule1.d.ts} +2 -3
  62. package/dist/cjs/api/types/TaxRule1.js +5 -0
  63. package/dist/cjs/api/types/index.d.ts +14 -6
  64. package/dist/cjs/api/types/index.js +14 -6
  65. package/dist/cjs/version.d.ts +1 -1
  66. package/dist/cjs/version.js +1 -1
  67. package/dist/esm/Client.mjs +2 -2
  68. package/dist/esm/api/resources/billingNew/client/Client.d.mts +3 -0
  69. package/dist/esm/api/resources/billingNew/client/Client.mjs +5 -0
  70. package/dist/esm/api/resources/billingNew/resources/billingPeriods/client/Client.d.mts +2 -2
  71. package/dist/esm/api/resources/billingNew/resources/billingPeriods/client/Client.mjs +1 -1
  72. package/dist/esm/api/resources/billingNew/resources/chrtGroundProviderRates/client/requests/ChrtGroundProviderRatesClientCreate1.d.mts +0 -3
  73. package/dist/esm/api/resources/billingNew/resources/chrtGroundProviderRates/client/requests/ChrtGroundProviderRatesClientUpdate1.d.mts +0 -6
  74. package/dist/esm/api/resources/billingNew/resources/index.d.mts +2 -0
  75. package/dist/esm/api/resources/billingNew/resources/index.mjs +2 -0
  76. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/Client.d.mts +17 -73
  77. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/Client.mjs +50 -193
  78. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/{resources/export/client → client}/requests/InvoiceLineItemExportListReq.d.mts +1 -0
  79. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/index.d.mts +1 -3
  80. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/index.d.mts +0 -1
  81. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/index.mjs +0 -1
  82. package/dist/esm/api/resources/billingNew/resources/invoices/client/Client.d.mts +57 -32
  83. package/dist/esm/api/resources/billingNew/resources/invoices/client/Client.mjs +169 -89
  84. package/dist/esm/api/resources/billingNew/resources/invoices/client/requests/index.d.mts +0 -1
  85. package/dist/esm/api/resources/billingNew/resources/orders/client/Client.d.mts +28 -3
  86. package/dist/esm/api/resources/billingNew/resources/orders/client/Client.mjs +126 -5
  87. package/dist/esm/api/resources/billingNew/resources/orders/client/requests/index.d.mts +1 -0
  88. package/dist/esm/api/resources/billingNew/resources/orders/index.d.mts +0 -1
  89. package/dist/esm/api/resources/billingNew/resources/orders/index.mjs +0 -1
  90. package/dist/esm/api/resources/billingNew/resources/taxConfigurations/client/Client.d.mts +128 -0
  91. package/dist/esm/api/resources/billingNew/resources/taxConfigurations/client/Client.mjs +448 -0
  92. package/dist/esm/api/resources/billingNew/resources/taxConfigurations/client/requests/TaxConfigurationClientCreate1.d.mts +21 -0
  93. package/dist/esm/api/resources/billingNew/resources/taxConfigurations/client/requests/TaxConfigurationClientUpdate1.d.mts +12 -0
  94. package/dist/esm/api/resources/billingNew/resources/taxConfigurations/client/requests/TaxConfigurationResolveReq.d.mts +14 -0
  95. package/dist/esm/api/resources/billingNew/resources/taxConfigurations/client/requests/TaxConfigurationsListV1Request.d.mts +33 -0
  96. package/dist/esm/api/resources/billingNew/resources/taxConfigurations/client/requests/index.d.mts +4 -0
  97. package/dist/esm/api/resources/flights/client/Client.d.mts +1 -1
  98. package/dist/esm/api/resources/flights/client/Client.mjs +1 -1
  99. package/dist/esm/api/types/BillingCurrencyCodeEnum1.d.mts +1 -2
  100. package/dist/esm/api/types/BillingCurrencyCodeEnum1.mjs +0 -1
  101. package/dist/esm/api/types/BillingPeriodCloseRes.d.mts +8 -0
  102. package/dist/esm/api/types/CalculatedInvoiceTax1.d.mts +12 -0
  103. package/dist/esm/api/types/ChrtGroundProviderRates1.d.mts +0 -3
  104. package/dist/esm/api/types/{CreateInvoiceLineItemsFromAwbCostsInvoiceRes1.d.mts → CreateInvoiceLineItemsFromAwbCostsGroupRes1.d.mts} +2 -2
  105. package/dist/esm/api/types/CreateInvoiceLineItemsFromAwbCostsRes.d.mts +1 -1
  106. package/dist/esm/api/{resources/billingNew/resources/invoices/client/requests → types}/InvoiceClientCreate1.d.mts +1 -9
  107. package/dist/esm/api/types/InvoiceCreateFromOrdersReq.d.mts +22 -0
  108. package/dist/esm/api/types/InvoiceCreateFromOrdersRes.d.mts +14 -0
  109. package/dist/esm/api/types/InvoiceCreateFromOrdersRes.mjs +4 -0
  110. package/dist/esm/api/types/InvoiceCreateReq.d.mts +20 -0
  111. package/dist/esm/api/types/InvoiceCreateReq.mjs +4 -0
  112. package/dist/esm/api/types/InvoiceLineItemExportListItem.d.mts +3 -2
  113. package/dist/esm/api/types/InvoiceLineItemTypeEnum1.d.mts +2 -4
  114. package/dist/esm/api/types/InvoiceLineItemTypeEnum1.mjs +1 -3
  115. package/dist/esm/api/types/InvoicePreviewFromOrdersRes.d.mts +15 -0
  116. package/dist/esm/api/types/InvoicePreviewFromOrdersRes.mjs +4 -0
  117. package/dist/esm/api/types/InvoicePreviewRes.d.mts +10 -0
  118. package/dist/esm/api/types/InvoicePreviewRes.mjs +4 -0
  119. package/dist/esm/api/types/InvoiceTaxCalculation1.d.mts +12 -0
  120. package/dist/esm/api/types/InvoiceTaxCalculation1.mjs +4 -0
  121. package/dist/esm/api/types/TaxConfiguration1.d.mts +24 -0
  122. package/dist/esm/api/types/TaxConfiguration1.mjs +4 -0
  123. package/dist/esm/api/types/TaxConfigurationListRes.d.mts +8 -0
  124. package/dist/esm/api/types/TaxConfigurationListRes.mjs +4 -0
  125. package/dist/esm/api/types/TaxConfigurationSortByEnum.d.mts +8 -0
  126. package/dist/esm/api/types/TaxConfigurationSortByEnum.mjs +7 -0
  127. package/dist/esm/api/types/{TaxRate1.d.mts → TaxRule1.d.mts} +2 -3
  128. package/dist/esm/api/types/TaxRule1.mjs +4 -0
  129. package/dist/esm/api/types/index.d.mts +14 -6
  130. package/dist/esm/api/types/index.mjs +14 -6
  131. package/dist/esm/version.d.mts +1 -1
  132. package/dist/esm/version.mjs +1 -1
  133. package/package.json +1 -1
  134. package/reference.md +520 -219
  135. package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/requests/CreateInvoiceLineItemsFromAmountReq.d.ts +0 -32
  136. package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/requests/CreateInvoiceLineItemsFromLineItemsReq.d.ts +0 -46
  137. package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/requests/RecalculateOrderTaxInvoiceLineItemsReq.d.ts +0 -12
  138. package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/resources/export/client/Client.d.ts +0 -51
  139. package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/resources/export/client/Client.js +0 -153
  140. package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/resources/export/client/requests/index.d.ts +0 -1
  141. package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/resources/index.d.ts +0 -2
  142. package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/resources/index.js +0 -41
  143. package/dist/cjs/api/resources/billingNew/resources/orders/resources/index.d.ts +0 -2
  144. package/dist/cjs/api/resources/billingNew/resources/orders/resources/index.js +0 -41
  145. package/dist/cjs/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/client/Client.d.ts +0 -49
  146. package/dist/cjs/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/client/Client.js +0 -135
  147. package/dist/cjs/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/client/index.d.ts +0 -2
  148. package/dist/cjs/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/client/index.js +0 -17
  149. package/dist/cjs/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/client/requests/index.d.ts +0 -1
  150. package/dist/cjs/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/client/requests/index.js +0 -2
  151. package/dist/cjs/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/index.d.ts +0 -1
  152. package/dist/cjs/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/index.js +0 -17
  153. package/dist/cjs/api/types/CreateInvoiceLineItemsFromAmountRes.d.ts +0 -7
  154. package/dist/cjs/api/types/CreateInvoiceLineItemsFromLineItemsRes.d.ts +0 -7
  155. package/dist/cjs/api/types/InvoiceLineItemAmountTransformation1.d.ts +0 -8
  156. package/dist/cjs/api/types/InvoiceLineItemAmountTransformationTypeEnum1.d.ts +0 -9
  157. package/dist/cjs/api/types/InvoiceLineItemAmountTransformationTypeEnum1.js +0 -11
  158. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/CreateInvoiceLineItemsFromAmountReq.d.mts +0 -32
  159. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/CreateInvoiceLineItemsFromLineItemsReq.d.mts +0 -46
  160. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/RecalculateOrderTaxInvoiceLineItemsReq.d.mts +0 -12
  161. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/resources/export/client/Client.d.mts +0 -51
  162. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/resources/export/client/Client.mjs +0 -116
  163. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/resources/export/client/requests/index.d.mts +0 -1
  164. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/resources/index.d.mts +0 -2
  165. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/resources/index.mjs +0 -2
  166. package/dist/esm/api/resources/billingNew/resources/orders/resources/index.d.mts +0 -2
  167. package/dist/esm/api/resources/billingNew/resources/orders/resources/index.mjs +0 -2
  168. package/dist/esm/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/client/Client.d.mts +0 -49
  169. package/dist/esm/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/client/Client.mjs +0 -98
  170. package/dist/esm/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/client/index.d.mts +0 -2
  171. package/dist/esm/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/client/index.mjs +0 -1
  172. package/dist/esm/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/client/requests/index.d.mts +0 -1
  173. package/dist/esm/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/client/requests/index.mjs +0 -1
  174. package/dist/esm/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/index.d.mts +0 -1
  175. package/dist/esm/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/index.mjs +0 -1
  176. package/dist/esm/api/types/CreateInvoiceLineItemsFromAmountRes.d.mts +0 -7
  177. package/dist/esm/api/types/CreateInvoiceLineItemsFromLineItemsRes.d.mts +0 -7
  178. package/dist/esm/api/types/InvoiceLineItemAmountTransformation1.d.mts +0 -8
  179. package/dist/esm/api/types/InvoiceLineItemAmountTransformationTypeEnum1.d.mts +0 -9
  180. package/dist/esm/api/types/InvoiceLineItemAmountTransformationTypeEnum1.mjs +0 -8
  181. /package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/{resources/export/client → client}/requests/InvoiceLineItemExportListReq.js +0 -0
  182. /package/dist/cjs/api/resources/billingNew/resources/orders/{resources/rateSheetLineItems/client → client}/requests/OrderRateSheetLineItemsGenerateManyReq.d.ts +0 -0
  183. /package/dist/cjs/api/resources/billingNew/resources/orders/{resources/rateSheetLineItems/client → client}/requests/OrderRateSheetLineItemsGenerateManyReq.js +0 -0
  184. /package/dist/cjs/api/resources/billingNew/resources/{invoiceLineItems/resources/export → taxConfigurations}/client/index.d.ts +0 -0
  185. /package/dist/cjs/api/resources/billingNew/resources/{invoiceLineItems/resources/export → taxConfigurations}/client/index.js +0 -0
  186. /package/dist/cjs/api/resources/billingNew/resources/{invoiceLineItems/client/requests/CreateInvoiceLineItemsFromAmountReq.js → taxConfigurations/client/requests/TaxConfigurationClientCreate1.js} +0 -0
  187. /package/dist/cjs/api/resources/billingNew/resources/{invoiceLineItems/client/requests/CreateInvoiceLineItemsFromLineItemsReq.js → taxConfigurations/client/requests/TaxConfigurationClientUpdate1.js} +0 -0
  188. /package/dist/cjs/api/resources/billingNew/resources/{invoiceLineItems/client/requests/RecalculateOrderTaxInvoiceLineItemsReq.js → taxConfigurations/client/requests/TaxConfigurationResolveReq.js} +0 -0
  189. /package/dist/cjs/api/resources/billingNew/resources/{invoices/client/requests/InvoiceClientCreate1.js → taxConfigurations/client/requests/TaxConfigurationsListV1Request.js} +0 -0
  190. /package/dist/cjs/api/resources/billingNew/resources/{invoiceLineItems/resources/export → taxConfigurations}/client/requests/index.js +0 -0
  191. /package/dist/cjs/api/resources/billingNew/resources/{invoiceLineItems/resources/export → taxConfigurations}/index.d.ts +0 -0
  192. /package/dist/cjs/api/resources/billingNew/resources/{invoiceLineItems/resources/export → taxConfigurations}/index.js +0 -0
  193. /package/dist/cjs/api/types/{CreateInvoiceLineItemsFromAmountRes.js → BillingPeriodCloseRes.js} +0 -0
  194. /package/dist/cjs/api/types/{CreateInvoiceLineItemsFromAwbCostsInvoiceRes1.js → CalculatedInvoiceTax1.js} +0 -0
  195. /package/dist/cjs/api/types/{CreateInvoiceLineItemsFromLineItemsRes.js → CreateInvoiceLineItemsFromAwbCostsGroupRes1.js} +0 -0
  196. /package/dist/cjs/api/types/{InvoiceLineItemAmountTransformation1.js → InvoiceClientCreate1.js} +0 -0
  197. /package/dist/cjs/api/types/{TaxRate1.js → InvoiceCreateFromOrdersReq.js} +0 -0
  198. /package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/{resources/export/client → client}/requests/InvoiceLineItemExportListReq.mjs +0 -0
  199. /package/dist/esm/api/resources/billingNew/resources/orders/{resources/rateSheetLineItems/client → client}/requests/OrderRateSheetLineItemsGenerateManyReq.d.mts +0 -0
  200. /package/dist/esm/api/resources/billingNew/resources/orders/{resources/rateSheetLineItems/client → client}/requests/OrderRateSheetLineItemsGenerateManyReq.mjs +0 -0
  201. /package/dist/esm/api/resources/billingNew/resources/{invoiceLineItems/resources/export → taxConfigurations}/client/index.d.mts +0 -0
  202. /package/dist/esm/api/resources/billingNew/resources/{invoiceLineItems/resources/export → taxConfigurations}/client/index.mjs +0 -0
  203. /package/dist/esm/api/resources/billingNew/resources/{invoiceLineItems/client/requests/CreateInvoiceLineItemsFromAmountReq.mjs → taxConfigurations/client/requests/TaxConfigurationClientCreate1.mjs} +0 -0
  204. /package/dist/esm/api/resources/billingNew/resources/{invoiceLineItems/client/requests/CreateInvoiceLineItemsFromLineItemsReq.mjs → taxConfigurations/client/requests/TaxConfigurationClientUpdate1.mjs} +0 -0
  205. /package/dist/esm/api/resources/billingNew/resources/{invoiceLineItems/client/requests/RecalculateOrderTaxInvoiceLineItemsReq.mjs → taxConfigurations/client/requests/TaxConfigurationResolveReq.mjs} +0 -0
  206. /package/dist/esm/api/resources/billingNew/resources/{invoices/client/requests/InvoiceClientCreate1.mjs → taxConfigurations/client/requests/TaxConfigurationsListV1Request.mjs} +0 -0
  207. /package/dist/esm/api/resources/billingNew/resources/{invoiceLineItems/resources/export → taxConfigurations}/client/requests/index.mjs +0 -0
  208. /package/dist/esm/api/resources/billingNew/resources/{invoiceLineItems/resources/export → taxConfigurations}/index.d.mts +0 -0
  209. /package/dist/esm/api/resources/billingNew/resources/{invoiceLineItems/resources/export → taxConfigurations}/index.mjs +0 -0
  210. /package/dist/esm/api/types/{CreateInvoiceLineItemsFromAmountRes.mjs → BillingPeriodCloseRes.mjs} +0 -0
  211. /package/dist/esm/api/types/{CreateInvoiceLineItemsFromAwbCostsInvoiceRes1.mjs → CalculatedInvoiceTax1.mjs} +0 -0
  212. /package/dist/esm/api/types/{CreateInvoiceLineItemsFromLineItemsRes.mjs → CreateInvoiceLineItemsFromAwbCostsGroupRes1.mjs} +0 -0
  213. /package/dist/esm/api/types/{InvoiceLineItemAmountTransformation1.mjs → InvoiceClientCreate1.mjs} +0 -0
  214. /package/dist/esm/api/types/{TaxRate1.mjs → InvoiceCreateFromOrdersReq.mjs} +0 -0
@@ -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
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {}
7
+ */
8
+ export interface TaxConfigurationResolveReq {
9
+ counterparty_driver_id?: string | null;
10
+ counterparty_off_chrt_org_data_id?: string | null;
11
+ /** Must be a string starting with `org_` */
12
+ counterparty_org_id?: string | null;
13
+ shipper_account_id?: string | null;
14
+ }
@@ -0,0 +1,33 @@
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
+ * sort_by: "name",
9
+ * sort_order: "asc",
10
+ * page: 1,
11
+ * page_size: 1,
12
+ * filter_counterparty_org_id: "filter_counterparty_org_id",
13
+ * filter_counterparty_off_chrt_org_data_id: "filter_counterparty_off_chrt_org_data_id",
14
+ * filter_counterparty_driver_id: "filter_counterparty_driver_id",
15
+ * filter_shipper_account_id: "filter_shipper_account_id",
16
+ * filter_archived: true,
17
+ * filter_created_at_timestamp_gte: "2024-01-15T09:30:00Z",
18
+ * filter_created_at_timestamp_lte: "2024-01-15T09:30:00Z"
19
+ * }
20
+ */
21
+ export interface TaxConfigurationsListV1Request {
22
+ sort_by?: Chrt.TaxConfigurationSortByEnum | null;
23
+ sort_order?: Chrt.SortOrderEnum | null;
24
+ page?: number | null;
25
+ page_size?: number | null;
26
+ filter_counterparty_org_id?: string | null;
27
+ filter_counterparty_off_chrt_org_data_id?: string | null;
28
+ filter_counterparty_driver_id?: string | null;
29
+ filter_shipper_account_id?: string | null;
30
+ filter_archived?: boolean | null;
31
+ filter_created_at_timestamp_gte?: string | null;
32
+ filter_created_at_timestamp_lte?: string | null;
33
+ }
@@ -0,0 +1,4 @@
1
+ export { type TaxConfigurationClientCreate1 } from "./TaxConfigurationClientCreate1.mjs";
2
+ export { type TaxConfigurationsListV1Request } from "./TaxConfigurationsListV1Request.mjs";
3
+ export { type TaxConfigurationResolveReq } from "./TaxConfigurationResolveReq.mjs";
4
+ export { type TaxConfigurationClientUpdate1 } from "./TaxConfigurationClientUpdate1.mjs";
@@ -31,7 +31,7 @@ export declare class Flights {
31
31
  protected readonly _options: Flights.Options;
32
32
  constructor(_options?: Flights.Options);
33
33
  /**
34
- * Searches Cirium for cargo flight connections between two airports, anchored on a departure or arrival time. | (FlightConnectionsSearchReq) -> (FlightConnectionsSearchRes)
34
+ * Searches Cirium for cargo flight connections between two airports, anchored on a departure or arrival time, ordered by earliest final arrival with unknown arrivals last. | (FlightConnectionsSearchReq) -> (FlightConnectionsSearchRes)
35
35
  *
36
36
  * @param {Chrt.FlightConnectionsSearchReq} request
37
37
  * @param {Flights.RequestOptions} requestOptions - Request-specific configuration.
@@ -20,7 +20,7 @@ export class Flights {
20
20
  this._options = _options;
21
21
  }
22
22
  /**
23
- * Searches Cirium for cargo flight connections between two airports, anchored on a departure or arrival time. | (FlightConnectionsSearchReq) -> (FlightConnectionsSearchRes)
23
+ * Searches Cirium for cargo flight connections between two airports, anchored on a departure or arrival time, ordered by earliest final arrival with unknown arrivals last. | (FlightConnectionsSearchReq) -> (FlightConnectionsSearchRes)
24
24
  *
25
25
  * @param {Chrt.FlightConnectionsSearchReq} request
26
26
  * @param {Flights.RequestOptions} requestOptions - Request-specific configuration.
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export type BillingCurrencyCodeEnum1 = "USD" | "CAD" | "EUR" | "GBP" | "MXN" | "AUD" | "JPY" | "CNY" | "CHF" | "INR" | "XXX";
4
+ export type BillingCurrencyCodeEnum1 = "USD" | "CAD" | "EUR" | "GBP" | "MXN" | "AUD" | "JPY" | "CNY" | "CHF" | "INR";
5
5
  export declare const BillingCurrencyCodeEnum1: {
6
6
  readonly Usd: "USD";
7
7
  readonly Cad: "CAD";
@@ -13,5 +13,4 @@ export declare const BillingCurrencyCodeEnum1: {
13
13
  readonly Cny: "CNY";
14
14
  readonly Chf: "CHF";
15
15
  readonly Inr: "INR";
16
- readonly Xxx: "XXX";
17
16
  };
@@ -12,5 +12,4 @@ export const BillingCurrencyCodeEnum1 = {
12
12
  Cny: "CNY",
13
13
  Chf: "CHF",
14
14
  Inr: "INR",
15
- Xxx: "XXX",
16
15
  };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../index.mjs";
5
+ export interface BillingPeriodCloseRes {
6
+ billing_period: Chrt.BillingPeriod1;
7
+ invoice_line_item: Chrt.InvoiceLineItem1;
8
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface CalculatedInvoiceTax1 {
5
+ export_ref__sage__item_id?: string | null;
6
+ invoice_line_item_id: string;
7
+ name: string;
8
+ percentage: number;
9
+ tax_amount: number;
10
+ tax_configuration_id: string;
11
+ taxable_amount: number;
12
+ }
@@ -32,9 +32,6 @@ export interface ChrtGroundProviderRates1 {
32
32
  schema_version: number;
33
33
  service_line?: Chrt.ServiceLineEnum;
34
34
  shipper_account_id?: string | null;
35
- tax_1?: Chrt.TaxRate1 | null;
36
- tax_2?: Chrt.TaxRate1 | null;
37
- tax_3?: Chrt.TaxRate1 | null;
38
35
  updated_at_timestamp: string;
39
36
  vehicle_types?: Chrt.VehicleTypeEnum[];
40
37
  wait_time?: Chrt.WaitTimeRate1 | null;
@@ -2,10 +2,10 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as Chrt from "../index.mjs";
5
- export interface CreateInvoiceLineItemsFromAwbCostsInvoiceRes1 {
5
+ export interface CreateInvoiceLineItemsFromAwbCostsGroupRes1 {
6
6
  counterparty_off_chrt_org_data_id: string;
7
7
  created_awb_count: number;
8
8
  created_invoice_line_item_count: number;
9
9
  currency_code: Chrt.BillingCurrencyCodeEnum1;
10
- invoice_id: string;
10
+ invoice_line_item_ids?: string[];
11
11
  }
@@ -3,8 +3,8 @@
3
3
  */
4
4
  import * as Chrt from "../index.mjs";
5
5
  export interface CreateInvoiceLineItemsFromAwbCostsRes {
6
+ charge_groups?: Chrt.CreateInvoiceLineItemsFromAwbCostsGroupRes1[];
6
7
  created_awbs?: Chrt.CreateInvoiceLineItemsFromAwbCostsCreatedAwb1[];
7
8
  created_invoice_line_item_count: number;
8
- invoices?: Chrt.CreateInvoiceLineItemsFromAwbCostsInvoiceRes1[];
9
9
  rejected_awbs?: Chrt.CreateInvoiceLineItemsFromAwbCostsRejectedAwb1[];
10
10
  }