@chrt-inc/typescript-sdk 1.891.0 → 1.892.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 (328) hide show
  1. package/dist/cjs/Client.d.ts +3 -0
  2. package/dist/cjs/Client.js +23 -18
  3. package/dist/cjs/api/resources/billingNew/client/Client.d.ts +29 -0
  4. package/dist/cjs/api/resources/billingNew/client/Client.js +27 -0
  5. package/dist/cjs/api/resources/billingNew/client/index.d.ts +1 -0
  6. package/dist/cjs/api/resources/billingNew/client/index.js +2 -0
  7. package/dist/cjs/api/resources/billingNew/index.d.ts +2 -0
  8. package/dist/cjs/api/resources/billingNew/index.js +18 -0
  9. package/dist/cjs/api/resources/billingNew/resources/index.d.ts +6 -0
  10. package/dist/cjs/api/resources/billingNew/resources/index.js +45 -0
  11. package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/Client.d.ts +180 -0
  12. package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/Client.js +639 -0
  13. package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/index.d.ts +2 -0
  14. package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/index.js +17 -0
  15. package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/requests/ApplyChrtGroundProviderRatesReq.d.ts +22 -0
  16. package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/requests/ApplyChrtGroundProviderRatesReq.js +5 -0
  17. package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/requests/CreateInvoiceLineItemsFromAmountReq.d.ts +28 -0
  18. package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/requests/CreateInvoiceLineItemsFromAmountReq.js +5 -0
  19. package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/requests/CreateInvoiceLineItemsFromLineItemsReq.d.ts +45 -0
  20. package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/requests/CreateInvoiceLineItemsFromLineItemsReq.js +5 -0
  21. package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/requests/InvoiceLineItemClientUpdate1.d.ts +19 -0
  22. package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/requests/InvoiceLineItemClientUpdate1.js +5 -0
  23. package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/requests/InvoiceLineItemsDeleteManyReq.d.ts +12 -0
  24. package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/requests/InvoiceLineItemsDeleteManyReq.js +5 -0
  25. package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/requests/InvoiceLineItemsListV1Request.d.ts +62 -0
  26. package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/requests/InvoiceLineItemsListV1Request.js +5 -0
  27. package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/requests/index.d.ts +6 -0
  28. package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/requests/index.js +2 -0
  29. package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/index.d.ts +1 -0
  30. package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/index.js +17 -0
  31. package/dist/cjs/api/resources/billingNew/resources/invoices/client/Client.d.ts +217 -0
  32. package/dist/cjs/api/resources/billingNew/resources/invoices/client/Client.js +880 -0
  33. package/dist/cjs/api/resources/billingNew/resources/invoices/client/index.d.ts +2 -0
  34. package/dist/cjs/api/resources/billingNew/resources/invoices/client/index.js +17 -0
  35. package/dist/cjs/api/resources/billingNew/resources/invoices/client/requests/InvoiceClientCreate1.d.ts +24 -0
  36. package/dist/cjs/api/resources/billingNew/resources/invoices/client/requests/InvoiceClientCreate1.js +5 -0
  37. package/dist/cjs/api/resources/billingNew/resources/invoices/client/requests/InvoiceClientUpdate1.d.ts +13 -0
  38. package/dist/cjs/api/resources/billingNew/resources/invoices/client/requests/InvoiceClientUpdate1.js +5 -0
  39. package/dist/cjs/api/resources/billingNew/resources/invoices/client/requests/InvoiceLineItemsAddReq.d.ts +12 -0
  40. package/dist/cjs/api/resources/billingNew/resources/invoices/client/requests/InvoiceLineItemsAddReq.js +5 -0
  41. package/dist/cjs/api/resources/billingNew/resources/invoices/client/requests/InvoiceLineItemsRemoveReq.d.ts +12 -0
  42. package/dist/cjs/api/resources/billingNew/resources/invoices/client/requests/InvoiceLineItemsRemoveReq.js +5 -0
  43. package/dist/cjs/api/resources/billingNew/resources/invoices/client/requests/InvoiceVoidReq.d.ts +10 -0
  44. package/dist/cjs/api/resources/billingNew/resources/invoices/client/requests/InvoiceVoidReq.js +5 -0
  45. package/dist/cjs/api/resources/billingNew/resources/invoices/client/requests/InvoicesListV1Request.d.ts +51 -0
  46. package/dist/cjs/api/resources/billingNew/resources/invoices/client/requests/InvoicesListV1Request.js +5 -0
  47. package/dist/cjs/api/resources/billingNew/resources/invoices/client/requests/index.d.ts +6 -0
  48. package/dist/cjs/api/resources/billingNew/resources/invoices/client/requests/index.js +2 -0
  49. package/dist/cjs/api/resources/billingNew/resources/invoices/index.d.ts +1 -0
  50. package/dist/cjs/api/resources/billingNew/resources/invoices/index.js +17 -0
  51. package/dist/cjs/api/resources/billingNew/resources/rates/client/Client.d.ts +145 -0
  52. package/dist/cjs/api/resources/billingNew/resources/rates/client/Client.js +578 -0
  53. package/dist/cjs/api/resources/billingNew/resources/rates/client/index.d.ts +2 -0
  54. package/dist/cjs/api/resources/billingNew/resources/rates/client/index.js +17 -0
  55. package/dist/cjs/api/resources/billingNew/resources/rates/client/requests/ChrtGroundProviderRatesAddCounterpartiesReq.d.ts +13 -0
  56. package/dist/cjs/api/resources/billingNew/resources/rates/client/requests/ChrtGroundProviderRatesAddCounterpartiesReq.js +5 -0
  57. package/dist/cjs/api/resources/billingNew/resources/rates/client/requests/ChrtGroundProviderRatesClientCreate1.d.ts +37 -0
  58. package/dist/cjs/api/resources/billingNew/resources/rates/client/requests/ChrtGroundProviderRatesClientCreate1.js +5 -0
  59. package/dist/cjs/api/resources/billingNew/resources/rates/client/requests/ChrtGroundProviderRatesClientUpdate1.d.ts +43 -0
  60. package/dist/cjs/api/resources/billingNew/resources/rates/client/requests/ChrtGroundProviderRatesClientUpdate1.js +5 -0
  61. package/dist/cjs/api/resources/billingNew/resources/rates/client/requests/ChrtGroundProviderRatesRemoveCounterpartiesReq.d.ts +13 -0
  62. package/dist/cjs/api/resources/billingNew/resources/rates/client/requests/ChrtGroundProviderRatesRemoveCounterpartiesReq.js +5 -0
  63. package/dist/cjs/api/resources/billingNew/resources/rates/client/requests/RatesListV1Request.d.ts +54 -0
  64. package/dist/cjs/api/resources/billingNew/resources/rates/client/requests/RatesListV1Request.js +5 -0
  65. package/dist/cjs/api/resources/billingNew/resources/rates/client/requests/index.d.ts +5 -0
  66. package/dist/cjs/api/resources/billingNew/resources/rates/client/requests/index.js +2 -0
  67. package/dist/cjs/api/resources/billingNew/resources/rates/index.d.ts +1 -0
  68. package/dist/cjs/api/resources/billingNew/resources/rates/index.js +17 -0
  69. package/dist/cjs/api/resources/index.d.ts +1 -0
  70. package/dist/cjs/api/resources/index.js +2 -1
  71. package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/Client.d.ts +4 -0
  72. package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/Client.js +36 -20
  73. package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForCoordinatorOperatorsV1Request.d.ts +3 -0
  74. package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForExecutorOperatorsV1Request.d.ts +3 -0
  75. package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForProviderOperatorsV1Request.d.ts +3 -0
  76. package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForShipperOperatorsV1Request.d.ts +3 -0
  77. package/dist/cjs/api/types/AdditionalMileageRate1.d.ts +9 -0
  78. package/dist/cjs/api/types/AdditionalMileageRate1.js +5 -0
  79. package/dist/cjs/api/types/AfterHoursRate1.d.ts +7 -0
  80. package/dist/cjs/api/types/AfterHoursRate1.js +5 -0
  81. package/dist/cjs/api/types/ApplyChrtGroundProviderRatesRes.d.ts +7 -0
  82. package/dist/cjs/api/types/ApplyChrtGroundProviderRatesRes.js +5 -0
  83. package/dist/cjs/api/types/AttemptRate1.d.ts +7 -0
  84. package/dist/cjs/api/types/AttemptRate1.js +5 -0
  85. package/dist/cjs/api/types/BaseMileageRate1.d.ts +8 -0
  86. package/dist/cjs/api/types/BaseMileageRate1.js +5 -0
  87. package/dist/cjs/api/types/BillingCurrencyCodeEnum1.d.ts +17 -0
  88. package/dist/cjs/api/types/BillingCurrencyCodeEnum1.js +19 -0
  89. package/dist/cjs/api/types/CargoTypeEnum1.d.ts +8 -1
  90. package/dist/cjs/api/types/CargoTypeEnum1.js +7 -0
  91. package/dist/cjs/api/types/ChrtGroundProviderRates1.d.ts +35 -0
  92. package/dist/cjs/api/types/ChrtGroundProviderRates1.js +5 -0
  93. package/dist/cjs/api/types/ChrtGroundProviderRatesListRes.d.ts +8 -0
  94. package/dist/cjs/api/types/ChrtGroundProviderRatesListRes.js +5 -0
  95. package/dist/cjs/api/types/ChrtGroundProviderRatesSortByEnum.d.ts +10 -0
  96. package/dist/cjs/api/types/ChrtGroundProviderRatesSortByEnum.js +12 -0
  97. package/dist/cjs/api/types/CreateInvoiceLineItemsFromAmountRes.d.ts +7 -0
  98. package/dist/cjs/api/types/CreateInvoiceLineItemsFromAmountRes.js +5 -0
  99. package/dist/cjs/api/types/CreateInvoiceLineItemsFromLineItemsRes.d.ts +7 -0
  100. package/dist/cjs/api/types/CreateInvoiceLineItemsFromLineItemsRes.js +5 -0
  101. package/dist/cjs/api/types/DangerousGoodsRate1.d.ts +7 -0
  102. package/dist/cjs/api/types/DangerousGoodsRate1.js +5 -0
  103. package/dist/cjs/api/types/ExtraStopRate1.d.ts +7 -0
  104. package/dist/cjs/api/types/ExtraStopRate1.js +5 -0
  105. package/dist/cjs/api/types/FlatFeeRate1.d.ts +7 -0
  106. package/dist/cjs/api/types/FlatFeeRate1.js +5 -0
  107. package/dist/cjs/api/types/FuelSurchargeRate1.d.ts +7 -0
  108. package/dist/cjs/api/types/FuelSurchargeRate1.js +5 -0
  109. package/dist/cjs/api/types/HolidayRate1.d.ts +7 -0
  110. package/dist/cjs/api/types/HolidayRate1.js +5 -0
  111. package/dist/cjs/api/types/Invoice1.d.ts +57 -0
  112. package/dist/cjs/api/types/Invoice1.js +5 -0
  113. package/dist/cjs/api/types/InvoiceExpandedRes.d.ts +11 -0
  114. package/dist/cjs/api/types/InvoiceExpandedRes.js +5 -0
  115. package/dist/cjs/api/types/InvoiceLineItem1.d.ts +31 -0
  116. package/dist/cjs/api/types/InvoiceLineItem1.js +5 -0
  117. package/dist/cjs/api/types/InvoiceLineItemAmountTransformation1.d.ts +8 -0
  118. package/dist/cjs/api/types/InvoiceLineItemAmountTransformation1.js +5 -0
  119. package/dist/cjs/api/types/InvoiceLineItemAmountTransformationTypeEnum1.d.ts +9 -0
  120. package/dist/cjs/api/types/InvoiceLineItemAmountTransformationTypeEnum1.js +11 -0
  121. package/dist/cjs/api/types/InvoiceLineItemListRes.d.ts +8 -0
  122. package/dist/cjs/api/types/InvoiceLineItemListRes.js +5 -0
  123. package/dist/cjs/api/types/InvoiceLineItemSortByEnum.d.ts +14 -0
  124. package/dist/cjs/api/types/InvoiceLineItemSortByEnum.js +16 -0
  125. package/dist/cjs/api/types/InvoiceLineItemTypeEnum1.d.ts +33 -0
  126. package/dist/cjs/api/types/InvoiceLineItemTypeEnum1.js +35 -0
  127. package/dist/cjs/api/types/InvoiceLineItemUnitEnum1.d.ts +14 -0
  128. package/dist/cjs/api/types/InvoiceLineItemUnitEnum1.js +16 -0
  129. package/dist/cjs/api/types/InvoiceLineItemsByOrderExpandedRes.d.ts +10 -0
  130. package/dist/cjs/api/types/InvoiceLineItemsByOrderExpandedRes.js +5 -0
  131. package/dist/cjs/api/types/InvoiceLineItemsDeleteManyRes.d.ts +6 -0
  132. package/dist/cjs/api/types/InvoiceLineItemsDeleteManyRes.js +5 -0
  133. package/dist/cjs/api/types/InvoiceListRes.d.ts +8 -0
  134. package/dist/cjs/api/types/InvoiceListRes.js +5 -0
  135. package/dist/cjs/api/types/InvoiceMergeStatusEnum1.d.ts +12 -0
  136. package/dist/cjs/api/types/InvoiceMergeStatusEnum1.js +14 -0
  137. package/dist/cjs/api/types/InvoiceSortByEnum.d.ts +11 -0
  138. package/dist/cjs/api/types/InvoiceSortByEnum.js +13 -0
  139. package/dist/cjs/api/types/InvoiceStatusEnum1.d.ts +9 -0
  140. package/dist/cjs/api/types/InvoiceStatusEnum1.js +11 -0
  141. package/dist/cjs/api/types/InvoiceStripeStatusEnum1.d.ts +11 -0
  142. package/dist/cjs/api/types/InvoiceStripeStatusEnum1.js +13 -0
  143. package/dist/cjs/api/types/InvoiceTypeEnum1.d.ts +8 -0
  144. package/dist/cjs/api/types/InvoiceTypeEnum1.js +10 -0
  145. package/dist/cjs/api/types/LongDistanceSurchargeRate1.d.ts +8 -0
  146. package/dist/cjs/api/types/LongDistanceSurchargeRate1.js +5 -0
  147. package/dist/cjs/api/types/Order1.d.ts +1 -0
  148. package/dist/cjs/api/types/OrderLimitedForCoordinator1.d.ts +1 -0
  149. package/dist/cjs/api/types/OrderLimitedForExecutor1.d.ts +1 -0
  150. package/dist/cjs/api/types/OrderLimitedForProvider1.d.ts +1 -0
  151. package/dist/cjs/api/types/OrderLimitedForShipper1.d.ts +1 -0
  152. package/dist/cjs/api/types/OrderTemplateExpanded1.d.ts +1 -0
  153. package/dist/cjs/api/types/OrderTemplateReferencesExpanded1.d.ts +1 -0
  154. package/dist/cjs/api/types/PickAndHoldRate1.d.ts +7 -0
  155. package/dist/cjs/api/types/PickAndHoldRate1.js +5 -0
  156. package/dist/cjs/api/types/WaitTimeRate1.d.ts +8 -0
  157. package/dist/cjs/api/types/WaitTimeRate1.js +5 -0
  158. package/dist/cjs/api/types/WeekendRate1.d.ts +7 -0
  159. package/dist/cjs/api/types/WeekendRate1.js +5 -0
  160. package/dist/cjs/api/types/index.d.ts +37 -0
  161. package/dist/cjs/api/types/index.js +37 -0
  162. package/dist/cjs/version.d.ts +1 -1
  163. package/dist/cjs/version.js +1 -1
  164. package/dist/esm/Client.d.mts +3 -0
  165. package/dist/esm/Client.mjs +7 -2
  166. package/dist/esm/api/resources/billingNew/client/Client.d.mts +29 -0
  167. package/dist/esm/api/resources/billingNew/client/Client.mjs +23 -0
  168. package/dist/esm/api/resources/billingNew/client/index.d.mts +1 -0
  169. package/dist/esm/api/resources/billingNew/client/index.mjs +1 -0
  170. package/dist/esm/api/resources/billingNew/index.d.mts +2 -0
  171. package/dist/esm/api/resources/billingNew/index.mjs +2 -0
  172. package/dist/esm/api/resources/billingNew/resources/index.d.mts +6 -0
  173. package/dist/esm/api/resources/billingNew/resources/index.mjs +6 -0
  174. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/Client.d.mts +180 -0
  175. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/Client.mjs +602 -0
  176. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/index.d.mts +2 -0
  177. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/index.mjs +1 -0
  178. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/ApplyChrtGroundProviderRatesReq.d.mts +22 -0
  179. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/ApplyChrtGroundProviderRatesReq.mjs +4 -0
  180. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/CreateInvoiceLineItemsFromAmountReq.d.mts +28 -0
  181. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/CreateInvoiceLineItemsFromAmountReq.mjs +4 -0
  182. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/CreateInvoiceLineItemsFromLineItemsReq.d.mts +45 -0
  183. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/CreateInvoiceLineItemsFromLineItemsReq.mjs +4 -0
  184. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/InvoiceLineItemClientUpdate1.d.mts +19 -0
  185. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/InvoiceLineItemClientUpdate1.mjs +4 -0
  186. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/InvoiceLineItemsDeleteManyReq.d.mts +12 -0
  187. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/InvoiceLineItemsDeleteManyReq.mjs +4 -0
  188. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/InvoiceLineItemsListV1Request.d.mts +62 -0
  189. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/InvoiceLineItemsListV1Request.mjs +4 -0
  190. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/index.d.mts +6 -0
  191. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/index.mjs +1 -0
  192. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/index.d.mts +1 -0
  193. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/index.mjs +1 -0
  194. package/dist/esm/api/resources/billingNew/resources/invoices/client/Client.d.mts +217 -0
  195. package/dist/esm/api/resources/billingNew/resources/invoices/client/Client.mjs +843 -0
  196. package/dist/esm/api/resources/billingNew/resources/invoices/client/index.d.mts +2 -0
  197. package/dist/esm/api/resources/billingNew/resources/invoices/client/index.mjs +1 -0
  198. package/dist/esm/api/resources/billingNew/resources/invoices/client/requests/InvoiceClientCreate1.d.mts +24 -0
  199. package/dist/esm/api/resources/billingNew/resources/invoices/client/requests/InvoiceClientCreate1.mjs +4 -0
  200. package/dist/esm/api/resources/billingNew/resources/invoices/client/requests/InvoiceClientUpdate1.d.mts +13 -0
  201. package/dist/esm/api/resources/billingNew/resources/invoices/client/requests/InvoiceClientUpdate1.mjs +4 -0
  202. package/dist/esm/api/resources/billingNew/resources/invoices/client/requests/InvoiceLineItemsAddReq.d.mts +12 -0
  203. package/dist/esm/api/resources/billingNew/resources/invoices/client/requests/InvoiceLineItemsAddReq.mjs +4 -0
  204. package/dist/esm/api/resources/billingNew/resources/invoices/client/requests/InvoiceLineItemsRemoveReq.d.mts +12 -0
  205. package/dist/esm/api/resources/billingNew/resources/invoices/client/requests/InvoiceLineItemsRemoveReq.mjs +4 -0
  206. package/dist/esm/api/resources/billingNew/resources/invoices/client/requests/InvoiceVoidReq.d.mts +10 -0
  207. package/dist/esm/api/resources/billingNew/resources/invoices/client/requests/InvoiceVoidReq.mjs +4 -0
  208. package/dist/esm/api/resources/billingNew/resources/invoices/client/requests/InvoicesListV1Request.d.mts +51 -0
  209. package/dist/esm/api/resources/billingNew/resources/invoices/client/requests/InvoicesListV1Request.mjs +4 -0
  210. package/dist/esm/api/resources/billingNew/resources/invoices/client/requests/index.d.mts +6 -0
  211. package/dist/esm/api/resources/billingNew/resources/invoices/client/requests/index.mjs +1 -0
  212. package/dist/esm/api/resources/billingNew/resources/invoices/index.d.mts +1 -0
  213. package/dist/esm/api/resources/billingNew/resources/invoices/index.mjs +1 -0
  214. package/dist/esm/api/resources/billingNew/resources/rates/client/Client.d.mts +145 -0
  215. package/dist/esm/api/resources/billingNew/resources/rates/client/Client.mjs +541 -0
  216. package/dist/esm/api/resources/billingNew/resources/rates/client/index.d.mts +2 -0
  217. package/dist/esm/api/resources/billingNew/resources/rates/client/index.mjs +1 -0
  218. package/dist/esm/api/resources/billingNew/resources/rates/client/requests/ChrtGroundProviderRatesAddCounterpartiesReq.d.mts +13 -0
  219. package/dist/esm/api/resources/billingNew/resources/rates/client/requests/ChrtGroundProviderRatesAddCounterpartiesReq.mjs +4 -0
  220. package/dist/esm/api/resources/billingNew/resources/rates/client/requests/ChrtGroundProviderRatesClientCreate1.d.mts +37 -0
  221. package/dist/esm/api/resources/billingNew/resources/rates/client/requests/ChrtGroundProviderRatesClientCreate1.mjs +4 -0
  222. package/dist/esm/api/resources/billingNew/resources/rates/client/requests/ChrtGroundProviderRatesClientUpdate1.d.mts +43 -0
  223. package/dist/esm/api/resources/billingNew/resources/rates/client/requests/ChrtGroundProviderRatesClientUpdate1.mjs +4 -0
  224. package/dist/esm/api/resources/billingNew/resources/rates/client/requests/ChrtGroundProviderRatesRemoveCounterpartiesReq.d.mts +13 -0
  225. package/dist/esm/api/resources/billingNew/resources/rates/client/requests/ChrtGroundProviderRatesRemoveCounterpartiesReq.mjs +4 -0
  226. package/dist/esm/api/resources/billingNew/resources/rates/client/requests/RatesListV1Request.d.mts +54 -0
  227. package/dist/esm/api/resources/billingNew/resources/rates/client/requests/RatesListV1Request.mjs +4 -0
  228. package/dist/esm/api/resources/billingNew/resources/rates/client/requests/index.d.mts +5 -0
  229. package/dist/esm/api/resources/billingNew/resources/rates/client/requests/index.mjs +1 -0
  230. package/dist/esm/api/resources/billingNew/resources/rates/index.d.mts +1 -0
  231. package/dist/esm/api/resources/billingNew/resources/rates/index.mjs +1 -0
  232. package/dist/esm/api/resources/index.d.mts +1 -0
  233. package/dist/esm/api/resources/index.mjs +1 -0
  234. package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/Client.d.mts +4 -0
  235. package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/Client.mjs +36 -20
  236. package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForCoordinatorOperatorsV1Request.d.mts +3 -0
  237. package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForExecutorOperatorsV1Request.d.mts +3 -0
  238. package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForProviderOperatorsV1Request.d.mts +3 -0
  239. package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForShipperOperatorsV1Request.d.mts +3 -0
  240. package/dist/esm/api/types/AdditionalMileageRate1.d.mts +9 -0
  241. package/dist/esm/api/types/AdditionalMileageRate1.mjs +4 -0
  242. package/dist/esm/api/types/AfterHoursRate1.d.mts +7 -0
  243. package/dist/esm/api/types/AfterHoursRate1.mjs +4 -0
  244. package/dist/esm/api/types/ApplyChrtGroundProviderRatesRes.d.mts +7 -0
  245. package/dist/esm/api/types/ApplyChrtGroundProviderRatesRes.mjs +4 -0
  246. package/dist/esm/api/types/AttemptRate1.d.mts +7 -0
  247. package/dist/esm/api/types/AttemptRate1.mjs +4 -0
  248. package/dist/esm/api/types/BaseMileageRate1.d.mts +8 -0
  249. package/dist/esm/api/types/BaseMileageRate1.mjs +4 -0
  250. package/dist/esm/api/types/BillingCurrencyCodeEnum1.d.mts +17 -0
  251. package/dist/esm/api/types/BillingCurrencyCodeEnum1.mjs +16 -0
  252. package/dist/esm/api/types/CargoTypeEnum1.d.mts +8 -1
  253. package/dist/esm/api/types/CargoTypeEnum1.mjs +7 -0
  254. package/dist/esm/api/types/ChrtGroundProviderRates1.d.mts +35 -0
  255. package/dist/esm/api/types/ChrtGroundProviderRates1.mjs +4 -0
  256. package/dist/esm/api/types/ChrtGroundProviderRatesListRes.d.mts +8 -0
  257. package/dist/esm/api/types/ChrtGroundProviderRatesListRes.mjs +4 -0
  258. package/dist/esm/api/types/ChrtGroundProviderRatesSortByEnum.d.mts +10 -0
  259. package/dist/esm/api/types/ChrtGroundProviderRatesSortByEnum.mjs +9 -0
  260. package/dist/esm/api/types/CreateInvoiceLineItemsFromAmountRes.d.mts +7 -0
  261. package/dist/esm/api/types/CreateInvoiceLineItemsFromAmountRes.mjs +4 -0
  262. package/dist/esm/api/types/CreateInvoiceLineItemsFromLineItemsRes.d.mts +7 -0
  263. package/dist/esm/api/types/CreateInvoiceLineItemsFromLineItemsRes.mjs +4 -0
  264. package/dist/esm/api/types/DangerousGoodsRate1.d.mts +7 -0
  265. package/dist/esm/api/types/DangerousGoodsRate1.mjs +4 -0
  266. package/dist/esm/api/types/ExtraStopRate1.d.mts +7 -0
  267. package/dist/esm/api/types/ExtraStopRate1.mjs +4 -0
  268. package/dist/esm/api/types/FlatFeeRate1.d.mts +7 -0
  269. package/dist/esm/api/types/FlatFeeRate1.mjs +4 -0
  270. package/dist/esm/api/types/FuelSurchargeRate1.d.mts +7 -0
  271. package/dist/esm/api/types/FuelSurchargeRate1.mjs +4 -0
  272. package/dist/esm/api/types/HolidayRate1.d.mts +7 -0
  273. package/dist/esm/api/types/HolidayRate1.mjs +4 -0
  274. package/dist/esm/api/types/Invoice1.d.mts +57 -0
  275. package/dist/esm/api/types/Invoice1.mjs +4 -0
  276. package/dist/esm/api/types/InvoiceExpandedRes.d.mts +11 -0
  277. package/dist/esm/api/types/InvoiceExpandedRes.mjs +4 -0
  278. package/dist/esm/api/types/InvoiceLineItem1.d.mts +31 -0
  279. package/dist/esm/api/types/InvoiceLineItem1.mjs +4 -0
  280. package/dist/esm/api/types/InvoiceLineItemAmountTransformation1.d.mts +8 -0
  281. package/dist/esm/api/types/InvoiceLineItemAmountTransformation1.mjs +4 -0
  282. package/dist/esm/api/types/InvoiceLineItemAmountTransformationTypeEnum1.d.mts +9 -0
  283. package/dist/esm/api/types/InvoiceLineItemAmountTransformationTypeEnum1.mjs +8 -0
  284. package/dist/esm/api/types/InvoiceLineItemListRes.d.mts +8 -0
  285. package/dist/esm/api/types/InvoiceLineItemListRes.mjs +4 -0
  286. package/dist/esm/api/types/InvoiceLineItemSortByEnum.d.mts +14 -0
  287. package/dist/esm/api/types/InvoiceLineItemSortByEnum.mjs +13 -0
  288. package/dist/esm/api/types/InvoiceLineItemTypeEnum1.d.mts +33 -0
  289. package/dist/esm/api/types/InvoiceLineItemTypeEnum1.mjs +32 -0
  290. package/dist/esm/api/types/InvoiceLineItemUnitEnum1.d.mts +14 -0
  291. package/dist/esm/api/types/InvoiceLineItemUnitEnum1.mjs +13 -0
  292. package/dist/esm/api/types/InvoiceLineItemsByOrderExpandedRes.d.mts +10 -0
  293. package/dist/esm/api/types/InvoiceLineItemsByOrderExpandedRes.mjs +4 -0
  294. package/dist/esm/api/types/InvoiceLineItemsDeleteManyRes.d.mts +6 -0
  295. package/dist/esm/api/types/InvoiceLineItemsDeleteManyRes.mjs +4 -0
  296. package/dist/esm/api/types/InvoiceListRes.d.mts +8 -0
  297. package/dist/esm/api/types/InvoiceListRes.mjs +4 -0
  298. package/dist/esm/api/types/InvoiceMergeStatusEnum1.d.mts +12 -0
  299. package/dist/esm/api/types/InvoiceMergeStatusEnum1.mjs +11 -0
  300. package/dist/esm/api/types/InvoiceSortByEnum.d.mts +11 -0
  301. package/dist/esm/api/types/InvoiceSortByEnum.mjs +10 -0
  302. package/dist/esm/api/types/InvoiceStatusEnum1.d.mts +9 -0
  303. package/dist/esm/api/types/InvoiceStatusEnum1.mjs +8 -0
  304. package/dist/esm/api/types/InvoiceStripeStatusEnum1.d.mts +11 -0
  305. package/dist/esm/api/types/InvoiceStripeStatusEnum1.mjs +10 -0
  306. package/dist/esm/api/types/InvoiceTypeEnum1.d.mts +8 -0
  307. package/dist/esm/api/types/InvoiceTypeEnum1.mjs +7 -0
  308. package/dist/esm/api/types/LongDistanceSurchargeRate1.d.mts +8 -0
  309. package/dist/esm/api/types/LongDistanceSurchargeRate1.mjs +4 -0
  310. package/dist/esm/api/types/Order1.d.mts +1 -0
  311. package/dist/esm/api/types/OrderLimitedForCoordinator1.d.mts +1 -0
  312. package/dist/esm/api/types/OrderLimitedForExecutor1.d.mts +1 -0
  313. package/dist/esm/api/types/OrderLimitedForProvider1.d.mts +1 -0
  314. package/dist/esm/api/types/OrderLimitedForShipper1.d.mts +1 -0
  315. package/dist/esm/api/types/OrderTemplateExpanded1.d.mts +1 -0
  316. package/dist/esm/api/types/OrderTemplateReferencesExpanded1.d.mts +1 -0
  317. package/dist/esm/api/types/PickAndHoldRate1.d.mts +7 -0
  318. package/dist/esm/api/types/PickAndHoldRate1.mjs +4 -0
  319. package/dist/esm/api/types/WaitTimeRate1.d.mts +8 -0
  320. package/dist/esm/api/types/WaitTimeRate1.mjs +4 -0
  321. package/dist/esm/api/types/WeekendRate1.d.mts +7 -0
  322. package/dist/esm/api/types/WeekendRate1.mjs +4 -0
  323. package/dist/esm/api/types/index.d.mts +37 -0
  324. package/dist/esm/api/types/index.mjs +37 -0
  325. package/dist/esm/version.d.mts +1 -1
  326. package/dist/esm/version.mjs +1 -1
  327. package/package.json +1 -1
  328. package/reference.md +1822 -0
