@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.
Files changed (162) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/MIGRATION.md +135 -0
  3. package/README.md +23 -2
  4. package/dist/client/billing/checkout.d.ts.map +1 -1
  5. package/dist/client/billing/checkout.js +22 -8
  6. package/dist/client/billing/checkout.js.map +1 -1
  7. package/dist/client/billing/subscriptionRouting.d.ts +24 -0
  8. package/dist/client/billing/subscriptionRouting.d.ts.map +1 -0
  9. package/dist/client/billing/subscriptionRouting.js +19 -0
  10. package/dist/client/billing/subscriptionRouting.js.map +1 -0
  11. package/dist/client/billing/subscriptions.d.ts +6 -6
  12. package/dist/client/billing/subscriptions.d.ts.map +1 -1
  13. package/dist/client/billing/subscriptions.js +31 -12
  14. package/dist/client/billing/subscriptions.js.map +1 -1
  15. package/dist/client/connect/disputes.js.map +1 -1
  16. package/dist/client/constants.js +1 -1
  17. package/dist/client/core/accountLinks.d.ts +1 -0
  18. package/dist/client/core/accountLinks.d.ts.map +1 -1
  19. package/dist/client/core/accountLinks.js +0 -6
  20. package/dist/client/core/accountLinks.js.map +1 -1
  21. package/dist/client/core/accountStatus.d.ts.map +1 -1
  22. package/dist/client/core/accountStatus.js +23 -8
  23. package/dist/client/core/accountStatus.js.map +1 -1
  24. package/dist/client/index.d.ts +5 -2
  25. package/dist/client/index.d.ts.map +1 -1
  26. package/dist/client/index.js.map +1 -1
  27. package/dist/client/types/documents.d.ts +1 -0
  28. package/dist/client/types/documents.d.ts.map +1 -1
  29. package/dist/client/types/events.d.ts +2 -1
  30. package/dist/client/types/events.d.ts.map +1 -1
  31. package/dist/client/types/options.d.ts +7 -0
  32. package/dist/client/types/options.d.ts.map +1 -1
  33. package/dist/client/utils/stripeDashboardUrl.d.ts.map +1 -1
  34. package/dist/client/utils/webhookEndpoints.d.ts.map +1 -1
  35. package/dist/client/webhooks/handler.d.ts.map +1 -1
  36. package/dist/client/webhooks/handler.js +35 -1
  37. package/dist/client/webhooks/handler.js.map +1 -1
  38. package/dist/client/webhooks/hooks.d.ts +1 -1
  39. package/dist/client/webhooks/hooks.d.ts.map +1 -1
  40. package/dist/client/webhooks/hooks.js +5 -1
  41. package/dist/client/webhooks/hooks.js.map +1 -1
  42. package/dist/client/webhooks/processors.d.ts.map +1 -1
  43. package/dist/client/webhooks/processors.js +12 -2
  44. package/dist/client/webhooks/processors.js.map +1 -1
  45. package/dist/client/webhooks/v2.d.ts.map +1 -1
  46. package/dist/client/webhooks/v2.js +11 -3
  47. package/dist/client/webhooks/v2.js.map +1 -1
  48. package/dist/component/_generated/component.d.ts +8 -0
  49. package/dist/component/_generated/component.d.ts.map +1 -1
  50. package/dist/component/_generated/server.d.ts +7 -1
  51. package/dist/component/_generated/server.d.ts.map +1 -1
  52. package/dist/component/_generated/server.js +2 -1
  53. package/dist/component/_generated/server.js.map +1 -1
  54. package/dist/component/billing/mutations.d.ts +29 -28
  55. package/dist/component/billing/mutations.d.ts.map +1 -1
  56. package/dist/component/billing/mutations.js +1 -0
  57. package/dist/component/billing/mutations.js.map +1 -1
  58. package/dist/component/billing/queries.d.ts +138 -131
  59. package/dist/component/billing/queries.d.ts.map +1 -1
  60. package/dist/component/billing/schema.d.ts +67 -65
  61. package/dist/component/billing/schema.d.ts.map +1 -1
  62. package/dist/component/billing/validators.d.ts +94 -91
  63. package/dist/component/billing/validators.d.ts.map +1 -1
  64. package/dist/component/billing/validators.js +1 -0
  65. package/dist/component/billing/validators.js.map +1 -1
  66. package/dist/component/connect/mutations.d.ts +37 -37
  67. package/dist/component/connect/queries.d.ts +115 -115
  68. package/dist/component/connect/queries.d.ts.map +1 -1
  69. package/dist/component/connect/queries.js +34 -71
  70. package/dist/component/connect/queries.js.map +1 -1
  71. package/dist/component/connect/schema.d.ts +73 -73
  72. package/dist/component/connect/validators.d.ts +119 -119
  73. package/dist/component/connect/validators.d.ts.map +1 -1
  74. package/dist/component/convex.config.d.ts +1 -0
  75. package/dist/component/convex.config.d.ts.map +1 -1
  76. package/dist/component/convex.config.js +2 -1
  77. package/dist/component/convex.config.js.map +1 -1
  78. package/dist/component/core/mutations.d.ts +12 -12
  79. package/dist/component/core/queries.d.ts +34 -34
  80. package/dist/component/core/schema.d.ts +11 -11
  81. package/dist/component/core/validators.d.ts +14 -14
  82. package/dist/component/core/validators.d.ts.map +1 -1
  83. package/dist/component/lib/fees.d.ts +12 -12
  84. package/dist/component/lib/fees.d.ts.map +1 -1
  85. package/dist/component/lib/fees.js +1 -1
  86. package/dist/component/lib/reversals.js.map +1 -1
  87. package/dist/component/products/mutations.d.ts +7 -7
  88. package/dist/component/products/queries.d.ts +33 -33
  89. package/dist/component/products/schema.d.ts +15 -15
  90. package/dist/component/products/validators.d.ts +16 -16
  91. package/dist/component/products/validators.d.ts.map +1 -1
  92. package/dist/component/schema.d.ts +173 -171
  93. package/dist/component/schema.d.ts.map +1 -1
  94. package/dist/component/webhooks/mutations.d.ts +3 -3
  95. package/dist/component/webhooks/queries.d.ts +12 -12
  96. package/dist/component/webhooks/schema.d.ts +7 -7
  97. package/dist/component/webhooks/validators.d.ts +10 -10
  98. package/dist/component/webhooks/validators.d.ts.map +1 -1
  99. package/dist/react/components/AccountCreateCard.js.map +1 -1
  100. package/dist/react/components/BuyerBillingView.js +1 -1
  101. package/dist/react/components/CheckoutSessionProviderWithKey.d.ts +1 -1
  102. package/dist/react/components/DisputeDetail.js +1 -1
  103. package/dist/react/components/DisputesList.js +1 -1
  104. package/dist/react/components/EarningsSummary.js +1 -1
  105. package/dist/react/components/EmbeddedCheckout.d.ts.map +1 -1
  106. package/dist/react/components/EmbeddedCheckout.js +1 -1
  107. package/dist/react/components/EmbeddedCheckout.js.map +1 -1
  108. package/dist/react/components/PayoutSchedule.js +1 -1
  109. package/dist/react/components/SplitBreakdown.js +1 -1
  110. package/dist/react/components/StripeProvider.d.ts +1 -1
  111. package/dist/react/components/StripeProviderWithKey.d.ts +1 -1
  112. package/dist/react/hooks/useAccount.d.ts.map +1 -1
  113. package/dist/react/hooks/useAccountOnboarding.d.ts.map +1 -1
  114. package/dist/react/hooks/useCheckout.d.ts.map +1 -1
  115. package/dist/react/hooks/useDisputeWithCountdown.d.ts.map +1 -1
  116. package/dist/react/hooks/useDisputes.d.ts.map +1 -1
  117. package/dist/react/hooks/useEarnings.d.ts.map +1 -1
  118. package/dist/react/hooks/useInvoices.d.ts.map +1 -1
  119. package/dist/react/hooks/usePaymentMethodActions.js.map +1 -1
  120. package/dist/react/hooks/usePaymentMethods.d.ts.map +1 -1
  121. package/dist/react/hooks/usePrices.d.ts.map +1 -1
  122. package/dist/react/hooks/useProducts.d.ts.map +1 -1
  123. package/dist/react/hooks/useSplitBreakdown.d.ts.map +1 -1
  124. package/dist/react/hooks/useSubscription.d.ts.map +1 -1
  125. package/dist/react/hooks/useSubscriptions.d.ts.map +1 -1
  126. package/dist/react/lib/stripe-element-styles.d.ts.map +1 -1
  127. package/dist/react/lib/stripe-element-styles.js.map +1 -1
  128. package/package.json +25 -23
  129. package/src/client/billing/checkout.test.ts +62 -14
  130. package/src/client/billing/checkout.ts +26 -10
  131. package/src/client/billing/subscriptionRouting.ts +25 -0
  132. package/src/client/billing/subscriptions.test.ts +90 -28
  133. package/src/client/billing/subscriptions.ts +53 -18
  134. package/src/client/constants.ts +1 -1
  135. package/src/client/core/accountLinks.test.ts +20 -13
  136. package/src/client/core/accountLinks.ts +2 -10
  137. package/src/client/core/accountStatus.test.ts +67 -0
  138. package/src/client/core/accountStatus.ts +30 -13
  139. package/src/client/helpers.test.ts +2 -2
  140. package/src/client/index.ts +49 -44
  141. package/src/client/stripe-version.test.ts +47 -0
  142. package/src/client/types/documents.ts +1 -0
  143. package/src/client/types/events.ts +2 -1
  144. package/src/client/types/options.ts +7 -0
  145. package/src/client/webhooks/handler.ts +38 -1
  146. package/src/client/webhooks/hooks.ts +3 -0
  147. package/src/client/webhooks/processors.test.ts +201 -40
  148. package/src/client/webhooks/processors.ts +21 -17
  149. package/src/client/webhooks/retry.integration.test.ts +196 -0
  150. package/src/client/webhooks/v2.test.ts +36 -0
  151. package/src/client/webhooks/v2.ts +14 -4
  152. package/src/component/_generated/component.ts +15 -28
  153. package/src/component/_generated/server.ts +9 -2
  154. package/src/component/billing/mutations.ts +1 -0
  155. package/src/component/billing/validators.ts +1 -0
  156. package/src/component/config-queries.test.ts +8 -4
  157. package/src/component/connect/queries.ts +31 -66
  158. package/src/component/convex.config.ts +2 -1
  159. package/src/component/earnings-totals.test.ts +27 -1
  160. package/src/component/lib/fees.ts +1 -1
  161. package/src/react/components/EmbeddedCheckout.render.test.tsx +57 -0
  162. package/src/react/components/EmbeddedCheckout.tsx +1 -0
