@fantastic.dev/better-stripe 0.34.0 → 0.37.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 (308) hide show
  1. package/CHANGELOG.md +260 -0
  2. package/README.md +1 -1
  3. package/dist/client/connect/payoutAdoptionTestHelpers.d.ts +664 -2
  4. package/dist/client/connect/payoutAdoptionTestHelpers.d.ts.map +1 -1
  5. package/dist/client/connect/payoutExecutionTestHelpers.d.ts +332 -1
  6. package/dist/client/connect/payoutExecutionTestHelpers.d.ts.map +1 -1
  7. package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts +664 -2
  8. package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts.map +1 -1
  9. package/dist/client/connect/payoutSyncTestHelpers.d.ts +332 -1
  10. package/dist/client/connect/payoutSyncTestHelpers.d.ts.map +1 -1
  11. package/dist/client/connect/refundCommandEvidence.d.ts +14 -0
  12. package/dist/client/connect/refundCommandEvidence.d.ts.map +1 -0
  13. package/dist/client/connect/refundCommandEvidence.js +20 -0
  14. package/dist/client/connect/refundCommandEvidence.js.map +1 -0
  15. package/dist/client/connect/refundCommandNormalization.d.ts +11 -0
  16. package/dist/client/connect/refundCommandNormalization.d.ts.map +1 -0
  17. package/dist/client/connect/refundCommandNormalization.js +12 -0
  18. package/dist/client/connect/refundCommandNormalization.js.map +1 -0
  19. package/dist/client/financialObservations.d.ts +42 -0
  20. package/dist/client/financialObservations.d.ts.map +1 -0
  21. package/dist/client/financialObservations.js +58 -0
  22. package/dist/client/financialObservations.js.map +1 -0
  23. package/dist/client/financialOwnership.d.ts +52 -0
  24. package/dist/client/financialOwnership.d.ts.map +1 -0
  25. package/dist/client/financialOwnership.js +72 -0
  26. package/dist/client/financialOwnership.js.map +1 -0
  27. package/dist/client/index.d.ts +2 -2
  28. package/dist/client/index.d.ts.map +1 -1
  29. package/dist/client/index.js +2 -2
  30. package/dist/client/index.js.map +1 -1
  31. package/dist/client/observationPagination.d.ts +10 -0
  32. package/dist/client/observationPagination.d.ts.map +1 -0
  33. package/dist/client/observationPagination.js +12 -0
  34. package/dist/client/observationPagination.js.map +1 -0
  35. package/dist/client/operationEvidence.d.ts +37 -0
  36. package/dist/client/operationEvidence.d.ts.map +1 -0
  37. package/dist/client/operationEvidence.js +44 -0
  38. package/dist/client/operationEvidence.js.map +1 -0
  39. package/dist/client/publicTypes.d.ts +6 -0
  40. package/dist/client/publicTypes.d.ts.map +1 -1
  41. package/dist/client/readContracts.d.ts +31 -0
  42. package/dist/client/readContracts.d.ts.map +1 -1
  43. package/dist/client/readContracts.js +14 -0
  44. package/dist/client/readContracts.js.map +1 -1
  45. package/dist/client/transferObservations.d.ts +59 -0
  46. package/dist/client/transferObservations.d.ts.map +1 -0
  47. package/dist/client/transferObservations.js +82 -0
  48. package/dist/client/transferObservations.js.map +1 -0
  49. package/dist/component/_generated/component.d.ts +687 -0
  50. package/dist/component/_generated/component.d.ts.map +1 -1
  51. package/dist/component/affiliateRecovery/mutations.d.ts.map +1 -1
  52. package/dist/component/affiliateRecovery/mutations.js +4 -1
  53. package/dist/component/affiliateRecovery/mutations.js.map +1 -1
  54. package/dist/component/connect/mutations.d.ts.map +1 -1
  55. package/dist/component/connect/mutations.js +18 -2
  56. package/dist/component/connect/mutations.js.map +1 -1
  57. package/dist/component/connect/queries.d.ts +8 -0
  58. package/dist/component/connect/queries.d.ts.map +1 -1
  59. package/dist/component/connect/reversalClaims.d.ts.map +1 -1
  60. package/dist/component/connect/reversalClaims.js +7 -1
  61. package/dist/component/connect/reversalClaims.js.map +1 -1
  62. package/dist/component/connect/reversalReceipts.d.ts.map +1 -1
  63. package/dist/component/connect/reversalReceipts.js +2 -0
  64. package/dist/component/connect/reversalReceipts.js.map +1 -1
  65. package/dist/component/connect/schema.d.ts +11 -1
  66. package/dist/component/connect/schema.d.ts.map +1 -1
  67. package/dist/component/connect/schema.js +9 -1
  68. package/dist/component/connect/schema.js.map +1 -1
  69. package/dist/component/connect/validators.d.ts +9 -1
  70. package/dist/component/connect/validators.d.ts.map +1 -1
  71. package/dist/component/connect/validators.js +2 -0
  72. package/dist/component/connect/validators.js.map +1 -1
  73. package/dist/component/earnings/pairedAdjustment.d.ts +12 -0
  74. package/dist/component/earnings/pairedAdjustment.d.ts.map +1 -0
  75. package/dist/component/earnings/pairedAdjustment.js +46 -0
  76. package/dist/component/earnings/pairedAdjustment.js.map +1 -0
  77. package/dist/component/earnings/triggers.d.ts +546 -2
  78. package/dist/component/earnings/triggers.d.ts.map +1 -1
  79. package/dist/component/earnings/triggers.js +17 -3
  80. package/dist/component/earnings/triggers.js.map +1 -1
  81. package/dist/component/financialObservations/continuation.d.ts +7 -0
  82. package/dist/component/financialObservations/continuation.d.ts.map +1 -0
  83. package/dist/component/financialObservations/continuation.js +131 -0
  84. package/dist/component/financialObservations/continuation.js.map +1 -0
  85. package/dist/component/financialObservations/generations.d.ts +6 -0
  86. package/dist/component/financialObservations/generations.d.ts.map +1 -0
  87. package/dist/component/financialObservations/generations.js +46 -0
  88. package/dist/component/financialObservations/generations.js.map +1 -0
  89. package/dist/component/financialObservations/mutations.d.ts +62 -0
  90. package/dist/component/financialObservations/mutations.d.ts.map +1 -0
  91. package/dist/component/financialObservations/mutations.js +69 -0
  92. package/dist/component/financialObservations/mutations.js.map +1 -0
  93. package/dist/component/financialObservations/queries.d.ts +307 -0
  94. package/dist/component/financialObservations/queries.d.ts.map +1 -0
  95. package/dist/component/financialObservations/queries.js +219 -0
  96. package/dist/component/financialObservations/queries.js.map +1 -0
  97. package/dist/component/financialObservations/schema.d.ts +182 -0
  98. package/dist/component/financialObservations/schema.d.ts.map +1 -0
  99. package/dist/component/financialObservations/schema.js +53 -0
  100. package/dist/component/financialObservations/schema.js.map +1 -0
  101. package/dist/component/financialObservations/settlement.d.ts +7 -0
  102. package/dist/component/financialObservations/settlement.d.ts.map +1 -0
  103. package/dist/component/financialObservations/settlement.js +118 -0
  104. package/dist/component/financialObservations/settlement.js.map +1 -0
  105. package/dist/component/financialObservations/settlementHelpers.d.ts +46 -0
  106. package/dist/component/financialObservations/settlementHelpers.d.ts.map +1 -0
  107. package/dist/component/financialObservations/settlementHelpers.js +70 -0
  108. package/dist/component/financialObservations/settlementHelpers.js.map +1 -0
  109. package/dist/component/financialObservations/transferBatches.d.ts +12 -0
  110. package/dist/component/financialObservations/transferBatches.d.ts.map +1 -0
  111. package/dist/component/financialObservations/transferBatches.js +76 -0
  112. package/dist/component/financialObservations/transferBatches.js.map +1 -0
  113. package/dist/component/financialObservations/transferContinuation.d.ts +5 -0
  114. package/dist/component/financialObservations/transferContinuation.d.ts.map +1 -0
  115. package/dist/component/financialObservations/transferContinuation.js +35 -0
  116. package/dist/component/financialObservations/transferContinuation.js.map +1 -0
  117. package/dist/component/financialObservations/transferContinuationState.d.ts +8 -0
  118. package/dist/component/financialObservations/transferContinuationState.d.ts.map +1 -0
  119. package/dist/component/financialObservations/transferContinuationState.js +69 -0
  120. package/dist/component/financialObservations/transferContinuationState.js.map +1 -0
  121. package/dist/component/financialObservations/transferContinuationSteps.d.ts +5 -0
  122. package/dist/component/financialObservations/transferContinuationSteps.d.ts.map +1 -0
  123. package/dist/component/financialObservations/transferContinuationSteps.js +174 -0
  124. package/dist/component/financialObservations/transferContinuationSteps.js.map +1 -0
  125. package/dist/component/financialObservations/transferHelpers.d.ts +18 -0
  126. package/dist/component/financialObservations/transferHelpers.d.ts.map +1 -0
  127. package/dist/component/financialObservations/transferHelpers.js +37 -0
  128. package/dist/component/financialObservations/transferHelpers.js.map +1 -0
  129. package/dist/component/financialObservations/transferReferenceSchema.d.ts +56 -0
  130. package/dist/component/financialObservations/transferReferenceSchema.d.ts.map +1 -0
  131. package/dist/component/financialObservations/transferReferenceSchema.js +21 -0
  132. package/dist/component/financialObservations/transferReferenceSchema.js.map +1 -0
  133. package/dist/component/financialObservations/transferSchema.d.ts +237 -0
  134. package/dist/component/financialObservations/transferSchema.d.ts.map +1 -0
  135. package/dist/component/financialObservations/transferSchema.js +65 -0
  136. package/dist/component/financialObservations/transferSchema.js.map +1 -0
  137. package/dist/component/financialObservations/transfers.d.ts +7 -0
  138. package/dist/component/financialObservations/transfers.d.ts.map +1 -0
  139. package/dist/component/financialObservations/transfers.js +79 -0
  140. package/dist/component/financialObservations/transfers.js.map +1 -0
  141. package/dist/component/financialOwnership/helpers.d.ts +37 -0
  142. package/dist/component/financialOwnership/helpers.d.ts.map +1 -0
  143. package/dist/component/financialOwnership/helpers.js +76 -0
  144. package/dist/component/financialOwnership/helpers.js.map +1 -0
  145. package/dist/component/financialOwnership/mutations.d.ts +28 -0
  146. package/dist/component/financialOwnership/mutations.d.ts.map +1 -0
  147. package/dist/component/financialOwnership/mutations.js +74 -0
  148. package/dist/component/financialOwnership/mutations.js.map +1 -0
  149. package/dist/component/financialOwnership/queries.d.ts +57 -0
  150. package/dist/component/financialOwnership/queries.d.ts.map +1 -0
  151. package/dist/component/financialOwnership/queries.js +50 -0
  152. package/dist/component/financialOwnership/queries.js.map +1 -0
  153. package/dist/component/financialOwnership/schema.d.ts +140 -0
  154. package/dist/component/financialOwnership/schema.d.ts.map +1 -0
  155. package/dist/component/financialOwnership/schema.js +35 -0
  156. package/dist/component/financialOwnership/schema.js.map +1 -0
  157. package/dist/component/operationEvidence/canonical.d.ts +4 -0
  158. package/dist/component/operationEvidence/canonical.d.ts.map +1 -0
  159. package/dist/component/operationEvidence/canonical.js +8 -0
  160. package/dist/component/operationEvidence/canonical.js.map +1 -0
  161. package/dist/component/operationEvidence/helpers.d.ts +87 -0
  162. package/dist/component/operationEvidence/helpers.d.ts.map +1 -0
  163. package/dist/component/operationEvidence/helpers.js +49 -0
  164. package/dist/component/operationEvidence/helpers.js.map +1 -0
  165. package/dist/component/operationEvidence/maintenance.d.ts +88 -0
  166. package/dist/component/operationEvidence/maintenance.d.ts.map +1 -0
  167. package/dist/component/operationEvidence/maintenance.js +59 -0
  168. package/dist/component/operationEvidence/maintenance.js.map +1 -0
  169. package/dist/component/operationEvidence/mutations.d.ts +97 -0
  170. package/dist/component/operationEvidence/mutations.d.ts.map +1 -0
  171. package/dist/component/operationEvidence/mutations.js +14 -0
  172. package/dist/component/operationEvidence/mutations.js.map +1 -0
  173. package/dist/component/operationEvidence/queries.d.ts +205 -0
  174. package/dist/component/operationEvidence/queries.d.ts.map +1 -0
  175. package/dist/component/operationEvidence/queries.js +75 -0
  176. package/dist/component/operationEvidence/queries.js.map +1 -0
  177. package/dist/component/operationEvidence/schema.d.ts +536 -0
  178. package/dist/component/operationEvidence/schema.d.ts.map +1 -0
  179. package/dist/component/operationEvidence/schema.js +53 -0
  180. package/dist/component/operationEvidence/schema.js.map +1 -0
  181. package/dist/component/refundHistory/commandBinding.d.ts +17 -0
  182. package/dist/component/refundHistory/commandBinding.d.ts.map +1 -0
  183. package/dist/component/refundHistory/commandBinding.js +41 -0
  184. package/dist/component/refundHistory/commandBinding.js.map +1 -0
  185. package/dist/component/refundHistory/commandEvidence.d.ts +50 -0
  186. package/dist/component/refundHistory/commandEvidence.d.ts.map +1 -0
  187. package/dist/component/refundHistory/commandEvidence.js +58 -0
  188. package/dist/component/refundHistory/commandEvidence.js.map +1 -0
  189. package/dist/component/refundHistory/commandEvidenceValidator.d.ts +89 -0
  190. package/dist/component/refundHistory/commandEvidenceValidator.d.ts.map +1 -0
  191. package/dist/component/refundHistory/commandEvidenceValidator.js +8 -0
  192. package/dist/component/refundHistory/commandEvidenceValidator.js.map +1 -0
  193. package/dist/component/refundHistory/commandFields.d.ts +8 -0
  194. package/dist/component/refundHistory/commandFields.d.ts.map +1 -0
  195. package/dist/component/refundHistory/commandFields.js +9 -0
  196. package/dist/component/refundHistory/commandFields.js.map +1 -0
  197. package/dist/component/refundHistory/mutations.d.ts +8 -0
  198. package/dist/component/refundHistory/mutations.d.ts.map +1 -0
  199. package/dist/component/refundHistory/mutations.js +25 -0
  200. package/dist/component/refundHistory/mutations.js.map +1 -0
  201. package/dist/component/refundHistory/originalSeller.d.ts +5 -0
  202. package/dist/component/refundHistory/originalSeller.d.ts.map +1 -0
  203. package/dist/component/refundHistory/originalSeller.js +35 -0
  204. package/dist/component/refundHistory/originalSeller.js.map +1 -0
  205. package/dist/component/refundHistory/queries.d.ts +51 -0
  206. package/dist/component/refundHistory/queries.d.ts.map +1 -1
  207. package/dist/component/refundHistory/queries.js +14 -0
  208. package/dist/component/refundHistory/queries.js.map +1 -1
  209. package/dist/component/schema.d.ts +332 -1
  210. package/dist/component/schema.js +15 -0
  211. package/dist/component/schema.js.map +1 -1
  212. package/dist/component/settlement/mutations.d.ts.map +1 -1
  213. package/dist/component/settlement/mutations.js +5 -1
  214. package/dist/component/settlement/mutations.js.map +1 -1
  215. package/dist/shared/refundCommandScope.d.ts +10 -0
  216. package/dist/shared/refundCommandScope.d.ts.map +1 -0
  217. package/dist/shared/refundCommandScope.js +9 -0
  218. package/dist/shared/refundCommandScope.js.map +1 -0
  219. package/docs/financial-observations.md +244 -0
  220. package/docs/financial-ownership.md +54 -0
  221. package/docs/refund-command-evidence.md +55 -0
  222. package/package.json +5 -2
  223. package/src/client/connect/refundCommandEvidence.ts +41 -0
  224. package/src/client/connect/refundCommandNormalization.ts +28 -0
  225. package/src/client/financialObservations.test.ts +109 -0
  226. package/src/client/financialObservations.ts +106 -0
  227. package/src/client/financialOwnership.test.ts +80 -0
  228. package/src/client/financialOwnership.ts +116 -0
  229. package/src/client/index.ts +2 -2
  230. package/src/client/observationPagination.ts +11 -0
  231. package/src/client/operationEvidence.test.ts +110 -0
  232. package/src/client/operationEvidence.ts +92 -0
  233. package/src/client/publicTypes.ts +45 -0
  234. package/src/client/readContracts.ts +25 -0
  235. package/src/client/refund-command-evidence.test.ts +68 -0
  236. package/src/client/refund-command-normalization.test.ts +61 -0
  237. package/src/client/transferContinuation.test.ts +94 -0
  238. package/src/client/transferObservations.test.ts +98 -0
  239. package/src/client/transferObservations.ts +180 -0
  240. package/src/component/_generated/api.ts +54 -0
  241. package/src/component/_generated/component.ts +797 -0
  242. package/src/component/affiliateRecovery/mutations.ts +10 -1
  243. package/src/component/connect/mutations.ts +29 -2
  244. package/src/component/connect/reversalClaims.ts +19 -1
  245. package/src/component/connect/reversalReceipts.ts +2 -0
  246. package/src/component/connect/schema.ts +9 -1
  247. package/src/component/connect/validators.ts +2 -0
  248. package/src/component/core/reset.test.ts +8 -1
  249. package/src/component/earnings/earnings-totals.test.ts +14 -10
  250. package/src/component/earnings/paired-adjustment.test.ts +258 -0
  251. package/src/component/earnings/pairedAdjustment.ts +77 -0
  252. package/src/component/earnings/triggers.ts +23 -11
  253. package/src/component/financialObservations/continuation.test.ts +445 -0
  254. package/src/component/financialObservations/continuation.ts +159 -0
  255. package/src/component/financialObservations/generations.ts +53 -0
  256. package/src/component/financialObservations/mutations.ts +75 -0
  257. package/src/component/financialObservations/observation-boundaries.test.ts +466 -0
  258. package/src/component/financialObservations/queries.ts +246 -0
  259. package/src/component/financialObservations/schema.ts +68 -0
  260. package/src/component/financialObservations/settlement-observations.test.ts +86 -0
  261. package/src/component/financialObservations/settlement.ts +142 -0
  262. package/src/component/financialObservations/settlementHelpers.ts +92 -0
  263. package/src/component/financialObservations/transfer-batches.test.ts +61 -0
  264. package/src/component/financialObservations/transfer-boundaries.test.ts +116 -0
  265. package/src/component/financialObservations/transfer-continuation-guards.test.ts +428 -0
  266. package/src/component/financialObservations/transfer-continuation.test.ts +154 -0
  267. package/src/component/financialObservations/transfer-observations.test.ts +212 -0
  268. package/src/component/financialObservations/transfer-overflow.test.ts +181 -0
  269. package/src/component/financialObservations/transfer-writers.test.ts +162 -0
  270. package/src/component/financialObservations/transferBatches.ts +96 -0
  271. package/src/component/financialObservations/transferContinuation.ts +53 -0
  272. package/src/component/financialObservations/transferContinuationState.ts +85 -0
  273. package/src/component/financialObservations/transferContinuationSteps.ts +232 -0
  274. package/src/component/financialObservations/transferHelpers.ts +38 -0
  275. package/src/component/financialObservations/transferReferenceSchema.ts +20 -0
  276. package/src/component/financialObservations/transferSchema.ts +74 -0
  277. package/src/component/financialObservations/transfers.ts +99 -0
  278. package/src/component/financialOwnership/financial-ownership.test.ts +102 -0
  279. package/src/component/financialOwnership/helpers.ts +98 -0
  280. package/src/component/financialOwnership/mutations.ts +83 -0
  281. package/src/component/financialOwnership/ownership-boundaries.test.ts +308 -0
  282. package/src/component/financialOwnership/queries.ts +65 -0
  283. package/src/component/financialOwnership/schema.ts +35 -0
  284. package/src/component/operationEvidence/canonical.ts +10 -0
  285. package/src/component/operationEvidence/helpers.ts +65 -0
  286. package/src/component/operationEvidence/integrity.test.ts +257 -0
  287. package/src/component/operationEvidence/maintenance.test.ts +152 -0
  288. package/src/component/operationEvidence/maintenance.ts +89 -0
  289. package/src/component/operationEvidence/mutations.ts +14 -0
  290. package/src/component/operationEvidence/queries.ts +108 -0
  291. package/src/component/operationEvidence/reads.test.ts +140 -0
  292. package/src/component/operationEvidence/schema.ts +62 -0
  293. package/src/component/refundHistory/command-evidence.test.ts +288 -0
  294. package/src/component/refundHistory/command-normalization-resource.test.ts +77 -0
  295. package/src/component/refundHistory/command-normalization.test.ts +229 -0
  296. package/src/component/refundHistory/command-provenance.test.ts +59 -0
  297. package/src/component/refundHistory/commandBinding.ts +54 -0
  298. package/src/component/refundHistory/commandEvidence.ts +76 -0
  299. package/src/component/refundHistory/commandEvidenceValidator.ts +18 -0
  300. package/src/component/refundHistory/commandFields.ts +9 -0
  301. package/src/component/refundHistory/mutations.ts +33 -0
  302. package/src/component/refundHistory/original-seller-boundaries.test.ts +138 -0
  303. package/src/component/refundHistory/original-seller.test.ts +175 -0
  304. package/src/component/refundHistory/originalSeller.ts +48 -0
  305. package/src/component/refundHistory/queries.ts +15 -0
  306. package/src/component/schema.ts +28 -0
  307. package/src/component/settlement/mutations.ts +5 -1
  308. package/src/shared/refundCommandScope.ts +19 -0