@@ -0,0 +1,639 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
39
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
40
+ return new (P || (P = Promise))(function (resolve, reject) {
41
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
42
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
43
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
44
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
45
+ });
46
+ };
47
+ Object.defineProperty(exports, "__esModule", { value: true });
48
+ exports.InvoiceLineItems = void 0;
49
+ const environments = __importStar(require("../../../../../../environments.js"));
50
+ const core = __importStar(require("../../../../../../core/index.js"));
51
+ const Chrt = __importStar(require("../../../../../index.js"));
52
+ const headers_js_1 = require("../../../../../../core/headers.js");
53
+ const errors = __importStar(require("../../../../../../errors/index.js"));
54
+ class InvoiceLineItems {
55
+ constructor(_options = {}) {
56
+ this._options = _options;
57
+ }
58
+ /**
59
+ * Applies a caller-owned CHRT-ground rate sheet to a TaskGroup and atomically creates line items on a draft invoice. | authz: allowed_org_types=[provider], min_org_role=operator | (ApplyChrtGroundProviderRatesReq) -> (ApplyChrtGroundProviderRatesRes)
60
+ *
61
+ * @param {Chrt.billingNew.ApplyChrtGroundProviderRatesReq} request
62
+ * @param {InvoiceLineItems.RequestOptions} requestOptions - Request-specific configuration.
63
+ *
64
+ * @throws {@link Chrt.UnprocessableEntityError}
65
+ *
66
+ * @example
67
+ * await client.billingNew.invoiceLineItems.applyChrtGroundProviderRatesV1({
68
+ * invoice_type: "accounts_receivable",
69
+ * org_id: "org_id",
70
+ * rate_sheet_id: "rate_sheet_id",
71
+ * task_group_id: "task_group_id"
72
+ * })
73
+ */
74
+ applyChrtGroundProviderRatesV1(request, requestOptions) {
75
+ return core.HttpResponsePromise.fromPromise(this.__applyChrtGroundProviderRatesV1(request, requestOptions));
76
+ }
77
+ __applyChrtGroundProviderRatesV1(request, requestOptions) {
78
+ return __awaiter(this, void 0, void 0, function* () {
79
+ var _a, _b, _c, _d;
80
+ let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
81
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
82
+ 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/invoice_line_items/apply_chrt_ground_provider_rates/v1"),
83
+ method: "POST",
84
+ headers: _headers,
85
+ contentType: "application/json",
86
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
87
+ requestType: "json",
88
+ body: request,
89
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
90
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
91
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
92
+ });
93
+ if (_response.ok) {
94
+ return { data: _response.body, rawResponse: _response.rawResponse };
95
+ }
96
+ if (_response.error.reason === "status-code") {
97
+ switch (_response.error.statusCode) {
98
+ case 422:
99
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
100
+ default:
101
+ throw new errors.ChrtError({
102
+ statusCode: _response.error.statusCode,
103
+ body: _response.error.body,
104
+ rawResponse: _response.rawResponse,
105
+ });
106
+ }
107
+ }
108
+ switch (_response.error.reason) {
109
+ case "non-json":
110
+ throw new errors.ChrtError({
111
+ statusCode: _response.error.statusCode,
112
+ body: _response.error.rawBody,
113
+ rawResponse: _response.rawResponse,
114
+ });
115
+ case "timeout":
116
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /billing_new/invoice_line_items/apply_chrt_ground_provider_rates/v1.");
117
+ case "unknown":
118
+ throw new errors.ChrtError({
119
+ message: _response.error.errorMessage,
120
+ rawResponse: _response.rawResponse,
121
+ });
122
+ }
123
+ });
124
+ }
125
+ /**
126
+ * Lists owner-scoped line items for an order with counterparties and accounts expanded. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (InvoiceLineItemsByOrderExpandedRes)
127
+ *
128
+ * @param {string} orderId
129
+ * @param {InvoiceLineItems.RequestOptions} requestOptions - Request-specific configuration.
130
+ *
131
+ * @throws {@link Chrt.UnprocessableEntityError}
132
+ *
133
+ * @example
134
+ * await client.billingNew.invoiceLineItems.listByOrderV1("order_id")
135
+ */
136
+ listByOrderV1(orderId, requestOptions) {
137
+ return core.HttpResponsePromise.fromPromise(this.__listByOrderV1(orderId, requestOptions));
138
+ }
139
+ __listByOrderV1(orderId, requestOptions) {
140
+ return __awaiter(this, void 0, void 0, function* () {
141
+ var _a, _b, _c, _d;
142
+ let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
143
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
144
+ 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/invoice_line_items/by_order/v1/${encodeURIComponent(orderId)}`),
145
+ method: "GET",
146
+ headers: _headers,
147
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
148
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
149
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
150
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
151
+ });
152
+ if (_response.ok) {
153
+ return {
154
+ data: _response.body,
155
+ rawResponse: _response.rawResponse,
156
+ };
157
+ }
158
+ if (_response.error.reason === "status-code") {
159
+ switch (_response.error.statusCode) {
160
+ case 422:
161
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
162
+ default:
163
+ throw new errors.ChrtError({
164
+ statusCode: _response.error.statusCode,
165
+ body: _response.error.body,
166
+ rawResponse: _response.rawResponse,
167
+ });
168
+ }
169
+ }
170
+ switch (_response.error.reason) {
171
+ case "non-json":
172
+ throw new errors.ChrtError({
173
+ statusCode: _response.error.statusCode,
174
+ body: _response.error.rawBody,
175
+ rawResponse: _response.rawResponse,
176
+ });
177
+ case "timeout":
178
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /billing_new/invoice_line_items/by_order/v1/{order_id}.");
179
+ case "unknown":
180
+ throw new errors.ChrtError({
181
+ message: _response.error.errorMessage,
182
+ rawResponse: _response.rawResponse,
183
+ });
184
+ }
185
+ });
186
+ }
187
+ /**
188
+ * Creates optionally order-attributed line items from an amount and attaches them to a draft invoice. | authz: allowed_org_types=[provider], min_org_role=operator | authz_personas=[coordinator_org_operators, order_executor_org_operators, task_group_coordinator_operators, executor_org_operators] when order-attributed | (CreateInvoiceLineItemsFromAmountReq) -> (CreateInvoiceLineItemsFromAmountRes)
189
+ *
190
+ * @param {Chrt.billingNew.CreateInvoiceLineItemsFromAmountReq} request
191
+ * @param {InvoiceLineItems.RequestOptions} requestOptions - Request-specific configuration.
192
+ *
193
+ * @throws {@link Chrt.UnprocessableEntityError}
194
+ *
195
+ * @example
196
+ * await client.billingNew.invoiceLineItems.createFromAmountV1({
197
+ * amount: 1.1,
198
+ * currency_code: "USD",
199
+ * description: "description",
200
+ * invoice_type: "accounts_receivable",
201
+ * line_item_type: "base_rate",
202
+ * org_id: "org_id"
203
+ * })
204
+ */
205
+ createFromAmountV1(request, requestOptions) {
206
+ return core.HttpResponsePromise.fromPromise(this.__createFromAmountV1(request, requestOptions));
207
+ }
208
+ __createFromAmountV1(request, requestOptions) {
209
+ return __awaiter(this, void 0, void 0, function* () {
210
+ var _a, _b, _c, _d;
211
+ let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
212
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
213
+ 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/invoice_line_items/create_from_amount/v1"),
214
+ method: "POST",
215
+ headers: _headers,
216
+ contentType: "application/json",
217
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
218
+ requestType: "json",
219
+ body: request,
220
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
221
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
222
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
223
+ });
224
+ if (_response.ok) {
225
+ return {
226
+ data: _response.body,
227
+ rawResponse: _response.rawResponse,
228
+ };
229
+ }
230
+ if (_response.error.reason === "status-code") {
231
+ switch (_response.error.statusCode) {
232
+ case 422:
233
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
234
+ default:
235
+ throw new errors.ChrtError({
236
+ statusCode: _response.error.statusCode,
237
+ body: _response.error.body,
238
+ rawResponse: _response.rawResponse,
239
+ });
240
+ }
241
+ }
242
+ switch (_response.error.reason) {
243
+ case "non-json":
244
+ throw new errors.ChrtError({
245
+ statusCode: _response.error.statusCode,
246
+ body: _response.error.rawBody,
247
+ rawResponse: _response.rawResponse,
248
+ });
249
+ case "timeout":
250
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /billing_new/invoice_line_items/create_from_amount/v1.");
251
+ case "unknown":
252
+ throw new errors.ChrtError({
253
+ message: _response.error.errorMessage,
254
+ rawResponse: _response.rawResponse,
255
+ });
256
+ }
257
+ });
258
+ }
259
+ /**
260
+ * Creates optionally order-attributed line items by transforming submitted line items and attaches them to a draft invoice. | authz: allowed_org_types=[provider], min_org_role=operator | authz_personas=[coordinator_org_operators, order_executor_org_operators, task_group_coordinator_operators, executor_org_operators] when order-attributed | (CreateInvoiceLineItemsFromLineItemsReq) -> (CreateInvoiceLineItemsFromLineItemsRes)
261
+ *
262
+ * @param {Chrt.billingNew.CreateInvoiceLineItemsFromLineItemsReq} request
263
+ * @param {InvoiceLineItems.RequestOptions} requestOptions - Request-specific configuration.
264
+ *
265
+ * @throws {@link Chrt.UnprocessableEntityError}
266
+ *
267
+ * @example
268
+ * await client.billingNew.invoiceLineItems.createFromLineItemsV1({
269
+ * description: "description",
270
+ * invoice_line_item_amount_transformation: {
271
+ * transformation_type: "percent",
272
+ * value: 1.1
273
+ * },
274
+ * invoice_type: "accounts_receivable",
275
+ * line_item_type: "base_rate",
276
+ * org_id: "org_id",
277
+ * source_invoice_line_items: [{
278
+ * _id: "_id",
279
+ * created_at_timestamp: "2024-01-15T09:30:00Z",
280
+ * created_by_user_id: "created_by_user_id",
281
+ * currency_code: "USD",
282
+ * description: "description",
283
+ * invoice_type: "accounts_receivable",
284
+ * last_edited_at_timestamp: "2024-01-15T09:30:00Z",
285
+ * last_edited_by_user_id: "last_edited_by_user_id",
286
+ * line_item_type: "base_rate",
287
+ * owned_by_org_id: "owned_by_org_id",
288
+ * quantity: 1.1,
289
+ * schema_version: 1,
290
+ * unit_price: 1.1
291
+ * }]
292
+ * })
293
+ */
294
+ createFromLineItemsV1(request, requestOptions) {
295
+ return core.HttpResponsePromise.fromPromise(this.__createFromLineItemsV1(request, requestOptions));
296
+ }
297
+ __createFromLineItemsV1(request, requestOptions) {
298
+ return __awaiter(this, void 0, void 0, function* () {
299
+ var _a, _b, _c, _d;
300
+ let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
301
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
302
+ 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/invoice_line_items/create_from_line_items/v1"),
303
+ method: "POST",
304
+ headers: _headers,
305
+ contentType: "application/json",
306
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
307
+ requestType: "json",
308
+ body: request,
309
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
310
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
311
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
312
+ });
313
+ if (_response.ok) {
314
+ return {
315
+ data: _response.body,
316
+ rawResponse: _response.rawResponse,
317
+ };
318
+ }
319
+ if (_response.error.reason === "status-code") {
320
+ switch (_response.error.statusCode) {
321
+ case 422:
322
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
323
+ default:
324
+ throw new errors.ChrtError({
325
+ statusCode: _response.error.statusCode,
326
+ body: _response.error.body,
327
+ rawResponse: _response.rawResponse,
328
+ });
329
+ }
330
+ }
331
+ switch (_response.error.reason) {
332
+ case "non-json":
333
+ throw new errors.ChrtError({
334
+ statusCode: _response.error.statusCode,
335
+ body: _response.error.rawBody,
336
+ rawResponse: _response.rawResponse,
337
+ });
338
+ case "timeout":
339
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /billing_new/invoice_line_items/create_from_line_items/v1.");
340
+ case "unknown":
341
+ throw new errors.ChrtError({
342
+ message: _response.error.errorMessage,
343
+ rawResponse: _response.rawResponse,
344
+ });
345
+ }
346
+ });
347
+ }
348
+ /**
349
+ * Deletes owner-scoped line items and rebuilds every affected draft invoice. | authz: allowed_org_types=[provider], min_org_role=operator | (InvoiceLineItemsDeleteManyReq) -> (InvoiceLineItemsDeleteManyRes)
350
+ *
351
+ * @param {Chrt.billingNew.InvoiceLineItemsDeleteManyReq} request
352
+ * @param {InvoiceLineItems.RequestOptions} requestOptions - Request-specific configuration.
353
+ *
354
+ * @throws {@link Chrt.UnprocessableEntityError}
355
+ *
356
+ * @example
357
+ * await client.billingNew.invoiceLineItems.deleteManyV1({
358
+ * invoice_line_item_ids: ["invoice_line_item_ids"]
359
+ * })
360
+ */
361
+ deleteManyV1(request, requestOptions) {
362
+ return core.HttpResponsePromise.fromPromise(this.__deleteManyV1(request, requestOptions));
363
+ }
364
+ __deleteManyV1(request, requestOptions) {
365
+ return __awaiter(this, void 0, void 0, function* () {
366
+ var _a, _b, _c, _d;
367
+ let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
368
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
369
+ 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/invoice_line_items/delete_many/v1"),
370
+ method: "DELETE",
371
+ headers: _headers,
372
+ contentType: "application/json",
373
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
374
+ requestType: "json",
375
+ body: request,
376
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
377
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
378
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
379
+ });
380
+ if (_response.ok) {
381
+ return { data: _response.body, rawResponse: _response.rawResponse };
382
+ }
383
+ if (_response.error.reason === "status-code") {
384
+ switch (_response.error.statusCode) {
385
+ case 422:
386
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
387
+ default:
388
+ throw new errors.ChrtError({
389
+ statusCode: _response.error.statusCode,
390
+ body: _response.error.body,
391
+ rawResponse: _response.rawResponse,
392
+ });
393
+ }
394
+ }
395
+ switch (_response.error.reason) {
396
+ case "non-json":
397
+ throw new errors.ChrtError({
398
+ statusCode: _response.error.statusCode,
399
+ body: _response.error.rawBody,
400
+ rawResponse: _response.rawResponse,
401
+ });
402
+ case "timeout":
403
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /billing_new/invoice_line_items/delete_many/v1.");
404
+ case "unknown":
405
+ throw new errors.ChrtError({
406
+ message: _response.error.errorMessage,
407
+ rawResponse: _response.rawResponse,
408
+ });
409
+ }
410
+ });
411
+ }
412
+ /**
413
+ * Lists owner-scoped invoice line items with filtering, sorting, and pagination. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (InvoiceLineItemListRes)
414
+ *
415
+ * @param {Chrt.billingNew.InvoiceLineItemsListV1Request} request
416
+ * @param {InvoiceLineItems.RequestOptions} requestOptions - Request-specific configuration.
417
+ *
418
+ * @throws {@link Chrt.UnprocessableEntityError}
419
+ *
420
+ * @example
421
+ * await client.billingNew.invoiceLineItems.listV1({
422
+ * sort_by: "created_at_timestamp",
423
+ * sort_order: "asc",
424
+ * page: 1,
425
+ * page_size: 1,
426
+ * filter_counterparty_org_id: "filter_counterparty_org_id",
427
+ * filter_counterparty_off_chrt_org_data_id: "filter_counterparty_off_chrt_org_data_id",
428
+ * filter_counterparty_account_id: "filter_counterparty_account_id",
429
+ * filter_invoice_id: "filter_invoice_id",
430
+ * filter_is_invoiced: true,
431
+ * filter_order_id: "filter_order_id",
432
+ * filter_task_group_id: "filter_task_group_id",
433
+ * filter_created_at_timestamp_gte: "2024-01-15T09:30:00Z",
434
+ * filter_created_at_timestamp_lte: "2024-01-15T09:30:00Z",
435
+ * filter_last_edited_at_timestamp_gte: "2024-01-15T09:30:00Z",
436
+ * filter_last_edited_at_timestamp_lte: "2024-01-15T09:30:00Z"
437
+ * })
438
+ */
439
+ listV1(request = {}, requestOptions) {
440
+ return core.HttpResponsePromise.fromPromise(this.__listV1(request, requestOptions));
441
+ }
442
+ __listV1() {
443
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
444
+ var _a, _b, _c, _d, _e, _f, _g;
445
+ const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, filter_invoice_types: filterInvoiceTypes, filter_currency_codes: filterCurrencyCodes, filter_line_item_types: filterLineItemTypes, filter_units: filterUnits, filter_counterparty_org_id: filterCounterpartyOrgId, filter_counterparty_off_chrt_org_data_id: filterCounterpartyOffChrtOrgDataId, filter_counterparty_account_id: filterCounterpartyAccountId, filter_invoice_id: filterInvoiceId, filter_is_invoiced: filterIsInvoiced, filter_order_id: filterOrderId, filter_task_group_id: filterTaskGroupId, filter_created_at_timestamp_gte: filterCreatedAtTimestampGte, filter_created_at_timestamp_lte: filterCreatedAtTimestampLte, filter_last_edited_at_timestamp_gte: filterLastEditedAtTimestampGte, filter_last_edited_at_timestamp_lte: filterLastEditedAtTimestampLte, } = request;
446
+ const _queryParams = {};
447
+ if (sortBy !== undefined) {
448
+ _queryParams["sort_by"] = sortBy;
449
+ }
450
+ if (sortOrder !== undefined) {
451
+ _queryParams["sort_order"] = sortOrder;
452
+ }
453
+ if (page !== undefined) {
454
+ _queryParams["page"] = (_a = page === null || page === void 0 ? void 0 : page.toString()) !== null && _a !== void 0 ? _a : null;
455
+ }
456
+ if (pageSize !== undefined) {
457
+ _queryParams["page_size"] = (_b = pageSize === null || pageSize === void 0 ? void 0 : pageSize.toString()) !== null && _b !== void 0 ? _b : null;
458
+ }
459
+ if (filterInvoiceTypes !== undefined) {
460
+ if (Array.isArray(filterInvoiceTypes)) {
461
+ _queryParams["filter_invoice_types"] = filterInvoiceTypes.map((item) => item);
462
+ }
463
+ else {
464
+ _queryParams["filter_invoice_types"] = filterInvoiceTypes;
465
+ }
466
+ }
467
+ if (filterCurrencyCodes !== undefined) {
468
+ if (Array.isArray(filterCurrencyCodes)) {
469
+ _queryParams["filter_currency_codes"] = filterCurrencyCodes.map((item) => item);
470
+ }
471
+ else {
472
+ _queryParams["filter_currency_codes"] = filterCurrencyCodes;
473
+ }
474
+ }
475
+ if (filterLineItemTypes !== undefined) {
476
+ if (Array.isArray(filterLineItemTypes)) {
477
+ _queryParams["filter_line_item_types"] = filterLineItemTypes.map((item) => item);
478
+ }
479
+ else {
480
+ _queryParams["filter_line_item_types"] = filterLineItemTypes;
481
+ }
482
+ }
483
+ if (filterUnits !== undefined) {
484
+ if (Array.isArray(filterUnits)) {
485
+ _queryParams["filter_units"] = filterUnits.map((item) => item);
486
+ }
487
+ else {
488
+ _queryParams["filter_units"] = filterUnits;
489
+ }
490
+ }
491
+ if (filterCounterpartyOrgId !== undefined) {
492
+ _queryParams["filter_counterparty_org_id"] = filterCounterpartyOrgId;
493
+ }
494
+ if (filterCounterpartyOffChrtOrgDataId !== undefined) {
495
+ _queryParams["filter_counterparty_off_chrt_org_data_id"] = filterCounterpartyOffChrtOrgDataId;
496
+ }
497
+ if (filterCounterpartyAccountId !== undefined) {
498
+ _queryParams["filter_counterparty_account_id"] = filterCounterpartyAccountId;
499
+ }
500
+ if (filterInvoiceId !== undefined) {
501
+ _queryParams["filter_invoice_id"] = filterInvoiceId;
502
+ }
503
+ if (filterIsInvoiced !== undefined) {
504
+ _queryParams["filter_is_invoiced"] = (_c = filterIsInvoiced === null || filterIsInvoiced === void 0 ? void 0 : filterIsInvoiced.toString()) !== null && _c !== void 0 ? _c : null;
505
+ }
506
+ if (filterOrderId !== undefined) {
507
+ _queryParams["filter_order_id"] = filterOrderId;
508
+ }
509
+ if (filterTaskGroupId !== undefined) {
510
+ _queryParams["filter_task_group_id"] = filterTaskGroupId;
511
+ }
512
+ if (filterCreatedAtTimestampGte !== undefined) {
513
+ _queryParams["filter_created_at_timestamp_gte"] = filterCreatedAtTimestampGte;
514
+ }
515
+ if (filterCreatedAtTimestampLte !== undefined) {
516
+ _queryParams["filter_created_at_timestamp_lte"] = filterCreatedAtTimestampLte;
517
+ }
518
+ if (filterLastEditedAtTimestampGte !== undefined) {
519
+ _queryParams["filter_last_edited_at_timestamp_gte"] = filterLastEditedAtTimestampGte;
520
+ }
521
+ if (filterLastEditedAtTimestampLte !== undefined) {
522
+ _queryParams["filter_last_edited_at_timestamp_lte"] = filterLastEditedAtTimestampLte;
523
+ }
524
+ let _headers = (0, headers_js_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
525
+ const _response = yield ((_e = this._options.fetcher) !== null && _e !== void 0 ? _e : core.fetcher)({
526
+ 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/invoice_line_items/list/v1"),
527
+ method: "GET",
528
+ headers: _headers,
529
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
530
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
531
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
532
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
533
+ });
534
+ if (_response.ok) {
535
+ return { data: _response.body, rawResponse: _response.rawResponse };
536
+ }
537
+ if (_response.error.reason === "status-code") {
538
+ switch (_response.error.statusCode) {
539
+ case 422:
540
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
541
+ default:
542
+ throw new errors.ChrtError({
543
+ statusCode: _response.error.statusCode,
544
+ body: _response.error.body,
545
+ rawResponse: _response.rawResponse,
546
+ });
547
+ }
548
+ }
549
+ switch (_response.error.reason) {
550
+ case "non-json":
551
+ throw new errors.ChrtError({
552
+ statusCode: _response.error.statusCode,
553
+ body: _response.error.rawBody,
554
+ rawResponse: _response.rawResponse,
555
+ });
556
+ case "timeout":
557
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /billing_new/invoice_line_items/list/v1.");
558
+ case "unknown":
559
+ throw new errors.ChrtError({
560
+ message: _response.error.errorMessage,
561
+ rawResponse: _response.rawResponse,
562
+ });
563
+ }
564
+ });
565
+ }
566
+ /**
567
+ * Updates an owner-scoped line item and rebuilds its draft invoice when attached. | authz: allowed_org_types=[provider], min_org_role=operator | (InvoiceLineItemClientUpdate1) -> (bool)
568
+ *
569
+ * @param {string} invoiceLineItemId
570
+ * @param {Chrt.billingNew.InvoiceLineItemClientUpdate1} request
571
+ * @param {InvoiceLineItems.RequestOptions} requestOptions - Request-specific configuration.
572
+ *
573
+ * @throws {@link Chrt.UnprocessableEntityError}
574
+ *
575
+ * @example
576
+ * await client.billingNew.invoiceLineItems.updateV1("invoice_line_item_id")
577
+ */
578
+ updateV1(invoiceLineItemId, request = {}, requestOptions) {
579
+ return core.HttpResponsePromise.fromPromise(this.__updateV1(invoiceLineItemId, request, requestOptions));
580
+ }
581
+ __updateV1(invoiceLineItemId_1) {
582
+ return __awaiter(this, arguments, void 0, function* (invoiceLineItemId, request = {}, requestOptions) {
583
+ var _a, _b, _c, _d;
584
+ let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
585
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
586
+ 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/invoice_line_items/update/v1/${encodeURIComponent(invoiceLineItemId)}`),
587
+ method: "PATCH",
588
+ headers: _headers,
589
+ contentType: "application/json",
590
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
591
+ requestType: "json",
592
+ body: request,
593
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
594
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
595
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
596
+ });
597
+ if (_response.ok) {
598
+ return { data: _response.body, rawResponse: _response.rawResponse };
599
+ }
600
+ if (_response.error.reason === "status-code") {
601
+ switch (_response.error.statusCode) {
602
+ case 422:
603
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
604
+ default:
605
+ throw new errors.ChrtError({
606
+ statusCode: _response.error.statusCode,
607
+ body: _response.error.body,
608
+ rawResponse: _response.rawResponse,
609
+ });
610
+ }
611
+ }
612
+ switch (_response.error.reason) {
613
+ case "non-json":
614
+ throw new errors.ChrtError({
615
+ statusCode: _response.error.statusCode,
616
+ body: _response.error.rawBody,
617
+ rawResponse: _response.rawResponse,
618
+ });
619
+ case "timeout":
620
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /billing_new/invoice_line_items/update/v1/{invoice_line_item_id}.");
621
+ case "unknown":
622
+ throw new errors.ChrtError({
623
+ message: _response.error.errorMessage,
624
+ rawResponse: _response.rawResponse,
625
+ });
626
+ }
627
+ });
628
+ }
629
+ _getAuthorizationHeader() {
630
+ return __awaiter(this, void 0, void 0, function* () {
631
+ const bearer = yield core.Supplier.get(this._options.token);
632
+ if (bearer != null) {
633
+ return `Bearer ${bearer}`;
634
+ }
635
+ return undefined;
636
+ });
637
+ }
638
+ }
639
+ exports.InvoiceLineItems = InvoiceLineItems;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ export * from "./requests/index.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests/index.js"), exports);