@@ -1,7 +1,7 @@
1
1
  import { type Infer } from "convex/values";
2
- export declare const paymentStatusValidator: import("convex/values").VUnion<"canceled" | "succeeded" | "failed" | "processing" | "requires_action", [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>;
2
+ export declare const paymentStatusValidator: 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>;
3
3
  export type PaymentStatus = Infer<typeof paymentStatusValidator>;
4
- export declare const payoutStatusValidator: import("convex/values").VUnion<"paid" | "canceled" | "failed" | "pending" | "in_transit", [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>;
4
+ export declare const payoutStatusValidator: 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>;
5
5
  export type PayoutStatus = Infer<typeof payoutStatusValidator>;
6
6
  /**
7
7
  * Field validators for the `payments` table.
@@ -13,10 +13,9 @@ export type PayoutStatus = Infer<typeof payoutStatusValidator>;
13
13
  * answer "is this payment still whole?" in a single document read. The
14
14
  * authoritative per-refund records live in the `refunds` table.
15
15
  */
16
- export declare const paymentRefundStatusValidator: import("convex/values").VUnion<"partially_refunded" | "fully_refunded", [import("convex/values").VLiteral<"partially_refunded", "required">, import("convex/values").VLiteral<"fully_refunded", "required">], "required", never>;
16
+ export declare const paymentRefundStatusValidator: import("convex/values").VUnion<"fully_refunded" | "partially_refunded", [import("convex/values").VLiteral<"partially_refunded", "required">, import("convex/values").VLiteral<"fully_refunded", "required">], "required", never>;
17
17
  export type PaymentRefundStatus = Infer<typeof paymentRefundStatusValidator>;
18
18
  export declare const paymentFields: {
19
- metadata: import("convex/values").VAny<any, "optional", string>;
20
19
  destinationAccountId: import("convex/values").VString<string | undefined, "optional">;
21
20
  applicationFeeAmount: import("convex/values").VFloat64<number | undefined, "optional">;
22
21
  applicationFeePercent: import("convex/values").VFloat64<number | undefined, "optional">;
@@ -24,59 +23,59 @@ export declare const paymentFields: {
24
23
  feeRefundedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
25
24
  chargeType: import("convex/values").VUnion<"destination" | "separate" | undefined, [import("convex/values").VLiteral<"destination", "required">, import("convex/values").VLiteral<"separate", "required">], "optional", never>;
26
25
  splitRecipients: import("convex/values").VArray<{
27
- percent?: number | undefined;
28
26
  amount?: number | undefined;
29
27
  destinationAccountId: string;
30
- role: "store" | "affiliate" | "other";
31
- }[] | undefined, import("convex/values").VObject<{
32
28
  percent?: number | undefined;
29
+ role: "affiliate" | "other" | "store";
30
+ }[] | undefined, import("convex/values").VObject<{
33
31
  amount?: number | undefined;
34
32
  destinationAccountId: string;
35
- role: "store" | "affiliate" | "other";
33
+ percent?: number | undefined;
34
+ role: "affiliate" | "other" | "store";
36
35
  }, {
37
36
  destinationAccountId: import("convex/values").VString<string, "required">;
38
- role: import("convex/values").VUnion<"store" | "affiliate" | "other", [import("convex/values").VLiteral<"store", "required">, import("convex/values").VLiteral<"affiliate", "required">, import("convex/values").VLiteral<"other", "required">], "required", never>;
37
+ 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>;
39
38
  amount: import("convex/values").VFloat64<number | undefined, "optional">;
40
39
  percent: import("convex/values").VFloat64<number | undefined, "optional">;
41
- }, "required", "destinationAccountId" | "percent" | "amount" | "role">, "optional">;
40
+ }, "required", "amount" | "destinationAccountId" | "percent" | "role">, "optional">;
42
41
  stripePaymentIntentId: import("convex/values").VString<string, "required">;
43
42
  userId: import("convex/values").VString<string, "required">;
44
43
  orgId: import("convex/values").VString<string | undefined, "optional">;
45
44
  accountId: import("convex/values").VString<string | undefined, "optional">;
46
45
  amount: import("convex/values").VFloat64<number, "required">;
47
46
  currency: import("convex/values").VString<string, "required">;
48
- status: import("convex/values").VUnion<"canceled" | "succeeded" | "failed" | "processing" | "requires_action", [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>;
47
+ 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>;
49
48
  refundedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
50
- refundStatus: import("convex/values").VUnion<"partially_refunded" | "fully_refunded" | undefined, [import("convex/values").VLiteral<"partially_refunded", "required">, import("convex/values").VLiteral<"fully_refunded", "required">], "optional", never>;
49
+ 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>;
50
+ metadata: import("convex/values").VAny<any, "optional", string>;
51
51
  };
52
52
  /** Full `payments` document, including system fields. */
53
53
  export declare const paymentDocValidator: import("convex/values").VObject<{
54
+ _creationTime: number;
55
+ _id: import("convex/values").GenericId<"payments">;
54
56
  accountId?: string | undefined;
57
+ amount: number;
55
58
  applicationFeeAmount?: number | undefined;
56
59
  applicationFeePercent?: number | undefined;
57
60
  chargeType?: "destination" | "separate" | undefined;
61
+ currency: string;
58
62
  destinationAccountId?: string | undefined;
59
63
  feeCollectedAmount?: number | undefined;
60
64
  feeRefundedAmount?: number | undefined;
61
65
  metadata?: any;
62
66
  orgId?: string | undefined;
67
+ refundStatus?: "fully_refunded" | "partially_refunded" | undefined;
68
+ refundedAmount?: number | undefined;
63
69
  splitRecipients?: {
64
- percent?: number | undefined;
65
70
  amount?: number | undefined;
66
71
  destinationAccountId: string;
67
- role: "store" | "affiliate" | "other";
72
+ percent?: number | undefined;
73
+ role: "affiliate" | "other" | "store";
68
74
  }[] | undefined;
69
- refundedAmount?: number | undefined;
70
- refundStatus?: "partially_refunded" | "fully_refunded" | undefined;
71
- currency: string;
72
- status: "canceled" | "succeeded" | "failed" | "processing" | "requires_action";
73
- userId: string;
74
- amount: number;
75
+ status: "canceled" | "failed" | "processing" | "requires_action" | "succeeded";
75
76
  stripePaymentIntentId: string;
76
- _id: import("convex/values").GenericId<"payments">;
77
- _creationTime: number;
77
+ userId: string;
78
78
  }, {
79
- metadata: import("convex/values").VAny<any, "optional", string>;
80
79
  destinationAccountId: import("convex/values").VString<string | undefined, "optional">;
81
80
  applicationFeeAmount: import("convex/values").VFloat64<number | undefined, "optional">;
82
81
  applicationFeePercent: import("convex/values").VFloat64<number | undefined, "optional">;
@@ -84,33 +83,34 @@ export declare const paymentDocValidator: import("convex/values").VObject<{
84
83
  feeRefundedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
85
84
  chargeType: import("convex/values").VUnion<"destination" | "separate" | undefined, [import("convex/values").VLiteral<"destination", "required">, import("convex/values").VLiteral<"separate", "required">], "optional", never>;
86
85
  splitRecipients: import("convex/values").VArray<{
87
- percent?: number | undefined;
88
86
  amount?: number | undefined;
89
87
  destinationAccountId: string;
90
- role: "store" | "affiliate" | "other";
91
- }[] | undefined, import("convex/values").VObject<{
92
88
  percent?: number | undefined;
89
+ role: "affiliate" | "other" | "store";
90
+ }[] | undefined, import("convex/values").VObject<{
93
91
  amount?: number | undefined;
94
92
  destinationAccountId: string;
95
- role: "store" | "affiliate" | "other";
93
+ percent?: number | undefined;
94
+ role: "affiliate" | "other" | "store";
96
95
  }, {
97
96
  destinationAccountId: import("convex/values").VString<string, "required">;
98
- role: import("convex/values").VUnion<"store" | "affiliate" | "other", [import("convex/values").VLiteral<"store", "required">, import("convex/values").VLiteral<"affiliate", "required">, import("convex/values").VLiteral<"other", "required">], "required", never>;
97
+ 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>;
99
98
  amount: import("convex/values").VFloat64<number | undefined, "optional">;
100
99
  percent: import("convex/values").VFloat64<number | undefined, "optional">;
101
- }, "required", "destinationAccountId" | "percent" | "amount" | "role">, "optional">;
100
+ }, "required", "amount" | "destinationAccountId" | "percent" | "role">, "optional">;
102
101
  stripePaymentIntentId: import("convex/values").VString<string, "required">;
103
102
  userId: import("convex/values").VString<string, "required">;
104
103
  orgId: import("convex/values").VString<string | undefined, "optional">;
105
104
  accountId: import("convex/values").VString<string | undefined, "optional">;
106
105
  amount: import("convex/values").VFloat64<number, "required">;
107
106
  currency: import("convex/values").VString<string, "required">;
108
- status: import("convex/values").VUnion<"canceled" | "succeeded" | "failed" | "processing" | "requires_action", [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>;
107
+ 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>;
109
108
  refundedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
110
- refundStatus: import("convex/values").VUnion<"partially_refunded" | "fully_refunded" | undefined, [import("convex/values").VLiteral<"partially_refunded", "required">, import("convex/values").VLiteral<"fully_refunded", "required">], "optional", never>;
109
+ 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>;
110
+ metadata: import("convex/values").VAny<any, "optional", string>;
111
111
  _id: import("convex/values").VId<import("convex/values").GenericId<"payments">, "required">;
112
112
  _creationTime: import("convex/values").VFloat64<number, "required">;
113
- }, "required", "accountId" | "applicationFeeAmount" | "applicationFeePercent" | "chargeType" | "currency" | "destinationAccountId" | "feeCollectedAmount" | "feeRefundedAmount" | "metadata" | "orgId" | "splitRecipients" | "status" | "userId" | "amount" | "stripePaymentIntentId" | "_id" | "_creationTime" | `metadata.${string}` | "refundedAmount" | "refundStatus">;
113
+ }, "required", "_creationTime" | "_id" | "accountId" | "amount" | "applicationFeeAmount" | "applicationFeePercent" | "chargeType" | "currency" | "destinationAccountId" | "feeCollectedAmount" | "feeRefundedAmount" | "metadata" | "orgId" | "refundStatus" | "refundedAmount" | "splitRecipients" | "status" | "stripePaymentIntentId" | "userId" | `metadata.${string}`>;
114
114
  /**
115
115
  * Field validators for the `payouts` table.
116
116
  * Shared between the schema definition and the doc validator so the
@@ -121,35 +121,35 @@ export declare const payoutFields: {
121
121
  accountId: import("convex/values").VString<string, "required">;
122
122
  amount: import("convex/values").VFloat64<number, "required">;
123
123
  currency: import("convex/values").VString<string, "required">;
124
- status: import("convex/values").VUnion<"paid" | "canceled" | "failed" | "pending" | "in_transit", [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>;
124
+ 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>;
125
125
  arrivalDate: import("convex/values").VString<string | undefined, "optional">;
126
126
  method: import("convex/values").VString<string | undefined, "optional">;
127
127
  metadata: import("convex/values").VAny<any, "optional", string>;
128
128
  };
129
129
  /** Full `payouts` document, including system fields. */
130
130
  export declare const payoutDocValidator: import("convex/values").VObject<{
131
- metadata?: any;
132
- arrivalDate?: string | undefined;
133
- method?: string | undefined;
131
+ _creationTime: number;
132
+ _id: import("convex/values").GenericId<"payouts">;
134
133
  accountId: string;
135
- currency: string;
136
- status: "paid" | "canceled" | "failed" | "pending" | "in_transit";
137
134
  amount: number;
135
+ arrivalDate?: string | undefined;
136
+ currency: string;
137
+ metadata?: any;
138
+ method?: string | undefined;
139
+ status: "canceled" | "failed" | "in_transit" | "paid" | "pending";
138
140
  stripePayoutId: string;
139
- _id: import("convex/values").GenericId<"payouts">;
140
- _creationTime: number;
141
141
  }, {
142
142
  stripePayoutId: import("convex/values").VString<string, "required">;
143
143
  accountId: import("convex/values").VString<string, "required">;
144
144
  amount: import("convex/values").VFloat64<number, "required">;
145
145
  currency: import("convex/values").VString<string, "required">;
146
- status: import("convex/values").VUnion<"paid" | "canceled" | "failed" | "pending" | "in_transit", [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>;
146
+ 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>;
147
147
  arrivalDate: import("convex/values").VString<string | undefined, "optional">;
148
148
  method: import("convex/values").VString<string | undefined, "optional">;
149
149
  metadata: import("convex/values").VAny<any, "optional", string>;
150
150
  _id: import("convex/values").VId<import("convex/values").GenericId<"payouts">, "required">;
151
151
  _creationTime: import("convex/values").VFloat64<number, "required">;
152
- }, "required", "accountId" | "currency" | "metadata" | "status" | "amount" | "arrivalDate" | "method" | "stripePayoutId" | "_id" | "_creationTime" | `metadata.${string}`>;
152
+ }, "required", "_creationTime" | "_id" | "accountId" | "amount" | "arrivalDate" | "currency" | "metadata" | "method" | "status" | "stripePayoutId" | `metadata.${string}`>;
153
153
  /**
154
154
  * Fields for the `pendingFeeRefunds` table: a fee-refund fact parked when
155
155
  * `application_fee.refunded` arrives before its `payments` row exists (Stripe
@@ -166,10 +166,10 @@ export declare const pendingFeeRefundFields: {
166
166
  * enumerate from the documented values (`Refunds.d.ts`):
167
167
  * `pending | requires_action | succeeded | failed | canceled`.
168
168
  */
169
- export declare const refundStatusValidator: import("convex/values").VUnion<"canceled" | "succeeded" | "failed" | "requires_action" | "pending", [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>;
169
+ export declare const refundStatusValidator: 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>;
170
170
  export type RefundStatus = Infer<typeof refundStatusValidator>;
171
171
  /** Refund reason — from the `Refund.Reason` SDK type alias. */
172
- export declare const refundReasonValidator: import("convex/values").VUnion<"duplicate" | "fraudulent" | "requested_by_customer" | "expired_uncaptured_charge", [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">], "required", never>;
172
+ export declare const refundReasonValidator: import("convex/values").VUnion<"duplicate" | "expired_uncaptured_charge" | "fraudulent" | "requested_by_customer", [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">], "required", never>;
173
173
  export type RefundReason = Infer<typeof refundReasonValidator>;
174
174
  /**
175
175
  * Field validators for the `refunds` table.
@@ -183,25 +183,25 @@ export declare const refundFields: {
183
183
  accountId: import("convex/values").VString<string | undefined, "optional">;
184
184
  amount: import("convex/values").VFloat64<number, "required">;
185
185
  currency: import("convex/values").VString<string, "required">;
186
- status: import("convex/values").VUnion<"canceled" | "succeeded" | "failed" | "requires_action" | "pending", [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>;
187
- reason: import("convex/values").VUnion<"duplicate" | "fraudulent" | "requested_by_customer" | "expired_uncaptured_charge" | 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>;
186
+ 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>;
187
+ 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>;
188
188
  failureReason: import("convex/values").VString<string | undefined, "optional">;
189
189
  metadata: import("convex/values").VAny<any, "optional", string>;
190
190
  };
191
191
  /** Full `refunds` document, including system fields. */
192
192
  export declare const refundDocValidator: import("convex/values").VObject<{
193
+ _creationTime: number;
194
+ _id: import("convex/values").GenericId<"refunds">;
193
195
  accountId?: string | undefined;
196
+ amount: number;
197
+ currency: string;
198
+ failureReason?: string | undefined;
194
199
  metadata?: any;
195
- stripePaymentIntentId?: string | undefined;
196
- reason?: "duplicate" | "fraudulent" | "requested_by_customer" | "expired_uncaptured_charge" | undefined;
200
+ reason?: "duplicate" | "expired_uncaptured_charge" | "fraudulent" | "requested_by_customer" | undefined;
201
+ status: "canceled" | "failed" | "pending" | "requires_action" | "succeeded";
197
202
  stripeChargeId?: string | undefined;
198
- failureReason?: string | undefined;
199
- currency: string;
200
- status: "canceled" | "succeeded" | "failed" | "requires_action" | "pending";
201
- amount: number;
203
+ stripePaymentIntentId?: string | undefined;
202
204
  stripeRefundId: string;
203
- _id: import("convex/values").GenericId<"refunds">;
204
- _creationTime: number;
205
205
  }, {
206
206
  stripeRefundId: import("convex/values").VString<string, "required">;
207
207
  stripePaymentIntentId: import("convex/values").VString<string | undefined, "optional">;
@@ -209,15 +209,15 @@ export declare const refundDocValidator: import("convex/values").VObject<{
209
209
  accountId: import("convex/values").VString<string | undefined, "optional">;
210
210
  amount: import("convex/values").VFloat64<number, "required">;
211
211
  currency: import("convex/values").VString<string, "required">;
212
- status: import("convex/values").VUnion<"canceled" | "succeeded" | "failed" | "requires_action" | "pending", [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>;
213
- reason: import("convex/values").VUnion<"duplicate" | "fraudulent" | "requested_by_customer" | "expired_uncaptured_charge" | 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>;
212
+ 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>;
213
+ 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>;
214
214
  failureReason: import("convex/values").VString<string | undefined, "optional">;
215
215
  metadata: import("convex/values").VAny<any, "optional", string>;
216
216
  _id: import("convex/values").VId<import("convex/values").GenericId<"refunds">, "required">;
217
217
  _creationTime: import("convex/values").VFloat64<number, "required">;
218
- }, "required", "accountId" | "currency" | "metadata" | "status" | "amount" | "stripePaymentIntentId" | "reason" | "stripeChargeId" | "failureReason" | "stripeRefundId" | "_id" | "_creationTime" | `metadata.${string}`>;
218
+ }, "required", "_creationTime" | "_id" | "accountId" | "amount" | "currency" | "failureReason" | "metadata" | "reason" | "status" | "stripeChargeId" | "stripePaymentIntentId" | "stripeRefundId" | `metadata.${string}`>;
219
219
  /** Dispute status — from the `Dispute.Status` SDK type alias. */
220
- export declare const disputeStatusValidator: import("convex/values").VUnion<"warning_needs_response" | "warning_under_review" | "warning_closed" | "needs_response" | "under_review" | "won" | "lost" | "prevented", [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>;
220
+ export declare const disputeStatusValidator: 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>;
221
221
  export type DisputeStatus = Infer<typeof disputeStatusValidator>;
222
222
  /**
223
223
  * Field validators for the `disputes` table.
@@ -231,7 +231,7 @@ export declare const disputeFields: {
231
231
  accountId: import("convex/values").VString<string | undefined, "optional">;
232
232
  amount: import("convex/values").VFloat64<number, "required">;
233
233
  currency: import("convex/values").VString<string, "required">;
234
- status: import("convex/values").VUnion<"warning_needs_response" | "warning_under_review" | "warning_closed" | "needs_response" | "under_review" | "won" | "lost" | "prevented", [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>;
234
+ 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>;
235
235
  reason: import("convex/values").VString<string, "required">;
236
236
  isChargeRefundable: import("convex/values").VBoolean<boolean, "required">;
237
237
  lastEvent: import("convex/values").VString<string | undefined, "optional">;
@@ -243,23 +243,23 @@ export declare const disputeFields: {
243
243
  };
244
244
  /** Full `disputes` document, including system fields. */
245
245
  export declare const disputeDocValidator: import("convex/values").VObject<{
246
+ _creationTime: number;
247
+ _id: import("convex/values").GenericId<"disputes">;
246
248
  accountId?: string | undefined;
247
- metadata?: any;
248
- stripePaymentIntentId?: string | undefined;
249
+ amount: number;
250
+ currency: string;
249
251
  evidence?: any;
250
252
  evidenceDueBy?: string | undefined;
253
+ isChargeRefundable: boolean;
251
254
  lastEvent?: string | undefined;
252
255
  linkedTransferIds?: string[] | undefined;
256
+ metadata?: any;
257
+ reason: string;
253
258
  statementDescriptor?: string | undefined;
259
+ status: "lost" | "needs_response" | "prevented" | "under_review" | "warning_closed" | "warning_needs_response" | "warning_under_review" | "won";
254
260
  stripeChargeId?: string | undefined;
255
- currency: string;
256
- status: "warning_needs_response" | "warning_under_review" | "warning_closed" | "needs_response" | "under_review" | "won" | "lost" | "prevented";
257
- amount: number;
258
- isChargeRefundable: boolean;
259
- reason: string;
260
261
  stripeDisputeId: string;
261
- _id: import("convex/values").GenericId<"disputes">;
262
- _creationTime: number;
262
+ stripePaymentIntentId?: string | undefined;
263
263
  }, {
264
264
  stripeDisputeId: import("convex/values").VString<string, "required">;
265
265
  stripePaymentIntentId: import("convex/values").VString<string | undefined, "optional">;
@@ -267,7 +267,7 @@ export declare const disputeDocValidator: import("convex/values").VObject<{
267
267
  accountId: import("convex/values").VString<string | undefined, "optional">;
268
268
  amount: import("convex/values").VFloat64<number, "required">;
269
269
  currency: import("convex/values").VString<string, "required">;
270
- status: import("convex/values").VUnion<"warning_needs_response" | "warning_under_review" | "warning_closed" | "needs_response" | "under_review" | "won" | "lost" | "prevented", [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>;
270
+ 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>;
271
271
  reason: import("convex/values").VString<string, "required">;
272
272
  isChargeRefundable: import("convex/values").VBoolean<boolean, "required">;
273
273
  lastEvent: import("convex/values").VString<string | undefined, "optional">;
@@ -278,15 +278,15 @@ export declare const disputeDocValidator: import("convex/values").VObject<{
278
278
  metadata: import("convex/values").VAny<any, "optional", string>;
279
279
  _id: import("convex/values").VId<import("convex/values").GenericId<"disputes">, "required">;
280
280
  _creationTime: import("convex/values").VFloat64<number, "required">;
281
- }, "required", "accountId" | "currency" | "metadata" | "status" | "amount" | "stripePaymentIntentId" | "evidence" | "evidenceDueBy" | "isChargeRefundable" | "lastEvent" | "linkedTransferIds" | "reason" | "statementDescriptor" | "stripeChargeId" | "stripeDisputeId" | "_id" | "_creationTime" | `metadata.${string}` | `evidence.${string}`>;
281
+ }, "required", "_creationTime" | "_id" | "accountId" | "amount" | "currency" | "evidence" | "evidenceDueBy" | "isChargeRefundable" | "lastEvent" | "linkedTransferIds" | "metadata" | "reason" | "statementDescriptor" | "status" | "stripeChargeId" | "stripeDisputeId" | "stripePaymentIntentId" | `evidence.${string}` | `metadata.${string}`>;
282
282
  /**
283
283
  * Lifecycle of a single `Transfer` (separate charges & transfers). Stripe
284
284
  * transfers settle immediately, so the interesting state is reversal.
285
285
  */
286
- export declare const transferStatusValidator: import("convex/values").VUnion<"paid" | "failed" | "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>;
286
+ export declare const transferStatusValidator: 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>;
287
287
  export type TransferStatus = Infer<typeof transferStatusValidator>;
288
288
  /** Denormalized reversal state, mirroring the payment refund-status pattern. */
289
- export declare const transferReversalStatusValidator: import("convex/values").VUnion<"partially_reversed" | "fully_reversed", [import("convex/values").VLiteral<"partially_reversed", "required">, import("convex/values").VLiteral<"fully_reversed", "required">], "required", never>;
289
+ export declare const transferReversalStatusValidator: import("convex/values").VUnion<"fully_reversed" | "partially_reversed", [import("convex/values").VLiteral<"partially_reversed", "required">, import("convex/values").VLiteral<"fully_reversed", "required">], "required", never>;
290
290
  export type TransferReversalStatus = Infer<typeof transferReversalStatusValidator>;
291
291
  /**
292
292
  * Field validators for the `transfers` ledger table. One row per Stripe
@@ -299,10 +299,10 @@ export declare const transferFields: {
299
299
  destinationAccountId: import("convex/values").VString<string, "required">;
300
300
  amount: import("convex/values").VFloat64<number, "required">;
301
301
  currency: import("convex/values").VString<string, "required">;
302
- role: import("convex/values").VUnion<"store" | "affiliate" | "other" | undefined, [import("convex/values").VLiteral<"store", "required">, import("convex/values").VLiteral<"affiliate", "required">, import("convex/values").VLiteral<"other", "required">], "optional", never>;
303
- status: import("convex/values").VUnion<"paid" | "failed" | "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>;
302
+ 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>;
303
+ 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>;
304
304
  reversedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
305
- reversalStatus: import("convex/values").VUnion<"partially_reversed" | "fully_reversed" | undefined, [import("convex/values").VLiteral<"partially_reversed", "required">, import("convex/values").VLiteral<"fully_reversed", "required">], "optional", never>;
305
+ 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>;
306
306
  paymentId: import("convex/values").VString<string | undefined, "optional">;
307
307
  reinstatement: import("convex/values").VBoolean<boolean | undefined, "optional">;
308
308
  metadata: import("convex/values").VAny<any, "optional", string>;
@@ -323,56 +323,56 @@ export declare const transferPersistedFields: {
323
323
  };
324
324
  /** Full `transfers` document, including system fields. */
325
325
  export declare const transferDocValidator: import("convex/values").VObject<{
326
+ _creationTime: number;
327
+ _id: import("convex/values").GenericId<"transfers">;
328
+ amount: number;
329
+ currency: string;
330
+ destinationAccountId: string;
326
331
  metadata?: any;
327
- sourceChargeId?: string | undefined;
328
- reversedAmount?: number | undefined;
329
332
  paymentId?: string | undefined;
330
333
  reinstatement?: boolean | undefined;
331
- reversalStatus?: "partially_reversed" | "fully_reversed" | undefined;
332
- role?: "store" | "affiliate" | "other" | undefined;
333
- sourceInvoiceId?: string | undefined;
334
334
  reversalClaimedAmount?: number | undefined;
335
- currency: string;
336
- destinationAccountId: string;
337
- status: "paid" | "failed" | "pending" | "reversed";
338
- amount: number;
335
+ reversalStatus?: "fully_reversed" | "partially_reversed" | undefined;
336
+ reversedAmount?: number | undefined;
337
+ role?: "affiliate" | "other" | "store" | undefined;
338
+ sourceChargeId?: string | undefined;
339
+ sourceInvoiceId?: string | undefined;
340
+ status: "failed" | "paid" | "pending" | "reversed";
339
341
  stripeTransferId: string;
340
- _id: import("convex/values").GenericId<"transfers">;
341
- _creationTime: number;
342
342
  }, {
343
- /**
344
- * Reversal claim frontier (BTS-63): the highest cumulative reversal amount
345
- * reserved by `claimReversalSlices` before money moves. Always ≥
346
- * `reversedAmount` while a claimed slice is unexecuted; equal once
347
- * confirmed. Only the claim mutation writes it.
348
- */
349
- reversalClaimedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
350
343
  stripeTransferId: import("convex/values").VString<string, "required">;
351
344
  sourceChargeId: import("convex/values").VString<string | undefined, "optional">;
352
345
  sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
353
346
  destinationAccountId: import("convex/values").VString<string, "required">;
354
347
  amount: import("convex/values").VFloat64<number, "required">;
355
348
  currency: import("convex/values").VString<string, "required">;
356
- role: import("convex/values").VUnion<"store" | "affiliate" | "other" | undefined, [import("convex/values").VLiteral<"store", "required">, import("convex/values").VLiteral<"affiliate", "required">, import("convex/values").VLiteral<"other", "required">], "optional", never>;
357
- status: import("convex/values").VUnion<"paid" | "failed" | "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>;
349
+ 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>;
350
+ 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>;
358
351
  reversedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
359
- reversalStatus: import("convex/values").VUnion<"partially_reversed" | "fully_reversed" | undefined, [import("convex/values").VLiteral<"partially_reversed", "required">, import("convex/values").VLiteral<"fully_reversed", "required">], "optional", never>;
352
+ 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>;
360
353
  paymentId: import("convex/values").VString<string | undefined, "optional">;
361
354
  reinstatement: import("convex/values").VBoolean<boolean | undefined, "optional">;
362
355
  metadata: import("convex/values").VAny<any, "optional", string>;
356
+ /**
357
+ * Reversal claim frontier (BTS-63): the highest cumulative reversal amount
358
+ * reserved by `claimReversalSlices` before money moves. Always ≥
359
+ * `reversedAmount` while a claimed slice is unexecuted; equal once
360
+ * confirmed. Only the claim mutation writes it.
361
+ */
362
+ reversalClaimedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
363
363
  _id: import("convex/values").VId<import("convex/values").GenericId<"transfers">, "required">;
364
364
  _creationTime: import("convex/values").VFloat64<number, "required">;
365
- }, "required", "currency" | "destinationAccountId" | "metadata" | "status" | "amount" | "sourceChargeId" | "reversedAmount" | "stripeTransferId" | "paymentId" | "reinstatement" | "reversalStatus" | "role" | "sourceInvoiceId" | "_id" | "_creationTime" | `metadata.${string}` | "reversalClaimedAmount">;
365
+ }, "required", "_creationTime" | "_id" | "amount" | "currency" | "destinationAccountId" | "metadata" | "paymentId" | "reinstatement" | "reversalClaimedAmount" | "reversalStatus" | "reversedAmount" | "role" | "sourceChargeId" | "sourceInvoiceId" | "status" | "stripeTransferId" | `metadata.${string}`>;
366
366
  /** One claimed reversal slice: [from, to) on the cumulative reversed axis. */
367
367
  export declare const reversalSliceValidator: import("convex/values").VObject<{
368
- stripeTransferId: string;
369
368
  from: number;
369
+ stripeTransferId: string;
370
370
  to: number;
371
371
  }, {
372
372
  stripeTransferId: import("convex/values").VString<string, "required">;
373
373
  from: import("convex/values").VFloat64<number, "required">;
374
374
  to: import("convex/values").VFloat64<number, "required">;
375
- }, "required", "stripeTransferId" | "from" | "to">;
375
+ }, "required", "from" | "stripeTransferId" | "to">;
376
376
  /**
377
377
  * A reversal operation's claim record (BTS-63): the slices a dispute/refund
378
378
  * operation reserved, written atomically the first time it claims. Retries
@@ -384,49 +384,49 @@ export declare const transferReversalOpFields: {
384
384
  operationId: import("convex/values").VString<string, "required">;
385
385
  sourceChargeId: import("convex/values").VString<string, "required">;
386
386
  slices: import("convex/values").VArray<{
387
- stripeTransferId: string;
388
387
  from: number;
388
+ stripeTransferId: string;
389
389
  to: number;
390
390
  }[], import("convex/values").VObject<{
391
- stripeTransferId: string;
392
391
  from: number;
392
+ stripeTransferId: string;
393
393
  to: number;
394
394
  }, {
395
395
  stripeTransferId: import("convex/values").VString<string, "required">;
396
396
  from: import("convex/values").VFloat64<number, "required">;
397
397
  to: import("convex/values").VFloat64<number, "required">;
398
- }, "required", "stripeTransferId" | "from" | "to">, "required">;
398
+ }, "required", "from" | "stripeTransferId" | "to">, "required">;
399
399
  };
400
400
  /** Full `transferReversalOps` document, including system fields. */
401
401
  export declare const transferReversalOpDocValidator: import("convex/values").VObject<{
402
- operationId: string;
403
- sourceChargeId: string;
404
- _id: import("convex/values").GenericId<"transferReversalOps">;
405
402
  _creationTime: number;
403
+ _id: import("convex/values").GenericId<"transferReversalOps">;
404
+ operationId: string;
406
405
  slices: {
407
- stripeTransferId: string;
408
406
  from: number;
407
+ stripeTransferId: string;
409
408
  to: number;
410
409
  }[];
410
+ sourceChargeId: string;
411
411
  }, {
412
412
  operationId: import("convex/values").VString<string, "required">;
413
413
  sourceChargeId: import("convex/values").VString<string, "required">;
414
414
  slices: import("convex/values").VArray<{
415
- stripeTransferId: string;
416
415
  from: number;
416
+ stripeTransferId: string;
417
417
  to: number;
418
418
  }[], import("convex/values").VObject<{
419
- stripeTransferId: string;
420
419
  from: number;
420
+ stripeTransferId: string;
421
421
  to: number;
422
422
  }, {
423
423
  stripeTransferId: import("convex/values").VString<string, "required">;
424
424
  from: import("convex/values").VFloat64<number, "required">;
425
425
  to: import("convex/values").VFloat64<number, "required">;
426
- }, "required", "stripeTransferId" | "from" | "to">, "required">;
426
+ }, "required", "from" | "stripeTransferId" | "to">, "required">;
427
427
  _id: import("convex/values").VId<import("convex/values").GenericId<"transferReversalOps">, "required">;
428
428
  _creationTime: import("convex/values").VFloat64<number, "required">;
429
- }, "required", "operationId" | "sourceChargeId" | "_id" | "_creationTime" | "slices">;
429
+ }, "required", "_creationTime" | "_id" | "operationId" | "slices" | "sourceChargeId">;
430
430
  /**
431
431
  * A leg whose reversal claim is "wedged" (BTS-74): its claim frontier
432
432
  * (`reversalClaimedAmount`) sits ahead of the confirmed `reversedAmount`
@@ -434,16 +434,16 @@ export declare const transferReversalOpDocValidator: import("convex/values").VOb
434
434
  * ops diagnostic so a wedged leg's remaining reversal capacity can be reclaimed.
435
435
  */
436
436
  export declare const wedgedReversalClaimValidator: import("convex/values").VObject<{
437
- sourceChargeId?: string | undefined;
438
437
  amount: number;
439
- reversedAmount: number;
440
- stripeTransferId: string;
441
- reversalClaimedAmount: number;
442
438
  blockingOps: {
443
- operationId: string;
444
439
  from: number;
440
+ operationId: string;
445
441
  to: number;
446
442
  }[];
443
+ reversalClaimedAmount: number;
444
+ reversedAmount: number;
445
+ sourceChargeId?: string | undefined;
446
+ stripeTransferId: string;
447
447
  }, {
448
448
  stripeTransferId: import("convex/values").VString<string, "required">;
449
449
  sourceChargeId: import("convex/values").VString<string | undefined, "optional">;
@@ -452,17 +452,17 @@ export declare const wedgedReversalClaimValidator: import("convex/values").VObje
452
452
  reversalClaimedAmount: import("convex/values").VFloat64<number, "required">;
453
453
  /** The recorded ops with an unexecuted slice on this leg (the blockers). */
454
454
  blockingOps: import("convex/values").VArray<{
455
- operationId: string;
456
455
  from: number;
456
+ operationId: string;
457
457
  to: number;
458
458
  }[], import("convex/values").VObject<{
459
- operationId: string;
460
459
  from: number;
460
+ operationId: string;
461
461
  to: number;
462
462
  }, {
463
463
  operationId: import("convex/values").VString<string, "required">;
464
464
  from: import("convex/values").VFloat64<number, "required">;
465
465
  to: import("convex/values").VFloat64<number, "required">;
466
- }, "required", "operationId" | "from" | "to">, "required">;
467
- }, "required", "amount" | "sourceChargeId" | "reversedAmount" | "stripeTransferId" | "reversalClaimedAmount" | "blockingOps">;
466
+ }, "required", "from" | "operationId" | "to">, "required">;
467
+ }, "required", "amount" | "blockingOps" | "reversalClaimedAmount" | "reversedAmount" | "sourceChargeId" | "stripeTransferId">;
468
468
  //# sourceMappingURL=validators.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../../src/component/connect/validators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAK,MAAM,eAAe,CAAC;AAI9C,eAAO,MAAM,sBAAsB,uaAMlC,CAAC;AACF,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEjE,eAAO,MAAM,qBAAqB,6YAMjC,CAAC;AACF,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,OA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