@commet/node 9.8.0 → 9.9.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/index.d.mts +216 -23
- package/dist/index.d.ts +216 -23
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.map +1 -1
- package/docs/api-reference/customers.md +2 -0
- package/docs/api-reference/generated-webhooks.md +2 -2
- package/docs/api-reference/index.md +1 -1
- package/docs/api-reference/plans.md +8 -3
- package/docs/api-reference/subscriptions.md +7 -5
- package/docs/documentation/cli.md +60 -49
- package/docs/documentation/create-api-key.md +3 -1
- package/docs/documentation/customers/customer-portal.md +10 -2
- package/docs/documentation/customers/manage-customers.md +2 -1
- package/docs/documentation/finance/payouts.md +11 -0
- package/docs/documentation/finance/supported-countries.md +5 -5
- package/docs/documentation/invoicing/handle-failed-payments.md +9 -9
- package/docs/documentation/payments/accept-one-time-payments.md +1 -1
- package/docs/documentation/payments/payment-orchestration.md +2 -0
- package/docs/documentation/payments/payment-providers.md +46 -0
- package/docs/documentation/payments/transactions-refunds-and-retries.md +1 -1
- package/docs/documentation/plans/add-ons.md +1 -1
- package/docs/documentation/plans/consumption-models.md +44 -9
- package/docs/documentation/plans/credit-packs.md +49 -1
- package/docs/documentation/plans/one-time-payments.md +3 -3
- package/docs/documentation/plans/plan-groups.md +46 -10
- package/docs/documentation/platform/dashboard-metrics-and-events.md +40 -9
- package/docs/documentation/sales/connect-dub-affiliates.md +52 -0
- package/docs/documentation/sales/introductory-offers.md +7 -13
- package/docs/documentation/sales/offers.md +10 -6
- package/docs/documentation/sales/promo-codes.md +47 -17
- package/docs/documentation/sales/promotional-offers.md +6 -7
- package/docs/documentation/sales/regional-prices.md +16 -0
- package/docs/documentation/sales/trial-periods.md +67 -40
- package/docs/documentation/subscriptions/manage-subscriptions.md +65 -2
- package/docs/documentation/subscriptions/pay-in-advance.md +4 -7
- package/docs/documentation/subscriptions/upgrade-and-downgrade-plans.md +20 -2
- package/docs/documentation/testing-sandbox.md +2 -0
- package/docs/documentation/usage/track-usage.md +23 -0
- package/docs/errors/index.md +1 -0
- package/docs/errors/plan_balance_limit_reached.md +22 -0
- package/docs/knowledge-base/how-do-credits-credit-packs-and-customer-credits-differ.md +8 -8
- package/docs/knowledge-base/how-do-discounts-work.md +7 -5
- package/docs/knowledge-base/how-do-free-plans-work-without-payment.md +14 -8
- package/docs/knowledge-base/how-do-offers-promo-codes-and-card-promotions-work-together.md +1 -1
- package/docs/knowledge-base/how-do-trial-periods-work.md +30 -24
- package/docs/knowledge-base/how-does-billing-work.md +1 -0
- package/docs/knowledge-base/what-happens-when-a-payment-fails.md +11 -9
- package/docs/manifest.json +12 -2
- package/docs/platform-documentation.md +1 -0
- package/docs/schemas.md +27 -14
- package/docs/webhooks/introduction.md +14 -12
- package/docs/webhooks.md +42 -6
- package/docs/webhooks.openapi.json +857 -745
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -490,7 +490,7 @@ var PlansResource = class {
|
|
|
490
490
|
const { id } = params;
|
|
491
491
|
return this.httpClient.get(`/plans/${id}`, void 0, options);
|
|
492
492
|
}
|
|
493
|
-
/** Update a plan's name, description, visibility, default status, metadata, what happens to its unused plan credits, or its plan credit limit. */
|
|
493
|
+
/** Update a plan's name, description, visibility, default status, metadata, overage behavior, what happens to its unused plan credits or plan balance, or its plan credit or plan balance limit. */
|
|
494
494
|
async update(params, options) {
|
|
495
495
|
const { id, ...rest } = params;
|
|
496
496
|
return this.httpClient.patch(`/plans/${id}`, rest, options);
|
|
@@ -509,7 +509,7 @@ var PlansResource = class {
|
|
|
509
509
|
async list(params, options) {
|
|
510
510
|
return this.httpClient.get("/plans", params, options);
|
|
511
511
|
}
|
|
512
|
-
/** Create a new plan with optional consumption model, visibility, and plan
|
|
512
|
+
/** Create a new plan with optional consumption model, visibility, plan group assignment, overage behavior, and the rollover and spend limit of its plan credits or plan balance. */
|
|
513
513
|
async create(params, options) {
|
|
514
514
|
return this.httpClient.post("/plans", params, options);
|
|
515
515
|
}
|
|
@@ -639,7 +639,7 @@ var SubscriptionsResource = class {
|
|
|
639
639
|
const { id, ...rest } = params;
|
|
640
640
|
return this.httpClient.post(`/subscriptions/${id}/addons`, rest, options);
|
|
641
641
|
}
|
|
642
|
-
/** Read whether the subscription
|
|
642
|
+
/** Read whether the subscription tops up automatically with its saved payment method when its available credits or balance reach a threshold, with the top-ups used this period and the last failure. */
|
|
643
643
|
async getAutoTopUp(params, options) {
|
|
644
644
|
const { id } = params;
|
|
645
645
|
return this.httpClient.get(
|
|
@@ -648,7 +648,7 @@ var SubscriptionsResource = class {
|
|
|
648
648
|
options
|
|
649
649
|
);
|
|
650
650
|
}
|
|
651
|
-
/** Turn automatic
|
|
651
|
+
/** Turn automatic top-ups on or off and set the threshold, the size of each top-up and the maximum top-ups per period. Send only the fields that change. On a credits plan each top-up buys `quantity` credits; on a balance plan it adds `amount` in minor units of the subscription currency, plus tax, and `threshold` is in the same minor units. Enabling requires a plan that sells credits or has balance top-ups on. The size must be at least the plan's minimum when auto top-up is enabled or when the size changes, so turning it off keeps working after the minimum rises. Saving it enabled resumes a paused auto top-up. */
|
|
652
652
|
async updateAutoTopUp(params, options) {
|
|
653
653
|
const { id, ...rest } = params;
|
|
654
654
|
return this.httpClient.patch(
|
|
@@ -666,7 +666,7 @@ var SubscriptionsResource = class {
|
|
|
666
666
|
options
|
|
667
667
|
);
|
|
668
668
|
}
|
|
669
|
-
/** Top up a subscription
|
|
669
|
+
/** Top up a balance subscription. Charges the customer's payment method for the amount plus tax, adds it to the subscription's purchased balance (after paying back any overage owed on the plan balance), creates its invoice and emits `balance.topped_up`. Purchased balance is spent after the plan balance and is kept until the subscription ends. Rejected with 400 when the subscription is not on a balance plan, its plan has top-ups turned off, or the amount is below the effective minimum: the plan's minimum top-up in the subscription currency, raised to the currency's minimum charge. */
|
|
670
670
|
async topupBalance(params, options) {
|
|
671
671
|
const { id, ...rest } = params;
|
|
672
672
|
return this.httpClient.post(
|
|
@@ -1051,7 +1051,7 @@ var CommetValidationError = class extends CommetAPIError {
|
|
|
1051
1051
|
|
|
1052
1052
|
// src/version.ts
|
|
1053
1053
|
var API_VERSION = "2026-08-27";
|
|
1054
|
-
var SDK_VERSION = "9.
|
|
1054
|
+
var SDK_VERSION = "9.9.0";
|
|
1055
1055
|
|
|
1056
1056
|
// src/utils/telemetry.ts
|
|
1057
1057
|
var registeredIntegrations = /* @__PURE__ */ new Set();
|