@commet/node 9.10.0 → 9.11.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 (33) hide show
  1. package/dist/index.d.mts +123 -48
  2. package/dist/index.d.ts +123 -48
  3. package/dist/index.js +14 -11
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.mjs +14 -11
  6. package/dist/index.mjs.map +1 -1
  7. package/docs/api-reference/customers.md +3 -3
  8. package/docs/api-reference/index.md +1 -1
  9. package/docs/api-reference/invoices.md +4 -3
  10. package/docs/api-reference/plans.md +8 -4
  11. package/docs/api-reference/subscriptions.md +5 -4
  12. package/docs/api-reference/transactions.md +2 -1
  13. package/docs/documentation/invoicing/manage-invoices.md +1 -1
  14. package/docs/documentation/plans/add-ons.md +2 -2
  15. package/docs/documentation/plans/balance-and-top-ups.md +1 -1
  16. package/docs/documentation/plans/consumption-models.md +20 -0
  17. package/docs/documentation/plans/credit-packs.md +4 -2
  18. package/docs/documentation/plans/plan-versions.md +9 -7
  19. package/docs/documentation/sales/regional-prices.md +1 -1
  20. package/docs/documentation/subscriptions/manage-subscriptions.md +1 -1
  21. package/docs/errors/currency_held_by_balance_plan.md +22 -0
  22. package/docs/errors/currency_held_by_customer_credit.md +22 -0
  23. package/docs/errors/currency_held_by_fixed_amount_discount.md +22 -0
  24. package/docs/errors/currency_held_by_payment_method.md +22 -0
  25. package/docs/errors/currency_held_by_prepaid_period.md +22 -0
  26. package/docs/errors/currency_held_by_scheduled_pause.md +22 -0
  27. package/docs/errors/index.md +7 -1
  28. package/docs/errors/missing_regional_price.md +3 -3
  29. package/docs/knowledge-base/what-happens-when-you-change-your-prices.md +1 -1
  30. package/docs/manifest.json +37 -1
  31. package/docs/schemas.md +22 -14
  32. package/docs/webhooks.md +4 -3
  33. package/package.json +1 -1
package/docs/schemas.md CHANGED
@@ -166,6 +166,7 @@ Generated from Commet API version `2026-08-27`.
166
166
  ### BalanceTopup
167
167
 
168
168
  - `amount` (`number`, required)
169
+ - `status` (`"succeeded" | "processing"`, required) — `succeeded` when the payment was confirmed and the balance was added. `processing` when the payment method confirms later: the balance is added once the payment is confirmed, and nothing is added if it is declined.
169
170
  - `object` (`"balance_topup"`, required)
170
171
  - `livemode` (`boolean`, required)
171
172
 
@@ -239,6 +240,7 @@ Generated from Commet API version `2026-08-27`.
239
240
  ### CreditGrant
240
241
 
241
242
  - `credits` (`number`, required)
243
+ - `status` (`"succeeded" | "processing"`, required) — `succeeded` when the payment was confirmed and the credits were added. `processing` when the payment method confirms later: the credits are added once the payment is confirmed, and nothing is added if it is declined.
242
244
  - `object` (`"credit_grant"`, required)
243
245
  - `livemode` (`boolean`, required)
244
246
 
@@ -287,7 +289,7 @@ Generated from Commet API version `2026-08-27`.
287
289
  ### CustomerBatch
288
290
 
289
291
  - `successful` (`Array<{ id: string; externalId: string | null; email: string }>`, required)
290
- - `failed` (`Array<{ index: number; error: string; data: { id?: string; externalId?: string; email: string; fullName?: string | null; taxDocument?: string | null; timezone?: string; metadata?: Record<string, unknown> | null; address?: { line1: string; line2?: string; city: string; state?: string; postalCode: string; country: string; region?: string } } }>`, required)
292
+ - `failed` (`Array<{ index: number; error: string; data: { id?: string; externalId?: string; email: string; fullName?: string | null; taxDocument?: string | null; businessTaxId?: string; timezone?: string; metadata?: Record<string, unknown> | null; address?: { line1: string; line2?: string; city: string; state?: string; postalCode: string; country: string; region?: string } } }>`, required)
291
293
  - `object` (`"customer_batch"`, required)
