@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,45 +1,45 @@
|
|
|
1
1
|
export declare const upsertPayment: import("convex/server").RegisteredMutation<"public", {
|
|
2
2
|
accountId?: string | undefined;
|
|
3
|
+
amount: number;
|
|
3
4
|
applicationFeeAmount?: number | undefined;
|
|
4
5
|
applicationFeePercent?: number | undefined;
|
|
5
6
|
chargeType?: "destination" | "separate" | undefined;
|
|
7
|
+
currency: string;
|
|
6
8
|
destinationAccountId?: string | undefined;
|
|
7
9
|
feeCollectedAmount?: number | undefined;
|
|
8
10
|
feeRefundedAmount?: number | undefined;
|
|
9
11
|
metadata?: any;
|
|
10
12
|
orgId?: string | undefined;
|
|
11
13
|
splitRecipients?: {
|
|
12
|
-
percent?: number | undefined;
|
|
13
14
|
amount?: number | undefined;
|
|
14
15
|
destinationAccountId: string;
|
|
15
|
-
|
|
16
|
+
percent?: number | undefined;
|
|
17
|
+
role: "affiliate" | "other" | "store";
|
|
16
18
|
}[] | undefined;
|
|
17
|
-
|
|
18
|
-
status: "canceled" | "succeeded" | "failed" | "processing" | "requires_action";
|
|
19
|
-
userId: string;
|
|
20
|
-
amount: number;
|
|
19
|
+
status: "canceled" | "failed" | "processing" | "requires_action" | "succeeded";
|
|
21
20
|
stripePaymentIntentId: string;
|
|
21
|
+
userId: string;
|
|
22
22
|
}, Promise<null>>;
|
|
23
23
|
export declare const upsertPayout: import("convex/server").RegisteredMutation<"public", {
|
|
24
|
-
metadata?: any;
|
|
25
|
-
arrivalDate?: string | undefined;
|
|
26
|
-
method?: string | undefined;
|
|
27
24
|
accountId: string;
|
|
28
|
-
currency: string;
|
|
29
|
-
status: "paid" | "canceled" | "failed" | "pending" | "in_transit";
|
|
30
25
|
amount: number;
|
|
26
|
+
arrivalDate?: string | undefined;
|
|
27
|
+
currency: string;
|
|
28
|
+
metadata?: any;
|
|
29
|
+
method?: string | undefined;
|
|
30
|
+
status: "canceled" | "failed" | "in_transit" | "paid" | "pending";
|
|
31
31
|
stripePayoutId: string;
|
|
32
32
|
}, Promise<null>>;
|
|
33
33
|
export declare const upsertRefund: import("convex/server").RegisteredMutation<"public", {
|
|
34
34
|
accountId?: string | undefined;
|
|
35
|
+
amount: number;
|
|
36
|
+
currency: string;
|
|
37
|
+
failureReason?: string | undefined;
|
|
35
38
|
metadata?: any;
|
|
36
|
-
|
|
37
|
-
|
|
39
|
+
reason?: "duplicate" | "expired_uncaptured_charge" | "fraudulent" | "requested_by_customer" | undefined;
|
|
40
|
+
status: "canceled" | "failed" | "pending" | "requires_action" | "succeeded";
|
|
38
41
|
stripeChargeId?: string | undefined;
|
|
39
|
-
|
|
40
|
-
currency: string;
|
|
41
|
-
status: "canceled" | "succeeded" | "failed" | "requires_action" | "pending";
|
|
42
|
-
amount: number;
|
|
42
|
+
stripePaymentIntentId?: string | undefined;
|
|
43
43
|
stripeRefundId: string;
|
|
44
44
|
}, Promise<null>>;
|
|
45
45
|
/**
|
|
@@ -61,34 +61,34 @@ export declare const recordPaymentFeeRefund: import("convex/server").RegisteredM
|
|
|
61
61
|
}, Promise<null>>;
|
|
62
62
|
export declare const upsertDispute: import("convex/server").RegisteredMutation<"public", {
|
|
63
63
|
accountId?: string | undefined;
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
amount: number;
|
|
65
|
+
currency: string;
|
|
66
66
|
evidence?: any;
|
|
67
67
|
evidenceDueBy?: string | undefined;
|
|
68
|
+
isChargeRefundable: boolean;
|
|
68
69
|
lastEvent?: string | undefined;
|
|
69
70
|
linkedTransferIds?: string[] | undefined;
|
|
71
|
+
metadata?: any;
|
|
72
|
+
reason: string;
|
|
70
73
|
statementDescriptor?: string | undefined;
|
|
74
|
+
status: "lost" | "needs_response" | "prevented" | "under_review" | "warning_closed" | "warning_needs_response" | "warning_under_review" | "won";
|
|
71
75
|
stripeChargeId?: string | undefined;
|
|
72
|
-
currency: string;
|
|
73
|
-
status: "warning_needs_response" | "warning_under_review" | "warning_closed" | "needs_response" | "under_review" | "won" | "lost" | "prevented";
|
|
74
|
-
amount: number;
|
|
75
|
-
isChargeRefundable: boolean;
|
|
76
|
-
reason: string;
|
|
77
76
|
stripeDisputeId: string;
|
|
77
|
+
stripePaymentIntentId?: string | undefined;
|
|
78
78
|
}, Promise<null>>;
|
|
79
79
|
export declare const upsertTransfer: import("convex/server").RegisteredMutation<"public", {
|
|
80
|
+
amount: number;
|
|
81
|
+
currency: string;
|
|
82
|
+
destinationAccountId: string;
|
|
80
83
|
metadata?: any;
|
|
81
|
-
sourceChargeId?: string | undefined;
|
|
82
|
-
reversedAmount?: number | undefined;
|
|
83
84
|
paymentId?: string | undefined;
|
|
84
85
|
reinstatement?: boolean | undefined;
|
|
85
|
-
reversalStatus?: "
|
|
86
|
-
|
|
86
|
+
reversalStatus?: "fully_reversed" | "partially_reversed" | undefined;
|
|
87
|
+
reversedAmount?: number | undefined;
|
|
88
|
+
role?: "affiliate" | "other" | "store" | undefined;
|
|
89
|
+
sourceChargeId?: string | undefined;
|
|
87
90
|
sourceInvoiceId?: string | undefined;
|
|
88
|
-
|
|
89
|
-
destinationAccountId: string;
|
|
90
|
-
status: "paid" | "failed" | "pending" | "reversed";
|
|
91
|
-
amount: number;
|
|
91
|
+
status: "failed" | "paid" | "pending" | "reversed";
|
|
92
92
|
stripeTransferId: string;
|
|
93
93
|
}, Promise<null>>;
|
|
94
94
|
/**
|
|
@@ -122,15 +122,15 @@ export declare const claimReversalSlices: import("convex/server").RegisteredMuta
|
|
|
122
122
|
mode: {
|
|
123
123
|
kind: "full";
|
|
124
124
|
} | {
|
|
125
|
-
percent: number;
|
|
126
125
|
kind: "percent";
|
|
126
|
+
percent: number;
|
|
127
127
|
} | {
|
|
128
128
|
amount: number;
|
|
129
129
|
kind: "amount";
|
|
130
130
|
} | {
|
|
131
|
-
kind: "fraction";
|
|
132
|
-
chargeAmount: number;
|
|
133
131
|
amountRefunded: number;
|
|
132
|
+
chargeAmount: number;
|
|
133
|
+
kind: "fraction";
|
|
134
134
|
};
|
|
135
135
|
operationId: string;
|
|
136
136
|
sourceChargeId: string;
|
|
@@ -138,8 +138,8 @@ export declare const claimReversalSlices: import("convex/server").RegisteredMuta
|
|
|
138
138
|
replay: boolean;
|
|
139
139
|
slices: {
|
|
140
140
|
confirmed: number;
|
|
141
|
-
stripeTransferId: string;
|
|
142
141
|
from: number;
|
|
142
|
+
stripeTransferId: string;
|
|
143
143
|
to: number;
|
|
144
144
|
}[];
|
|
145
145
|
}>>;
|
|
@@ -169,8 +169,8 @@ export declare const claimReversalSlices: import("convex/server").RegisteredMuta
|
|
|
169
169
|
export declare const releaseReversalClaim: import("convex/server").RegisteredMutation<"public", {
|
|
170
170
|
operationId: string;
|
|
171
171
|
verified: {
|
|
172
|
-
stripeTransferId: string;
|
|
173
172
|
amountReversed: number;
|
|
173
|
+
stripeTransferId: string;
|
|
174
174
|
}[];
|
|
175
175
|
}, Promise<{
|
|
176
176
|
released: boolean;
|
|
@@ -1,57 +1,57 @@
|
|
|
1
1
|
export declare const getPaymentByStripeId: import("convex/server").RegisteredQuery<"public", {
|
|
2
2
|
stripePaymentIntentId: string;
|
|
3
3
|
}, Promise<{
|
|
4
|
-
_id: import("convex/values").GenericId<"payments">;
|
|
5
4
|
_creationTime: number;
|
|
5
|
+
_id: import("convex/values").GenericId<"payments">;
|
|
6
6
|
accountId?: string | undefined;
|
|
7
|
+
amount: number;
|
|
7
8
|
applicationFeeAmount?: number | undefined;
|
|
8
9
|
applicationFeePercent?: number | undefined;
|
|
9
10
|
chargeType?: "destination" | "separate" | undefined;
|
|
11
|
+
currency: string;
|
|
10
12
|
destinationAccountId?: string | undefined;
|
|
11
13
|
feeCollectedAmount?: number | undefined;
|
|
12
14
|
feeRefundedAmount?: number | undefined;
|
|
13
15
|
metadata?: any;
|
|
14
16
|
orgId?: string | undefined;
|
|
17
|
+
refundStatus?: "fully_refunded" | "partially_refunded" | undefined;
|
|
18
|
+
refundedAmount?: number | undefined;
|
|
15
19
|
splitRecipients?: {
|
|
16
|
-
percent?: number | undefined;
|
|
17
20
|
amount?: number | undefined;
|
|
18
21
|
destinationAccountId: string;
|
|
19
|
-
|
|
22
|
+
percent?: number | undefined;
|
|
23
|
+
role: "affiliate" | "other" | "store";
|
|
20
24
|
}[] | undefined;
|
|
21
|
-
|
|
22
|
-
refundStatus?: "partially_refunded" | "fully_refunded" | undefined;
|
|
23
|
-
currency: string;
|
|
24
|
-
status: "canceled" | "succeeded" | "failed" | "processing" | "requires_action";
|
|
25
|
-
userId: string;
|
|
26
|
-
amount: number;
|
|
25
|
+
status: "canceled" | "failed" | "processing" | "requires_action" | "succeeded";
|
|
27
26
|
stripePaymentIntentId: string;
|
|
27
|
+
userId: string;
|
|
28
28
|
} | null>>;
|
|
29
29
|
export declare const getPayout: import("convex/server").RegisteredQuery<"public", {
|
|
30
30
|
payoutId: import("convex/values").GenericId<"payouts">;
|
|
31
31
|
}, Promise<{
|
|
32
|
-
_id: import("convex/values").GenericId<"payouts">;
|
|
33
32
|
_creationTime: number;
|
|
34
|
-
|
|
35
|
-
arrivalDate?: string | undefined;
|
|
36
|
-
method?: string | undefined;
|
|
33
|
+
_id: import("convex/values").GenericId<"payouts">;
|
|
37
34
|
accountId: string;
|
|
38
|
-
currency: string;
|
|
39
|
-
status: "paid" | "canceled" | "failed" | "pending" | "in_transit";
|
|
40
35
|
amount: number;
|
|
36
|
+
arrivalDate?: string | undefined;
|
|
37
|
+
currency: string;
|
|
38
|
+
metadata?: any;
|
|
39
|
+
method?: string | undefined;
|
|
40
|
+
status: "canceled" | "failed" | "in_transit" | "paid" | "pending";
|
|
41
41
|
stripePayoutId: string;
|
|
42
42
|
} | null>>;
|
|
43
43
|
export declare const getPayoutByStripeId: import("convex/server").RegisteredQuery<"public", {
|
|
44
44
|
stripePayoutId: string;
|
|
45
45
|
}, Promise<{
|
|
46
|
-
_id: import("convex/values").GenericId<"payouts">;
|
|
47
46
|
_creationTime: number;
|
|
48
|
-
|
|
49
|
-
arrivalDate?: string | undefined;
|
|
50
|
-
method?: string | undefined;
|
|
47
|
+
_id: import("convex/values").GenericId<"payouts">;
|
|
51
48
|
accountId: string;
|
|
52
|
-
currency: string;
|
|
53
|
-
status: "paid" | "canceled" | "failed" | "pending" | "in_transit";
|
|
54
49
|
amount: number;
|
|
50
|
+
arrivalDate?: string | undefined;
|
|
51
|
+
currency: string;
|
|
52
|
+
metadata?: any;
|
|
53
|
+
method?: string | undefined;
|
|
54
|
+
status: "canceled" | "failed" | "in_transit" | "paid" | "pending";
|
|
55
55
|
stripePayoutId: string;
|
|
56
56
|
} | null>>;
|
|
57
57
|
/**
|
|
@@ -64,34 +64,34 @@ export declare const getPayoutByStripeId: import("convex/server").RegisteredQuer
|
|
|
64
64
|
*/
|
|
65
65
|
export declare const listPayouts: import("convex/server").RegisteredQuery<"public", {
|
|
66
66
|
accountId?: string | undefined;
|
|
67
|
-
status?: "paid" | "canceled" | "failed" | "pending" | "in_transit" | undefined;
|
|
68
67
|
limit?: number | undefined;
|
|
68
|
+
status?: "canceled" | "failed" | "in_transit" | "paid" | "pending" | undefined;
|
|
69
69
|
}, Promise<{
|
|
70
|
-
_id: import("convex/values").GenericId<"payouts">;
|
|
71
70
|
_creationTime: number;
|
|
72
|
-
|
|
73
|
-
arrivalDate?: string | undefined;
|
|
74
|
-
method?: string | undefined;
|
|
71
|
+
_id: import("convex/values").GenericId<"payouts">;
|
|
75
72
|
accountId: string;
|
|
76
|
-
currency: string;
|
|
77
|
-
status: "paid" | "canceled" | "failed" | "pending" | "in_transit";
|
|
78
73
|
amount: number;
|
|
74
|
+
arrivalDate?: string | undefined;
|
|
75
|
+
currency: string;
|
|
76
|
+
metadata?: any;
|
|
77
|
+
method?: string | undefined;
|
|
78
|
+
status: "canceled" | "failed" | "in_transit" | "paid" | "pending";
|
|
79
79
|
stripePayoutId: string;
|
|
80
80
|
}[]>>;
|
|
81
81
|
export declare const getRefundByStripeId: import("convex/server").RegisteredQuery<"public", {
|
|
82
82
|
stripeRefundId: string;
|
|
83
83
|
}, Promise<{
|
|
84
|
-
_id: import("convex/values").GenericId<"refunds">;
|
|
85
84
|
_creationTime: number;
|
|
85
|
+
_id: import("convex/values").GenericId<"refunds">;
|
|
86
86
|
accountId?: string | undefined;
|
|
87
|
+
amount: number;
|
|
88
|
+
currency: string;
|
|
89
|
+
failureReason?: string | undefined;
|
|
87
90
|
metadata?: any;
|
|
88
|
-
|
|
89
|
-
|
|
91
|
+
reason?: "duplicate" | "expired_uncaptured_charge" | "fraudulent" | "requested_by_customer" | undefined;
|
|
92
|
+
status: "canceled" | "failed" | "pending" | "requires_action" | "succeeded";
|
|
90
93
|
stripeChargeId?: string | undefined;
|
|
91
|
-
|
|
92
|
-
currency: string;
|
|
93
|
-
status: "canceled" | "succeeded" | "failed" | "requires_action" | "pending";
|
|
94
|
-
amount: number;
|
|
94
|
+
stripePaymentIntentId?: string | undefined;
|
|
95
95
|
stripeRefundId: string;
|
|
96
96
|
} | null>>;
|
|
97
97
|
/**
|
|
@@ -101,89 +101,89 @@ export declare const getRefundByStripeId: import("convex/server").RegisteredQuer
|
|
|
101
101
|
*/
|
|
102
102
|
export declare const listRefunds: import("convex/server").RegisteredQuery<"public", {
|
|
103
103
|
accountId?: string | undefined;
|
|
104
|
-
status?: "canceled" | "succeeded" | "failed" | "requires_action" | "pending" | undefined;
|
|
105
104
|
limit?: number | undefined;
|
|
105
|
+
status?: "canceled" | "failed" | "pending" | "requires_action" | "succeeded" | undefined;
|
|
106
106
|
stripePaymentIntentId?: string | undefined;
|
|
107
107
|
}, Promise<{
|
|
108
|
-
_id: import("convex/values").GenericId<"refunds">;
|
|
109
108
|
_creationTime: number;
|
|
109
|
+
_id: import("convex/values").GenericId<"refunds">;
|
|
110
110
|
accountId?: string | undefined;
|
|
111
|
+
amount: number;
|
|
112
|
+
currency: string;
|
|
113
|
+
failureReason?: string | undefined;
|
|
111
114
|
metadata?: any;
|
|
112
|
-
|
|
113
|
-
|
|
115
|
+
reason?: "duplicate" | "expired_uncaptured_charge" | "fraudulent" | "requested_by_customer" | undefined;
|
|
116
|
+
status: "canceled" | "failed" | "pending" | "requires_action" | "succeeded";
|
|
114
117
|
stripeChargeId?: string | undefined;
|
|
115
|
-
|
|
116
|
-
currency: string;
|
|
117
|
-
status: "canceled" | "succeeded" | "failed" | "requires_action" | "pending";
|
|
118
|
-
amount: number;
|
|
118
|
+
stripePaymentIntentId?: string | undefined;
|
|
119
119
|
stripeRefundId: string;
|
|
120
120
|
}[]>>;
|
|
121
121
|
export declare const getDisputeByStripeId: import("convex/server").RegisteredQuery<"public", {
|
|
122
122
|
stripeDisputeId: string;
|
|
123
123
|
}, Promise<{
|
|
124
|
-
_id: import("convex/values").GenericId<"disputes">;
|
|
125
124
|
_creationTime: number;
|
|
125
|
+
_id: import("convex/values").GenericId<"disputes">;
|
|
126
126
|
accountId?: string | undefined;
|
|
127
|
-
|
|
128
|
-
|
|
127
|
+
amount: number;
|
|
128
|
+
currency: string;
|
|
129
129
|
evidence?: any;
|
|
130
130
|
evidenceDueBy?: string | undefined;
|
|
131
|
+
isChargeRefundable: boolean;
|
|
131
132
|
lastEvent?: string | undefined;
|
|
132
133
|
linkedTransferIds?: string[] | undefined;
|
|
134
|
+
metadata?: any;
|
|
135
|
+
reason: string;
|
|
133
136
|
statementDescriptor?: string | undefined;
|
|
137
|
+
status: "lost" | "needs_response" | "prevented" | "under_review" | "warning_closed" | "warning_needs_response" | "warning_under_review" | "won";
|
|
134
138
|
stripeChargeId?: string | undefined;
|
|
135
|
-
currency: string;
|
|
136
|
-
status: "warning_needs_response" | "warning_under_review" | "warning_closed" | "needs_response" | "under_review" | "won" | "lost" | "prevented";
|
|
137
|
-
amount: number;
|
|
138
|
-
isChargeRefundable: boolean;
|
|
139
|
-
reason: string;
|
|
140
139
|
stripeDisputeId: string;
|
|
140
|
+
stripePaymentIntentId?: string | undefined;
|
|
141
141
|
} | null>>;
|
|
142
142
|
/**
|
|
143
143
|
* List disputes. Same index-aware filtering rules as {@link listRefunds}.
|
|
144
144
|
*/
|
|
145
145
|
export declare const listDisputes: import("convex/server").RegisteredQuery<"public", {
|
|
146
146
|
accountId?: string | undefined;
|
|
147
|
-
status?: "warning_needs_response" | "warning_under_review" | "warning_closed" | "needs_response" | "under_review" | "won" | "lost" | "prevented" | undefined;
|
|
148
147
|
limit?: number | undefined;
|
|
148
|
+
status?: "lost" | "needs_response" | "prevented" | "under_review" | "warning_closed" | "warning_needs_response" | "warning_under_review" | "won" | undefined;
|
|
149
149
|
stripePaymentIntentId?: string | undefined;
|
|
150
150
|
}, Promise<{
|
|
151
|
-
_id: import("convex/values").GenericId<"disputes">;
|
|
152
151
|
_creationTime: number;
|
|
152
|
+
_id: import("convex/values").GenericId<"disputes">;
|
|
153
153
|
accountId?: string | undefined;
|
|
154
|
-
|
|
155
|
-
|
|
154
|
+
amount: number;
|
|
155
|
+
currency: string;
|
|
156
156
|
evidence?: any;
|
|
157
157
|
evidenceDueBy?: string | undefined;
|
|
158
|
+
isChargeRefundable: boolean;
|
|
158
159
|
lastEvent?: string | undefined;
|
|
159
160
|
linkedTransferIds?: string[] | undefined;
|
|
161
|
+
metadata?: any;
|
|
162
|
+
reason: string;
|
|
160
163
|
statementDescriptor?: string | undefined;
|
|
164
|
+
status: "lost" | "needs_response" | "prevented" | "under_review" | "warning_closed" | "warning_needs_response" | "warning_under_review" | "won";
|
|
161
165
|
stripeChargeId?: string | undefined;
|
|
162
|
-
currency: string;
|
|
163
|
-
status: "warning_needs_response" | "warning_under_review" | "warning_closed" | "needs_response" | "under_review" | "won" | "lost" | "prevented";
|
|
164
|
-
amount: number;
|
|
165
|
-
isChargeRefundable: boolean;
|
|
166
|
-
reason: string;
|
|
167
166
|
stripeDisputeId: string;
|
|
167
|
+
stripePaymentIntentId?: string | undefined;
|
|
168
168
|
}[]>>;
|
|
169
169
|
export declare const getTransferByStripeId: import("convex/server").RegisteredQuery<"public", {
|
|
170
170
|
stripeTransferId: string;
|
|
171
171
|
}, Promise<{
|
|
172
|
-
_id: import("convex/values").GenericId<"transfers">;
|
|
173
172
|
_creationTime: number;
|
|
173
|
+
_id: import("convex/values").GenericId<"transfers">;
|
|
174
|
+
amount: number;
|
|
175
|
+
currency: string;
|
|
176
|
+
destinationAccountId: string;
|
|
174
177
|
metadata?: any;
|
|
175
|
-
sourceChargeId?: string | undefined;
|
|
176
|
-
reversedAmount?: number | undefined;
|
|
177
178
|
paymentId?: string | undefined;
|
|
178
179
|
reinstatement?: boolean | undefined;
|
|
179
|
-
reversalStatus?: "partially_reversed" | "fully_reversed" | undefined;
|
|
180
|
-
role?: "store" | "affiliate" | "other" | undefined;
|
|
181
|
-
sourceInvoiceId?: string | undefined;
|
|
182
180
|
reversalClaimedAmount?: number | undefined;
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
181
|
+
reversalStatus?: "fully_reversed" | "partially_reversed" | undefined;
|
|
182
|
+
reversedAmount?: number | undefined;
|
|
183
|
+
role?: "affiliate" | "other" | "store" | undefined;
|
|
184
|
+
sourceChargeId?: string | undefined;
|
|
185
|
+
sourceInvoiceId?: string | undefined;
|
|
186
|
+
status: "failed" | "paid" | "pending" | "reversed";
|
|
187
187
|
stripeTransferId: string;
|
|
188
188
|
} | null>>;
|
|
189
189
|
/**
|
|
@@ -198,21 +198,21 @@ export declare const listTransfersByCharge: import("convex/server").RegisteredQu
|
|
|
198
198
|
limit?: number | undefined;
|
|
199
199
|
sourceChargeId: string;
|
|
200
200
|
}, Promise<{
|
|
201
|
-
_id: import("convex/values").GenericId<"transfers">;
|
|
202
201
|
_creationTime: number;
|
|
202
|
+
_id: import("convex/values").GenericId<"transfers">;
|
|
203
|
+
amount: number;
|
|
204
|
+
currency: string;
|
|
205
|
+
destinationAccountId: string;
|
|
203
206
|
metadata?: any;
|
|
204
|
-
sourceChargeId?: string | undefined;
|
|
205
|
-
reversedAmount?: number | undefined;
|
|
206
207
|
paymentId?: string | undefined;
|
|
207
208
|
reinstatement?: boolean | undefined;
|
|
208
|
-
reversalStatus?: "partially_reversed" | "fully_reversed" | undefined;
|
|
209
|
-
role?: "store" | "affiliate" | "other" | undefined;
|
|
210
|
-
sourceInvoiceId?: string | undefined;
|
|
211
209
|
reversalClaimedAmount?: number | undefined;
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
210
|
+
reversalStatus?: "fully_reversed" | "partially_reversed" | undefined;
|
|
211
|
+
reversedAmount?: number | undefined;
|
|
212
|
+
role?: "affiliate" | "other" | "store" | undefined;
|
|
213
|
+
sourceChargeId?: string | undefined;
|
|
214
|
+
sourceInvoiceId?: string | undefined;
|
|
215
|
+
status: "failed" | "paid" | "pending" | "reversed";
|
|
216
216
|
stripeTransferId: string;
|
|
217
217
|
}[]>>;
|
|
218
218
|
/**
|
|
@@ -224,24 +224,24 @@ export declare const listTransfersByCharge: import("convex/server").RegisteredQu
|
|
|
224
224
|
* {@link getAccountEarnings}, which sums the whole ledger server-side.
|
|
225
225
|
*/
|
|
226
226
|
export declare const listTransfersByAccount: import("convex/server").RegisteredQuery<"public", {
|
|
227
|
-
limit?: number | undefined;
|
|
228
227
|
destinationAccountId: string;
|
|
228
|
+
limit?: number | undefined;
|
|
229
229
|
}, Promise<{
|
|
230
|
-
_id: import("convex/values").GenericId<"transfers">;
|
|
231
230
|
_creationTime: number;
|
|
231
|
+
_id: import("convex/values").GenericId<"transfers">;
|
|
232
|
+
amount: number;
|
|
233
|
+
currency: string;
|
|
234
|
+
destinationAccountId: string;
|
|
232
235
|
metadata?: any;
|
|
233
|
-
sourceChargeId?: string | undefined;
|
|
234
|
-
reversedAmount?: number | undefined;
|
|
235
236
|
paymentId?: string | undefined;
|
|
236
237
|
reinstatement?: boolean | undefined;
|
|
237
|
-
reversalStatus?: "partially_reversed" | "fully_reversed" | undefined;
|
|
238
|
-
role?: "store" | "affiliate" | "other" | undefined;
|
|
239
|
-
sourceInvoiceId?: string | undefined;
|
|
240
238
|
reversalClaimedAmount?: number | undefined;
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
239
|
+
reversalStatus?: "fully_reversed" | "partially_reversed" | undefined;
|
|
240
|
+
reversedAmount?: number | undefined;
|
|
241
|
+
role?: "affiliate" | "other" | "store" | undefined;
|
|
242
|
+
sourceChargeId?: string | undefined;
|
|
243
|
+
sourceInvoiceId?: string | undefined;
|
|
244
|
+
status: "failed" | "paid" | "pending" | "reversed";
|
|
245
245
|
stripeTransferId: string;
|
|
246
246
|
}[]>>;
|
|
247
247
|
/**
|
|
@@ -252,15 +252,15 @@ export declare const listTransfersByAccount: import("convex/server").RegisteredQ
|
|
|
252
252
|
export declare const getReversalOp: import("convex/server").RegisteredQuery<"public", {
|
|
253
253
|
operationId: string;
|
|
254
254
|
}, Promise<{
|
|
255
|
-
_id: import("convex/values").GenericId<"transferReversalOps">;
|
|
256
255
|
_creationTime: number;
|
|
256
|
+
_id: import("convex/values").GenericId<"transferReversalOps">;
|
|
257
257
|
operationId: string;
|
|
258
|
-
sourceChargeId: string;
|
|
259
258
|
slices: {
|
|
260
|
-
stripeTransferId: string;
|
|
261
259
|
from: number;
|
|
260
|
+
stripeTransferId: string;
|
|
262
261
|
to: number;
|
|
263
262
|
}[];
|
|
263
|
+
sourceChargeId: string;
|
|
264
264
|
} | null>>;
|
|
265
265
|
/**
|
|
266
266
|
* List "wedged" legs (BTS-74): transfers whose reversal claim frontier
|
|
@@ -269,7 +269,7 @@ export declare const getReversalOp: import("convex/server").RegisteredQuery<"pub
|
|
|
269
269
|
* successor. For each wedged leg, returns the recorded ops holding an
|
|
270
270
|
* unexecuted slice on it (the blockers ops must reclaim).
|
|
271
271
|
*
|
|
272
|
-
* An admin/ops diagnostic, not a hot path. It
|
|
272
|
+
* An admin/ops diagnostic, not a hot path. It iterates the `transfers` and
|
|
273
273
|
* `transferReversalOps` tables to completion, so it is exact up to Convex's
|
|
274
274
|
* per-query document-read limit (16,384) — beyond which it throws (loud) rather
|
|
275
275
|
* than silently truncating, matching the BTS-64 aggregate convention.
|
|
@@ -289,58 +289,58 @@ export declare const listWedgedReversalClaims: import("convex/server").Registere
|
|
|
289
289
|
/**
|
|
290
290
|
* Exact earnings totals for one connected account (BTS-64): `gross` (sum of all
|
|
291
291
|
* transfer amounts, incl. reinstatements — the earnings view) and `reversed`
|
|
292
|
-
* (sum of all `reversedAmount`),
|
|
292
|
+
* (sum of all `reversedAmount`), iterated to completion so totals are never
|
|
293
293
|
* capped. `transfers` is a bounded preview (`previewLimit ?? 50` rows) for
|
|
294
294
|
* drill-down; use `gross`/`reversed`/`transferCount` for the money figures.
|
|
295
295
|
*/
|
|
296
296
|
export declare const getAccountEarnings: import("convex/server").RegisteredQuery<"public", {
|
|
297
|
-
previewLimit?: number | undefined;
|
|
298
297
|
destinationAccountId: string;
|
|
298
|
+
previewLimit?: number | undefined;
|
|
299
299
|
}, Promise<{
|
|
300
300
|
gross: number;
|
|
301
301
|
reversed: number;
|
|
302
302
|
transferCount: number;
|
|
303
303
|
transfers: {
|
|
304
|
-
_id: import("convex/values").GenericId<"transfers">;
|
|
305
304
|
_creationTime: number;
|
|
305
|
+
_id: import("convex/values").GenericId<"transfers">;
|
|
306
|
+
amount: number;
|
|
307
|
+
currency: string;
|
|
308
|
+
destinationAccountId: string;
|
|
306
309
|
metadata?: any;
|
|
307
|
-
sourceChargeId?: string | undefined;
|
|
308
|
-
reversedAmount?: number | undefined;
|
|
309
310
|
paymentId?: string | undefined;
|
|
310
311
|
reinstatement?: boolean | undefined;
|
|
311
|
-
reversalStatus?: "partially_reversed" | "fully_reversed" | undefined;
|
|
312
|
-
role?: "store" | "affiliate" | "other" | undefined;
|
|
313
|
-
sourceInvoiceId?: string | undefined;
|
|
314
312
|
reversalClaimedAmount?: number | undefined;
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
313
|
+
reversalStatus?: "fully_reversed" | "partially_reversed" | undefined;
|
|
314
|
+
reversedAmount?: number | undefined;
|
|
315
|
+
role?: "affiliate" | "other" | "store" | undefined;
|
|
316
|
+
sourceChargeId?: string | undefined;
|
|
317
|
+
sourceInvoiceId?: string | undefined;
|
|
318
|
+
status: "failed" | "paid" | "pending" | "reversed";
|
|
319
319
|
stripeTransferId: string;
|
|
320
320
|
}[];
|
|
321
321
|
}>>;
|
|
322
322
|
/**
|
|
323
323
|
* Exact payout totals for one connected account (BTS-64): `paidOut` (sum of all
|
|
324
|
-
* `paid` payout amounts),
|
|
324
|
+
* `paid` payout amounts), iterated to completion so it is never capped.
|
|
325
325
|
* `payouts` is a bounded preview (`previewLimit ?? 50` rows) for drill-down; use
|
|
326
326
|
* `paidOut`/`payoutCount` for the money figures.
|
|
327
327
|
*/
|
|
328
328
|
export declare const getAccountPayouts: import("convex/server").RegisteredQuery<"public", {
|
|
329
|
-
previewLimit?: number | undefined;
|
|
330
329
|
accountId: string;
|
|
330
|
+
previewLimit?: number | undefined;
|
|
331
331
|
}, Promise<{
|
|
332
332
|
paidOut: number;
|
|
333
333
|
payoutCount: number;
|
|
334
334
|
payouts: {
|
|
335
|
-
_id: import("convex/values").GenericId<"payouts">;
|
|
336
335
|
_creationTime: number;
|
|
337
|
-
|
|
338
|
-
arrivalDate?: string | undefined;
|
|
339
|
-
method?: string | undefined;
|
|
336
|
+
_id: import("convex/values").GenericId<"payouts">;
|
|
340
337
|
accountId: string;
|
|
341
|
-
currency: string;
|
|
342
|
-
status: "paid" | "canceled" | "failed" | "pending" | "in_transit";
|
|
343
338
|
amount: number;
|
|
339
|
+
arrivalDate?: string | undefined;
|
|
340
|
+
currency: string;
|
|
341
|
+
metadata?: any;
|
|
342
|
+
method?: string | undefined;
|
|
343
|
+
status: "canceled" | "failed" | "in_transit" | "paid" | "pending";
|
|
344
344
|
stripePayoutId: string;
|
|
345
345
|
}[];
|
|
346
346
|
}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../src/component/connect/queries.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;UAW/B,CAAC;AAMH,eAAO,MAAM,SAAS;;;;;;;;;;;;;UAMpB,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;UAW9B,CAAC;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;KAsCtB,CAAC;AAMH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;UAW9B,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;KA6DtB,CAAC;AAMH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;UAW/B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;KA6DvB,CAAC;AAMH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;UAWhC,CAAC;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;KAchC,CAAC;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;KAWjC,CAAC;
|
|
1
|
+
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../src/component/connect/queries.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;UAW/B,CAAC;AAMH,eAAO,MAAM,SAAS;;;;;;;;;;;;;UAMpB,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;UAW9B,CAAC;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;KAsCtB,CAAC;AAMH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;UAW9B,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;KA6DtB,CAAC;AAMH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;UAW/B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;KA6DvB,CAAC;AAMH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;UAWhC,CAAC;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;KAchC,CAAC;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;KAWjC,CAAC;AAMH;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;UAWxB,CAAC;AAEH;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,wBAAwB;;;;;;;qBAsBhB,MAAM;cAAQ,MAAM;YAAM,MAAM;;KAuBnD,CAAC;AAgBH;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;GA+B7B,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;GAuB5B,CAAC"}
|