@commet/node 7.6.0 → 7.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +11 -6
- package/dist/index.d.ts +11 -6
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -923,9 +923,13 @@ interface TestClockBilling {
|
|
|
923
923
|
interface Transaction {
|
|
924
924
|
id: string;
|
|
925
925
|
invoiceId: string | null;
|
|
926
|
-
|
|
927
|
-
|
|
926
|
+
/** Gross amount in USD cents. Null when the charge never settled in USD — a failed non-USD attempt has no exchange rate, so no USD figure exists; see presentmentAmount. */
|
|
927
|
+
grossAmount: number | null;
|
|
928
|
+
/** Subtotal in USD cents (gross minus tax). Null when grossAmount is null. */
|
|
929
|
+
subtotal: number | null;
|
|
928
930
|
taxAmount: number | null;
|
|
931
|
+
/** 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. */
|
|
932
|
+
presentmentAmount: number | null;
|
|
929
933
|
currency: string;
|
|
930
934
|
/** The payment provider the charge was routed to: stripe, commet, or dlocal. */
|
|
931
935
|
provider: PaymentProvider;
|
|
@@ -1383,7 +1387,7 @@ declare class PaymentsResource {
|
|
|
1383
1387
|
list(params?: ListPaymentsParams, options?: RequestOptions): Promise<ApiResponse<Array<Payment>>>;
|
|
1384
1388
|
/** Create a hosted payment link. Returns a url the customer opens to pay with any card. Calculates tax, generates an invoice, and vaults the payment method on confirmation. No subscription or plan required. */
|
|
1385
1389
|
create(params: CreatePaymentParams, options?: RequestOptions): Promise<ApiResponse<Payment>>;
|
|
1386
|
-
/** Charge a customer's vaulted payment method off-session. Calculates tax, generates an invoice, and sends a receipt.
|
|
1390
|
+
/** Charge a customer's vaulted payment method off-session. Calculates tax, generates an invoice, and sends a receipt. Requires the customer to have a subscription in active, trialing, or past_due state. */
|
|
1387
1391
|
charge(params: ChargePaymentParams, options?: RequestOptions): Promise<ApiResponse<Payment>>;
|
|
1388
1392
|
/** Retrieve a payment by its public ID. */
|
|
1389
1393
|
get(params: GetPaymentParams, options?: RequestOptions): Promise<ApiResponse<Payment>>;
|
|
@@ -1833,6 +1837,7 @@ interface CreateSubscriptionParams {
|
|
|
1833
1837
|
billingInterval?: BillingInterval | null;
|
|
1834
1838
|
initialSeats?: Record<string, number>;
|
|
1835
1839
|
skipTrial?: boolean;
|
|
1840
|
+
customTrialDays?: number;
|
|
1836
1841
|
introOffer?: {
|
|
1837
1842
|
discountType: DiscountType;
|
|
1838
1843
|
discountValue: number;
|
|
@@ -1923,7 +1928,7 @@ declare class SubscriptionsResource {
|
|
|
1923
1928
|
updatePaymentMethod(params: UpdatePaymentMethodParams, options?: RequestOptions): Promise<ApiResponse<PaymentMethodUpdateCheckout>>;
|
|
1924
1929
|
/** Upgrade, downgrade, or change billing interval. */
|
|
1925
1930
|
changePlan(params: ChangePlanParams, options?: RequestOptions): Promise<ApiResponse<PlanChange>>;
|
|
1926
|
-
/** Preview proration details for an immediate plan change (an upgrade or a longer interval) without applying it. Returns credit, charge, and net amount. Downgrades — a cheaper plan in the same group, or a shorter interval — are scheduled for the end of the current period instead of being prorated, so they return a 400 with code `plan_change_scheduled`; apply those via the change-plan endpoint. */
|
|
1931
|
+
/** Preview proration details for an immediate plan change (an upgrade or a longer interval) without applying it. Returns credit, charge, and net amount. The target plan must belong to the same plan group as the current plan, otherwise a 400 with code `plans_not_in_same_group` is returned. A change between two free plans has nothing to prorate and returns a zero-amount estimate. Downgrades — a cheaper plan in the same group, or a shorter interval — are scheduled for the end of the current period instead of being prorated, so they return a 400 with code `plan_change_scheduled`; apply those via the change-plan endpoint. */
|
|
1927
1932
|
previewChange(params: PreviewChangePlanParams, options?: RequestOptions): Promise<ApiResponse<PreviewChange>>;
|
|
1928
1933
|
/** Activate an add-on on a subscription. Charges a prorated amount for the current billing period. */
|
|
1929
1934
|
activateAddon(params: ActivateAddonParams, options?: RequestOptions): Promise<ApiResponse<SubscriptionAddon>>;
|
|
@@ -2260,7 +2265,7 @@ interface SubscriptionPlanChangeRevokedData {
|
|
|
2260
2265
|
/** The previously scheduled billing interval, if the revoked change included one. */
|
|
2261
2266
|
revokedBillingInterval: string | null;
|
|
2262
2267
|
}
|
|
2263
|
-
/** Fired when a recurring payment fails on a previously paid subscription and its status becomes past_due.
|
|
2268
|
+
/** Fired when a recurring payment fails on a previously paid subscription and its status becomes past_due. past_due is a grace window, not a cutoff: usage and seats keep working while new purchases are blocked, and dunning retries the charge — use this to notify the customer and recover the payment. */
|
|
2264
2269
|
interface SubscriptionPastDueData {
|
|
2265
2270
|
/** The subscription ID. */
|
|
2266
2271
|
subscriptionId: string;
|
|
@@ -3208,7 +3213,7 @@ declare function createCommet<const TConfig extends BillingConfig>(_billingConfi
|
|
|
3208
3213
|
|
|
3209
3214
|
declare function registerIntegration(name: string, version: string): void;
|
|
3210
3215
|
|
|
3211
|
-
declare const API_VERSION = "2026-
|
|
3216
|
+
declare const API_VERSION = "2026-07-11";
|
|
3212
3217
|
declare const SDK_VERSION: string;
|
|
3213
3218
|
|
|
3214
3219
|
export { API_VERSION, type ActivateAddonParams, type ActiveAddon, type AddPayoutBankAccountParams, type AddPlanFeatureParams, type AddPlanPriceParams, type AddPlanToGroupParams, type AddQuotaParams, type AddSeatsParams, type AddedPlanToGroup, type Addon, type AddonActivatedData, type AddonDeactivatedData, type AdjustBalanceParams, type AdvanceTestClockParams, type ApiErrorDetail, type ApiKey, type ApiResponse, type BalanceAdjustment, type BalanceDepletedData, type BalanceLowData, type BalanceToppedUpData, type BalanceTopup, type BatchCreateCustomersParams, type BillingConfig, type BillingInterval, type BulkSeatUpdate, type BulkSetSeatsParams, type CanUseFeatureParams, type CancelPaymentParams, type CancelSubscriptionParams, type CanceledSubscription, type ChangePlanParams, type ChargePaymentParams, type CheckUsageParams, type CheckoutReadyData, Commet, CommetAPIError, type CommetClientOptions, CommetError, CommetValidationError, type CompletePayoutVerificationParams, type ConsumptionModel, type CreateAddonParams, type CreateAdjustmentInvoiceParams, type CreateApiKeyParams, type CreateCreditPackParams, type CreateCustomerParams, type CreateFeatureParams, type CreatePaymentParams, type CreatePlanGroupParams, type CreatePlanParams, type CreatePromoCodeParams, type CreateSubscriptionParams, type CreateSubscriptionRecoveryLinkParams, type CreateWebhookParams, type CreatedApiKey, type CreatedInvoice, type CreditGrant, type CreditPack, type CreditsDepletedData, type CreditsExpiredData, type CreditsGrantedData, type CreditsLowData, type CreditsPurchasedData, type Currency, type Customer, type CustomerBatch, type CustomerCreatedData, type CustomerID, type CustomerStateChangedData, type CustomerUpdatedData, type DeactivateAddonParams, type DefaultPlanPrice, type DeleteAddonParams, type DeleteApiKeyParams, type DeleteCreditPackParams, type DeleteFeatureParams, type DeletePlanGroupParams, type DeletePlanParams, type DeletePlanPriceParams, type DeleteRegionalPricesParams, type DeleteWebhookParams, type DeletedObject, type DeletedPlanRegionalPricing, type DeletedSubscriptionAddon, type DiscountType, type DownloadInvoiceParams, type EventID, type Feature, type FeatureAccess, type FeatureDef, type FeatureLookup, type FeatureType, type GetActiveSubscriptionParams, type GetAddonParams, type GetAllQuotaAllowancesParams, type GetAllSeatBalancesParams, type GetCustomerParams, type GetFeatureAccessParams, type GetFeatureParams, type GetInvoiceParams, type GetPaymentParams, type GetPlanGroupParams, type GetPlanParams, type GetPromoCodeParams, type GetQuotaAllowanceParams, type GetSeatBalanceParams, type GetSubscriptionParams, type GetTransactionParams, type GetWebhookParams, type InferFeatureCodes, type InferPlanCodes, type InferSeatCodes, type InferUsageCodes, type Invoice, type InvoiceCreatedData, type InvoiceDownload, type InvoiceOverdueData, type InvoiceStatus, type InvoiceType, type InvoiceUpcomingData, type InvoiceVoidedData, type ListActiveAddonsParams, type ListAddonsParams, type ListApiKeysParams, type ListCustomersParams, type ListFeatureAccessParams, type ListInvoicesParams, type ListPaymentsParams, type ListPlanGroupsParams, type ListPlansParams, type ListPromoCodesParams, type ListSubscriptionsParams, type ListTransactionsParams, type ListWebhooksParams, type PaginatedList, type PaginatedResponse, type Payment, type PaymentDisputeResolvedData, type PaymentDisputedData, type PaymentFailedData, type PaymentLinkCanceledData, type PaymentLinkCompletedData, type PaymentLinkCreatedData, type PaymentLinkFailedData, type PaymentMethodAttachedData, type PaymentMethodUpdateCheckout, type PaymentMethodUpdatedData, type PaymentProvider, type PaymentReceivedData, type PaymentRecoveredData, type PaymentRefundedData, type PaymentRetryFailedData, type Payout, type PayoutAvailableData, type PayoutBankAccount, type PayoutCreatedData, type PayoutFailedData, type PayoutPaidData, type PayoutVerification, type Plan, type PlanChange, type PlanDef, type PlanFeature, type PlanFeatureValue, type PlanGroup, type PlanPrice, type PlanRegionalPricing, type PlanRegionalPricingResult, type PlanVisibility, type PortalAccess, type PreviewChange, type PreviewChangePlanParams, type PriceDef, type PromoCode, type PurchaseCreditsParams, type QuotaExceededData, type QuotaThresholdReachedData, type ReactivateSubscriptionParams, type ReactivatedSubscription, type RecoveryLink, type RefundTransactionParams, type RemovePlanFeatureParams, type RemovePlanFromGroupParams, type RemoveQuotaParams, type RemoveSeatsParams, type RemovedPlanFeature, type RemovedPlanFromGroup, type ReorderPlansInGroupParams, type ReorderedPlans, type RequestOptions, type RequestPayoutParams, type RequestPortalAccessParams, type ResolvedFeatureCode, type ResolvedPlanCode, type ResolvedSeatCode, type ResolvedUsageCode, type RetryTransactionParams, SDK_VERSION, type SeatBalance, type SeatBalanceListItem, type SeatEvent, type SeatsLimitReachedData, type SeatsUpdatedData, type SendInvoiceParams, type SentInvoice, type SetDefaultPlanPriceParams, type SetPlanRegionalPricingParams, type SetPlanVisibilityParams, type SetQuotaParams, type SetSeatsParams, type Subscription, type SubscriptionActivatedData, type SubscriptionAddon, type SubscriptionCanceledData, type SubscriptionCancellationRevokedData, type SubscriptionCancellationScheduledData, type SubscriptionCreatedData, type SubscriptionPastDueData, type SubscriptionPlanChangeRevokedData, type SubscriptionPlanChangeScheduledData, type SubscriptionPlanChangedData, type SubscriptionReactivatedData, type SubscriptionStatus, type SubscriptionUpdatedData, type TestClock, type TestClockBilling, type TestWebhookParams, type Timezone, type TopupBalanceParams, type TrackModelTokensParams, type TrackParams, type TrackUsageParams, type Transaction, type TransactionRefund, type TransactionRetry, type TransactionStatus, type TrialCheckoutReadyData, type TrialConvertedData, type TrialExpiredData, type TrialStartedData, type TrialWillEndData, type UncancelSubscriptionParams, type UncanceledSubscription, type UpdateAddonParams, type UpdateCreditPackParams, type UpdateCustomerParams, type UpdateFeatureParams, type UpdateInvoiceStatusParams, type UpdatePaymentMethodParams, type UpdatePlanFeatureParams, type UpdatePlanGroupParams, type UpdatePlanParams, type UpdatePlanPriceParams, type UpdatePromoCodeParams, type UpdateWebhookParams, type UpsertRegionalPricesParams, type UsageCheckDenialReason, type UsageCheckResult, type UsageEvent, type UsageEventProperty, type UsageQuota, type UsageQuotaEvent, type UsageRecordedData, type WebhookAddonRef, type WebhookBalance, type WebhookBankRef, type WebhookCardInfo, type WebhookCreditsBalance, type WebhookData, type WebhookEndpoint, type WebhookEndpointCreated, type WebhookEvent, type WebhookEventDataMap, type WebhookEventEnvelope, type WebhookEventHandler, type WebhookEventPayload, type WebhookFeatureAccess, type WebhookPayload, type WebhookPlanRef, type WebhookSeatSummary, type WebhookTestResult, Webhooks, createCommet, Commet as default, defineConfig, registerIntegration };
|
package/dist/index.d.ts
CHANGED
|
@@ -923,9 +923,13 @@ interface TestClockBilling {
|
|
|
923
923
|
interface Transaction {
|
|
924
924
|
id: string;
|
|
925
925
|
invoiceId: string | null;
|
|
926
|
-
|
|
927
|
-
|
|
926
|
+
/** Gross amount in USD cents. Null when the charge never settled in USD — a failed non-USD attempt has no exchange rate, so no USD figure exists; see presentmentAmount. */
|
|
927
|
+
grossAmount: number | null;
|
|
928
|
+
/** Subtotal in USD cents (gross minus tax). Null when grossAmount is null. */
|
|
929
|
+
subtotal: number | null;
|
|
928
930
|
taxAmount: number | null;
|
|
931
|
+
/** 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. */
|
|
932
|
+
presentmentAmount: number | null;
|
|
929
933
|
currency: string;
|
|
930
934
|
/** The payment provider the charge was routed to: stripe, commet, or dlocal. */
|
|
931
935
|
provider: PaymentProvider;
|
|
@@ -1383,7 +1387,7 @@ declare class PaymentsResource {
|
|
|
1383
1387
|
list(params?: ListPaymentsParams, options?: RequestOptions): Promise<ApiResponse<Array<Payment>>>;
|
|
1384
1388
|
/** Create a hosted payment link. Returns a url the customer opens to pay with any card. Calculates tax, generates an invoice, and vaults the payment method on confirmation. No subscription or plan required. */
|
|
1385
1389
|
create(params: CreatePaymentParams, options?: RequestOptions): Promise<ApiResponse<Payment>>;
|
|
1386
|
-
/** Charge a customer's vaulted payment method off-session. Calculates tax, generates an invoice, and sends a receipt.
|
|
1390
|
+
/** Charge a customer's vaulted payment method off-session. Calculates tax, generates an invoice, and sends a receipt. Requires the customer to have a subscription in active, trialing, or past_due state. */
|
|
1387
1391
|
charge(params: ChargePaymentParams, options?: RequestOptions): Promise<ApiResponse<Payment>>;
|
|
1388
1392
|
/** Retrieve a payment by its public ID. */
|
|
1389
1393
|
get(params: GetPaymentParams, options?: RequestOptions): Promise<ApiResponse<Payment>>;
|
|
@@ -1833,6 +1837,7 @@ interface CreateSubscriptionParams {
|
|
|
1833
1837
|
billingInterval?: BillingInterval | null;
|
|
1834
1838
|
initialSeats?: Record<string, number>;
|
|
1835
1839
|
skipTrial?: boolean;
|
|
1840
|
+
customTrialDays?: number;
|
|
1836
1841
|
introOffer?: {
|
|
1837
1842
|
discountType: DiscountType;
|
|
1838
1843
|
discountValue: number;
|
|
@@ -1923,7 +1928,7 @@ declare class SubscriptionsResource {
|
|
|
1923
1928
|
updatePaymentMethod(params: UpdatePaymentMethodParams, options?: RequestOptions): Promise<ApiResponse<PaymentMethodUpdateCheckout>>;
|
|
1924
1929
|
/** Upgrade, downgrade, or change billing interval. */
|
|
1925
1930
|
changePlan(params: ChangePlanParams, options?: RequestOptions): Promise<ApiResponse<PlanChange>>;
|
|
1926
|
-
/** Preview proration details for an immediate plan change (an upgrade or a longer interval) without applying it. Returns credit, charge, and net amount. Downgrades — a cheaper plan in the same group, or a shorter interval — are scheduled for the end of the current period instead of being prorated, so they return a 400 with code `plan_change_scheduled`; apply those via the change-plan endpoint. */
|
|
1931
|
+
/** Preview proration details for an immediate plan change (an upgrade or a longer interval) without applying it. Returns credit, charge, and net amount. The target plan must belong to the same plan group as the current plan, otherwise a 400 with code `plans_not_in_same_group` is returned. A change between two free plans has nothing to prorate and returns a zero-amount estimate. Downgrades — a cheaper plan in the same group, or a shorter interval — are scheduled for the end of the current period instead of being prorated, so they return a 400 with code `plan_change_scheduled`; apply those via the change-plan endpoint. */
|
|
1927
1932
|
previewChange(params: PreviewChangePlanParams, options?: RequestOptions): Promise<ApiResponse<PreviewChange>>;
|
|
1928
1933
|
/** Activate an add-on on a subscription. Charges a prorated amount for the current billing period. */
|
|
1929
1934
|
activateAddon(params: ActivateAddonParams, options?: RequestOptions): Promise<ApiResponse<SubscriptionAddon>>;
|
|
@@ -2260,7 +2265,7 @@ interface SubscriptionPlanChangeRevokedData {
|
|
|
2260
2265
|
/** The previously scheduled billing interval, if the revoked change included one. */
|
|
2261
2266
|
revokedBillingInterval: string | null;
|
|
2262
2267
|
}
|
|
2263
|
-
/** Fired when a recurring payment fails on a previously paid subscription and its status becomes past_due.
|
|
2268
|
+
/** Fired when a recurring payment fails on a previously paid subscription and its status becomes past_due. past_due is a grace window, not a cutoff: usage and seats keep working while new purchases are blocked, and dunning retries the charge — use this to notify the customer and recover the payment. */
|
|
2264
2269
|
interface SubscriptionPastDueData {
|
|
2265
2270
|
/** The subscription ID. */
|
|
2266
2271
|
subscriptionId: string;
|
|
@@ -3208,7 +3213,7 @@ declare function createCommet<const TConfig extends BillingConfig>(_billingConfi
|
|
|
3208
3213
|
|
|
3209
3214
|
declare function registerIntegration(name: string, version: string): void;
|
|
3210
3215
|
|
|
3211
|
-
declare const API_VERSION = "2026-
|
|
3216
|
+
declare const API_VERSION = "2026-07-11";
|
|
3212
3217
|
declare const SDK_VERSION: string;
|
|
3213
3218
|
|
|
3214
3219
|
export { API_VERSION, type ActivateAddonParams, type ActiveAddon, type AddPayoutBankAccountParams, type AddPlanFeatureParams, type AddPlanPriceParams, type AddPlanToGroupParams, type AddQuotaParams, type AddSeatsParams, type AddedPlanToGroup, type Addon, type AddonActivatedData, type AddonDeactivatedData, type AdjustBalanceParams, type AdvanceTestClockParams, type ApiErrorDetail, type ApiKey, type ApiResponse, type BalanceAdjustment, type BalanceDepletedData, type BalanceLowData, type BalanceToppedUpData, type BalanceTopup, type BatchCreateCustomersParams, type BillingConfig, type BillingInterval, type BulkSeatUpdate, type BulkSetSeatsParams, type CanUseFeatureParams, type CancelPaymentParams, type CancelSubscriptionParams, type CanceledSubscription, type ChangePlanParams, type ChargePaymentParams, type CheckUsageParams, type CheckoutReadyData, Commet, CommetAPIError, type CommetClientOptions, CommetError, CommetValidationError, type CompletePayoutVerificationParams, type ConsumptionModel, type CreateAddonParams, type CreateAdjustmentInvoiceParams, type CreateApiKeyParams, type CreateCreditPackParams, type CreateCustomerParams, type CreateFeatureParams, type CreatePaymentParams, type CreatePlanGroupParams, type CreatePlanParams, type CreatePromoCodeParams, type CreateSubscriptionParams, type CreateSubscriptionRecoveryLinkParams, type CreateWebhookParams, type CreatedApiKey, type CreatedInvoice, type CreditGrant, type CreditPack, type CreditsDepletedData, type CreditsExpiredData, type CreditsGrantedData, type CreditsLowData, type CreditsPurchasedData, type Currency, type Customer, type CustomerBatch, type CustomerCreatedData, type CustomerID, type CustomerStateChangedData, type CustomerUpdatedData, type DeactivateAddonParams, type DefaultPlanPrice, type DeleteAddonParams, type DeleteApiKeyParams, type DeleteCreditPackParams, type DeleteFeatureParams, type DeletePlanGroupParams, type DeletePlanParams, type DeletePlanPriceParams, type DeleteRegionalPricesParams, type DeleteWebhookParams, type DeletedObject, type DeletedPlanRegionalPricing, type DeletedSubscriptionAddon, type DiscountType, type DownloadInvoiceParams, type EventID, type Feature, type FeatureAccess, type FeatureDef, type FeatureLookup, type FeatureType, type GetActiveSubscriptionParams, type GetAddonParams, type GetAllQuotaAllowancesParams, type GetAllSeatBalancesParams, type GetCustomerParams, type GetFeatureAccessParams, type GetFeatureParams, type GetInvoiceParams, type GetPaymentParams, type GetPlanGroupParams, type GetPlanParams, type GetPromoCodeParams, type GetQuotaAllowanceParams, type GetSeatBalanceParams, type GetSubscriptionParams, type GetTransactionParams, type GetWebhookParams, type InferFeatureCodes, type InferPlanCodes, type InferSeatCodes, type InferUsageCodes, type Invoice, type InvoiceCreatedData, type InvoiceDownload, type InvoiceOverdueData, type InvoiceStatus, type InvoiceType, type InvoiceUpcomingData, type InvoiceVoidedData, type ListActiveAddonsParams, type ListAddonsParams, type ListApiKeysParams, type ListCustomersParams, type ListFeatureAccessParams, type ListInvoicesParams, type ListPaymentsParams, type ListPlanGroupsParams, type ListPlansParams, type ListPromoCodesParams, type ListSubscriptionsParams, type ListTransactionsParams, type ListWebhooksParams, type PaginatedList, type PaginatedResponse, type Payment, type PaymentDisputeResolvedData, type PaymentDisputedData, type PaymentFailedData, type PaymentLinkCanceledData, type PaymentLinkCompletedData, type PaymentLinkCreatedData, type PaymentLinkFailedData, type PaymentMethodAttachedData, type PaymentMethodUpdateCheckout, type PaymentMethodUpdatedData, type PaymentProvider, type PaymentReceivedData, type PaymentRecoveredData, type PaymentRefundedData, type PaymentRetryFailedData, type Payout, type PayoutAvailableData, type PayoutBankAccount, type PayoutCreatedData, type PayoutFailedData, type PayoutPaidData, type PayoutVerification, type Plan, type PlanChange, type PlanDef, type PlanFeature, type PlanFeatureValue, type PlanGroup, type PlanPrice, type PlanRegionalPricing, type PlanRegionalPricingResult, type PlanVisibility, type PortalAccess, type PreviewChange, type PreviewChangePlanParams, type PriceDef, type PromoCode, type PurchaseCreditsParams, type QuotaExceededData, type QuotaThresholdReachedData, type ReactivateSubscriptionParams, type ReactivatedSubscription, type RecoveryLink, type RefundTransactionParams, type RemovePlanFeatureParams, type RemovePlanFromGroupParams, type RemoveQuotaParams, type RemoveSeatsParams, type RemovedPlanFeature, type RemovedPlanFromGroup, type ReorderPlansInGroupParams, type ReorderedPlans, type RequestOptions, type RequestPayoutParams, type RequestPortalAccessParams, type ResolvedFeatureCode, type ResolvedPlanCode, type ResolvedSeatCode, type ResolvedUsageCode, type RetryTransactionParams, SDK_VERSION, type SeatBalance, type SeatBalanceListItem, type SeatEvent, type SeatsLimitReachedData, type SeatsUpdatedData, type SendInvoiceParams, type SentInvoice, type SetDefaultPlanPriceParams, type SetPlanRegionalPricingParams, type SetPlanVisibilityParams, type SetQuotaParams, type SetSeatsParams, type Subscription, type SubscriptionActivatedData, type SubscriptionAddon, type SubscriptionCanceledData, type SubscriptionCancellationRevokedData, type SubscriptionCancellationScheduledData, type SubscriptionCreatedData, type SubscriptionPastDueData, type SubscriptionPlanChangeRevokedData, type SubscriptionPlanChangeScheduledData, type SubscriptionPlanChangedData, type SubscriptionReactivatedData, type SubscriptionStatus, type SubscriptionUpdatedData, type TestClock, type TestClockBilling, type TestWebhookParams, type Timezone, type TopupBalanceParams, type TrackModelTokensParams, type TrackParams, type TrackUsageParams, type Transaction, type TransactionRefund, type TransactionRetry, type TransactionStatus, type TrialCheckoutReadyData, type TrialConvertedData, type TrialExpiredData, type TrialStartedData, type TrialWillEndData, type UncancelSubscriptionParams, type UncanceledSubscription, type UpdateAddonParams, type UpdateCreditPackParams, type UpdateCustomerParams, type UpdateFeatureParams, type UpdateInvoiceStatusParams, type UpdatePaymentMethodParams, type UpdatePlanFeatureParams, type UpdatePlanGroupParams, type UpdatePlanParams, type UpdatePlanPriceParams, type UpdatePromoCodeParams, type UpdateWebhookParams, type UpsertRegionalPricesParams, type UsageCheckDenialReason, type UsageCheckResult, type UsageEvent, type UsageEventProperty, type UsageQuota, type UsageQuotaEvent, type UsageRecordedData, type WebhookAddonRef, type WebhookBalance, type WebhookBankRef, type WebhookCardInfo, type WebhookCreditsBalance, type WebhookData, type WebhookEndpoint, type WebhookEndpointCreated, type WebhookEvent, type WebhookEventDataMap, type WebhookEventEnvelope, type WebhookEventHandler, type WebhookEventPayload, type WebhookFeatureAccess, type WebhookPayload, type WebhookPlanRef, type WebhookSeatSummary, type WebhookTestResult, Webhooks, createCommet, Commet as default, defineConfig, registerIntegration };
|
package/dist/index.js
CHANGED
|
@@ -259,7 +259,7 @@ var PaymentsResource = class {
|
|
|
259
259
|
async create(params, options) {
|
|
260
260
|
return this.httpClient.post("/payments", params, options);
|
|
261
261
|
}
|
|
262
|
-
/** Charge a customer's vaulted payment method off-session. Calculates tax, generates an invoice, and sends a receipt.
|
|
262
|
+
/** Charge a customer's vaulted payment method off-session. Calculates tax, generates an invoice, and sends a receipt. Requires the customer to have a subscription in active, trialing, or past_due state. */
|
|
263
263
|
async charge(params, options) {
|
|
264
264
|
return this.httpClient.post("/payments/charge", params, options);
|
|
265
265
|
}
|
|
@@ -618,7 +618,7 @@ var SubscriptionsResource = class {
|
|
|
618
618
|
options
|
|
619
619
|
);
|
|
620
620
|
}
|
|
621
|
-
/** Preview proration details for an immediate plan change (an upgrade or a longer interval) without applying it. Returns credit, charge, and net amount. Downgrades — a cheaper plan in the same group, or a shorter interval — are scheduled for the end of the current period instead of being prorated, so they return a 400 with code `plan_change_scheduled`; apply those via the change-plan endpoint. */
|
|
621
|
+
/** Preview proration details for an immediate plan change (an upgrade or a longer interval) without applying it. Returns credit, charge, and net amount. The target plan must belong to the same plan group as the current plan, otherwise a 400 with code `plans_not_in_same_group` is returned. A change between two free plans has nothing to prorate and returns a zero-amount estimate. Downgrades — a cheaper plan in the same group, or a shorter interval — are scheduled for the end of the current period instead of being prorated, so they return a 400 with code `plan_change_scheduled`; apply those via the change-plan endpoint. */
|
|
622
622
|
async previewChange(params, options) {
|
|
623
623
|
const { id, ...rest } = params;
|
|
624
624
|
return this.httpClient.post(
|
|
@@ -879,8 +879,8 @@ var CommetValidationError = class extends CommetError {
|
|
|
879
879
|
};
|
|
880
880
|
|
|
881
881
|
// src/version.ts
|
|
882
|
-
var API_VERSION = "2026-
|
|
883
|
-
var SDK_VERSION = "7.
|
|
882
|
+
var API_VERSION = "2026-07-11";
|
|
883
|
+
var SDK_VERSION = "7.7.0";
|
|
884
884
|
|
|
885
885
|
// src/utils/telemetry.ts
|
|
886
886
|
var registeredIntegrations = /* @__PURE__ */ new Set();
|