292
294
  - `livemode` (`boolean`, required)
293
295
 
@@ -361,7 +363,7 @@ Generated from Commet API version `2026-08-27`.
361
363
  Variants:
362
364
 
363
365
  - `{ code: string; name: string; unitName: string | null; allowed: boolean; type: "boolean"; enabled: boolean; baseAccess?: { enabled: boolean } | null; object: "feature_access"; livemode: boolean }`
364
- - `{ code: string; name: string; unitName: string | null; allowed: boolean; type: "usage"; consumption: { model: "metered"; period: { start: string; end: string }; unitsUsed: number; includedUnits: number; remainingUnits?: number; unlimited: boolean; overage: { enabled: boolean; units: number; unitPrice?: { amount: number; currency: string; scale: 10000 } } } | { model: "credits"; period: { start: string; end: string }; unitsUsed: number; creditsPerUnit: number; creditsConsumed: number; availableUnits: number } | { model: "balance"; period: { start: string; end: string }; unitsUsed: number; spent: { amount: number; currency: string }; availableUnits?: number; unitPrice?: { amount: number; currency: string; scale: 10000 } }; baseAccess?: { includedUnits: number; unlimited: boolean } | null; object: "feature_access"; livemode: boolean }`
366
+ - `{ code: string; name: string; unitName: string | null; allowed: boolean; type: "usage"; consumption: { model: "metered"; period: { start: string; end: string }; unitsUsed: number; includedUnits: number; remainingUnits?: number; unlimited: boolean; overage: { enabled: boolean; units: number; unitPrice?: { amount: number; currency: string; scale: 10000 } } } | { model: "credits"; period: { start: string; end: string }; unitsUsed: number; creditsPerUnit: number; creditsConsumed: number; unlimited: boolean; availableUnits?: number } | { model: "balance"; period: { start: string; end: string }; unitsUsed: number; spent: { amount: number; currency: string }; unlimited: boolean; availableUnits?: number; unitPrice?: { amount: number; currency: string; scale: 10000 } }; baseAccess?: { includedUnits: number; unlimited: boolean } | null; object: "feature_access"; livemode: boolean }`
365
367
  - `{ code: string; name: string; unitName: string | null; allowed: boolean; type: "seats"; usage: { period: { start: string; end: string }; unitsUsed: number; includedUnits: number; remainingUnits?: number; unlimited: boolean; overage: { enabled: boolean; units: number; unitPrice?: { amount: number; currency: string; scale: 10000 } } }; baseAccess?: { includedUnits: number; unlimited: boolean } | null; object: "feature_access"; livemode: boolean }`
366
368
  - `{ code: string; name: string; unitName: string | null; allowed: boolean; type: "quota"; usage: { period: { start: string; end: string }; unitsUsed: number; includedUnits: number; remainingUnits?: number; unlimited: boolean; overage: { enabled: boolean; units: number; unitPrice?: { amount: number; currency: string; scale: 10000 } }; billedUnits: number }; baseAccess?: { includedUnits: number; unlimited: boolean } | null; object: "feature_access"; livemode: boolean }`
367
369
 
@@ -534,8 +536,10 @@ Variants:
534
536
  - `isFree` (`boolean`, required)
535
537
  - `blockOnExhaustion` (`boolean | null`, required) — Credits and balance plans: true stops usage when the plan and purchased amounts run out; false lets usage continue and bills the missing amount as overage at the next renewal (credits at the price per credit). Trials and free plans always stop.