@@ -1,5 +1,326 @@
1
1
  export declare function large(count?: number, amount?: number): Promise<{
2
2
  t: import("convex-test").TestConvex<import("convex/server").SchemaDefinition<{
3
+ operationEvidencePayloads: import("convex/server").TableDefinition<import("convex/values").VObject<{
4
+ commissionExposure?: {
5
+ chargeAmount: number;
6
+ disputeId?: string | undefined;
7
+ disputeState?: "lost" | "open" | "won" | undefined;
8
+ finalized: boolean;
9
+ kind: "dispute" | "refund";
10
+ principal: number;
11
+ refundId?: string | undefined;
12
+ refundedPrincipal?: number | undefined;
13
+ } | undefined;
14
+ operationId: string;
15
+ slices: {
16
+ from: number;
17
+ stripeTransferId: string;
18
+ to: number;
19
+ }[];
20
+ sourceChargeId: string;
21
+ }, {
22
+ operationId: import("convex/values").VString<string, "required">;
23
+ sourceChargeId: import("convex/values").VString<string, "required">;
24
+ slices: import("convex/values").VArray<{
25
+ from: number;
26
+ stripeTransferId: string;
27
+ to: number;
28
+ }[], import("convex/values").VObject<{
29
+ from: number;
30
+ stripeTransferId: string;
31
+ to: number;
32
+ }, {
33
+ stripeTransferId: import("convex/values").VString<string, "required">;
34
+ from: import("convex/values").VFloat64<number, "required">;
35
+ to: import("convex/values").VFloat64<number, "required">;
36
+ }, "required", "from" | "stripeTransferId" | "to">, "required">;
37
+ commissionExposure: import("convex/values").VObject<{
38
+ chargeAmount: number;
39
+ disputeId?: string | undefined;
40
+ disputeState?: "lost" | "open" | "won" | undefined;
41
+ finalized: boolean;
42
+ kind: "dispute" | "refund";
43
+ principal: number;
44
+ refundId?: string | undefined;
45
+ refundedPrincipal?: number | undefined;
46
+ } | undefined, {
47
+ kind: import("convex/values").VUnion<"dispute" | "refund", [import("convex/values").VLiteral<"refund", "required">, import("convex/values").VLiteral<"dispute", "required">], "required", never>;
48
+ chargeAmount: import("convex/values").VFloat64<number, "required">;
49
+ principal: import("convex/values").VFloat64<number, "required">;
50
+ finalized: import("convex/values").VBoolean<boolean, "required">;
51
+ disputeState: import("convex/values").VUnion<"lost" | "open" | "won" | undefined, [import("convex/values").VLiteral<"open", "required">, import("convex/values").VLiteral<"lost", "required">, import("convex/values").VLiteral<"won", "required">], "optional", never>;
52
+ disputeId: import("convex/values").VString<string | undefined, "optional">;
53
+ refundedPrincipal: import("convex/values").VFloat64<number | undefined, "optional">;
54
+ refundId: import("convex/values").VString<string | undefined, "optional">;
55
+ }, "optional", "chargeAmount" | "disputeId" | "disputeState" | "finalized" | "kind" | "principal" | "refundId" | "refundedPrincipal">;
56
+ }, "required", "commissionExposure" | "commissionExposure.chargeAmount" | "commissionExposure.disputeId" | "commissionExposure.disputeState" | "commissionExposure.finalized" | "commissionExposure.kind" | "commissionExposure.principal" | "commissionExposure.refundId" | "commissionExposure.refundedPrincipal" | "operationId" | "slices" | "sourceChargeId">, {}, {}, {}>;
57
+ operationEvidenceHeaders: import("convex/server").TableDefinition<import("convex/values").VObject<{
58
+ firstObservedAt: number;
59
+ generation: number;
60
+ isContradictory: boolean;
61
+ latestFingerprint: string;
62
+ latestPayloadId: import("convex/values").GenericId<"operationEvidencePayloads">;
63
+ operationDigest: string;
64
+ originalFingerprint: string;
65
+ originalIdentityFingerprint: string;
66
+ originalPayloadId: import("convex/values").GenericId<"operationEvidencePayloads">;
67
+ producer: "trusted_host_maintenance";
68
+ producerVersion: 1;
69
+ sourceChargeDigest: string;
70
+ sourceCreatedAt: number;
71
+ sourceId: import("convex/values").GenericId<"transferReversalOps">;
72
+ }, {
73
+ sourceId: import("convex/values").VId<import("convex/values").GenericId<"transferReversalOps">, "required">;
74
+ originalPayloadId: import("convex/values").VId<import("convex/values").GenericId<"operationEvidencePayloads">, "required">;
75
+ latestPayloadId: import("convex/values").VId<import("convex/values").GenericId<"operationEvidencePayloads">, "required">;
76
+ producer: import("convex/values").VLiteral<"trusted_host_maintenance", "required">;
77
+ producerVersion: import("convex/values").VLiteral<1, "required">;
78
+ firstObservedAt: import("convex/values").VFloat64<number, "required">;
79
+ sourceCreatedAt: import("convex/values").VFloat64<number, "required">;
80
+ originalFingerprint: import("convex/values").VString<string, "required">;
81
+ latestFingerprint: import("convex/values").VString<string, "required">;
82
+ originalIdentityFingerprint: import("convex/values").VString<string, "required">;
83
+ operationDigest: import("convex/values").VString<string, "required">;
84
+ sourceChargeDigest: import("convex/values").VString<string, "required">;
85
+ generation: import("convex/values").VFloat64<number, "required">;
86
+ isContradictory: import("convex/values").VBoolean<boolean, "required">;
87
+ }, "required", "firstObservedAt" | "generation" | "isContradictory" | "latestFingerprint" | "latestPayloadId" | "operationDigest" | "originalFingerprint" | "originalIdentityFingerprint" | "originalPayloadId" | "producer" | "producerVersion" | "sourceChargeDigest" | "sourceCreatedAt" | "sourceId">, {
88
+ by_operation_digest: ["operationDigest", "_creationTime"];
89
+ by_source_charge_digest: ["sourceChargeDigest", "_creationTime"];
90
+ by_source_id: ["sourceId", "_creationTime"];
91
+ }, {}, {}>;
92
+ financialTransferObservations: import("convex/server").TableDefinition<import("convex/values").VObject<{
93
+ bucketKey: string;
94
+ fingerprint: string;
95
+ generation: number;
96
+ isContradictory: boolean;
97
+ observedFingerprint: string;
98
+ orgId?: string | undefined;
99
+ ownershipFingerprint: string;
100
+ ownershipStatus: "ambiguous" | "contradictory" | "registered" | "unknown";
101
+ producer: "transfer_fact";
102
+ producerVersion: 1;
103
+ registrationId?: import("convex/values").GenericId<"financialOwnership"> | undefined;
104
+ role?: "affiliate" | "other" | "store" | undefined;
105
+ sourceChargeId?: string | undefined;
106
+ sourceInvoiceId?: string | undefined;
107
+ stripeTransferId: string;
108
+ transferId: import("convex/values").GenericId<"transfers">;
109
+ userId?: string | undefined;
110
+ }, {
111
+ transferId: import("convex/values").VId<import("convex/values").GenericId<"transfers">, "required">;
112
+ stripeTransferId: import("convex/values").VString<string, "required">;
113
+ sourceChargeId: import("convex/values").VString<string | undefined, "optional">;
114
+ sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
115
+ bucketKey: import("convex/values").VString<string, "required">;
116
+ 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>;
117
+ registrationId: import("convex/values").VId<import("convex/values").GenericId<"financialOwnership"> | undefined, "optional">;
118
+ userId: import("convex/values").VString<string | undefined, "optional">;
119
+ orgId: import("convex/values").VString<string | undefined, "optional">;
120
+ ownershipStatus: import("convex/values").VUnion<"ambiguous" | "contradictory" | "registered" | "unknown", [import("convex/values").VLiteral<"registered", "required">, import("convex/values").VLiteral<"unknown", "required">, import("convex/values").VLiteral<"ambiguous", "required">, import("convex/values").VLiteral<"contradictory", "required">], "required", never>;
121
+ producer: import("convex/values").VLiteral<"transfer_fact", "required">;
122
+ producerVersion: import("convex/values").VLiteral<1, "required">;
123
+ fingerprint: import("convex/values").VString<string, "required">;
124
+ observedFingerprint: import("convex/values").VString<string, "required">;
125
+ ownershipFingerprint: import("convex/values").VString<string, "required">;
126
+ generation: import("convex/values").VFloat64<number, "required">;
127
+ isContradictory: import("convex/values").VBoolean<boolean, "required">;
128
+ }, "required", "bucketKey" | "fingerprint" | "generation" | "isContradictory" | "observedFingerprint" | "orgId" | "ownershipFingerprint" | "ownershipStatus" | "producer" | "producerVersion" | "registrationId" | "role" | "sourceChargeId" | "sourceInvoiceId" | "stripeTransferId" | "transferId" | "userId">, {
129
+ by_bucket_key: ["bucketKey", "_creationTime"];
130
+ by_owner: ["userId", "orgId", "_creationTime"];
131
+ by_transfer_id: ["transferId", "_creationTime"];
132
+ }, {}, {}>;
133
+ financialTransferBatches: import("convex/server").TableDefinition<import("convex/values").VObject<{
134
+ continuation?: {
135
+ nextReference: number;
136
+ producerGeneration: number;
137
+ sourceFingerprint: string;
138
+ state: "complete" | "held" | "indexing" | "validating";
139
+ validatedReferences: number;
140
+ } | undefined;
141
+ fingerprint: string;
142
+ generation: number;
143
+ isContradictory: boolean;
144
+ isOverflow: true;
145
+ observedFingerprint: string;
146
+ operationId: string;
147
+ originalOperationId: import("convex/values").GenericId<"transferReversalOps">;
148
+ producer: "transfer_frontier_claim" | "transfer_frontier_release";
149
+ producerVersion: 1;
150
+ referenceCount: number;
151
+ sourceChargeId: string;
152
+ state: "complete" | "pending";
153
+ transferIds: import("convex/values").GenericId<"transfers">[];
154
+ }, {
155
+ originalOperationId: import("convex/values").VId<import("convex/values").GenericId<"transferReversalOps">, "required">;
156
+ operationId: import("convex/values").VString<string, "required">;
157
+ sourceChargeId: import("convex/values").VString<string, "required">;
158
+ producer: import("convex/values").VUnion<"transfer_frontier_claim" | "transfer_frontier_release", [import("convex/values").VLiteral<"transfer_frontier_release", "required">, import("convex/values").VLiteral<"transfer_frontier_claim", "required">], "required", never>;
159
+ producerVersion: import("convex/values").VLiteral<1, "required">;
160
+ fingerprint: import("convex/values").VString<string, "required">;
161
+ generation: import("convex/values").VFloat64<number, "required">;
162
+ observedFingerprint: import("convex/values").VString<string, "required">;
163
+ isContradictory: import("convex/values").VBoolean<boolean, "required">;
164
+ referenceCount: import("convex/values").VFloat64<number, "required">;
165
+ transferIds: import("convex/values").VArray<import("convex/values").GenericId<"transfers">[], import("convex/values").VId<import("convex/values").GenericId<"transfers">, "required">, "required">;
166
+ isOverflow: import("convex/values").VLiteral<true, "required">;
167
+ state: import("convex/values").VUnion<"complete" | "pending", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"complete", "required">], "required", never>;
168
+ continuation: import("convex/values").VObject<{
169
+ nextReference: number;
170
+ producerGeneration: number;
171
+ sourceFingerprint: string;
172
+ state: "complete" | "held" | "indexing" | "validating";
173
+ validatedReferences: number;
174
+ } | undefined, {
175
+ state: import("convex/values").VUnion<"complete" | "held" | "indexing" | "validating", [import("convex/values").VLiteral<"indexing", "required">, import("convex/values").VLiteral<"validating", "required">, import("convex/values").VLiteral<"complete", "required">, import("convex/values").VLiteral<"held", "required">], "required", never>;
176
+ nextReference: import("convex/values").VFloat64<number, "required">;
177
+ validatedReferences: import("convex/values").VFloat64<number, "required">;
178
+ producerGeneration: import("convex/values").VFloat64<number, "required">;
179
+ sourceFingerprint: import("convex/values").VString<string, "required">;
180
+ }, "optional", "nextReference" | "producerGeneration" | "sourceFingerprint" | "state" | "validatedReferences">;
181
+ }, "required", "continuation" | "continuation.nextReference" | "continuation.producerGeneration" | "continuation.sourceFingerprint" | "continuation.state" | "continuation.validatedReferences" | "fingerprint" | "generation" | "isContradictory" | "isOverflow" | "observedFingerprint" | "operationId" | "originalOperationId" | "producer" | "producerVersion" | "referenceCount" | "sourceChargeId" | "state" | "transferIds">, {
182
+ by_operation_id: ["operationId", "_creationTime"];
183
+ by_original_operation_id: ["originalOperationId", "_creationTime"];
184
+ by_original_operation_producer: ["originalOperationId", "producer", "_creationTime"];
185
+ by_state: ["state", "_creationTime"];
186
+ }, {}, {}>;
187
+ financialTransferBatchReferences: import("convex/server").TableDefinition<import("convex/values").VObject<{
188
+ batchId: import("convex/values").GenericId<"financialTransferBatches">;
189
+ observationGeneration: number;
190
+ observationId: import("convex/values").GenericId<"financialTransferObservations">;
191
+ observedFingerprint: string;
192
+ ownershipFingerprint: string;
193
+ position: number;
194
+ sourceFingerprint: string;
195
+ transferId: import("convex/values").GenericId<"transfers">;
196
+ }, {
197
+ batchId: import("convex/values").VId<import("convex/values").GenericId<"financialTransferBatches">, "required">;
198
+ position: import("convex/values").VFloat64<number, "required">;
199
+ transferId: import("convex/values").VId<import("convex/values").GenericId<"transfers">, "required">;
200
+ observationId: import("convex/values").VId<import("convex/values").GenericId<"financialTransferObservations">, "required">;
201
+ observationGeneration: import("convex/values").VFloat64<number, "required">;
202
+ sourceFingerprint: import("convex/values").VString<string, "required">;
203
+ observedFingerprint: import("convex/values").VString<string, "required">;
204
+ ownershipFingerprint: import("convex/values").VString<string, "required">;
205
+ }, "required", "batchId" | "observationGeneration" | "observationId" | "observedFingerprint" | "ownershipFingerprint" | "position" | "sourceFingerprint" | "transferId">, {
206
+ by_batch_position: ["batchId", "position", "_creationTime"];
207
+ by_batch_transfer: ["batchId", "transferId", "_creationTime"];
208
+ }, {}, {}>;
209
+ financialSourceObservations: import("convex/server").TableDefinition<import("convex/values").VObject<{
210
+ allocationId: import("convex/values").GenericId<"settlementAllocations">;
211
+ continuation?: {
212
+ nextLeg: number;
213
+ state: "complete" | "held" | "indexing" | "validating";
214
+ validatedLegs: number;
215
+ } | undefined;
216
+ fingerprint: string;
217
+ generation: number;
218
+ indexedLegCount: number;
219
+ isContradictory: boolean;
220
+ isOverflow: boolean;
221
+ legCount: number;
222
+ observedFingerprint: string;
223
+ ownershipFingerprint: string;
224
+ producer: "settlement_allocation";
225
+ producerVersion: 1;
226
+ sourceChargeId: string;
227
+ }, {
228
+ allocationId: import("convex/values").VId<import("convex/values").GenericId<"settlementAllocations">, "required">;
229
+ sourceChargeId: import("convex/values").VString<string, "required">;
230
+ producer: import("convex/values").VLiteral<"settlement_allocation", "required">;
231
+ producerVersion: import("convex/values").VLiteral<1, "required">;
232
+ fingerprint: import("convex/values").VString<string, "required">;
233
+ observedFingerprint: import("convex/values").VString<string, "required">;
234
+ ownershipFingerprint: import("convex/values").VString<string, "required">;
235
+ generation: import("convex/values").VFloat64<number, "required">;
236
+ legCount: import("convex/values").VFloat64<number, "required">;
237
+ indexedLegCount: import("convex/values").VFloat64<number, "required">;
238
+ isOverflow: import("convex/values").VBoolean<boolean, "required">;
239
+ isContradictory: import("convex/values").VBoolean<boolean, "required">;
240
+ continuation: import("convex/values").VObject<{
241
+ nextLeg: number;
242
+ state: "complete" | "held" | "indexing" | "validating";
243
+ validatedLegs: number;
244
+ } | undefined, {
245
+ state: import("convex/values").VUnion<"complete" | "held" | "indexing" | "validating", [import("convex/values").VLiteral<"indexing", "required">, import("convex/values").VLiteral<"validating", "required">, import("convex/values").VLiteral<"complete", "required">, import("convex/values").VLiteral<"held", "required">], "required", never>;
246
+ nextLeg: import("convex/values").VFloat64<number, "required">;
247
+ validatedLegs: import("convex/values").VFloat64<number, "required">;
248
+ }, "optional", "nextLeg" | "state" | "validatedLegs">;
249
+ }, "required", "allocationId" | "continuation" | "continuation.nextLeg" | "continuation.state" | "continuation.validatedLegs" | "fingerprint" | "generation" | "indexedLegCount" | "isContradictory" | "isOverflow" | "legCount" | "observedFingerprint" | "ownershipFingerprint" | "producer" | "producerVersion" | "sourceChargeId">, {
250
+ by_allocation_id: ["allocationId", "_creationTime"];
251
+ }, {}, {}>;
252
+ financialSourceLegs: import("convex/server").TableDefinition<import("convex/values").VObject<{
253
+ allocationId: import("convex/values").GenericId<"settlementAllocations">;
254
+ bucketKey: string;
255
+ legIndex: number;
256
+ orgId?: string | undefined;
257
+ ownershipStatus: "ambiguous" | "contradictory" | "registered" | "unknown";
258
+ registrationId?: import("convex/values").GenericId<"financialOwnership"> | undefined;
259
+ role: "affiliate" | "other" | "store";
260
+ sourceChargeId: string;
261
+ userId?: string | undefined;
262
+ }, {
263
+ allocationId: import("convex/values").VId<import("convex/values").GenericId<"settlementAllocations">, "required">;
264
+ sourceChargeId: import("convex/values").VString<string, "required">;
265
+ legIndex: import("convex/values").VFloat64<number, "required">;
266
+ bucketKey: import("convex/values").VString<string, "required">;
267
+ 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>;
268
+ registrationId: import("convex/values").VId<import("convex/values").GenericId<"financialOwnership"> | undefined, "optional">;
269
+ userId: import("convex/values").VString<string | undefined, "optional">;
270
+ orgId: import("convex/values").VString<string | undefined, "optional">;
271
+ ownershipStatus: import("convex/values").VUnion<"ambiguous" | "contradictory" | "registered" | "unknown", [import("convex/values").VLiteral<"registered", "required">, import("convex/values").VLiteral<"unknown", "required">, import("convex/values").VLiteral<"ambiguous", "required">, import("convex/values").VLiteral<"contradictory", "required">], "required", never>;
272
+ }, "required", "allocationId" | "bucketKey" | "legIndex" | "orgId" | "ownershipStatus" | "registrationId" | "role" | "sourceChargeId" | "userId">, {
273
+ by_allocation_id_and_leg_index: ["allocationId", "legIndex", "_creationTime"];
274
+ by_bucket_key: ["bucketKey", "_creationTime"];
275
+ by_owner: ["userId", "orgId", "_creationTime"];
276
+ }, {}, {}>;
277
+ financialObservationGenerations: import("convex/server").TableDefinition<import("convex/values").VObject<{
278
+ generation: number;
279
+ scopeKey: string;
280
+ }, {
281
+ scopeKey: import("convex/values").VString<string, "required">;
282
+ generation: import("convex/values").VFloat64<number, "required">;
283
+ }, "required", "generation" | "scopeKey">, {
284
+ by_scope_key: ["scopeKey", "_creationTime"];
285
+ }, {}, {}>;
286
+ financialOwnership: import("convex/server").TableDefinition<import("convex/values").VObject<{
287
+ bucketKey: string;
288
+ generation: number;
289
+ kind: "logical" | "stripe_account";
290
+ orgId?: string | undefined;
291
+ source: {
292
+ integration: string;
293
+ recordId: string;
294
+ };
295
+ userId: string;
296
+ }, {
297
+ userId: import("convex/values").VString<string, "required">;
298
+ orgId: import("convex/values").VString<string | undefined, "optional">;
299
+ bucketKey: import("convex/values").VString<string, "required">;
300
+ kind: import("convex/values").VUnion<"logical" | "stripe_account", [import("convex/values").VLiteral<"stripe_account", "required">, import("convex/values").VLiteral<"logical", "required">], "required", never>;
301
+ source: import("convex/values").VObject<{
302
+ integration: string;
303
+ recordId: string;
304
+ }, {
305
+ integration: import("convex/values").VString<string, "required">;
306
+ recordId: import("convex/values").VString<string, "required">;
307
+ }, "required", "integration" | "recordId">;
308
+ generation: import("convex/values").VFloat64<number, "required">;
309
+ }, "required", "bucketKey" | "generation" | "kind" | "orgId" | "source" | "source.integration" | "source.recordId" | "userId">, {
310
+ by_bucket_key: ["bucketKey", "_creationTime"];
311
+ by_owner: ["userId", "orgId", "_creationTime"];
312
+ }, {}, {}>;
313
+ financialOwnershipGenerations: import("convex/server").TableDefinition<import("convex/values").VObject<{
314
+ generation: number;
315
+ orgId?: string | undefined;
316
+ userId: string;
317
+ }, {
318
+ userId: import("convex/values").VString<string, "required">;
319
+ orgId: import("convex/values").VString<string | undefined, "optional">;
320
+ generation: import("convex/values").VFloat64<number, "required">;
321
+ }, "required", "generation" | "orgId" | "userId">, {
322
+ by_owner: ["userId", "orgId", "_creationTime"];
323
+ }, {}, {}>;
3
324
  payoutWorkerJobs: import("convex/server").TableDefinition<import("convex/values").VObject<{
4
325
  accountId: string;
5
326
  cadenceMs: number;
@@ -1541,11 +1862,19 @@ export declare function large(count?: number, amount?: number): Promise<{
1541
1862
  failureReason?: string | undefined;
1542
1863
  metadata?: any;
1543
1864
  reason?: "duplicate" | "expired_uncaptured_charge" | "fraudulent" | "requested_by_customer" | undefined;
1865
+ refundCommandConflict?: boolean | undefined;
1866
+ refundCommandKey?: string | undefined;
1867
+ refundCommandNormalizationVersion?: 1 | undefined;
1868
+ refundCommandObservedAt?: number | undefined;
1544
1869
  status: "canceled" | "failed" | "pending" | "requires_action" | "succeeded";
1545
1870
  stripeChargeId?: string | undefined;
1546
1871
  stripePaymentIntentId?: string | undefined;
1547
1872
  stripeRefundId: string;
1548
1873
  }, {
1874
+ refundCommandNormalizationVersion: import("convex/values").VLiteral<1 | undefined, "optional">;
1875
+ refundCommandKey: import("convex/values").VString<string | undefined, "optional">;
1876
+ refundCommandConflict: import("convex/values").VBoolean<boolean | undefined, "optional">;
1877
+ refundCommandObservedAt: import("convex/values").VFloat64<number | undefined, "optional">;
1549
1878
  stripeRefundId: import("convex/values").VString<string, "required">;
1550
1879
  stripePaymentIntentId: import("convex/values").VString<string | undefined, "optional">;
1551
1880
  stripeChargeId: import("convex/values").VString<string | undefined, "optional">;
@@ -1556,12 +1885,14 @@ export declare function large(count?: number, amount?: number): Promise<{
1556
1885
  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>;
1557
1886
  failureReason: import("convex/values").VString<string | undefined, "optional">;
1558
1887
  metadata: import("convex/values").VAny<any, "optional", string>;
1559
- }, "required", "accountId" | "amount" | "currency" | "failureReason" | "metadata" | "reason" | "status" | "stripeChargeId" | "stripePaymentIntentId" | "stripeRefundId" | `metadata.${string}`>, {
1888
+ }, "required", "accountId" | "amount" | "currency" | "failureReason" | "metadata" | "reason" | "refundCommandConflict" | "refundCommandKey" | "refundCommandNormalizationVersion" | "refundCommandObservedAt" | "status" | "stripeChargeId" | "stripePaymentIntentId" | "stripeRefundId" | `metadata.${string}`>, {
1560
1889
  by_account_id: ["accountId", "_creationTime"];
1561
1890
  by_account_id_and_status: ["accountId", "status", "_creationTime"];
1562
1891
  by_account_id_and_stripe_payment_intent_id: ["accountId", "stripePaymentIntentId", "_creationTime"];
1563
1892
  by_account_id_and_stripe_payment_intent_id_and_status: ["accountId", "stripePaymentIntentId", "status", "_creationTime"];
1564
1893
  by_payment_intent_id_and_status: ["stripePaymentIntentId", "status", "_creationTime"];
1894
+ by_refund_command_key: ["refundCommandKey", "_creationTime"];
1895
+ by_refund_command_normalization_version: ["refundCommandNormalizationVersion", "_creationTime"];
1565
1896
  by_status: ["status", "_creationTime"];
1566
1897
  by_stripe_payment_intent_id: ["stripePaymentIntentId", "_creationTime"];
1567
1898
  by_stripe_refund_id: ["stripeRefundId", "_creationTime"];
@@ -1883,6 +2214,327 @@ export declare function large(count?: number, amount?: number): Promise<{
1883
2214
  export declare function withHistory(count?: number, amount?: number): Promise<{
1884
2215
  s: {
1885
2216
  t: import("convex-test").TestConvex<import("convex/server").SchemaDefinition<{
2217
+ operationEvidencePayloads: import("convex/server").TableDefinition<import("convex/values").VObject<{
2218
+ commissionExposure?: {
2219
+ chargeAmount: number;
2220
+ disputeId?: string | undefined;
2221
+ disputeState?: "lost" | "open" | "won" | undefined;
2222
+ finalized: boolean;
2223
+ kind: "dispute" | "refund";
2224
+ principal: number;
2225
+ refundId?: string | undefined;
2226
+ refundedPrincipal?: number | undefined;
2227
+ } | undefined;
2228
+ operationId: string;
2229
+ slices: {
2230
+ from: number;
2231
+ stripeTransferId: string;
2232
+ to: number;
2233
+ }[];
2234
+ sourceChargeId: string;
2235
+ }, {
2236
+ operationId: import("convex/values").VString<string, "required">;
2237
+ sourceChargeId: import("convex/values").VString<string, "required">;
2238
+ slices: import("convex/values").VArray<{
2239
+ from: number;
2240
+ stripeTransferId: string;
2241
+ to: number;
2242
+ }[], import("convex/values").VObject<{
2243
+ from: number;
2244
+ stripeTransferId: string;
2245
+ to: number;
2246
+ }, {
2247
+ stripeTransferId: import("convex/values").VString<string, "required">;
2248
+ from: import("convex/values").VFloat64<number, "required">;
2249
+ to: import("convex/values").VFloat64<number, "required">;
2250
+ }, "required", "from" | "stripeTransferId" | "to">, "required">;
2251
+ commissionExposure: import("convex/values").VObject<{
2252
+ chargeAmount: number;
2253
+ disputeId?: string | undefined;
2254
+ disputeState?: "lost" | "open" | "won" | undefined;
2255
+ finalized: boolean;
2256
+ kind: "dispute" | "refund";
2257
+ principal: number;
2258
+ refundId?: string | undefined;
2259
+ refundedPrincipal?: number | undefined;
2260
+ } | undefined, {
2261
+ kind: import("convex/values").VUnion<"dispute" | "refund", [import("convex/values").VLiteral<"refund", "required">, import("convex/values").VLiteral<"dispute", "required">], "required", never>;
2262
+ chargeAmount: import("convex/values").VFloat64<number, "required">;
2263
+ principal: import("convex/values").VFloat64<number, "required">;
2264
+ finalized: import("convex/values").VBoolean<boolean, "required">;
2265
+ disputeState: import("convex/values").VUnion<"lost" | "open" | "won" | undefined, [import("convex/values").VLiteral<"open", "required">, import("convex/values").VLiteral<"lost", "required">, import("convex/values").VLiteral<"won", "required">], "optional", never>;
2266
+ disputeId: import("convex/values").VString<string | undefined, "optional">;
2267
+ refundedPrincipal: import("convex/values").VFloat64<number | undefined, "optional">;
2268
+ refundId: import("convex/values").VString<string | undefined, "optional">;
2269
+ }, "optional", "chargeAmount" | "disputeId" | "disputeState" | "finalized" | "kind" | "principal" | "refundId" | "refundedPrincipal">;
2270
+ }, "required", "commissionExposure" | "commissionExposure.chargeAmount" | "commissionExposure.disputeId" | "commissionExposure.disputeState" | "commissionExposure.finalized" | "commissionExposure.kind" | "commissionExposure.principal" | "commissionExposure.refundId" | "commissionExposure.refundedPrincipal" | "operationId" | "slices" | "sourceChargeId">, {}, {}, {}>;
2271
+ operationEvidenceHeaders: import("convex/server").TableDefinition<import("convex/values").VObject<{
2272
+ firstObservedAt: number;
2273
+ generation: number;
2274
+ isContradictory: boolean;
2275
+ latestFingerprint: string;
2276
+ latestPayloadId: import("convex/values").GenericId<"operationEvidencePayloads">;
2277
+ operationDigest: string;
2278
+ originalFingerprint: string;
2279
+ originalIdentityFingerprint: string;
2280
+ originalPayloadId: import("convex/values").GenericId<"operationEvidencePayloads">;
2281
+ producer: "trusted_host_maintenance";
2282
+ producerVersion: 1;
2283
+ sourceChargeDigest: string;
2284
+ sourceCreatedAt: number;
2285
+ sourceId: import("convex/values").GenericId<"transferReversalOps">;
2286
+ }, {
2287
+ sourceId: import("convex/values").VId<import("convex/values").GenericId<"transferReversalOps">, "required">;
2288
+ originalPayloadId: import("convex/values").VId<import("convex/values").GenericId<"operationEvidencePayloads">, "required">;
2289
+ latestPayloadId: import("convex/values").VId<import("convex/values").GenericId<"operationEvidencePayloads">, "required">;
2290
+ producer: import("convex/values").VLiteral<"trusted_host_maintenance", "required">;
2291
+ producerVersion: import("convex/values").VLiteral<1, "required">;
2292
+ firstObservedAt: import("convex/values").VFloat64<number, "required">;
2293
+ sourceCreatedAt: import("convex/values").VFloat64<number, "required">;
2294
+ originalFingerprint: import("convex/values").VString<string, "required">;
2295
+ latestFingerprint: import("convex/values").VString<string, "required">;
2296
+ originalIdentityFingerprint: import("convex/values").VString<string, "required">;
2297
+ operationDigest: import("convex/values").VString<string, "required">;
2298
+ sourceChargeDigest: import("convex/values").VString<string, "required">;
2299
+ generation: import("convex/values").VFloat64<number, "required">;
2300
+ isContradictory: import("convex/values").VBoolean<boolean, "required">;
2301
+ }, "required", "firstObservedAt" | "generation" | "isContradictory" | "latestFingerprint" | "latestPayloadId" | "operationDigest" | "originalFingerprint" | "originalIdentityFingerprint" | "originalPayloadId" | "producer" | "producerVersion" | "sourceChargeDigest" | "sourceCreatedAt" | "sourceId">, {
2302
+ by_operation_digest: ["operationDigest", "_creationTime"];
2303
+ by_source_charge_digest: ["sourceChargeDigest", "_creationTime"];
2304
+ by_source_id: ["sourceId", "_creationTime"];
2305
+ }, {}, {}>;
2306
+ financialTransferObservations: import("convex/server").TableDefinition<import("convex/values").VObject<{
2307
+ bucketKey: string;
2308
+ fingerprint: string;
2309
+ generation: number;
2310
+ isContradictory: boolean;
2311
+ observedFingerprint: string;
2312
+ orgId?: string | undefined;
2313
+ ownershipFingerprint: string;
2314
+ ownershipStatus: "ambiguous" | "contradictory" | "registered" | "unknown";
2315
+ producer: "transfer_fact";
2316
+ producerVersion: 1;
2317
+ registrationId?: import("convex/values").GenericId<"financialOwnership"> | undefined;
2318
+ role?: "affiliate" | "other" | "store" | undefined;
2319
+ sourceChargeId?: string | undefined;
2320
+ sourceInvoiceId?: string | undefined;
2321
+ stripeTransferId: string;
2322
+ transferId: import("convex/values").GenericId<"transfers">;
2323
+ userId?: string | undefined;
2324
+ }, {
2325
+ transferId: import("convex/values").VId<import("convex/values").GenericId<"transfers">, "required">;
2326
+ stripeTransferId: import("convex/values").VString<string, "required">;
2327
+ sourceChargeId: import("convex/values").VString<string | undefined, "optional">;
2328
+ sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
2329
+ bucketKey: import("convex/values").VString<string, "required">;
2330
+ 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>;
2331
+ registrationId: import("convex/values").VId<import("convex/values").GenericId<"financialOwnership"> | undefined, "optional">;
2332
+ userId: import("convex/values").VString<string | undefined, "optional">;
2333
+ orgId: import("convex/values").VString<string | undefined, "optional">;
2334
+ ownershipStatus: import("convex/values").VUnion<"ambiguous" | "contradictory" | "registered" | "unknown", [import("convex/values").VLiteral<"registered", "required">, import("convex/values").VLiteral<"unknown", "required">, import("convex/values").VLiteral<"ambiguous", "required">, import("convex/values").VLiteral<"contradictory", "required">], "required", never>;
2335
+ producer: import("convex/values").VLiteral<"transfer_fact", "required">;
2336
+ producerVersion: import("convex/values").VLiteral<1, "required">;
2337
+ fingerprint: import("convex/values").VString<string, "required">;
2338
+ observedFingerprint: import("convex/values").VString<string, "required">;
2339
+ ownershipFingerprint: import("convex/values").VString<string, "required">;
2340
+ generation: import("convex/values").VFloat64<number, "required">;
2341
+ isContradictory: import("convex/values").VBoolean<boolean, "required">;
2342
+ }, "required", "bucketKey" | "fingerprint" | "generation" | "isContradictory" | "observedFingerprint" | "orgId" | "ownershipFingerprint" | "ownershipStatus" | "producer" | "producerVersion" | "registrationId" | "role" | "sourceChargeId" | "sourceInvoiceId" | "stripeTransferId" | "transferId" | "userId">, {
2343
+ by_bucket_key: ["bucketKey", "_creationTime"];
2344
+ by_owner: ["userId", "orgId", "_creationTime"];
2345
+ by_transfer_id: ["transferId", "_creationTime"];
2346
+ }, {}, {}>;
2347
+ financialTransferBatches: import("convex/server").TableDefinition<import("convex/values").VObject<{
2348
+ continuation?: {
2349
+ nextReference: number;
2350
+ producerGeneration: number;
2351
+ sourceFingerprint: string;
2352
+ state: "complete" | "held" | "indexing" | "validating";
2353
+ validatedReferences: number;
2354
+ } | undefined;
2355
+ fingerprint: string;
2356
+ generation: number;
2357
+ isContradictory: boolean;
2358
+ isOverflow: true;
2359
+ observedFingerprint: string;
2360
+ operationId: string;
2361
+ originalOperationId: import("convex/values").GenericId<"transferReversalOps">;
2362
+ producer: "transfer_frontier_claim" | "transfer_frontier_release";
2363
+ producerVersion: 1;
2364
+ referenceCount: number;
2365
+ sourceChargeId: string;
2366
+ state: "complete" | "pending";
2367
+ transferIds: import("convex/values").GenericId<"transfers">[];
2368
+ }, {
2369
+ originalOperationId: import("convex/values").VId<import("convex/values").GenericId<"transferReversalOps">, "required">;
2370
+ operationId: import("convex/values").VString<string, "required">;
2371
+ sourceChargeId: import("convex/values").VString<string, "required">;
2372
+ producer: import("convex/values").VUnion<"transfer_frontier_claim" | "transfer_frontier_release", [import("convex/values").VLiteral<"transfer_frontier_release", "required">, import("convex/values").VLiteral<"transfer_frontier_claim", "required">], "required", never>;
2373
+ producerVersion: import("convex/values").VLiteral<1, "required">;
2374
+ fingerprint: import("convex/values").VString<string, "required">;
2375
+ generation: import("convex/values").VFloat64<number, "required">;
2376
+ observedFingerprint: import("convex/values").VString<string, "required">;
2377
+ isContradictory: import("convex/values").VBoolean<boolean, "required">;
2378
+ referenceCount: import("convex/values").VFloat64<number, "required">;
2379
+ transferIds: import("convex/values").VArray<import("convex/values").GenericId<"transfers">[], import("convex/values").VId<import("convex/values").GenericId<"transfers">, "required">, "required">;
2380
+ isOverflow: import("convex/values").VLiteral<true, "required">;
2381
+ state: import("convex/values").VUnion<"complete" | "pending", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"complete", "required">], "required", never>;
2382
+ continuation: import("convex/values").VObject<{
2383
+ nextReference: number;
2384
+ producerGeneration: number;
2385
+ sourceFingerprint: string;
2386
+ state: "complete" | "held" | "indexing" | "validating";
2387
+ validatedReferences: number;
2388
+ } | undefined, {
2389
+ state: import("convex/values").VUnion<"complete" | "held" | "indexing" | "validating", [import("convex/values").VLiteral<"indexing", "required">, import("convex/values").VLiteral<"validating", "required">, import("convex/values").VLiteral<"complete", "required">, import("convex/values").VLiteral<"held", "required">], "required", never>;
2390
+ nextReference: import("convex/values").VFloat64<number, "required">;
2391
+ validatedReferences: import("convex/values").VFloat64<number, "required">;
2392
+ producerGeneration: import("convex/values").VFloat64<number, "required">;
2393
+ sourceFingerprint: import("convex/values").VString<string, "required">;
2394
+ }, "optional", "nextReference" | "producerGeneration" | "sourceFingerprint" | "state" | "validatedReferences">;
2395
+ }, "required", "continuation" | "continuation.nextReference" | "continuation.producerGeneration" | "continuation.sourceFingerprint" | "continuation.state" | "continuation.validatedReferences" | "fingerprint" | "generation" | "isContradictory" | "isOverflow" | "observedFingerprint" | "operationId" | "originalOperationId" | "producer" | "producerVersion" | "referenceCount" | "sourceChargeId" | "state" | "transferIds">, {
2396
+ by_operation_id: ["operationId", "_creationTime"];
2397
+ by_original_operation_id: ["originalOperationId", "_creationTime"];
2398
+ by_original_operation_producer: ["originalOperationId", "producer", "_creationTime"];
2399
+ by_state: ["state", "_creationTime"];
2400
+ }, {}, {}>;
2401
+ financialTransferBatchReferences: import("convex/server").TableDefinition<import("convex/values").VObject<{
2402
+ batchId: import("convex/values").GenericId<"financialTransferBatches">;
2403
+ observationGeneration: number;
2404
+ observationId: import("convex/values").GenericId<"financialTransferObservations">;
2405
+ observedFingerprint: string;
2406
+ ownershipFingerprint: string;
2407
+ position: number;
2408
+ sourceFingerprint: string;
2409
+ transferId: import("convex/values").GenericId<"transfers">;
2410
+ }, {
2411
+ batchId: import("convex/values").VId<import("convex/values").GenericId<"financialTransferBatches">, "required">;
2412
+ position: import("convex/values").VFloat64<number, "required">;
2413
+ transferId: import("convex/values").VId<import("convex/values").GenericId<"transfers">, "required">;
2414
+ observationId: import("convex/values").VId<import("convex/values").GenericId<"financialTransferObservations">, "required">;
2415
+ observationGeneration: import("convex/values").VFloat64<number, "required">;
2416
+ sourceFingerprint: import("convex/values").VString<string, "required">;
2417
+ observedFingerprint: import("convex/values").VString<string, "required">;
2418
+ ownershipFingerprint: import("convex/values").VString<string, "required">;
2419
+ }, "required", "batchId" | "observationGeneration" | "observationId" | "observedFingerprint" | "ownershipFingerprint" | "position" | "sourceFingerprint" | "transferId">, {
2420
+ by_batch_position: ["batchId", "position", "_creationTime"];
2421
+ by_batch_transfer: ["batchId", "transferId", "_creationTime"];
2422
+ }, {}, {}>;
2423
+ financialSourceObservations: import("convex/server").TableDefinition<import("convex/values").VObject<{
2424
+ allocationId: import("convex/values").GenericId<"settlementAllocations">;
2425
+ continuation?: {
2426
+ nextLeg: number;
2427
+ state: "complete" | "held" | "indexing" | "validating";
2428
+ validatedLegs: number;
2429
+ } | undefined;
2430
+ fingerprint: string;
2431
+ generation: number;
2432
+ indexedLegCount: number;
2433
+ isContradictory: boolean;
2434
+ isOverflow: boolean;
2435
+ legCount: number;
2436
+ observedFingerprint: string;
2437
+ ownershipFingerprint: string;
2438
+ producer: "settlement_allocation";
2439
+ producerVersion: 1;
2440
+ sourceChargeId: string;
2441
+ }, {
2442
+ allocationId: import("convex/values").VId<import("convex/values").GenericId<"settlementAllocations">, "required">;
2443
+ sourceChargeId: import("convex/values").VString<string, "required">;
2444
+ producer: import("convex/values").VLiteral<"settlement_allocation", "required">;
2445
+ producerVersion: import("convex/values").VLiteral<1, "required">;
2446
+ fingerprint: import("convex/values").VString<string, "required">;
2447
+ observedFingerprint: import("convex/values").VString<string, "required">;
2448
+ ownershipFingerprint: import("convex/values").VString<string, "required">;
2449
+ generation: import("convex/values").VFloat64<number, "required">;
2450
+ legCount: import("convex/values").VFloat64<number, "required">;
2451
+ indexedLegCount: import("convex/values").VFloat64<number, "required">;
2452
+ isOverflow: import("convex/values").VBoolean<boolean, "required">;
2453
+ isContradictory: import("convex/values").VBoolean<boolean, "required">;
2454
+ continuation: import("convex/values").VObject<{
2455
+ nextLeg: number;
2456
+ state: "complete" | "held" | "indexing" | "validating";
2457
+ validatedLegs: number;
2458
+ } | undefined, {
2459
+ state: import("convex/values").VUnion<"complete" | "held" | "indexing" | "validating", [import("convex/values").VLiteral<"indexing", "required">, import("convex/values").VLiteral<"validating", "required">, import("convex/values").VLiteral<"complete", "required">, import("convex/values").VLiteral<"held", "required">], "required", never>;
2460
+ nextLeg: import("convex/values").VFloat64<number, "required">;
2461
+ validatedLegs: import("convex/values").VFloat64<number, "required">;
2462
+ }, "optional", "nextLeg" | "state" | "validatedLegs">;
2463
+ }, "required", "allocationId" | "continuation" | "continuation.nextLeg" | "continuation.state" | "continuation.validatedLegs" | "fingerprint" | "generation" | "indexedLegCount" | "isContradictory" | "isOverflow" | "legCount" | "observedFingerprint" | "ownershipFingerprint" | "producer" | "producerVersion" | "sourceChargeId">, {
2464
+ by_allocation_id: ["allocationId", "_creationTime"];
2465
+ }, {}, {}>;
2466
+ financialSourceLegs: import("convex/server").TableDefinition<import("convex/values").VObject<{
2467
+ allocationId: import("convex/values").GenericId<"settlementAllocations">;
2468
+ bucketKey: string;
2469
+ legIndex: number;
2470
+ orgId?: string | undefined;
2471
+ ownershipStatus: "ambiguous" | "contradictory" | "registered" | "unknown";
2472
+ registrationId?: import("convex/values").GenericId<"financialOwnership"> | undefined;
2473
+ role: "affiliate" | "other" | "store";
2474
+ sourceChargeId: string;
2475
+ userId?: string | undefined;
2476
+ }, {
2477
+ allocationId: import("convex/values").VId<import("convex/values").GenericId<"settlementAllocations">, "required">;
2478
+ sourceChargeId: import("convex/values").VString<string, "required">;
2479
+ legIndex: import("convex/values").VFloat64<number, "required">;
2480
+ bucketKey: import("convex/values").VString<string, "required">;
2481
+ 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>;
2482
+ registrationId: import("convex/values").VId<import("convex/values").GenericId<"financialOwnership"> | undefined, "optional">;
2483
+ userId: import("convex/values").VString<string | undefined, "optional">;
2484
+ orgId: import("convex/values").VString<string | undefined, "optional">;
2485
+ ownershipStatus: import("convex/values").VUnion<"ambiguous" | "contradictory" | "registered" | "unknown", [import("convex/values").VLiteral<"registered", "required">, import("convex/values").VLiteral<"unknown", "required">, import("convex/values").VLiteral<"ambiguous", "required">, import("convex/values").VLiteral<"contradictory", "required">], "required", never>;
2486
+ }, "required", "allocationId" | "bucketKey" | "legIndex" | "orgId" | "ownershipStatus" | "registrationId" | "role" | "sourceChargeId" | "userId">, {
2487
+ by_allocation_id_and_leg_index: ["allocationId", "legIndex", "_creationTime"];
2488
+ by_bucket_key: ["bucketKey", "_creationTime"];
2489
+ by_owner: ["userId", "orgId", "_creationTime"];
2490
+ }, {}, {}>;
2491
+ financialObservationGenerations: import("convex/server").TableDefinition<import("convex/values").VObject<{
2492
+ generation: number;
2493
+ scopeKey: string;
2494
+ }, {
2495
+ scopeKey: import("convex/values").VString<string, "required">;
2496
+ generation: import("convex/values").VFloat64<number, "required">;
2497
+ }, "required", "generation" | "scopeKey">, {
2498
+ by_scope_key: ["scopeKey", "_creationTime"];
2499
+ }, {}, {}>;
2500
+ financialOwnership: import("convex/server").TableDefinition<import("convex/values").VObject<{
2501
+ bucketKey: string;
2502
+ generation: number;
2503
+ kind: "logical" | "stripe_account";
2504
+ orgId?: string | undefined;
2505
+ source: {
2506
+ integration: string;
2507
+ recordId: string;
2508
+ };
2509
+ userId: string;
2510
+ }, {
2511
+ userId: import("convex/values").VString<string, "required">;
2512
+ orgId: import("convex/values").VString<string | undefined, "optional">;
2513
+ bucketKey: import("convex/values").VString<string, "required">;
2514
+ kind: import("convex/values").VUnion<"logical" | "stripe_account", [import("convex/values").VLiteral<"stripe_account", "required">, import("convex/values").VLiteral<"logical", "required">], "required", never>;
2515
+ source: import("convex/values").VObject<{
2516
+ integration: string;
2517
+ recordId: string;
2518
+ }, {
2519
+ integration: import("convex/values").VString<string, "required">;
2520
+ recordId: import("convex/values").VString<string, "required">;
2521
+ }, "required", "integration" | "recordId">;
2522
+ generation: import("convex/values").VFloat64<number, "required">;
2523
+ }, "required", "bucketKey" | "generation" | "kind" | "orgId" | "source" | "source.integration" | "source.recordId" | "userId">, {
2524
+ by_bucket_key: ["bucketKey", "_creationTime"];
2525
+ by_owner: ["userId", "orgId", "_creationTime"];
2526
+ }, {}, {}>;
2527
+ financialOwnershipGenerations: import("convex/server").TableDefinition<import("convex/values").VObject<{
2528
+ generation: number;
2529
+ orgId?: string | undefined;
2530
+ userId: string;
2531
+ }, {
2532
+ userId: import("convex/values").VString<string, "required">;
2533
+ orgId: import("convex/values").VString<string | undefined, "optional">;
2534
+ generation: import("convex/values").VFloat64<number, "required">;
2535
+ }, "required", "generation" | "orgId" | "userId">, {
2536
+ by_owner: ["userId", "orgId", "_creationTime"];
2537
+ }, {}, {}>;
1886
2538
  payoutWorkerJobs: import("convex/server").TableDefinition<import("convex/values").VObject<{
1887
2539
  accountId: string;
1888
2540
  cadenceMs: number;
@@ -3424,11 +4076,19 @@ export declare function withHistory(count?: number, amount?: number): Promise<{
3424
4076
  failureReason?: string | undefined;
3425
4077
  metadata?: any;
3426
4078
  reason?: "duplicate" | "expired_uncaptured_charge" | "fraudulent" | "requested_by_customer" | undefined;
4079
+ refundCommandConflict?: boolean | undefined;
4080
+ refundCommandKey?: string | undefined;
4081
+ refundCommandNormalizationVersion?: 1 | undefined;
4082
+ refundCommandObservedAt?: number | undefined;
3427
4083
  status: "canceled" | "failed" | "pending" | "requires_action" | "succeeded";
3428
4084
  stripeChargeId?: string | undefined;
3429
4085
  stripePaymentIntentId?: string | undefined;
3430
4086
  stripeRefundId: string;
3431
4087
  }, {
4088
+ refundCommandNormalizationVersion: import("convex/values").VLiteral<1 | undefined, "optional">;
4089
+ refundCommandKey: import("convex/values").VString<string | undefined, "optional">;
4090
+ refundCommandConflict: import("convex/values").VBoolean<boolean | undefined, "optional">;
4091
+ refundCommandObservedAt: import("convex/values").VFloat64<number | undefined, "optional">;
3432
4092
  stripeRefundId: import("convex/values").VString<string, "required">;
3433
4093
  stripePaymentIntentId: import("convex/values").VString<string | undefined, "optional">;
3434
4094
  stripeChargeId: import("convex/values").VString<string | undefined, "optional">;
@@ -3439,12 +4099,14 @@ export declare function withHistory(count?: number, amount?: number): Promise<{
3439
4099
  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>;
3440
4100
  failureReason: import("convex/values").VString<string | undefined, "optional">;
3441
4101
  metadata: import("convex/values").VAny<any, "optional", string>;
3442
- }, "required", "accountId" | "amount" | "currency" | "failureReason" | "metadata" | "reason" | "status" | "stripeChargeId" | "stripePaymentIntentId" | "stripeRefundId" | `metadata.${string}`>, {
4102
+ }, "required", "accountId" | "amount" | "currency" | "failureReason" | "metadata" | "reason" | "refundCommandConflict" | "refundCommandKey" | "refundCommandNormalizationVersion" | "refundCommandObservedAt" | "status" | "stripeChargeId" | "stripePaymentIntentId" | "stripeRefundId" | `metadata.${string}`>, {
3443
4103
  by_account_id: ["accountId", "_creationTime"];
3444
4104
  by_account_id_and_status: ["accountId", "status", "_creationTime"];
3445
4105
  by_account_id_and_stripe_payment_intent_id: ["accountId", "stripePaymentIntentId", "_creationTime"];
3446
4106
  by_account_id_and_stripe_payment_intent_id_and_status: ["accountId", "stripePaymentIntentId", "status", "_creationTime"];
3447
4107
  by_payment_intent_id_and_status: ["stripePaymentIntentId", "status", "_creationTime"];
4108
+ by_refund_command_key: ["refundCommandKey", "_creationTime"];
4109
+ by_refund_command_normalization_version: ["refundCommandNormalizationVersion", "_creationTime"];
3448
4110
  by_status: ["status", "_creationTime"];
3449
4111
  by_stripe_payment_intent_id: ["stripePaymentIntentId", "_creationTime"];
3450
4112
  by_stripe_refund_id: ["stripeRefundId", "_creationTime"];