@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.
Files changed (197) hide show
  1. package/dist/index.d.mts +41 -41
  2. package/dist/index.d.ts +41 -41
  3. package/dist/index.js +3 -3
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.mjs +3 -3
  6. package/dist/index.mjs.map +1 -1
  7. package/docs/ai-onboarding/ai-onboarding.md +2 -3
  8. package/docs/ai-onboarding/billing-best-practices-skill.md +2 -3
  9. package/docs/ai-onboarding/commet-skill.md +4 -5
  10. package/docs/ai-onboarding/mcp-server.md +8 -9
  11. package/docs/ai-onboarding/pricing-models-skill.md +2 -3
  12. package/docs/ai-onboarding/subscription-patterns-skill.md +2 -3
  13. package/docs/api-reference/offers.md +2 -2
  14. package/docs/api-reference/plans.md +1 -1
  15. package/docs/api-reference/promo-codes.md +3 -3
  16. package/docs/api-reference/subscriptions.md +4 -4
  17. package/docs/documentation/api-versioning.md +2 -2
  18. package/docs/documentation/better-auth.md +0 -1
  19. package/docs/documentation/choose-a-billing-model.md +14 -8
  20. package/docs/documentation/cli.md +14 -15
  21. package/docs/documentation/create-api-key.md +0 -1
  22. package/docs/documentation/customers/customer-credits.md +0 -1
  23. package/docs/documentation/customers/customer-portal.md +14 -2
  24. package/docs/documentation/customers/manage-customers.md +1 -2
  25. package/docs/documentation/error-handling.md +1 -2
  26. package/docs/documentation/examples.md +0 -1
  27. package/docs/documentation/finance/acceptable-use.md +0 -1
  28. package/docs/documentation/finance/finance-overview.md +0 -1
  29. package/docs/documentation/finance/local-currency-taxes.md +0 -1
  30. package/docs/documentation/finance/merchant-of-record.md +0 -1
  31. package/docs/documentation/finance/payouts-verification.md +6 -3
  32. package/docs/documentation/finance/payouts.md +0 -1
  33. package/docs/documentation/finance/supported-countries.md +0 -1
  34. package/docs/documentation/go/integrate-with-encore.md +7 -8
  35. package/docs/documentation/go/integrate-with-go.md +8 -9
  36. package/docs/documentation/introduction.md +3 -4
  37. package/docs/documentation/invoicing/handle-failed-payments.md +9 -4
  38. package/docs/documentation/invoicing/invoices-and-billing-cycles.md +10 -10
  39. package/docs/documentation/invoicing/manage-invoices.md +0 -1
  40. package/docs/documentation/java/integrate-with-java.md +6 -7
  41. package/docs/documentation/nodejs/integrate-with-astro.md +6 -7
  42. package/docs/documentation/nodejs/integrate-with-bun.md +6 -7
  43. package/docs/documentation/nodejs/integrate-with-express.md +7 -8
  44. package/docs/documentation/nodejs/integrate-with-hono.md +7 -8
  45. package/docs/documentation/nodejs/integrate-with-nextjs.md +6 -7
  46. package/docs/documentation/nodejs/integrate-with-nuxt.md +6 -7
  47. package/docs/documentation/nodejs/integrate-with-remix.md +6 -7
  48. package/docs/documentation/nodejs/integrate-with-sveltekit.md +6 -7
  49. package/docs/documentation/payments/accept-one-time-payments.md +0 -1
  50. package/docs/documentation/payments/payment-orchestration.md +0 -1
  51. package/docs/documentation/payments/payment-providers.md +0 -1
  52. package/docs/documentation/payments/transactions-refunds-and-retries.md +2 -1
  53. package/docs/documentation/php/integrate-with-laravel.md +8 -9
  54. package/docs/documentation/php/integrate-with-php.md +6 -7
  55. package/docs/documentation/php/integrate-with-symfony.md +7 -8
  56. package/docs/documentation/plans/add-ons.md +0 -1
  57. package/docs/documentation/plans/balance-and-top-ups.md +1 -2
  58. package/docs/documentation/plans/configure-features.md +0 -1
  59. package/docs/documentation/plans/consumption-models.md +7 -8
  60. package/docs/documentation/plans/create-plans.md +0 -1
  61. package/docs/documentation/plans/credit-packs.md +0 -1
  62. package/docs/documentation/plans/one-time-payments.md +0 -1
  63. package/docs/documentation/plans/plan-groups.md +0 -1
  64. package/docs/documentation/platform/custom-domains.md +0 -1
  65. package/docs/documentation/platform/dashboard-metrics-and-events.md +0 -1
  66. package/docs/documentation/platform/members-and-permissions.md +0 -1
  67. package/docs/documentation/platform/organization-settings.md +0 -1
  68. package/docs/documentation/python/integrate-with-django.md +8 -9
  69. package/docs/documentation/python/integrate-with-fastapi.md +8 -9
  70. package/docs/documentation/python/integrate-with-flask.md +8 -9
  71. package/docs/documentation/python/integrate-with-python.md +6 -7
  72. package/docs/documentation/sales/card-promotions.md +0 -1
  73. package/docs/documentation/sales/introductory-offers.md +0 -1
  74. package/docs/documentation/sales/offers.md +0 -1
  75. package/docs/documentation/sales/promo-codes.md +19 -5
  76. package/docs/documentation/sales/promotional-offers.md +1 -2
  77. package/docs/documentation/sales/regional-prices.md +0 -1
  78. package/docs/documentation/sales/trial-periods.md +8 -8
  79. package/docs/documentation/sdk-reference.md +1 -2
  80. package/docs/documentation/subscriptions/manage-subscriptions.md +2 -1
  81. package/docs/documentation/subscriptions/plan-grants.md +0 -1
  82. package/docs/documentation/subscriptions/upgrade-and-downgrade-plans.md +0 -1
  83. package/docs/documentation/testing-sandbox.md +0 -1
  84. package/docs/documentation/usage/ai-token-billing.md +0 -1
  85. package/docs/documentation/usage/quota-management.md +0 -1
  86. package/docs/documentation/usage/seat-management.md +0 -1
  87. package/docs/documentation/usage/track-usage.md +0 -1
  88. package/docs/knowledge-base/how-do-balance-and-top-ups-work.md +1 -2
  89. package/docs/knowledge-base/how-do-credits-credit-packs-and-customer-credits-differ.md +0 -1
  90. package/docs/knowledge-base/how-do-discounts-work.md +0 -1
  91. package/docs/knowledge-base/how-do-free-plans-work-without-payment.md +8 -9
  92. package/docs/knowledge-base/how-do-monthly-quarterly-and-yearly-billing-work.md +6 -7
  93. package/docs/knowledge-base/how-do-offers-promo-codes-and-card-promotions-work-together.md +0 -1
  94. package/docs/knowledge-base/how-do-trial-periods-work.md +0 -1
  95. package/docs/knowledge-base/how-does-billing-work.md +0 -1
  96. package/docs/knowledge-base/how-does-payment-routing-work.md +0 -1
  97. package/docs/knowledge-base/how-does-quota-based-billing-work.md +0 -1
  98. package/docs/knowledge-base/how-does-seat-based-billing-work.md +0 -1
  99. package/docs/knowledge-base/how-is-proration-calculated-when-changing-plans.md +1 -2
  100. package/docs/knowledge-base/what-happens-when-a-customer-changes-plans.md +2 -1
  101. package/docs/knowledge-base/what-happens-when-a-payment-fails.md +0 -1
  102. package/docs/knowledge-base/what-happens-when-you-change-your-prices.md +0 -1
  103. package/docs/knowledge-base/what-happens-when-you-refund-or-retry-a-transaction.md +0 -1
  104. package/docs/knowledge-base/what-invoices-do-customers-receive-and-when.md +13 -14
  105. package/docs/manifest.json +72 -157
  106. package/docs/platform-documentation.md +69 -155
  107. package/docs/schemas.md +10 -9
  108. package/docs/webhooks/introduction.md +0 -1
  109. package/docs/webhooks.md +2 -0
  110. package/docs/webhooks.openapi.json +11058 -0
  111. package/package.json +1 -1
  112. package/docs/ai-onboarding/meta.json +0 -17
  113. package/docs/api-reference/meta.json +0 -7
  114. package/docs/documentation/customers/meta.json +0 -5
  115. package/docs/documentation/finance/meta.json +0 -13
  116. package/docs/documentation/go/meta.json +0 -5
  117. package/docs/documentation/invoicing/meta.json +0 -9
  118. package/docs/documentation/java/meta.json +0 -5
  119. package/docs/documentation/meta.json +0 -36
  120. package/docs/documentation/nodejs/meta.json +0 -14
  121. package/docs/documentation/payments/meta.json +0 -10
  122. package/docs/documentation/php/meta.json +0 -9
  123. package/docs/documentation/plans/meta.json +0 -14
  124. package/docs/documentation/platform/meta.json +0 -10
  125. package/docs/documentation/python/meta.json +0 -10
  126. package/docs/documentation/sales/meta.json +0 -13
  127. package/docs/documentation/subscriptions/meta.json +0 -9
  128. package/docs/documentation/usage/meta.json +0 -10
  129. package/docs/knowledge-base/meta.json +0 -29
  130. package/docs/meta.json +0 -11
  131. package/docs/webhooks/addon-activated.md +0 -44
  132. package/docs/webhooks/addon-deactivated.md +0 -40
  133. package/docs/webhooks/balance-depleted.md +0 -37
  134. package/docs/webhooks/balance-low.md +0 -39
  135. package/docs/webhooks/balance-topped-up.md +0 -41
  136. package/docs/webhooks/checkout-ready.md +0 -43
  137. package/docs/webhooks/credits-depleted.md +0 -35
  138. package/docs/webhooks/credits-expired.md +0 -35
  139. package/docs/webhooks/credits-granted.md +0 -37
  140. package/docs/webhooks/credits-low.md +0 -39
  141. package/docs/webhooks/credits-purchased.md +0 -41
  142. package/docs/webhooks/customer-created.md +0 -49
  143. package/docs/webhooks/customer-state-changed.md +0 -134
  144. package/docs/webhooks/customer-updated.md +0 -49
  145. package/docs/webhooks/invoice-created.md +0 -45
  146. package/docs/webhooks/invoice-overdue.md +0 -53
  147. package/docs/webhooks/invoice-upcoming.md +0 -43
  148. package/docs/webhooks/invoice-voided.md +0 -53
  149. package/docs/webhooks/meta.json +0 -89
  150. package/docs/webhooks/payment-dispute-resolved.md +0 -52
  151. package/docs/webhooks/payment-disputed.md +0 -49
  152. package/docs/webhooks/payment-failed.md +0 -178
  153. package/docs/webhooks/payment-link-canceled.md +0 -41
  154. package/docs/webhooks/payment-link-completed.md +0 -89
  155. package/docs/webhooks/payment-link-created.md +0 -41
  156. package/docs/webhooks/payment-link-failed.md +0 -87
  157. package/docs/webhooks/payment-method-attached.md +0 -44
  158. package/docs/webhooks/payment-method-updated.md +0 -37
  159. package/docs/webhooks/payment-received.md +0 -202
  160. package/docs/webhooks/payment-recovered.md +0 -43
  161. package/docs/webhooks/payment-refunded.md +0 -47
  162. package/docs/webhooks/payment-retry-failed.md +0 -39
  163. package/docs/webhooks/payout-available.md +0 -33
  164. package/docs/webhooks/payout-created.md +0 -48
  165. package/docs/webhooks/payout-failed.md +0 -52
  166. package/docs/webhooks/payout-paid.md +0 -48
  167. package/docs/webhooks/plan-grant-created.md +0 -74
  168. package/docs/webhooks/plan-grant-expired.md +0 -86
  169. package/docs/webhooks/plan-grant-revoked.md +0 -86
  170. package/docs/webhooks/plan-grant-updated.md +0 -86
  171. package/docs/webhooks/quota-exceeded.md +0 -44
  172. package/docs/webhooks/quota-threshold-reached.md +0 -41
  173. package/docs/webhooks/seats-limit-reached.md +0 -39
  174. package/docs/webhooks/seats-updated.md +0 -39
  175. package/docs/webhooks/subscription-activated.md +0 -43
  176. package/docs/webhooks/subscription-canceled.md +0 -58
  177. package/docs/webhooks/subscription-cancellation-revoked.md +0 -37
  178. package/docs/webhooks/subscription-cancellation-scheduled.md +0 -45
  179. package/docs/webhooks/subscription-created.md +0 -35
  180. package/docs/webhooks/subscription-past-due.md +0 -43
  181. package/docs/webhooks/subscription-pause-revoked.md +0 -27
  182. package/docs/webhooks/subscription-pause-scheduled.md +0 -35
  183. package/docs/webhooks/subscription-pause-updated.md +0 -31
  184. package/docs/webhooks/subscription-paused.md +0 -35
  185. package/docs/webhooks/subscription-plan-change-revoked.md +0 -50
  186. package/docs/webhooks/subscription-plan-change-scheduled.md +0 -55
  187. package/docs/webhooks/subscription-plan-changed.md +0 -43
  188. package/docs/webhooks/subscription-reactivated.md +0 -53
  189. package/docs/webhooks/subscription-resume-failed.md +0 -33
  190. package/docs/webhooks/subscription-resumed.md +0 -35
  191. package/docs/webhooks/subscription-updated.md +0 -39
  192. package/docs/webhooks/trial-checkout-ready.md +0 -39
  193. package/docs/webhooks/trial-converted.md +0 -39
  194. package/docs/webhooks/trial-expired.md +0 -39
  195. package/docs/webhooks/trial-started.md +0 -46
  196. package/docs/webhooks/trial-will-end.md +0 -41
  197. package/docs/webhooks/usage-recorded.md +0 -41