536
538
  - `unusedPlanCredits` (`{ type: "expire" } | { type: "roll_over"; maxPlanCredits: number | null } | null`, required) — Credits plans only; null for other consumption models. What happens to unused plan credits at each reset. Purchased credits never expire and never count toward maxPlanCredits.
539
+ - `unlimitedPlanCredits` (`boolean | null`, required) — Credits plans only; null for other consumption models. true when the plan credits are unlimited: usage never spends them and only planCreditLimit caps it.
537
540
  - `planCreditLimit` (`{ credits: number; interval: "day" | "week" } | null`, required) — Credits plans only. The most plan credits a subscription spends per day or per week; null means no limit.
538
541
  - `unusedPlanBalance` (`{ type: "expire" } | { type: "roll_over"; maxPlanBalance: number | null } | null`, required) — Balance plans only; null for other consumption models. What happens to unused plan balance at each reset. Purchased balance never expires and never counts toward maxPlanBalance.
542
+ - `unlimitedPlanBalance` (`boolean | null`, required) — Balance plans only; null for other consumption models. true when the plan balance is unlimited: usage never spends it and only planBalanceLimit caps it.
539
543
  - `planBalanceLimit` (`{ amount: number; interval: "day" | "week" } | null`, required) — Balance plans only. The most plan balance a subscription spends per day or per week, in USD cents; null means no limit.
540
544
  - `sortOrder` (`number`, required)
541
545
  - `planGroupId` (`string | null`, required)
@@ -893,12 +897,12 @@ Variants:
893
897
  - `planVersion` (`{ id: string; label: string } | null`, required) — The plan version whose terms the subscription has now. It keeps paying and receiving everything from this version until it is moved.
894
898
  - `offerApplications` (`Array<SubscriptionOfferApplication>`, required)
895
899
  - `pause` (`{ status: "scheduled"; mode: "period_end"; requestedAt: string; effectiveAt: string; resumeAt: string | null } | { status: "active"; mode: "immediate" | "period_end"; requestedAt: string; effectiveAt: string; resumeAt: string | null } | null`, required)
896
- - `scheduledVersionChange` (`{ planVersionId: string; label: string; effectiveAt: string } | null`, required) — A move to another version of the plan pending for the next renewal.
900
+ - `scheduledVersionChange` (`{ planVersionId: string; label: string; effectiveAt: string; currency: string } | null`, required) — A move to another version of the plan pending for the next renewal.
897
901
  - `planGrant` (`{ id: string; plan: { id: string; name: string }; expiresAt: string | null }`, optional)
898
902
  - `consumptionModel` (`ConsumptionModel | null`, required)
899
903
  - `features` (`Array<{ code: string; name: string; type: "boolean"; enabled: boolean; baseAccess?: { enabled: boolean } | null } | { code: string; name: string; type: "usage"; usage?: { current: number; included: number; overageQuantity: number; overageUnitPrice?: number; unlimited?: boolean }; baseAccess?: { included: number; unlimited: boolean } | null } | { code: string; name: string; type: "seats"; usage: { current: number; included: number; overageQuantity: number; overageUnitPrice?: number; unlimited?: boolean }; baseAccess?: { included: number; unlimited: boolean } | null } | { code: string; name: string; type: "quota"; usage?: { current: number; included: number; overageQuantity: number; overageUnitPrice?: number; unlimited?: boolean }; baseAccess?: { included: number; unlimited: boolean } | null }>`, required)
900
- - `credits` (`{ remaining: number; included: number; purchased: number; plan: number; total: number } | null`, required)
901
- - `balance` (`{ remaining: number; included: number; currency: string; plan: number; purchased: number; total: number } | null`, required)
904
+ - `credits` (`{ unlimited: boolean; remaining?: number; included: number; purchased: number; plan?: number; total?: number } | null`, required)
905
+ - `balance` (`{ unlimited: boolean; remaining?: number; included: number; currency: string; plan?: number; purchased: number; total?: number } | null`, required)
902
906
  - `priceId` (`string | null`, required)
