@fantastic.dev/better-stripe 0.4.0 → 0.5.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 +34 -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,141 +1,145 @@
|
|
|
1
1
|
export declare const getSubscription: import("convex/server").RegisteredQuery<"public", {
|
|
2
2
|
subscriptionId: import("convex/values").GenericId<"subscriptions">;
|
|
3
3
|
}, Promise<{
|
|
4
|
-
_id: import("convex/values").GenericId<"subscriptions">;
|
|
5
4
|
_creationTime: number;
|
|
5
|
+
_id: import("convex/values").GenericId<"subscriptions">;
|
|
6
6
|
accountId?: string | undefined;
|
|
7
7
|
applicationFeeAmount?: number | undefined;
|
|
8
8
|
applicationFeePercent?: number | undefined;
|
|
9
|
+
cancelAtPeriodEnd: boolean;
|
|
10
|
+
canceledAt?: string | undefined;
|
|
9
11
|
chargeType?: "destination" | "separate" | undefined;
|
|
10
12
|
currency?: string | undefined;
|
|
13
|
+
currentPeriodEnd?: string | undefined;
|
|
14
|
+
currentPeriodStart?: string | undefined;
|
|
11
15
|
destinationAccountId?: string | undefined;
|
|
12
16
|
feeCollectedAmount?: number | undefined;
|
|
13
17
|
feeRefundedAmount?: number | undefined;
|
|
18
|
+
isCollectionPaused?: boolean | undefined;
|
|
19
|
+
isTrialing: boolean;
|
|
14
20
|
metadata?: any;
|
|
15
21
|
orgId?: string | undefined;
|
|
16
22
|
priceId?: string | undefined;
|
|
23
|
+
quantity?: number | undefined;
|
|
17
24
|
splitRecipients?: {
|
|
18
|
-
percent?: number | undefined;
|
|
19
25
|
amount?: number | undefined;
|
|
20
26
|
destinationAccountId: string;
|
|
21
|
-
|
|
27
|
+
percent?: number | undefined;
|
|
28
|
+
role: "affiliate" | "other" | "store";
|
|
22
29
|
}[] | undefined;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
currentPeriodStart?: string | undefined;
|
|
26
|
-
quantity?: number | undefined;
|
|
30
|
+
status: "active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "trialing" | "unpaid";
|
|
31
|
+
stripeSubscriptionId: string;
|
|
27
32
|
trialEnd?: string | undefined;
|
|
28
33
|
trialStart?: string | undefined;
|
|
29
|
-
status: "active" | "trialing" | "past_due" | "canceled" | "incomplete" | "incomplete_expired" | "unpaid" | "paused";
|
|
30
34
|
userId: string;
|
|
31
|
-
cancelAtPeriodEnd: boolean;
|
|
32
|
-
isTrialing: boolean;
|
|
33
|
-
stripeSubscriptionId: string;
|
|
34
35
|
} | null>>;
|
|
35
36
|
export declare const getSubscriptionByStripeId: import("convex/server").RegisteredQuery<"public", {
|
|
36
37
|
stripeSubscriptionId: string;
|
|
37
38
|
}, Promise<{
|
|
38
|
-
_id: import("convex/values").GenericId<"subscriptions">;
|
|
39
39
|
_creationTime: number;
|
|
40
|
+
_id: import("convex/values").GenericId<"subscriptions">;
|
|
40
41
|
accountId?: string | undefined;
|
|
41
42
|
applicationFeeAmount?: number | undefined;
|
|
42
43
|
applicationFeePercent?: number | undefined;
|
|
44
|
+
cancelAtPeriodEnd: boolean;
|
|
45
|
+
canceledAt?: string | undefined;
|
|
43
46
|
chargeType?: "destination" | "separate" | undefined;
|
|
44
47
|
currency?: string | undefined;
|
|
48
|
+
currentPeriodEnd?: string | undefined;
|
|
49
|
+
currentPeriodStart?: string | undefined;
|
|
45
50
|
destinationAccountId?: string | undefined;
|
|
46
51
|
feeCollectedAmount?: number | undefined;
|
|
47
52
|
feeRefundedAmount?: number | undefined;
|
|
53
|
+
isCollectionPaused?: boolean | undefined;
|
|
54
|
+
isTrialing: boolean;
|
|
48
55
|
metadata?: any;
|
|
49
56
|
orgId?: string | undefined;
|
|
50
57
|
priceId?: string | undefined;
|
|
58
|
+
quantity?: number | undefined;
|
|
51
59
|
splitRecipients?: {
|
|
52
|
-
percent?: number | undefined;
|
|
53
60
|
amount?: number | undefined;
|
|
54
61
|
destinationAccountId: string;
|
|
55
|
-
|
|
62
|
+
percent?: number | undefined;
|
|
63
|
+
role: "affiliate" | "other" | "store";
|
|
56
64
|
}[] | undefined;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
currentPeriodStart?: string | undefined;
|
|
60
|
-
quantity?: number | undefined;
|
|
65
|
+
status: "active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "trialing" | "unpaid";
|
|
66
|
+
stripeSubscriptionId: string;
|
|
61
67
|
trialEnd?: string | undefined;
|
|
62
68
|
trialStart?: string | undefined;
|
|
63
|
-
status: "active" | "trialing" | "past_due" | "canceled" | "incomplete" | "incomplete_expired" | "unpaid" | "paused";
|
|
64
69
|
userId: string;
|
|
65
|
-
cancelAtPeriodEnd: boolean;
|
|
66
|
-
isTrialing: boolean;
|
|
67
|
-
stripeSubscriptionId: string;
|
|
68
70
|
} | null>>;
|
|
69
71
|
export declare const listSubscriptions: import("convex/server").RegisteredQuery<"public", {
|
|
70
72
|
accountId?: string | undefined;
|
|
71
|
-
status?: "active" | "trialing" | "past_due" | "canceled" | "incomplete" | "incomplete_expired" | "unpaid" | "paused" | undefined;
|
|
72
73
|
limit?: number | undefined;
|
|
74
|
+
status?: "active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "trialing" | "unpaid" | undefined;
|
|
73
75
|
}, Promise<{
|
|
74
|
-
_id: import("convex/values").GenericId<"subscriptions">;
|
|
75
76
|
_creationTime: number;
|
|
77
|
+
_id: import("convex/values").GenericId<"subscriptions">;
|
|
76
78
|
accountId?: string | undefined;
|
|
77
79
|
applicationFeeAmount?: number | undefined;
|
|
78
80
|
applicationFeePercent?: number | undefined;
|
|
81
|
+
cancelAtPeriodEnd: boolean;
|
|
82
|
+
canceledAt?: string | undefined;
|
|
79
83
|
chargeType?: "destination" | "separate" | undefined;
|
|
80
84
|
currency?: string | undefined;
|
|
85
|
+
currentPeriodEnd?: string | undefined;
|
|
86
|
+
currentPeriodStart?: string | undefined;
|
|
81
87
|
destinationAccountId?: string | undefined;
|
|
82
88
|
feeCollectedAmount?: number | undefined;
|
|
83
89
|
feeRefundedAmount?: number | undefined;
|
|
90
|
+
isCollectionPaused?: boolean | undefined;
|
|
91
|
+
isTrialing: boolean;
|
|
84
92
|
metadata?: any;
|
|
85
93
|
orgId?: string | undefined;
|
|
86
94
|
priceId?: string | undefined;
|
|
95
|
+
quantity?: number | undefined;
|
|
87
96
|
splitRecipients?: {
|
|
88
|
-
percent?: number | undefined;
|
|
89
97
|
amount?: number | undefined;
|
|
90
98
|
destinationAccountId: string;
|
|
91
|
-
|
|
99
|
+
percent?: number | undefined;
|
|
100
|
+
role: "affiliate" | "other" | "store";
|
|
92
101
|
}[] | undefined;
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
currentPeriodStart?: string | undefined;
|
|
96
|
-
quantity?: number | undefined;
|
|
102
|
+
status: "active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "trialing" | "unpaid";
|
|
103
|
+
stripeSubscriptionId: string;
|
|
97
104
|
trialEnd?: string | undefined;
|
|
98
105
|
trialStart?: string | undefined;
|
|
99
|
-
status: "active" | "trialing" | "past_due" | "canceled" | "incomplete" | "incomplete_expired" | "unpaid" | "paused";
|
|
100
106
|
userId: string;
|
|
101
|
-
cancelAtPeriodEnd: boolean;
|
|
102
|
-
isTrialing: boolean;
|
|
103
|
-
stripeSubscriptionId: string;
|
|
104
107
|
}[]>>;
|
|
105
108
|
export declare const listSubscriptionsByUser: import("convex/server").RegisteredQuery<"public", {
|
|
106
109
|
status?: string | undefined;
|
|
107
110
|
userId: string;
|
|
108
111
|
}, Promise<{
|
|
109
|
-
_id: import("convex/values").GenericId<"subscriptions">;
|
|
110
112
|
_creationTime: number;
|
|
113
|
+
_id: import("convex/values").GenericId<"subscriptions">;
|
|
111
114
|
accountId?: string | undefined;
|
|
112
115
|
applicationFeeAmount?: number | undefined;
|
|
113
116
|
applicationFeePercent?: number | undefined;
|
|
117
|
+
cancelAtPeriodEnd: boolean;
|
|
118
|
+
canceledAt?: string | undefined;
|
|
114
119
|
chargeType?: "destination" | "separate" | undefined;
|
|
115
120
|
currency?: string | undefined;
|
|
121
|
+
currentPeriodEnd?: string | undefined;
|
|
122
|
+
currentPeriodStart?: string | undefined;
|
|
116
123
|
destinationAccountId?: string | undefined;
|
|
117
124
|
feeCollectedAmount?: number | undefined;
|
|
118
125
|
feeRefundedAmount?: number | undefined;
|
|
126
|
+
isCollectionPaused?: boolean | undefined;
|
|
127
|
+
isTrialing: boolean;
|
|
119
128
|
metadata?: any;
|
|
120
129
|
orgId?: string | undefined;
|
|
121
130
|
priceId?: string | undefined;
|
|
131
|
+
quantity?: number | undefined;
|
|
122
132
|
splitRecipients?: {
|
|
123
|
-
percent?: number | undefined;
|
|
124
133
|
amount?: number | undefined;
|
|
125
134
|
destinationAccountId: string;
|
|
126
|
-
|
|
135
|
+
percent?: number | undefined;
|
|
136
|
+
role: "affiliate" | "other" | "store";
|
|
127
137
|
}[] | undefined;
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
currentPeriodStart?: string | undefined;
|
|
131
|
-
quantity?: number | undefined;
|
|
138
|
+
status: "active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "trialing" | "unpaid";
|
|
139
|
+
stripeSubscriptionId: string;
|
|
132
140
|
trialEnd?: string | undefined;
|
|
133
141
|
trialStart?: string | undefined;
|
|
134
|
-
status: "active" | "trialing" | "past_due" | "canceled" | "incomplete" | "incomplete_expired" | "unpaid" | "paused";
|
|
135
142
|
userId: string;
|
|
136
|
-
cancelAtPeriodEnd: boolean;
|
|
137
|
-
isTrialing: boolean;
|
|
138
|
-
stripeSubscriptionId: string;
|
|
139
143
|
}[]>>;
|
|
140
144
|
/**
|
|
141
145
|
* List a buyer's subscriptions scoped to one store (the recipient
|
|
@@ -146,111 +150,114 @@ export declare const listSubscriptionsByUser: import("convex/server").Registered
|
|
|
146
150
|
* listSubscriptionsByUser.
|
|
147
151
|
*/
|
|
148
152
|
export declare const listSubscriptionsByUserAndStore: import("convex/server").RegisteredQuery<"public", {
|
|
149
|
-
status?: "active" | "trialing" | "past_due" | "canceled" | "incomplete" | "incomplete_expired" | "unpaid" | "paused" | undefined;
|
|
150
153
|
destinationAccountId: string;
|
|
154
|
+
status?: "active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "trialing" | "unpaid" | undefined;
|
|
151
155
|
userId: string;
|
|
152
156
|
}, Promise<{
|
|
153
|
-
_id: import("convex/values").GenericId<"subscriptions">;
|
|
154
157
|
_creationTime: number;
|
|
158
|
+
_id: import("convex/values").GenericId<"subscriptions">;
|
|
155
159
|
accountId?: string | undefined;
|
|
156
160
|
applicationFeeAmount?: number | undefined;
|
|
157
161
|
applicationFeePercent?: number | undefined;
|
|
162
|
+
cancelAtPeriodEnd: boolean;
|
|
163
|
+
canceledAt?: string | undefined;
|
|
158
164
|
chargeType?: "destination" | "separate" | undefined;
|
|
159
165
|
currency?: string | undefined;
|
|
166
|
+
currentPeriodEnd?: string | undefined;
|
|
167
|
+
currentPeriodStart?: string | undefined;
|
|
160
168
|
destinationAccountId?: string | undefined;
|
|
161
169
|
feeCollectedAmount?: number | undefined;
|
|
162
170
|
feeRefundedAmount?: number | undefined;
|
|
171
|
+
isCollectionPaused?: boolean | undefined;
|
|
172
|
+
isTrialing: boolean;
|
|
163
173
|
metadata?: any;
|
|
164
174
|
orgId?: string | undefined;
|
|
165
175
|
priceId?: string | undefined;
|
|
176
|
+
quantity?: number | undefined;
|
|
166
177
|
splitRecipients?: {
|
|
167
|
-
percent?: number | undefined;
|
|
168
178
|
amount?: number | undefined;
|
|
169
179
|
destinationAccountId: string;
|
|
170
|
-
|
|
180
|
+
percent?: number | undefined;
|
|
181
|
+
role: "affiliate" | "other" | "store";
|
|
171
182
|
}[] | undefined;
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
currentPeriodStart?: string | undefined;
|
|
175
|
-
quantity?: number | undefined;
|
|
183
|
+
status: "active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "trialing" | "unpaid";
|
|
184
|
+
stripeSubscriptionId: string;
|
|
176
185
|
trialEnd?: string | undefined;
|
|
177
186
|
trialStart?: string | undefined;
|
|
178
|
-
status: "active" | "trialing" | "past_due" | "canceled" | "incomplete" | "incomplete_expired" | "unpaid" | "paused";
|
|
179
187
|
userId: string;
|
|
180
|
-
cancelAtPeriodEnd: boolean;
|
|
181
|
-
isTrialing: boolean;
|
|
182
|
-
stripeSubscriptionId: string;
|
|
183
188
|
}[]>>;
|
|
184
189
|
export declare const listSubscriptionsByOrg: import("convex/server").RegisteredQuery<"public", {
|
|
185
|
-
status?: string | undefined;
|
|
186
190
|
orgId: string;
|
|
191
|
+
status?: string | undefined;
|
|
187
192
|
}, Promise<{
|
|
188
|
-
_id: import("convex/values").GenericId<"subscriptions">;
|
|
189
193
|
_creationTime: number;
|
|
194
|
+
_id: import("convex/values").GenericId<"subscriptions">;
|
|
190
195
|
accountId?: string | undefined;
|
|
191
196
|
applicationFeeAmount?: number | undefined;
|
|
192
197
|
applicationFeePercent?: number | undefined;
|
|
198
|
+
cancelAtPeriodEnd: boolean;
|
|
199
|
+
canceledAt?: string | undefined;
|
|
193
200
|
chargeType?: "destination" | "separate" | undefined;
|
|
194
201
|
currency?: string | undefined;
|
|
202
|
+
currentPeriodEnd?: string | undefined;
|
|
203
|
+
currentPeriodStart?: string | undefined;
|
|
195
204
|
destinationAccountId?: string | undefined;
|
|
196
205
|
feeCollectedAmount?: number | undefined;
|
|
197
206
|
feeRefundedAmount?: number | undefined;
|
|
207
|
+
isCollectionPaused?: boolean | undefined;
|
|
208
|
+
isTrialing: boolean;
|
|
198
209
|
metadata?: any;
|
|
199
210
|
orgId?: string | undefined;
|
|
200
211
|
priceId?: string | undefined;
|
|
212
|
+
quantity?: number | undefined;
|
|
201
213
|
splitRecipients?: {
|
|
202
|
-
percent?: number | undefined;
|
|
203
214
|
amount?: number | undefined;
|
|
204
215
|
destinationAccountId: string;
|
|
205
|
-
|
|
216
|
+
percent?: number | undefined;
|
|
217
|
+
role: "affiliate" | "other" | "store";
|
|
206
218
|
}[] | undefined;
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
currentPeriodStart?: string | undefined;
|
|
210
|
-
quantity?: number | undefined;
|
|
219
|
+
status: "active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "trialing" | "unpaid";
|
|
220
|
+
stripeSubscriptionId: string;
|
|
211
221
|
trialEnd?: string | undefined;
|
|
212
222
|
trialStart?: string | undefined;
|
|
213
|
-
status: "active" | "trialing" | "past_due" | "canceled" | "incomplete" | "incomplete_expired" | "unpaid" | "paused";
|
|
214
223
|
userId: string;
|
|
215
|
-
cancelAtPeriodEnd: boolean;
|
|
216
|
-
isTrialing: boolean;
|
|
217
|
-
stripeSubscriptionId: string;
|
|
218
224
|
}[]>>;
|
|
219
225
|
export declare const getActiveSubscription: import("convex/server").RegisteredQuery<"public", {
|
|
220
226
|
destinationAccountId?: string | undefined;
|
|
221
227
|
orgId?: string | undefined;
|
|
222
228
|
userId: string;
|
|
223
229
|
}, Promise<{
|
|
224
|
-
_id: import("convex/values").GenericId<"subscriptions">;
|
|
225
230
|
_creationTime: number;
|
|
231
|
+
_id: import("convex/values").GenericId<"subscriptions">;
|
|
226
232
|
accountId?: string | undefined;
|
|
227
233
|
applicationFeeAmount?: number | undefined;
|
|
228
234
|
applicationFeePercent?: number | undefined;
|
|
235
|
+
cancelAtPeriodEnd: boolean;
|
|
236
|
+
canceledAt?: string | undefined;
|
|
229
237
|
chargeType?: "destination" | "separate" | undefined;
|
|
230
238
|
currency?: string | undefined;
|
|
239
|
+
currentPeriodEnd?: string | undefined;
|
|
240
|
+
currentPeriodStart?: string | undefined;
|
|
231
241
|
destinationAccountId?: string | undefined;
|
|
232
242
|
feeCollectedAmount?: number | undefined;
|
|
233
243
|
feeRefundedAmount?: number | undefined;
|
|
244
|
+
isCollectionPaused?: boolean | undefined;
|
|
245
|
+
isTrialing: boolean;
|
|
234
246
|
metadata?: any;
|
|
235
247
|
orgId?: string | undefined;
|
|
236
248
|
priceId?: string | undefined;
|
|
249
|
+
quantity?: number | undefined;
|
|
237
250
|
splitRecipients?: {
|
|
238
|
-
percent?: number | undefined;
|
|
239
251
|
amount?: number | undefined;
|
|
240
252
|
destinationAccountId: string;
|
|
241
|
-
|
|
253
|
+
percent?: number | undefined;
|
|
254
|
+
role: "affiliate" | "other" | "store";
|
|
242
255
|
}[] | undefined;
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
currentPeriodStart?: string | undefined;
|
|
246
|
-
quantity?: number | undefined;
|
|
256
|
+
status: "active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "trialing" | "unpaid";
|
|
257
|
+
stripeSubscriptionId: string;
|
|
247
258
|
trialEnd?: string | undefined;
|
|
248
259
|
trialStart?: string | undefined;
|
|
249
|
-
status: "active" | "trialing" | "past_due" | "canceled" | "incomplete" | "incomplete_expired" | "unpaid" | "paused";
|
|
250
260
|
userId: string;
|
|
251
|
-
cancelAtPeriodEnd: boolean;
|
|
252
|
-
isTrialing: boolean;
|
|
253
|
-
stripeSubscriptionId: string;
|
|
254
261
|
} | null>>;
|
|
255
262
|
export declare const getTrialStatus: import("convex/server").RegisteredQuery<"public", {
|
|
256
263
|
subscriptionId: import("convex/values").GenericId<"subscriptions">;
|
|
@@ -259,13 +266,13 @@ export declare const getTrialStatus: import("convex/server").RegisteredQuery<"pu
|
|
|
259
266
|
trialStart: string | undefined;
|
|
260
267
|
trialEnd: string | undefined;
|
|
261
268
|
daysRemaining: number;
|
|
262
|
-
status: "active" | "
|
|
269
|
+
status: "active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "trialing" | "unpaid";
|
|
263
270
|
} | null>>;
|
|
264
271
|
export declare const getCheckoutSession: import("convex/server").RegisteredQuery<"public", {
|
|
265
272
|
sessionId: import("convex/values").GenericId<"checkoutSessions">;
|
|
266
273
|
}, Promise<{
|
|
267
|
-
_id: import("convex/values").GenericId<"checkoutSessions">;
|
|
268
274
|
_creationTime: number;
|
|
275
|
+
_id: import("convex/values").GenericId<"checkoutSessions">;
|
|
269
276
|
accountId?: string | undefined;
|
|
270
277
|
applicationFeeAmount?: number | undefined;
|
|
271
278
|
applicationFeePercent?: number | undefined;
|
|
@@ -276,25 +283,25 @@ export declare const getCheckoutSession: import("convex/server").RegisteredQuery
|
|
|
276
283
|
feeCollectedAmount?: number | undefined;
|
|
277
284
|
feeRefundedAmount?: number | undefined;
|
|
278
285
|
metadata?: any;
|
|
286
|
+
mode: "payment" | "setup" | "subscription";
|
|
279
287
|
orgId?: string | undefined;
|
|
280
288
|
priceId?: string | undefined;
|
|
281
289
|
splitRecipients?: {
|
|
282
|
-
percent?: number | undefined;
|
|
283
290
|
amount?: number | undefined;
|
|
284
291
|
destinationAccountId: string;
|
|
285
|
-
|
|
292
|
+
percent?: number | undefined;
|
|
293
|
+
role: "affiliate" | "other" | "store";
|
|
286
294
|
}[] | undefined;
|
|
287
|
-
|
|
288
|
-
mode: "payment" | "subscription" | "setup";
|
|
289
|
-
status: "open" | "complete" | "expired";
|
|
295
|
+
status: "complete" | "expired" | "open";
|
|
290
296
|
stripeSessionId: string;
|
|
297
|
+
url?: string | undefined;
|
|
291
298
|
userId: string;
|
|
292
299
|
} | null>>;
|
|
293
300
|
export declare const getCheckoutSessionByStripeId: import("convex/server").RegisteredQuery<"public", {
|
|
294
301
|
stripeSessionId: string;
|
|
295
302
|
}, Promise<{
|
|
296
|
-
_id: import("convex/values").GenericId<"checkoutSessions">;
|
|
297
303
|
_creationTime: number;
|
|
304
|
+
_id: import("convex/values").GenericId<"checkoutSessions">;
|
|
298
305
|
accountId?: string | undefined;
|
|
299
306
|
applicationFeeAmount?: number | undefined;
|
|
300
307
|
applicationFeePercent?: number | undefined;
|
|
@@ -305,27 +312,27 @@ export declare const getCheckoutSessionByStripeId: import("convex/server").Regis
|
|
|
305
312
|
feeCollectedAmount?: number | undefined;
|
|
306
313
|
feeRefundedAmount?: number | undefined;
|
|
307
314
|
metadata?: any;
|
|
315
|
+
mode: "payment" | "setup" | "subscription";
|
|
308
316
|
orgId?: string | undefined;
|
|
309
317
|
priceId?: string | undefined;
|
|
310
318
|
splitRecipients?: {
|
|
311
|
-
percent?: number | undefined;
|
|
312
319
|
amount?: number | undefined;
|
|
313
320
|
destinationAccountId: string;
|
|
314
|
-
|
|
321
|
+
percent?: number | undefined;
|
|
322
|
+
role: "affiliate" | "other" | "store";
|
|
315
323
|
}[] | undefined;
|
|
316
|
-
|
|
317
|
-
mode: "payment" | "subscription" | "setup";
|
|
318
|
-
status: "open" | "complete" | "expired";
|
|
324
|
+
status: "complete" | "expired" | "open";
|
|
319
325
|
stripeSessionId: string;
|
|
326
|
+
url?: string | undefined;
|
|
320
327
|
userId: string;
|
|
321
328
|
} | null>>;
|
|
322
329
|
export declare const listCheckoutSessionsByUser: import("convex/server").RegisteredQuery<"public", {
|
|
323
|
-
status?: "open" | "complete" | "expired" | undefined;
|
|
324
330
|
limit?: number | undefined;
|
|
331
|
+
status?: "complete" | "expired" | "open" | undefined;
|
|
325
332
|
userId: string;
|
|
326
333
|
}, Promise<{
|
|
327
|
-
_id: import("convex/values").GenericId<"checkoutSessions">;
|
|
328
334
|
_creationTime: number;
|
|
335
|
+
_id: import("convex/values").GenericId<"checkoutSessions">;
|
|
329
336
|
accountId?: string | undefined;
|
|
330
337
|
applicationFeeAmount?: number | undefined;
|
|
331
338
|
applicationFeePercent?: number | undefined;
|
|
@@ -336,90 +343,90 @@ export declare const listCheckoutSessionsByUser: import("convex/server").Registe
|
|
|
336
343
|
feeCollectedAmount?: number | undefined;
|
|
337
344
|
feeRefundedAmount?: number | undefined;
|
|
338
345
|
metadata?: any;
|
|
346
|
+
mode: "payment" | "setup" | "subscription";
|
|
339
347
|
orgId?: string | undefined;
|
|
340
348
|
priceId?: string | undefined;
|
|
341
349
|
splitRecipients?: {
|
|
342
|
-
percent?: number | undefined;
|
|
343
350
|
amount?: number | undefined;
|
|
344
351
|
destinationAccountId: string;
|
|
345
|
-
|
|
352
|
+
percent?: number | undefined;
|
|
353
|
+
role: "affiliate" | "other" | "store";
|
|
346
354
|
}[] | undefined;
|
|
347
|
-
|
|
348
|
-
mode: "payment" | "subscription" | "setup";
|
|
349
|
-
status: "open" | "complete" | "expired";
|
|
355
|
+
status: "complete" | "expired" | "open";
|
|
350
356
|
stripeSessionId: string;
|
|
357
|
+
url?: string | undefined;
|
|
351
358
|
userId: string;
|
|
352
359
|
}[]>>;
|
|
353
360
|
export declare const getInvoiceByStripeId: import("convex/server").RegisteredQuery<"public", {
|
|
354
361
|
stripeInvoiceId: string;
|
|
355
362
|
}, Promise<{
|
|
356
|
-
_id: import("convex/values").GenericId<"invoices">;
|
|
357
363
|
_creationTime: number;
|
|
364
|
+
_id: import("convex/values").GenericId<"invoices">;
|
|
358
365
|
accountId?: string | undefined;
|
|
366
|
+
amountDue: number;
|
|
367
|
+
amountPaid: number;
|
|
359
368
|
applicationFeeAmount?: number | undefined;
|
|
360
369
|
applicationFeePercent?: number | undefined;
|
|
370
|
+
attemptCount?: number | undefined;
|
|
361
371
|
chargeType?: "destination" | "separate" | undefined;
|
|
372
|
+
currency: string;
|
|
362
373
|
destinationAccountId?: string | undefined;
|
|
363
374
|
feeCollectedAmount?: number | undefined;
|
|
364
375
|
feeRefundedAmount?: number | undefined;
|
|
376
|
+
hostedInvoiceUrl?: string | undefined;
|
|
377
|
+
invoicePdf?: string | undefined;
|
|
365
378
|
metadata?: any;
|
|
379
|
+
nextPaymentAttempt?: string | undefined;
|
|
366
380
|
orgId?: string | undefined;
|
|
381
|
+
periodEnd?: string | undefined;
|
|
382
|
+
periodStart?: string | undefined;
|
|
367
383
|
splitRecipients?: {
|
|
368
|
-
percent?: number | undefined;
|
|
369
384
|
amount?: number | undefined;
|
|
370
385
|
destinationAccountId: string;
|
|
371
|
-
|
|
386
|
+
percent?: number | undefined;
|
|
387
|
+
role: "affiliate" | "other" | "store";
|
|
372
388
|
}[] | undefined;
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
invoicePdf?: string | undefined;
|
|
376
|
-
nextPaymentAttempt?: string | undefined;
|
|
377
|
-
periodEnd?: string | undefined;
|
|
378
|
-
periodStart?: string | undefined;
|
|
389
|
+
status: "draft" | "open" | "paid" | "uncollectible" | "void";
|
|
390
|
+
stripeInvoiceId: string;
|
|
379
391
|
subscriptionId?: string | undefined;
|
|
380
|
-
currency: string;
|
|
381
|
-
status: "open" | "draft" | "paid" | "uncollectible" | "void";
|
|
382
392
|
userId: string;
|
|
383
|
-
amountDue: number;
|
|
384
|
-
amountPaid: number;
|
|
385
|
-
stripeInvoiceId: string;
|
|
386
393
|
} | null>>;
|
|
387
394
|
export declare const listInvoices: import("convex/server").RegisteredQuery<"public", {
|
|
388
395
|
accountId?: string | undefined;
|
|
389
|
-
status?: "open" | "draft" | "paid" | "uncollectible" | "void" | undefined;
|
|
390
|
-
userId?: string | undefined;
|
|
391
|
-
subscriptionId?: string | undefined;
|
|
392
396
|
limit?: number | undefined;
|
|
397
|
+
status?: "draft" | "open" | "paid" | "uncollectible" | "void" | undefined;
|
|
398
|
+
subscriptionId?: string | undefined;
|
|
399
|
+
userId?: string | undefined;
|
|
393
400
|
}, Promise<{
|
|
394
|
-
_id: import("convex/values").GenericId<"invoices">;
|
|
395
401
|
_creationTime: number;
|
|
402
|
+
_id: import("convex/values").GenericId<"invoices">;
|
|
396
403
|
accountId?: string | undefined;
|
|
404
|
+
amountDue: number;
|
|
405
|
+
amountPaid: number;
|
|
397
406
|
applicationFeeAmount?: number | undefined;
|
|
398
407
|
applicationFeePercent?: number | undefined;
|
|
408
|
+
attemptCount?: number | undefined;
|
|
399
409
|
chargeType?: "destination" | "separate" | undefined;
|
|
410
|
+
currency: string;
|
|
400
411
|
destinationAccountId?: string | undefined;
|
|
401
412
|
feeCollectedAmount?: number | undefined;
|
|
402
413
|
feeRefundedAmount?: number | undefined;
|
|
414
|
+
hostedInvoiceUrl?: string | undefined;
|
|
415
|
+
invoicePdf?: string | undefined;
|
|
403
416
|
metadata?: any;
|
|
417
|
+
nextPaymentAttempt?: string | undefined;
|
|
404
418
|
orgId?: string | undefined;
|
|
419
|
+
periodEnd?: string | undefined;
|
|
420
|
+
periodStart?: string | undefined;
|
|
405
421
|
splitRecipients?: {
|
|
406
|
-
percent?: number | undefined;
|
|
407
422
|
amount?: number | undefined;
|
|
408
423
|
destinationAccountId: string;
|
|
409
|
-
|
|
424
|
+
percent?: number | undefined;
|
|
425
|
+
role: "affiliate" | "other" | "store";
|
|
410
426
|
}[] | undefined;
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
invoicePdf?: string | undefined;
|
|
414
|
-
nextPaymentAttempt?: string | undefined;
|
|
415
|
-
periodEnd?: string | undefined;
|
|
416
|
-
periodStart?: string | undefined;
|
|
427
|
+
status: "draft" | "open" | "paid" | "uncollectible" | "void";
|
|
428
|
+
stripeInvoiceId: string;
|
|
417
429
|
subscriptionId?: string | undefined;
|
|
418
|
-
currency: string;
|
|
419
|
-
status: "open" | "draft" | "paid" | "uncollectible" | "void";
|
|
420
430
|
userId: string;
|
|
421
|
-
amountDue: number;
|
|
422
|
-
amountPaid: number;
|
|
423
|
-
stripeInvoiceId: string;
|
|
424
431
|
}[]>>;
|
|
425
432
|
//# sourceMappingURL=queries.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../src/component/billing/queries.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../src/component/billing/queries.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAM1B,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAWpC,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAsC5B,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAqBlC,CAAC;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAsB1C,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAqBjC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAmChC,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;UAoCzB,CAAC;AAMH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAM7B,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAWvC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2BrC,CAAC;AAMH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAW/B,CAAC;AAEH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2EvB,CAAC"}
|