@chrt-inc/typescript-sdk 1.888.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 (464) 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/resources/trackingIntegrations/client/Client.d.ts +3 -0
  78. package/dist/cjs/api/resources/trackingIntegrations/client/Client.js +7 -2
  79. package/dist/cjs/api/resources/trackingIntegrations/resources/index.d.ts +1 -0
  80. package/dist/cjs/api/resources/trackingIntegrations/resources/index.js +2 -1
  81. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/client/Client.d.ts +29 -0
  82. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/client/Client.js +27 -0
  83. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/client/index.d.ts +1 -0
  84. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/client/index.js +2 -0
  85. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/index.d.ts +2 -0
  86. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/index.js +18 -0
  87. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/Client.d.ts +93 -0
  88. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/Client.js +328 -0
  89. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/index.d.ts +2 -0
  90. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/index.js +17 -0
  91. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/requests/AssetsListV1Request.d.ts +21 -0
  92. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/requests/AssetsListV1Request.js +5 -0
  93. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/requests/ReelablesAssetClientUpdate1.d.ts +14 -0
  94. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/requests/ReelablesAssetClientUpdate1.js +5 -0
  95. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/requests/index.d.ts +2 -0
  96. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/requests/index.js +2 -0
  97. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/assets/index.d.ts +1 -0
  98. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/assets/index.js +17 -0
  99. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/index.d.ts +6 -0
  100. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/index.js +45 -0
  101. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/timeseries/client/Client.d.ts +51 -0
  102. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/timeseries/client/Client.js +135 -0
  103. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/timeseries/client/index.d.ts +2 -0
  104. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/timeseries/client/index.js +17 -0
  105. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/timeseries/client/requests/TimeseriesDataPointsV1Request.d.ts +14 -0
  106. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/timeseries/client/requests/TimeseriesDataPointsV1Request.js +5 -0
  107. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/timeseries/client/requests/index.d.ts +1 -0
  108. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/timeseries/client/requests/index.js +2 -0
  109. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/timeseries/index.d.ts +1 -0
  110. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/timeseries/index.js +17 -0
  111. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/workspaces/client/Client.d.ts +62 -0
  112. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/workspaces/client/Client.js +197 -0
  113. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/workspaces/client/index.d.ts +2 -0
  114. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/workspaces/client/index.js +17 -0
  115. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/workspaces/client/requests/WorkspacesListV1Request.d.ts +21 -0
  116. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/workspaces/client/requests/WorkspacesListV1Request.js +5 -0
  117. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/workspaces/client/requests/index.d.ts +1 -0
  118. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/workspaces/client/requests/index.js +2 -0
  119. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/workspaces/index.d.ts +1 -0
  120. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/workspaces/index.js +17 -0
  121. package/dist/cjs/api/types/AdditionalMileageRate1.d.ts +9 -0
  122. package/dist/cjs/api/types/AdditionalMileageRate1.js +5 -0
  123. package/dist/cjs/api/types/AfterHoursRate1.d.ts +7 -0
  124. package/dist/cjs/api/types/AfterHoursRate1.js +5 -0
  125. package/dist/cjs/api/types/ApplyChrtGroundProviderRatesRes.d.ts +7 -0
  126. package/dist/cjs/api/types/ApplyChrtGroundProviderRatesRes.js +5 -0
  127. package/dist/cjs/api/types/AttemptRate1.d.ts +7 -0
  128. package/dist/cjs/api/types/AttemptRate1.js +5 -0
  129. package/dist/cjs/api/types/BaseMileageRate1.d.ts +8 -0
  130. package/dist/cjs/api/types/BaseMileageRate1.js +5 -0
  131. package/dist/cjs/api/types/BillingCurrencyCodeEnum1.d.ts +17 -0
  132. package/dist/cjs/api/types/BillingCurrencyCodeEnum1.js +19 -0
  133. package/dist/cjs/api/types/CargoTypeEnum1.d.ts +8 -1
  134. package/dist/cjs/api/types/CargoTypeEnum1.js +7 -0
  135. package/dist/cjs/api/types/ChrtGroundProviderRates1.d.ts +35 -0
  136. package/dist/cjs/api/types/ChrtGroundProviderRates1.js +5 -0
  137. package/dist/cjs/api/types/ChrtGroundProviderRatesListRes.d.ts +8 -0
  138. package/dist/cjs/api/types/ChrtGroundProviderRatesListRes.js +5 -0
  139. package/dist/cjs/api/types/ChrtGroundProviderRatesSortByEnum.d.ts +10 -0
  140. package/dist/cjs/api/types/ChrtGroundProviderRatesSortByEnum.js +12 -0
  141. package/dist/cjs/api/types/CreateInvoiceLineItemsFromAmountRes.d.ts +7 -0
  142. package/dist/cjs/api/types/CreateInvoiceLineItemsFromAmountRes.js +5 -0
  143. package/dist/cjs/api/types/CreateInvoiceLineItemsFromLineItemsRes.d.ts +7 -0
  144. package/dist/cjs/api/types/CreateInvoiceLineItemsFromLineItemsRes.js +5 -0
  145. package/dist/cjs/api/types/DangerousGoodsRate1.d.ts +7 -0
  146. package/dist/cjs/api/types/DangerousGoodsRate1.js +5 -0
  147. package/dist/cjs/api/types/ExtraStopRate1.d.ts +7 -0
  148. package/dist/cjs/api/types/ExtraStopRate1.js +5 -0
  149. package/dist/cjs/api/types/FlatFeeRate1.d.ts +7 -0
  150. package/dist/cjs/api/types/FlatFeeRate1.js +5 -0
  151. package/dist/cjs/api/types/FuelSurchargeRate1.d.ts +7 -0
  152. package/dist/cjs/api/types/FuelSurchargeRate1.js +5 -0
  153. package/dist/cjs/api/types/HolidayRate1.d.ts +7 -0
  154. package/dist/cjs/api/types/HolidayRate1.js +5 -0
  155. package/dist/cjs/api/types/Invoice1.d.ts +57 -0
  156. package/dist/cjs/api/types/Invoice1.js +5 -0
  157. package/dist/cjs/api/types/InvoiceExpandedRes.d.ts +11 -0
  158. package/dist/cjs/api/types/InvoiceExpandedRes.js +5 -0
  159. package/dist/cjs/api/types/InvoiceLineItem1.d.ts +31 -0
  160. package/dist/cjs/api/types/InvoiceLineItem1.js +5 -0
  161. package/dist/cjs/api/types/InvoiceLineItemAmountTransformation1.d.ts +8 -0
  162. package/dist/cjs/api/types/InvoiceLineItemAmountTransformation1.js +5 -0
  163. package/dist/cjs/api/types/InvoiceLineItemAmountTransformationTypeEnum1.d.ts +9 -0
  164. package/dist/cjs/api/types/InvoiceLineItemAmountTransformationTypeEnum1.js +11 -0
  165. package/dist/cjs/api/types/InvoiceLineItemListRes.d.ts +8 -0
  166. package/dist/cjs/api/types/InvoiceLineItemListRes.js +5 -0
  167. package/dist/cjs/api/types/InvoiceLineItemSortByEnum.d.ts +14 -0
  168. package/dist/cjs/api/types/InvoiceLineItemSortByEnum.js +16 -0
  169. package/dist/cjs/api/types/InvoiceLineItemTypeEnum1.d.ts +33 -0
  170. package/dist/cjs/api/types/InvoiceLineItemTypeEnum1.js +35 -0
  171. package/dist/cjs/api/types/InvoiceLineItemUnitEnum1.d.ts +14 -0
  172. package/dist/cjs/api/types/InvoiceLineItemUnitEnum1.js +16 -0
  173. package/dist/cjs/api/types/InvoiceLineItemsByOrderExpandedRes.d.ts +10 -0
  174. package/dist/cjs/api/types/InvoiceLineItemsByOrderExpandedRes.js +5 -0
  175. package/dist/cjs/api/types/InvoiceLineItemsDeleteManyRes.d.ts +6 -0
  176. package/dist/cjs/api/types/InvoiceLineItemsDeleteManyRes.js +5 -0
  177. package/dist/cjs/api/types/InvoiceListRes.d.ts +8 -0
  178. package/dist/cjs/api/types/InvoiceListRes.js +5 -0
  179. package/dist/cjs/api/types/InvoiceMergeStatusEnum1.d.ts +12 -0
  180. package/dist/cjs/api/types/InvoiceMergeStatusEnum1.js +14 -0
  181. package/dist/cjs/api/types/InvoiceSortByEnum.d.ts +11 -0
  182. package/dist/cjs/api/types/InvoiceSortByEnum.js +13 -0
  183. package/dist/cjs/api/types/InvoiceStatusEnum1.d.ts +9 -0
  184. package/dist/cjs/api/types/InvoiceStatusEnum1.js +11 -0
  185. package/dist/cjs/api/types/InvoiceStripeStatusEnum1.d.ts +11 -0
  186. package/dist/cjs/api/types/InvoiceStripeStatusEnum1.js +13 -0
  187. package/dist/cjs/api/types/InvoiceTypeEnum1.d.ts +8 -0
  188. package/dist/cjs/api/types/InvoiceTypeEnum1.js +10 -0
  189. package/dist/cjs/api/types/LongDistanceSurchargeRate1.d.ts +8 -0
  190. package/dist/cjs/api/types/LongDistanceSurchargeRate1.js +5 -0
  191. package/dist/cjs/api/types/Order1.d.ts +1 -0
  192. package/dist/cjs/api/types/OrderLimitedForCoordinator1.d.ts +1 -0
  193. package/dist/cjs/api/types/OrderLimitedForExecutor1.d.ts +1 -0
  194. package/dist/cjs/api/types/OrderLimitedForProvider1.d.ts +1 -0
  195. package/dist/cjs/api/types/OrderLimitedForShipper1.d.ts +1 -0
  196. package/dist/cjs/api/types/OrderTemplateExpanded1.d.ts +1 -0
  197. package/dist/cjs/api/types/OrderTemplateReferencesExpanded1.d.ts +1 -0
  198. package/dist/cjs/api/types/PickAndHoldRate1.d.ts +7 -0
  199. package/dist/cjs/api/types/PickAndHoldRate1.js +5 -0
  200. package/dist/cjs/api/types/ReelablesAsset1.d.ts +22 -0
  201. package/dist/cjs/api/types/ReelablesAsset1.js +5 -0
  202. package/dist/cjs/api/types/ReelablesAssetListRes.d.ts +8 -0
  203. package/dist/cjs/api/types/ReelablesAssetListRes.js +5 -0
  204. package/dist/cjs/api/types/ReelablesAssetSortByEnum.d.ts +8 -0
  205. package/dist/cjs/api/types/ReelablesAssetSortByEnum.js +10 -0
  206. package/dist/cjs/api/types/ReelablesAssetSyncRes.d.ts +8 -0
  207. package/dist/cjs/api/types/ReelablesAssetSyncRes.js +5 -0
  208. package/dist/cjs/api/types/ReelablesDataPoint1.d.ts +12 -0
  209. package/dist/cjs/api/types/ReelablesDataPoint1.js +5 -0
  210. package/dist/cjs/api/types/ReelablesDataPointMetadata1.d.ts +6 -0
  211. package/dist/cjs/api/types/ReelablesDataPointMetadata1.js +5 -0
  212. package/dist/cjs/api/types/ReelablesLabel1.d.ts +9 -0
  213. package/dist/cjs/api/types/ReelablesLabel1.js +5 -0
  214. package/dist/cjs/api/types/ReelablesTimeseriesRes.d.ts +7 -0
  215. package/dist/cjs/api/types/ReelablesTimeseriesRes.js +5 -0
  216. package/dist/cjs/api/types/ReelablesWorkspace1.d.ts +13 -0
  217. package/dist/cjs/api/types/ReelablesWorkspace1.js +5 -0
  218. package/dist/cjs/api/types/ReelablesWorkspaceListRes.d.ts +8 -0
  219. package/dist/cjs/api/types/ReelablesWorkspaceListRes.js +5 -0
  220. package/dist/cjs/api/types/ReelablesWorkspaceSortByEnum.d.ts +4 -0
  221. package/dist/cjs/api/types/ReelablesWorkspaceSortByEnum.js +5 -0
  222. package/dist/cjs/api/types/ReelablesWorkspaceSyncRes.d.ts +9 -0
  223. package/dist/cjs/api/types/ReelablesWorkspaceSyncRes.js +5 -0
  224. package/dist/cjs/api/types/WaitTimeRate1.d.ts +8 -0
  225. package/dist/cjs/api/types/WaitTimeRate1.js +5 -0
  226. package/dist/cjs/api/types/WeekendRate1.d.ts +7 -0
  227. package/dist/cjs/api/types/WeekendRate1.js +5 -0
  228. package/dist/cjs/api/types/index.d.ts +49 -0
  229. package/dist/cjs/api/types/index.js +49 -0
  230. package/dist/cjs/version.d.ts +1 -1
  231. package/dist/cjs/version.js +1 -1
  232. package/dist/esm/Client.d.mts +3 -0
  233. package/dist/esm/Client.mjs +7 -2
  234. package/dist/esm/api/resources/billingNew/client/Client.d.mts +29 -0
  235. package/dist/esm/api/resources/billingNew/client/Client.mjs +23 -0
  236. package/dist/esm/api/resources/billingNew/client/index.d.mts +1 -0
  237. package/dist/esm/api/resources/billingNew/client/index.mjs +1 -0
  238. package/dist/esm/api/resources/billingNew/index.d.mts +2 -0
  239. package/dist/esm/api/resources/billingNew/index.mjs +2 -0
  240. package/dist/esm/api/resources/billingNew/resources/index.d.mts +6 -0
  241. package/dist/esm/api/resources/billingNew/resources/index.mjs +6 -0
  242. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/Client.d.mts +180 -0
  243. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/Client.mjs +602 -0
  244. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/index.d.mts +2 -0
  245. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/index.mjs +1 -0
  246. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/ApplyChrtGroundProviderRatesReq.d.mts +22 -0
  247. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/ApplyChrtGroundProviderRatesReq.mjs +4 -0
  248. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/CreateInvoiceLineItemsFromAmountReq.d.mts +28 -0
  249. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/CreateInvoiceLineItemsFromAmountReq.mjs +4 -0
  250. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/CreateInvoiceLineItemsFromLineItemsReq.d.mts +45 -0
  251. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/CreateInvoiceLineItemsFromLineItemsReq.mjs +4 -0
  252. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/InvoiceLineItemClientUpdate1.d.mts +19 -0
  253. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/InvoiceLineItemClientUpdate1.mjs +4 -0
  254. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/InvoiceLineItemsDeleteManyReq.d.mts +12 -0
  255. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/InvoiceLineItemsDeleteManyReq.mjs +4 -0
  256. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/InvoiceLineItemsListV1Request.d.mts +62 -0
  257. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/InvoiceLineItemsListV1Request.mjs +4 -0
  258. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/index.d.mts +6 -0
  259. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/index.mjs +1 -0
  260. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/index.d.mts +1 -0
  261. package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/index.mjs +1 -0
  262. package/dist/esm/api/resources/billingNew/resources/invoices/client/Client.d.mts +217 -0
  263. package/dist/esm/api/resources/billingNew/resources/invoices/client/Client.mjs +843 -0
  264. package/dist/esm/api/resources/billingNew/resources/invoices/client/index.d.mts +2 -0
  265. package/dist/esm/api/resources/billingNew/resources/invoices/client/index.mjs +1 -0
  266. package/dist/esm/api/resources/billingNew/resources/invoices/client/requests/InvoiceClientCreate1.d.mts +24 -0
  267. package/dist/esm/api/resources/billingNew/resources/invoices/client/requests/InvoiceClientCreate1.mjs +4 -0
  268. package/dist/esm/api/resources/billingNew/resources/invoices/client/requests/InvoiceClientUpdate1.d.mts +13 -0
  269. package/dist/esm/api/resources/billingNew/resources/invoices/client/requests/InvoiceClientUpdate1.mjs +4 -0
  270. package/dist/esm/api/resources/billingNew/resources/invoices/client/requests/InvoiceLineItemsAddReq.d.mts +12 -0
  271. package/dist/esm/api/resources/billingNew/resources/invoices/client/requests/InvoiceLineItemsAddReq.mjs +4 -0
  272. package/dist/esm/api/resources/billingNew/resources/invoices/client/requests/InvoiceLineItemsRemoveReq.d.mts +12 -0
  273. package/dist/esm/api/resources/billingNew/resources/invoices/client/requests/InvoiceLineItemsRemoveReq.mjs +4 -0
  274. package/dist/esm/api/resources/billingNew/resources/invoices/client/requests/InvoiceVoidReq.d.mts +10 -0
  275. package/dist/esm/api/resources/billingNew/resources/invoices/client/requests/InvoiceVoidReq.mjs +4 -0
  276. package/dist/esm/api/resources/billingNew/resources/invoices/client/requests/InvoicesListV1Request.d.mts +51 -0
  277. package/dist/esm/api/resources/billingNew/resources/invoices/client/requests/InvoicesListV1Request.mjs +4 -0
  278. package/dist/esm/api/resources/billingNew/resources/invoices/client/requests/index.d.mts +6 -0
  279. package/dist/esm/api/resources/billingNew/resources/invoices/client/requests/index.mjs +1 -0
  280. package/dist/esm/api/resources/billingNew/resources/invoices/index.d.mts +1 -0
  281. package/dist/esm/api/resources/billingNew/resources/invoices/index.mjs +1 -0
  282. package/dist/esm/api/resources/billingNew/resources/rates/client/Client.d.mts +145 -0
  283. package/dist/esm/api/resources/billingNew/resources/rates/client/Client.mjs +541 -0
  284. package/dist/esm/api/resources/billingNew/resources/rates/client/index.d.mts +2 -0
  285. package/dist/esm/api/resources/billingNew/resources/rates/client/index.mjs +1 -0
  286. package/dist/esm/api/resources/billingNew/resources/rates/client/requests/ChrtGroundProviderRatesAddCounterpartiesReq.d.mts +13 -0
  287. package/dist/esm/api/resources/billingNew/resources/rates/client/requests/ChrtGroundProviderRatesAddCounterpartiesReq.mjs +4 -0
  288. package/dist/esm/api/resources/billingNew/resources/rates/client/requests/ChrtGroundProviderRatesClientCreate1.d.mts +37 -0
  289. package/dist/esm/api/resources/billingNew/resources/rates/client/requests/ChrtGroundProviderRatesClientCreate1.mjs +4 -0
  290. package/dist/esm/api/resources/billingNew/resources/rates/client/requests/ChrtGroundProviderRatesClientUpdate1.d.mts +43 -0
  291. package/dist/esm/api/resources/billingNew/resources/rates/client/requests/ChrtGroundProviderRatesClientUpdate1.mjs +4 -0
  292. package/dist/esm/api/resources/billingNew/resources/rates/client/requests/ChrtGroundProviderRatesRemoveCounterpartiesReq.d.mts +13 -0
  293. package/dist/esm/api/resources/billingNew/resources/rates/client/requests/ChrtGroundProviderRatesRemoveCounterpartiesReq.mjs +4 -0
  294. package/dist/esm/api/resources/billingNew/resources/rates/client/requests/RatesListV1Request.d.mts +54 -0
  295. package/dist/esm/api/resources/billingNew/resources/rates/client/requests/RatesListV1Request.mjs +4 -0
  296. package/dist/esm/api/resources/billingNew/resources/rates/client/requests/index.d.mts +5 -0
  297. package/dist/esm/api/resources/billingNew/resources/rates/client/requests/index.mjs +1 -0
  298. package/dist/esm/api/resources/billingNew/resources/rates/index.d.mts +1 -0
  299. package/dist/esm/api/resources/billingNew/resources/rates/index.mjs +1 -0
  300. package/dist/esm/api/resources/index.d.mts +1 -0
  301. package/dist/esm/api/resources/index.mjs +1 -0
  302. package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/Client.d.mts +4 -0
  303. package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/Client.mjs +36 -20
  304. package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForCoordinatorOperatorsV1Request.d.mts +3 -0
  305. package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForExecutorOperatorsV1Request.d.mts +3 -0
  306. package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForProviderOperatorsV1Request.d.mts +3 -0
  307. package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForShipperOperatorsV1Request.d.mts +3 -0
  308. package/dist/esm/api/resources/trackingIntegrations/client/Client.d.mts +3 -0
  309. package/dist/esm/api/resources/trackingIntegrations/client/Client.mjs +5 -0
  310. package/dist/esm/api/resources/trackingIntegrations/resources/index.d.mts +1 -0
  311. package/dist/esm/api/resources/trackingIntegrations/resources/index.mjs +1 -0
  312. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/client/Client.d.mts +29 -0
  313. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/client/Client.mjs +23 -0
  314. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/client/index.d.mts +1 -0
  315. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/client/index.mjs +1 -0
  316. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/index.d.mts +2 -0
  317. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/index.mjs +2 -0
  318. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/Client.d.mts +93 -0
  319. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/Client.mjs +291 -0
  320. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/index.d.mts +2 -0
  321. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/index.mjs +1 -0
  322. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/requests/AssetsListV1Request.d.mts +21 -0
  323. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/requests/AssetsListV1Request.mjs +4 -0
  324. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/requests/ReelablesAssetClientUpdate1.d.mts +14 -0
  325. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/requests/ReelablesAssetClientUpdate1.mjs +4 -0
  326. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/requests/index.d.mts +2 -0
  327. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/requests/index.mjs +1 -0
  328. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/assets/index.d.mts +1 -0
  329. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/assets/index.mjs +1 -0
  330. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/index.d.mts +6 -0
  331. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/index.mjs +6 -0
  332. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/timeseries/client/Client.d.mts +51 -0
  333. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/timeseries/client/Client.mjs +98 -0
  334. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/timeseries/client/index.d.mts +2 -0
  335. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/timeseries/client/index.mjs +1 -0
  336. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/timeseries/client/requests/TimeseriesDataPointsV1Request.d.mts +14 -0
  337. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/timeseries/client/requests/TimeseriesDataPointsV1Request.mjs +4 -0
  338. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/timeseries/client/requests/index.d.mts +1 -0
  339. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/timeseries/client/requests/index.mjs +1 -0
  340. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/timeseries/index.d.mts +1 -0
  341. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/timeseries/index.mjs +1 -0
  342. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/workspaces/client/Client.d.mts +62 -0
  343. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/workspaces/client/Client.mjs +160 -0
  344. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/workspaces/client/index.d.mts +2 -0
  345. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/workspaces/client/index.mjs +1 -0
  346. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/workspaces/client/requests/WorkspacesListV1Request.d.mts +21 -0
  347. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/workspaces/client/requests/WorkspacesListV1Request.mjs +4 -0
  348. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/workspaces/client/requests/index.d.mts +1 -0
  349. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/workspaces/client/requests/index.mjs +1 -0
  350. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/workspaces/index.d.mts +1 -0
  351. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/workspaces/index.mjs +1 -0
  352. package/dist/esm/api/types/AdditionalMileageRate1.d.mts +9 -0
  353. package/dist/esm/api/types/AdditionalMileageRate1.mjs +4 -0
  354. package/dist/esm/api/types/AfterHoursRate1.d.mts +7 -0
  355. package/dist/esm/api/types/AfterHoursRate1.mjs +4 -0
  356. package/dist/esm/api/types/ApplyChrtGroundProviderRatesRes.d.mts +7 -0
  357. package/dist/esm/api/types/ApplyChrtGroundProviderRatesRes.mjs +4 -0
  358. package/dist/esm/api/types/AttemptRate1.d.mts +7 -0
  359. package/dist/esm/api/types/AttemptRate1.mjs +4 -0
  360. package/dist/esm/api/types/BaseMileageRate1.d.mts +8 -0
  361. package/dist/esm/api/types/BaseMileageRate1.mjs +4 -0
  362. package/dist/esm/api/types/BillingCurrencyCodeEnum1.d.mts +17 -0
  363. package/dist/esm/api/types/BillingCurrencyCodeEnum1.mjs +16 -0
  364. package/dist/esm/api/types/CargoTypeEnum1.d.mts +8 -1
  365. package/dist/esm/api/types/CargoTypeEnum1.mjs +7 -0
  366. package/dist/esm/api/types/ChrtGroundProviderRates1.d.mts +35 -0
  367. package/dist/esm/api/types/ChrtGroundProviderRates1.mjs +4 -0
  368. package/dist/esm/api/types/ChrtGroundProviderRatesListRes.d.mts +8 -0
  369. package/dist/esm/api/types/ChrtGroundProviderRatesListRes.mjs +4 -0
  370. package/dist/esm/api/types/ChrtGroundProviderRatesSortByEnum.d.mts +10 -0
  371. package/dist/esm/api/types/ChrtGroundProviderRatesSortByEnum.mjs +9 -0
  372. package/dist/esm/api/types/CreateInvoiceLineItemsFromAmountRes.d.mts +7 -0
  373. package/dist/esm/api/types/CreateInvoiceLineItemsFromAmountRes.mjs +4 -0
  374. package/dist/esm/api/types/CreateInvoiceLineItemsFromLineItemsRes.d.mts +7 -0
  375. package/dist/esm/api/types/CreateInvoiceLineItemsFromLineItemsRes.mjs +4 -0
  376. package/dist/esm/api/types/DangerousGoodsRate1.d.mts +7 -0
  377. package/dist/esm/api/types/DangerousGoodsRate1.mjs +4 -0
  378. package/dist/esm/api/types/ExtraStopRate1.d.mts +7 -0
  379. package/dist/esm/api/types/ExtraStopRate1.mjs +4 -0
  380. package/dist/esm/api/types/FlatFeeRate1.d.mts +7 -0
  381. package/dist/esm/api/types/FlatFeeRate1.mjs +4 -0
  382. package/dist/esm/api/types/FuelSurchargeRate1.d.mts +7 -0
  383. package/dist/esm/api/types/FuelSurchargeRate1.mjs +4 -0
  384. package/dist/esm/api/types/HolidayRate1.d.mts +7 -0
  385. package/dist/esm/api/types/HolidayRate1.mjs +4 -0
  386. package/dist/esm/api/types/Invoice1.d.mts +57 -0
  387. package/dist/esm/api/types/Invoice1.mjs +4 -0
  388. package/dist/esm/api/types/InvoiceExpandedRes.d.mts +11 -0
  389. package/dist/esm/api/types/InvoiceExpandedRes.mjs +4 -0
  390. package/dist/esm/api/types/InvoiceLineItem1.d.mts +31 -0
  391. package/dist/esm/api/types/InvoiceLineItem1.mjs +4 -0
  392. package/dist/esm/api/types/InvoiceLineItemAmountTransformation1.d.mts +8 -0
  393. package/dist/esm/api/types/InvoiceLineItemAmountTransformation1.mjs +4 -0
  394. package/dist/esm/api/types/InvoiceLineItemAmountTransformationTypeEnum1.d.mts +9 -0
  395. package/dist/esm/api/types/InvoiceLineItemAmountTransformationTypeEnum1.mjs +8 -0
  396. package/dist/esm/api/types/InvoiceLineItemListRes.d.mts +8 -0
  397. package/dist/esm/api/types/InvoiceLineItemListRes.mjs +4 -0
  398. package/dist/esm/api/types/InvoiceLineItemSortByEnum.d.mts +14 -0
  399. package/dist/esm/api/types/InvoiceLineItemSortByEnum.mjs +13 -0
  400. package/dist/esm/api/types/InvoiceLineItemTypeEnum1.d.mts +33 -0
  401. package/dist/esm/api/types/InvoiceLineItemTypeEnum1.mjs +32 -0
  402. package/dist/esm/api/types/InvoiceLineItemUnitEnum1.d.mts +14 -0
  403. package/dist/esm/api/types/InvoiceLineItemUnitEnum1.mjs +13 -0
  404. package/dist/esm/api/types/InvoiceLineItemsByOrderExpandedRes.d.mts +10 -0
  405. package/dist/esm/api/types/InvoiceLineItemsByOrderExpandedRes.mjs +4 -0
  406. package/dist/esm/api/types/InvoiceLineItemsDeleteManyRes.d.mts +6 -0
  407. package/dist/esm/api/types/InvoiceLineItemsDeleteManyRes.mjs +4 -0
  408. package/dist/esm/api/types/InvoiceListRes.d.mts +8 -0
  409. package/dist/esm/api/types/InvoiceListRes.mjs +4 -0
  410. package/dist/esm/api/types/InvoiceMergeStatusEnum1.d.mts +12 -0
  411. package/dist/esm/api/types/InvoiceMergeStatusEnum1.mjs +11 -0
  412. package/dist/esm/api/types/InvoiceSortByEnum.d.mts +11 -0
  413. package/dist/esm/api/types/InvoiceSortByEnum.mjs +10 -0
  414. package/dist/esm/api/types/InvoiceStatusEnum1.d.mts +9 -0
  415. package/dist/esm/api/types/InvoiceStatusEnum1.mjs +8 -0
  416. package/dist/esm/api/types/InvoiceStripeStatusEnum1.d.mts +11 -0
  417. package/dist/esm/api/types/InvoiceStripeStatusEnum1.mjs +10 -0
  418. package/dist/esm/api/types/InvoiceTypeEnum1.d.mts +8 -0
  419. package/dist/esm/api/types/InvoiceTypeEnum1.mjs +7 -0
  420. package/dist/esm/api/types/LongDistanceSurchargeRate1.d.mts +8 -0
  421. package/dist/esm/api/types/LongDistanceSurchargeRate1.mjs +4 -0
  422. package/dist/esm/api/types/Order1.d.mts +1 -0
  423. package/dist/esm/api/types/OrderLimitedForCoordinator1.d.mts +1 -0
  424. package/dist/esm/api/types/OrderLimitedForExecutor1.d.mts +1 -0
  425. package/dist/esm/api/types/OrderLimitedForProvider1.d.mts +1 -0
  426. package/dist/esm/api/types/OrderLimitedForShipper1.d.mts +1 -0
  427. package/dist/esm/api/types/OrderTemplateExpanded1.d.mts +1 -0
  428. package/dist/esm/api/types/OrderTemplateReferencesExpanded1.d.mts +1 -0
  429. package/dist/esm/api/types/PickAndHoldRate1.d.mts +7 -0
  430. package/dist/esm/api/types/PickAndHoldRate1.mjs +4 -0
  431. package/dist/esm/api/types/ReelablesAsset1.d.mts +22 -0
  432. package/dist/esm/api/types/ReelablesAsset1.mjs +4 -0
  433. package/dist/esm/api/types/ReelablesAssetListRes.d.mts +8 -0
  434. package/dist/esm/api/types/ReelablesAssetListRes.mjs +4 -0
  435. package/dist/esm/api/types/ReelablesAssetSortByEnum.d.mts +8 -0
  436. package/dist/esm/api/types/ReelablesAssetSortByEnum.mjs +7 -0
  437. package/dist/esm/api/types/ReelablesAssetSyncRes.d.mts +8 -0
  438. package/dist/esm/api/types/ReelablesAssetSyncRes.mjs +4 -0
  439. package/dist/esm/api/types/ReelablesDataPoint1.d.mts +12 -0
  440. package/dist/esm/api/types/ReelablesDataPoint1.mjs +4 -0
  441. package/dist/esm/api/types/ReelablesDataPointMetadata1.d.mts +6 -0
  442. package/dist/esm/api/types/ReelablesDataPointMetadata1.mjs +4 -0
  443. package/dist/esm/api/types/ReelablesLabel1.d.mts +9 -0
  444. package/dist/esm/api/types/ReelablesLabel1.mjs +4 -0
  445. package/dist/esm/api/types/ReelablesTimeseriesRes.d.mts +7 -0
  446. package/dist/esm/api/types/ReelablesTimeseriesRes.mjs +4 -0
  447. package/dist/esm/api/types/ReelablesWorkspace1.d.mts +13 -0
  448. package/dist/esm/api/types/ReelablesWorkspace1.mjs +4 -0
  449. package/dist/esm/api/types/ReelablesWorkspaceListRes.d.mts +8 -0
  450. package/dist/esm/api/types/ReelablesWorkspaceListRes.mjs +4 -0
  451. package/dist/esm/api/types/ReelablesWorkspaceSortByEnum.d.mts +4 -0
  452. package/dist/esm/api/types/ReelablesWorkspaceSortByEnum.mjs +4 -0
  453. package/dist/esm/api/types/ReelablesWorkspaceSyncRes.d.mts +9 -0
  454. package/dist/esm/api/types/ReelablesWorkspaceSyncRes.mjs +4 -0
  455. package/dist/esm/api/types/WaitTimeRate1.d.mts +8 -0
  456. package/dist/esm/api/types/WaitTimeRate1.mjs +4 -0
  457. package/dist/esm/api/types/WeekendRate1.d.mts +7 -0
  458. package/dist/esm/api/types/WeekendRate1.mjs +4 -0
  459. package/dist/esm/api/types/index.d.mts +49 -0
  460. package/dist/esm/api/types/index.mjs +49 -0
  461. package/dist/esm/version.d.mts +1 -1
  462. package/dist/esm/version.mjs +1 -1
  463. package/package.json +1 -1
  464. package/reference.md +5877 -3579