903
907
  - `object` (`"subscription"`, required)
904
908
  - `livemode` (`boolean`, required)
@@ -906,7 +910,7 @@ Variants:
906
910
  ### SubscriptionAddon
907
911
 
908
912
  - `addonId` (`string`, required)
909
- - `status` (`"active"`, required)
913
+ - `status` (`"active" | "processing"`, required) — `active` when the add-on is active. `processing` when the payment method confirms later: the add-on is activated once the payment is confirmed, and stays inactive if it is declined.
910
914
  - `proratedCharge` (`number`, required)
911
915
  - `object` (`"subscription_addon"`, required)
912
916
  - `livemode` (`boolean`, required)
@@ -1020,6 +1024,7 @@ Variants:
1020
1024
  - `subtotal` (`number | null`, required) — Subtotal in USD cents (gross minus tax). Null when grossAmount is null.
1021
1025
  - `taxAmount` (`number | null`, required)
1022
1026
  - `presentmentAmount` (`number | null`, required) — Amount in the charge currency's smallest unit, as presented to the customer. Set for non-USD charges; null when the charge was made in USD.
1027
+ - `amountRefunded` (`number`, required) — Cumulative confirmed refunds in the payment currency’s smallest unit.
1023
1028
  - `currency` (`string`, required)
1024
1029
  - `provider` (`PaymentProvider`, required) — The payment provider the charge was routed to: stripe, commet, or dlocal.
1025
1030
  - `paymentMethod` (`PaymentMethod | null`, required) — The method used for this charge: card, oxxo, or mercado_pago. Null when unknown.
@@ -1043,6 +1048,7 @@ Variants:
1043
1048
  - `subtotal` (`number | null`, required) — Subtotal in USD cents (gross minus tax). Null when grossAmount is null.
1044
1049
  - `taxAmount` (`number | null`, required)
1045
1050
  - `presentmentAmount` (`number | null`, required) — Amount in the charge currency's smallest unit, as presented to the customer. Set for non-USD charges; null when the charge was made in USD.
1051
+ - `amountRefunded` (`number`, required) — Cumulative confirmed refunds in the payment currency’s smallest unit.
1046
1052
  - `currency` (`string`, required)
1047
1053
  - `provider` (`PaymentProvider`, required) — The payment provider the charge was routed to: stripe, commet, or dlocal.
1048
1054
  - `paymentMethod` (`PaymentMethod | null`, required) — The method used for this charge: card, oxxo, or mercado_pago. Null when unknown.
@@ -1083,8 +1089,8 @@ Variants:
1083
1089
  Variants:
1084
1090
 
1085
1091
  - `{ allowed: boolean; subscriptionStatus: string; featureCode: string; quantity: number; reason?: string; message?: string; consumptionModel: "metered"; current: number; remaining: number; unlimited: boolean; included: number; overageEnabled: boolean; overageUnitPrice: number | null; object: "usage_check"; livemode: boolean }`
