@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
|
@@ -115,9 +115,9 @@ class Invoices {
|
|
|
115
115
|
});
|
|
116
116
|
}
|
|
117
117
|
/**
|
|
118
|
-
*
|
|
118
|
+
* 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)
|
|
119
119
|
*
|
|
120
|
-
* @param {Chrt.
|
|
120
|
+
* @param {Chrt.InvoiceCreateReq} request
|
|
121
121
|
* @param {Invoices.RequestOptions} requestOptions - Request-specific configuration.
|
|
122
122
|
*
|
|
123
123
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
@@ -181,87 +181,36 @@ class Invoices {
|
|
|
181
181
|
});
|
|
182
182
|
}
|
|
183
183
|
/**
|
|
184
|
-
*
|
|
184
|
+
* 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)
|
|
185
185
|
*
|
|
186
|
-
* @param {
|
|
186
|
+
* @param {Chrt.InvoiceCreateFromOrdersReq} request
|
|
187
187
|
* @param {Invoices.RequestOptions} requestOptions - Request-specific configuration.
|
|
188
188
|
*
|
|
189
189
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
190
190
|
*
|
|
191
191
|
* @example
|
|
192
|
-
* await client.billingNew.invoices.
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
199
|
-
var _a, _b, _c, _d;
|
|
200
|
-
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
201
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
202
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `billing_new/invoices/delete/v1/${encodeURIComponent(invoiceId)}`),
|
|
203
|
-
method: "DELETE",
|
|
204
|
-
headers: _headers,
|
|
205
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
206
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
207
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
208
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
209
|
-
});
|
|
210
|
-
if (_response.ok) {
|
|
211
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
212
|
-
}
|
|
213
|
-
if (_response.error.reason === "status-code") {
|
|
214
|
-
switch (_response.error.statusCode) {
|
|
215
|
-
case 422:
|
|
216
|
-
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
217
|
-
default:
|
|
218
|
-
throw new errors.ChrtError({
|
|
219
|
-
statusCode: _response.error.statusCode,
|
|
220
|
-
body: _response.error.body,
|
|
221
|
-
rawResponse: _response.rawResponse,
|
|
222
|
-
});
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
switch (_response.error.reason) {
|
|
226
|
-
case "non-json":
|
|
227
|
-
throw new errors.ChrtError({
|
|
228
|
-
statusCode: _response.error.statusCode,
|
|
229
|
-
body: _response.error.rawBody,
|
|
230
|
-
rawResponse: _response.rawResponse,
|
|
231
|
-
});
|
|
232
|
-
case "timeout":
|
|
233
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /billing_new/invoices/delete/v1/{invoice_id}.");
|
|
234
|
-
case "unknown":
|
|
235
|
-
throw new errors.ChrtError({
|
|
236
|
-
message: _response.error.errorMessage,
|
|
237
|
-
rawResponse: _response.rawResponse,
|
|
238
|
-
});
|
|
239
|
-
}
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
|
-
/**
|
|
243
|
-
* Retrieves an owner-scoped invoice with line-item orders, counterparties, and accounts expanded. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (InvoiceExpandedRes)
|
|
244
|
-
*
|
|
245
|
-
* @param {string} invoiceId
|
|
246
|
-
* @param {Invoices.RequestOptions} requestOptions - Request-specific configuration.
|
|
247
|
-
*
|
|
248
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
249
|
-
*
|
|
250
|
-
* @example
|
|
251
|
-
* await client.billingNew.invoices.getExpandedV1("invoice_id")
|
|
192
|
+
* await client.billingNew.invoices.createFromOrdersV1({
|
|
193
|
+
* currency_code: "USD",
|
|
194
|
+
* invoice_type: "accounts_receivable",
|
|
195
|
+
* order_ids: ["order_ids"],
|
|
196
|
+
* schema_version: 1
|
|
197
|
+
* })
|
|
252
198
|
*/
|
|
253
|
-
|
|
254
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
199
|
+
createFromOrdersV1(request, requestOptions) {
|
|
200
|
+
return core.HttpResponsePromise.fromPromise(this.__createFromOrdersV1(request, requestOptions));
|
|
255
201
|
}
|
|
256
|
-
|
|
202
|
+
__createFromOrdersV1(request, requestOptions) {
|
|
257
203
|
return __awaiter(this, void 0, void 0, function* () {
|
|
258
204
|
var _a, _b, _c, _d;
|
|
259
205
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
260
206
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
261
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local,
|
|
262
|
-
method: "
|
|
207
|
+
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"),
|
|
208
|
+
method: "POST",
|
|
263
209
|
headers: _headers,
|
|
210
|
+
contentType: "application/json",
|
|
264
211
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
212
|
+
requestType: "json",
|
|
213
|
+
body: request,
|
|
265
214
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
266
215
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
267
216
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -289,7 +238,7 @@ class Invoices {
|
|
|
289
238
|
rawResponse: _response.rawResponse,
|
|
290
239
|
});
|
|
291
240
|
case "timeout":
|
|
292
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling
|
|
241
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /billing_new/invoices/create_from_orders/v1.");
|
|
293
242
|
case "unknown":
|
|
294
243
|
throw new errors.ChrtError({
|
|
295
244
|
message: _response.error.errorMessage,
|
|
@@ -299,27 +248,26 @@ class Invoices {
|
|
|
299
248
|
});
|
|
300
249
|
}
|
|
301
250
|
/**
|
|
302
|
-
*
|
|
251
|
+
* Hard-deletes a draft invoice and detaches its line items. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (bool)
|
|
303
252
|
*
|
|
304
253
|
* @param {string} invoiceId
|
|
305
|
-
* @param {string} invoiceLineItemId
|
|
306
254
|
* @param {Invoices.RequestOptions} requestOptions - Request-specific configuration.
|
|
307
255
|
*
|
|
308
256
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
309
257
|
*
|
|
310
258
|
* @example
|
|
311
|
-
* await client.billingNew.invoices.
|
|
259
|
+
* await client.billingNew.invoices.deleteV1("invoice_id")
|
|
312
260
|
*/
|
|
313
|
-
|
|
314
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
261
|
+
deleteV1(invoiceId, requestOptions) {
|
|
262
|
+
return core.HttpResponsePromise.fromPromise(this.__deleteV1(invoiceId, requestOptions));
|
|
315
263
|
}
|
|
316
|
-
|
|
264
|
+
__deleteV1(invoiceId, requestOptions) {
|
|
317
265
|
return __awaiter(this, void 0, void 0, function* () {
|
|
318
266
|
var _a, _b, _c, _d;
|
|
319
267
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
320
268
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
321
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `billing_new/invoices/
|
|
322
|
-
method: "
|
|
269
|
+
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)}`),
|
|
270
|
+
method: "DELETE",
|
|
323
271
|
headers: _headers,
|
|
324
272
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
325
273
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -349,7 +297,7 @@ class Invoices {
|
|
|
349
297
|
rawResponse: _response.rawResponse,
|
|
350
298
|
});
|
|
351
299
|
case "timeout":
|
|
352
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling
|
|
300
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /billing_new/invoices/delete/v1/{invoice_id}.");
|
|
353
301
|
case "unknown":
|
|
354
302
|
throw new errors.ChrtError({
|
|
355
303
|
message: _response.error.errorMessage,
|
|
@@ -359,27 +307,26 @@ class Invoices {
|
|
|
359
307
|
});
|
|
360
308
|
}
|
|
361
309
|
/**
|
|
362
|
-
*
|
|
310
|
+
* Retrieves an owner-scoped invoice with line-item orders, counterparties, and accounts expanded. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (InvoiceExpandedRes)
|
|
363
311
|
*
|
|
364
312
|
* @param {string} invoiceId
|
|
365
|
-
* @param {string} invoiceLineItemId
|
|
366
313
|
* @param {Invoices.RequestOptions} requestOptions - Request-specific configuration.
|
|
367
314
|
*
|
|
368
315
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
369
316
|
*
|
|
370
317
|
* @example
|
|
371
|
-
* await client.billingNew.invoices.
|
|
318
|
+
* await client.billingNew.invoices.getExpandedV1("invoice_id")
|
|
372
319
|
*/
|
|
373
|
-
|
|
374
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
320
|
+
getExpandedV1(invoiceId, requestOptions) {
|
|
321
|
+
return core.HttpResponsePromise.fromPromise(this.__getExpandedV1(invoiceId, requestOptions));
|
|
375
322
|
}
|
|
376
|
-
|
|
323
|
+
__getExpandedV1(invoiceId, requestOptions) {
|
|
377
324
|
return __awaiter(this, void 0, void 0, function* () {
|
|
378
325
|
var _a, _b, _c, _d;
|
|
379
326
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
380
327
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
381
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `billing_new/invoices/
|
|
382
|
-
method: "
|
|
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/invoices/expanded/v1/${encodeURIComponent(invoiceId)}`),
|
|
329
|
+
method: "GET",
|
|
383
330
|
headers: _headers,
|
|
384
331
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
385
332
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -409,7 +356,7 @@ class Invoices {
|
|
|
409
356
|
rawResponse: _response.rawResponse,
|
|
410
357
|
});
|
|
411
358
|
case "timeout":
|
|
412
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling
|
|
359
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /billing_new/invoices/expanded/v1/{invoice_id}.");
|
|
413
360
|
case "unknown":
|
|
414
361
|
throw new errors.ChrtError({
|
|
415
362
|
message: _response.error.errorMessage,
|
|
@@ -419,7 +366,7 @@ class Invoices {
|
|
|
419
366
|
});
|
|
420
367
|
}
|
|
421
368
|
/**
|
|
422
|
-
* Attaches
|
|
369
|
+
* 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)
|
|
423
370
|
*
|
|
424
371
|
* @param {string} invoiceId
|
|
425
372
|
* @param {Chrt.billingNew.InvoiceLineItemsAddReq} request
|
|
@@ -689,6 +636,139 @@ class Invoices {
|
|
|
689
636
|
}
|
|
690
637
|
});
|
|
691
638
|
}
|
|
639
|
+
/**
|
|
640
|
+
* 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)
|
|
641
|
+
*
|
|
642
|
+
* @param {Chrt.InvoiceCreateReq} request
|
|
643
|
+
* @param {Invoices.RequestOptions} requestOptions - Request-specific configuration.
|
|
644
|
+
*
|
|
645
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
646
|
+
*
|
|
647
|
+
* @example
|
|
648
|
+
* await client.billingNew.invoices.previewV1({
|
|
649
|
+
* currency_code: "USD",
|
|
650
|
+
* invoice_type: "accounts_receivable",
|
|
651
|
+
* schema_version: 1
|
|
652
|
+
* })
|
|
653
|
+
*/
|
|
654
|
+
previewV1(request, requestOptions) {
|
|
655
|
+
return core.HttpResponsePromise.fromPromise(this.__previewV1(request, requestOptions));
|
|
656
|
+
}
|
|
657
|
+
__previewV1(request, requestOptions) {
|
|
658
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
659
|
+
var _a, _b, _c, _d;
|
|
660
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
661
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
662
|
+
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"),
|
|
663
|
+
method: "POST",
|
|
664
|
+
headers: _headers,
|
|
665
|
+
contentType: "application/json",
|
|
666
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
667
|
+
requestType: "json",
|
|
668
|
+
body: request,
|
|
669
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
670
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
671
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
672
|
+
});
|
|
673
|
+
if (_response.ok) {
|
|
674
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
675
|
+
}
|
|
676
|
+
if (_response.error.reason === "status-code") {
|
|
677
|
+
switch (_response.error.statusCode) {
|
|
678
|
+
case 422:
|
|
679
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
680
|
+
default:
|
|
681
|
+
throw new errors.ChrtError({
|
|
682
|
+
statusCode: _response.error.statusCode,
|
|
683
|
+
body: _response.error.body,
|
|
684
|
+
rawResponse: _response.rawResponse,
|
|
685
|
+
});
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
switch (_response.error.reason) {
|
|
689
|
+
case "non-json":
|
|
690
|
+
throw new errors.ChrtError({
|
|
691
|
+
statusCode: _response.error.statusCode,
|
|
692
|
+
body: _response.error.rawBody,
|
|
693
|
+
rawResponse: _response.rawResponse,
|
|
694
|
+
});
|
|
695
|
+
case "timeout":
|
|
696
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /billing_new/invoices/preview/v1.");
|
|
697
|
+
case "unknown":
|
|
698
|
+
throw new errors.ChrtError({
|
|
699
|
+
message: _response.error.errorMessage,
|
|
700
|
+
rawResponse: _response.rawResponse,
|
|
701
|
+
});
|
|
702
|
+
}
|
|
703
|
+
});
|
|
704
|
+
}
|
|
705
|
+
/**
|
|
706
|
+
* 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)
|
|
707
|
+
*
|
|
708
|
+
* @param {Chrt.InvoiceCreateFromOrdersReq} request
|
|
709
|
+
* @param {Invoices.RequestOptions} requestOptions - Request-specific configuration.
|
|
710
|
+
*
|
|
711
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
712
|
+
*
|
|
713
|
+
* @example
|
|
714
|
+
* await client.billingNew.invoices.previewFromOrdersV1({
|
|
715
|
+
* currency_code: "USD",
|
|
716
|
+
* invoice_type: "accounts_receivable",
|
|
717
|
+
* order_ids: ["order_ids"],
|
|
718
|
+
* schema_version: 1
|
|
719
|
+
* })
|
|
720
|
+
*/
|
|
721
|
+
previewFromOrdersV1(request, requestOptions) {
|
|
722
|
+
return core.HttpResponsePromise.fromPromise(this.__previewFromOrdersV1(request, requestOptions));
|
|
723
|
+
}
|
|
724
|
+
__previewFromOrdersV1(request, requestOptions) {
|
|
725
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
726
|
+
var _a, _b, _c, _d;
|
|
727
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
728
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
729
|
+
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"),
|
|
730
|
+
method: "POST",
|
|
731
|
+
headers: _headers,
|
|
732
|
+
contentType: "application/json",
|
|
733
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
734
|
+
requestType: "json",
|
|
735
|
+
body: request,
|
|
736
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
737
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
738
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
739
|
+
});
|
|
740
|
+
if (_response.ok) {
|
|
741
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
742
|
+
}
|
|
743
|
+
if (_response.error.reason === "status-code") {
|
|
744
|
+
switch (_response.error.statusCode) {
|
|
745
|
+
case 422:
|
|
746
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
747
|
+
default:
|
|
748
|
+
throw new errors.ChrtError({
|
|
749
|
+
statusCode: _response.error.statusCode,
|
|
750
|
+
body: _response.error.body,
|
|
751
|
+
rawResponse: _response.rawResponse,
|
|
752
|
+
});
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
switch (_response.error.reason) {
|
|
756
|
+
case "non-json":
|
|
757
|
+
throw new errors.ChrtError({
|
|
758
|
+
statusCode: _response.error.statusCode,
|
|
759
|
+
body: _response.error.rawBody,
|
|
760
|
+
rawResponse: _response.rawResponse,
|
|
761
|
+
});
|
|
762
|
+
case "timeout":
|
|
763
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /billing_new/invoices/preview_from_orders/v1.");
|
|
764
|
+
case "unknown":
|
|
765
|
+
throw new errors.ChrtError({
|
|
766
|
+
message: _response.error.errorMessage,
|
|
767
|
+
rawResponse: _response.rawResponse,
|
|
768
|
+
});
|
|
769
|
+
}
|
|
770
|
+
});
|
|
771
|
+
}
|
|
692
772
|
/**
|
|
693
773
|
* 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)
|
|
694
774
|
*
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export { type InvoiceClientCreate1 } from "./InvoiceClientCreate1.js";
|
|
2
1
|
export { type InvoiceLineItemsAddReq } from "./InvoiceLineItemsAddReq.js";
|
|
3
2
|
export { type InvoiceLineItemsRemoveReq } from "./InvoiceLineItemsRemoveReq.js";
|
|
4
3
|
export { type InvoicesListV1Request } from "./InvoicesListV1Request.js";
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
import * as environments from "../../../../../../environments.js";
|
|
5
5
|
import * as core from "../../../../../../core/index.js";
|
|
6
6
|
import * as Chrt from "../../../../../index.js";
|
|
7
|
-
import { RateSheetLineItems } from "../resources/rateSheetLineItems/client/Client.js";
|
|
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
|
}
|
|
@@ -62,15 +62,10 @@ const core = __importStar(require("../../../../../../core/index.js"));
|
|
|
62
62
|
const Chrt = __importStar(require("../../../../../index.js"));
|
|
63
63
|
const headers_js_1 = require("../../../../../../core/headers.js");
|
|
64
64
|
const errors = __importStar(require("../../../../../../errors/index.js"));
|
|
65
|
-
const Client_js_1 = require("../resources/rateSheetLineItems/client/Client.js");
|
|
66
65
|
class Orders {
|
|
67
66
|
constructor(_options = {}) {
|
|
68
67
|
this._options = _options;
|
|
69
68
|
}
|
|
70
|
-
get rateSheetLineItems() {
|
|
71
|
-
var _a;
|
|
72
|
-
return ((_a = this._rateSheetLineItems) !== null && _a !== void 0 ? _a : (this._rateSheetLineItems = new Client_js_1.RateSheetLineItems(this._options)));
|
|
73
|
-
}
|
|
74
69
|
/**
|
|
75
70
|
* Lists completed, unbilled AWBs with delivery account allocations. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (OrderAwbBillingListRes)
|
|
76
71
|
*
|
|
@@ -321,6 +316,132 @@ class Orders {
|
|
|
321
316
|
}
|
|
322
317
|
});
|
|
323
318
|
}
|
|
319
|
+
/**
|
|
320
|
+
* 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)
|
|
321
|
+
*
|
|
322
|
+
* @param {Chrt.billingNew.OrderRateSheetLineItemsGenerateManyReq} request
|
|
323
|
+
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
324
|
+
*
|
|
325
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
326
|
+
*
|
|
327
|
+
* @example
|
|
328
|
+
* await client.billingNew.orders.generateRateSheetLineItemsManyV1({
|
|
329
|
+
* order_ids: ["order_ids"]
|
|
330
|
+
* })
|
|
331
|
+
*/
|
|
332
|
+
generateRateSheetLineItemsManyV1(request, requestOptions) {
|
|
333
|
+
return core.HttpResponsePromise.fromPromise(this.__generateRateSheetLineItemsManyV1(request, requestOptions));
|
|
334
|
+
}
|
|
335
|
+
__generateRateSheetLineItemsManyV1(request, requestOptions) {
|
|
336
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
337
|
+
var _a, _b, _c, _d;
|
|
338
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
339
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
340
|
+
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/orders/rate_sheet_line_items/generate_many/v1"),
|
|
341
|
+
method: "POST",
|
|
342
|
+
headers: _headers,
|
|
343
|
+
contentType: "application/json",
|
|
344
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
345
|
+
requestType: "json",
|
|
346
|
+
body: request,
|
|
347
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
348
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
349
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
350
|
+
});
|
|
351
|
+
if (_response.ok) {
|
|
352
|
+
return {
|
|
353
|
+
data: _response.body,
|
|
354
|
+
rawResponse: _response.rawResponse,
|
|
355
|
+
};
|
|
356
|
+
}
|
|
357
|
+
if (_response.error.reason === "status-code") {
|
|
358
|
+
switch (_response.error.statusCode) {
|
|
359
|
+
case 422:
|
|
360
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
361
|
+
default:
|
|
362
|
+
throw new errors.ChrtError({
|
|
363
|
+
statusCode: _response.error.statusCode,
|
|
364
|
+
body: _response.error.body,
|
|
365
|
+
rawResponse: _response.rawResponse,
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
switch (_response.error.reason) {
|
|
370
|
+
case "non-json":
|
|
371
|
+
throw new errors.ChrtError({
|
|
372
|
+
statusCode: _response.error.statusCode,
|
|
373
|
+
body: _response.error.rawBody,
|
|
374
|
+
rawResponse: _response.rawResponse,
|
|
375
|
+
});
|
|
376
|
+
case "timeout":
|
|
377
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /billing_new/orders/rate_sheet_line_items/generate_many/v1.");
|
|
378
|
+
case "unknown":
|
|
379
|
+
throw new errors.ChrtError({
|
|
380
|
+
message: _response.error.errorMessage,
|
|
381
|
+
rawResponse: _response.rawResponse,
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
});
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* 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])
|
|
388
|
+
*
|
|
389
|
+
* @param {string} orderId
|
|
390
|
+
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
391
|
+
*
|
|
392
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
393
|
+
*
|
|
394
|
+
* @example
|
|
395
|
+
* await client.billingNew.orders.taxEstimatesV1("order_id")
|
|
396
|
+
*/
|
|
397
|
+
taxEstimatesV1(orderId, requestOptions) {
|
|
398
|
+
return core.HttpResponsePromise.fromPromise(this.__taxEstimatesV1(orderId, requestOptions));
|
|
399
|
+
}
|
|
400
|
+
__taxEstimatesV1(orderId, requestOptions) {
|
|
401
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
402
|
+
var _a, _b, _c, _d;
|
|
403
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
404
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
405
|
+
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/orders/tax_estimates/v1/${encodeURIComponent(orderId)}`),
|
|
406
|
+
method: "GET",
|
|
407
|
+
headers: _headers,
|
|
408
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
409
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
410
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
411
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
412
|
+
});
|
|
413
|
+
if (_response.ok) {
|
|
414
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
415
|
+
}
|
|
416
|
+
if (_response.error.reason === "status-code") {
|
|
417
|
+
switch (_response.error.statusCode) {
|
|
418
|
+
case 422:
|
|
419
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
420
|
+
default:
|
|
421
|
+
throw new errors.ChrtError({
|
|
422
|
+
statusCode: _response.error.statusCode,
|
|
423
|
+
body: _response.error.body,
|
|
424
|
+
rawResponse: _response.rawResponse,
|
|
425
|
+
});
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
switch (_response.error.reason) {
|
|
429
|
+
case "non-json":
|
|
430
|
+
throw new errors.ChrtError({
|
|
431
|
+
statusCode: _response.error.statusCode,
|
|
432
|
+
body: _response.error.rawBody,
|
|
433
|
+
rawResponse: _response.rawResponse,
|
|
434
|
+
});
|
|
435
|
+
case "timeout":
|
|
436
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /billing_new/orders/tax_estimates/v1/{order_id}.");
|
|
437
|
+
case "unknown":
|
|
438
|
+
throw new errors.ChrtError({
|
|
439
|
+
message: _response.error.errorMessage,
|
|
440
|
+
rawResponse: _response.rawResponse,
|
|
441
|
+
});
|
|
442
|
+
}
|
|
443
|
+
});
|
|
444
|
+
}
|
|
324
445
|
_getAuthorizationHeader() {
|
|
325
446
|
return __awaiter(this, void 0, void 0, function* () {
|
|
326
447
|
const bearer = yield core.Supplier.get(this._options.token);
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export { type OrdersListAwbBillingForCoordinatorOperatorsV1Request } from "./OrdersListAwbBillingForCoordinatorOperatorsV1Request.js";
|
|
2
2
|
export { type OrderBillingExpandedListReq } from "./OrderBillingExpandedListReq.js";
|
|
3
|
+
export { type OrderRateSheetLineItemsGenerateManyReq } from "./OrderRateSheetLineItemsGenerateManyReq.js";
|