@chrt-inc/typescript-sdk 1.998.0 → 1.1000.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/billingNew/client/Client.d.ts +3 -0
- package/dist/cjs/api/resources/billingNew/client/Client.js +5 -0
- package/dist/cjs/api/resources/billingNew/resources/billingPeriods/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/billingNew/resources/billingPeriods/client/Client.js +1 -1
- package/dist/cjs/api/resources/billingNew/resources/chrtGroundProviderRates/client/requests/ChrtGroundProviderRatesClientCreate1.d.ts +0 -3
- package/dist/cjs/api/resources/billingNew/resources/chrtGroundProviderRates/client/requests/ChrtGroundProviderRatesClientUpdate1.d.ts +0 -6
- package/dist/cjs/api/resources/billingNew/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/billingNew/resources/index.js +3 -1
- package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/Client.d.ts +17 -73
- package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/Client.js +50 -193
- package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/{resources/export/client → client}/requests/InvoiceLineItemExportListReq.d.ts +1 -0
- package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/requests/index.d.ts +1 -3
- package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/index.d.ts +0 -1
- package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/index.js +0 -1
- package/dist/cjs/api/resources/billingNew/resources/invoices/client/Client.d.ts +57 -32
- package/dist/cjs/api/resources/billingNew/resources/invoices/client/Client.js +169 -89
- package/dist/cjs/api/resources/billingNew/resources/invoices/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/billingNew/resources/orders/client/Client.d.ts +30 -3
- package/dist/cjs/api/resources/billingNew/resources/orders/client/Client.js +137 -6
- package/dist/cjs/api/resources/billingNew/resources/orders/client/requests/OrderBillingExpandedListReq.d.ts +7 -1
- package/dist/cjs/api/resources/billingNew/resources/orders/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/billingNew/resources/orders/index.d.ts +0 -1
- package/dist/cjs/api/resources/billingNew/resources/orders/index.js +0 -1
- package/dist/cjs/api/resources/billingNew/resources/taxConfigurations/client/Client.d.ts +128 -0
- package/dist/cjs/api/resources/billingNew/resources/taxConfigurations/client/Client.js +485 -0
- package/dist/cjs/api/resources/billingNew/resources/taxConfigurations/client/requests/TaxConfigurationClientCreate1.d.ts +21 -0
- package/dist/cjs/api/resources/billingNew/resources/taxConfigurations/client/requests/TaxConfigurationClientUpdate1.d.ts +12 -0
- package/dist/cjs/api/resources/billingNew/resources/taxConfigurations/client/requests/TaxConfigurationResolveReq.d.ts +14 -0
- package/dist/cjs/api/resources/billingNew/resources/taxConfigurations/client/requests/TaxConfigurationsListV1Request.d.ts +33 -0
- package/dist/cjs/api/resources/billingNew/resources/taxConfigurations/client/requests/index.d.ts +4 -0
- package/dist/cjs/api/resources/flights/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/flights/client/Client.js +1 -1
- package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/Client.d.ts +4 -0
- package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/Client.js +22 -2
- package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForProviderOperatorsV1Request.d.ts +6 -0
- package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForShipperOperatorsV1Request.d.ts +6 -0
- package/dist/cjs/api/types/BillingCurrencyCodeEnum1.d.ts +1 -2
- package/dist/cjs/api/types/BillingCurrencyCodeEnum1.js +0 -1
- package/dist/cjs/api/types/BillingPeriodCloseRes.d.ts +8 -0
- package/dist/cjs/api/types/CalculatedInvoiceTax1.d.ts +12 -0
- package/dist/cjs/api/types/ChrtGroundProviderRates1.d.ts +0 -3
- package/dist/cjs/api/types/{CreateInvoiceLineItemsFromAwbCostsInvoiceRes1.d.ts → CreateInvoiceLineItemsFromAwbCostsGroupRes1.d.ts} +2 -2
- package/dist/cjs/api/types/CreateInvoiceLineItemsFromAwbCostsRes.d.ts +1 -1
- package/dist/cjs/api/{resources/billingNew/resources/invoices/client/requests → types}/InvoiceClientCreate1.d.ts +1 -9
- package/dist/cjs/api/types/InvoiceCreateFromOrdersReq.d.ts +22 -0
- package/dist/cjs/api/types/InvoiceCreateFromOrdersRes.d.ts +14 -0
- package/dist/cjs/api/types/InvoiceCreateFromOrdersRes.js +5 -0
- package/dist/cjs/api/types/InvoiceCreateReq.d.ts +20 -0
- package/dist/cjs/api/types/InvoiceCreateReq.js +5 -0
- package/dist/cjs/api/types/InvoiceLineItem1.d.ts +1 -0
- package/dist/cjs/api/types/InvoiceLineItemExportListItem.d.ts +4 -2
- package/dist/cjs/api/types/InvoiceLineItemTypeEnum1.d.ts +2 -4
- package/dist/cjs/api/types/InvoiceLineItemTypeEnum1.js +1 -3
- package/dist/cjs/api/types/InvoicePreviewFromOrdersRes.d.ts +15 -0
- package/dist/cjs/api/types/InvoicePreviewFromOrdersRes.js +5 -0
- package/dist/cjs/api/types/InvoicePreviewRes.d.ts +10 -0
- package/dist/cjs/api/types/InvoicePreviewRes.js +5 -0
- package/dist/cjs/api/types/InvoiceTaxCalculation1.d.ts +12 -0
- package/dist/cjs/api/types/InvoiceTaxCalculation1.js +5 -0
- package/dist/cjs/api/types/Order1.d.ts +1 -0
- package/dist/cjs/api/types/OrderBillingExpandedListItem1.d.ts +7 -0
- package/dist/cjs/api/types/OrderBillingSortByEnum.d.ts +2 -1
- package/dist/cjs/api/types/OrderBillingSortByEnum.js +1 -0
- package/dist/cjs/api/types/OrderLimitedForProvider1.d.ts +1 -0
- package/dist/cjs/api/types/OrderLimitedForShipper1.d.ts +1 -0
- package/dist/cjs/api/types/OrderSortByEnum.d.ts +2 -1
- package/dist/cjs/api/types/OrderSortByEnum.js +1 -0
- package/dist/cjs/api/types/TaxConfiguration1.d.ts +24 -0
- package/dist/cjs/api/types/TaxConfiguration1.js +5 -0
- package/dist/cjs/api/types/TaxConfigurationListRes.d.ts +8 -0
- package/dist/cjs/api/types/TaxConfigurationListRes.js +5 -0
- package/dist/cjs/api/types/TaxConfigurationSortByEnum.d.ts +8 -0
- package/dist/cjs/api/types/TaxConfigurationSortByEnum.js +10 -0
- package/dist/cjs/api/types/{TaxRate1.d.ts → TaxRule1.d.ts} +2 -3
- package/dist/cjs/api/types/TaxRule1.js +5 -0
- package/dist/cjs/api/types/index.d.ts +14 -6
- package/dist/cjs/api/types/index.js +14 -6
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/billingNew/client/Client.d.mts +3 -0
- package/dist/esm/api/resources/billingNew/client/Client.mjs +5 -0
- package/dist/esm/api/resources/billingNew/resources/billingPeriods/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/billingNew/resources/billingPeriods/client/Client.mjs +1 -1
- package/dist/esm/api/resources/billingNew/resources/chrtGroundProviderRates/client/requests/ChrtGroundProviderRatesClientCreate1.d.mts +0 -3
- package/dist/esm/api/resources/billingNew/resources/chrtGroundProviderRates/client/requests/ChrtGroundProviderRatesClientUpdate1.d.mts +0 -6
- package/dist/esm/api/resources/billingNew/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/billingNew/resources/index.mjs +2 -0
- package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/Client.d.mts +17 -73
- package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/Client.mjs +50 -193
- package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/{resources/export/client → client}/requests/InvoiceLineItemExportListReq.d.mts +1 -0
- package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/index.d.mts +1 -3
- package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/index.d.mts +0 -1
- package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/index.mjs +0 -1
- package/dist/esm/api/resources/billingNew/resources/invoices/client/Client.d.mts +57 -32
- package/dist/esm/api/resources/billingNew/resources/invoices/client/Client.mjs +169 -89
- package/dist/esm/api/resources/billingNew/resources/invoices/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/billingNew/resources/orders/client/Client.d.mts +30 -3
- package/dist/esm/api/resources/billingNew/resources/orders/client/Client.mjs +137 -6
- package/dist/esm/api/resources/billingNew/resources/orders/client/requests/OrderBillingExpandedListReq.d.mts +7 -1
- package/dist/esm/api/resources/billingNew/resources/orders/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/billingNew/resources/orders/index.d.mts +0 -1
- package/dist/esm/api/resources/billingNew/resources/orders/index.mjs +0 -1
- package/dist/esm/api/resources/billingNew/resources/taxConfigurations/client/Client.d.mts +128 -0
- package/dist/esm/api/resources/billingNew/resources/taxConfigurations/client/Client.mjs +448 -0
- package/dist/esm/api/resources/billingNew/resources/taxConfigurations/client/requests/TaxConfigurationClientCreate1.d.mts +21 -0
- package/dist/esm/api/resources/billingNew/resources/taxConfigurations/client/requests/TaxConfigurationClientUpdate1.d.mts +12 -0
- package/dist/esm/api/resources/billingNew/resources/taxConfigurations/client/requests/TaxConfigurationResolveReq.d.mts +14 -0
- package/dist/esm/api/resources/billingNew/resources/taxConfigurations/client/requests/TaxConfigurationsListV1Request.d.mts +33 -0
- package/dist/esm/api/resources/billingNew/resources/taxConfigurations/client/requests/index.d.mts +4 -0
- package/dist/esm/api/resources/flights/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/flights/client/Client.mjs +1 -1
- package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/Client.d.mts +4 -0
- package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/Client.mjs +22 -2
- package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForProviderOperatorsV1Request.d.mts +6 -0
- package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForShipperOperatorsV1Request.d.mts +6 -0
- package/dist/esm/api/types/BillingCurrencyCodeEnum1.d.mts +1 -2
- package/dist/esm/api/types/BillingCurrencyCodeEnum1.mjs +0 -1
- package/dist/esm/api/types/BillingPeriodCloseRes.d.mts +8 -0
- package/dist/esm/api/types/CalculatedInvoiceTax1.d.mts +12 -0
- package/dist/esm/api/types/ChrtGroundProviderRates1.d.mts +0 -3
- package/dist/esm/api/types/{CreateInvoiceLineItemsFromAwbCostsInvoiceRes1.d.mts → CreateInvoiceLineItemsFromAwbCostsGroupRes1.d.mts} +2 -2
- package/dist/esm/api/types/CreateInvoiceLineItemsFromAwbCostsRes.d.mts +1 -1
- package/dist/esm/api/{resources/billingNew/resources/invoices/client/requests → types}/InvoiceClientCreate1.d.mts +1 -9
- package/dist/esm/api/types/InvoiceCreateFromOrdersReq.d.mts +22 -0
- package/dist/esm/api/types/InvoiceCreateFromOrdersRes.d.mts +14 -0
- package/dist/esm/api/types/InvoiceCreateFromOrdersRes.mjs +4 -0
- package/dist/esm/api/types/InvoiceCreateReq.d.mts +20 -0
- package/dist/esm/api/types/InvoiceCreateReq.mjs +4 -0
- package/dist/esm/api/types/InvoiceLineItem1.d.mts +1 -0
- package/dist/esm/api/types/InvoiceLineItemExportListItem.d.mts +4 -2
- package/dist/esm/api/types/InvoiceLineItemTypeEnum1.d.mts +2 -4
- package/dist/esm/api/types/InvoiceLineItemTypeEnum1.mjs +1 -3
- package/dist/esm/api/types/InvoicePreviewFromOrdersRes.d.mts +15 -0
- package/dist/esm/api/types/InvoicePreviewFromOrdersRes.mjs +4 -0
- package/dist/esm/api/types/InvoicePreviewRes.d.mts +10 -0
- package/dist/esm/api/types/InvoicePreviewRes.mjs +4 -0
- package/dist/esm/api/types/InvoiceTaxCalculation1.d.mts +12 -0
- package/dist/esm/api/types/InvoiceTaxCalculation1.mjs +4 -0
- package/dist/esm/api/types/Order1.d.mts +1 -0
- package/dist/esm/api/types/OrderBillingExpandedListItem1.d.mts +7 -0
- package/dist/esm/api/types/OrderBillingSortByEnum.d.mts +2 -1
- package/dist/esm/api/types/OrderBillingSortByEnum.mjs +1 -0
- package/dist/esm/api/types/OrderLimitedForProvider1.d.mts +1 -0
- package/dist/esm/api/types/OrderLimitedForShipper1.d.mts +1 -0
- package/dist/esm/api/types/OrderSortByEnum.d.mts +2 -1
- package/dist/esm/api/types/OrderSortByEnum.mjs +1 -0
- package/dist/esm/api/types/TaxConfiguration1.d.mts +24 -0
- package/dist/esm/api/types/TaxConfiguration1.mjs +4 -0
- package/dist/esm/api/types/TaxConfigurationListRes.d.mts +8 -0
- package/dist/esm/api/types/TaxConfigurationListRes.mjs +4 -0
- package/dist/esm/api/types/TaxConfigurationSortByEnum.d.mts +8 -0
- package/dist/esm/api/types/TaxConfigurationSortByEnum.mjs +7 -0
- package/dist/esm/api/types/{TaxRate1.d.mts → TaxRule1.d.mts} +2 -3
- package/dist/esm/api/types/TaxRule1.mjs +4 -0
- package/dist/esm/api/types/index.d.mts +14 -6
- package/dist/esm/api/types/index.mjs +14 -6
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +526 -219
- package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/requests/CreateInvoiceLineItemsFromAmountReq.d.ts +0 -32
- package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/requests/CreateInvoiceLineItemsFromLineItemsReq.d.ts +0 -46
- package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/requests/RecalculateOrderTaxInvoiceLineItemsReq.d.ts +0 -12
- package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/resources/export/client/Client.d.ts +0 -51
- package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/resources/export/client/Client.js +0 -153
- package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/resources/export/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/resources/index.d.ts +0 -2
- package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/resources/index.js +0 -41
- package/dist/cjs/api/resources/billingNew/resources/orders/resources/index.d.ts +0 -2
- package/dist/cjs/api/resources/billingNew/resources/orders/resources/index.js +0 -41
- package/dist/cjs/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/client/Client.d.ts +0 -49
- package/dist/cjs/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/client/Client.js +0 -135
- package/dist/cjs/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/client/index.d.ts +0 -2
- package/dist/cjs/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/client/index.js +0 -17
- package/dist/cjs/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/client/requests/index.js +0 -2
- package/dist/cjs/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/index.d.ts +0 -1
- package/dist/cjs/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/index.js +0 -17
- package/dist/cjs/api/types/CreateInvoiceLineItemsFromAmountRes.d.ts +0 -7
- package/dist/cjs/api/types/CreateInvoiceLineItemsFromLineItemsRes.d.ts +0 -7
- package/dist/cjs/api/types/InvoiceLineItemAmountTransformation1.d.ts +0 -8
- package/dist/cjs/api/types/InvoiceLineItemAmountTransformationTypeEnum1.d.ts +0 -9
- package/dist/cjs/api/types/InvoiceLineItemAmountTransformationTypeEnum1.js +0 -11
- package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/CreateInvoiceLineItemsFromAmountReq.d.mts +0 -32
- package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/CreateInvoiceLineItemsFromLineItemsReq.d.mts +0 -46
- package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/RecalculateOrderTaxInvoiceLineItemsReq.d.mts +0 -12
- package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/resources/export/client/Client.d.mts +0 -51
- package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/resources/export/client/Client.mjs +0 -116
- package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/resources/export/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/resources/index.d.mts +0 -2
- package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/resources/index.mjs +0 -2
- package/dist/esm/api/resources/billingNew/resources/orders/resources/index.d.mts +0 -2
- package/dist/esm/api/resources/billingNew/resources/orders/resources/index.mjs +0 -2
- package/dist/esm/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/client/Client.d.mts +0 -49
- package/dist/esm/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/client/Client.mjs +0 -98
- package/dist/esm/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/client/index.d.mts +0 -2
- package/dist/esm/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/client/index.mjs +0 -1
- package/dist/esm/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/client/requests/index.mjs +0 -1
- package/dist/esm/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/index.d.mts +0 -1
- package/dist/esm/api/resources/billingNew/resources/orders/resources/rateSheetLineItems/index.mjs +0 -1
- package/dist/esm/api/types/CreateInvoiceLineItemsFromAmountRes.d.mts +0 -7
- package/dist/esm/api/types/CreateInvoiceLineItemsFromLineItemsRes.d.mts +0 -7
- package/dist/esm/api/types/InvoiceLineItemAmountTransformation1.d.mts +0 -8
- package/dist/esm/api/types/InvoiceLineItemAmountTransformationTypeEnum1.d.mts +0 -9
- package/dist/esm/api/types/InvoiceLineItemAmountTransformationTypeEnum1.mjs +0 -8
- /package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/{resources/export/client → client}/requests/InvoiceLineItemExportListReq.js +0 -0
- /package/dist/cjs/api/resources/billingNew/resources/orders/{resources/rateSheetLineItems/client → client}/requests/OrderRateSheetLineItemsGenerateManyReq.d.ts +0 -0
- /package/dist/cjs/api/resources/billingNew/resources/orders/{resources/rateSheetLineItems/client → client}/requests/OrderRateSheetLineItemsGenerateManyReq.js +0 -0
- /package/dist/cjs/api/resources/billingNew/resources/{invoiceLineItems/resources/export → taxConfigurations}/client/index.d.ts +0 -0
- /package/dist/cjs/api/resources/billingNew/resources/{invoiceLineItems/resources/export → taxConfigurations}/client/index.js +0 -0
- /package/dist/cjs/api/resources/billingNew/resources/{invoiceLineItems/client/requests/CreateInvoiceLineItemsFromAmountReq.js → taxConfigurations/client/requests/TaxConfigurationClientCreate1.js} +0 -0
- /package/dist/cjs/api/resources/billingNew/resources/{invoiceLineItems/client/requests/CreateInvoiceLineItemsFromLineItemsReq.js → taxConfigurations/client/requests/TaxConfigurationClientUpdate1.js} +0 -0
- /package/dist/cjs/api/resources/billingNew/resources/{invoiceLineItems/client/requests/RecalculateOrderTaxInvoiceLineItemsReq.js → taxConfigurations/client/requests/TaxConfigurationResolveReq.js} +0 -0
- /package/dist/cjs/api/resources/billingNew/resources/{invoices/client/requests/InvoiceClientCreate1.js → taxConfigurations/client/requests/TaxConfigurationsListV1Request.js} +0 -0
- /package/dist/cjs/api/resources/billingNew/resources/{invoiceLineItems/resources/export → taxConfigurations}/client/requests/index.js +0 -0
- /package/dist/cjs/api/resources/billingNew/resources/{invoiceLineItems/resources/export → taxConfigurations}/index.d.ts +0 -0
- /package/dist/cjs/api/resources/billingNew/resources/{invoiceLineItems/resources/export → taxConfigurations}/index.js +0 -0
- /package/dist/cjs/api/types/{CreateInvoiceLineItemsFromAmountRes.js → BillingPeriodCloseRes.js} +0 -0
- /package/dist/cjs/api/types/{CreateInvoiceLineItemsFromAwbCostsInvoiceRes1.js → CalculatedInvoiceTax1.js} +0 -0
- /package/dist/cjs/api/types/{CreateInvoiceLineItemsFromLineItemsRes.js → CreateInvoiceLineItemsFromAwbCostsGroupRes1.js} +0 -0
- /package/dist/cjs/api/types/{InvoiceLineItemAmountTransformation1.js → InvoiceClientCreate1.js} +0 -0
- /package/dist/cjs/api/types/{TaxRate1.js → InvoiceCreateFromOrdersReq.js} +0 -0
- /package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/{resources/export/client → client}/requests/InvoiceLineItemExportListReq.mjs +0 -0
- /package/dist/esm/api/resources/billingNew/resources/orders/{resources/rateSheetLineItems/client → client}/requests/OrderRateSheetLineItemsGenerateManyReq.d.mts +0 -0
- /package/dist/esm/api/resources/billingNew/resources/orders/{resources/rateSheetLineItems/client → client}/requests/OrderRateSheetLineItemsGenerateManyReq.mjs +0 -0
- /package/dist/esm/api/resources/billingNew/resources/{invoiceLineItems/resources/export → taxConfigurations}/client/index.d.mts +0 -0
- /package/dist/esm/api/resources/billingNew/resources/{invoiceLineItems/resources/export → taxConfigurations}/client/index.mjs +0 -0
- /package/dist/esm/api/resources/billingNew/resources/{invoiceLineItems/client/requests/CreateInvoiceLineItemsFromAmountReq.mjs → taxConfigurations/client/requests/TaxConfigurationClientCreate1.mjs} +0 -0
- /package/dist/esm/api/resources/billingNew/resources/{invoiceLineItems/client/requests/CreateInvoiceLineItemsFromLineItemsReq.mjs → taxConfigurations/client/requests/TaxConfigurationClientUpdate1.mjs} +0 -0
- /package/dist/esm/api/resources/billingNew/resources/{invoiceLineItems/client/requests/RecalculateOrderTaxInvoiceLineItemsReq.mjs → taxConfigurations/client/requests/TaxConfigurationResolveReq.mjs} +0 -0
- /package/dist/esm/api/resources/billingNew/resources/{invoices/client/requests/InvoiceClientCreate1.mjs → taxConfigurations/client/requests/TaxConfigurationsListV1Request.mjs} +0 -0
- /package/dist/esm/api/resources/billingNew/resources/{invoiceLineItems/resources/export → taxConfigurations}/client/requests/index.mjs +0 -0
- /package/dist/esm/api/resources/billingNew/resources/{invoiceLineItems/resources/export → taxConfigurations}/index.d.mts +0 -0
- /package/dist/esm/api/resources/billingNew/resources/{invoiceLineItems/resources/export → taxConfigurations}/index.mjs +0 -0
- /package/dist/esm/api/types/{CreateInvoiceLineItemsFromAmountRes.mjs → BillingPeriodCloseRes.mjs} +0 -0
- /package/dist/esm/api/types/{CreateInvoiceLineItemsFromAwbCostsInvoiceRes1.mjs → CalculatedInvoiceTax1.mjs} +0 -0
- /package/dist/esm/api/types/{CreateInvoiceLineItemsFromLineItemsRes.mjs → CreateInvoiceLineItemsFromAwbCostsGroupRes1.mjs} +0 -0
- /package/dist/esm/api/types/{InvoiceLineItemAmountTransformation1.mjs → InvoiceClientCreate1.mjs} +0 -0
- /package/dist/esm/api/types/{TaxRate1.mjs → InvoiceCreateFromOrdersReq.mjs} +0 -0
|
@@ -10,22 +10,28 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11
11
|
});
|
|
12
12
|
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
13
24
|
import * as environments from "../../../../../../environments.mjs";
|
|
14
25
|
import * as core from "../../../../../../core/index.mjs";
|
|
15
26
|
import * as Chrt from "../../../../../index.mjs";
|
|
16
27
|
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers.mjs";
|
|
17
28
|
import * as errors from "../../../../../../errors/index.mjs";
|
|
18
|
-
import { Export } from "../resources/export/client/Client.mjs";
|
|
19
29
|
export class InvoiceLineItems {
|
|
20
30
|
constructor(_options = {}) {
|
|
21
31
|
this._options = _options;
|
|
22
32
|
}
|
|
23
|
-
get export() {
|
|
24
|
-
var _a;
|
|
25
|
-
return ((_a = this._export) !== null && _a !== void 0 ? _a : (this._export = new Export(this._options)));
|
|
26
|
-
}
|
|
27
33
|
/**
|
|
28
|
-
* Creates account-split ad-hoc line items
|
|
34
|
+
* Creates account-split ad-hoc line items without assigning invoices. | authz: allowed_org_types=[provider], min_org_role=operator | (AdHocInvoiceLineItemsReq) -> (list[InvoiceLineItem1])
|
|
29
35
|
*
|
|
30
36
|
* @param {Chrt.AdHocInvoiceLineItemsReq} request
|
|
31
37
|
* @param {InvoiceLineItems.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -300,77 +306,6 @@ export class InvoiceLineItems {
|
|
|
300
306
|
}
|
|
301
307
|
});
|
|
302
308
|
}
|
|
303
|
-
/**
|
|
304
|
-
* 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)
|
|
305
|
-
*
|
|
306
|
-
* @param {Chrt.billingNew.CreateInvoiceLineItemsFromAmountReq} request
|
|
307
|
-
* @param {InvoiceLineItems.RequestOptions} requestOptions - Request-specific configuration.
|
|
308
|
-
*
|
|
309
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
310
|
-
*
|
|
311
|
-
* @example
|
|
312
|
-
* await client.billingNew.invoiceLineItems.createFromAmountV1({
|
|
313
|
-
* amount: 1.1,
|
|
314
|
-
* currency_code: "USD",
|
|
315
|
-
* description: "description",
|
|
316
|
-
* invoice_type: "accounts_receivable",
|
|
317
|
-
* line_item_type: "base_rate"
|
|
318
|
-
* })
|
|
319
|
-
*/
|
|
320
|
-
createFromAmountV1(request, requestOptions) {
|
|
321
|
-
return core.HttpResponsePromise.fromPromise(this.__createFromAmountV1(request, requestOptions));
|
|
322
|
-
}
|
|
323
|
-
__createFromAmountV1(request, requestOptions) {
|
|
324
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
325
|
-
var _a, _b, _c, _d;
|
|
326
|
-
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
327
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
328
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "billing_new/invoice_line_items/create_from_amount/v1"),
|
|
329
|
-
method: "POST",
|
|
330
|
-
headers: _headers,
|
|
331
|
-
contentType: "application/json",
|
|
332
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
333
|
-
requestType: "json",
|
|
334
|
-
body: request,
|
|
335
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
336
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
337
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
338
|
-
});
|
|
339
|
-
if (_response.ok) {
|
|
340
|
-
return {
|
|
341
|
-
data: _response.body,
|
|
342
|
-
rawResponse: _response.rawResponse,
|
|
343
|
-
};
|
|
344
|
-
}
|
|
345
|
-
if (_response.error.reason === "status-code") {
|
|
346
|
-
switch (_response.error.statusCode) {
|
|
347
|
-
case 422:
|
|
348
|
-
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
349
|
-
default:
|
|
350
|
-
throw new errors.ChrtError({
|
|
351
|
-
statusCode: _response.error.statusCode,
|
|
352
|
-
body: _response.error.body,
|
|
353
|
-
rawResponse: _response.rawResponse,
|
|
354
|
-
});
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
switch (_response.error.reason) {
|
|
358
|
-
case "non-json":
|
|
359
|
-
throw new errors.ChrtError({
|
|
360
|
-
statusCode: _response.error.statusCode,
|
|
361
|
-
body: _response.error.rawBody,
|
|
362
|
-
rawResponse: _response.rawResponse,
|
|
363
|
-
});
|
|
364
|
-
case "timeout":
|
|
365
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /billing_new/invoice_line_items/create_from_amount/v1.");
|
|
366
|
-
case "unknown":
|
|
367
|
-
throw new errors.ChrtError({
|
|
368
|
-
message: _response.error.errorMessage,
|
|
369
|
-
rawResponse: _response.rawResponse,
|
|
370
|
-
});
|
|
371
|
-
}
|
|
372
|
-
});
|
|
373
|
-
}
|
|
374
309
|
/**
|
|
375
310
|
* Creates account-scoped airline payables from AWB costs; receivables remain rate-sheet-driven. | authz: allowed_org_types=[provider], min_org_role=operator | (CreateInvoiceLineItemsFromAwbCostsReq) -> (CreateInvoiceLineItemsFromAwbCostsRes)
|
|
376
311
|
*
|
|
@@ -443,49 +378,28 @@ export class InvoiceLineItems {
|
|
|
443
378
|
});
|
|
444
379
|
}
|
|
445
380
|
/**
|
|
446
|
-
*
|
|
381
|
+
* Deletes owner-scoped line items and rebuilds every affected draft invoice. | authz: allowed_org_types=[provider], min_org_role=operator | (InvoiceLineItemsDeleteManyReq) -> (InvoiceLineItemsDeleteManyRes)
|
|
447
382
|
*
|
|
448
|
-
* @param {Chrt.billingNew.
|
|
383
|
+
* @param {Chrt.billingNew.InvoiceLineItemsDeleteManyReq} request
|
|
449
384
|
* @param {InvoiceLineItems.RequestOptions} requestOptions - Request-specific configuration.
|
|
450
385
|
*
|
|
451
386
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
452
387
|
*
|
|
453
388
|
* @example
|
|
454
|
-
* await client.billingNew.invoiceLineItems.
|
|
455
|
-
*
|
|
456
|
-
* invoice_line_item_amount_transformation: {
|
|
457
|
-
* transformation_type: "percent",
|
|
458
|
-
* value: 1.1
|
|
459
|
-
* },
|
|
460
|
-
* invoice_type: "accounts_receivable",
|
|
461
|
-
* line_item_type: "base_rate",
|
|
462
|
-
* source_invoice_line_items: [{
|
|
463
|
-
* _id: "_id",
|
|
464
|
-
* created_at_timestamp: "2024-01-15T09:30:00Z",
|
|
465
|
-
* created_by_user_id: "created_by_user_id",
|
|
466
|
-
* currency_code: "USD",
|
|
467
|
-
* description: "description",
|
|
468
|
-
* invoice_type: "accounts_receivable",
|
|
469
|
-
* last_edited_at_timestamp: "2024-01-15T09:30:00Z",
|
|
470
|
-
* last_edited_by_user_id: "last_edited_by_user_id",
|
|
471
|
-
* line_item_type: "base_rate",
|
|
472
|
-
* owned_by_org_id: "owned_by_org_id",
|
|
473
|
-
* quantity: 1.1,
|
|
474
|
-
* schema_version: 1,
|
|
475
|
-
* unit_price: 1.1
|
|
476
|
-
* }]
|
|
389
|
+
* await client.billingNew.invoiceLineItems.deleteManyV1({
|
|
390
|
+
* invoice_line_item_ids: ["invoice_line_item_ids"]
|
|
477
391
|
* })
|
|
478
392
|
*/
|
|
479
|
-
|
|
480
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
393
|
+
deleteManyV1(request, requestOptions) {
|
|
394
|
+
return core.HttpResponsePromise.fromPromise(this.__deleteManyV1(request, requestOptions));
|
|
481
395
|
}
|
|
482
|
-
|
|
396
|
+
__deleteManyV1(request, requestOptions) {
|
|
483
397
|
return __awaiter(this, void 0, void 0, function* () {
|
|
484
398
|
var _a, _b, _c, _d;
|
|
485
399
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
486
400
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
487
|
-
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/
|
|
488
|
-
method: "
|
|
401
|
+
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"),
|
|
402
|
+
method: "DELETE",
|
|
489
403
|
headers: _headers,
|
|
490
404
|
contentType: "application/json",
|
|
491
405
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -496,10 +410,7 @@ export class InvoiceLineItems {
|
|
|
496
410
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
497
411
|
});
|
|
498
412
|
if (_response.ok) {
|
|
499
|
-
return {
|
|
500
|
-
data: _response.body,
|
|
501
|
-
rawResponse: _response.rawResponse,
|
|
502
|
-
};
|
|
413
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
503
414
|
}
|
|
504
415
|
if (_response.error.reason === "status-code") {
|
|
505
416
|
switch (_response.error.statusCode) {
|
|
@@ -521,7 +432,7 @@ export class InvoiceLineItems {
|
|
|
521
432
|
rawResponse: _response.rawResponse,
|
|
522
433
|
});
|
|
523
434
|
case "timeout":
|
|
524
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling
|
|
435
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /billing_new/invoice_line_items/delete_many/v1.");
|
|
525
436
|
case "unknown":
|
|
526
437
|
throw new errors.ChrtError({
|
|
527
438
|
message: _response.error.errorMessage,
|
|
@@ -531,33 +442,43 @@ export class InvoiceLineItems {
|
|
|
531
442
|
});
|
|
532
443
|
}
|
|
533
444
|
/**
|
|
534
|
-
*
|
|
445
|
+
* Lists up to 1,000 accounts-receivable and accounts-payable line items for the selected Orders, with shipment context and optional estimated taxes for uninvoiced charges (included by default). | authz: allowed_org_types=[provider], min_org_role=operator | (InvoiceLineItemExportListReq) -> (InvoiceLineItemExportListRes)
|
|
535
446
|
*
|
|
536
|
-
* @param {Chrt.billingNew.
|
|
447
|
+
* @param {Chrt.billingNew.InvoiceLineItemExportListReq} request
|
|
537
448
|
* @param {InvoiceLineItems.RequestOptions} requestOptions - Request-specific configuration.
|
|
538
449
|
*
|
|
539
450
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
540
451
|
*
|
|
541
452
|
* @example
|
|
542
|
-
* await client.billingNew.invoiceLineItems.
|
|
543
|
-
*
|
|
453
|
+
* await client.billingNew.invoiceLineItems.listExportV1({
|
|
454
|
+
* page: 1,
|
|
455
|
+
* page_size: 1,
|
|
456
|
+
* order_ids: ["order_ids"]
|
|
544
457
|
* })
|
|
545
458
|
*/
|
|
546
|
-
|
|
547
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
459
|
+
listExportV1(request, requestOptions) {
|
|
460
|
+
return core.HttpResponsePromise.fromPromise(this.__listExportV1(request, requestOptions));
|
|
548
461
|
}
|
|
549
|
-
|
|
462
|
+
__listExportV1(request, requestOptions) {
|
|
550
463
|
return __awaiter(this, void 0, void 0, function* () {
|
|
551
|
-
var _a, _b, _c, _d;
|
|
552
|
-
|
|
553
|
-
const
|
|
554
|
-
|
|
555
|
-
|
|
464
|
+
var _a, _b, _c, _d, _e, _f;
|
|
465
|
+
const { page, page_size: pageSize } = request, _body = __rest(request, ["page", "page_size"]);
|
|
466
|
+
const _queryParams = {};
|
|
467
|
+
if (page !== undefined) {
|
|
468
|
+
_queryParams["page"] = (_a = page === null || page === void 0 ? void 0 : page.toString()) !== null && _a !== void 0 ? _a : null;
|
|
469
|
+
}
|
|
470
|
+
if (pageSize !== undefined) {
|
|
471
|
+
_queryParams["page_size"] = (_b = pageSize === null || pageSize === void 0 ? void 0 : pageSize.toString()) !== null && _b !== void 0 ? _b : null;
|
|
472
|
+
}
|
|
473
|
+
let _headers = mergeHeaders((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
474
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
475
|
+
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/invoice_line_items/export/list/v1"),
|
|
476
|
+
method: "POST",
|
|
556
477
|
headers: _headers,
|
|
557
478
|
contentType: "application/json",
|
|
558
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
479
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
559
480
|
requestType: "json",
|
|
560
|
-
body:
|
|
481
|
+
body: _body,
|
|
561
482
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
562
483
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
563
484
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -585,7 +506,7 @@ export class InvoiceLineItems {
|
|
|
585
506
|
rawResponse: _response.rawResponse,
|
|
586
507
|
});
|
|
587
508
|
case "timeout":
|
|
588
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling
|
|
509
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /billing_new/invoice_line_items/export/list/v1.");
|
|
589
510
|
case "unknown":
|
|
590
511
|
throw new errors.ChrtError({
|
|
591
512
|
message: _response.error.errorMessage,
|
|
@@ -595,7 +516,7 @@ export class InvoiceLineItems {
|
|
|
595
516
|
});
|
|
596
517
|
}
|
|
597
518
|
/**
|
|
598
|
-
* Creates rate-sheet-derived line items
|
|
519
|
+
* Creates rate-sheet-derived line items without assigning invoices. | authz: allowed_org_types=[provider], min_org_role=operator | authz_personas=[task_group_coordinator_operators] | (InvoiceLineItemsFromChrtGroundProviderRateSheetsReq) -> (list[InvoiceLineItem1])
|
|
599
520
|
*
|
|
600
521
|
* @param {Chrt.InvoiceLineItemsFromChrtGroundProviderRateSheetsReq} request
|
|
601
522
|
* @param {InvoiceLineItems.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -893,70 +814,6 @@ export class InvoiceLineItems {
|
|
|
893
814
|
}
|
|
894
815
|
});
|
|
895
816
|
}
|
|
896
|
-
/**
|
|
897
|
-
* Recalculates existing tax line items from current non-tax items in the same billing scope. | authz: allowed_org_types=[provider], min_org_role=operator | (RecalculateOrderTaxInvoiceLineItemsReq) -> (list[InvoiceLineItem1])
|
|
898
|
-
*
|
|
899
|
-
* @param {Chrt.billingNew.RecalculateOrderTaxInvoiceLineItemsReq} request
|
|
900
|
-
* @param {InvoiceLineItems.RequestOptions} requestOptions - Request-specific configuration.
|
|
901
|
-
*
|
|
902
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
903
|
-
*
|
|
904
|
-
* @example
|
|
905
|
-
* await client.billingNew.invoiceLineItems.recalculateTaxesV1({
|
|
906
|
-
* order_id: "order_id"
|
|
907
|
-
* })
|
|
908
|
-
*/
|
|
909
|
-
recalculateTaxesV1(request, requestOptions) {
|
|
910
|
-
return core.HttpResponsePromise.fromPromise(this.__recalculateTaxesV1(request, requestOptions));
|
|
911
|
-
}
|
|
912
|
-
__recalculateTaxesV1(request, requestOptions) {
|
|
913
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
914
|
-
var _a, _b, _c, _d;
|
|
915
|
-
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
916
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
917
|
-
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/recalculate_taxes/v1"),
|
|
918
|
-
method: "POST",
|
|
919
|
-
headers: _headers,
|
|
920
|
-
contentType: "application/json",
|
|
921
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
922
|
-
requestType: "json",
|
|
923
|
-
body: request,
|
|
924
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
925
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
926
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
927
|
-
});
|
|
928
|
-
if (_response.ok) {
|
|
929
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
930
|
-
}
|
|
931
|
-
if (_response.error.reason === "status-code") {
|
|
932
|
-
switch (_response.error.statusCode) {
|
|
933
|
-
case 422:
|
|
934
|
-
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
935
|
-
default:
|
|
936
|
-
throw new errors.ChrtError({
|
|
937
|
-
statusCode: _response.error.statusCode,
|
|
938
|
-
body: _response.error.body,
|
|
939
|
-
rawResponse: _response.rawResponse,
|
|
940
|
-
});
|
|
941
|
-
}
|
|
942
|
-
}
|
|
943
|
-
switch (_response.error.reason) {
|
|
944
|
-
case "non-json":
|
|
945
|
-
throw new errors.ChrtError({
|
|
946
|
-
statusCode: _response.error.statusCode,
|
|
947
|
-
body: _response.error.rawBody,
|
|
948
|
-
rawResponse: _response.rawResponse,
|
|
949
|
-
});
|
|
950
|
-
case "timeout":
|
|
951
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /billing_new/invoice_line_items/recalculate_taxes/v1.");
|
|
952
|
-
case "unknown":
|
|
953
|
-
throw new errors.ChrtError({
|
|
954
|
-
message: _response.error.errorMessage,
|
|
955
|
-
rawResponse: _response.rawResponse,
|
|
956
|
-
});
|
|
957
|
-
}
|
|
958
|
-
});
|
|
959
|
-
}
|
|
960
817
|
/**
|
|
961
818
|
* Applies one currency conversion independently to each selected order and reports each outcome. | authz: allowed_org_types=[provider], min_org_role=operator | (ReceivablesAcrossOrdersCurrencyConversionUpdateReq) -> (list[ReceivablesAcrossOrdersCurrencyConversionOrderRes])
|
|
962
819
|
*
|
|
@@ -1026,7 +883,7 @@ export class InvoiceLineItems {
|
|
|
1026
883
|
});
|
|
1027
884
|
}
|
|
1028
885
|
/**
|
|
1029
|
-
*
|
|
886
|
+
* Converts uninvoiced charges or updates exchange rates within their draft invoice currency. | authz: allowed_org_types=[provider], min_org_role=operator | (InvoiceLineItemsCurrencyConversionUpdateManyReq) -> (list[InvoiceLineItem1])
|
|
1030
887
|
*
|
|
1031
888
|
* @param {Chrt.billingNew.InvoiceLineItemsCurrencyConversionUpdateManyReq} request
|
|
1032
889
|
* @param {InvoiceLineItems.RequestOptions} requestOptions - Request-specific configuration.
|
package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/index.d.mts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
export { type InvoiceLineItemsApproveManyReq } from "./InvoiceLineItemsApproveManyReq.mjs";
|
|
2
|
-
export { type CreateInvoiceLineItemsFromAmountReq } from "./CreateInvoiceLineItemsFromAmountReq.mjs";
|
|
3
2
|
export { type CreateInvoiceLineItemsFromAwbCostsReq } from "./CreateInvoiceLineItemsFromAwbCostsReq.mjs";
|
|
4
|
-
export { type CreateInvoiceLineItemsFromLineItemsReq } from "./CreateInvoiceLineItemsFromLineItemsReq.mjs";
|
|
5
3
|
export { type InvoiceLineItemsDeleteManyReq } from "./InvoiceLineItemsDeleteManyReq.mjs";
|
|
4
|
+
export { type InvoiceLineItemExportListReq } from "./InvoiceLineItemExportListReq.mjs";
|
|
6
5
|
export { type InvoiceLineItemsListV1Request } from "./InvoiceLineItemsListV1Request.mjs";
|
|
7
|
-
export { type RecalculateOrderTaxInvoiceLineItemsReq } from "./RecalculateOrderTaxInvoiceLineItemsReq.mjs";
|
|
8
6
|
export { type ReceivablesAcrossOrdersCurrencyConversionUpdateReq } from "./ReceivablesAcrossOrdersCurrencyConversionUpdateReq.mjs";
|
|
9
7
|
export { type InvoiceLineItemsCurrencyConversionUpdateManyReq } from "./InvoiceLineItemsCurrencyConversionUpdateManyReq.mjs";
|
|
10
8
|
export { type InvoiceLineItemClientUpdate1 } from "./InvoiceLineItemClientUpdate1.mjs";
|
|
@@ -44,9 +44,9 @@ export declare class Invoices {
|
|
|
44
44
|
approveV1(invoiceId: string, requestOptions?: Invoices.RequestOptions): core.HttpResponsePromise<Chrt.Invoice1>;
|
|
45
45
|
private __approveV1;
|
|
46
46
|
/**
|
|
47
|
-
*
|
|
47
|
+
* Creates a new draft invoice, optionally attaching selected uninvoiced charges atomically. Omitted dates derive from completed deliveries; empty drafts and charges without completed delivery dates require explicit bounds. | authz: allowed_org_types=[provider], min_org_role=operator | (InvoiceCreateReq) -> (PydanticObjectId)
|
|
48
48
|
*
|
|
49
|
-
* @param {Chrt.
|
|
49
|
+
* @param {Chrt.InvoiceCreateReq} request
|
|
50
50
|
* @param {Invoices.RequestOptions} requestOptions - Request-specific configuration.
|
|
51
51
|
*
|
|
52
52
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
@@ -58,64 +58,54 @@ export declare class Invoices {
|
|
|
58
58
|
* schema_version: 1
|
|
59
59
|
* })
|
|
60
60
|
*/
|
|
61
|
-
createV1(request: Chrt.
|
|
61
|
+
createV1(request: Chrt.InvoiceCreateReq, requestOptions?: Invoices.RequestOptions): core.HttpResponsePromise<string>;
|
|
62
62
|
private __createV1;
|
|
63
63
|
/**
|
|
64
|
-
*
|
|
64
|
+
* Creates one draft from matching order charges and reports skipped items. Billing period dates do not filter charges. | authz: allowed_org_types=[provider], min_org_role=operator | (InvoiceCreateFromOrdersReq) -> (InvoiceCreateFromOrdersRes)
|
|
65
65
|
*
|
|
66
|
-
* @param {
|
|
66
|
+
* @param {Chrt.InvoiceCreateFromOrdersReq} request
|
|
67
67
|
* @param {Invoices.RequestOptions} requestOptions - Request-specific configuration.
|
|
68
68
|
*
|
|
69
69
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
70
70
|
*
|
|
71
71
|
* @example
|
|
72
|
-
* await client.billingNew.invoices.
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
* @param {string} invoiceId
|
|
80
|
-
* @param {Invoices.RequestOptions} requestOptions - Request-specific configuration.
|
|
81
|
-
*
|
|
82
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
83
|
-
*
|
|
84
|
-
* @example
|
|
85
|
-
* await client.billingNew.invoices.getExpandedV1("invoice_id")
|
|
72
|
+
* await client.billingNew.invoices.createFromOrdersV1({
|
|
73
|
+
* currency_code: "USD",
|
|
74
|
+
* invoice_type: "accounts_receivable",
|
|
75
|
+
* order_ids: ["order_ids"],
|
|
76
|
+
* schema_version: 1
|
|
77
|
+
* })
|
|
86
78
|
*/
|
|
87
|
-
|
|
88
|
-
private
|
|
79
|
+
createFromOrdersV1(request: Chrt.InvoiceCreateFromOrdersReq, requestOptions?: Invoices.RequestOptions): core.HttpResponsePromise<Chrt.InvoiceCreateFromOrdersRes>;
|
|
80
|
+
private __createFromOrdersV1;
|
|
89
81
|
/**
|
|
90
|
-
*
|
|
82
|
+
* Hard-deletes a draft invoice and detaches its line items. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (bool)
|
|
91
83
|
*
|
|
92
84
|
* @param {string} invoiceId
|
|
93
|
-
* @param {string} invoiceLineItemId
|
|
94
85
|
* @param {Invoices.RequestOptions} requestOptions - Request-specific configuration.
|
|
95
86
|
*
|
|
96
87
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
97
88
|
*
|
|
98
89
|
* @example
|
|
99
|
-
* await client.billingNew.invoices.
|
|
90
|
+
* await client.billingNew.invoices.deleteV1("invoice_id")
|
|
100
91
|
*/
|
|
101
|
-
|
|
102
|
-
private
|
|
92
|
+
deleteV1(invoiceId: string, requestOptions?: Invoices.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
93
|
+
private __deleteV1;
|
|
103
94
|
/**
|
|
104
|
-
*
|
|
95
|
+
* Retrieves an owner-scoped invoice with line-item orders, counterparties, and accounts expanded. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (InvoiceExpandedRes)
|
|
105
96
|
*
|
|
106
97
|
* @param {string} invoiceId
|
|
107
|
-
* @param {string} invoiceLineItemId
|
|
108
98
|
* @param {Invoices.RequestOptions} requestOptions - Request-specific configuration.
|
|
109
99
|
*
|
|
110
100
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
111
101
|
*
|
|
112
102
|
* @example
|
|
113
|
-
* await client.billingNew.invoices.
|
|
103
|
+
* await client.billingNew.invoices.getExpandedV1("invoice_id")
|
|
114
104
|
*/
|
|
115
|
-
|
|
116
|
-
private
|
|
105
|
+
getExpandedV1(invoiceId: string, requestOptions?: Invoices.RequestOptions): core.HttpResponsePromise<Chrt.InvoiceExpandedRes>;
|
|
106
|
+
private __getExpandedV1;
|
|
117
107
|
/**
|
|
118
|
-
* Attaches
|
|
108
|
+
* Attaches uninvoiced line items to a draft invoice and refreshes its totals and accounts. | authz: allowed_org_types=[provider], min_org_role=operator | (InvoiceLineItemsAddReq) -> (Invoice1)
|
|
119
109
|
*
|
|
120
110
|
* @param {string} invoiceId
|
|
121
111
|
* @param {Chrt.billingNew.InvoiceLineItemsAddReq} request
|
|
@@ -176,6 +166,41 @@ export declare class Invoices {
|
|
|
176
166
|
*/
|
|
177
167
|
listV1(request?: Chrt.billingNew.InvoicesListV1Request, requestOptions?: Invoices.RequestOptions): core.HttpResponsePromise<Chrt.InvoiceListRes>;
|
|
178
168
|
private __listV1;
|
|
169
|
+
/**
|
|
170
|
+
* Previews exact uninvoiced charges, current resolved taxes, and explicit or derived billing dates without saving. | authz: allowed_org_types=[provider], min_org_role=operator | (InvoiceCreateReq) -> (InvoicePreviewRes)
|
|
171
|
+
*
|
|
172
|
+
* @param {Chrt.InvoiceCreateReq} request
|
|
173
|
+
* @param {Invoices.RequestOptions} requestOptions - Request-specific configuration.
|
|
174
|
+
*
|
|
175
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
176
|
+
*
|
|
177
|
+
* @example
|
|
178
|
+
* await client.billingNew.invoices.previewV1({
|
|
179
|
+
* currency_code: "USD",
|
|
180
|
+
* invoice_type: "accounts_receivable",
|
|
181
|
+
* schema_version: 1
|
|
182
|
+
* })
|
|
183
|
+
*/
|
|
184
|
+
previewV1(request: Chrt.InvoiceCreateReq, requestOptions?: Invoices.RequestOptions): core.HttpResponsePromise<Chrt.InvoicePreviewRes>;
|
|
185
|
+
private __previewV1;
|
|
186
|
+
/**
|
|
187
|
+
* Selects matching uninvoiced ordinary charges, reports omitted items, and previews current taxes and billing dates without saving. Period dates do not filter charges. | authz: allowed_org_types=[provider], min_org_role=operator | (InvoiceCreateFromOrdersReq) -> (InvoicePreviewFromOrdersRes)
|
|
188
|
+
*
|
|
189
|
+
* @param {Chrt.InvoiceCreateFromOrdersReq} request
|
|
190
|
+
* @param {Invoices.RequestOptions} requestOptions - Request-specific configuration.
|
|
191
|
+
*
|
|
192
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
193
|
+
*
|
|
194
|
+
* @example
|
|
195
|
+
* await client.billingNew.invoices.previewFromOrdersV1({
|
|
196
|
+
* currency_code: "USD",
|
|
197
|
+
* invoice_type: "accounts_receivable",
|
|
198
|
+
* order_ids: ["order_ids"],
|
|
199
|
+
* schema_version: 1
|
|
200
|
+
* })
|
|
201
|
+
*/
|
|
202
|
+
previewFromOrdersV1(request: Chrt.InvoiceCreateFromOrdersReq, requestOptions?: Invoices.RequestOptions): core.HttpResponsePromise<Chrt.InvoicePreviewFromOrdersRes>;
|
|
203
|
+
private __previewFromOrdersV1;
|
|
179
204
|
/**
|
|
180
205
|
* 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)
|
|
181
206
|
*
|