1086
- - `{ allowed: boolean; subscriptionStatus: string; featureCode: string; quantity: number; reason?: string; message?: string; consumptionModel: "credits"; creditsPerUnit: number; estimatedCredits: number; planCredits: number; purchasedCredits: number; totalCredits: number; planCreditLimit: { credits: number; interval: "day" | "week"; spent: number; remaining: number; resetsAt: string } | null; blockOnExhaustion: boolean; object: "usage_check"; livemode: boolean }`
1087
- - `{ allowed: boolean; subscriptionStatus: string; featureCode: string; quantity: number; reason?: string; message?: string; consumptionModel: "balance"; unitPrice: number; estimatedAmount: number; currentBalance: number; planBalance: number; purchasedBalance: number; totalBalance: number; planBalanceLimit: { amount: number; interval: "day" | "week"; spent: number; remaining: number; resetsAt: string } | null; blockOnExhaustion: boolean; currency: string; object: "usage_check"; livemode: boolean }`
1092
+ - `{ allowed: boolean; subscriptionStatus: string; featureCode: string; quantity: number; reason?: string; message?: string; consumptionModel: "credits"; creditsPerUnit: number; estimatedCredits: number; unlimited: boolean; planCredits?: number; purchasedCredits: number; totalCredits?: number; planCreditLimit: { credits: number; interval: "day" | "week"; spent: number; remaining: number; resetsAt: string } | null; blockOnExhaustion: boolean; object: "usage_check"; livemode: boolean }`
1093
+ - `{ allowed: boolean; subscriptionStatus: string; featureCode: string; quantity: number; reason?: string; message?: string; consumptionModel: "balance"; unitPrice: number; estimatedAmount: number; unlimited: boolean; currentBalance?: number; planBalance?: number; purchasedBalance: number; totalBalance?: number; planBalanceLimit: { amount: number; interval: "day" | "week"; spent: number; remaining: number; resetsAt: string } | null; blockOnExhaustion: boolean; currency: string; object: "usage_check"; livemode: boolean }`
1088
1094
 
1089
1095
  ### UsageEvent
1090
1096
 
@@ -1096,7 +1102,7 @@ Variants:
1096
1102
  - `ts` (`string`, required)
1097
1103
  - `createdAt` (`string`, required)
1098
1104
  - `properties` (`Array<{ property: string; value: string }>`, required)
1099
- - `consumption` (`{ model: "credits" | "balance"; deducted: number; remaining: number; blocked: boolean; planCreditLimit?: { credits: number; interval: "day" | "week"; spent: number; remaining: number; resetsAt: string } | null; planBalanceLimit?: { amount: number; interval: "day" | "week"; spent: number; remaining: number; resetsAt: string } | null }`, optional)
1105
+ - `consumption` (`{ model: "credits" | "balance"; deducted: number; unlimited: boolean; remaining?: number; blocked: boolean; planCreditLimit?: { credits: number; interval: "day" | "week"; spent: number; remaining: number; resetsAt: string } | null; planBalanceLimit?: { amount: number; interval: "day" | "week"; spent: number; remaining: number; resetsAt: string } | null }`, optional)
1100
1106
  - `object` (`"usage_event"`, required)
1101
1107
  - `livemode` (`boolean`, required)
1102
1108
 
@@ -1144,10 +1150,11 @@ Variants:
1144
1150
 
1145
1151
  ### WebhookBalance
1146
1152
 
1147
- - `currentBalance` (`number`, required) — The available balance, plan plus purchased, in rate scale. Equal to totalBalance.
1148
- - `planBalance` (`number`, required) — The plan part in rate scale: spent first, replaced or rolled over at each reset, negative while overage is owed.
1153
+ - `unlimited` (`boolean`, required) — true when the plan balance is unlimited: usage never spends it and only the plan balance limit caps it.
1154
+ - `currentBalance` (`number`, optional) — The available balance, plan plus purchased, in rate scale. Equal to totalBalance. Omitted when unlimited is true.
1155
+ - `planBalance` (`number`, optional) — The plan part in rate scale: spent first, replaced or rolled over at each reset, negative while overage is owed. Omitted when unlimited is true.
1149
1156
  - `purchasedBalance` (`number`, required) — The purchased part in rate scale: top-ups and manual adjustments, spent after the plan part and kept until the subscription ends.
1150
- - `totalBalance` (`number`, required) — planBalance plus purchasedBalance, in rate scale.
1157
+ - `totalBalance` (`number`, optional) — planBalance plus purchasedBalance, in rate scale. Omitted when unlimited is true.
1151
1158
 
1152
1159
  ### WebhookBankRef
1153
1160
 
@@ -1163,9 +1170,10 @@ Variants:
1163
1170
 
1164
1171
  ### WebhookCreditsBalance
