@paid-ai/paid-node 1.3.0 → 1.6.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.d.ts +6 -0
- package/dist/cjs/Client.js +30 -20
- package/dist/cjs/api/resources/costs/client/Client.d.ts +38 -0
- package/dist/cjs/api/resources/costs/client/Client.js +139 -0
- package/dist/cjs/api/resources/costs/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/costs/client/index.js +17 -0
- package/dist/cjs/api/resources/costs/client/requests/CostIngestRequest.d.ts +17 -0
- package/dist/cjs/api/resources/costs/client/requests/CostIngestRequest.js +3 -0
- package/dist/cjs/api/resources/costs/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/costs/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/costs/index.d.ts +1 -0
- package/dist/cjs/api/resources/costs/index.js +17 -0
- package/dist/cjs/api/resources/index.d.ts +5 -0
- package/dist/cjs/api/resources/index.js +6 -1
- package/dist/cjs/api/resources/orders/client/requests/CreateOrderRequest.d.ts +1 -0
- package/dist/cjs/api/resources/pricing/client/Client.d.ts +71 -0
- package/dist/cjs/api/resources/pricing/client/Client.js +284 -0
- package/dist/cjs/api/resources/pricing/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/pricing/client/index.js +17 -0
- package/dist/cjs/api/resources/pricing/client/requests/GetPricingRequest.d.ts +9 -0
- package/dist/cjs/api/resources/pricing/client/requests/GetPricingRequest.js +3 -0
- package/dist/cjs/api/resources/pricing/client/requests/ListPricingRequest.d.ts +10 -0
- package/dist/cjs/api/resources/pricing/client/requests/ListPricingRequest.js +3 -0
- package/dist/cjs/api/resources/pricing/client/requests/UpdatePricingRequest.d.ts +20 -0
- package/dist/cjs/api/resources/pricing/client/requests/UpdatePricingRequest.js +3 -0
- package/dist/cjs/api/resources/pricing/client/requests/index.d.ts +3 -0
- package/dist/cjs/api/resources/pricing/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/pricing/index.d.ts +1 -0
- package/dist/cjs/api/resources/pricing/index.js +17 -0
- package/dist/cjs/api/resources/valueReceipts/client/Client.d.ts +85 -0
- package/dist/cjs/api/resources/valueReceipts/client/Client.js +362 -1
- package/dist/cjs/api/resources/valueReceipts/client/requests/ArchiveValueReceiptRequest.d.ts +9 -0
- package/dist/cjs/api/resources/valueReceipts/client/requests/ArchiveValueReceiptRequest.js +3 -0
- package/dist/cjs/api/resources/valueReceipts/client/requests/ListValueReceiptsRequest.d.ts +7 -0
- package/dist/cjs/api/resources/valueReceipts/client/requests/RefreshValueReceiptRequest.d.ts +9 -0
- package/dist/cjs/api/resources/valueReceipts/client/requests/RefreshValueReceiptRequest.js +3 -0
- package/dist/cjs/api/resources/valueReceipts/client/requests/SealValueReceiptRequest.d.ts +9 -0
- package/dist/cjs/api/resources/valueReceipts/client/requests/SealValueReceiptRequest.js +3 -0
- package/dist/cjs/api/resources/valueReceipts/client/requests/SyncValueReceiptRequest.d.ts +28 -0
- package/dist/cjs/api/resources/valueReceipts/client/requests/SyncValueReceiptRequest.js +3 -0
- package/dist/cjs/api/resources/valueReceipts/client/requests/UnarchiveValueReceiptRequest.d.ts +9 -0
- package/dist/cjs/api/resources/valueReceipts/client/requests/UnarchiveValueReceiptRequest.js +3 -0
- package/dist/cjs/api/resources/valueReceipts/client/requests/index.d.ts +5 -0
- package/dist/cjs/api/resources/valueReceipts/index.d.ts +1 -0
- package/dist/cjs/api/resources/valueReceipts/index.js +1 -0
- package/dist/cjs/api/resources/valueReceipts/types/ListValueReceiptsRequestArchived.d.ts +5 -0
- package/dist/cjs/api/resources/valueReceipts/types/ListValueReceiptsRequestArchived.js +8 -0
- package/dist/cjs/api/resources/valueReceipts/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/valueReceipts/types/index.js +17 -0
- package/dist/cjs/api/types/Cost.d.ts +10 -0
- package/dist/cjs/api/types/Cost.js +3 -0
- package/dist/cjs/api/types/CostIngestResponse.d.ts +6 -0
- package/dist/cjs/api/types/CostIngestResponse.js +3 -0
- package/dist/cjs/api/types/CostOverride.d.ts +8 -0
- package/dist/cjs/api/types/CostOverride.js +3 -0
- package/dist/cjs/api/types/CreateOrderLineAttributeRequest.d.ts +1 -0
- package/dist/cjs/api/types/CreditBalance.d.ts +6 -0
- package/dist/cjs/api/types/CreditBenefitInput.d.ts +30 -0
- package/dist/cjs/api/types/CreditBenefitInput.js +20 -0
- package/dist/cjs/api/types/CreditBenefitOutput.d.ts +13 -0
- package/dist/cjs/api/types/CreditBenefitOutput.js +3 -0
- package/dist/cjs/api/types/CreditGrant.d.ts +11 -0
- package/dist/cjs/api/types/CreditGrant.js +3 -0
- package/dist/cjs/api/types/OneTimePerUnitInput.d.ts +21 -0
- package/dist/cjs/api/types/OneTimePerUnitInput.js +18 -0
- package/dist/cjs/api/types/Order.d.ts +2 -0
- package/dist/cjs/api/types/OrderBillingFrequencyOverride.d.ts +14 -0
- package/dist/cjs/api/types/OrderBillingFrequencyOverride.js +14 -0
- package/dist/cjs/api/types/PrecomputedCost.d.ts +17 -0
- package/dist/cjs/api/types/PrecomputedCost.js +3 -0
- package/dist/cjs/api/types/PricingInput.d.ts +46 -0
- package/dist/cjs/api/types/PricingInput.js +3 -0
- package/dist/cjs/api/types/PricingListResponse.d.ts +4 -0
- package/dist/cjs/api/types/PricingListResponse.js +3 -0
- package/dist/cjs/api/types/PricingOutput.d.ts +36 -0
- package/dist/cjs/api/types/PricingOutput.js +23 -0
- package/dist/cjs/api/types/PricingPricePointOutput.d.ts +29 -0
- package/dist/cjs/api/types/PricingPricePointOutput.js +17 -0
- package/dist/cjs/api/types/PricingResponse.d.ts +7 -0
- package/dist/cjs/api/types/PricingResponse.js +3 -0
- package/dist/cjs/api/types/ProductAttribution.d.ts +2 -0
- package/dist/cjs/api/types/ProductAttribution.js +3 -0
- package/dist/cjs/api/types/RecurringGraduatedInput.d.ts +22 -0
- package/dist/cjs/api/types/RecurringGraduatedInput.js +18 -0
- package/dist/cjs/api/types/RecurringPerUnitInput.d.ts +22 -0
- package/dist/cjs/api/types/RecurringPerUnitInput.js +18 -0
- package/dist/cjs/api/types/RecurringPercentOfTotalInput.d.ts +23 -0
- package/dist/cjs/api/types/RecurringPercentOfTotalInput.js +18 -0
- package/dist/cjs/api/types/RecurringVolumeInput.d.ts +22 -0
- package/dist/cjs/api/types/RecurringVolumeInput.js +18 -0
- package/dist/cjs/api/types/SeatBasedGraduatedInput.d.ts +22 -0
- package/dist/cjs/api/types/SeatBasedGraduatedInput.js +18 -0
- package/dist/cjs/api/types/SeatBasedPerUnitInput.d.ts +22 -0
- package/dist/cjs/api/types/SeatBasedPerUnitInput.js +18 -0
- package/dist/cjs/api/types/SeatBasedPrepaidCreditsInput.d.ts +25 -0
- package/dist/cjs/api/types/SeatBasedPrepaidCreditsInput.js +18 -0
- package/dist/cjs/api/types/SeatBasedVolumeInput.d.ts +22 -0
- package/dist/cjs/api/types/SeatBasedVolumeInput.js +18 -0
- package/dist/cjs/api/types/SimplePricePoint.d.ts +29 -0
- package/dist/cjs/api/types/SimplePricePoint.js +17 -0
- package/dist/cjs/api/types/SuccessResponse.d.ts +3 -0
- package/dist/cjs/api/types/SuccessResponse.js +3 -0
- package/dist/cjs/api/types/TieredPricePoint.d.ts +29 -0
- package/dist/cjs/api/types/TieredPricePoint.js +17 -0
- package/dist/cjs/api/types/TokenUsage.d.ts +12 -0
- package/dist/cjs/api/types/TokenUsage.js +3 -0
- package/dist/cjs/api/types/UsageCost.d.ts +15 -0
- package/dist/cjs/api/types/UsageCost.js +3 -0
- package/dist/cjs/api/types/UsageCostPlusInput.d.ts +23 -0
- package/dist/cjs/api/types/UsageCostPlusInput.js +18 -0
- package/dist/cjs/api/types/UsageGraduatedInput.d.ts +23 -0
- package/dist/cjs/api/types/UsageGraduatedInput.js +18 -0
- package/dist/cjs/api/types/UsagePerUnitInput.d.ts +23 -0
- package/dist/cjs/api/types/UsagePerUnitInput.js +18 -0
- package/dist/cjs/api/types/UsagePrepaidCreditsInput.d.ts +26 -0
- package/dist/cjs/api/types/UsagePrepaidCreditsInput.js +18 -0
- package/dist/cjs/api/types/UsageVolumeInput.d.ts +23 -0
- package/dist/cjs/api/types/UsageVolumeInput.js +18 -0
- package/dist/cjs/api/types/ValueReceiptDetail.d.ts +2 -0
- package/dist/cjs/api/types/ValueReceiptSummary.d.ts +2 -0
- package/dist/cjs/api/types/ValueReceiptSyncResponse.d.ts +6 -0
- package/dist/cjs/api/types/ValueReceiptSyncResponse.js +3 -0
- package/dist/cjs/api/types/index.d.ts +34 -0
- package/dist/cjs/api/types/index.js +34 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.d.mts +6 -0
- package/dist/esm/Client.mjs +12 -2
- package/dist/esm/api/resources/costs/client/Client.d.mts +38 -0
- package/dist/esm/api/resources/costs/client/Client.mjs +102 -0
- package/dist/esm/api/resources/costs/client/index.d.mts +1 -0
- package/dist/esm/api/resources/costs/client/index.mjs +1 -0
- package/dist/esm/api/resources/costs/client/requests/CostIngestRequest.d.mts +17 -0
- package/dist/esm/api/resources/costs/client/requests/CostIngestRequest.mjs +2 -0
- package/dist/esm/api/resources/costs/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/costs/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/costs/index.d.mts +1 -0
- package/dist/esm/api/resources/costs/index.mjs +1 -0
- package/dist/esm/api/resources/index.d.mts +5 -0
- package/dist/esm/api/resources/index.mjs +5 -0
- package/dist/esm/api/resources/orders/client/requests/CreateOrderRequest.d.mts +1 -0
- package/dist/esm/api/resources/pricing/client/Client.d.mts +71 -0
- package/dist/esm/api/resources/pricing/client/Client.mjs +247 -0
- package/dist/esm/api/resources/pricing/client/index.d.mts +1 -0
- package/dist/esm/api/resources/pricing/client/index.mjs +1 -0
- package/dist/esm/api/resources/pricing/client/requests/GetPricingRequest.d.mts +9 -0
- package/dist/esm/api/resources/pricing/client/requests/GetPricingRequest.mjs +2 -0
- package/dist/esm/api/resources/pricing/client/requests/ListPricingRequest.d.mts +10 -0
- package/dist/esm/api/resources/pricing/client/requests/ListPricingRequest.mjs +2 -0
- package/dist/esm/api/resources/pricing/client/requests/UpdatePricingRequest.d.mts +20 -0
- package/dist/esm/api/resources/pricing/client/requests/UpdatePricingRequest.mjs +2 -0
- package/dist/esm/api/resources/pricing/client/requests/index.d.mts +3 -0
- package/dist/esm/api/resources/pricing/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/pricing/index.d.mts +1 -0
- package/dist/esm/api/resources/pricing/index.mjs +1 -0
- package/dist/esm/api/resources/valueReceipts/client/Client.d.mts +85 -0
- package/dist/esm/api/resources/valueReceipts/client/Client.mjs +362 -1
- package/dist/esm/api/resources/valueReceipts/client/requests/ArchiveValueReceiptRequest.d.mts +9 -0
- package/dist/esm/api/resources/valueReceipts/client/requests/ArchiveValueReceiptRequest.mjs +2 -0
- package/dist/esm/api/resources/valueReceipts/client/requests/ListValueReceiptsRequest.d.mts +7 -0
- package/dist/esm/api/resources/valueReceipts/client/requests/RefreshValueReceiptRequest.d.mts +9 -0
- package/dist/esm/api/resources/valueReceipts/client/requests/RefreshValueReceiptRequest.mjs +2 -0
- package/dist/esm/api/resources/valueReceipts/client/requests/SealValueReceiptRequest.d.mts +9 -0
- package/dist/esm/api/resources/valueReceipts/client/requests/SealValueReceiptRequest.mjs +2 -0
- package/dist/esm/api/resources/valueReceipts/client/requests/SyncValueReceiptRequest.d.mts +28 -0
- package/dist/esm/api/resources/valueReceipts/client/requests/SyncValueReceiptRequest.mjs +2 -0
- package/dist/esm/api/resources/valueReceipts/client/requests/UnarchiveValueReceiptRequest.d.mts +9 -0
- package/dist/esm/api/resources/valueReceipts/client/requests/UnarchiveValueReceiptRequest.mjs +2 -0
- package/dist/esm/api/resources/valueReceipts/client/requests/index.d.mts +5 -0
- package/dist/esm/api/resources/valueReceipts/index.d.mts +1 -0
- package/dist/esm/api/resources/valueReceipts/index.mjs +1 -0
- package/dist/esm/api/resources/valueReceipts/types/ListValueReceiptsRequestArchived.d.mts +5 -0
- package/dist/esm/api/resources/valueReceipts/types/ListValueReceiptsRequestArchived.mjs +5 -0
- package/dist/esm/api/resources/valueReceipts/types/index.d.mts +1 -0
- package/dist/esm/api/resources/valueReceipts/types/index.mjs +1 -0
- package/dist/esm/api/types/Cost.d.mts +10 -0
- package/dist/esm/api/types/Cost.mjs +2 -0
- package/dist/esm/api/types/CostIngestResponse.d.mts +6 -0
- package/dist/esm/api/types/CostIngestResponse.mjs +2 -0
- package/dist/esm/api/types/CostOverride.d.mts +8 -0
- package/dist/esm/api/types/CostOverride.mjs +2 -0
- package/dist/esm/api/types/CreateOrderLineAttributeRequest.d.mts +1 -0
- package/dist/esm/api/types/CreditBalance.d.mts +6 -0
- package/dist/esm/api/types/CreditBenefitInput.d.mts +30 -0
- package/dist/esm/api/types/CreditBenefitInput.mjs +17 -0
- package/dist/esm/api/types/CreditBenefitOutput.d.mts +13 -0
- package/dist/esm/api/types/CreditBenefitOutput.mjs +2 -0
- package/dist/esm/api/types/CreditGrant.d.mts +11 -0
- package/dist/esm/api/types/CreditGrant.mjs +2 -0
- package/dist/esm/api/types/OneTimePerUnitInput.d.mts +21 -0
- package/dist/esm/api/types/OneTimePerUnitInput.mjs +15 -0
- package/dist/esm/api/types/Order.d.mts +2 -0
- package/dist/esm/api/types/OrderBillingFrequencyOverride.d.mts +14 -0
- package/dist/esm/api/types/OrderBillingFrequencyOverride.mjs +11 -0
- package/dist/esm/api/types/PrecomputedCost.d.mts +17 -0
- package/dist/esm/api/types/PrecomputedCost.mjs +2 -0
- package/dist/esm/api/types/PricingInput.d.mts +46 -0
- package/dist/esm/api/types/PricingInput.mjs +2 -0
- package/dist/esm/api/types/PricingListResponse.d.mts +4 -0
- package/dist/esm/api/types/PricingListResponse.mjs +2 -0
- package/dist/esm/api/types/PricingOutput.d.mts +36 -0
- package/dist/esm/api/types/PricingOutput.mjs +20 -0
- package/dist/esm/api/types/PricingPricePointOutput.d.mts +29 -0
- package/dist/esm/api/types/PricingPricePointOutput.mjs +14 -0
- package/dist/esm/api/types/PricingResponse.d.mts +7 -0
- package/dist/esm/api/types/PricingResponse.mjs +2 -0
- package/dist/esm/api/types/ProductAttribution.d.mts +2 -0
- package/dist/esm/api/types/ProductAttribution.mjs +2 -0
- package/dist/esm/api/types/RecurringGraduatedInput.d.mts +22 -0
- package/dist/esm/api/types/RecurringGraduatedInput.mjs +15 -0
- package/dist/esm/api/types/RecurringPerUnitInput.d.mts +22 -0
- package/dist/esm/api/types/RecurringPerUnitInput.mjs +15 -0
- package/dist/esm/api/types/RecurringPercentOfTotalInput.d.mts +23 -0
- package/dist/esm/api/types/RecurringPercentOfTotalInput.mjs +15 -0
- package/dist/esm/api/types/RecurringVolumeInput.d.mts +22 -0
- package/dist/esm/api/types/RecurringVolumeInput.mjs +15 -0
- package/dist/esm/api/types/SeatBasedGraduatedInput.d.mts +22 -0
- package/dist/esm/api/types/SeatBasedGraduatedInput.mjs +15 -0
- package/dist/esm/api/types/SeatBasedPerUnitInput.d.mts +22 -0
- package/dist/esm/api/types/SeatBasedPerUnitInput.mjs +15 -0
- package/dist/esm/api/types/SeatBasedPrepaidCreditsInput.d.mts +25 -0
- package/dist/esm/api/types/SeatBasedPrepaidCreditsInput.mjs +15 -0
- package/dist/esm/api/types/SeatBasedVolumeInput.d.mts +22 -0
- package/dist/esm/api/types/SeatBasedVolumeInput.mjs +15 -0
- package/dist/esm/api/types/SimplePricePoint.d.mts +29 -0
- package/dist/esm/api/types/SimplePricePoint.mjs +14 -0
- package/dist/esm/api/types/SuccessResponse.d.mts +3 -0
- package/dist/esm/api/types/SuccessResponse.mjs +2 -0
- package/dist/esm/api/types/TieredPricePoint.d.mts +29 -0
- package/dist/esm/api/types/TieredPricePoint.mjs +14 -0
- package/dist/esm/api/types/TokenUsage.d.mts +12 -0
- package/dist/esm/api/types/TokenUsage.mjs +2 -0
- package/dist/esm/api/types/UsageCost.d.mts +15 -0
- package/dist/esm/api/types/UsageCost.mjs +2 -0
- package/dist/esm/api/types/UsageCostPlusInput.d.mts +23 -0
- package/dist/esm/api/types/UsageCostPlusInput.mjs +15 -0
- package/dist/esm/api/types/UsageGraduatedInput.d.mts +23 -0
- package/dist/esm/api/types/UsageGraduatedInput.mjs +15 -0
- package/dist/esm/api/types/UsagePerUnitInput.d.mts +23 -0
- package/dist/esm/api/types/UsagePerUnitInput.mjs +15 -0
- package/dist/esm/api/types/UsagePrepaidCreditsInput.d.mts +26 -0
- package/dist/esm/api/types/UsagePrepaidCreditsInput.mjs +15 -0
- package/dist/esm/api/types/UsageVolumeInput.d.mts +23 -0
- package/dist/esm/api/types/UsageVolumeInput.mjs +15 -0
- package/dist/esm/api/types/ValueReceiptDetail.d.mts +2 -0
- package/dist/esm/api/types/ValueReceiptSummary.d.mts +2 -0
- package/dist/esm/api/types/ValueReceiptSyncResponse.d.mts +6 -0
- package/dist/esm/api/types/ValueReceiptSyncResponse.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +34 -0
- package/dist/esm/api/types/index.mjs +34 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +610 -7
package/dist/cjs/Client.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { Checkouts } from "./api/resources/checkouts/client/Client.js";
|
|
2
2
|
import { Contacts } from "./api/resources/contacts/client/Client.js";
|
|
3
|
+
import { Costs } from "./api/resources/costs/client/Client.js";
|
|
3
4
|
import { Credits } from "./api/resources/credits/client/Client.js";
|
|
4
5
|
import { CustomerPortals } from "./api/resources/customerPortals/client/Client.js";
|
|
5
6
|
import { Customers } from "./api/resources/customers/client/Client.js";
|
|
6
7
|
import { Invoices } from "./api/resources/invoices/client/Client.js";
|
|
7
8
|
import { Orders } from "./api/resources/orders/client/Client.js";
|
|
9
|
+
import { Pricing } from "./api/resources/pricing/client/Client.js";
|
|
8
10
|
import { Products } from "./api/resources/products/client/Client.js";
|
|
9
11
|
import { Signals } from "./api/resources/signals/client/Client.js";
|
|
10
12
|
import { ValueReceipts } from "./api/resources/valueReceipts/client/Client.js";
|
|
@@ -29,6 +31,8 @@ export declare class PaidClient {
|
|
|
29
31
|
protected _customerPortals: CustomerPortals | undefined;
|
|
30
32
|
protected _valueReceipts: ValueReceipts | undefined;
|
|
31
33
|
protected _webhooks: Webhooks | undefined;
|
|
34
|
+
protected _pricing: Pricing | undefined;
|
|
35
|
+
protected _costs: Costs | undefined;
|
|
32
36
|
constructor(_options: PaidClient.Options);
|
|
33
37
|
get products(): Products;
|
|
34
38
|
get customers(): Customers;
|
|
@@ -41,4 +45,6 @@ export declare class PaidClient {
|
|
|
41
45
|
get customerPortals(): CustomerPortals;
|
|
42
46
|
get valueReceipts(): ValueReceipts;
|
|
43
47
|
get webhooks(): Webhooks;
|
|
48
|
+
get pricing(): Pricing;
|
|
49
|
+
get costs(): Costs;
|
|
44
50
|
}
|
package/dist/cjs/Client.js
CHANGED
|
@@ -37,15 +37,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
37
37
|
exports.PaidClient = void 0;
|
|
38
38
|
const Client_js_1 = require("./api/resources/checkouts/client/Client.js");
|
|
39
39
|
const Client_js_2 = require("./api/resources/contacts/client/Client.js");
|
|
40
|
-
const Client_js_3 = require("./api/resources/
|
|
41
|
-
const Client_js_4 = require("./api/resources/
|
|
42
|
-
const Client_js_5 = require("./api/resources/
|
|
43
|
-
const Client_js_6 = require("./api/resources/
|
|
44
|
-
const Client_js_7 = require("./api/resources/
|
|
45
|
-
const Client_js_8 = require("./api/resources/
|
|
46
|
-
const Client_js_9 = require("./api/resources/
|
|
47
|
-
const Client_js_10 = require("./api/resources/
|
|
48
|
-
const Client_js_11 = require("./api/resources/
|
|
40
|
+
const Client_js_3 = require("./api/resources/costs/client/Client.js");
|
|
41
|
+
const Client_js_4 = require("./api/resources/credits/client/Client.js");
|
|
42
|
+
const Client_js_5 = require("./api/resources/customerPortals/client/Client.js");
|
|
43
|
+
const Client_js_6 = require("./api/resources/customers/client/Client.js");
|
|
44
|
+
const Client_js_7 = require("./api/resources/invoices/client/Client.js");
|
|
45
|
+
const Client_js_8 = require("./api/resources/orders/client/Client.js");
|
|
46
|
+
const Client_js_9 = require("./api/resources/pricing/client/Client.js");
|
|
47
|
+
const Client_js_10 = require("./api/resources/products/client/Client.js");
|
|
48
|
+
const Client_js_11 = require("./api/resources/signals/client/Client.js");
|
|
49
|
+
const Client_js_12 = require("./api/resources/valueReceipts/client/Client.js");
|
|
50
|
+
const Client_js_13 = require("./api/resources/webhooks/client/Client.js");
|
|
49
51
|
const headers_js_1 = require("./core/headers.js");
|
|
50
52
|
const core = __importStar(require("./core/index.js"));
|
|
51
53
|
class PaidClient {
|
|
@@ -53,19 +55,19 @@ class PaidClient {
|
|
|
53
55
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
54
56
|
"X-Fern-Language": "JavaScript",
|
|
55
57
|
"X-Fern-SDK-Name": "@paid-ai/paid-node",
|
|
56
|
-
"X-Fern-SDK-Version": "1.
|
|
57
|
-
"User-Agent": "@paid-ai/paid-node/1.
|
|
58
|
+
"X-Fern-SDK-Version": "1.6.0",
|
|
59
|
+
"User-Agent": "@paid-ai/paid-node/1.6.0",
|
|
58
60
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
59
61
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
60
62
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
61
63
|
}
|
|
62
64
|
get products() {
|
|
63
65
|
var _a;
|
|
64
|
-
return ((_a = this._products) !== null && _a !== void 0 ? _a : (this._products = new
|
|
66
|
+
return ((_a = this._products) !== null && _a !== void 0 ? _a : (this._products = new Client_js_10.Products(this._options)));
|
|
65
67
|
}
|
|
66
68
|
get customers() {
|
|
67
69
|
var _a;
|
|
68
|
-
return ((_a = this._customers) !== null && _a !== void 0 ? _a : (this._customers = new
|
|
70
|
+
return ((_a = this._customers) !== null && _a !== void 0 ? _a : (this._customers = new Client_js_6.Customers(this._options)));
|
|
69
71
|
}
|
|
70
72
|
get contacts() {
|
|
71
73
|
var _a;
|
|
@@ -73,19 +75,19 @@ class PaidClient {
|
|
|
73
75
|
}
|
|
74
76
|
get orders() {
|
|
75
77
|
var _a;
|
|
76
|
-
return ((_a = this._orders) !== null && _a !== void 0 ? _a : (this._orders = new
|
|
78
|
+
return ((_a = this._orders) !== null && _a !== void 0 ? _a : (this._orders = new Client_js_8.Orders(this._options)));
|
|
77
79
|
}
|
|
78
80
|
get invoices() {
|
|
79
81
|
var _a;
|
|
80
|
-
return ((_a = this._invoices) !== null && _a !== void 0 ? _a : (this._invoices = new
|
|
82
|
+
return ((_a = this._invoices) !== null && _a !== void 0 ? _a : (this._invoices = new Client_js_7.Invoices(this._options)));
|
|
81
83
|
}
|
|
82
84
|
get signals() {
|
|
83
85
|
var _a;
|
|
84
|
-
return ((_a = this._signals) !== null && _a !== void 0 ? _a : (this._signals = new
|
|
86
|
+
return ((_a = this._signals) !== null && _a !== void 0 ? _a : (this._signals = new Client_js_11.Signals(this._options)));
|
|
85
87
|
}
|
|
86
88
|
get credits() {
|
|
87
89
|
var _a;
|
|
88
|
-
return ((_a = this._credits) !== null && _a !== void 0 ? _a : (this._credits = new
|
|
90
|
+
return ((_a = this._credits) !== null && _a !== void 0 ? _a : (this._credits = new Client_js_4.Credits(this._options)));
|
|
89
91
|
}
|
|
90
92
|
get checkouts() {
|
|
91
93
|
var _a;
|
|
@@ -93,15 +95,23 @@ class PaidClient {
|
|
|
93
95
|
}
|
|
94
96
|
get customerPortals() {
|
|
95
97
|
var _a;
|
|
96
|
-
return ((_a = this._customerPortals) !== null && _a !== void 0 ? _a : (this._customerPortals = new
|
|
98
|
+
return ((_a = this._customerPortals) !== null && _a !== void 0 ? _a : (this._customerPortals = new Client_js_5.CustomerPortals(this._options)));
|
|
97
99
|
}
|
|
98
100
|
get valueReceipts() {
|
|
99
101
|
var _a;
|
|
100
|
-
return ((_a = this._valueReceipts) !== null && _a !== void 0 ? _a : (this._valueReceipts = new
|
|
102
|
+
return ((_a = this._valueReceipts) !== null && _a !== void 0 ? _a : (this._valueReceipts = new Client_js_12.ValueReceipts(this._options)));
|
|
101
103
|
}
|
|
102
104
|
get webhooks() {
|
|
103
105
|
var _a;
|
|
104
|
-
return ((_a = this._webhooks) !== null && _a !== void 0 ? _a : (this._webhooks = new
|
|
106
|
+
return ((_a = this._webhooks) !== null && _a !== void 0 ? _a : (this._webhooks = new Client_js_13.Webhooks(this._options)));
|
|
107
|
+
}
|
|
108
|
+
get pricing() {
|
|
109
|
+
var _a;
|
|
110
|
+
return ((_a = this._pricing) !== null && _a !== void 0 ? _a : (this._pricing = new Client_js_9.Pricing(this._options)));
|
|
111
|
+
}
|
|
112
|
+
get costs() {
|
|
113
|
+
var _a;
|
|
114
|
+
return ((_a = this._costs) !== null && _a !== void 0 ? _a : (this._costs = new Client_js_3.Costs(this._options)));
|
|
105
115
|
}
|
|
106
116
|
}
|
|
107
117
|
exports.PaidClient = PaidClient;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
|
|
2
|
+
import * as core from "../../../../core/index.js";
|
|
3
|
+
import * as Paid from "../../../index.js";
|
|
4
|
+
export declare namespace Costs {
|
|
5
|
+
interface Options extends BaseClientOptions {
|
|
6
|
+
}
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class Costs {
|
|
11
|
+
protected readonly _options: Costs.Options;
|
|
12
|
+
constructor(_options: Costs.Options);
|
|
13
|
+
/**
|
|
14
|
+
* Ingests a batch of cost records. Each record is either a pre-computed `cost` (caller supplies amount + currency) or a `usage` record (caller supplies vendor/model/token counts and Paid prices it server-side). The batch is all-or-nothing: if any record fails validation, the entire request is rejected with a 400 and nothing is persisted.
|
|
15
|
+
*
|
|
16
|
+
* @param {Paid.CostIngestRequest} request
|
|
17
|
+
* @param {Costs.RequestOptions} requestOptions - Request-specific configuration.
|
|
18
|
+
*
|
|
19
|
+
* @throws {@link Paid.BadRequestError}
|
|
20
|
+
* @throws {@link Paid.ForbiddenError}
|
|
21
|
+
* @throws {@link Paid.InternalServerError}
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* await client.costs.createCosts({
|
|
25
|
+
* costs: [{
|
|
26
|
+
* type: "cost",
|
|
27
|
+
* customer: {
|
|
28
|
+
* customerId: "customerId"
|
|
29
|
+
* },
|
|
30
|
+
* amount: 1.1,
|
|
31
|
+
* currency: "currency"
|
|
32
|
+
* }]
|
|
33
|
+
* })
|
|
34
|
+
*/
|
|
35
|
+
createCosts(request: Paid.CostIngestRequest, requestOptions?: Costs.RequestOptions): core.HttpResponsePromise<Paid.CostIngestResponse>;
|
|
36
|
+
private __createCosts;
|
|
37
|
+
protected _getAuthorizationHeader(): Promise<string>;
|
|
38
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
39
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
40
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
41
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
42
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
+
exports.Costs = void 0;
|
|
47
|
+
const headers_js_1 = require("../../../../core/headers.js");
|
|
48
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
49
|
+
const environments = __importStar(require("../../../../environments.js"));
|
|
50
|
+
const errors = __importStar(require("../../../../errors/index.js"));
|
|
51
|
+
const Paid = __importStar(require("../../../index.js"));
|
|
52
|
+
class Costs {
|
|
53
|
+
constructor(_options) {
|
|
54
|
+
this._options = _options;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Ingests a batch of cost records. Each record is either a pre-computed `cost` (caller supplies amount + currency) or a `usage` record (caller supplies vendor/model/token counts and Paid prices it server-side). The batch is all-or-nothing: if any record fails validation, the entire request is rejected with a 400 and nothing is persisted.
|
|
58
|
+
*
|
|
59
|
+
* @param {Paid.CostIngestRequest} request
|
|
60
|
+
* @param {Costs.RequestOptions} requestOptions - Request-specific configuration.
|
|
61
|
+
*
|
|
62
|
+
* @throws {@link Paid.BadRequestError}
|
|
63
|
+
* @throws {@link Paid.ForbiddenError}
|
|
64
|
+
* @throws {@link Paid.InternalServerError}
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* await client.costs.createCosts({
|
|
68
|
+
* costs: [{
|
|
69
|
+
* type: "cost",
|
|
70
|
+
* customer: {
|
|
71
|
+
* customerId: "customerId"
|
|
72
|
+
* },
|
|
73
|
+
* amount: 1.1,
|
|
74
|
+
* currency: "currency"
|
|
75
|
+
* }]
|
|
76
|
+
* })
|
|
77
|
+
*/
|
|
78
|
+
createCosts(request, requestOptions) {
|
|
79
|
+
return core.HttpResponsePromise.fromPromise(this.__createCosts(request, requestOptions));
|
|
80
|
+
}
|
|
81
|
+
__createCosts(request, requestOptions) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
84
|
+
const _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);
|
|
85
|
+
const _response = yield core.fetcher({
|
|
86
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, "cost/bulk"),
|
|
87
|
+
method: "POST",
|
|
88
|
+
headers: _headers,
|
|
89
|
+
contentType: "application/json",
|
|
90
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
91
|
+
requestType: "json",
|
|
92
|
+
body: request,
|
|
93
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
94
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
95
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
96
|
+
});
|
|
97
|
+
if (_response.ok) {
|
|
98
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
99
|
+
}
|
|
100
|
+
if (_response.error.reason === "status-code") {
|
|
101
|
+
switch (_response.error.statusCode) {
|
|
102
|
+
case 400:
|
|
103
|
+
throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
|
|
104
|
+
case 403:
|
|
105
|
+
throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
106
|
+
case 500:
|
|
107
|
+
throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
|
|
108
|
+
default:
|
|
109
|
+
throw new errors.PaidError({
|
|
110
|
+
statusCode: _response.error.statusCode,
|
|
111
|
+
body: _response.error.body,
|
|
112
|
+
rawResponse: _response.rawResponse,
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
switch (_response.error.reason) {
|
|
117
|
+
case "non-json":
|
|
118
|
+
throw new errors.PaidError({
|
|
119
|
+
statusCode: _response.error.statusCode,
|
|
120
|
+
body: _response.error.rawBody,
|
|
121
|
+
rawResponse: _response.rawResponse,
|
|
122
|
+
});
|
|
123
|
+
case "timeout":
|
|
124
|
+
throw new errors.PaidTimeoutError("Timeout exceeded when calling POST /cost/bulk.");
|
|
125
|
+
case "unknown":
|
|
126
|
+
throw new errors.PaidError({
|
|
127
|
+
message: _response.error.errorMessage,
|
|
128
|
+
rawResponse: _response.rawResponse,
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
_getAuthorizationHeader() {
|
|
134
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
135
|
+
return `Bearer ${yield core.Supplier.get(this._options.token)}`;
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
exports.Costs = Costs;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./requests/index.js"), exports);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type * as Paid from "../../../../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* costs: [{
|
|
6
|
+
* type: "cost",
|
|
7
|
+
* customer: {
|
|
8
|
+
* customerId: "customerId"
|
|
9
|
+
* },
|
|
10
|
+
* amount: 1.1,
|
|
11
|
+
* currency: "currency"
|
|
12
|
+
* }]
|
|
13
|
+
* }
|
|
14
|
+
*/
|
|
15
|
+
export interface CostIngestRequest {
|
|
16
|
+
costs: Paid.Cost[];
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { CostIngestRequest } from "./CostIngestRequest.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./client/index.js"), exports);
|
|
@@ -3,6 +3,8 @@ export * as checkouts from "./checkouts/index.js";
|
|
|
3
3
|
export * from "./checkouts/types/index.js";
|
|
4
4
|
export * from "./contacts/client/requests/index.js";
|
|
5
5
|
export * as contacts from "./contacts/index.js";
|
|
6
|
+
export * from "./costs/client/requests/index.js";
|
|
7
|
+
export * as costs from "./costs/index.js";
|
|
6
8
|
export * as credits from "./credits/index.js";
|
|
7
9
|
export * from "./customerPortals/client/requests/index.js";
|
|
8
10
|
export * as customerPortals from "./customerPortals/index.js";
|
|
@@ -13,12 +15,15 @@ export * as invoices from "./invoices/index.js";
|
|
|
13
15
|
export * from "./orders/client/requests/index.js";
|
|
14
16
|
export * as orders from "./orders/index.js";
|
|
15
17
|
export * from "./orders/types/index.js";
|
|
18
|
+
export * from "./pricing/client/requests/index.js";
|
|
19
|
+
export * as pricing from "./pricing/index.js";
|
|
16
20
|
export * from "./products/client/requests/index.js";
|
|
17
21
|
export * as products from "./products/index.js";
|
|
18
22
|
export * from "./signals/client/requests/index.js";
|
|
19
23
|
export * as signals from "./signals/index.js";
|
|
20
24
|
export * from "./valueReceipts/client/requests/index.js";
|
|
21
25
|
export * as valueReceipts from "./valueReceipts/index.js";
|
|
26
|
+
export * from "./valueReceipts/types/index.js";
|
|
22
27
|
export * from "./webhooks/client/requests/index.js";
|
|
23
28
|
export * as webhooks from "./webhooks/index.js";
|
|
24
29
|
export * from "./webhooks/types/index.js";
|
|
@@ -36,12 +36,14 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.webhooks = exports.valueReceipts = exports.signals = exports.products = exports.orders = exports.invoices = exports.customers = exports.customerPortals = exports.credits = exports.contacts = exports.checkouts = void 0;
|
|
39
|
+
exports.webhooks = exports.valueReceipts = exports.signals = exports.products = exports.pricing = exports.orders = exports.invoices = exports.customers = exports.customerPortals = exports.credits = exports.costs = exports.contacts = exports.checkouts = void 0;
|
|
40
40
|
__exportStar(require("./checkouts/client/requests/index.js"), exports);
|
|
41
41
|
exports.checkouts = __importStar(require("./checkouts/index.js"));
|
|
42
42
|
__exportStar(require("./checkouts/types/index.js"), exports);
|
|
43
43
|
__exportStar(require("./contacts/client/requests/index.js"), exports);
|
|
44
44
|
exports.contacts = __importStar(require("./contacts/index.js"));
|
|
45
|
+
__exportStar(require("./costs/client/requests/index.js"), exports);
|
|
46
|
+
exports.costs = __importStar(require("./costs/index.js"));
|
|
45
47
|
exports.credits = __importStar(require("./credits/index.js"));
|
|
46
48
|
__exportStar(require("./customerPortals/client/requests/index.js"), exports);
|
|
47
49
|
exports.customerPortals = __importStar(require("./customerPortals/index.js"));
|
|
@@ -52,12 +54,15 @@ exports.invoices = __importStar(require("./invoices/index.js"));
|
|
|
52
54
|
__exportStar(require("./orders/client/requests/index.js"), exports);
|
|
53
55
|
exports.orders = __importStar(require("./orders/index.js"));
|
|
54
56
|
__exportStar(require("./orders/types/index.js"), exports);
|
|
57
|
+
__exportStar(require("./pricing/client/requests/index.js"), exports);
|
|
58
|
+
exports.pricing = __importStar(require("./pricing/index.js"));
|
|
55
59
|
__exportStar(require("./products/client/requests/index.js"), exports);
|
|
56
60
|
exports.products = __importStar(require("./products/index.js"));
|
|
57
61
|
__exportStar(require("./signals/client/requests/index.js"), exports);
|
|
58
62
|
exports.signals = __importStar(require("./signals/index.js"));
|
|
59
63
|
__exportStar(require("./valueReceipts/client/requests/index.js"), exports);
|
|
60
64
|
exports.valueReceipts = __importStar(require("./valueReceipts/index.js"));
|
|
65
|
+
__exportStar(require("./valueReceipts/types/index.js"), exports);
|
|
61
66
|
__exportStar(require("./webhooks/client/requests/index.js"), exports);
|
|
62
67
|
exports.webhooks = __importStar(require("./webhooks/index.js"));
|
|
63
68
|
__exportStar(require("./webhooks/types/index.js"), exports);
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
|
|
2
|
+
import * as core from "../../../../core/index.js";
|
|
3
|
+
import * as Paid from "../../../index.js";
|
|
4
|
+
export declare namespace Pricing {
|
|
5
|
+
interface Options extends BaseClientOptions {
|
|
6
|
+
}
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class Pricing {
|
|
11
|
+
protected readonly _options: Pricing.Options;
|
|
12
|
+
constructor(_options: Pricing.Options);
|
|
13
|
+
/**
|
|
14
|
+
* Returns pricing for all product attributes of a product. Each entry includes the attribute's pricing configuration and credit benefits.
|
|
15
|
+
*
|
|
16
|
+
* @param {Paid.ListPricingRequest} request
|
|
17
|
+
* @param {Pricing.RequestOptions} requestOptions - Request-specific configuration.
|
|
18
|
+
*
|
|
19
|
+
* @throws {@link Paid.NotFoundError}
|
|
20
|
+
* @throws {@link Paid.InternalServerError}
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* await client.pricing.listPricing({
|
|
24
|
+
* productId: "productId"
|
|
25
|
+
* })
|
|
26
|
+
*/
|
|
27
|
+
listPricing(request: Paid.ListPricingRequest, requestOptions?: Pricing.RequestOptions): core.HttpResponsePromise<Paid.PricingListResponse>;
|
|
28
|
+
private __listPricing;
|
|
29
|
+
/**
|
|
30
|
+
* Returns pricing and credit benefits for a single product attribute.
|
|
31
|
+
*
|
|
32
|
+
* @param {Paid.GetPricingRequest} request
|
|
33
|
+
* @param {Pricing.RequestOptions} requestOptions - Request-specific configuration.
|
|
34
|
+
*
|
|
35
|
+
* @throws {@link Paid.NotFoundError}
|
|
36
|
+
* @throws {@link Paid.InternalServerError}
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* await client.pricing.getPricing({
|
|
40
|
+
* productAttributeId: "productAttributeId"
|
|
41
|
+
* })
|
|
42
|
+
*/
|
|
43
|
+
getPricing(request: Paid.GetPricingRequest, requestOptions?: Pricing.RequestOptions): core.HttpResponsePromise<Paid.PricingResponse>;
|
|
44
|
+
private __getPricing;
|
|
45
|
+
/**
|
|
46
|
+
* Updates pricing on an existing product attribute. If creditBenefits is provided, it fully replaces existing benefits. If omitted, existing benefits are preserved.
|
|
47
|
+
*
|
|
48
|
+
* @param {Paid.UpdatePricingRequest} request
|
|
49
|
+
* @param {Pricing.RequestOptions} requestOptions - Request-specific configuration.
|
|
50
|
+
*
|
|
51
|
+
* @throws {@link Paid.BadRequestError}
|
|
52
|
+
* @throws {@link Paid.NotFoundError}
|
|
53
|
+
* @throws {@link Paid.InternalServerError}
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* await client.pricing.updatePricing({
|
|
57
|
+
* productAttributeId: "productAttributeId",
|
|
58
|
+
* pricing: {
|
|
59
|
+
* pricingType: "RecurringPerUnit",
|
|
60
|
+
* billingFrequency: "Monthly",
|
|
61
|
+
* pricePoints: [{
|
|
62
|
+
* currency: "currency",
|
|
63
|
+
* unitPrice: 1.1
|
|
64
|
+
* }]
|
|
65
|
+
* }
|
|
66
|
+
* })
|
|
67
|
+
*/
|
|
68
|
+
updatePricing(request: Paid.UpdatePricingRequest, requestOptions?: Pricing.RequestOptions): core.HttpResponsePromise<Paid.PricingResponse>;
|
|
69
|
+
private __updatePricing;
|
|
70
|
+
protected _getAuthorizationHeader(): Promise<string>;
|
|
71
|
+
}
|