@commet/node 9.4.0 → 9.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/index.d.mts +41 -41
- package/dist/index.d.ts +41 -41
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/docs/ai-onboarding/ai-onboarding.md +2 -3
- package/docs/ai-onboarding/billing-best-practices-skill.md +2 -3
- package/docs/ai-onboarding/commet-skill.md +4 -5
- package/docs/ai-onboarding/mcp-server.md +8 -9
- package/docs/ai-onboarding/pricing-models-skill.md +2 -3
- package/docs/ai-onboarding/subscription-patterns-skill.md +2 -3
- package/docs/api-reference/offers.md +2 -2
- package/docs/api-reference/plans.md +1 -1
- package/docs/api-reference/promo-codes.md +3 -3
- package/docs/api-reference/subscriptions.md +4 -4
- package/docs/documentation/api-versioning.md +2 -2
- package/docs/documentation/better-auth.md +0 -1
- package/docs/documentation/choose-a-billing-model.md +14 -8
- package/docs/documentation/cli.md +14 -15
- package/docs/documentation/create-api-key.md +0 -1
- package/docs/documentation/customers/customer-credits.md +0 -1
- package/docs/documentation/customers/customer-portal.md +14 -2
- package/docs/documentation/customers/manage-customers.md +1 -2
- package/docs/documentation/error-handling.md +1 -2
- package/docs/documentation/examples.md +0 -1
- package/docs/documentation/finance/acceptable-use.md +0 -1
- package/docs/documentation/finance/finance-overview.md +0 -1
- package/docs/documentation/finance/local-currency-taxes.md +0 -1
- package/docs/documentation/finance/merchant-of-record.md +0 -1
- package/docs/documentation/finance/payouts-verification.md +6 -3
- package/docs/documentation/finance/payouts.md +0 -1
- package/docs/documentation/finance/supported-countries.md +0 -1
- package/docs/documentation/go/integrate-with-encore.md +7 -8
- package/docs/documentation/go/integrate-with-go.md +8 -9
- package/docs/documentation/introduction.md +3 -4
- package/docs/documentation/invoicing/handle-failed-payments.md +9 -4
- package/docs/documentation/invoicing/invoices-and-billing-cycles.md +10 -10
- package/docs/documentation/invoicing/manage-invoices.md +0 -1
- package/docs/documentation/java/integrate-with-java.md +6 -7
- package/docs/documentation/nodejs/integrate-with-astro.md +6 -7
- package/docs/documentation/nodejs/integrate-with-bun.md +6 -7
- package/docs/documentation/nodejs/integrate-with-express.md +7 -8
- package/docs/documentation/nodejs/integrate-with-hono.md +7 -8
- package/docs/documentation/nodejs/integrate-with-nextjs.md +6 -7
- package/docs/documentation/nodejs/integrate-with-nuxt.md +6 -7
- package/docs/documentation/nodejs/integrate-with-remix.md +6 -7
- package/docs/documentation/nodejs/integrate-with-sveltekit.md +6 -7
- package/docs/documentation/payments/accept-one-time-payments.md +0 -1
- package/docs/documentation/payments/payment-orchestration.md +0 -1
- package/docs/documentation/payments/payment-providers.md +0 -1
- package/docs/documentation/payments/transactions-refunds-and-retries.md +2 -1
- package/docs/documentation/php/integrate-with-laravel.md +8 -9
- package/docs/documentation/php/integrate-with-php.md +6 -7
- package/docs/documentation/php/integrate-with-symfony.md +7 -8
- package/docs/documentation/plans/add-ons.md +0 -1
- package/docs/documentation/plans/balance-and-top-ups.md +1 -2
- package/docs/documentation/plans/configure-features.md +0 -1
- package/docs/documentation/plans/consumption-models.md +7 -8
- package/docs/documentation/plans/create-plans.md +0 -1
- package/docs/documentation/plans/credit-packs.md +0 -1
- package/docs/documentation/plans/one-time-payments.md +0 -1
- package/docs/documentation/plans/plan-groups.md +0 -1
- package/docs/documentation/platform/custom-domains.md +0 -1
- package/docs/documentation/platform/dashboard-metrics-and-events.md +0 -1
- package/docs/documentation/platform/members-and-permissions.md +0 -1
- package/docs/documentation/platform/organization-settings.md +0 -1
- package/docs/documentation/python/integrate-with-django.md +8 -9
- package/docs/documentation/python/integrate-with-fastapi.md +8 -9
- package/docs/documentation/python/integrate-with-flask.md +8 -9
- package/docs/documentation/python/integrate-with-python.md +6 -7
- package/docs/documentation/sales/card-promotions.md +0 -1
- package/docs/documentation/sales/introductory-offers.md +0 -1
- package/docs/documentation/sales/offers.md +0 -1
- package/docs/documentation/sales/promo-codes.md +19 -5
- package/docs/documentation/sales/promotional-offers.md +1 -2
- package/docs/documentation/sales/regional-prices.md +0 -1
- package/docs/documentation/sales/trial-periods.md +8 -8
- package/docs/documentation/sdk-reference.md +1 -2
- package/docs/documentation/subscriptions/manage-subscriptions.md +2 -1
- package/docs/documentation/subscriptions/plan-grants.md +0 -1
- package/docs/documentation/subscriptions/upgrade-and-downgrade-plans.md +0 -1
- package/docs/documentation/testing-sandbox.md +0 -1
- package/docs/documentation/usage/ai-token-billing.md +0 -1
- package/docs/documentation/usage/quota-management.md +0 -1
- package/docs/documentation/usage/seat-management.md +0 -1
- package/docs/documentation/usage/track-usage.md +0 -1
- package/docs/knowledge-base/how-do-balance-and-top-ups-work.md +1 -2
- package/docs/knowledge-base/how-do-credits-credit-packs-and-customer-credits-differ.md +0 -1
- package/docs/knowledge-base/how-do-discounts-work.md +0 -1
- package/docs/knowledge-base/how-do-free-plans-work-without-payment.md +8 -9
- package/docs/knowledge-base/how-do-monthly-quarterly-and-yearly-billing-work.md +6 -7
- package/docs/knowledge-base/how-do-offers-promo-codes-and-card-promotions-work-together.md +0 -1
- package/docs/knowledge-base/how-do-trial-periods-work.md +0 -1
- package/docs/knowledge-base/how-does-billing-work.md +0 -1
- package/docs/knowledge-base/how-does-payment-routing-work.md +0 -1
- package/docs/knowledge-base/how-does-quota-based-billing-work.md +0 -1
- package/docs/knowledge-base/how-does-seat-based-billing-work.md +0 -1
- package/docs/knowledge-base/how-is-proration-calculated-when-changing-plans.md +1 -2
- package/docs/knowledge-base/what-happens-when-a-customer-changes-plans.md +2 -1
- package/docs/knowledge-base/what-happens-when-a-payment-fails.md +0 -1
- package/docs/knowledge-base/what-happens-when-you-change-your-prices.md +0 -1
- package/docs/knowledge-base/what-happens-when-you-refund-or-retry-a-transaction.md +0 -1
- package/docs/knowledge-base/what-invoices-do-customers-receive-and-when.md +13 -14
- package/docs/manifest.json +72 -157
- package/docs/platform-documentation.md +69 -155
- package/docs/schemas.md +10 -9
- package/docs/webhooks/introduction.md +0 -1
- package/docs/webhooks.md +2 -0
- package/docs/webhooks.openapi.json +11058 -0
- package/package.json +1 -1
- package/docs/ai-onboarding/meta.json +0 -17
- package/docs/api-reference/meta.json +0 -7
- package/docs/documentation/customers/meta.json +0 -5
- package/docs/documentation/finance/meta.json +0 -13
- package/docs/documentation/go/meta.json +0 -5
- package/docs/documentation/invoicing/meta.json +0 -9
- package/docs/documentation/java/meta.json +0 -5
- package/docs/documentation/meta.json +0 -36
- package/docs/documentation/nodejs/meta.json +0 -14
- package/docs/documentation/payments/meta.json +0 -10
- package/docs/documentation/php/meta.json +0 -9
- package/docs/documentation/plans/meta.json +0 -14
- package/docs/documentation/platform/meta.json +0 -10
- package/docs/documentation/python/meta.json +0 -10
- package/docs/documentation/sales/meta.json +0 -13
- package/docs/documentation/subscriptions/meta.json +0 -9
- package/docs/documentation/usage/meta.json +0 -10
- package/docs/knowledge-base/meta.json +0 -29
- package/docs/meta.json +0 -11
- package/docs/webhooks/addon-activated.md +0 -44
- package/docs/webhooks/addon-deactivated.md +0 -40
- package/docs/webhooks/balance-depleted.md +0 -37
- package/docs/webhooks/balance-low.md +0 -39
- package/docs/webhooks/balance-topped-up.md +0 -41
- package/docs/webhooks/checkout-ready.md +0 -43
- package/docs/webhooks/credits-depleted.md +0 -35
- package/docs/webhooks/credits-expired.md +0 -35
- package/docs/webhooks/credits-granted.md +0 -37
- package/docs/webhooks/credits-low.md +0 -39
- package/docs/webhooks/credits-purchased.md +0 -41
- package/docs/webhooks/customer-created.md +0 -49
- package/docs/webhooks/customer-state-changed.md +0 -134
- package/docs/webhooks/customer-updated.md +0 -49
- package/docs/webhooks/invoice-created.md +0 -45
- package/docs/webhooks/invoice-overdue.md +0 -53
- package/docs/webhooks/invoice-upcoming.md +0 -43
- package/docs/webhooks/invoice-voided.md +0 -53
- package/docs/webhooks/meta.json +0 -89
- package/docs/webhooks/payment-dispute-resolved.md +0 -52
- package/docs/webhooks/payment-disputed.md +0 -49
- package/docs/webhooks/payment-failed.md +0 -178
- package/docs/webhooks/payment-link-canceled.md +0 -41
- package/docs/webhooks/payment-link-completed.md +0 -89
- package/docs/webhooks/payment-link-created.md +0 -41
- package/docs/webhooks/payment-link-failed.md +0 -87
- package/docs/webhooks/payment-method-attached.md +0 -44
- package/docs/webhooks/payment-method-updated.md +0 -37
- package/docs/webhooks/payment-received.md +0 -202
- package/docs/webhooks/payment-recovered.md +0 -43
- package/docs/webhooks/payment-refunded.md +0 -47
- package/docs/webhooks/payment-retry-failed.md +0 -39
- package/docs/webhooks/payout-available.md +0 -33
- package/docs/webhooks/payout-created.md +0 -48
- package/docs/webhooks/payout-failed.md +0 -52
- package/docs/webhooks/payout-paid.md +0 -48
- package/docs/webhooks/plan-grant-created.md +0 -74
- package/docs/webhooks/plan-grant-expired.md +0 -86
- package/docs/webhooks/plan-grant-revoked.md +0 -86
- package/docs/webhooks/plan-grant-updated.md +0 -86
- package/docs/webhooks/quota-exceeded.md +0 -44
- package/docs/webhooks/quota-threshold-reached.md +0 -41
- package/docs/webhooks/seats-limit-reached.md +0 -39
- package/docs/webhooks/seats-updated.md +0 -39
- package/docs/webhooks/subscription-activated.md +0 -43
- package/docs/webhooks/subscription-canceled.md +0 -58
- package/docs/webhooks/subscription-cancellation-revoked.md +0 -37
- package/docs/webhooks/subscription-cancellation-scheduled.md +0 -45
- package/docs/webhooks/subscription-created.md +0 -35
- package/docs/webhooks/subscription-past-due.md +0 -43
- package/docs/webhooks/subscription-pause-revoked.md +0 -27
- package/docs/webhooks/subscription-pause-scheduled.md +0 -35
- package/docs/webhooks/subscription-pause-updated.md +0 -31
- package/docs/webhooks/subscription-paused.md +0 -35
- package/docs/webhooks/subscription-plan-change-revoked.md +0 -50
- package/docs/webhooks/subscription-plan-change-scheduled.md +0 -55
- package/docs/webhooks/subscription-plan-changed.md +0 -43
- package/docs/webhooks/subscription-reactivated.md +0 -53
- package/docs/webhooks/subscription-resume-failed.md +0 -33
- package/docs/webhooks/subscription-resumed.md +0 -35
- package/docs/webhooks/subscription-updated.md +0 -39
- package/docs/webhooks/trial-checkout-ready.md +0 -39
- package/docs/webhooks/trial-converted.md +0 -39
- package/docs/webhooks/trial-expired.md +0 -39
- package/docs/webhooks/trial-started.md +0 -46
- package/docs/webhooks/trial-will-end.md +0 -41
- package/docs/webhooks/usage-recorded.md +0 -41
package/dist/index.d.mts
CHANGED
|
@@ -14,7 +14,7 @@ type FeatureDef = {
|
|
|
14
14
|
description?: string;
|
|
15
15
|
};
|
|
16
16
|
interface PriceDef {
|
|
17
|
-
interval: "weekly" | "monthly" | "quarterly" | "yearly" | "one_time";
|
|
17
|
+
interval: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | "one_time";
|
|
18
18
|
/** Rate scale: 10000 = $1.00 */
|
|
19
19
|
amount: number;
|
|
20
20
|
trialDays?: number;
|
|
@@ -123,7 +123,7 @@ type ResolvedPlanCode<TConfig> = [InferPlanCodes<TConfig>] extends [
|
|
|
123
123
|
never
|
|
124
124
|
] ? string : InferPlanCodes<TConfig>;
|
|
125
125
|
|
|
126
|
-
type BillingInterval = "weekly" | "monthly" | "quarterly" | "yearly" | "one_time";
|
|
126
|
+
type BillingInterval = "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | "one_time";
|
|
127
127
|
type ConsumptionModel = "metered" | "credits" | "balance";
|
|
128
128
|
type FeatureType = "boolean" | "usage" | "seats" | "quota";
|
|
129
129
|
type InvoiceType = "recurring" | "overage" | "plan_change" | "adjustment" | "credit_purchase" | "balance_topup" | "addon_activation" | "one_time_payment" | "reactivation" | "resume";
|
|
@@ -783,14 +783,14 @@ interface Offer {
|
|
|
783
783
|
type: "percentage";
|
|
784
784
|
durationCycles: number | null;
|
|
785
785
|
/** Unit the phase duration is counted in. Only a fixed-price phase may set it, because its amount is declared rather than derived from the plan. Defaults to the plan's own billing interval. */
|
|
786
|
-
durationInterval: "weekly" | "monthly" | "quarterly" | "yearly" | null;
|
|
786
|
+
durationInterval: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | null;
|
|
787
787
|
/** Discount in basis points. 5000 means 50%. */
|
|
788
788
|
percentage: number;
|
|
789
789
|
} | {
|
|
790
790
|
type: "amount_off";
|
|
791
791
|
durationCycles: number | null;
|
|
792
792
|
/** Unit the phase duration is counted in. Only a fixed-price phase may set it, because its amount is declared rather than derived from the plan. Defaults to the plan's own billing interval. */
|
|
793
|
-
durationInterval: "weekly" | "monthly" | "quarterly" | "yearly" | null;
|
|
793
|
+
durationInterval: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | null;
|
|
794
794
|
amounts: Array<{
|
|
795
795
|
currency: string;
|
|
796
796
|
/** Amount in the currency's minor unit (for example, cents for USD). */
|
|
@@ -800,7 +800,7 @@ interface Offer {
|
|
|
800
800
|
type: "fixed_price";
|
|
801
801
|
durationCycles: number | null;
|
|
802
802
|
/** Unit the phase duration is counted in. Only a fixed-price phase may set it, because its amount is declared rather than derived from the plan. Defaults to the plan's own billing interval. */
|
|
803
|
-
durationInterval: "weekly" | "monthly" | "quarterly" | "yearly" | null;
|
|
803
|
+
durationInterval: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | null;
|
|
804
804
|
prices: Array<{
|
|
805
805
|
currency: string;
|
|
806
806
|
/** Amount in the currency's minor unit (for example, cents for USD). */
|
|
@@ -988,7 +988,7 @@ type PlanChange = {
|
|
|
988
988
|
} | {
|
|
989
989
|
type: "percentage";
|
|
990
990
|
durationCycles: number | null;
|
|
991
|
-
durationInterval: "weekly" | "monthly" | "quarterly" | "yearly" | null;
|
|
991
|
+
durationInterval: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | null;
|
|
992
992
|
startsAt: string | null;
|
|
993
993
|
endsAt: string | null;
|
|
994
994
|
/** Discount in basis points. 5000 means 50%. */
|
|
@@ -996,7 +996,7 @@ type PlanChange = {
|
|
|
996
996
|
} | {
|
|
997
997
|
type: "amount_off";
|
|
998
998
|
durationCycles: number | null;
|
|
999
|
-
durationInterval: "weekly" | "monthly" | "quarterly" | "yearly" | null;
|
|
999
|
+
durationInterval: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | null;
|
|
1000
1000
|
startsAt: string | null;
|
|
1001
1001
|
endsAt: string | null;
|
|
1002
1002
|
/** Discount in the application currency's minor unit. */
|
|
@@ -1004,7 +1004,7 @@ type PlanChange = {
|
|
|
1004
1004
|
} | {
|
|
1005
1005
|
type: "fixed_price";
|
|
1006
1006
|
durationCycles: number | null;
|
|
1007
|
-
durationInterval: "weekly" | "monthly" | "quarterly" | "yearly" | null;
|
|
1007
|
+
durationInterval: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | null;
|
|
1008
1008
|
startsAt: string | null;
|
|
1009
1009
|
endsAt: string | null;
|
|
1010
1010
|
/** Fixed price in the application currency's minor unit. */
|
|
@@ -1089,7 +1089,7 @@ type PlanChange = {
|
|
|
1089
1089
|
} | {
|
|
1090
1090
|
type: "percentage";
|
|
1091
1091
|
durationCycles: number | null;
|
|
1092
|
-
durationInterval: "weekly" | "monthly" | "quarterly" | "yearly" | null;
|
|
1092
|
+
durationInterval: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | null;
|
|
1093
1093
|
startsAt: string | null;
|
|
1094
1094
|
endsAt: string | null;
|
|
1095
1095
|
/** Discount in basis points. 5000 means 50%. */
|
|
@@ -1097,7 +1097,7 @@ type PlanChange = {
|
|
|
1097
1097
|
} | {
|
|
1098
1098
|
type: "amount_off";
|
|
1099
1099
|
durationCycles: number | null;
|
|
1100
|
-
durationInterval: "weekly" | "monthly" | "quarterly" | "yearly" | null;
|
|
1100
|
+
durationInterval: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | null;
|
|
1101
1101
|
startsAt: string | null;
|
|
1102
1102
|
endsAt: string | null;
|
|
1103
1103
|
/** Discount in the application currency's minor unit. */
|
|
@@ -1105,7 +1105,7 @@ type PlanChange = {
|
|
|
1105
1105
|
} | {
|
|
1106
1106
|
type: "fixed_price";
|
|
1107
1107
|
durationCycles: number | null;
|
|
1108
|
-
durationInterval: "weekly" | "monthly" | "quarterly" | "yearly" | null;
|
|
1108
|
+
durationInterval: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | null;
|
|
1109
1109
|
startsAt: string | null;
|
|
1110
1110
|
endsAt: string | null;
|
|
1111
1111
|
/** Fixed price in the application currency's minor unit. */
|
|
@@ -1292,7 +1292,7 @@ interface PreviewChange {
|
|
|
1292
1292
|
} | {
|
|
1293
1293
|
type: "percentage";
|
|
1294
1294
|
durationCycles: number | null;
|
|
1295
|
-
durationInterval: "weekly" | "monthly" | "quarterly" | "yearly" | null;
|
|
1295
|
+
durationInterval: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | null;
|
|
1296
1296
|
startsAt: string | null;
|
|
1297
1297
|
endsAt: string | null;
|
|
1298
1298
|
/** Discount in basis points. 5000 means 50%. */
|
|
@@ -1300,7 +1300,7 @@ interface PreviewChange {
|
|
|
1300
1300
|
} | {
|
|
1301
1301
|
type: "amount_off";
|
|
1302
1302
|
durationCycles: number | null;
|
|
1303
|
-
durationInterval: "weekly" | "monthly" | "quarterly" | "yearly" | null;
|
|
1303
|
+
durationInterval: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | null;
|
|
1304
1304
|
startsAt: string | null;
|
|
1305
1305
|
endsAt: string | null;
|
|
1306
1306
|
/** Discount in the application currency's minor unit. */
|
|
@@ -1308,7 +1308,7 @@ interface PreviewChange {
|
|
|
1308
1308
|
} | {
|
|
1309
1309
|
type: "fixed_price";
|
|
1310
1310
|
durationCycles: number | null;
|
|
1311
|
-
durationInterval: "weekly" | "monthly" | "quarterly" | "yearly" | null;
|
|
1311
|
+
durationInterval: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | null;
|
|
1312
1312
|
startsAt: string | null;
|
|
1313
1313
|
endsAt: string | null;
|
|
1314
1314
|
/** Fixed price in the application currency's minor unit. */
|
|
@@ -1367,7 +1367,7 @@ interface ReactivatedSubscription {
|
|
|
1367
1367
|
} | {
|
|
1368
1368
|
type: "percentage";
|
|
1369
1369
|
durationCycles: number | null;
|
|
1370
|
-
durationInterval: "weekly" | "monthly" | "quarterly" | "yearly" | null;
|
|
1370
|
+
durationInterval: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | null;
|
|
1371
1371
|
startsAt: string | null;
|
|
1372
1372
|
endsAt: string | null;
|
|
1373
1373
|
/** Discount in basis points. 5000 means 50%. */
|
|
@@ -1375,7 +1375,7 @@ interface ReactivatedSubscription {
|
|
|
1375
1375
|
} | {
|
|
1376
1376
|
type: "amount_off";
|
|
1377
1377
|
durationCycles: number | null;
|
|
1378
|
-
durationInterval: "weekly" | "monthly" | "quarterly" | "yearly" | null;
|
|
1378
|
+
durationInterval: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | null;
|
|
1379
1379
|
startsAt: string | null;
|
|
1380
1380
|
endsAt: string | null;
|
|
1381
1381
|
/** Discount in the application currency's minor unit. */
|
|
@@ -1383,7 +1383,7 @@ interface ReactivatedSubscription {
|
|
|
1383
1383
|
} | {
|
|
1384
1384
|
type: "fixed_price";
|
|
1385
1385
|
durationCycles: number | null;
|
|
1386
|
-
durationInterval: "weekly" | "monthly" | "quarterly" | "yearly" | null;
|
|
1386
|
+
durationInterval: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | null;
|
|
1387
1387
|
startsAt: string | null;
|
|
1388
1388
|
endsAt: string | null;
|
|
1389
1389
|
/** Fixed price in the application currency's minor unit. */
|
|
@@ -1653,27 +1653,27 @@ interface SubscriptionOfferApplication {
|
|
|
1653
1653
|
type SubscriptionOfferApplicationPhase = {
|
|
1654
1654
|
type: "free_trial";
|
|
1655
1655
|
durationDays: number;
|
|
1656
|
-
durationInterval: "weekly" | "monthly" | "quarterly" | "yearly" | null;
|
|
1656
|
+
durationInterval: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | null;
|
|
1657
1657
|
startsAt: string | null;
|
|
1658
1658
|
endsAt: string | null;
|
|
1659
1659
|
} | {
|
|
1660
1660
|
type: "percentage";
|
|
1661
1661
|
durationCycles: number | null;
|
|
1662
|
-
durationInterval: "weekly" | "monthly" | "quarterly" | "yearly" | null;
|
|
1662
|
+
durationInterval: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | null;
|
|
1663
1663
|
percentage: number;
|
|
1664
1664
|
startsAt: string | null;
|
|
1665
1665
|
endsAt: string | null;
|
|
1666
1666
|
} | {
|
|
1667
1667
|
type: "amount_off";
|
|
1668
1668
|
durationCycles: number | null;
|
|
1669
|
-
durationInterval: "weekly" | "monthly" | "quarterly" | "yearly" | null;
|
|
1669
|
+
durationInterval: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | null;
|
|
1670
1670
|
amount: number;
|
|
1671
1671
|
startsAt: string | null;
|
|
1672
1672
|
endsAt: string | null;
|
|
1673
1673
|
} | {
|
|
1674
1674
|
type: "fixed_price";
|
|
1675
1675
|
durationCycles: number | null;
|
|
1676
|
-
durationInterval: "weekly" | "monthly" | "quarterly" | "yearly" | null;
|
|
1676
|
+
durationInterval: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | null;
|
|
1677
1677
|
price: number;
|
|
1678
1678
|
startsAt: string | null;
|
|
1679
1679
|
endsAt: string | null;
|
|
@@ -2620,14 +2620,14 @@ interface UpdateOfferParams {
|
|
|
2620
2620
|
type: "percentage";
|
|
2621
2621
|
durationCycles: number | null;
|
|
2622
2622
|
/** Unit the phase duration is counted in. Only a fixed-price phase may set it, because its amount is declared rather than derived from the plan. Defaults to the plan's own billing interval. */
|
|
2623
|
-
durationInterval?: "weekly" | "monthly" | "quarterly" | "yearly" | null;
|
|
2623
|
+
durationInterval?: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | null;
|
|
2624
2624
|
/** Discount in basis points. 5000 means 50%. */
|
|
2625
2625
|
percentage: number;
|
|
2626
2626
|
} | {
|
|
2627
2627
|
type: "amount_off";
|
|
2628
2628
|
durationCycles: number | null;
|
|
2629
2629
|
/** Unit the phase duration is counted in. Only a fixed-price phase may set it, because its amount is declared rather than derived from the plan. Defaults to the plan's own billing interval. */
|
|
2630
|
-
durationInterval?: "weekly" | "monthly" | "quarterly" | "yearly" | null;
|
|
2630
|
+
durationInterval?: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | null;
|
|
2631
2631
|
amounts: Array<{
|
|
2632
2632
|
currency: string;
|
|
2633
2633
|
/** Amount in the currency's minor unit (for example, cents for USD). */
|
|
@@ -2637,7 +2637,7 @@ interface UpdateOfferParams {
|
|
|
2637
2637
|
type: "fixed_price";
|
|
2638
2638
|
durationCycles: number | null;
|
|
2639
2639
|
/** Unit the phase duration is counted in. Only a fixed-price phase may set it, because its amount is declared rather than derived from the plan. Defaults to the plan's own billing interval. */
|
|
2640
|
-
durationInterval?: "weekly" | "monthly" | "quarterly" | "yearly" | null;
|
|
2640
|
+
durationInterval?: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | null;
|
|
2641
2641
|
prices: Array<{
|
|
2642
2642
|
currency: string;
|
|
2643
2643
|
/** Amount in the currency's minor unit (for example, cents for USD). */
|
|
@@ -2666,14 +2666,14 @@ interface CreateOfferParams {
|
|
|
2666
2666
|
type: "percentage";
|
|
2667
2667
|
durationCycles: number | null;
|
|
2668
2668
|
/** Unit the phase duration is counted in. Only a fixed-price phase may set it, because its amount is declared rather than derived from the plan. Defaults to the plan's own billing interval. */
|
|
2669
|
-
durationInterval?: "weekly" | "monthly" | "quarterly" | "yearly" | null;
|
|
2669
|
+
durationInterval?: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | null;
|
|
2670
2670
|
/** Discount in basis points. 5000 means 50%. */
|
|
2671
2671
|
percentage: number;
|
|
2672
2672
|
} | {
|
|
2673
2673
|
type: "amount_off";
|
|
2674
2674
|
durationCycles: number | null;
|
|
2675
2675
|
/** Unit the phase duration is counted in. Only a fixed-price phase may set it, because its amount is declared rather than derived from the plan. Defaults to the plan's own billing interval. */
|
|
2676
|
-
durationInterval?: "weekly" | "monthly" | "quarterly" | "yearly" | null;
|
|
2676
|
+
durationInterval?: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | null;
|
|
2677
2677
|
amounts: Array<{
|
|
2678
2678
|
currency: string;
|
|
2679
2679
|
/** Amount in the currency's minor unit (for example, cents for USD). */
|
|
@@ -2683,7 +2683,7 @@ interface CreateOfferParams {
|
|
|
2683
2683
|
type: "fixed_price";
|
|
2684
2684
|
durationCycles: number | null;
|
|
2685
2685
|
/** Unit the phase duration is counted in. Only a fixed-price phase may set it, because its amount is declared rather than derived from the plan. Defaults to the plan's own billing interval. */
|
|
2686
|
-
durationInterval?: "weekly" | "monthly" | "quarterly" | "yearly" | null;
|
|
2686
|
+
durationInterval?: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | null;
|
|
2687
2687
|
prices: Array<{
|
|
2688
2688
|
currency: string;
|
|
2689
2689
|
/** Amount in the currency's minor unit (for example, cents for USD). */
|
|
@@ -2915,7 +2915,7 @@ interface DeletePlanPriceParams {
|
|
|
2915
2915
|
}
|
|
2916
2916
|
type AddPlanPriceParams = {
|
|
2917
2917
|
id: string;
|
|
2918
|
-
billingInterval: "weekly" | "monthly" | "quarterly" | "yearly" | "one_time";
|
|
2918
|
+
billingInterval: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | "one_time";
|
|
2919
2919
|
metadata?: Record<string, unknown>;
|
|
2920
2920
|
price: number;
|
|
2921
2921
|
trialDays?: number;
|
|
@@ -2932,7 +2932,7 @@ type AddPlanPriceParams = {
|
|
|
2932
2932
|
}>;
|
|
2933
2933
|
} | {
|
|
2934
2934
|
id: string;
|
|
2935
|
-
billingInterval: "weekly" | "monthly" | "quarterly" | "yearly" | "one_time";
|
|
2935
|
+
billingInterval: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | "one_time";
|
|
2936
2936
|
metadata?: Record<string, unknown>;
|
|
2937
2937
|
inheritsFromPriceId: string;
|
|
2938
2938
|
marketPrices: Array<{
|
|
@@ -3050,7 +3050,7 @@ interface GetPromoCodeParams {
|
|
|
3050
3050
|
}
|
|
3051
3051
|
interface UpdatePromoCodeParams {
|
|
3052
3052
|
id: string;
|
|
3053
|
-
billingInterval?: "weekly" | "monthly" | "quarterly" | "yearly" | "one_time" | null;
|
|
3053
|
+
billingInterval?: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | "one_time" | null;
|
|
3054
3054
|
maxRedemptions?: number | null;
|
|
3055
3055
|
expiresAt?: string | null;
|
|
3056
3056
|
active?: boolean;
|
|
@@ -3063,7 +3063,7 @@ interface ListPromoCodesParams {
|
|
|
3063
3063
|
interface CreatePromoCodeParams {
|
|
3064
3064
|
code: string;
|
|
3065
3065
|
offerId: string;
|
|
3066
|
-
billingInterval?: "weekly" | "monthly" | "quarterly" | "yearly" | "one_time" | null;
|
|
3066
|
+
billingInterval?: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | "one_time" | null;
|
|
3067
3067
|
maxRedemptions?: number;
|
|
3068
3068
|
/** @format date-time */
|
|
3069
3069
|
expiresAt?: string;
|
|
@@ -3083,7 +3083,7 @@ declare class PromoCodesResource {
|
|
|
3083
3083
|
hasMore: boolean;
|
|
3084
3084
|
nextCursor?: string;
|
|
3085
3085
|
}>;
|
|
3086
|
-
/** Create a distribution code for an existing Offer
|
|
3086
|
+
/** Create a distribution code for an existing Offer with one or more sequential discount phases and an optional leading trial. The code owns redemption restrictions. */
|
|
3087
3087
|
create(params: CreatePromoCodeParams, options?: RequestOptions): Promise<PromoCode>;
|
|
3088
3088
|
}
|
|
3089
3089
|
|
|
@@ -3222,7 +3222,7 @@ interface CancelSubscriptionParams {
|
|
|
3222
3222
|
interface ChangePlanParams {
|
|
3223
3223
|
id: string;
|
|
3224
3224
|
newPlanId?: string;
|
|
3225
|
-
newBillingInterval?: "weekly" | "monthly" | "quarterly" | "yearly";
|
|
3225
|
+
newBillingInterval?: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly";
|
|
3226
3226
|
successUrl?: string;
|
|
3227
3227
|
offerId?: string;
|
|
3228
3228
|
}
|
|
@@ -3258,7 +3258,7 @@ interface UpdatePaymentMethodParams {
|
|
|
3258
3258
|
interface PreviewChangePlanParams {
|
|
3259
3259
|
id: string;
|
|
3260
3260
|
planId: string;
|
|
3261
|
-
billingInterval?: "weekly" | "monthly" | "quarterly" | "yearly" | "one_time";
|
|
3261
|
+
billingInterval?: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | "one_time";
|
|
3262
3262
|
offerId?: string;
|
|
3263
3263
|
}
|
|
3264
3264
|
interface ReactivateSubscriptionParams {
|
|
@@ -3286,7 +3286,7 @@ interface ListSubscriptionsParams {
|
|
|
3286
3286
|
}
|
|
3287
3287
|
type CreateSubscriptionParams = {
|
|
3288
3288
|
customerId: string;
|
|
3289
|
-
billingInterval?: "weekly" | "monthly" | "quarterly" | "yearly" | "one_time" | null;
|
|
3289
|
+
billingInterval?: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | "one_time" | null;
|
|
3290
3290
|
/** Public price ID. When omitted, Commet selects the default price for the billing interval and still applies its market pricing. */
|
|
3291
3291
|
priceId?: string;
|
|
3292
3292
|
initialSeats?: Record<string, number>;
|
|
@@ -3303,7 +3303,7 @@ type CreateSubscriptionParams = {
|
|
|
3303
3303
|
planId: string;
|
|
3304
3304
|
} | {
|
|
3305
3305
|
customerId: string;
|
|
3306
|
-
billingInterval?: "weekly" | "monthly" | "quarterly" | "yearly" | "one_time" | null;
|
|
3306
|
+
billingInterval?: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | "one_time" | null;
|
|
3307
3307
|
/** Public price ID. When omitted, Commet selects the default price for the billing interval and still applies its market pricing. */
|
|
3308
3308
|
priceId?: string;
|
|
3309
3309
|
initialSeats?: Record<string, number>;
|
|
@@ -3320,7 +3320,7 @@ type CreateSubscriptionParams = {
|
|
|
3320
3320
|
planCode: string;
|
|
3321
3321
|
} | {
|
|
3322
3322
|
customerId: string;
|
|
3323
|
-
billingInterval?: "weekly" | "monthly" | "quarterly" | "yearly" | "one_time" | null;
|
|
3323
|
+
billingInterval?: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | "one_time" | null;
|
|
3324
3324
|
/** Public price ID. When omitted, Commet selects the default price for the billing interval and still applies its market pricing. */
|
|
3325
3325
|
priceId?: string;
|
|
3326
3326
|
initialSeats?: Record<string, number>;
|
|
@@ -3337,7 +3337,7 @@ type CreateSubscriptionParams = {
|
|
|
3337
3337
|
planId: string;
|
|
3338
3338
|
} | {
|
|
3339
3339
|
customerId: string;
|
|
3340
|
-
billingInterval?: "weekly" | "monthly" | "quarterly" | "yearly" | "one_time" | null;
|
|
3340
|
+
billingInterval?: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | "one_time" | null;
|
|
3341
3341
|
/** Public price ID. When omitted, Commet selects the default price for the billing interval and still applies its market pricing. */
|
|
3342
3342
|
priceId?: string;
|
|
3343
3343
|
initialSeats?: Record<string, number>;
|
|
@@ -3354,7 +3354,7 @@ type CreateSubscriptionParams = {
|
|
|
3354
3354
|
planCode: string;
|
|
3355
3355
|
} | {
|
|
3356
3356
|
customerId: string;
|
|
3357
|
-
billingInterval?: "weekly" | "monthly" | "quarterly" | "yearly" | "one_time" | null;
|
|
3357
|
+
billingInterval?: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | "one_time" | null;
|
|
3358
3358
|
/** Public price ID. When omitted, Commet selects the default price for the billing interval and still applies its market pricing. */
|
|
3359
3359
|
priceId?: string;
|
|
3360
3360
|
initialSeats?: Record<string, number>;
|
|
@@ -3373,7 +3373,7 @@ type CreateSubscriptionParams = {
|
|
|
3373
3373
|
planId: string;
|
|
3374
3374
|
} | {
|
|
3375
3375
|
customerId: string;
|
|
3376
|
-
billingInterval?: "weekly" | "monthly" | "quarterly" | "yearly" | "one_time" | null;
|
|
3376
|
+
billingInterval?: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | "one_time" | null;
|
|
3377
3377
|
/** Public price ID. When omitted, Commet selects the default price for the billing interval and still applies its market pricing. */
|
|
3378
3378
|
priceId?: string;
|
|
3379
3379
|
initialSeats?: Record<string, number>;
|
|
@@ -3441,7 +3441,7 @@ declare class SubscriptionsResource {
|
|
|
3441
3441
|
hasMore: boolean;
|
|
3442
3442
|
nextCursor?: string;
|
|
3443
3443
|
}>;
|
|
3444
|
-
/** Create a subscription for a customer. Commet selects the default price when priceId is omitted
|
|
3444
|
+
/** Create a subscription for a customer. Commet selects the default price when priceId is omitted. The subscription starts at the base USD price; market and currency are resolved from the buyer's request country when the checkout opens. Without an offer override, Commet applies the price's automatic introductory Offer. Pass offerId to apply an active compatible Offer directly, or cardPromotionId to preselect a card-eligible Promotional Offer for the initial checkout when card promotions are enabled for the organization. For the initial checkout, provider accepts either a processor name or an exact payment connection ID. */
|
|
3445
3445
|
create(params: CreateSubscriptionParams, options?: RequestOptions): Promise<CreatedSubscription>;
|
|
3446
3446
|
}
|
|
3447
3447
|
|