1165
1172
 
1166
- - `planCredits` (`number`, required)
1173
+ - `unlimited` (`boolean`, required) — true when the plan credits are unlimited: usage never spends them and only the plan credit limit caps it.
1174
+ - `planCredits` (`number`, optional) — Plan credits left. Omitted when unlimited is true.
1167
1175
  - `purchasedCredits` (`number`, required)
1168
- - `totalCredits` (`number`, required)
1176
+ - `totalCredits` (`number`, optional) — planCredits plus purchasedCredits. Omitted when unlimited is true.
1169
1177
 
1170
1178
  ### WebhookPlanGrantTimelineEvent
1171
1179
 
package/docs/webhooks.md CHANGED
@@ -243,7 +243,7 @@ Fired when a scheduled move to another plan version will no longer take effect b
243
243
  - `subscriptionId` (`string`, required) — The subscription ID.
244
244
  - `customerId` (`string`, required) — The customer ID. Returns your externalId if you provided one when creating the customer, otherwise returns the Commet publicId.
245
245
  - `toVersionId` (`string`, required) — The version the subscription was going to move to.
246
- - `reason` (`string`, required) — Why the move was canceled: canceled_by_merchant, version_change_failed when the move could not be applied at renewal, or the code of what the subscription no longer fits (addon_unavailable, seat_limit_exceeded, price_not_found, missing_regional_price).
246
+ - `reason` (`string`, required) — Why the move was canceled: canceled_by_merchant, version_change_failed when the move could not be applied at renewal, the code of what the subscription no longer fits (addon_unavailable, seat_limit_exceeded, price_not_found, missing_regional_price), or, for a move that charges it in USD, what keeps it in its currency (currency_held_by_payment_method, currency_held_by_customer_credit, currency_held_by_balance_plan, currency_held_by_fixed_amount_discount, currency_held_by_prepaid_period, currency_held_by_scheduled_pause).
247
247
 
248
248
  ## subscription.past_due
249
249
 
@@ -415,6 +415,7 @@ Fired when a payment is refunded, fully or partially. A refund does not change t
415
415
  - `invoiceNumber` (`string | null`, required) — The human-readable invoice number, if available.
416
416
  - `customerId` (`string | null`, required) — The customer ID, when the payment is linked to an invoice. Returns your externalId if you provided one when creating the customer, otherwise returns the Commet publicId.
417
417
  - `subscriptionId` (`string | null`, required) — The subscription ID, if the invoice is linked to a subscription.
418
+ - `amountRefunded` (`number`, required) — Cumulative confirmed refunds in the payment currency’s smallest unit.
418
419
  - `refundAmount` (`number`, required) — The refunded amount in cents (100 = $1.00).
419
420
  - `currency` (`string`, required) — The refund currency code.
420
421
 
@@ -537,7 +538,7 @@ Fired when a new invoice is generated for a subscription, typically at the start
537
538
 
538
539
  ## invoice.voided
539
540
 
540
- Fired when an invoice is voided — nullified before collection, either manually or automatically when its subscription is canceled. Voiding is terminal: a void invoice is never retried or collected.
541
+ Fired when an invoice is voided — nullified before collection, for example when its subscription is canceled. Voiding is terminal: a void invoice is never retried or collected.
541
542
 
542
543
  ### Data
543
544
 
@@ -668,7 +669,7 @@ Aggregate entitlement event answering one question: what can this customer acces
668
669
  - `plan` (`WebhookPlanRef | null`, required) — The current plan (id and name), or null when status is none.
669
670
  - `billingInterval` (`string | null`, required) — The current billing interval.
670
671
  - `consumptionModel` (`string | null`, required) — The plan's consumption model: metered, credits, or balance.
