@usethrottle/subscriptions 3.3.0 → 3.4.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.
|
@@ -60,6 +60,12 @@ interface Subscription {
|
|
|
60
60
|
taxAddressSnapshot?: SubscriptionTaxAddress | null;
|
|
61
61
|
/** `checkout` when captured at signup, `manual` once a merchant edited it. */
|
|
62
62
|
taxAddressSource?: 'checkout' | 'manual' | null;
|
|
63
|
+
/**
|
|
64
|
+
* The saved card this subscription renews on (the card used at checkout);
|
|
65
|
+
* null = the customer's default card. A charge that cannot use it falls back
|
|
66
|
+
* to the default card.
|
|
67
|
+
*/
|
|
68
|
+
paymentMethodId?: string | null;
|
|
63
69
|
/**
|
|
64
70
|
* Set by the renewal job when renewals are failing (`system_error`) or when
|
|
65
71
|
* a card was charged but the renewal could not be recorded (`orphan_charge`
|
|
@@ -76,9 +82,9 @@ interface Subscription {
|
|
|
76
82
|
updatedAt?: string;
|
|
77
83
|
}
|
|
78
84
|
interface SubscriptionRenewalIssue {
|
|
79
|
-
kind: 'system_error' | 'orphan_charge';
|
|
85
|
+
kind: 'system_error' | 'orphan_charge' | 'payment_review';
|
|
80
86
|
/** Stable code; `message` is its fixed, merchant-safe sentence. */
|
|
81
|
-
reason: 'tax_quote_failed' | 'internal_error' | 'period_not_advanced' | 'record_failed';
|
|
87
|
+
reason: 'tax_quote_failed' | 'internal_error' | 'period_not_advanced' | 'charge_unverified' | 'config_error' | 'record_failed' | 'charge_unresolved';
|
|
82
88
|
count: number;
|
|
83
89
|
firstAt?: string;
|
|
84
90
|
lastAt: string;
|
|
@@ -60,6 +60,12 @@ interface Subscription {
|
|
|
60
60
|
taxAddressSnapshot?: SubscriptionTaxAddress | null;
|
|
61
61
|
/** `checkout` when captured at signup, `manual` once a merchant edited it. */
|
|
62
62
|
taxAddressSource?: 'checkout' | 'manual' | null;
|
|
63
|
+
/**
|
|
64
|
+
* The saved card this subscription renews on (the card used at checkout);
|
|
65
|
+
* null = the customer's default card. A charge that cannot use it falls back
|
|
66
|
+
* to the default card.
|
|
67
|
+
*/
|
|
68
|
+
paymentMethodId?: string | null;
|
|
63
69
|
/**
|
|
64
70
|
* Set by the renewal job when renewals are failing (`system_error`) or when
|
|
65
71
|
* a card was charged but the renewal could not be recorded (`orphan_charge`
|
|
@@ -76,9 +82,9 @@ interface Subscription {
|
|
|
76
82
|
updatedAt?: string;
|
|
77
83
|
}
|
|
78
84
|
interface SubscriptionRenewalIssue {
|
|
79
|
-
kind: 'system_error' | 'orphan_charge';
|
|
85
|
+
kind: 'system_error' | 'orphan_charge' | 'payment_review';
|
|
80
86
|
/** Stable code; `message` is its fixed, merchant-safe sentence. */
|
|
81
|
-
reason: 'tax_quote_failed' | 'internal_error' | 'period_not_advanced' | 'record_failed';
|
|
87
|
+
reason: 'tax_quote_failed' | 'internal_error' | 'period_not_advanced' | 'charge_unverified' | 'config_error' | 'record_failed' | 'charge_unresolved';
|
|
82
88
|
count: number;
|
|
83
89
|
firstAt?: string;
|
|
84
90
|
lastAt: string;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { s as SubscriptionProviderProps, A as SubscriptionsClientContract, m as SubscriptionFetcher, M as MutationState, S as Subscription, C as CancelSubscriptionInput, a as ChangePlanInput, e as CheckoutSession, f as CreateCheckoutSessionInput, g as CreateSubscriptionInput, Q as QueryOptions, h as Customer, k as QueryState, i as CustomerPaymentMethod, L as ListSubscriptionsParams, P as PaginatedSubscriptions, I as TrialEligibilityResult, G as TrialEligibilityInput, U as UpdateSubscriptionInput, D as DunningBannerProps, w as SubscriptionStatusBadgeProps, F as TrialCountdownProps, v as SubscriptionStatus, q as SubscriptionPaymentScheduleRow } from './errors-
|
|
2
|
-
export { b as ChangeQuantityInput, c as CheckoutCollectInput, d as CheckoutCustomerInput, j as Pagination, R as RecordUsageInput, l as RecurringIntent, n as SubscriptionInterval, o as SubscriptionIntervalUnit, p as SubscriptionInvoiceRefund, r as SubscriptionProration, t as SubscriptionRenewalIssue, u as SubscriptionSort, x as SubscriptionTaxAddress, y as SubscriptionUsageItem, z as SubscriptionsClient, B as SubscriptionsClientOptions, T as ThrottleEnvelope, E as ThrottleSubscriptionsError, H as TrialEligibilityReason, W as WaivePeriodInput, J as createSubscriptionsClient } from './errors-
|
|
1
|
+
import { s as SubscriptionProviderProps, A as SubscriptionsClientContract, m as SubscriptionFetcher, M as MutationState, S as Subscription, C as CancelSubscriptionInput, a as ChangePlanInput, e as CheckoutSession, f as CreateCheckoutSessionInput, g as CreateSubscriptionInput, Q as QueryOptions, h as Customer, k as QueryState, i as CustomerPaymentMethod, L as ListSubscriptionsParams, P as PaginatedSubscriptions, I as TrialEligibilityResult, G as TrialEligibilityInput, U as UpdateSubscriptionInput, D as DunningBannerProps, w as SubscriptionStatusBadgeProps, F as TrialCountdownProps, v as SubscriptionStatus, q as SubscriptionPaymentScheduleRow } from './errors-BkGOg36x.cjs';
|
|
2
|
+
export { b as ChangeQuantityInput, c as CheckoutCollectInput, d as CheckoutCustomerInput, j as Pagination, R as RecordUsageInput, l as RecurringIntent, n as SubscriptionInterval, o as SubscriptionIntervalUnit, p as SubscriptionInvoiceRefund, r as SubscriptionProration, t as SubscriptionRenewalIssue, u as SubscriptionSort, x as SubscriptionTaxAddress, y as SubscriptionUsageItem, z as SubscriptionsClient, B as SubscriptionsClientOptions, T as ThrottleEnvelope, E as ThrottleSubscriptionsError, H as TrialEligibilityReason, W as WaivePeriodInput, J as createSubscriptionsClient } from './errors-BkGOg36x.cjs';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
5
|
export { ThrottleError, isThrottleError } from '@usethrottle/errors';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { s as SubscriptionProviderProps, A as SubscriptionsClientContract, m as SubscriptionFetcher, M as MutationState, S as Subscription, C as CancelSubscriptionInput, a as ChangePlanInput, e as CheckoutSession, f as CreateCheckoutSessionInput, g as CreateSubscriptionInput, Q as QueryOptions, h as Customer, k as QueryState, i as CustomerPaymentMethod, L as ListSubscriptionsParams, P as PaginatedSubscriptions, I as TrialEligibilityResult, G as TrialEligibilityInput, U as UpdateSubscriptionInput, D as DunningBannerProps, w as SubscriptionStatusBadgeProps, F as TrialCountdownProps, v as SubscriptionStatus, q as SubscriptionPaymentScheduleRow } from './errors-
|
|
2
|
-
export { b as ChangeQuantityInput, c as CheckoutCollectInput, d as CheckoutCustomerInput, j as Pagination, R as RecordUsageInput, l as RecurringIntent, n as SubscriptionInterval, o as SubscriptionIntervalUnit, p as SubscriptionInvoiceRefund, r as SubscriptionProration, t as SubscriptionRenewalIssue, u as SubscriptionSort, x as SubscriptionTaxAddress, y as SubscriptionUsageItem, z as SubscriptionsClient, B as SubscriptionsClientOptions, T as ThrottleEnvelope, E as ThrottleSubscriptionsError, H as TrialEligibilityReason, W as WaivePeriodInput, J as createSubscriptionsClient } from './errors-
|
|
1
|
+
import { s as SubscriptionProviderProps, A as SubscriptionsClientContract, m as SubscriptionFetcher, M as MutationState, S as Subscription, C as CancelSubscriptionInput, a as ChangePlanInput, e as CheckoutSession, f as CreateCheckoutSessionInput, g as CreateSubscriptionInput, Q as QueryOptions, h as Customer, k as QueryState, i as CustomerPaymentMethod, L as ListSubscriptionsParams, P as PaginatedSubscriptions, I as TrialEligibilityResult, G as TrialEligibilityInput, U as UpdateSubscriptionInput, D as DunningBannerProps, w as SubscriptionStatusBadgeProps, F as TrialCountdownProps, v as SubscriptionStatus, q as SubscriptionPaymentScheduleRow } from './errors-BkGOg36x.js';
|
|
2
|
+
export { b as ChangeQuantityInput, c as CheckoutCollectInput, d as CheckoutCustomerInput, j as Pagination, R as RecordUsageInput, l as RecurringIntent, n as SubscriptionInterval, o as SubscriptionIntervalUnit, p as SubscriptionInvoiceRefund, r as SubscriptionProration, t as SubscriptionRenewalIssue, u as SubscriptionSort, x as SubscriptionTaxAddress, y as SubscriptionUsageItem, z as SubscriptionsClient, B as SubscriptionsClientOptions, T as ThrottleEnvelope, E as ThrottleSubscriptionsError, H as TrialEligibilityReason, W as WaivePeriodInput, J as createSubscriptionsClient } from './errors-BkGOg36x.js';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
5
|
export { ThrottleError, isThrottleError } from '@usethrottle/errors';
|
package/dist/server.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as Subscription } from './errors-
|
|
2
|
-
export { e as CheckoutSession, f as CreateCheckoutSessionInput, h as Customer, i as CustomerPaymentMethod, L as ListSubscriptionsParams, P as PaginatedSubscriptions, z as SubscriptionsClient, A as SubscriptionsClientContract, B as SubscriptionsClientOptions, E as ThrottleSubscriptionsError, G as TrialEligibilityInput, I as TrialEligibilityResult, J as createSubscriptionsClient } from './errors-
|
|
1
|
+
import { S as Subscription } from './errors-BkGOg36x.cjs';
|
|
2
|
+
export { e as CheckoutSession, f as CreateCheckoutSessionInput, h as Customer, i as CustomerPaymentMethod, L as ListSubscriptionsParams, P as PaginatedSubscriptions, z as SubscriptionsClient, A as SubscriptionsClientContract, B as SubscriptionsClientOptions, E as ThrottleSubscriptionsError, G as TrialEligibilityInput, I as TrialEligibilityResult, J as createSubscriptionsClient } from './errors-BkGOg36x.cjs';
|
|
3
3
|
import 'react';
|
|
4
4
|
import '@usethrottle/errors';
|
|
5
5
|
|
package/dist/server.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as Subscription } from './errors-
|
|
2
|
-
export { e as CheckoutSession, f as CreateCheckoutSessionInput, h as Customer, i as CustomerPaymentMethod, L as ListSubscriptionsParams, P as PaginatedSubscriptions, z as SubscriptionsClient, A as SubscriptionsClientContract, B as SubscriptionsClientOptions, E as ThrottleSubscriptionsError, G as TrialEligibilityInput, I as TrialEligibilityResult, J as createSubscriptionsClient } from './errors-
|
|
1
|
+
import { S as Subscription } from './errors-BkGOg36x.js';
|
|
2
|
+
export { e as CheckoutSession, f as CreateCheckoutSessionInput, h as Customer, i as CustomerPaymentMethod, L as ListSubscriptionsParams, P as PaginatedSubscriptions, z as SubscriptionsClient, A as SubscriptionsClientContract, B as SubscriptionsClientOptions, E as ThrottleSubscriptionsError, G as TrialEligibilityInput, I as TrialEligibilityResult, J as createSubscriptionsClient } from './errors-BkGOg36x.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import '@usethrottle/errors';
|
|
5
5
|
|
package/package.json
CHANGED