@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,19 +1,19 @@
|
|
|
1
1
|
declare const _default: import("convex/server").SchemaDefinition<{
|
|
2
2
|
accounts: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
3
|
-
requirements?: any;
|
|
4
|
-
configuration?: any;
|
|
5
|
-
metadata?: any;
|
|
6
|
-
orgId?: string | undefined;
|
|
7
|
-
statementDescriptor?: string | undefined;
|
|
8
3
|
appliedConfigurations?: ("customer" | "merchant" | "recipient")[] | undefined;
|
|
9
4
|
capabilities?: any;
|
|
5
|
+
configuration?: any;
|
|
10
6
|
country?: string | undefined;
|
|
11
7
|
email?: string | undefined;
|
|
8
|
+
metadata?: any;
|
|
12
9
|
missingRequirements?: string[] | undefined;
|
|
13
10
|
name?: string | undefined;
|
|
14
|
-
|
|
11
|
+
onboardingStatus: "complete" | "in_progress" | "pending" | "restricted";
|
|
12
|
+
orgId?: string | undefined;
|
|
13
|
+
requirements?: any;
|
|
14
|
+
statementDescriptor?: string | undefined;
|
|
15
15
|
stripeAccountId: string;
|
|
16
|
-
|
|
16
|
+
userId: string;
|
|
17
17
|
}, {
|
|
18
18
|
stripeAccountId: import("convex/values").VString<string, "required">;
|
|
19
19
|
userId: import("convex/values").VString<string, "required">;
|
|
@@ -25,21 +25,21 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
25
25
|
requirements: import("convex/values").VAny<any, "optional", string>;
|
|
26
26
|
configuration: import("convex/values").VAny<any, "optional", string>;
|
|
27
27
|
appliedConfigurations: import("convex/values").VArray<("customer" | "merchant" | "recipient")[] | undefined, import("convex/values").VUnion<"customer" | "merchant" | "recipient", [import("convex/values").VLiteral<"customer", "required">, import("convex/values").VLiteral<"merchant", "required">, import("convex/values").VLiteral<"recipient", "required">], "required", never>, "optional">;
|
|
28
|
-
onboardingStatus: import("convex/values").VUnion<"complete" | "
|
|
28
|
+
onboardingStatus: import("convex/values").VUnion<"complete" | "in_progress" | "pending" | "restricted", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"in_progress", "required">, import("convex/values").VLiteral<"complete", "required">, import("convex/values").VLiteral<"restricted", "required">], "required", never>;
|
|
29
29
|
missingRequirements: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
|
|
30
30
|
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
31
31
|
statementDescriptor: import("convex/values").VString<string | undefined, "optional">;
|
|
32
|
-
}, "required", "
|
|
32
|
+
}, "required", "appliedConfigurations" | "capabilities" | "configuration" | "country" | "email" | "metadata" | "missingRequirements" | "name" | "onboardingStatus" | "orgId" | "requirements" | "statementDescriptor" | "stripeAccountId" | "userId" | `capabilities.${string}` | `configuration.${string}` | `metadata.${string}` | `requirements.${string}`>, {
|
|
33
|
+
by_onboarding_status: ["onboardingStatus", "_creationTime"];
|
|
34
|
+
by_org_id: ["orgId", "_creationTime"];
|
|
33
35
|
by_stripe_account_id: ["stripeAccountId", "_creationTime"];
|
|
34
36
|
by_user_id: ["userId", "_creationTime"];
|
|
35
|
-
by_org_id: ["orgId", "_creationTime"];
|
|
36
|
-
by_onboarding_status: ["onboardingStatus", "_creationTime"];
|
|
37
37
|
}, {}, {}>;
|
|
38
38
|
products: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
39
39
|
accountId?: string | undefined;
|
|
40
|
-
metadata?: any;
|
|
41
|
-
description?: string | undefined;
|
|
42
40
|
active: boolean;
|
|
41
|
+
description?: string | undefined;
|
|
42
|
+
metadata?: any;
|
|
43
43
|
name: string;
|
|
44
44
|
stripeProductId: string;
|
|
45
45
|
}, {
|
|
@@ -49,23 +49,23 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
49
49
|
description: import("convex/values").VString<string | undefined, "optional">;
|
|
50
50
|
active: import("convex/values").VBoolean<boolean, "required">;
|
|
51
51
|
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
52
|
-
}, "required", "accountId" | "
|
|
53
|
-
by_stripe_product_id: ["stripeProductId", "_creationTime"];
|
|
54
|
-
by_account_id: ["accountId", "_creationTime"];
|
|
52
|
+
}, "required", "accountId" | "active" | "description" | "metadata" | "name" | "stripeProductId" | `metadata.${string}`>, {
|
|
55
53
|
by_account_active: ["accountId", "active", "_creationTime"];
|
|
54
|
+
by_account_id: ["accountId", "_creationTime"];
|
|
56
55
|
by_active: ["active", "_creationTime"];
|
|
56
|
+
by_stripe_product_id: ["stripeProductId", "_creationTime"];
|
|
57
57
|
}, {}, {}>;
|
|
58
58
|
prices: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
active: boolean;
|
|
60
|
+
currency: string;
|
|
61
|
+
interval?: "day" | "month" | "week" | "year" | undefined;
|
|
61
62
|
intervalCount?: number | undefined;
|
|
63
|
+
metadata?: any;
|
|
62
64
|
nickname?: string | undefined;
|
|
63
|
-
type: "one_time" | "recurring";
|
|
64
|
-
currency: string;
|
|
65
|
-
active: boolean;
|
|
66
65
|
productId: string;
|
|
67
66
|
stripePriceId: string;
|
|
68
67
|
stripeProductId: string;
|
|
68
|
+
type: "one_time" | "recurring";
|
|
69
69
|
unitAmount: number;
|
|
70
70
|
}, {
|
|
71
71
|
stripePriceId: import("convex/values").VString<string, "required">;
|
|
@@ -76,47 +76,47 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
76
76
|
currency: import("convex/values").VString<string, "required">;
|
|
77
77
|
active: import("convex/values").VBoolean<boolean, "required">;
|
|
78
78
|
type: import("convex/values").VUnion<"one_time" | "recurring", [import("convex/values").VLiteral<"one_time", "required">, import("convex/values").VLiteral<"recurring", "required">], "required", never>;
|
|
79
|
-
interval: import("convex/values").VUnion<"day" | "
|
|
79
|
+
interval: import("convex/values").VUnion<"day" | "month" | "week" | "year" | undefined, [import("convex/values").VLiteral<"day", "required">, import("convex/values").VLiteral<"week", "required">, import("convex/values").VLiteral<"month", "required">, import("convex/values").VLiteral<"year", "required">], "optional", never>;
|
|
80
80
|
intervalCount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
81
81
|
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
82
|
-
}, "required", "
|
|
83
|
-
|
|
82
|
+
}, "required", "active" | "currency" | "interval" | "intervalCount" | "metadata" | "nickname" | "productId" | "stripePriceId" | "stripeProductId" | "type" | "unitAmount" | `metadata.${string}`>, {
|
|
83
|
+
by_active: ["active", "_creationTime"];
|
|
84
|
+
by_product_active: ["productId", "active", "_creationTime"];
|
|
84
85
|
by_product_id: ["productId", "_creationTime"];
|
|
86
|
+
by_stripe_price_id: ["stripePriceId", "_creationTime"];
|
|
85
87
|
by_stripe_product_id: ["stripeProductId", "_creationTime"];
|
|
86
|
-
by_product_active: ["productId", "active", "_creationTime"];
|
|
87
|
-
by_active: ["active", "_creationTime"];
|
|
88
88
|
}, {}, {}>;
|
|
89
89
|
subscriptions: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
90
90
|
accountId?: string | undefined;
|
|
91
91
|
applicationFeeAmount?: number | undefined;
|
|
92
92
|
applicationFeePercent?: number | undefined;
|
|
93
|
+
cancelAtPeriodEnd: boolean;
|
|
94
|
+
canceledAt?: string | undefined;
|
|
93
95
|
chargeType?: "destination" | "separate" | undefined;
|
|
94
96
|
currency?: string | undefined;
|
|
97
|
+
currentPeriodEnd?: string | undefined;
|
|
98
|
+
currentPeriodStart?: string | undefined;
|
|
95
99
|
destinationAccountId?: string | undefined;
|
|
96
100
|
feeCollectedAmount?: number | undefined;
|
|
97
101
|
feeRefundedAmount?: number | undefined;
|
|
102
|
+
isCollectionPaused?: boolean | undefined;
|
|
103
|
+
isTrialing: boolean;
|
|
98
104
|
metadata?: any;
|
|
99
105
|
orgId?: string | undefined;
|
|
100
106
|
priceId?: string | undefined;
|
|
107
|
+
quantity?: number | undefined;
|
|
101
108
|
splitRecipients?: {
|
|
102
|
-
percent?: number | undefined;
|
|
103
109
|
amount?: number | undefined;
|
|
104
110
|
destinationAccountId: string;
|
|
105
|
-
|
|
111
|
+
percent?: number | undefined;
|
|
112
|
+
role: "affiliate" | "other" | "store";
|
|
106
113
|
}[] | undefined;
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
currentPeriodStart?: string | undefined;
|
|
110
|
-
quantity?: number | undefined;
|
|
114
|
+
status: "active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "trialing" | "unpaid";
|
|
115
|
+
stripeSubscriptionId: string;
|
|
111
116
|
trialEnd?: string | undefined;
|
|
112
117
|
trialStart?: string | undefined;
|
|
113
|
-
status: "active" | "trialing" | "past_due" | "canceled" | "incomplete" | "incomplete_expired" | "unpaid" | "paused";
|
|
114
118
|
userId: string;
|
|
115
|
-
cancelAtPeriodEnd: boolean;
|
|
116
|
-
isTrialing: boolean;
|
|
117
|
-
stripeSubscriptionId: string;
|
|
118
119
|
}, {
|
|
119
|
-
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
120
120
|
destinationAccountId: import("convex/values").VString<string | undefined, "optional">;
|
|
121
121
|
applicationFeeAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
122
122
|
applicationFeePercent: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
@@ -124,43 +124,45 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
124
124
|
feeRefundedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
125
125
|
chargeType: import("convex/values").VUnion<"destination" | "separate" | undefined, [import("convex/values").VLiteral<"destination", "required">, import("convex/values").VLiteral<"separate", "required">], "optional", never>;
|
|
126
126
|
splitRecipients: import("convex/values").VArray<{
|
|
127
|
-
percent?: number | undefined;
|
|
128
127
|
amount?: number | undefined;
|
|
129
128
|
destinationAccountId: string;
|
|
130
|
-
role: "store" | "affiliate" | "other";
|
|
131
|
-
}[] | undefined, import("convex/values").VObject<{
|
|
132
129
|
percent?: number | undefined;
|
|
130
|
+
role: "affiliate" | "other" | "store";
|
|
131
|
+
}[] | undefined, import("convex/values").VObject<{
|
|
133
132
|
amount?: number | undefined;
|
|
134
133
|
destinationAccountId: string;
|
|
135
|
-
|
|
134
|
+
percent?: number | undefined;
|
|
135
|
+
role: "affiliate" | "other" | "store";
|
|
136
136
|
}, {
|
|
137
137
|
destinationAccountId: import("convex/values").VString<string, "required">;
|
|
138
|
-
role: import("convex/values").VUnion<"
|
|
138
|
+
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>;
|
|
139
139
|
amount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
140
140
|
percent: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
141
|
-
}, "required", "
|
|
141
|
+
}, "required", "amount" | "destinationAccountId" | "percent" | "role">, "optional">;
|
|
142
142
|
stripeSubscriptionId: import("convex/values").VString<string, "required">;
|
|
143
143
|
accountId: import("convex/values").VString<string | undefined, "optional">;
|
|
144
144
|
userId: import("convex/values").VString<string, "required">;
|
|
145
145
|
orgId: import("convex/values").VString<string | undefined, "optional">;
|
|
146
|
-
status: import("convex/values").VUnion<"active" | "
|
|
146
|
+
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>;
|
|
147
147
|
priceId: import("convex/values").VString<string | undefined, "optional">;
|
|
148
148
|
quantity: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
149
149
|
currentPeriodStart: import("convex/values").VString<string | undefined, "optional">;
|
|
150
150
|
currentPeriodEnd: import("convex/values").VString<string | undefined, "optional">;
|
|
151
151
|
cancelAtPeriodEnd: import("convex/values").VBoolean<boolean, "required">;
|
|
152
|
+
isCollectionPaused: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
152
153
|
canceledAt: import("convex/values").VString<string | undefined, "optional">;
|
|
153
154
|
isTrialing: import("convex/values").VBoolean<boolean, "required">;
|
|
154
155
|
trialStart: import("convex/values").VString<string | undefined, "optional">;
|
|
155
156
|
trialEnd: import("convex/values").VString<string | undefined, "optional">;
|
|
156
157
|
currency: import("convex/values").VString<string | undefined, "optional">;
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
by_user_id: ["userId", "_creationTime"];
|
|
160
|
-
by_org_id: ["orgId", "_creationTime"];
|
|
161
|
-
by_status: ["status", "_creationTime"];
|
|
158
|
+
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
159
|
+
}, "required", "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}`>, {
|
|
162
160
|
by_account_id: ["accountId", "_creationTime"];
|
|
163
161
|
by_account_status: ["accountId", "status", "_creationTime"];
|
|
162
|
+
by_org_id: ["orgId", "_creationTime"];
|
|
163
|
+
by_status: ["status", "_creationTime"];
|
|
164
|
+
by_stripe_subscription_id: ["stripeSubscriptionId", "_creationTime"];
|
|
165
|
+
by_user_id: ["userId", "_creationTime"];
|
|
164
166
|
}, {}, {}>;
|
|
165
167
|
checkoutSessions: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
166
168
|
accountId?: string | undefined;
|
|
@@ -173,21 +175,20 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
173
175
|
feeCollectedAmount?: number | undefined;
|
|
174
176
|
feeRefundedAmount?: number | undefined;
|
|
175
177
|
metadata?: any;
|
|
178
|
+
mode: "payment" | "setup" | "subscription";
|
|
176
179
|
orgId?: string | undefined;
|
|
177
180
|
priceId?: string | undefined;
|
|
178
181
|
splitRecipients?: {
|
|
179
|
-
percent?: number | undefined;
|
|
180
182
|
amount?: number | undefined;
|
|
181
183
|
destinationAccountId: string;
|
|
182
|
-
|
|
184
|
+
percent?: number | undefined;
|
|
185
|
+
role: "affiliate" | "other" | "store";
|
|
183
186
|
}[] | undefined;
|
|
184
|
-
|
|
185
|
-
mode: "payment" | "subscription" | "setup";
|
|
186
|
-
status: "open" | "complete" | "expired";
|
|
187
|
+
status: "complete" | "expired" | "open";
|
|
187
188
|
stripeSessionId: string;
|
|
189
|
+
url?: string | undefined;
|
|
188
190
|
userId: string;
|
|
189
191
|
}, {
|
|
190
|
-
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
191
192
|
destinationAccountId: import("convex/values").VString<string | undefined, "optional">;
|
|
192
193
|
applicationFeeAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
193
194
|
applicationFeePercent: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
@@ -195,68 +196,68 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
195
196
|
feeRefundedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
196
197
|
chargeType: import("convex/values").VUnion<"destination" | "separate" | undefined, [import("convex/values").VLiteral<"destination", "required">, import("convex/values").VLiteral<"separate", "required">], "optional", never>;
|
|
197
198
|
splitRecipients: import("convex/values").VArray<{
|
|
198
|
-
percent?: number | undefined;
|
|
199
199
|
amount?: number | undefined;
|
|
200
200
|
destinationAccountId: string;
|
|
201
|
-
role: "store" | "affiliate" | "other";
|
|
202
|
-
}[] | undefined, import("convex/values").VObject<{
|
|
203
201
|
percent?: number | undefined;
|
|
202
|
+
role: "affiliate" | "other" | "store";
|
|
203
|
+
}[] | undefined, import("convex/values").VObject<{
|
|
204
204
|
amount?: number | undefined;
|
|
205
205
|
destinationAccountId: string;
|
|
206
|
-
|
|
206
|
+
percent?: number | undefined;
|
|
207
|
+
role: "affiliate" | "other" | "store";
|
|
207
208
|
}, {
|
|
208
209
|
destinationAccountId: import("convex/values").VString<string, "required">;
|
|
209
|
-
role: import("convex/values").VUnion<"
|
|
210
|
+
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>;
|
|
210
211
|
amount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
211
212
|
percent: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
212
|
-
}, "required", "
|
|
213
|
+
}, "required", "amount" | "destinationAccountId" | "percent" | "role">, "optional">;
|
|
213
214
|
stripeSessionId: import("convex/values").VString<string, "required">;
|
|
214
215
|
userId: import("convex/values").VString<string, "required">;
|
|
215
216
|
orgId: import("convex/values").VString<string | undefined, "optional">;
|
|
216
217
|
accountId: import("convex/values").VString<string | undefined, "optional">;
|
|
217
|
-
mode: import("convex/values").VUnion<"payment" | "
|
|
218
|
-
status: import("convex/values").VUnion<"
|
|
218
|
+
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>;
|
|
219
|
+
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>;
|
|
219
220
|
clientSecret: import("convex/values").VString<string | undefined, "optional">;
|
|
220
221
|
url: import("convex/values").VString<string | undefined, "optional">;
|
|
221
222
|
priceId: import("convex/values").VString<string | undefined, "optional">;
|
|
222
223
|
currency: import("convex/values").VString<string | undefined, "optional">;
|
|
224
|
+
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
223
225
|
}, "required", "accountId" | "applicationFeeAmount" | "applicationFeePercent" | "chargeType" | "clientSecret" | "currency" | "destinationAccountId" | "feeCollectedAmount" | "feeRefundedAmount" | "metadata" | "mode" | "orgId" | "priceId" | "splitRecipients" | "status" | "stripeSessionId" | "url" | "userId" | `metadata.${string}`>, {
|
|
226
|
+
by_account_id: ["accountId", "_creationTime"];
|
|
224
227
|
by_stripe_session_id: ["stripeSessionId", "_creationTime"];
|
|
225
228
|
by_user_id: ["userId", "_creationTime"];
|
|
226
|
-
by_account_id: ["accountId", "_creationTime"];
|
|
227
229
|
by_user_status: ["userId", "status", "_creationTime"];
|
|
228
230
|
}, {}, {}>;
|
|
229
231
|
invoices: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
230
232
|
accountId?: string | undefined;
|
|
233
|
+
amountDue: number;
|
|
234
|
+
amountPaid: number;
|
|
231
235
|
applicationFeeAmount?: number | undefined;
|
|
232
236
|
applicationFeePercent?: number | undefined;
|
|
237
|
+
attemptCount?: number | undefined;
|
|
233
238
|
chargeType?: "destination" | "separate" | undefined;
|
|
239
|
+
currency: string;
|
|
234
240
|
destinationAccountId?: string | undefined;
|
|
235
241
|
feeCollectedAmount?: number | undefined;
|
|
236
242
|
feeRefundedAmount?: number | undefined;
|
|
243
|
+
hostedInvoiceUrl?: string | undefined;
|
|
244
|
+
invoicePdf?: string | undefined;
|
|
237
245
|
metadata?: any;
|
|
246
|
+
nextPaymentAttempt?: string | undefined;
|
|
238
247
|
orgId?: string | undefined;
|
|
248
|
+
periodEnd?: string | undefined;
|
|
249
|
+
periodStart?: string | undefined;
|
|
239
250
|
splitRecipients?: {
|
|
240
|
-
percent?: number | undefined;
|
|
241
251
|
amount?: number | undefined;
|
|
242
252
|
destinationAccountId: string;
|
|
243
|
-
|
|
253
|
+
percent?: number | undefined;
|
|
254
|
+
role: "affiliate" | "other" | "store";
|
|
244
255
|
}[] | undefined;
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
invoicePdf?: string | undefined;
|
|
248
|
-
nextPaymentAttempt?: string | undefined;
|
|
249
|
-
periodEnd?: string | undefined;
|
|
250
|
-
periodStart?: string | undefined;
|
|
256
|
+
status: "draft" | "open" | "paid" | "uncollectible" | "void";
|
|
257
|
+
stripeInvoiceId: string;
|
|
251
258
|
subscriptionId?: string | undefined;
|
|
252
|
-
currency: string;
|
|
253
|
-
status: "open" | "draft" | "paid" | "uncollectible" | "void";
|
|
254
259
|
userId: string;
|
|
255
|
-
amountDue: number;
|
|
256
|
-
amountPaid: number;
|
|
257
|
-
stripeInvoiceId: string;
|
|
258
260
|
}, {
|
|
259
|
-
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
260
261
|
destinationAccountId: import("convex/values").VString<string | undefined, "optional">;
|
|
261
262
|
applicationFeeAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
262
263
|
applicationFeePercent: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
@@ -264,27 +265,27 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
264
265
|
feeRefundedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
265
266
|
chargeType: import("convex/values").VUnion<"destination" | "separate" | undefined, [import("convex/values").VLiteral<"destination", "required">, import("convex/values").VLiteral<"separate", "required">], "optional", never>;
|
|
266
267
|
splitRecipients: import("convex/values").VArray<{
|
|
267
|
-
percent?: number | undefined;
|
|
268
268
|
amount?: number | undefined;
|
|
269
269
|
destinationAccountId: string;
|
|
270
|
-
role: "store" | "affiliate" | "other";
|
|
271
|
-
}[] | undefined, import("convex/values").VObject<{
|
|
272
270
|
percent?: number | undefined;
|
|
271
|
+
role: "affiliate" | "other" | "store";
|
|
272
|
+
}[] | undefined, import("convex/values").VObject<{
|
|
273
273
|
amount?: number | undefined;
|
|
274
274
|
destinationAccountId: string;
|
|
275
|
-
|
|
275
|
+
percent?: number | undefined;
|
|
276
|
+
role: "affiliate" | "other" | "store";
|
|
276
277
|
}, {
|
|
277
278
|
destinationAccountId: import("convex/values").VString<string, "required">;
|
|
278
|
-
role: import("convex/values").VUnion<"
|
|
279
|
+
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>;
|
|
279
280
|
amount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
280
281
|
percent: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
281
|
-
}, "required", "
|
|
282
|
+
}, "required", "amount" | "destinationAccountId" | "percent" | "role">, "optional">;
|
|
282
283
|
stripeInvoiceId: import("convex/values").VString<string, "required">;
|
|
283
284
|
userId: import("convex/values").VString<string, "required">;
|
|
284
285
|
orgId: import("convex/values").VString<string | undefined, "optional">;
|
|
285
286
|
accountId: import("convex/values").VString<string | undefined, "optional">;
|
|
286
287
|
subscriptionId: import("convex/values").VString<string | undefined, "optional">;
|
|
287
|
-
status: import("convex/values").VUnion<"
|
|
288
|
+
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>;
|
|
288
289
|
currency: import("convex/values").VString<string, "required">;
|
|
289
290
|
amountDue: import("convex/values").VFloat64<number, "required">;
|
|
290
291
|
amountPaid: import("convex/values").VFloat64<number, "required">;
|
|
@@ -294,41 +295,41 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
294
295
|
periodEnd: import("convex/values").VString<string | undefined, "optional">;
|
|
295
296
|
nextPaymentAttempt: import("convex/values").VString<string | undefined, "optional">;
|
|
296
297
|
attemptCount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
by_user_id: ["userId", "_creationTime"];
|
|
300
|
-
by_subscription_id: ["subscriptionId", "_creationTime"];
|
|
298
|
+
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
299
|
+
}, "required", "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}`>, {
|
|
301
300
|
by_account_id: ["accountId", "_creationTime"];
|
|
302
301
|
by_account_status: ["accountId", "status", "_creationTime"];
|
|
303
|
-
by_user_status: ["userId", "status", "_creationTime"];
|
|
304
|
-
by_subscription_status: ["subscriptionId", "status", "_creationTime"];
|
|
305
302
|
by_status: ["status", "_creationTime"];
|
|
303
|
+
by_stripe_invoice_id: ["stripeInvoiceId", "_creationTime"];
|
|
304
|
+
by_subscription_id: ["subscriptionId", "_creationTime"];
|
|
305
|
+
by_subscription_status: ["subscriptionId", "status", "_creationTime"];
|
|
306
|
+
by_user_id: ["userId", "_creationTime"];
|
|
307
|
+
by_user_status: ["userId", "status", "_creationTime"];
|
|
306
308
|
}, {}, {}>;
|
|
307
309
|
payments: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
308
310
|
accountId?: string | undefined;
|
|
311
|
+
amount: number;
|
|
309
312
|
applicationFeeAmount?: number | undefined;
|
|
310
313
|
applicationFeePercent?: number | undefined;
|
|
311
314
|
chargeType?: "destination" | "separate" | undefined;
|
|
315
|
+
currency: string;
|
|
312
316
|
destinationAccountId?: string | undefined;
|
|
313
317
|
feeCollectedAmount?: number | undefined;
|
|
314
318
|
feeRefundedAmount?: number | undefined;
|
|
315
319
|
metadata?: any;
|
|
316
320
|
orgId?: string | undefined;
|
|
321
|
+
refundStatus?: "fully_refunded" | "partially_refunded" | undefined;
|
|
322
|
+
refundedAmount?: number | undefined;
|
|
317
323
|
splitRecipients?: {
|
|
318
|
-
percent?: number | undefined;
|
|
319
324
|
amount?: number | undefined;
|
|
320
325
|
destinationAccountId: string;
|
|
321
|
-
|
|
326
|
+
percent?: number | undefined;
|
|
327
|
+
role: "affiliate" | "other" | "store";
|
|
322
328
|
}[] | undefined;
|
|
323
|
-
|
|
324
|
-
refundStatus?: "partially_refunded" | "fully_refunded" | undefined;
|
|
325
|
-
currency: string;
|
|
326
|
-
status: "canceled" | "succeeded" | "failed" | "processing" | "requires_action";
|
|
327
|
-
userId: string;
|
|
328
|
-
amount: number;
|
|
329
|
+
status: "canceled" | "failed" | "processing" | "requires_action" | "succeeded";
|
|
329
330
|
stripePaymentIntentId: string;
|
|
331
|
+
userId: string;
|
|
330
332
|
}, {
|
|
331
|
-
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
332
333
|
destinationAccountId: import("convex/values").VString<string | undefined, "optional">;
|
|
333
334
|
applicationFeeAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
334
335
|
applicationFeePercent: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
@@ -336,58 +337,59 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
336
337
|
feeRefundedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
337
338
|
chargeType: import("convex/values").VUnion<"destination" | "separate" | undefined, [import("convex/values").VLiteral<"destination", "required">, import("convex/values").VLiteral<"separate", "required">], "optional", never>;
|
|
338
339
|
splitRecipients: import("convex/values").VArray<{
|
|
339
|
-
percent?: number | undefined;
|
|
340
340
|
amount?: number | undefined;
|
|
341
341
|
destinationAccountId: string;
|
|
342
|
-
role: "store" | "affiliate" | "other";
|
|
343
|
-
}[] | undefined, import("convex/values").VObject<{
|
|
344
342
|
percent?: number | undefined;
|
|
343
|
+
role: "affiliate" | "other" | "store";
|
|
344
|
+
}[] | undefined, import("convex/values").VObject<{
|
|
345
345
|
amount?: number | undefined;
|
|
346
346
|
destinationAccountId: string;
|
|
347
|
-
|
|
347
|
+
percent?: number | undefined;
|
|
348
|
+
role: "affiliate" | "other" | "store";
|
|
348
349
|
}, {
|
|
349
350
|
destinationAccountId: import("convex/values").VString<string, "required">;
|
|
350
|
-
role: import("convex/values").VUnion<"
|
|
351
|
+
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>;
|
|
351
352
|
amount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
352
353
|
percent: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
353
|
-
}, "required", "
|
|
354
|
+
}, "required", "amount" | "destinationAccountId" | "percent" | "role">, "optional">;
|
|
354
355
|
stripePaymentIntentId: import("convex/values").VString<string, "required">;
|
|
355
356
|
userId: import("convex/values").VString<string, "required">;
|
|
356
357
|
orgId: import("convex/values").VString<string | undefined, "optional">;
|
|
357
358
|
accountId: import("convex/values").VString<string | undefined, "optional">;
|
|
358
359
|
amount: import("convex/values").VFloat64<number, "required">;
|
|
359
360
|
currency: import("convex/values").VString<string, "required">;
|
|
360
|
-
status: import("convex/values").VUnion<"canceled" | "
|
|
361
|
+
status: import("convex/values").VUnion<"canceled" | "failed" | "processing" | "requires_action" | "succeeded", [import("convex/values").VLiteral<"succeeded", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"canceled", "required">, import("convex/values").VLiteral<"processing", "required">, import("convex/values").VLiteral<"requires_action", "required">], "required", never>;
|
|
361
362
|
refundedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
362
|
-
refundStatus: import("convex/values").VUnion<"
|
|
363
|
-
|
|
363
|
+
refundStatus: import("convex/values").VUnion<"fully_refunded" | "partially_refunded" | undefined, [import("convex/values").VLiteral<"partially_refunded", "required">, import("convex/values").VLiteral<"fully_refunded", "required">], "optional", never>;
|
|
364
|
+
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
365
|
+
}, "required", "accountId" | "amount" | "applicationFeeAmount" | "applicationFeePercent" | "chargeType" | "currency" | "destinationAccountId" | "feeCollectedAmount" | "feeRefundedAmount" | "metadata" | "orgId" | "refundStatus" | "refundedAmount" | "splitRecipients" | "status" | "stripePaymentIntentId" | "userId" | `metadata.${string}`>, {
|
|
366
|
+
by_account_id: ["accountId", "_creationTime"];
|
|
364
367
|
by_stripe_payment_intent_id: ["stripePaymentIntentId", "_creationTime"];
|
|
365
368
|
by_user_id: ["userId", "_creationTime"];
|
|
366
|
-
by_account_id: ["accountId", "_creationTime"];
|
|
367
369
|
}, {}, {}>;
|
|
368
370
|
payouts: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
369
|
-
metadata?: any;
|
|
370
|
-
arrivalDate?: string | undefined;
|
|
371
|
-
method?: string | undefined;
|
|
372
371
|
accountId: string;
|
|
373
|
-
currency: string;
|
|
374
|
-
status: "paid" | "canceled" | "failed" | "pending" | "in_transit";
|
|
375
372
|
amount: number;
|
|
373
|
+
arrivalDate?: string | undefined;
|
|
374
|
+
currency: string;
|
|
375
|
+
metadata?: any;
|
|
376
|
+
method?: string | undefined;
|
|
377
|
+
status: "canceled" | "failed" | "in_transit" | "paid" | "pending";
|
|
376
378
|
stripePayoutId: string;
|
|
377
379
|
}, {
|
|
378
380
|
stripePayoutId: import("convex/values").VString<string, "required">;
|
|
379
381
|
accountId: import("convex/values").VString<string, "required">;
|
|
380
382
|
amount: import("convex/values").VFloat64<number, "required">;
|
|
381
383
|
currency: import("convex/values").VString<string, "required">;
|
|
382
|
-
status: import("convex/values").VUnion<"
|
|
384
|
+
status: import("convex/values").VUnion<"canceled" | "failed" | "in_transit" | "paid" | "pending", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"paid", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"canceled", "required">, import("convex/values").VLiteral<"in_transit", "required">], "required", never>;
|
|
383
385
|
arrivalDate: import("convex/values").VString<string | undefined, "optional">;
|
|
384
386
|
method: import("convex/values").VString<string | undefined, "optional">;
|
|
385
387
|
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
386
|
-
}, "required", "accountId" | "
|
|
387
|
-
by_stripe_payout_id: ["stripePayoutId", "_creationTime"];
|
|
388
|
+
}, "required", "accountId" | "amount" | "arrivalDate" | "currency" | "metadata" | "method" | "status" | "stripePayoutId" | `metadata.${string}`>, {
|
|
388
389
|
by_account_id: ["accountId", "_creationTime"];
|
|
389
|
-
by_status: ["status", "_creationTime"];
|
|
390
390
|
by_account_status: ["accountId", "status", "_creationTime"];
|
|
391
|
+
by_status: ["status", "_creationTime"];
|
|
392
|
+
by_stripe_payout_id: ["stripePayoutId", "_creationTime"];
|
|
391
393
|
}, {}, {}>;
|
|
392
394
|
pendingFeeRefunds: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
393
395
|
feeCollectedAmount: number;
|
|
@@ -402,14 +404,14 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
402
404
|
}, {}, {}>;
|
|
403
405
|
refunds: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
404
406
|
accountId?: string | undefined;
|
|
407
|
+
amount: number;
|
|
408
|
+
currency: string;
|
|
409
|
+
failureReason?: string | undefined;
|
|
405
410
|
metadata?: any;
|
|
406
|
-
|
|
407
|
-
|
|
411
|
+
reason?: "duplicate" | "expired_uncaptured_charge" | "fraudulent" | "requested_by_customer" | undefined;
|
|
412
|
+
status: "canceled" | "failed" | "pending" | "requires_action" | "succeeded";
|
|
408
413
|
stripeChargeId?: string | undefined;
|
|
409
|
-
|
|
410
|
-
currency: string;
|
|
411
|
-
status: "canceled" | "succeeded" | "failed" | "requires_action" | "pending";
|
|
412
|
-
amount: number;
|
|
414
|
+
stripePaymentIntentId?: string | undefined;
|
|
413
415
|
stripeRefundId: string;
|
|
414
416
|
}, {
|
|
415
417
|
stripeRefundId: import("convex/values").VString<string, "required">;
|
|
@@ -418,34 +420,34 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
418
420
|
accountId: import("convex/values").VString<string | undefined, "optional">;
|
|
419
421
|
amount: import("convex/values").VFloat64<number, "required">;
|
|
420
422
|
currency: import("convex/values").VString<string, "required">;
|
|
421
|
-
status: import("convex/values").VUnion<"canceled" | "
|
|
422
|
-
reason: import("convex/values").VUnion<"duplicate" | "
|
|
423
|
+
status: import("convex/values").VUnion<"canceled" | "failed" | "pending" | "requires_action" | "succeeded", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"requires_action", "required">, import("convex/values").VLiteral<"succeeded", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"canceled", "required">], "required", never>;
|
|
424
|
+
reason: import("convex/values").VUnion<"duplicate" | "expired_uncaptured_charge" | "fraudulent" | "requested_by_customer" | undefined, [import("convex/values").VLiteral<"duplicate", "required">, import("convex/values").VLiteral<"fraudulent", "required">, import("convex/values").VLiteral<"requested_by_customer", "required">, import("convex/values").VLiteral<"expired_uncaptured_charge", "required">], "optional", never>;
|
|
423
425
|
failureReason: import("convex/values").VString<string | undefined, "optional">;
|
|
424
426
|
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
425
|
-
}, "required", "accountId" | "
|
|
426
|
-
by_stripe_refund_id: ["stripeRefundId", "_creationTime"];
|
|
427
|
-
by_stripe_payment_intent_id: ["stripePaymentIntentId", "_creationTime"];
|
|
427
|
+
}, "required", "accountId" | "amount" | "currency" | "failureReason" | "metadata" | "reason" | "status" | "stripeChargeId" | "stripePaymentIntentId" | "stripeRefundId" | `metadata.${string}`>, {
|
|
428
428
|
by_account_id: ["accountId", "_creationTime"];
|
|
429
|
-
by_status: ["status", "_creationTime"];
|
|
430
429
|
by_account_id_and_status: ["accountId", "status", "_creationTime"];
|
|
431
430
|
by_payment_intent_id_and_status: ["stripePaymentIntentId", "status", "_creationTime"];
|
|
431
|
+
by_status: ["status", "_creationTime"];
|
|
432
|
+
by_stripe_payment_intent_id: ["stripePaymentIntentId", "_creationTime"];
|
|
433
|
+
by_stripe_refund_id: ["stripeRefundId", "_creationTime"];
|
|
432
434
|
}, {}, {}>;
|
|
433
435
|
disputes: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
434
436
|
accountId?: string | undefined;
|
|
435
|
-
|
|
436
|
-
|
|
437
|
+
amount: number;
|
|
438
|
+
currency: string;
|
|
437
439
|
evidence?: any;
|
|
438
440
|
evidenceDueBy?: string | undefined;
|
|
441
|
+
isChargeRefundable: boolean;
|
|
439
442
|
lastEvent?: string | undefined;
|
|
440
443
|
linkedTransferIds?: string[] | undefined;
|
|
444
|
+
metadata?: any;
|
|
445
|
+
reason: string;
|
|
441
446
|
statementDescriptor?: string | undefined;
|
|
447
|
+
status: "lost" | "needs_response" | "prevented" | "under_review" | "warning_closed" | "warning_needs_response" | "warning_under_review" | "won";
|
|
442
448
|
stripeChargeId?: string | undefined;
|
|
443
|
-
currency: string;
|
|
444
|
-
status: "warning_needs_response" | "warning_under_review" | "warning_closed" | "needs_response" | "under_review" | "won" | "lost" | "prevented";
|
|
445
|
-
amount: number;
|
|
446
|
-
isChargeRefundable: boolean;
|
|
447
|
-
reason: string;
|
|
448
449
|
stripeDisputeId: string;
|
|
450
|
+
stripePaymentIntentId?: string | undefined;
|
|
449
451
|
}, {
|
|
450
452
|
stripeDisputeId: import("convex/values").VString<string, "required">;
|
|
451
453
|
stripePaymentIntentId: import("convex/values").VString<string | undefined, "optional">;
|
|
@@ -453,7 +455,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
453
455
|
accountId: import("convex/values").VString<string | undefined, "optional">;
|
|
454
456
|
amount: import("convex/values").VFloat64<number, "required">;
|
|
455
457
|
currency: import("convex/values").VString<string, "required">;
|
|
456
|
-
status: import("convex/values").VUnion<"
|
|
458
|
+
status: import("convex/values").VUnion<"lost" | "needs_response" | "prevented" | "under_review" | "warning_closed" | "warning_needs_response" | "warning_under_review" | "won", [import("convex/values").VLiteral<"warning_needs_response", "required">, import("convex/values").VLiteral<"warning_under_review", "required">, import("convex/values").VLiteral<"warning_closed", "required">, import("convex/values").VLiteral<"needs_response", "required">, import("convex/values").VLiteral<"under_review", "required">, import("convex/values").VLiteral<"won", "required">, import("convex/values").VLiteral<"lost", "required">, import("convex/values").VLiteral<"prevented", "required">], "required", never>;
|
|
457
459
|
reason: import("convex/values").VString<string, "required">;
|
|
458
460
|
isChargeRefundable: import("convex/values").VBoolean<boolean, "required">;
|
|
459
461
|
lastEvent: import("convex/values").VString<string | undefined, "optional">;
|
|
@@ -462,93 +464,93 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
462
464
|
statementDescriptor: import("convex/values").VString<string | undefined, "optional">;
|
|
463
465
|
linkedTransferIds: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
|
|
464
466
|
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
465
|
-
}, "required", "accountId" | "
|
|
466
|
-
by_stripe_dispute_id: ["stripeDisputeId", "_creationTime"];
|
|
467
|
-
by_stripe_payment_intent_id: ["stripePaymentIntentId", "_creationTime"];
|
|
467
|
+
}, "required", "accountId" | "amount" | "currency" | "evidence" | "evidenceDueBy" | "isChargeRefundable" | "lastEvent" | "linkedTransferIds" | "metadata" | "reason" | "statementDescriptor" | "status" | "stripeChargeId" | "stripeDisputeId" | "stripePaymentIntentId" | `evidence.${string}` | `metadata.${string}`>, {
|
|
468
468
|
by_account_id: ["accountId", "_creationTime"];
|
|
469
|
-
by_status: ["status", "_creationTime"];
|
|
470
469
|
by_account_id_and_status: ["accountId", "status", "_creationTime"];
|
|
471
470
|
by_payment_intent_id_and_status: ["stripePaymentIntentId", "status", "_creationTime"];
|
|
471
|
+
by_status: ["status", "_creationTime"];
|
|
472
|
+
by_stripe_dispute_id: ["stripeDisputeId", "_creationTime"];
|
|
473
|
+
by_stripe_payment_intent_id: ["stripePaymentIntentId", "_creationTime"];
|
|
472
474
|
}, {}, {}>;
|
|
473
475
|
transfers: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
476
|
+
amount: number;
|
|
477
|
+
currency: string;
|
|
478
|
+
destinationAccountId: string;
|
|
474
479
|
metadata?: any;
|
|
475
|
-
sourceChargeId?: string | undefined;
|
|
476
|
-
reversedAmount?: number | undefined;
|
|
477
480
|
paymentId?: string | undefined;
|
|
478
481
|
reinstatement?: boolean | undefined;
|
|
479
|
-
reversalStatus?: "partially_reversed" | "fully_reversed" | undefined;
|
|
480
|
-
role?: "store" | "affiliate" | "other" | undefined;
|
|
481
|
-
sourceInvoiceId?: string | undefined;
|
|
482
482
|
reversalClaimedAmount?: number | undefined;
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
483
|
+
reversalStatus?: "fully_reversed" | "partially_reversed" | undefined;
|
|
484
|
+
reversedAmount?: number | undefined;
|
|
485
|
+
role?: "affiliate" | "other" | "store" | undefined;
|
|
486
|
+
sourceChargeId?: string | undefined;
|
|
487
|
+
sourceInvoiceId?: string | undefined;
|
|
488
|
+
status: "failed" | "paid" | "pending" | "reversed";
|
|
487
489
|
stripeTransferId: string;
|
|
488
490
|
}, {
|
|
489
|
-
reversalClaimedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
490
491
|
stripeTransferId: import("convex/values").VString<string, "required">;
|
|
491
492
|
sourceChargeId: import("convex/values").VString<string | undefined, "optional">;
|
|
492
493
|
sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
|
|
493
494
|
destinationAccountId: import("convex/values").VString<string, "required">;
|
|
494
495
|
amount: import("convex/values").VFloat64<number, "required">;
|
|
495
496
|
currency: import("convex/values").VString<string, "required">;
|
|
496
|
-
role: import("convex/values").VUnion<"
|
|
497
|
-
status: import("convex/values").VUnion<"
|
|
497
|
+
role: import("convex/values").VUnion<"affiliate" | "other" | "store" | undefined, [import("convex/values").VLiteral<"store", "required">, import("convex/values").VLiteral<"affiliate", "required">, import("convex/values").VLiteral<"other", "required">], "optional", never>;
|
|
498
|
+
status: import("convex/values").VUnion<"failed" | "paid" | "pending" | "reversed", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"paid", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"reversed", "required">], "required", never>;
|
|
498
499
|
reversedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
499
|
-
reversalStatus: import("convex/values").VUnion<"
|
|
500
|
+
reversalStatus: import("convex/values").VUnion<"fully_reversed" | "partially_reversed" | undefined, [import("convex/values").VLiteral<"partially_reversed", "required">, import("convex/values").VLiteral<"fully_reversed", "required">], "optional", never>;
|
|
500
501
|
paymentId: import("convex/values").VString<string | undefined, "optional">;
|
|
501
502
|
reinstatement: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
502
503
|
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
503
|
-
|
|
504
|
-
|
|
504
|
+
reversalClaimedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
505
|
+
}, "required", "amount" | "currency" | "destinationAccountId" | "metadata" | "paymentId" | "reinstatement" | "reversalClaimedAmount" | "reversalStatus" | "reversedAmount" | "role" | "sourceChargeId" | "sourceInvoiceId" | "status" | "stripeTransferId" | `metadata.${string}`>, {
|
|
505
506
|
by_destination_account_id: ["destinationAccountId", "_creationTime"];
|
|
506
507
|
by_source_charge_id: ["sourceChargeId", "_creationTime"];
|
|
508
|
+
by_stripe_transfer_id: ["stripeTransferId", "_creationTime"];
|
|
507
509
|
}, {}, {}>;
|
|
508
510
|
transferReversalOps: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
509
511
|
operationId: string;
|
|
510
|
-
sourceChargeId: string;
|
|
511
512
|
slices: {
|
|
512
|
-
stripeTransferId: string;
|
|
513
513
|
from: number;
|
|
514
|
+
stripeTransferId: string;
|
|
514
515
|
to: number;
|
|
515
516
|
}[];
|
|
517
|
+
sourceChargeId: string;
|
|
516
518
|
}, {
|
|
517
519
|
operationId: import("convex/values").VString<string, "required">;
|
|
518
520
|
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
519
521
|
slices: import("convex/values").VArray<{
|
|
520
|
-
stripeTransferId: string;
|
|
521
522
|
from: number;
|
|
523
|
+
stripeTransferId: string;
|
|
522
524
|
to: number;
|
|
523
525
|
}[], import("convex/values").VObject<{
|
|
524
|
-
stripeTransferId: string;
|
|
525
526
|
from: number;
|
|
527
|
+
stripeTransferId: string;
|
|
526
528
|
to: number;
|
|
527
529
|
}, {
|
|
528
530
|
stripeTransferId: import("convex/values").VString<string, "required">;
|
|
529
531
|
from: import("convex/values").VFloat64<number, "required">;
|
|
530
532
|
to: import("convex/values").VFloat64<number, "required">;
|
|
531
|
-
}, "required", "
|
|
532
|
-
}, "required", "operationId" | "
|
|
533
|
+
}, "required", "from" | "stripeTransferId" | "to">, "required">;
|
|
534
|
+
}, "required", "operationId" | "slices" | "sourceChargeId">, {
|
|
533
535
|
by_operation_id: ["operationId", "_creationTime"];
|
|
534
536
|
}, {}, {}>;
|
|
535
537
|
webhookEvents: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
536
|
-
livemode?: boolean | undefined;
|
|
537
|
-
lastError?: string | undefined;
|
|
538
|
-
status: "failed" | "processing" | "processed" | "ignored";
|
|
539
538
|
eventType: string;
|
|
540
|
-
|
|
539
|
+
lastError?: string | undefined;
|
|
540
|
+
livemode?: boolean | undefined;
|
|
541
541
|
processedAt: number;
|
|
542
|
+
status: "failed" | "ignored" | "processed" | "processing";
|
|
543
|
+
stripeEventId: string;
|
|
542
544
|
}, {
|
|
543
545
|
stripeEventId: import("convex/values").VString<string, "required">;
|
|
544
546
|
eventType: import("convex/values").VString<string, "required">;
|
|
545
547
|
livemode: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
546
548
|
processedAt: import("convex/values").VFloat64<number, "required">;
|
|
547
|
-
status: import("convex/values").VUnion<"failed" | "
|
|
549
|
+
status: import("convex/values").VUnion<"failed" | "ignored" | "processed" | "processing", [import("convex/values").VLiteral<"processing", "required">, import("convex/values").VLiteral<"processed", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"ignored", "required">], "required", never>;
|
|
548
550
|
lastError: import("convex/values").VString<string | undefined, "optional">;
|
|
549
|
-
}, "required", "
|
|
550
|
-
by_stripeEventId: ["stripeEventId", "_creationTime"];
|
|
551
|
+
}, "required", "eventType" | "lastError" | "livemode" | "processedAt" | "status" | "stripeEventId">, {
|
|
551
552
|
by_status: ["status", "_creationTime"];
|
|
553
|
+
by_stripeEventId: ["stripeEventId", "_creationTime"];
|
|
552
554
|
}, {}, {}>;
|
|
553
555
|
}, true>;
|
|
554
556
|
export default _default;
|