671
- - `features` (`Array<{ code: string; name: string; unitName: string | null; allowed: boolean; type: "boolean"; enabled: boolean } | { code: string; name: string; unitName: string | null; allowed: boolean; type: "usage"; consumption: { model: "metered"; period: { start: string; end: string }; unitsUsed: number; includedUnits: number; remainingUnits?: number; unlimited: boolean; overage: { enabled: boolean; units: number; unitPrice?: { amount: number; currency: string; scale: 10000 } } } | { model: "credits"; period: { start: string; end: string }; unitsUsed: number; creditsPerUnit: number; creditsConsumed: number; availableUnits: number } | { model: "balance"; period: { start: string; end: string }; unitsUsed: number; spent: { amount: number; currency: string }; availableUnits?: number; unitPrice?: { amount: number; currency: string; scale: 10000 } } } | { code: string; name: string; unitName: string | null; allowed: boolean; type: "seats"; usage: { period: { start: string; end: string }; unitsUsed: number; includedUnits: number; remainingUnits?: number; unlimited: boolean; overage: { enabled: boolean; units: number; unitPrice?: { amount: number; currency: string; scale: 10000 } } } } | { code: string; name: string; unitName: string | null; allowed: boolean; type: "quota"; usage: { period: { start: string; end: string }; unitsUsed: number; includedUnits: number; remainingUnits?: number; unlimited: boolean; overage: { enabled: boolean; units: number; unitPrice?: { amount: number; currency: string; scale: 10000 } }; billedUnits: number } }>`, required) — Current feature access, discriminated by type. Boolean features expose enabled; usage features expose model-specific consumption; seats and quota expose usage allowances.
672
+ - `features` (`Array<{ code: string; name: string; unitName: string | null; allowed: boolean; type: "boolean"; enabled: boolean } | { code: string; name: string; unitName: string | null; allowed: boolean; type: "usage"; consumption: { model: "metered"; period: { start: string; end: string }; unitsUsed: number; includedUnits: number; remainingUnits?: number; unlimited: boolean; overage: { enabled: boolean; units: number; unitPrice?: { amount: number; currency: string; scale: 10000 } } } | { model: "credits"; period: { start: string; end: string }; unitsUsed: number; creditsPerUnit: number; creditsConsumed: number; unlimited: boolean; availableUnits?: number } | { model: "balance"; period: { start: string; end: string }; unitsUsed: number; spent: { amount: number; currency: string }; unlimited: boolean; availableUnits?: number; unitPrice?: { amount: number; currency: string; scale: 10000 } } } | { code: string; name: string; unitName: string | null; allowed: boolean; type: "seats"; usage: { period: { start: string; end: string }; unitsUsed: number; includedUnits: number; remainingUnits?: number; unlimited: boolean; overage: { enabled: boolean; units: number; unitPrice?: { amount: number; currency: string; scale: 10000 } } } } | { code: string; name: string; unitName: string | null; allowed: boolean; type: "quota"; usage: { period: { start: string; end: string }; unitsUsed: number; includedUnits: number; remainingUnits?: number; unlimited: boolean; overage: { enabled: boolean; units: number; unitPrice?: { amount: number; currency: string; scale: 10000 } }; billedUnits: number } }>`, required) — Current feature access, discriminated by type. Boolean features expose enabled; usage features expose model-specific consumption; seats and quota expose usage allowances.
672
673
  - `seats` (`Array<WebhookSeatSummary>`, required) — Summary of seats-type features: code, current, included, remaining, unlimited.
673
674
  - `credits` (`WebhookCreditsBalance | null`, required) — For credits plans: planCredits, purchasedCredits, totalCredits. Null otherwise.
674
675
  - `balance` (`WebhookBalance | null`, required) — For balance plans, in rate scale (10000 = 1.00 of the subscription currency): currentBalance (the available total), planBalance, purchasedBalance and totalBalance. Null otherwise.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commet/node",
3
- "version": "9.10.0",
3
+ "version": "9.11.0",
4
4
  "description": "Commet SDK for Node.js - Billing and usage tracking",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",