@chrt-inc/typescript-sdk 1.998.0 → 1.999.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +28 -3
- package/dist/cjs/api/resources/billingNew/resources/orders/client/Client.js +126 -5
- 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/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/InvoiceLineItemExportListItem.d.ts +3 -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/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 +28 -3
- package/dist/esm/api/resources/billingNew/resources/orders/client/Client.mjs +126 -5
- 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/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/InvoiceLineItemExportListItem.d.mts +3 -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/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 +520 -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
|
@@ -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
|
*
|
|
@@ -79,9 +79,9 @@ export class Invoices {
|
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
81
|
/**
|
|
82
|
-
*
|
|
82
|
+
* 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)
|
|
83
83
|
*
|
|
84
|
-
* @param {Chrt.
|
|
84
|
+
* @param {Chrt.InvoiceCreateReq} request
|
|
85
85
|
* @param {Invoices.RequestOptions} requestOptions - Request-specific configuration.
|
|
86
86
|
*
|
|
87
87
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
@@ -145,87 +145,36 @@ export class Invoices {
|
|
|
145
145
|
});
|
|
146
146
|
}
|
|
147
147
|
/**
|
|
148
|
-
*
|
|
148
|
+
* 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)
|
|
149
149
|
*
|
|
150
|
-
* @param {
|
|
150
|
+
* @param {Chrt.InvoiceCreateFromOrdersReq} request
|
|
151
151
|
* @param {Invoices.RequestOptions} requestOptions - Request-specific configuration.
|
|
152
152
|
*
|
|
153
153
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
154
154
|
*
|
|
155
155
|
* @example
|
|
156
|
-
* await client.billingNew.invoices.
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
163
|
-
var _a, _b, _c, _d;
|
|
164
|
-
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);
|
|
165
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
166
|
-
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)}`),
|
|
167
|
-
method: "DELETE",
|
|
168
|
-
headers: _headers,
|
|
169
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
170
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
171
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
172
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
173
|
-
});
|
|
174
|
-
if (_response.ok) {
|
|
175
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
176
|
-
}
|
|
177
|
-
if (_response.error.reason === "status-code") {
|
|
178
|
-
switch (_response.error.statusCode) {
|
|
179
|
-
case 422:
|
|
180
|
-
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
181
|
-
default:
|
|
182
|
-
throw new errors.ChrtError({
|
|
183
|
-
statusCode: _response.error.statusCode,
|
|
184
|
-
body: _response.error.body,
|
|
185
|
-
rawResponse: _response.rawResponse,
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
switch (_response.error.reason) {
|
|
190
|
-
case "non-json":
|
|
191
|
-
throw new errors.ChrtError({
|
|
192
|
-
statusCode: _response.error.statusCode,
|
|
193
|
-
body: _response.error.rawBody,
|
|
194
|
-
rawResponse: _response.rawResponse,
|
|
195
|
-
});
|
|
196
|
-
case "timeout":
|
|
197
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /billing_new/invoices/delete/v1/{invoice_id}.");
|
|
198
|
-
case "unknown":
|
|
199
|
-
throw new errors.ChrtError({
|
|
200
|
-
message: _response.error.errorMessage,
|
|
201
|
-
rawResponse: _response.rawResponse,
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
});
|
|
205
|
-
}
|
|
206
|
-
/**
|
|
207
|
-
* Retrieves an owner-scoped invoice with line-item orders, counterparties, and accounts expanded. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (InvoiceExpandedRes)
|
|
208
|
-
*
|
|
209
|
-
* @param {string} invoiceId
|
|
210
|
-
* @param {Invoices.RequestOptions} requestOptions - Request-specific configuration.
|
|
211
|
-
*
|
|
212
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
213
|
-
*
|
|
214
|
-
* @example
|
|
215
|
-
* await client.billingNew.invoices.getExpandedV1("invoice_id")
|
|
156
|
+
* await client.billingNew.invoices.createFromOrdersV1({
|
|
157
|
+
* currency_code: "USD",
|
|
158
|
+
* invoice_type: "accounts_receivable",
|
|
159
|
+
* order_ids: ["order_ids"],
|
|
160
|
+
* schema_version: 1
|
|
161
|
+
* })
|
|
216
162
|
*/
|
|
217
|
-
|
|
218
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
163
|
+
createFromOrdersV1(request, requestOptions) {
|
|
164
|
+
return core.HttpResponsePromise.fromPromise(this.__createFromOrdersV1(request, requestOptions));
|
|
219
165
|
}
|
|
220
|
-
|
|
166
|
+
__createFromOrdersV1(request, requestOptions) {
|
|
221
167
|
return __awaiter(this, void 0, void 0, function* () {
|
|
222
168
|
var _a, _b, _c, _d;
|
|
223
169
|
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);
|
|
224
170
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
225
|
-
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,
|
|
226
|
-
method: "
|
|
171
|
+
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_from_orders/v1"),
|
|
172
|
+
method: "POST",
|
|
227
173
|
headers: _headers,
|
|
174
|
+
contentType: "application/json",
|
|
228
175
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
176
|
+
requestType: "json",
|
|
177
|
+
body: request,
|
|
229
178
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
230
179
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
231
180
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -253,7 +202,7 @@ export class Invoices {
|
|
|
253
202
|
rawResponse: _response.rawResponse,
|
|
254
203
|
});
|
|
255
204
|
case "timeout":
|
|
256
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling
|
|
205
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /billing_new/invoices/create_from_orders/v1.");
|
|
257
206
|
case "unknown":
|
|
258
207
|
throw new errors.ChrtError({
|
|
259
208
|
message: _response.error.errorMessage,
|
|
@@ -263,27 +212,26 @@ export class Invoices {
|
|
|
263
212
|
});
|
|
264
213
|
}
|
|
265
214
|
/**
|
|
266
|
-
*
|
|
215
|
+
* Hard-deletes a draft invoice and detaches its line items. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (bool)
|
|
267
216
|
*
|
|
268
217
|
* @param {string} invoiceId
|
|
269
|
-
* @param {string} invoiceLineItemId
|
|
270
218
|
* @param {Invoices.RequestOptions} requestOptions - Request-specific configuration.
|
|
271
219
|
*
|
|
272
220
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
273
221
|
*
|
|
274
222
|
* @example
|
|
275
|
-
* await client.billingNew.invoices.
|
|
223
|
+
* await client.billingNew.invoices.deleteV1("invoice_id")
|
|
276
224
|
*/
|
|
277
|
-
|
|
278
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
225
|
+
deleteV1(invoiceId, requestOptions) {
|
|
226
|
+
return core.HttpResponsePromise.fromPromise(this.__deleteV1(invoiceId, requestOptions));
|
|
279
227
|
}
|
|
280
|
-
|
|
228
|
+
__deleteV1(invoiceId, requestOptions) {
|
|
281
229
|
return __awaiter(this, void 0, void 0, function* () {
|
|
282
230
|
var _a, _b, _c, _d;
|
|
283
231
|
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);
|
|
284
232
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
285
|
-
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/
|
|
286
|
-
method: "
|
|
233
|
+
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)}`),
|
|
234
|
+
method: "DELETE",
|
|
287
235
|
headers: _headers,
|
|
288
236
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
289
237
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -313,7 +261,7 @@ export class Invoices {
|
|
|
313
261
|
rawResponse: _response.rawResponse,
|
|
314
262
|
});
|
|
315
263
|
case "timeout":
|
|
316
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling
|
|
264
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /billing_new/invoices/delete/v1/{invoice_id}.");
|
|
317
265
|
case "unknown":
|
|
318
266
|
throw new errors.ChrtError({
|
|
319
267
|
message: _response.error.errorMessage,
|
|
@@ -323,27 +271,26 @@ export class Invoices {
|
|
|
323
271
|
});
|
|
324
272
|
}
|
|
325
273
|
/**
|
|
326
|
-
*
|
|
274
|
+
* Retrieves an owner-scoped invoice with line-item orders, counterparties, and accounts expanded. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (InvoiceExpandedRes)
|
|
327
275
|
*
|
|
328
276
|
* @param {string} invoiceId
|
|
329
|
-
* @param {string} invoiceLineItemId
|
|
330
277
|
* @param {Invoices.RequestOptions} requestOptions - Request-specific configuration.
|
|
331
278
|
*
|
|
332
279
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
333
280
|
*
|
|
334
281
|
* @example
|
|
335
|
-
* await client.billingNew.invoices.
|
|
282
|
+
* await client.billingNew.invoices.getExpandedV1("invoice_id")
|
|
336
283
|
*/
|
|
337
|
-
|
|
338
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
284
|
+
getExpandedV1(invoiceId, requestOptions) {
|
|
285
|
+
return core.HttpResponsePromise.fromPromise(this.__getExpandedV1(invoiceId, requestOptions));
|
|
339
286
|
}
|
|
340
|
-
|
|
287
|
+
__getExpandedV1(invoiceId, requestOptions) {
|
|
341
288
|
return __awaiter(this, void 0, void 0, function* () {
|
|
342
289
|
var _a, _b, _c, _d;
|
|
343
290
|
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);
|
|
344
291
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
345
|
-
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/
|
|
346
|
-
method: "
|
|
292
|
+
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)}`),
|
|
293
|
+
method: "GET",
|
|
347
294
|
headers: _headers,
|
|
348
295
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
349
296
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -373,7 +320,7 @@ export class Invoices {
|
|
|
373
320
|
rawResponse: _response.rawResponse,
|
|
374
321
|
});
|
|
375
322
|
case "timeout":
|
|
376
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling
|
|
323
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /billing_new/invoices/expanded/v1/{invoice_id}.");
|
|
377
324
|
case "unknown":
|
|
378
325
|
throw new errors.ChrtError({
|
|
379
326
|
message: _response.error.errorMessage,
|
|
@@ -383,7 +330,7 @@ export class Invoices {
|
|
|
383
330
|
});
|
|
384
331
|
}
|
|
385
332
|
/**
|
|
386
|
-
* Attaches
|
|
333
|
+
* 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)
|
|
387
334
|
*
|
|
388
335
|
* @param {string} invoiceId
|
|
389
336
|
* @param {Chrt.billingNew.InvoiceLineItemsAddReq} request
|
|
@@ -653,6 +600,139 @@ export class Invoices {
|
|
|
653
600
|
}
|
|
654
601
|
});
|
|
655
602
|
}
|
|
603
|
+
/**
|
|
604
|
+
* 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)
|
|
605
|
+
*
|
|
606
|
+
* @param {Chrt.InvoiceCreateReq} request
|
|
607
|
+
* @param {Invoices.RequestOptions} requestOptions - Request-specific configuration.
|
|
608
|
+
*
|
|
609
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
610
|
+
*
|
|
611
|
+
* @example
|
|
612
|
+
* await client.billingNew.invoices.previewV1({
|
|
613
|
+
* currency_code: "USD",
|
|
614
|
+
* invoice_type: "accounts_receivable",
|
|
615
|
+
* schema_version: 1
|
|
616
|
+
* })
|
|
617
|
+
*/
|
|
618
|
+
previewV1(request, requestOptions) {
|
|
619
|
+
return core.HttpResponsePromise.fromPromise(this.__previewV1(request, requestOptions));
|
|
620
|
+
}
|
|
621
|
+
__previewV1(request, requestOptions) {
|
|
622
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
623
|
+
var _a, _b, _c, _d;
|
|
624
|
+
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);
|
|
625
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
626
|
+
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/preview/v1"),
|
|
627
|
+
method: "POST",
|
|
628
|
+
headers: _headers,
|
|
629
|
+
contentType: "application/json",
|
|
630
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
631
|
+
requestType: "json",
|
|
632
|
+
body: request,
|
|
633
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
634
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
635
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
636
|
+
});
|
|
637
|
+
if (_response.ok) {
|
|
638
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
639
|
+
}
|
|
640
|
+
if (_response.error.reason === "status-code") {
|
|
641
|
+
switch (_response.error.statusCode) {
|
|
642
|
+
case 422:
|
|
643
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
644
|
+
default:
|
|
645
|
+
throw new errors.ChrtError({
|
|
646
|
+
statusCode: _response.error.statusCode,
|
|
647
|
+
body: _response.error.body,
|
|
648
|
+
rawResponse: _response.rawResponse,
|
|
649
|
+
});
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
switch (_response.error.reason) {
|
|
653
|
+
case "non-json":
|
|
654
|
+
throw new errors.ChrtError({
|
|
655
|
+
statusCode: _response.error.statusCode,
|
|
656
|
+
body: _response.error.rawBody,
|
|
657
|
+
rawResponse: _response.rawResponse,
|
|
658
|
+
});
|
|
659
|
+
case "timeout":
|
|
660
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /billing_new/invoices/preview/v1.");
|
|
661
|
+
case "unknown":
|
|
662
|
+
throw new errors.ChrtError({
|
|
663
|
+
message: _response.error.errorMessage,
|
|
664
|
+
rawResponse: _response.rawResponse,
|
|
665
|
+
});
|
|
666
|
+
}
|
|
667
|
+
});
|
|
668
|
+
}
|
|
669
|
+
/**
|
|
670
|
+
* 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)
|
|
671
|
+
*
|
|
672
|
+
* @param {Chrt.InvoiceCreateFromOrdersReq} request
|
|
673
|
+
* @param {Invoices.RequestOptions} requestOptions - Request-specific configuration.
|
|
674
|
+
*
|
|
675
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
676
|
+
*
|
|
677
|
+
* @example
|
|
678
|
+
* await client.billingNew.invoices.previewFromOrdersV1({
|
|
679
|
+
* currency_code: "USD",
|
|
680
|
+
* invoice_type: "accounts_receivable",
|
|
681
|
+
* order_ids: ["order_ids"],
|
|
682
|
+
* schema_version: 1
|
|
683
|
+
* })
|
|
684
|
+
*/
|
|
685
|
+
previewFromOrdersV1(request, requestOptions) {
|
|
686
|
+
return core.HttpResponsePromise.fromPromise(this.__previewFromOrdersV1(request, requestOptions));
|
|
687
|
+
}
|
|
688
|
+
__previewFromOrdersV1(request, requestOptions) {
|
|
689
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
690
|
+
var _a, _b, _c, _d;
|
|
691
|
+
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);
|
|
692
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
693
|
+
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/preview_from_orders/v1"),
|
|
694
|
+
method: "POST",
|
|
695
|
+
headers: _headers,
|
|
696
|
+
contentType: "application/json",
|
|
697
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
698
|
+
requestType: "json",
|
|
699
|
+
body: request,
|
|
700
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
701
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
702
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
703
|
+
});
|
|
704
|
+
if (_response.ok) {
|
|
705
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
706
|
+
}
|
|
707
|
+
if (_response.error.reason === "status-code") {
|
|
708
|
+
switch (_response.error.statusCode) {
|
|
709
|
+
case 422:
|
|
710
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
711
|
+
default:
|
|
712
|
+
throw new errors.ChrtError({
|
|
713
|
+
statusCode: _response.error.statusCode,
|
|
714
|
+
body: _response.error.body,
|
|
715
|
+
rawResponse: _response.rawResponse,
|
|
716
|
+
});
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
switch (_response.error.reason) {
|
|
720
|
+
case "non-json":
|
|
721
|
+
throw new errors.ChrtError({
|
|
722
|
+
statusCode: _response.error.statusCode,
|
|
723
|
+
body: _response.error.rawBody,
|
|
724
|
+
rawResponse: _response.rawResponse,
|
|
725
|
+
});
|
|
726
|
+
case "timeout":
|
|
727
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /billing_new/invoices/preview_from_orders/v1.");
|
|
728
|
+
case "unknown":
|
|
729
|
+
throw new errors.ChrtError({
|
|
730
|
+
message: _response.error.errorMessage,
|
|
731
|
+
rawResponse: _response.rawResponse,
|
|
732
|
+
});
|
|
733
|
+
}
|
|
734
|
+
});
|
|
735
|
+
}
|
|
656
736
|
/**
|
|
657
737
|
* 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)
|
|
658
738
|
*
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export { type InvoiceClientCreate1 } from "./InvoiceClientCreate1.mjs";
|
|
2
1
|
export { type InvoiceLineItemsAddReq } from "./InvoiceLineItemsAddReq.mjs";
|
|
3
2
|
export { type InvoiceLineItemsRemoveReq } from "./InvoiceLineItemsRemoveReq.mjs";
|
|
4
3
|
export { type InvoicesListV1Request } from "./InvoicesListV1Request.mjs";
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
import * as environments from "../../../../../../environments.mjs";
|
|
5
5
|
import * as core from "../../../../../../core/index.mjs";
|
|
6
6
|
import * as Chrt from "../../../../../index.mjs";
|
|
7
|
-
import { RateSheetLineItems } from "../resources/rateSheetLineItems/client/Client.mjs";
|
|
8
7
|
export declare namespace Orders {
|
|
9
8
|
interface Options {
|
|
10
9
|
environment?: core.Supplier<environments.ChrtEnvironment | string>;
|
|
@@ -30,9 +29,7 @@ export declare namespace Orders {
|
|
|
30
29
|
}
|
|
31
30
|
export declare class Orders {
|
|
32
31
|
protected readonly _options: Orders.Options;
|
|
33
|
-
protected _rateSheetLineItems: RateSheetLineItems | undefined;
|
|
34
32
|
constructor(_options?: Orders.Options);
|
|
35
|
-
get rateSheetLineItems(): RateSheetLineItems;
|
|
36
33
|
/**
|
|
37
34
|
* Lists completed, unbilled AWBs with delivery account allocations. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (OrderAwbBillingListRes)
|
|
38
35
|
*
|
|
@@ -88,5 +85,33 @@ export declare class Orders {
|
|
|
88
85
|
*/
|
|
89
86
|
listExpandedForCoordinatorOperatorsV1(request?: Chrt.billingNew.OrderBillingExpandedListReq, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<Chrt.OrderBillingExpandedListRes>;
|
|
90
87
|
private __listExpandedForCoordinatorOperatorsV1;
|
|
88
|
+
/**
|
|
89
|
+
* Regenerates uninvoiced rate-sheet charges per Order, reporting skips and failures. Detach existing charges before regeneration. | authz: allowed_org_types=[provider], min_org_role=operator | authz_personas=[coordinator_org_operators] | (OrderRateSheetLineItemsGenerateManyReq) -> (OrderRateSheetLineItemsGenerateManyRes)
|
|
90
|
+
*
|
|
91
|
+
* @param {Chrt.billingNew.OrderRateSheetLineItemsGenerateManyReq} request
|
|
92
|
+
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
93
|
+
*
|
|
94
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* await client.billingNew.orders.generateRateSheetLineItemsManyV1({
|
|
98
|
+
* order_ids: ["order_ids"]
|
|
99
|
+
* })
|
|
100
|
+
*/
|
|
101
|
+
generateRateSheetLineItemsManyV1(request: Chrt.billingNew.OrderRateSheetLineItemsGenerateManyReq, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<Chrt.OrderRateSheetLineItemsGenerateManyRes>;
|
|
102
|
+
private __generateRateSheetLineItemsManyV1;
|
|
103
|
+
/**
|
|
104
|
+
* Estimates current taxes for uninvoiced ordinary charges grouped by counterparty, direction, and currency. Returns an empty list when no charges qualify. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (list[InvoicePreviewRes])
|
|
105
|
+
*
|
|
106
|
+
* @param {string} orderId
|
|
107
|
+
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
108
|
+
*
|
|
109
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* await client.billingNew.orders.taxEstimatesV1("order_id")
|
|
113
|
+
*/
|
|
114
|
+
taxEstimatesV1(orderId: string, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<Chrt.InvoicePreviewRes[]>;
|
|
115
|
+
private __taxEstimatesV1;
|
|
91
116
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
92
117
|
}
|