@commet/node 9.6.0 → 9.7.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 +51 -12
- package/dist/index.d.ts +51 -12
- package/dist/index.js +11 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -2
- package/dist/index.mjs.map +1 -1
- package/docs/ai-onboarding/commet-skill.md +1 -1
- package/docs/ai-onboarding/mcp-server.md +1 -1
- package/docs/api-reference/index.md +1 -1
- package/docs/api-reference/subscriptions.md +26 -1
- package/docs/documentation/better-auth.md +1 -8
- package/docs/documentation/customers/customer-portal.md +1 -7
- package/docs/documentation/customers/manage-customers.md +0 -6
- package/docs/documentation/error-handling.md +1 -1
- package/docs/documentation/finance/acceptable-use.md +1 -6
- package/docs/documentation/finance/finance-overview.md +0 -5
- package/docs/documentation/finance/local-currency-taxes.md +0 -6
- package/docs/documentation/finance/merchant-of-record.md +0 -7
- package/docs/documentation/finance/payouts-verification.md +0 -5
- package/docs/documentation/finance/payouts.md +0 -6
- package/docs/documentation/finance/supported-countries.md +1 -6
- package/docs/documentation/go/integrate-with-encore.md +1 -8
- package/docs/documentation/go/integrate-with-go.md +1 -8
- package/docs/documentation/invoicing/handle-failed-payments.md +3 -9
- package/docs/documentation/invoicing/invoices-and-billing-cycles.md +0 -6
- package/docs/documentation/java/integrate-with-java.md +1 -5
- package/docs/documentation/nodejs/integrate-with-astro.md +1 -8
- package/docs/documentation/nodejs/integrate-with-bun.md +1 -8
- package/docs/documentation/nodejs/integrate-with-express.md +1 -8
- package/docs/documentation/nodejs/integrate-with-hono.md +1 -8
- package/docs/documentation/nodejs/integrate-with-nextjs.md +1 -8
- package/docs/documentation/nodejs/integrate-with-nuxt.md +1 -8
- package/docs/documentation/nodejs/integrate-with-remix.md +1 -8
- package/docs/documentation/nodejs/integrate-with-sveltekit.md +1 -8
- package/docs/documentation/payments/accept-one-time-payments.md +0 -8
- package/docs/documentation/payments/payment-orchestration.md +0 -6
- package/docs/documentation/payments/payment-providers.md +0 -6
- package/docs/documentation/php/integrate-with-laravel.md +1 -8
- package/docs/documentation/php/integrate-with-php.md +1 -7
- package/docs/documentation/php/integrate-with-symfony.md +1 -8
- package/docs/documentation/plans/add-ons.md +0 -8
- package/docs/documentation/plans/configure-features.md +1 -8
- package/docs/documentation/plans/consumption-models.md +0 -7
- package/docs/documentation/plans/create-plans.md +0 -9
- package/docs/documentation/plans/credit-packs.md +0 -7
- package/docs/documentation/plans/one-time-payments.md +36 -7
- package/docs/documentation/plans/plan-groups.md +0 -6
- package/docs/documentation/python/integrate-with-django.md +1 -8
- package/docs/documentation/python/integrate-with-fastapi.md +1 -8
- package/docs/documentation/python/integrate-with-flask.md +1 -8
- package/docs/documentation/python/integrate-with-python.md +1 -8
- package/docs/documentation/sales/introductory-offers.md +1 -9
- package/docs/documentation/sales/offers.md +0 -8
- package/docs/documentation/sales/promo-codes.md +0 -7
- package/docs/documentation/sales/promotional-offers.md +0 -7
- package/docs/documentation/sales/regional-prices.md +0 -7
- package/docs/documentation/sales/trial-periods.md +0 -8
- package/docs/documentation/sdk-reference.md +1 -1
- package/docs/documentation/subscriptions/manage-subscriptions.md +2 -9
- package/docs/documentation/subscriptions/pay-in-advance.md +161 -0
- package/docs/documentation/subscriptions/plan-grants.md +0 -6
- package/docs/documentation/subscriptions/upgrade-and-downgrade-plans.md +1 -7
- package/docs/documentation/testing-sandbox.md +1 -1
- package/docs/documentation/usage/ai-token-billing.md +0 -6
- package/docs/documentation/usage/quota-management.md +1 -7
- package/docs/documentation/usage/seat-management.md +1 -7
- package/docs/documentation/usage/track-usage.md +1 -7
- package/docs/knowledge-base/how-do-discounts-work.md +0 -8
- package/docs/knowledge-base/how-do-free-plans-work-without-payment.md +1 -7
- package/docs/knowledge-base/how-do-monthly-quarterly-and-yearly-billing-work.md +0 -6
- package/docs/knowledge-base/how-do-trial-periods-work.md +1 -8
- package/docs/knowledge-base/how-does-billing-work.md +1 -1
- package/docs/knowledge-base/how-does-quota-based-billing-work.md +1 -7
- package/docs/knowledge-base/how-does-seat-based-billing-work.md +1 -7
- package/docs/knowledge-base/how-is-proration-calculated-when-changing-plans.md +0 -6
- package/docs/knowledge-base/what-happens-when-a-customer-changes-plans.md +0 -6
- package/docs/knowledge-base/what-happens-when-a-payment-fails.md +1 -7
- package/docs/knowledge-base/what-happens-when-you-change-your-prices.md +1 -7
- package/docs/knowledge-base/what-invoices-do-customers-receive-and-when.md +1 -7
- package/docs/manifest.json +8 -1
- package/docs/platform-documentation.md +1 -0
- package/docs/schemas.md +13 -4
- package/docs/webhooks/introduction.md +3 -3
- package/docs/webhooks.md +4 -4
- package/docs/webhooks.openapi.json +15 -5
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -709,7 +709,7 @@ var SubscriptionsResource = class {
|
|
|
709
709
|
options
|
|
710
710
|
);
|
|
711
711
|
}
|
|
712
|
-
/** Creates a hosted checkout
|
|
712
|
+
/** Creates a hosted checkout to update the payment method of an active, trialing or past_due subscription. Pending-payment subscriptions must use their payment checkout. */
|
|
713
713
|
async updatePaymentMethod(params, options) {
|
|
714
714
|
const { id, ...rest } = params;
|
|
715
715
|
return this.httpClient.post(
|
|
@@ -718,6 +718,15 @@ var SubscriptionsResource = class {
|
|
|
718
718
|
options
|
|
719
719
|
);
|
|
720
720
|
}
|
|
721
|
+
/** Creates a hosted checkout to pay billing periods of a recurring subscription in advance with any payment method. On an active subscription the paid periods start after the last paid period and replace any open prepaid-periods checkout. On a pending-payment subscription the first payment covers the requested periods and replaces its pending checkout. The billing interval does not change. */
|
|
722
|
+
async createPrepaidPeriodsCheckout(params, options) {
|
|
723
|
+
const { id, ...rest } = params;
|
|
724
|
+
return this.httpClient.post(
|
|
725
|
+
`/subscriptions/${id}/prepaid-periods`,
|
|
726
|
+
rest,
|
|
727
|
+
options
|
|
728
|
+
);
|
|
729
|
+
}
|
|
721
730
|
/** Preview proration details for an immediate plan change without applying it. Free-to-paid changes are never scheduled and the change-plan endpoint always returns hosted checkout for them. For paid plans, interval direction takes precedence: a longer interval is immediate and a shorter interval is scheduled. When the interval is unchanged, a higher-sort-order plan is immediate and a lower-sort-order plan is scheduled. A paid-to-free change is always scheduled. Returns credit, charge, and net amount. The target plan must belong to the same plan group as the current plan, otherwise a 400 with code `plans_not_in_same_group` is returned. A change between two free plans has nothing to prorate and returns a zero-amount estimate. Scheduled changes return a 400 with code `plan_change_scheduled`; apply those via the change-plan endpoint. Pass offerId to quote the destination plan with an Offer. */
|
|
722
731
|
async previewChange(params, options) {
|
|
723
732
|
const { id, ...rest } = params;
|
|
@@ -1015,7 +1024,7 @@ var CommetValidationError = class extends CommetAPIError {
|
|
|
1015
1024
|
|
|
1016
1025
|
// src/version.ts
|
|
1017
1026
|
var API_VERSION = "2026-08-27";
|
|
1018
|
-
var SDK_VERSION = "9.
|
|
1027
|
+
var SDK_VERSION = "9.7.0";
|
|
1019
1028
|
|
|
1020
1029
|
// src/utils/telemetry.ts
|
|
1021
1030
|
var registeredIntegrations = /* @__PURE__ */ new Set();
|