@fantastic.dev/better-stripe 0.4.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +61 -0
- package/MIGRATION.md +135 -0
- package/README.md +23 -2
- package/dist/client/billing/checkout.d.ts.map +1 -1
- package/dist/client/billing/checkout.js +22 -8
- package/dist/client/billing/checkout.js.map +1 -1
- package/dist/client/billing/subscriptionRouting.d.ts +24 -0
- package/dist/client/billing/subscriptionRouting.d.ts.map +1 -0
- package/dist/client/billing/subscriptionRouting.js +19 -0
- package/dist/client/billing/subscriptionRouting.js.map +1 -0
- package/dist/client/billing/subscriptions.d.ts +6 -6
- package/dist/client/billing/subscriptions.d.ts.map +1 -1
- package/dist/client/billing/subscriptions.js +31 -12
- package/dist/client/billing/subscriptions.js.map +1 -1
- package/dist/client/connect/disputes.js.map +1 -1
- package/dist/client/constants.js +1 -1
- package/dist/client/core/accountLinks.d.ts +1 -0
- package/dist/client/core/accountLinks.d.ts.map +1 -1
- package/dist/client/core/accountLinks.js +0 -6
- package/dist/client/core/accountLinks.js.map +1 -1
- package/dist/client/core/accountStatus.d.ts.map +1 -1
- package/dist/client/core/accountStatus.js +23 -8
- package/dist/client/core/accountStatus.js.map +1 -1
- package/dist/client/index.d.ts +5 -2
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/types/documents.d.ts +1 -0
- package/dist/client/types/documents.d.ts.map +1 -1
- package/dist/client/types/events.d.ts +2 -1
- package/dist/client/types/events.d.ts.map +1 -1
- package/dist/client/types/options.d.ts +7 -0
- package/dist/client/types/options.d.ts.map +1 -1
- package/dist/client/utils/stripeDashboardUrl.d.ts.map +1 -1
- package/dist/client/utils/webhookEndpoints.d.ts.map +1 -1
- package/dist/client/webhooks/handler.d.ts.map +1 -1
- package/dist/client/webhooks/handler.js +35 -1
- package/dist/client/webhooks/handler.js.map +1 -1
- package/dist/client/webhooks/hooks.d.ts +1 -1
- package/dist/client/webhooks/hooks.d.ts.map +1 -1
- package/dist/client/webhooks/hooks.js +5 -1
- package/dist/client/webhooks/hooks.js.map +1 -1
- package/dist/client/webhooks/processors.d.ts.map +1 -1
- package/dist/client/webhooks/processors.js +12 -2
- package/dist/client/webhooks/processors.js.map +1 -1
- package/dist/client/webhooks/v2.d.ts.map +1 -1
- package/dist/client/webhooks/v2.js +11 -3
- package/dist/client/webhooks/v2.js.map +1 -1
- package/dist/component/_generated/component.d.ts +8 -0
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/_generated/server.d.ts +7 -1
- package/dist/component/_generated/server.d.ts.map +1 -1
- package/dist/component/_generated/server.js +2 -1
- package/dist/component/_generated/server.js.map +1 -1
- package/dist/component/billing/mutations.d.ts +29 -28
- package/dist/component/billing/mutations.d.ts.map +1 -1
- package/dist/component/billing/mutations.js +1 -0
- package/dist/component/billing/mutations.js.map +1 -1
- package/dist/component/billing/queries.d.ts +138 -131
- package/dist/component/billing/queries.d.ts.map +1 -1
- package/dist/component/billing/schema.d.ts +67 -65
- package/dist/component/billing/schema.d.ts.map +1 -1
- package/dist/component/billing/validators.d.ts +94 -91
- package/dist/component/billing/validators.d.ts.map +1 -1
- package/dist/component/billing/validators.js +1 -0
- package/dist/component/billing/validators.js.map +1 -1
- package/dist/component/connect/mutations.d.ts +37 -37
- package/dist/component/connect/queries.d.ts +115 -115
- package/dist/component/connect/queries.d.ts.map +1 -1
- package/dist/component/connect/queries.js +34 -71
- package/dist/component/connect/queries.js.map +1 -1
- package/dist/component/connect/schema.d.ts +73 -73
- package/dist/component/connect/validators.d.ts +119 -119
- package/dist/component/connect/validators.d.ts.map +1 -1
- package/dist/component/convex.config.d.ts +1 -0
- package/dist/component/convex.config.d.ts.map +1 -1
- package/dist/component/convex.config.js +2 -1
- package/dist/component/convex.config.js.map +1 -1
- package/dist/component/core/mutations.d.ts +12 -12
- package/dist/component/core/queries.d.ts +34 -34
- package/dist/component/core/schema.d.ts +11 -11
- package/dist/component/core/validators.d.ts +14 -14
- package/dist/component/core/validators.d.ts.map +1 -1
- package/dist/component/lib/fees.d.ts +12 -12
- package/dist/component/lib/fees.d.ts.map +1 -1
- package/dist/component/lib/fees.js +1 -1
- package/dist/component/lib/reversals.js.map +1 -1
- package/dist/component/products/mutations.d.ts +7 -7
- package/dist/component/products/queries.d.ts +33 -33
- package/dist/component/products/schema.d.ts +15 -15
- package/dist/component/products/validators.d.ts +16 -16
- package/dist/component/products/validators.d.ts.map +1 -1
- package/dist/component/schema.d.ts +173 -171
- package/dist/component/schema.d.ts.map +1 -1
- package/dist/component/webhooks/mutations.d.ts +3 -3
- package/dist/component/webhooks/queries.d.ts +12 -12
- package/dist/component/webhooks/schema.d.ts +7 -7
- package/dist/component/webhooks/validators.d.ts +10 -10
- package/dist/component/webhooks/validators.d.ts.map +1 -1
- package/dist/react/components/AccountCreateCard.js.map +1 -1
- package/dist/react/components/BuyerBillingView.js +1 -1
- package/dist/react/components/CheckoutSessionProviderWithKey.d.ts +1 -1
- package/dist/react/components/DisputeDetail.js +1 -1
- package/dist/react/components/DisputesList.js +1 -1
- package/dist/react/components/EarningsSummary.js +1 -1
- package/dist/react/components/EmbeddedCheckout.d.ts.map +1 -1
- package/dist/react/components/EmbeddedCheckout.js +1 -1
- package/dist/react/components/EmbeddedCheckout.js.map +1 -1
- package/dist/react/components/PayoutSchedule.js +1 -1
- package/dist/react/components/SplitBreakdown.js +1 -1
- package/dist/react/components/StripeProvider.d.ts +1 -1
- package/dist/react/components/StripeProviderWithKey.d.ts +1 -1
- package/dist/react/hooks/useAccount.d.ts.map +1 -1
- package/dist/react/hooks/useAccountOnboarding.d.ts.map +1 -1
- package/dist/react/hooks/useCheckout.d.ts.map +1 -1
- package/dist/react/hooks/useDisputeWithCountdown.d.ts.map +1 -1
- package/dist/react/hooks/useDisputes.d.ts.map +1 -1
- package/dist/react/hooks/useEarnings.d.ts.map +1 -1
- package/dist/react/hooks/useInvoices.d.ts.map +1 -1
- package/dist/react/hooks/usePaymentMethodActions.js.map +1 -1
- package/dist/react/hooks/usePaymentMethods.d.ts.map +1 -1
- package/dist/react/hooks/usePrices.d.ts.map +1 -1
- package/dist/react/hooks/useProducts.d.ts.map +1 -1
- package/dist/react/hooks/useSplitBreakdown.d.ts.map +1 -1
- package/dist/react/hooks/useSubscription.d.ts.map +1 -1
- package/dist/react/hooks/useSubscriptions.d.ts.map +1 -1
- package/dist/react/lib/stripe-element-styles.d.ts.map +1 -1
- package/dist/react/lib/stripe-element-styles.js.map +1 -1
- package/package.json +25 -23
- package/src/client/billing/checkout.test.ts +62 -14
- package/src/client/billing/checkout.ts +26 -10
- package/src/client/billing/subscriptionRouting.ts +25 -0
- package/src/client/billing/subscriptions.test.ts +90 -28
- package/src/client/billing/subscriptions.ts +53 -18
- package/src/client/constants.ts +1 -1
- package/src/client/core/accountLinks.test.ts +20 -13
- package/src/client/core/accountLinks.ts +2 -10
- package/src/client/core/accountStatus.test.ts +67 -0
- package/src/client/core/accountStatus.ts +30 -13
- package/src/client/helpers.test.ts +2 -2
- package/src/client/index.ts +49 -44
- package/src/client/stripe-version.test.ts +47 -0
- package/src/client/types/documents.ts +1 -0
- package/src/client/types/events.ts +2 -1
- package/src/client/types/options.ts +7 -0
- package/src/client/webhooks/handler.ts +38 -1
- package/src/client/webhooks/hooks.ts +3 -0
- package/src/client/webhooks/processors.test.ts +201 -40
- package/src/client/webhooks/processors.ts +21 -17
- package/src/client/webhooks/retry.integration.test.ts +196 -0
- package/src/client/webhooks/v2.test.ts +36 -0
- package/src/client/webhooks/v2.ts +14 -4
- package/src/component/_generated/component.ts +15 -28
- package/src/component/_generated/server.ts +9 -2
- package/src/component/billing/mutations.ts +1 -0
- package/src/component/billing/validators.ts +1 -0
- package/src/component/config-queries.test.ts +8 -4
- package/src/component/connect/queries.ts +31 -66
- package/src/component/convex.config.ts +2 -1
- package/src/component/earnings-totals.test.ts +27 -1
- package/src/component/lib/fees.ts +1 -1
- package/src/react/components/EmbeddedCheckout.render.test.tsx +57 -0
- package/src/react/components/EmbeddedCheckout.tsx +1 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type Infer } from "convex/values";
|
|
2
|
-
export declare const subscriptionStatusValidator: import("convex/values").VUnion<"active" | "
|
|
2
|
+
export declare const subscriptionStatusValidator: import("convex/values").VUnion<"active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "trialing" | "unpaid", [import("convex/values").VLiteral<"active", "required">, import("convex/values").VLiteral<"trialing", "required">, import("convex/values").VLiteral<"past_due", "required">, import("convex/values").VLiteral<"canceled", "required">, import("convex/values").VLiteral<"incomplete", "required">, import("convex/values").VLiteral<"incomplete_expired", "required">, import("convex/values").VLiteral<"unpaid", "required">, import("convex/values").VLiteral<"paused", "required">], "required", never>;
|
|
3
3
|
export type SubscriptionStatus = Infer<typeof subscriptionStatusValidator>;
|
|
4
|
-
export declare const checkoutSessionModeValidator: import("convex/values").VUnion<"payment" | "
|
|
4
|
+
export declare const checkoutSessionModeValidator: import("convex/values").VUnion<"payment" | "setup" | "subscription", [import("convex/values").VLiteral<"payment", "required">, import("convex/values").VLiteral<"subscription", "required">, import("convex/values").VLiteral<"setup", "required">], "required", never>;
|
|
5
5
|
export type CheckoutSessionMode = Infer<typeof checkoutSessionModeValidator>;
|
|
6
|
-
export declare const checkoutSessionStatusValidator: import("convex/values").VUnion<"
|
|
6
|
+
export declare const checkoutSessionStatusValidator: import("convex/values").VUnion<"complete" | "expired" | "open", [import("convex/values").VLiteral<"open", "required">, import("convex/values").VLiteral<"complete", "required">, import("convex/values").VLiteral<"expired", "required">], "required", never>;
|
|
7
7
|
export type CheckoutSessionStatus = Infer<typeof checkoutSessionStatusValidator>;
|
|
8
8
|
/**
|
|
9
9
|
* Field validators for the `subscriptions` table.
|
|
@@ -11,7 +11,6 @@ export type CheckoutSessionStatus = Infer<typeof checkoutSessionStatusValidator>
|
|
|
11
11
|
* two can never drift apart.
|
|
12
12
|
*/
|
|
13
13
|
export declare const subscriptionFields: {
|
|
14
|
-
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
15
14
|
destinationAccountId: import("convex/values").VString<string | undefined, "optional">;
|
|
16
15
|
applicationFeeAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
17
16
|
applicationFeePercent: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
@@ -19,71 +18,73 @@ export declare const subscriptionFields: {
|
|
|
19
18
|
feeRefundedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
20
19
|
chargeType: import("convex/values").VUnion<"destination" | "separate" | undefined, [import("convex/values").VLiteral<"destination", "required">, import("convex/values").VLiteral<"separate", "required">], "optional", never>;
|
|
21
20
|
splitRecipients: import("convex/values").VArray<{
|
|
22
|
-
percent?: number | undefined;
|
|
23
21
|
amount?: number | undefined;
|
|
24
22
|
destinationAccountId: string;
|
|
25
|
-
role: "store" | "affiliate" | "other";
|
|
26
|
-
}[] | undefined, import("convex/values").VObject<{
|
|
27
23
|
percent?: number | undefined;
|
|
24
|
+
role: "affiliate" | "other" | "store";
|
|
25
|
+
}[] | undefined, import("convex/values").VObject<{
|
|
28
26
|
amount?: number | undefined;
|
|
29
27
|
destinationAccountId: string;
|
|
30
|
-
|
|
28
|
+
percent?: number | undefined;
|
|
29
|
+
role: "affiliate" | "other" | "store";
|
|
31
30
|
}, {
|
|
32
31
|
destinationAccountId: import("convex/values").VString<string, "required">;
|
|
33
|
-
role: import("convex/values").VUnion<"
|
|
32
|
+
role: import("convex/values").VUnion<"affiliate" | "other" | "store", [import("convex/values").VLiteral<"store", "required">, import("convex/values").VLiteral<"affiliate", "required">, import("convex/values").VLiteral<"other", "required">], "required", never>;
|
|
34
33
|
amount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
35
34
|
percent: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
36
|
-
}, "required", "
|
|
35
|
+
}, "required", "amount" | "destinationAccountId" | "percent" | "role">, "optional">;
|
|
37
36
|
stripeSubscriptionId: import("convex/values").VString<string, "required">;
|
|
38
37
|
accountId: import("convex/values").VString<string | undefined, "optional">;
|
|
39
38
|
userId: import("convex/values").VString<string, "required">;
|
|
40
39
|
orgId: import("convex/values").VString<string | undefined, "optional">;
|
|
41
|
-
status: import("convex/values").VUnion<"active" | "
|
|
40
|
+
status: import("convex/values").VUnion<"active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "trialing" | "unpaid", [import("convex/values").VLiteral<"active", "required">, import("convex/values").VLiteral<"trialing", "required">, import("convex/values").VLiteral<"past_due", "required">, import("convex/values").VLiteral<"canceled", "required">, import("convex/values").VLiteral<"incomplete", "required">, import("convex/values").VLiteral<"incomplete_expired", "required">, import("convex/values").VLiteral<"unpaid", "required">, import("convex/values").VLiteral<"paused", "required">], "required", never>;
|
|
42
41
|
priceId: import("convex/values").VString<string | undefined, "optional">;
|
|
43
42
|
quantity: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
44
43
|
currentPeriodStart: import("convex/values").VString<string | undefined, "optional">;
|
|
45
44
|
currentPeriodEnd: import("convex/values").VString<string | undefined, "optional">;
|
|
46
45
|
cancelAtPeriodEnd: import("convex/values").VBoolean<boolean, "required">;
|
|
46
|
+
isCollectionPaused: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
47
47
|
canceledAt: import("convex/values").VString<string | undefined, "optional">;
|
|
48
48
|
isTrialing: import("convex/values").VBoolean<boolean, "required">;
|
|
49
49
|
trialStart: import("convex/values").VString<string | undefined, "optional">;
|
|
50
50
|
trialEnd: import("convex/values").VString<string | undefined, "optional">;
|
|
51
51
|
currency: import("convex/values").VString<string | undefined, "optional">;
|
|
52
|
+
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
52
53
|
};
|
|
53
54
|
/** Full `subscriptions` document, including system fields. */
|
|
54
55
|
export declare const subscriptionDocValidator: import("convex/values").VObject<{
|
|
56
|
+
_creationTime: number;
|
|
57
|
+
_id: import("convex/values").GenericId<"subscriptions">;
|
|
55
58
|
accountId?: string | undefined;
|
|
56
59
|
applicationFeeAmount?: number | undefined;
|
|
57
60
|
applicationFeePercent?: number | undefined;
|
|
61
|
+
cancelAtPeriodEnd: boolean;
|
|
62
|
+
canceledAt?: string | undefined;
|
|
58
63
|
chargeType?: "destination" | "separate" | undefined;
|
|
59
64
|
currency?: string | undefined;
|
|
65
|
+
currentPeriodEnd?: string | undefined;
|
|
66
|
+
currentPeriodStart?: string | undefined;
|
|
60
67
|
destinationAccountId?: string | undefined;
|
|
61
68
|
feeCollectedAmount?: number | undefined;
|
|
62
69
|
feeRefundedAmount?: number | undefined;
|
|
70
|
+
isCollectionPaused?: boolean | undefined;
|
|
71
|
+
isTrialing: boolean;
|
|
63
72
|
metadata?: any;
|
|
64
73
|
orgId?: string | undefined;
|
|
65
74
|
priceId?: string | undefined;
|
|
75
|
+
quantity?: number | undefined;
|
|
66
76
|
splitRecipients?: {
|
|
67
|
-
percent?: number | undefined;
|
|
68
77
|
amount?: number | undefined;
|
|
69
78
|
destinationAccountId: string;
|
|
70
|
-
|
|
79
|
+
percent?: number | undefined;
|
|
80
|
+
role: "affiliate" | "other" | "store";
|
|
71
81
|
}[] | undefined;
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
currentPeriodStart?: string | undefined;
|
|
75
|
-
quantity?: number | undefined;
|
|
82
|
+
status: "active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "trialing" | "unpaid";
|
|
83
|
+
stripeSubscriptionId: string;
|
|
76
84
|
trialEnd?: string | undefined;
|
|
77
85
|
trialStart?: string | undefined;
|
|
78
|
-
status: "active" | "trialing" | "past_due" | "canceled" | "incomplete" | "incomplete_expired" | "unpaid" | "paused";
|
|
79
86
|
userId: string;
|
|
80
|
-
cancelAtPeriodEnd: boolean;
|
|
81
|
-
isTrialing: boolean;
|
|
82
|
-
stripeSubscriptionId: string;
|
|
83
|
-
_id: import("convex/values").GenericId<"subscriptions">;
|
|
84
|
-
_creationTime: number;
|
|
85
87
|
}, {
|
|
86
|
-
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
87
88
|
destinationAccountId: import("convex/values").VString<string | undefined, "optional">;
|
|
88
89
|
applicationFeeAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
89
90
|
applicationFeePercent: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
@@ -91,46 +92,47 @@ export declare const subscriptionDocValidator: import("convex/values").VObject<{
|
|
|
91
92
|
feeRefundedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
92
93
|
chargeType: import("convex/values").VUnion<"destination" | "separate" | undefined, [import("convex/values").VLiteral<"destination", "required">, import("convex/values").VLiteral<"separate", "required">], "optional", never>;
|
|
93
94
|
splitRecipients: import("convex/values").VArray<{
|
|
94
|
-
percent?: number | undefined;
|
|
95
95
|
amount?: number | undefined;
|
|
96
96
|
destinationAccountId: string;
|
|
97
|
-
role: "store" | "affiliate" | "other";
|
|
98
|
-
}[] | undefined, import("convex/values").VObject<{
|
|
99
97
|
percent?: number | undefined;
|
|
98
|
+
role: "affiliate" | "other" | "store";
|
|
99
|
+
}[] | undefined, import("convex/values").VObject<{
|
|
100
100
|
amount?: number | undefined;
|
|
101
101
|
destinationAccountId: string;
|
|
102
|
-
|
|
102
|
+
percent?: number | undefined;
|
|
103
|
+
role: "affiliate" | "other" | "store";
|
|
103
104
|
}, {
|
|
104
105
|
destinationAccountId: import("convex/values").VString<string, "required">;
|
|
105
|
-
role: import("convex/values").VUnion<"
|
|
106
|
+
role: import("convex/values").VUnion<"affiliate" | "other" | "store", [import("convex/values").VLiteral<"store", "required">, import("convex/values").VLiteral<"affiliate", "required">, import("convex/values").VLiteral<"other", "required">], "required", never>;
|
|
106
107
|
amount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
107
108
|
percent: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
108
|
-
}, "required", "
|
|
109
|
+
}, "required", "amount" | "destinationAccountId" | "percent" | "role">, "optional">;
|
|
109
110
|
stripeSubscriptionId: import("convex/values").VString<string, "required">;
|
|
110
111
|
accountId: import("convex/values").VString<string | undefined, "optional">;
|
|
111
112
|
userId: import("convex/values").VString<string, "required">;
|
|
112
113
|
orgId: import("convex/values").VString<string | undefined, "optional">;
|
|
113
|
-
status: import("convex/values").VUnion<"active" | "
|
|
114
|
+
status: import("convex/values").VUnion<"active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "trialing" | "unpaid", [import("convex/values").VLiteral<"active", "required">, import("convex/values").VLiteral<"trialing", "required">, import("convex/values").VLiteral<"past_due", "required">, import("convex/values").VLiteral<"canceled", "required">, import("convex/values").VLiteral<"incomplete", "required">, import("convex/values").VLiteral<"incomplete_expired", "required">, import("convex/values").VLiteral<"unpaid", "required">, import("convex/values").VLiteral<"paused", "required">], "required", never>;
|
|
114
115
|
priceId: import("convex/values").VString<string | undefined, "optional">;
|
|
115
116
|
quantity: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
116
117
|
currentPeriodStart: import("convex/values").VString<string | undefined, "optional">;
|
|
117
118
|
currentPeriodEnd: import("convex/values").VString<string | undefined, "optional">;
|
|
118
119
|
cancelAtPeriodEnd: import("convex/values").VBoolean<boolean, "required">;
|
|
120
|
+
isCollectionPaused: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
119
121
|
canceledAt: import("convex/values").VString<string | undefined, "optional">;
|
|
120
122
|
isTrialing: import("convex/values").VBoolean<boolean, "required">;
|
|
121
123
|
trialStart: import("convex/values").VString<string | undefined, "optional">;
|
|
122
124
|
trialEnd: import("convex/values").VString<string | undefined, "optional">;
|
|
123
125
|
currency: import("convex/values").VString<string | undefined, "optional">;
|
|
126
|
+
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
124
127
|
_id: import("convex/values").VId<import("convex/values").GenericId<"subscriptions">, "required">;
|
|
125
128
|
_creationTime: import("convex/values").VFloat64<number, "required">;
|
|
126
|
-
}, "required", "accountId" | "applicationFeeAmount" | "applicationFeePercent" | "
|
|
129
|
+
}, "required", "_creationTime" | "_id" | "accountId" | "applicationFeeAmount" | "applicationFeePercent" | "cancelAtPeriodEnd" | "canceledAt" | "chargeType" | "currency" | "currentPeriodEnd" | "currentPeriodStart" | "destinationAccountId" | "feeCollectedAmount" | "feeRefundedAmount" | "isCollectionPaused" | "isTrialing" | "metadata" | "orgId" | "priceId" | "quantity" | "splitRecipients" | "status" | "stripeSubscriptionId" | "trialEnd" | "trialStart" | "userId" | `metadata.${string}`>;
|
|
127
130
|
/**
|
|
128
131
|
* Field validators for the `checkoutSessions` table.
|
|
129
132
|
* Shared between the schema definition and the doc validator so the
|
|
130
133
|
* two can never drift apart.
|
|
131
134
|
*/
|
|
132
135
|
export declare const checkoutSessionFields: {
|
|
133
|
-
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
134
136
|
destinationAccountId: import("convex/values").VString<string | undefined, "optional">;
|
|
135
137
|
applicationFeeAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
136
138
|
applicationFeePercent: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
@@ -138,34 +140,37 @@ export declare const checkoutSessionFields: {
|
|
|
138
140
|
feeRefundedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
139
141
|
chargeType: import("convex/values").VUnion<"destination" | "separate" | undefined, [import("convex/values").VLiteral<"destination", "required">, import("convex/values").VLiteral<"separate", "required">], "optional", never>;
|
|
140
142
|
splitRecipients: import("convex/values").VArray<{
|
|
141
|
-
percent?: number | undefined;
|
|
142
143
|
amount?: number | undefined;
|
|
143
144
|
destinationAccountId: string;
|
|
144
|
-
role: "store" | "affiliate" | "other";
|
|
145
|
-
}[] | undefined, import("convex/values").VObject<{
|
|
146
145
|
percent?: number | undefined;
|
|
146
|
+
role: "affiliate" | "other" | "store";
|
|
147
|
+
}[] | undefined, import("convex/values").VObject<{
|
|
147
148
|
amount?: number | undefined;
|
|
148
149
|
destinationAccountId: string;
|
|
149
|
-
|
|
150
|
+
percent?: number | undefined;
|
|
151
|
+
role: "affiliate" | "other" | "store";
|
|
150
152
|
}, {
|
|
151
153
|
destinationAccountId: import("convex/values").VString<string, "required">;
|
|
152
|
-
role: import("convex/values").VUnion<"
|
|
154
|
+
role: import("convex/values").VUnion<"affiliate" | "other" | "store", [import("convex/values").VLiteral<"store", "required">, import("convex/values").VLiteral<"affiliate", "required">, import("convex/values").VLiteral<"other", "required">], "required", never>;
|
|
153
155
|
amount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
154
156
|
percent: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
155
|
-
}, "required", "
|
|
157
|
+
}, "required", "amount" | "destinationAccountId" | "percent" | "role">, "optional">;
|
|
156
158
|
stripeSessionId: import("convex/values").VString<string, "required">;
|
|
157
159
|
userId: import("convex/values").VString<string, "required">;
|
|
158
160
|
orgId: import("convex/values").VString<string | undefined, "optional">;
|
|
159
161
|
accountId: import("convex/values").VString<string | undefined, "optional">;
|
|
160
|
-
mode: import("convex/values").VUnion<"payment" | "
|
|
161
|
-
status: import("convex/values").VUnion<"
|
|
162
|
+
mode: import("convex/values").VUnion<"payment" | "setup" | "subscription", [import("convex/values").VLiteral<"payment", "required">, import("convex/values").VLiteral<"subscription", "required">, import("convex/values").VLiteral<"setup", "required">], "required", never>;
|
|
163
|
+
status: import("convex/values").VUnion<"complete" | "expired" | "open", [import("convex/values").VLiteral<"open", "required">, import("convex/values").VLiteral<"complete", "required">, import("convex/values").VLiteral<"expired", "required">], "required", never>;
|
|
162
164
|
clientSecret: import("convex/values").VString<string | undefined, "optional">;
|
|
163
165
|
url: import("convex/values").VString<string | undefined, "optional">;
|
|
164
166
|
priceId: import("convex/values").VString<string | undefined, "optional">;
|
|
165
167
|
currency: import("convex/values").VString<string | undefined, "optional">;
|
|
168
|
+
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
166
169
|
};
|
|
167
170
|
/** Full `checkoutSessions` document, including system fields. */
|
|
168
171
|
export declare const checkoutSessionDocValidator: import("convex/values").VObject<{
|
|
172
|
+
_creationTime: number;
|
|
173
|
+
_id: import("convex/values").GenericId<"checkoutSessions">;
|
|
169
174
|
accountId?: string | undefined;
|
|
170
175
|
applicationFeeAmount?: number | undefined;
|
|
171
176
|
applicationFeePercent?: number | undefined;
|
|
@@ -176,23 +181,20 @@ export declare const checkoutSessionDocValidator: import("convex/values").VObjec
|
|
|
176
181
|
feeCollectedAmount?: number | undefined;
|
|
177
182
|
feeRefundedAmount?: number | undefined;
|
|
178
183
|
metadata?: any;
|
|
184
|
+
mode: "payment" | "setup" | "subscription";
|
|
179
185
|
orgId?: string | undefined;
|
|
180
186
|
priceId?: string | undefined;
|
|
181
187
|
splitRecipients?: {
|
|
182
|
-
percent?: number | undefined;
|
|
183
188
|
amount?: number | undefined;
|
|
184
189
|
destinationAccountId: string;
|
|
185
|
-
|
|
190
|
+
percent?: number | undefined;
|
|
191
|
+
role: "affiliate" | "other" | "store";
|
|
186
192
|
}[] | undefined;
|
|
187
|
-
|
|
188
|
-
mode: "payment" | "subscription" | "setup";
|
|
189
|
-
status: "open" | "complete" | "expired";
|
|
193
|
+
status: "complete" | "expired" | "open";
|
|
190
194
|
stripeSessionId: string;
|
|
195
|
+
url?: string | undefined;
|
|
191
196
|
userId: string;
|
|
192
|
-
_id: import("convex/values").GenericId<"checkoutSessions">;
|
|
193
|
-
_creationTime: number;
|
|
194
197
|
}, {
|
|
195
|
-
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
196
198
|
destinationAccountId: import("convex/values").VString<string | undefined, "optional">;
|
|
197
199
|
applicationFeeAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
198
200
|
applicationFeePercent: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
@@ -200,35 +202,36 @@ export declare const checkoutSessionDocValidator: import("convex/values").VObjec
|
|
|
200
202
|
feeRefundedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
201
203
|
chargeType: import("convex/values").VUnion<"destination" | "separate" | undefined, [import("convex/values").VLiteral<"destination", "required">, import("convex/values").VLiteral<"separate", "required">], "optional", never>;
|
|
202
204
|
splitRecipients: import("convex/values").VArray<{
|
|
203
|
-
percent?: number | undefined;
|
|
204
205
|
amount?: number | undefined;
|
|
205
206
|
destinationAccountId: string;
|
|
206
|
-
role: "store" | "affiliate" | "other";
|
|
207
|
-
}[] | undefined, import("convex/values").VObject<{
|
|
208
207
|
percent?: number | undefined;
|
|
208
|
+
role: "affiliate" | "other" | "store";
|
|
209
|
+
}[] | undefined, import("convex/values").VObject<{
|
|
209
210
|
amount?: number | undefined;
|
|
210
211
|
destinationAccountId: string;
|
|
211
|
-
|
|
212
|
+
percent?: number | undefined;
|
|
213
|
+
role: "affiliate" | "other" | "store";
|
|
212
214
|
}, {
|
|
213
215
|
destinationAccountId: import("convex/values").VString<string, "required">;
|
|
214
|
-
role: import("convex/values").VUnion<"
|
|
216
|
+
role: import("convex/values").VUnion<"affiliate" | "other" | "store", [import("convex/values").VLiteral<"store", "required">, import("convex/values").VLiteral<"affiliate", "required">, import("convex/values").VLiteral<"other", "required">], "required", never>;
|
|
215
217
|
amount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
216
218
|
percent: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
217
|
-
}, "required", "
|
|
219
|
+
}, "required", "amount" | "destinationAccountId" | "percent" | "role">, "optional">;
|
|
218
220
|
stripeSessionId: import("convex/values").VString<string, "required">;
|
|
219
221
|
userId: import("convex/values").VString<string, "required">;
|
|
220
222
|
orgId: import("convex/values").VString<string | undefined, "optional">;
|
|
221
223
|
accountId: import("convex/values").VString<string | undefined, "optional">;
|
|
222
|
-
mode: import("convex/values").VUnion<"payment" | "
|
|
223
|
-
status: import("convex/values").VUnion<"
|
|
224
|
+
mode: import("convex/values").VUnion<"payment" | "setup" | "subscription", [import("convex/values").VLiteral<"payment", "required">, import("convex/values").VLiteral<"subscription", "required">, import("convex/values").VLiteral<"setup", "required">], "required", never>;
|
|
225
|
+
status: import("convex/values").VUnion<"complete" | "expired" | "open", [import("convex/values").VLiteral<"open", "required">, import("convex/values").VLiteral<"complete", "required">, import("convex/values").VLiteral<"expired", "required">], "required", never>;
|
|
224
226
|
clientSecret: import("convex/values").VString<string | undefined, "optional">;
|
|
225
227
|
url: import("convex/values").VString<string | undefined, "optional">;
|
|
226
228
|
priceId: import("convex/values").VString<string | undefined, "optional">;
|
|
227
229
|
currency: import("convex/values").VString<string | undefined, "optional">;
|
|
230
|
+
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
228
231
|
_id: import("convex/values").VId<import("convex/values").GenericId<"checkoutSessions">, "required">;
|
|
229
232
|
_creationTime: import("convex/values").VFloat64<number, "required">;
|
|
230
|
-
}, "required", "accountId" | "applicationFeeAmount" | "applicationFeePercent" | "chargeType" | "clientSecret" | "currency" | "destinationAccountId" | "feeCollectedAmount" | "feeRefundedAmount" | "metadata" | "mode" | "orgId" | "priceId" | "splitRecipients" | "status" | "stripeSessionId" | "url" | "userId" |
|
|
231
|
-
export declare const invoiceStatusValidator: import("convex/values").VUnion<"
|
|
233
|
+
}, "required", "_creationTime" | "_id" | "accountId" | "applicationFeeAmount" | "applicationFeePercent" | "chargeType" | "clientSecret" | "currency" | "destinationAccountId" | "feeCollectedAmount" | "feeRefundedAmount" | "metadata" | "mode" | "orgId" | "priceId" | "splitRecipients" | "status" | "stripeSessionId" | "url" | "userId" | `metadata.${string}`>;
|
|
234
|
+
export declare const invoiceStatusValidator: import("convex/values").VUnion<"draft" | "open" | "paid" | "uncollectible" | "void", [import("convex/values").VLiteral<"draft", "required">, import("convex/values").VLiteral<"open", "required">, import("convex/values").VLiteral<"paid", "required">, import("convex/values").VLiteral<"uncollectible", "required">, import("convex/values").VLiteral<"void", "required">], "required", never>;
|
|
232
235
|
export type InvoiceStatus = Infer<typeof invoiceStatusValidator>;
|
|
233
236
|
/**
|
|
234
237
|
* Field validators for the `invoices` table.
|
|
@@ -236,7 +239,6 @@ export type InvoiceStatus = Infer<typeof invoiceStatusValidator>;
|
|
|
236
239
|
* two can never drift apart.
|
|
237
240
|
*/
|
|
238
241
|
export declare const invoiceFields: {
|
|
239
|
-
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
240
242
|
destinationAccountId: import("convex/values").VString<string | undefined, "optional">;
|
|
241
243
|
applicationFeeAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
242
244
|
applicationFeePercent: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
@@ -244,27 +246,27 @@ export declare const invoiceFields: {
|
|
|
244
246
|
feeRefundedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
245
247
|
chargeType: import("convex/values").VUnion<"destination" | "separate" | undefined, [import("convex/values").VLiteral<"destination", "required">, import("convex/values").VLiteral<"separate", "required">], "optional", never>;
|
|
246
248
|
splitRecipients: import("convex/values").VArray<{
|
|
247
|
-
percent?: number | undefined;
|
|
248
249
|
amount?: number | undefined;
|
|
249
250
|
destinationAccountId: string;
|
|
250
|
-
role: "store" | "affiliate" | "other";
|
|
251
|
-
}[] | undefined, import("convex/values").VObject<{
|
|
252
251
|
percent?: number | undefined;
|
|
252
|
+
role: "affiliate" | "other" | "store";
|
|
253
|
+
}[] | undefined, import("convex/values").VObject<{
|
|
253
254
|
amount?: number | undefined;
|
|
254
255
|
destinationAccountId: string;
|
|
255
|
-
|
|
256
|
+
percent?: number | undefined;
|
|
257
|
+
role: "affiliate" | "other" | "store";
|
|
256
258
|
}, {
|
|
257
259
|
destinationAccountId: import("convex/values").VString<string, "required">;
|
|
258
|
-
role: import("convex/values").VUnion<"
|
|
260
|
+
role: import("convex/values").VUnion<"affiliate" | "other" | "store", [import("convex/values").VLiteral<"store", "required">, import("convex/values").VLiteral<"affiliate", "required">, import("convex/values").VLiteral<"other", "required">], "required", never>;
|
|
259
261
|
amount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
260
262
|
percent: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
261
|
-
}, "required", "
|
|
263
|
+
}, "required", "amount" | "destinationAccountId" | "percent" | "role">, "optional">;
|
|
262
264
|
stripeInvoiceId: import("convex/values").VString<string, "required">;
|
|
263
265
|
userId: import("convex/values").VString<string, "required">;
|
|
264
266
|
orgId: import("convex/values").VString<string | undefined, "optional">;
|
|
265
267
|
accountId: import("convex/values").VString<string | undefined, "optional">;
|
|
266
268
|
subscriptionId: import("convex/values").VString<string | undefined, "optional">;
|
|
267
|
-
status: import("convex/values").VUnion<"
|
|
269
|
+
status: import("convex/values").VUnion<"draft" | "open" | "paid" | "uncollectible" | "void", [import("convex/values").VLiteral<"draft", "required">, import("convex/values").VLiteral<"open", "required">, import("convex/values").VLiteral<"paid", "required">, import("convex/values").VLiteral<"uncollectible", "required">, import("convex/values").VLiteral<"void", "required">], "required", never>;
|
|
268
270
|
currency: import("convex/values").VString<string, "required">;
|
|
269
271
|
amountDue: import("convex/values").VFloat64<number, "required">;
|
|
270
272
|
amountPaid: import("convex/values").VFloat64<number, "required">;
|
|
@@ -280,41 +282,41 @@ export declare const invoiceFields: {
|
|
|
280
282
|
*/
|
|
281
283
|
nextPaymentAttempt: import("convex/values").VString<string | undefined, "optional">;
|
|
282
284
|
attemptCount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
285
|
+
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
283
286
|
};
|
|
284
287
|
/** Full `invoices` document, including system fields. */
|
|
285
288
|
export declare const invoiceDocValidator: import("convex/values").VObject<{
|
|
289
|
+
_creationTime: number;
|
|
290
|
+
_id: import("convex/values").GenericId<"invoices">;
|
|
286
291
|
accountId?: string | undefined;
|
|
292
|
+
amountDue: number;
|
|
293
|
+
amountPaid: number;
|
|
287
294
|
applicationFeeAmount?: number | undefined;
|
|
288
295
|
applicationFeePercent?: number | undefined;
|
|
296
|
+
attemptCount?: number | undefined;
|
|
289
297
|
chargeType?: "destination" | "separate" | undefined;
|
|
298
|
+
currency: string;
|
|
290
299
|
destinationAccountId?: string | undefined;
|
|
291
300
|
feeCollectedAmount?: number | undefined;
|
|
292
301
|
feeRefundedAmount?: number | undefined;
|
|
302
|
+
hostedInvoiceUrl?: string | undefined;
|
|
303
|
+
invoicePdf?: string | undefined;
|
|
293
304
|
metadata?: any;
|
|
305
|
+
nextPaymentAttempt?: string | undefined;
|
|
294
306
|
orgId?: string | undefined;
|
|
307
|
+
periodEnd?: string | undefined;
|
|
308
|
+
periodStart?: string | undefined;
|
|
295
309
|
splitRecipients?: {
|
|
296
|
-
percent?: number | undefined;
|
|
297
310
|
amount?: number | undefined;
|
|
298
311
|
destinationAccountId: string;
|
|
299
|
-
|
|
312
|
+
percent?: number | undefined;
|
|
313
|
+
role: "affiliate" | "other" | "store";
|
|
300
314
|
}[] | undefined;
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
invoicePdf?: string | undefined;
|
|
304
|
-
nextPaymentAttempt?: string | undefined;
|
|
305
|
-
periodEnd?: string | undefined;
|
|
306
|
-
periodStart?: string | undefined;
|
|
315
|
+
status: "draft" | "open" | "paid" | "uncollectible" | "void";
|
|
316
|
+
stripeInvoiceId: string;
|
|
307
317
|
subscriptionId?: string | undefined;
|
|
308
|
-
currency: string;
|
|
309
|
-
status: "open" | "draft" | "paid" | "uncollectible" | "void";
|
|
310
318
|
userId: string;
|
|
311
|
-
amountDue: number;
|
|
312
|
-
amountPaid: number;
|
|
313
|
-
stripeInvoiceId: string;
|
|
314
|
-
_id: import("convex/values").GenericId<"invoices">;
|
|
315
|
-
_creationTime: number;
|
|
316
319
|
}, {
|
|
317
|
-
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
318
320
|
destinationAccountId: import("convex/values").VString<string | undefined, "optional">;
|
|
319
321
|
applicationFeeAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
320
322
|
applicationFeePercent: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
@@ -322,27 +324,27 @@ export declare const invoiceDocValidator: import("convex/values").VObject<{
|
|
|
322
324
|
feeRefundedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
323
325
|
chargeType: import("convex/values").VUnion<"destination" | "separate" | undefined, [import("convex/values").VLiteral<"destination", "required">, import("convex/values").VLiteral<"separate", "required">], "optional", never>;
|
|
324
326
|
splitRecipients: import("convex/values").VArray<{
|
|
325
|
-
percent?: number | undefined;
|
|
326
327
|
amount?: number | undefined;
|
|
327
328
|
destinationAccountId: string;
|
|
328
|
-
role: "store" | "affiliate" | "other";
|
|
329
|
-
}[] | undefined, import("convex/values").VObject<{
|
|
330
329
|
percent?: number | undefined;
|
|
330
|
+
role: "affiliate" | "other" | "store";
|
|
331
|
+
}[] | undefined, import("convex/values").VObject<{
|
|
331
332
|
amount?: number | undefined;
|
|
332
333
|
destinationAccountId: string;
|
|
333
|
-
|
|
334
|
+
percent?: number | undefined;
|
|
335
|
+
role: "affiliate" | "other" | "store";
|
|
334
336
|
}, {
|
|
335
337
|
destinationAccountId: import("convex/values").VString<string, "required">;
|
|
336
|
-
role: import("convex/values").VUnion<"
|
|
338
|
+
role: import("convex/values").VUnion<"affiliate" | "other" | "store", [import("convex/values").VLiteral<"store", "required">, import("convex/values").VLiteral<"affiliate", "required">, import("convex/values").VLiteral<"other", "required">], "required", never>;
|
|
337
339
|
amount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
338
340
|
percent: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
339
|
-
}, "required", "
|
|
341
|
+
}, "required", "amount" | "destinationAccountId" | "percent" | "role">, "optional">;
|
|
340
342
|
stripeInvoiceId: import("convex/values").VString<string, "required">;
|
|
341
343
|
userId: import("convex/values").VString<string, "required">;
|
|
342
344
|
orgId: import("convex/values").VString<string | undefined, "optional">;
|
|
343
345
|
accountId: import("convex/values").VString<string | undefined, "optional">;
|
|
344
346
|
subscriptionId: import("convex/values").VString<string | undefined, "optional">;
|
|
345
|
-
status: import("convex/values").VUnion<"
|
|
347
|
+
status: import("convex/values").VUnion<"draft" | "open" | "paid" | "uncollectible" | "void", [import("convex/values").VLiteral<"draft", "required">, import("convex/values").VLiteral<"open", "required">, import("convex/values").VLiteral<"paid", "required">, import("convex/values").VLiteral<"uncollectible", "required">, import("convex/values").VLiteral<"void", "required">], "required", never>;
|
|
346
348
|
currency: import("convex/values").VString<string, "required">;
|
|
347
349
|
amountDue: import("convex/values").VFloat64<number, "required">;
|
|
348
350
|
amountPaid: import("convex/values").VFloat64<number, "required">;
|
|
@@ -358,7 +360,8 @@ export declare const invoiceDocValidator: import("convex/values").VObject<{
|
|
|
358
360
|
*/
|
|
359
361
|
nextPaymentAttempt: import("convex/values").VString<string | undefined, "optional">;
|
|
360
362
|
attemptCount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
363
|
+
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
361
364
|
_id: import("convex/values").VId<import("convex/values").GenericId<"invoices">, "required">;
|
|
362
365
|
_creationTime: import("convex/values").VFloat64<number, "required">;
|
|
363
|
-
}, "required", "
|
|
366
|
+
}, "required", "_creationTime" | "_id" | "accountId" | "amountDue" | "amountPaid" | "applicationFeeAmount" | "applicationFeePercent" | "attemptCount" | "chargeType" | "currency" | "destinationAccountId" | "feeCollectedAmount" | "feeRefundedAmount" | "hostedInvoiceUrl" | "invoicePdf" | "metadata" | "nextPaymentAttempt" | "orgId" | "periodEnd" | "periodStart" | "splitRecipients" | "status" | "stripeInvoiceId" | "subscriptionId" | "userId" | `metadata.${string}`>;
|
|
364
367
|
//# sourceMappingURL=validators.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../../src/component/billing/validators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAK,MAAM,eAAe,CAAC;AAI9C,eAAO,MAAM,2BAA2B,wnBASvC,CAAC;AACF,MAAM,MAAM,kBAAkB,GAAG,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAE3E,eAAO,MAAM,4BAA4B,yQAIxC,CAAC;AACF,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,OAAO,4BAA4B,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,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAcxB;;;;;OAKG;;;;CAKJ,CAAC;AAEF,yDAAyD;AACzD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAb9B;;;;;OAKG;;;;;;gdAYH,CAAC"}
|
|
@@ -19,6 +19,7 @@ export const subscriptionFields = {
|
|
|
19
19
|
currentPeriodStart: v.optional(v.string()),
|
|
20
20
|
currentPeriodEnd: v.optional(v.string()),
|
|
21
21
|
cancelAtPeriodEnd: v.boolean(),
|
|
22
|
+
isCollectionPaused: v.optional(v.boolean()),
|
|
22
23
|
canceledAt: v.optional(v.string()),
|
|
23
24
|
isTrialing: v.boolean(),
|
|
24
25
|
trialStart: v.optional(v.string()),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validators.js","sourceRoot":"","sources":["../../../src/component/billing/validators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,CAAC,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAChD,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,EACnB,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EACrB,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EACrB,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EACrB,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,EACvB,CAAC,CAAC,OAAO,CAAC,oBAAoB,CAAC,EAC/B,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,EACnB,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CACpB,CAAC;AAGF,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CACjD,CAAC,CAAC,OAA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