@@ -0,0 +1,880 @@
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.Invoices = 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 Invoices {
55
+ constructor(_options = {}) {
56
+ this._options = _options;
57
+ }
58
+ /**
59
+ * Approves a draft invoice owned by the caller's organization. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (Invoice1)
60
+ *
61
+ * @param {string} invoiceId
62
+ * @param {Invoices.RequestOptions} requestOptions - Request-specific configuration.
63
+ *
64
+ * @throws {@link Chrt.UnprocessableEntityError}
65
+ *
66
+ * @example
67
+ * await client.billingNew.invoices.approveV1("invoice_id")
68
+ */
69
+ approveV1(invoiceId, requestOptions) {
70
+ return core.HttpResponsePromise.fromPromise(this.__approveV1(invoiceId, requestOptions));
71
+ }
72
+ __approveV1(invoiceId, requestOptions) {
73
+ return __awaiter(this, void 0, void 0, function* () {
74
+ var _a, _b, _c, _d;
75
+ 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);
76
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
77
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `billing_new/invoices/approve/v1/${encodeURIComponent(invoiceId)}`),
78
+ method: "PATCH",
79
+ headers: _headers,
80
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
81
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
82
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
83
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
84
+ });
85
+ if (_response.ok) {
86
+ return { data: _response.body, rawResponse: _response.rawResponse };
87
+ }
88
+ if (_response.error.reason === "status-code") {
89
+ switch (_response.error.statusCode) {
90
+ case 422:
91
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
92
+ default:
93
+ throw new errors.ChrtError({
94
+ statusCode: _response.error.statusCode,
95
+ body: _response.error.body,
96
+ rawResponse: _response.rawResponse,
97
+ });
98
+ }
99
+ }
100
+ switch (_response.error.reason) {
101
+ case "non-json":
102
+ throw new errors.ChrtError({
103
+ statusCode: _response.error.statusCode,
104
+ body: _response.error.rawBody,
105
+ rawResponse: _response.rawResponse,
106
+ });
107
+ case "timeout":
108
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /billing_new/invoices/approve/v1/{invoice_id}.");
109
+ case "unknown":
110
+ throw new errors.ChrtError({
111
+ message: _response.error.errorMessage,
112
+ rawResponse: _response.rawResponse,
113
+ });
114
+ }
115
+ });
116
+ }
117
+ /**
118
+ * Creates a draft invoice owned by the caller's organization. | authz: allowed_org_types=[provider], min_org_role=operator | (InvoiceClientCreate1) -> (PydanticObjectId)
119
+ *
120
+ * @param {Chrt.billingNew.InvoiceClientCreate1} request
121
+ * @param {Invoices.RequestOptions} requestOptions - Request-specific configuration.
122
+ *
123
+ * @throws {@link Chrt.UnprocessableEntityError}
124
+ *
125
+ * @example
126
+ * await client.billingNew.invoices.createV1({
127
+ * currency_code: "USD",
128
+ * invoice_type: "accounts_receivable",
129
+ * schema_version: 1
130
+ * })
131
+ */
132
+ createV1(request, requestOptions) {
133
+ return core.HttpResponsePromise.fromPromise(this.__createV1(request, requestOptions));
134
+ }
135
+ __createV1(request, requestOptions) {
136
+ return __awaiter(this, void 0, void 0, function* () {
137
+ var _a, _b, _c, _d;
138
+ 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);
139
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
140
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "billing_new/invoices/create/v1"),
141
+ method: "POST",
142
+ headers: _headers,
143
+ contentType: "application/json",
144
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
145
+ requestType: "json",
146
+ body: request,
147
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
148
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
149
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
150
+ });
151
+ if (_response.ok) {
152
+ return { data: _response.body, rawResponse: _response.rawResponse };
153
+ }
154
+ if (_response.error.reason === "status-code") {
155
+ switch (_response.error.statusCode) {
156
+ case 422:
157
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
158
+ default:
159
+ throw new errors.ChrtError({
160
+ statusCode: _response.error.statusCode,
161
+ body: _response.error.body,
162
+ rawResponse: _response.rawResponse,
163
+ });
164
+ }
165
+ }
166
+ switch (_response.error.reason) {
167
+ case "non-json":
168
+ throw new errors.ChrtError({
169
+ statusCode: _response.error.statusCode,
170
+ body: _response.error.rawBody,
171
+ rawResponse: _response.rawResponse,
172
+ });
173
+ case "timeout":
174
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /billing_new/invoices/create/v1.");
175
+ case "unknown":
176
+ throw new errors.ChrtError({
177
+ message: _response.error.errorMessage,
178
+ rawResponse: _response.rawResponse,
179
+ });
180
+ }
181
+ });
182
+ }
183
+ /**
184
+ * Hard-deletes a draft invoice and detaches its line items. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (bool)
185
+ *
186
+ * @param {string} invoiceId
187
+ * @param {Invoices.RequestOptions} requestOptions - Request-specific configuration.
188
+ *
189
+ * @throws {@link Chrt.UnprocessableEntityError}
190
+ *
191
+ * @example
192
+ * await client.billingNew.invoices.deleteV1("invoice_id")
193
+ */
194
+ deleteV1(invoiceId, requestOptions) {
195
+ return core.HttpResponsePromise.fromPromise(this.__deleteV1(invoiceId, requestOptions));
196
+ }
197
+ __deleteV1(invoiceId, requestOptions) {
198
+ return __awaiter(this, void 0, void 0, function* () {
199
+ var _a, _b, _c, _d;
200
+ let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
201
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
202
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `billing_new/invoices/delete/v1/${encodeURIComponent(invoiceId)}`),
203
+ method: "DELETE",
204
+ headers: _headers,
205
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
206
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
207
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
208
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
209
+ });
210
+ if (_response.ok) {
211
+ return { data: _response.body, rawResponse: _response.rawResponse };
212
+ }
213
+ if (_response.error.reason === "status-code") {
214
+ switch (_response.error.statusCode) {
215
+ case 422:
216
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
217
+ default:
218
+ throw new errors.ChrtError({
219
+ statusCode: _response.error.statusCode,
220
+ body: _response.error.body,
221
+ rawResponse: _response.rawResponse,
222
+ });
223
+ }
224
+ }
225
+ switch (_response.error.reason) {
226
+ case "non-json":
227
+ throw new errors.ChrtError({
228
+ statusCode: _response.error.statusCode,
229
+ body: _response.error.rawBody,
230
+ rawResponse: _response.rawResponse,
231
+ });
232
+ case "timeout":
233
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /billing_new/invoices/delete/v1/{invoice_id}.");
234
+ case "unknown":
235
+ throw new errors.ChrtError({
236
+ message: _response.error.errorMessage,
237
+ rawResponse: _response.rawResponse,
238
+ });
239
+ }
240
+ });
241
+ }
242
+ /**
243
+ * Retrieves an owner-scoped invoice with its line items, counterparty organization data, and accounts expanded. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (InvoiceExpandedRes)
244
+ *
245
+ * @param {string} invoiceId
246
+ * @param {Invoices.RequestOptions} requestOptions - Request-specific configuration.
247
+ *
248
+ * @throws {@link Chrt.UnprocessableEntityError}
249
+ *
250
+ * @example
251
+ * await client.billingNew.invoices.getExpandedV1("invoice_id")
252
+ */
253
+ getExpandedV1(invoiceId, requestOptions) {
254
+ return core.HttpResponsePromise.fromPromise(this.__getExpandedV1(invoiceId, requestOptions));
255
+ }
256
+ __getExpandedV1(invoiceId, requestOptions) {
257
+ return __awaiter(this, void 0, void 0, function* () {
258
+ var _a, _b, _c, _d;
259
+ let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
260
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
261
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `billing_new/invoices/expanded/v1/${encodeURIComponent(invoiceId)}`),
262
+ method: "GET",
263
+ headers: _headers,
264
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
265
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
266
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
267
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
268
+ });
269
+ if (_response.ok) {
270
+ return { data: _response.body, rawResponse: _response.rawResponse };
271
+ }
272
+ if (_response.error.reason === "status-code") {
273
+ switch (_response.error.statusCode) {
274
+ case 422:
275
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
276
+ default:
277
+ throw new errors.ChrtError({
278
+ statusCode: _response.error.statusCode,
279
+ body: _response.error.body,
280
+ rawResponse: _response.rawResponse,
281
+ });
282
+ }
283
+ }
284
+ switch (_response.error.reason) {
285
+ case "non-json":
286
+ throw new errors.ChrtError({
287
+ statusCode: _response.error.statusCode,
288
+ body: _response.error.rawBody,
289
+ rawResponse: _response.rawResponse,
290
+ });
291
+ case "timeout":
292
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /billing_new/invoices/expanded/v1/{invoice_id}.");
293
+ case "unknown":
294
+ throw new errors.ChrtError({
295
+ message: _response.error.errorMessage,
296
+ rawResponse: _response.rawResponse,
297
+ });
298
+ }
299
+ });
300
+ }
301
+ /**
302
+ * Attaches one line item to a draft invoice, moving it from another draft invoice when needed, and synchronizes both invoices. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (Invoice1)
303
+ *
304
+ * @param {string} invoiceId
305
+ * @param {string} invoiceLineItemId
306
+ * @param {Invoices.RequestOptions} requestOptions - Request-specific configuration.
307
+ *
308
+ * @throws {@link Chrt.UnprocessableEntityError}
309
+ *
310
+ * @example
311
+ * await client.billingNew.invoices.addLineItemV1("invoice_id", "invoice_line_item_id")
312
+ */
313
+ addLineItemV1(invoiceId, invoiceLineItemId, requestOptions) {
314
+ return core.HttpResponsePromise.fromPromise(this.__addLineItemV1(invoiceId, invoiceLineItemId, requestOptions));
315
+ }
316
+ __addLineItemV1(invoiceId, invoiceLineItemId, requestOptions) {
317
+ return __awaiter(this, void 0, void 0, function* () {
318
+ var _a, _b, _c, _d;
319
+ let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
320
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
321
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `billing_new/invoices/line_item/add/v1/${encodeURIComponent(invoiceId)}/${encodeURIComponent(invoiceLineItemId)}`),
322
+ method: "POST",
323
+ headers: _headers,
324
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
325
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
326
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
327
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
328
+ });
329
+ if (_response.ok) {
330
+ return { data: _response.body, rawResponse: _response.rawResponse };
331
+ }
332
+ if (_response.error.reason === "status-code") {
333
+ switch (_response.error.statusCode) {
334
+ case 422:
335
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
336
+ default:
337
+ throw new errors.ChrtError({
338
+ statusCode: _response.error.statusCode,
339
+ body: _response.error.body,
340
+ rawResponse: _response.rawResponse,
341
+ });
342
+ }
343
+ }
344
+ switch (_response.error.reason) {
345
+ case "non-json":
346
+ throw new errors.ChrtError({
347
+ statusCode: _response.error.statusCode,
348
+ body: _response.error.rawBody,
349
+ rawResponse: _response.rawResponse,
350
+ });
351
+ case "timeout":
352
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /billing_new/invoices/line_item/add/v1/{invoice_id}/{invoice_line_item_id}.");
353
+ case "unknown":
354
+ throw new errors.ChrtError({
355
+ message: _response.error.errorMessage,
356
+ rawResponse: _response.rawResponse,
357
+ });
358
+ }
359
+ });
360
+ }
361
+ /**
362
+ * Detaches one line item from a draft invoice and synchronizes the invoice total and accounts. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (Invoice1)
363
+ *
364
+ * @param {string} invoiceId
365
+ * @param {string} invoiceLineItemId
366
+ * @param {Invoices.RequestOptions} requestOptions - Request-specific configuration.
367
+ *
368
+ * @throws {@link Chrt.UnprocessableEntityError}
369
+ *
370
+ * @example
371
+ * await client.billingNew.invoices.removeLineItemV1("invoice_id", "invoice_line_item_id")
372
+ */
373
+ removeLineItemV1(invoiceId, invoiceLineItemId, requestOptions) {
374
+ return core.HttpResponsePromise.fromPromise(this.__removeLineItemV1(invoiceId, invoiceLineItemId, requestOptions));
375
+ }
376
+ __removeLineItemV1(invoiceId, invoiceLineItemId, requestOptions) {
377
+ return __awaiter(this, void 0, void 0, function* () {
378
+ var _a, _b, _c, _d;
379
+ let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
380
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
381
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `billing_new/invoices/line_item/remove/v1/${encodeURIComponent(invoiceId)}/${encodeURIComponent(invoiceLineItemId)}`),
382
+ method: "DELETE",
383
+ headers: _headers,
384
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
385
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
386
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
387
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
388
+ });
389
+ if (_response.ok) {
390
+ return { data: _response.body, rawResponse: _response.rawResponse };
391
+ }
392
+ if (_response.error.reason === "status-code") {
393
+ switch (_response.error.statusCode) {
394
+ case 422:
395
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
396
+ default:
397
+ throw new errors.ChrtError({
398
+ statusCode: _response.error.statusCode,
399
+ body: _response.error.body,
400
+ rawResponse: _response.rawResponse,
401
+ });
402
+ }
403
+ }
404
+ switch (_response.error.reason) {
405
+ case "non-json":
406
+ throw new errors.ChrtError({
407
+ statusCode: _response.error.statusCode,
408
+ body: _response.error.rawBody,
409
+ rawResponse: _response.rawResponse,
410
+ });
411
+ case "timeout":
412
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /billing_new/invoices/line_item/remove/v1/{invoice_id}/{invoice_line_item_id}.");
413
+ case "unknown":
414
+ throw new errors.ChrtError({
415
+ message: _response.error.errorMessage,
416
+ rawResponse: _response.rawResponse,
417
+ });
418
+ }
419
+ });
420
+ }
421
+ /**
422
+ * Attaches existing line items to a draft invoice, moving them from any other draft invoices, and synchronizes all affected invoice totals and accounts. | authz: allowed_org_types=[provider], min_org_role=operator | (InvoiceLineItemsAddReq) -> (Invoice1)
423
+ *
424
+ * @param {string} invoiceId
425
+ * @param {Chrt.billingNew.InvoiceLineItemsAddReq} request
426
+ * @param {Invoices.RequestOptions} requestOptions - Request-specific configuration.
427
+ *
428
+ * @throws {@link Chrt.UnprocessableEntityError}
429
+ *
430
+ * @example
431
+ * await client.billingNew.invoices.addLineItemsV1("invoice_id", {
432
+ * invoice_line_item_ids: ["invoice_line_item_ids"]
433
+ * })
434
+ */
435
+ addLineItemsV1(invoiceId, request, requestOptions) {
436
+ return core.HttpResponsePromise.fromPromise(this.__addLineItemsV1(invoiceId, request, requestOptions));
437
+ }
438
+ __addLineItemsV1(invoiceId, request, requestOptions) {
439
+ return __awaiter(this, void 0, void 0, function* () {
440
+ var _a, _b, _c, _d;
441
+ 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);
442
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
443
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `billing_new/invoices/line_items/add/v1/${encodeURIComponent(invoiceId)}`),
444
+ method: "POST",
445
+ headers: _headers,
446
+ contentType: "application/json",
447
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
448
+ requestType: "json",
449
+ body: request,
450
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
451
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
452
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
453
+ });
454
+ if (_response.ok) {
455
+ return { data: _response.body, rawResponse: _response.rawResponse };
456
+ }
457
+ if (_response.error.reason === "status-code") {
458
+ switch (_response.error.statusCode) {
459
+ case 422:
460
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
461
+ default:
462
+ throw new errors.ChrtError({
463
+ statusCode: _response.error.statusCode,
464
+ body: _response.error.body,
465
+ rawResponse: _response.rawResponse,
466
+ });
467
+ }
468
+ }
469
+ switch (_response.error.reason) {
470
+ case "non-json":
471
+ throw new errors.ChrtError({
472
+ statusCode: _response.error.statusCode,
473
+ body: _response.error.rawBody,
474
+ rawResponse: _response.rawResponse,
475
+ });
476
+ case "timeout":
477
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /billing_new/invoices/line_items/add/v1/{invoice_id}.");
478
+ case "unknown":
479
+ throw new errors.ChrtError({
480
+ message: _response.error.errorMessage,
481
+ rawResponse: _response.rawResponse,
482
+ });
483
+ }
484
+ });
485
+ }
486
+ /**
487
+ * Detaches existing line items from a draft invoice and synchronizes derived invoice fields. | authz: allowed_org_types=[provider], min_org_role=operator | (InvoiceLineItemsRemoveReq) -> (Invoice1)
488
+ *
489
+ * @param {string} invoiceId
490
+ * @param {Chrt.billingNew.InvoiceLineItemsRemoveReq} request
491
+ * @param {Invoices.RequestOptions} requestOptions - Request-specific configuration.
492
+ *
493
+ * @throws {@link Chrt.UnprocessableEntityError}
494
+ *
495
+ * @example
496
+ * await client.billingNew.invoices.removeLineItemsV1("invoice_id", {
497
+ * invoice_line_item_ids: ["invoice_line_item_ids"]
498
+ * })
499
+ */
500
+ removeLineItemsV1(invoiceId, request, requestOptions) {
501
+ return core.HttpResponsePromise.fromPromise(this.__removeLineItemsV1(invoiceId, request, requestOptions));
502
+ }
503
+ __removeLineItemsV1(invoiceId, request, requestOptions) {
504
+ return __awaiter(this, void 0, void 0, function* () {
505
+ var _a, _b, _c, _d;
506
+ 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);
507
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
508
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `billing_new/invoices/line_items/remove/v1/${encodeURIComponent(invoiceId)}`),
509
+ method: "POST",
510
+ headers: _headers,
511
+ contentType: "application/json",
512
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
513
+ requestType: "json",
514
+ body: request,
515
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
516
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
517
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
518
+ });
519
+ if (_response.ok) {
520
+ return { data: _response.body, rawResponse: _response.rawResponse };
521
+ }
522
+ if (_response.error.reason === "status-code") {
523
+ switch (_response.error.statusCode) {
524
+ case 422:
525
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
526
+ default:
527
+ throw new errors.ChrtError({
528
+ statusCode: _response.error.statusCode,
529
+ body: _response.error.body,
530
+ rawResponse: _response.rawResponse,
531
+ });
532
+ }
533
+ }
534
+ switch (_response.error.reason) {
535
+ case "non-json":
536
+ throw new errors.ChrtError({
537
+ statusCode: _response.error.statusCode,
538
+ body: _response.error.rawBody,
539
+ rawResponse: _response.rawResponse,
540
+ });
541
+ case "timeout":
542
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /billing_new/invoices/line_items/remove/v1/{invoice_id}.");
543
+ case "unknown":
544
+ throw new errors.ChrtError({
545
+ message: _response.error.errorMessage,
546
+ rawResponse: _response.rawResponse,
547
+ });
548
+ }
549
+ });
550
+ }
551
+ /**
552
+ * Lists owner-scoped invoices with search, filtering, sorting, and pagination. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (InvoiceListRes)
553
+ *
554
+ * @param {Chrt.billingNew.InvoicesListV1Request} request
555
+ * @param {Invoices.RequestOptions} requestOptions - Request-specific configuration.
556
+ *
557
+ * @throws {@link Chrt.UnprocessableEntityError}
558
+ *
559
+ * @example
560
+ * await client.billingNew.invoices.listV1({
561
+ * search: "search",
562
+ * sort_by: "created_at_timestamp",
563
+ * sort_order: "asc",
564
+ * page: 1,
565
+ * page_size: 1,
566
+ * filter_counterparty_org_id: "filter_counterparty_org_id",
567
+ * filter_counterparty_off_chrt_org_data_id: "filter_counterparty_off_chrt_org_data_id",
568
+ * filter_counterparty_account_id: "filter_counterparty_account_id",
569
+ * filter_created_at_timestamp_gte: "2024-01-15T09:30:00Z",
570
+ * filter_created_at_timestamp_lte: "2024-01-15T09:30:00Z",
571
+ * filter_last_edited_at_timestamp_gte: "2024-01-15T09:30:00Z",
572
+ * filter_last_edited_at_timestamp_lte: "2024-01-15T09:30:00Z"
573
+ * })
574
+ */
575
+ listV1(request = {}, requestOptions) {
576
+ return core.HttpResponsePromise.fromPromise(this.__listV1(request, requestOptions));
577
+ }
578
+ __listV1() {
579
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
580
+ var _a, _b, _c, _d, _e, _f;
581
+ const { search, sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, filter_statuses: filterStatuses, filter_invoice_types: filterInvoiceTypes, filter_currency_codes: filterCurrencyCodes, filter_counterparty_org_id: filterCounterpartyOrgId, filter_counterparty_off_chrt_org_data_id: filterCounterpartyOffChrtOrgDataId, filter_counterparty_account_id: filterCounterpartyAccountId, 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;
582
+ const _queryParams = {};
583
+ if (search !== undefined) {
584
+ _queryParams["search"] = search;
585
+ }
586
+ if (sortBy !== undefined) {
587
+ _queryParams["sort_by"] = sortBy;
588
+ }
589
+ if (sortOrder !== undefined) {
590
+ _queryParams["sort_order"] = sortOrder;
591
+ }
592
+ if (page !== undefined) {
593
+ _queryParams["page"] = (_a = page === null || page === void 0 ? void 0 : page.toString()) !== null && _a !== void 0 ? _a : null;
594
+ }
595
+ if (pageSize !== undefined) {
596
+ _queryParams["page_size"] = (_b = pageSize === null || pageSize === void 0 ? void 0 : pageSize.toString()) !== null && _b !== void 0 ? _b : null;
597
+ }
598
+ if (filterStatuses !== undefined) {
599
+ if (Array.isArray(filterStatuses)) {
600
+ _queryParams["filter_statuses"] = filterStatuses.map((item) => item);
601
+ }
602
+ else {
603
+ _queryParams["filter_statuses"] = filterStatuses;
604
+ }
605
+ }
606
+ if (filterInvoiceTypes !== undefined) {
607
+ if (Array.isArray(filterInvoiceTypes)) {
608
+ _queryParams["filter_invoice_types"] = filterInvoiceTypes.map((item) => item);
609
+ }
610
+ else {
611
+ _queryParams["filter_invoice_types"] = filterInvoiceTypes;
612
+ }
613
+ }
614
+ if (filterCurrencyCodes !== undefined) {
615
+ if (Array.isArray(filterCurrencyCodes)) {
616
+ _queryParams["filter_currency_codes"] = filterCurrencyCodes.map((item) => item);
617
+ }
618
+ else {
619
+ _queryParams["filter_currency_codes"] = filterCurrencyCodes;
620
+ }
621
+ }
622
+ if (filterCounterpartyOrgId !== undefined) {
623
+ _queryParams["filter_counterparty_org_id"] = filterCounterpartyOrgId;
624
+ }
625
+ if (filterCounterpartyOffChrtOrgDataId !== undefined) {
626
+ _queryParams["filter_counterparty_off_chrt_org_data_id"] = filterCounterpartyOffChrtOrgDataId;
627
+ }
628
+ if (filterCounterpartyAccountId !== undefined) {
629
+ _queryParams["filter_counterparty_account_id"] = filterCounterpartyAccountId;
630
+ }
631
+ if (filterCreatedAtTimestampGte !== undefined) {
632
+ _queryParams["filter_created_at_timestamp_gte"] = filterCreatedAtTimestampGte;
633
+ }
634
+ if (filterCreatedAtTimestampLte !== undefined) {
635
+ _queryParams["filter_created_at_timestamp_lte"] = filterCreatedAtTimestampLte;
636
+ }
637
+ if (filterLastEditedAtTimestampGte !== undefined) {
638
+ _queryParams["filter_last_edited_at_timestamp_gte"] = filterLastEditedAtTimestampGte;
639
+ }
640
+ if (filterLastEditedAtTimestampLte !== undefined) {
641
+ _queryParams["filter_last_edited_at_timestamp_lte"] = filterLastEditedAtTimestampLte;
642
+ }
643
+ let _headers = (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
644
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
645
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ChrtEnvironment.Local, "billing_new/invoices/list/v1"),
646
+ method: "GET",
647
+ headers: _headers,
648
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
649
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
650
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
651
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
652
+ });
653
+ if (_response.ok) {
654
+ return { data: _response.body, rawResponse: _response.rawResponse };
655
+ }
656
+ if (_response.error.reason === "status-code") {
657
+ switch (_response.error.statusCode) {
658
+ case 422:
659
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
660
+ default:
661
+ throw new errors.ChrtError({
662
+ statusCode: _response.error.statusCode,
663
+ body: _response.error.body,
664
+ rawResponse: _response.rawResponse,
665
+ });
666
+ }
667
+ }
668
+ switch (_response.error.reason) {
669
+ case "non-json":
670
+ throw new errors.ChrtError({
671
+ statusCode: _response.error.statusCode,
672
+ body: _response.error.rawBody,
673
+ rawResponse: _response.rawResponse,
674
+ });
675
+ case "timeout":
676
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /billing_new/invoices/list/v1.");
677
+ case "unknown":
678
+ throw new errors.ChrtError({
679
+ message: _response.error.errorMessage,
680
+ rawResponse: _response.rawResponse,
681
+ });
682
+ }
683
+ });
684
+ }
685
+ /**
686
+ * Updates the name or description of a draft invoice owned by the caller's organization. | authz: allowed_org_types=[provider], min_org_role=operator | (InvoiceClientUpdate1) -> (bool)
687
+ *
688
+ * @param {string} invoiceId
689
+ * @param {Chrt.billingNew.InvoiceClientUpdate1} request
690
+ * @param {Invoices.RequestOptions} requestOptions - Request-specific configuration.
691
+ *
692
+ * @throws {@link Chrt.UnprocessableEntityError}
693
+ *
694
+ * @example
695
+ * await client.billingNew.invoices.updateV1("invoice_id")
696
+ */
697
+ updateV1(invoiceId, request = {}, requestOptions) {
698
+ return core.HttpResponsePromise.fromPromise(this.__updateV1(invoiceId, request, requestOptions));
699
+ }
700
+ __updateV1(invoiceId_1) {
701
+ return __awaiter(this, arguments, void 0, function* (invoiceId, request = {}, requestOptions) {
702
+ var _a, _b, _c, _d;
703
+ 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);
704
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
705
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `billing_new/invoices/update/v1/${encodeURIComponent(invoiceId)}`),
706
+ method: "PATCH",
707
+ headers: _headers,
708
+ contentType: "application/json",
709
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
710
+ requestType: "json",
711
+ body: request,
712
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
713
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
714
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
715
+ });
716
+ if (_response.ok) {
717
+ return { data: _response.body, rawResponse: _response.rawResponse };
718
+ }
719
+ if (_response.error.reason === "status-code") {
720
+ switch (_response.error.statusCode) {
721
+ case 422:
722
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
723
+ default:
724
+ throw new errors.ChrtError({
725
+ statusCode: _response.error.statusCode,
726
+ body: _response.error.body,
727
+ rawResponse: _response.rawResponse,
728
+ });
729
+ }
730
+ }
731
+ switch (_response.error.reason) {
732
+ case "non-json":
733
+ throw new errors.ChrtError({
734
+ statusCode: _response.error.statusCode,
735
+ body: _response.error.rawBody,
736
+ rawResponse: _response.rawResponse,
737
+ });
738
+ case "timeout":
739
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /billing_new/invoices/update/v1/{invoice_id}.");
740
+ case "unknown":
741
+ throw new errors.ChrtError({
742
+ message: _response.error.errorMessage,
743
+ rawResponse: _response.rawResponse,
744
+ });
745
+ }
746
+ });
747
+ }
748
+ /**
749
+ * Retrieves an invoice owned by the caller's organization. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (Invoice1)
750
+ *
751
+ * @param {string} invoiceId
752
+ * @param {Invoices.RequestOptions} requestOptions - Request-specific configuration.
753
+ *
754
+ * @throws {@link Chrt.UnprocessableEntityError}
755
+ *
756
+ * @example
757
+ * await client.billingNew.invoices.getV1("invoice_id")
758
+ */
759
+ getV1(invoiceId, requestOptions) {
760
+ return core.HttpResponsePromise.fromPromise(this.__getV1(invoiceId, requestOptions));
761
+ }
762
+ __getV1(invoiceId, requestOptions) {
763
+ return __awaiter(this, void 0, void 0, function* () {
764
+ var _a, _b, _c, _d;
765
+ 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);
766
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
767
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `billing_new/invoices/v1/${encodeURIComponent(invoiceId)}`),
768
+ method: "GET",
769
+ headers: _headers,
770
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
771
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
772
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
773
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
774
+ });
775
+ if (_response.ok) {
776
+ return { data: _response.body, rawResponse: _response.rawResponse };
777
+ }
778
+ if (_response.error.reason === "status-code") {
779
+ switch (_response.error.statusCode) {
780
+ case 422:
781
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
782
+ default:
783
+ throw new errors.ChrtError({
784
+ statusCode: _response.error.statusCode,
785
+ body: _response.error.body,
786
+ rawResponse: _response.rawResponse,
787
+ });
788
+ }
789
+ }
790
+ switch (_response.error.reason) {
791
+ case "non-json":
792
+ throw new errors.ChrtError({
793
+ statusCode: _response.error.statusCode,
794
+ body: _response.error.rawBody,
795
+ rawResponse: _response.rawResponse,
796
+ });
797
+ case "timeout":
798
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /billing_new/invoices/v1/{invoice_id}.");
799
+ case "unknown":
800
+ throw new errors.ChrtError({
801
+ message: _response.error.errorMessage,
802
+ rawResponse: _response.rawResponse,
803
+ });
804
+ }
805
+ });
806
+ }
807
+ /**
808
+ * Voids a draft or approved invoice owned by the caller's organization. | authz: allowed_org_types=[provider], min_org_role=operator | (InvoiceVoidReq) -> (Invoice1)
809
+ *
810
+ * @param {string} invoiceId
811
+ * @param {Chrt.billingNew.InvoiceVoidReq} request
812
+ * @param {Invoices.RequestOptions} requestOptions - Request-specific configuration.
813
+ *
814
+ * @throws {@link Chrt.UnprocessableEntityError}
815
+ *
816
+ * @example
817
+ * await client.billingNew.invoices.voidV1("invoice_id")
818
+ */
819
+ voidV1(invoiceId, request = {}, requestOptions) {
820
+ return core.HttpResponsePromise.fromPromise(this.__voidV1(invoiceId, request, requestOptions));
821
+ }
822
+ __voidV1(invoiceId_1) {
823
+ return __awaiter(this, arguments, void 0, function* (invoiceId, request = {}, requestOptions) {
824
+ var _a, _b, _c, _d;
825
+ 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);
826
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
827
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `billing_new/invoices/void/v1/${encodeURIComponent(invoiceId)}`),
828
+ method: "PATCH",
829
+ headers: _headers,
830
+ contentType: "application/json",
831
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
832
+ requestType: "json",
833
+ body: request,
834
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
835
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
836
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
837
+ });
838
+ if (_response.ok) {
839
+ return { data: _response.body, rawResponse: _response.rawResponse };
840
+ }
841
+ if (_response.error.reason === "status-code") {
842
+ switch (_response.error.statusCode) {
843
+ case 422:
844
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
845
+ default:
846
+ throw new errors.ChrtError({
847
+ statusCode: _response.error.statusCode,
848
+ body: _response.error.body,
849
+ rawResponse: _response.rawResponse,
850
+ });
851
+ }
852
+ }
853
+ switch (_response.error.reason) {
854
+ case "non-json":
855
+ throw new errors.ChrtError({
856
+ statusCode: _response.error.statusCode,
857
+ body: _response.error.rawBody,
858
+ rawResponse: _response.rawResponse,
859
+ });
860
+ case "timeout":
861
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /billing_new/invoices/void/v1/{invoice_id}.");
862
+ case "unknown":
863
+ throw new errors.ChrtError({
864
+ message: _response.error.errorMessage,
865
+ rawResponse: _response.rawResponse,
866
+ });
867
+ }
868
+ });
869
+ }
870
+ _getAuthorizationHeader() {
871
+ return __awaiter(this, void 0, void 0, function* () {
872
+ const bearer = yield core.Supplier.get(this._options.token);
873
+ if (bearer != null) {
874
+ return `Bearer ${bearer}`;
875
+ }
876
+ return undefined;
877
+ });
878
+ }
879
+ }
880
+ exports.Invoices = Invoices;