package/dist/index.d.ts 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. The referenced Offer owns the benefit and duration; the promo code owns redemption restrictions. */
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 and resolves its market from the customer's billing country. 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. */
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
 
package/dist/index.js CHANGED
@@ -591,7 +591,7 @@ var PromoCodesResource = class {
591
591
  async list(params, options) {
592
592
  return this.httpClient.get("/promo-codes", params, options);
593
593
  }
594
- /** Create a distribution code for an existing Offer. The referenced Offer owns the benefit and duration; the promo code owns redemption restrictions. */
594
+ /** 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. */
595
595
  async create(params, options) {
596
596
  return this.httpClient.post("/promo-codes", params, options);
597
597
  }
@@ -814,7 +814,7 @@ var SubscriptionsResource = class {
814
814
  async list(params, options) {
815
815
  return this.httpClient.get("/subscriptions", params, options);
816
816
  }
817
- /** Create a subscription for a customer. Commet selects the default price when priceId is omitted and resolves its market from the customer's billing country. 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. */
817
+ /** 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. */
818
818
  async create(params, options) {
819
819
  return this.httpClient.post("/subscriptions", params, options);
820
820
  }
@@ -1061,7 +1061,7 @@ var CommetValidationError = class extends CommetAPIError {
1061
1061
 
1062
1062
  // src/version.ts
1063
1063
  var API_VERSION = "2026-08-27";
1064
- var SDK_VERSION = "9.4.0";
1064
+ var SDK_VERSION = "9.6.0";
1065
1065
 
1066
1066
  // src/utils/telemetry.ts
1067
1067
  var registeredIntegrations = /* @__PURE__ */ new Set();