@fantastic.dev/better-stripe 0.33.0 → 0.35.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 (314) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +30 -1
  3. package/dist/client/connect/payoutAdoptionTestHelpers.d.ts +522 -2
  4. package/dist/client/connect/payoutAdoptionTestHelpers.d.ts.map +1 -1
  5. package/dist/client/connect/payoutExecutionTestHelpers.d.ts +261 -1
  6. package/dist/client/connect/payoutExecutionTestHelpers.d.ts.map +1 -1
  7. package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts +522 -2
  8. package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts.map +1 -1
  9. package/dist/client/connect/payoutSyncTestHelpers.d.ts +261 -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/core/accountClosures.d.ts +15 -0
  20. package/dist/client/core/accountClosures.d.ts.map +1 -0
  21. package/dist/client/core/accountClosures.js +10 -0
  22. package/dist/client/core/accountClosures.js.map +1 -0
  23. package/dist/client/core/accounts.d.ts.map +1 -1
  24. package/dist/client/core/accounts.js +15 -23
  25. package/dist/client/core/accounts.js.map +1 -1
  26. package/dist/client/core/personalAccountMapping.d.ts +8 -0
  27. package/dist/client/core/personalAccountMapping.d.ts.map +1 -0
  28. package/dist/client/core/personalAccountMapping.js +11 -0
  29. package/dist/client/core/personalAccountMapping.js.map +1 -0
  30. package/dist/client/financialObservations.d.ts +42 -0
  31. package/dist/client/financialObservations.d.ts.map +1 -0
  32. package/dist/client/financialObservations.js +58 -0
  33. package/dist/client/financialObservations.js.map +1 -0
  34. package/dist/client/financialOwnership.d.ts +52 -0
  35. package/dist/client/financialOwnership.d.ts.map +1 -0
  36. package/dist/client/financialOwnership.js +72 -0
  37. package/dist/client/financialOwnership.js.map +1 -0
  38. package/dist/client/index.d.ts +57 -4
  39. package/dist/client/index.d.ts.map +1 -1
  40. package/dist/client/index.js +15 -2
  41. package/dist/client/index.js.map +1 -1
  42. package/dist/client/observationPagination.d.ts +10 -0
  43. package/dist/client/observationPagination.d.ts.map +1 -0
  44. package/dist/client/observationPagination.js +12 -0
  45. package/dist/client/observationPagination.js.map +1 -0
  46. package/dist/client/publicTypes.d.ts +10 -0
  47. package/dist/client/publicTypes.d.ts.map +1 -0
  48. package/dist/client/publicTypes.js +2 -0
  49. package/dist/client/publicTypes.js.map +1 -0
  50. package/dist/client/readContracts.d.ts +29 -0
  51. package/dist/client/readContracts.d.ts.map +1 -1
  52. package/dist/client/readContracts.js +10 -0
  53. package/dist/client/readContracts.js.map +1 -1
  54. package/dist/client/transferObservations.d.ts +59 -0
  55. package/dist/client/transferObservations.d.ts.map +1 -0
  56. package/dist/client/transferObservations.js +82 -0
  57. package/dist/client/transferObservations.js.map +1 -0
  58. package/dist/component/_generated/component.d.ts +594 -0
  59. package/dist/component/_generated/component.d.ts.map +1 -1
  60. package/dist/component/accountClosure/helpers.d.ts +18 -0
  61. package/dist/component/accountClosure/helpers.d.ts.map +1 -0
  62. package/dist/component/accountClosure/helpers.js +18 -0
  63. package/dist/component/accountClosure/helpers.js.map +1 -0
  64. package/dist/component/accountClosure/mutations.d.ts +20 -0
  65. package/dist/component/accountClosure/mutations.d.ts.map +1 -0
  66. package/dist/component/accountClosure/mutations.js +55 -0
  67. package/dist/component/accountClosure/mutations.js.map +1 -0
  68. package/dist/component/accountClosure/queries.d.ts +34 -0
  69. package/dist/component/accountClosure/queries.d.ts.map +1 -0
  70. package/dist/component/accountClosure/queries.js +36 -0
  71. package/dist/component/accountClosure/queries.js.map +1 -0
  72. package/dist/component/accountClosure/schema.d.ts +46 -0
  73. package/dist/component/accountClosure/schema.d.ts.map +1 -0
  74. package/dist/component/accountClosure/schema.js +20 -0
  75. package/dist/component/accountClosure/schema.js.map +1 -0
  76. package/dist/component/affiliateRecovery/mutations.d.ts.map +1 -1
  77. package/dist/component/affiliateRecovery/mutations.js +4 -1
  78. package/dist/component/affiliateRecovery/mutations.js.map +1 -1
  79. package/dist/component/connect/mutations.d.ts.map +1 -1
  80. package/dist/component/connect/mutations.js +18 -2
  81. package/dist/component/connect/mutations.js.map +1 -1
  82. package/dist/component/connect/queries.d.ts +8 -0
  83. package/dist/component/connect/queries.d.ts.map +1 -1
  84. package/dist/component/connect/reversalClaims.d.ts.map +1 -1
  85. package/dist/component/connect/reversalClaims.js +7 -1
  86. package/dist/component/connect/reversalClaims.js.map +1 -1
  87. package/dist/component/connect/reversalReceipts.d.ts.map +1 -1
  88. package/dist/component/connect/reversalReceipts.js +2 -0
  89. package/dist/component/connect/reversalReceipts.js.map +1 -1
  90. package/dist/component/connect/schema.d.ts +11 -1
  91. package/dist/component/connect/schema.d.ts.map +1 -1
  92. package/dist/component/connect/schema.js +9 -1
  93. package/dist/component/connect/schema.js.map +1 -1
  94. package/dist/component/connect/validators.d.ts +9 -1
  95. package/dist/component/connect/validators.d.ts.map +1 -1
  96. package/dist/component/connect/validators.js +2 -0
  97. package/dist/component/connect/validators.js.map +1 -1
  98. package/dist/component/core/mutations.d.ts.map +1 -1
  99. package/dist/component/core/mutations.js +5 -0
  100. package/dist/component/core/mutations.js.map +1 -1
  101. package/dist/component/core/personalAccountMapping.d.ts +95 -0
  102. package/dist/component/core/personalAccountMapping.d.ts.map +1 -0
  103. package/dist/component/core/personalAccountMapping.js +54 -0
  104. package/dist/component/core/personalAccountMapping.js.map +1 -0
  105. package/dist/component/core/queries.d.ts +27 -0
  106. package/dist/component/core/queries.d.ts.map +1 -1
  107. package/dist/component/core/queries.js +7 -0
  108. package/dist/component/core/queries.js.map +1 -1
  109. package/dist/component/earnings/triggers.d.ts +468 -2
  110. package/dist/component/earnings/triggers.d.ts.map +1 -1
  111. package/dist/component/earnings/triggers.js +7 -1
  112. package/dist/component/earnings/triggers.js.map +1 -1
  113. package/dist/component/financialObservations/continuation.d.ts +7 -0
  114. package/dist/component/financialObservations/continuation.d.ts.map +1 -0
  115. package/dist/component/financialObservations/continuation.js +131 -0
  116. package/dist/component/financialObservations/continuation.js.map +1 -0
  117. package/dist/component/financialObservations/generations.d.ts +6 -0
  118. package/dist/component/financialObservations/generations.d.ts.map +1 -0
  119. package/dist/component/financialObservations/generations.js +46 -0
  120. package/dist/component/financialObservations/generations.js.map +1 -0
  121. package/dist/component/financialObservations/mutations.d.ts +62 -0
  122. package/dist/component/financialObservations/mutations.d.ts.map +1 -0
  123. package/dist/component/financialObservations/mutations.js +69 -0
  124. package/dist/component/financialObservations/mutations.js.map +1 -0
  125. package/dist/component/financialObservations/queries.d.ts +307 -0
  126. package/dist/component/financialObservations/queries.d.ts.map +1 -0
  127. package/dist/component/financialObservations/queries.js +219 -0
  128. package/dist/component/financialObservations/queries.js.map +1 -0
  129. package/dist/component/financialObservations/schema.d.ts +182 -0
  130. package/dist/component/financialObservations/schema.d.ts.map +1 -0
  131. package/dist/component/financialObservations/schema.js +53 -0
  132. package/dist/component/financialObservations/schema.js.map +1 -0
  133. package/dist/component/financialObservations/settlement.d.ts +7 -0
  134. package/dist/component/financialObservations/settlement.d.ts.map +1 -0
  135. package/dist/component/financialObservations/settlement.js +118 -0
  136. package/dist/component/financialObservations/settlement.js.map +1 -0
  137. package/dist/component/financialObservations/settlementHelpers.d.ts +46 -0
  138. package/dist/component/financialObservations/settlementHelpers.d.ts.map +1 -0
  139. package/dist/component/financialObservations/settlementHelpers.js +70 -0
  140. package/dist/component/financialObservations/settlementHelpers.js.map +1 -0
  141. package/dist/component/financialObservations/transferBatches.d.ts +12 -0
  142. package/dist/component/financialObservations/transferBatches.d.ts.map +1 -0
  143. package/dist/component/financialObservations/transferBatches.js +76 -0
  144. package/dist/component/financialObservations/transferBatches.js.map +1 -0
  145. package/dist/component/financialObservations/transferContinuation.d.ts +5 -0
  146. package/dist/component/financialObservations/transferContinuation.d.ts.map +1 -0
  147. package/dist/component/financialObservations/transferContinuation.js +35 -0
  148. package/dist/component/financialObservations/transferContinuation.js.map +1 -0
  149. package/dist/component/financialObservations/transferContinuationState.d.ts +8 -0
  150. package/dist/component/financialObservations/transferContinuationState.d.ts.map +1 -0
  151. package/dist/component/financialObservations/transferContinuationState.js +69 -0
  152. package/dist/component/financialObservations/transferContinuationState.js.map +1 -0
  153. package/dist/component/financialObservations/transferContinuationSteps.d.ts +5 -0
  154. package/dist/component/financialObservations/transferContinuationSteps.d.ts.map +1 -0
  155. package/dist/component/financialObservations/transferContinuationSteps.js +174 -0
  156. package/dist/component/financialObservations/transferContinuationSteps.js.map +1 -0
  157. package/dist/component/financialObservations/transferHelpers.d.ts +18 -0
  158. package/dist/component/financialObservations/transferHelpers.d.ts.map +1 -0
  159. package/dist/component/financialObservations/transferHelpers.js +37 -0
  160. package/dist/component/financialObservations/transferHelpers.js.map +1 -0
  161. package/dist/component/financialObservations/transferReferenceSchema.d.ts +56 -0
  162. package/dist/component/financialObservations/transferReferenceSchema.d.ts.map +1 -0
  163. package/dist/component/financialObservations/transferReferenceSchema.js +21 -0
  164. package/dist/component/financialObservations/transferReferenceSchema.js.map +1 -0
  165. package/dist/component/financialObservations/transferSchema.d.ts +237 -0
  166. package/dist/component/financialObservations/transferSchema.d.ts.map +1 -0
  167. package/dist/component/financialObservations/transferSchema.js +65 -0
  168. package/dist/component/financialObservations/transferSchema.js.map +1 -0
  169. package/dist/component/financialObservations/transfers.d.ts +7 -0
  170. package/dist/component/financialObservations/transfers.d.ts.map +1 -0
  171. package/dist/component/financialObservations/transfers.js +79 -0
  172. package/dist/component/financialObservations/transfers.js.map +1 -0
  173. package/dist/component/financialOwnership/helpers.d.ts +37 -0
  174. package/dist/component/financialOwnership/helpers.d.ts.map +1 -0
  175. package/dist/component/financialOwnership/helpers.js +76 -0
  176. package/dist/component/financialOwnership/helpers.js.map +1 -0
  177. package/dist/component/financialOwnership/mutations.d.ts +28 -0
  178. package/dist/component/financialOwnership/mutations.d.ts.map +1 -0
  179. package/dist/component/financialOwnership/mutations.js +74 -0
  180. package/dist/component/financialOwnership/mutations.js.map +1 -0
  181. package/dist/component/financialOwnership/queries.d.ts +57 -0
  182. package/dist/component/financialOwnership/queries.d.ts.map +1 -0
  183. package/dist/component/financialOwnership/queries.js +50 -0
  184. package/dist/component/financialOwnership/queries.js.map +1 -0
  185. package/dist/component/financialOwnership/schema.d.ts +140 -0
  186. package/dist/component/financialOwnership/schema.d.ts.map +1 -0
  187. package/dist/component/financialOwnership/schema.js +35 -0
  188. package/dist/component/financialOwnership/schema.js.map +1 -0
  189. package/dist/component/payoutRelease/queries.d.ts +2 -2
  190. package/dist/component/payoutRelease/queries.d.ts.map +1 -1
  191. package/dist/component/refundHistory/commandBinding.d.ts +17 -0
  192. package/dist/component/refundHistory/commandBinding.d.ts.map +1 -0
  193. package/dist/component/refundHistory/commandBinding.js +41 -0
  194. package/dist/component/refundHistory/commandBinding.js.map +1 -0
  195. package/dist/component/refundHistory/commandEvidence.d.ts +50 -0
  196. package/dist/component/refundHistory/commandEvidence.d.ts.map +1 -0
  197. package/dist/component/refundHistory/commandEvidence.js +54 -0
  198. package/dist/component/refundHistory/commandEvidence.js.map +1 -0
  199. package/dist/component/refundHistory/commandEvidenceValidator.d.ts +89 -0
  200. package/dist/component/refundHistory/commandEvidenceValidator.d.ts.map +1 -0
  201. package/dist/component/refundHistory/commandEvidenceValidator.js +8 -0
  202. package/dist/component/refundHistory/commandEvidenceValidator.js.map +1 -0
  203. package/dist/component/refundHistory/commandFields.d.ts +8 -0
  204. package/dist/component/refundHistory/commandFields.d.ts.map +1 -0
  205. package/dist/component/refundHistory/commandFields.js +9 -0
  206. package/dist/component/refundHistory/commandFields.js.map +1 -0
  207. package/dist/component/refundHistory/mutations.d.ts +8 -0
  208. package/dist/component/refundHistory/mutations.d.ts.map +1 -0
  209. package/dist/component/refundHistory/mutations.js +25 -0
  210. package/dist/component/refundHistory/mutations.js.map +1 -0
  211. package/dist/component/refundHistory/queries.d.ts +51 -0
  212. package/dist/component/refundHistory/queries.d.ts.map +1 -1
  213. package/dist/component/refundHistory/queries.js +14 -0
  214. package/dist/component/refundHistory/queries.js.map +1 -1
  215. package/dist/component/schema.d.ts +261 -1
  216. package/dist/component/schema.js +14 -0
  217. package/dist/component/schema.js.map +1 -1
  218. package/dist/component/settlement/mutations.d.ts.map +1 -1
  219. package/dist/component/settlement/mutations.js +5 -1
  220. package/dist/component/settlement/mutations.js.map +1 -1
  221. package/dist/shared/refundCommandScope.d.ts +10 -0
  222. package/dist/shared/refundCommandScope.d.ts.map +1 -0
  223. package/dist/shared/refundCommandScope.js +9 -0
  224. package/dist/shared/refundCommandScope.js.map +1 -0
  225. package/docs/financial-observations.md +159 -0
  226. package/docs/financial-ownership.md +54 -0
  227. package/docs/personal-account-mapping.md +54 -0
  228. package/docs/refund-command-evidence.md +49 -0
  229. package/package.json +6 -2
  230. package/src/client/connect/refundCommandEvidence.ts +41 -0
  231. package/src/client/connect/refundCommandNormalization.ts +28 -0
  232. package/src/client/core/account-close-orchestration.test.ts +131 -0
  233. package/src/client/core/account-closure.test.ts +317 -0
  234. package/src/client/core/accountClosures.ts +37 -0
  235. package/src/client/core/accounts.test.ts +0 -111
  236. package/src/client/core/accounts.ts +24 -29
  237. package/src/client/core/personal-account-mapping.test.ts +71 -0
  238. package/src/client/core/personalAccountMapping.ts +23 -0
  239. package/src/client/financialObservations.test.ts +109 -0
  240. package/src/client/financialObservations.ts +106 -0
  241. package/src/client/financialOwnership.test.ts +80 -0
  242. package/src/client/financialOwnership.ts +116 -0
  243. package/src/client/index.ts +38 -35
  244. package/src/client/observationPagination.ts +11 -0
  245. package/src/client/publicTypes.ts +72 -0
  246. package/src/client/readContracts.ts +21 -0
  247. package/src/client/refund-command-evidence.test.ts +68 -0
  248. package/src/client/refund-command-normalization.test.ts +61 -0
  249. package/src/client/transferContinuation.test.ts +94 -0
  250. package/src/client/transferObservations.test.ts +98 -0
  251. package/src/client/transferObservations.ts +180 -0
  252. package/src/component/_generated/api.ts +52 -0
  253. package/src/component/_generated/component.ts +716 -0
  254. package/src/component/accountClosure/helpers.ts +21 -0
  255. package/src/component/accountClosure/mutations.ts +56 -0
  256. package/src/component/accountClosure/queries.ts +43 -0
  257. package/src/component/accountClosure/schema.ts +20 -0
  258. package/src/component/affiliateRecovery/mutations.ts +10 -1
  259. package/src/component/connect/mutations.ts +29 -2
  260. package/src/component/connect/reversalClaims.ts +19 -1
  261. package/src/component/connect/reversalReceipts.ts +2 -0
  262. package/src/component/connect/schema.ts +9 -1
  263. package/src/component/connect/validators.ts +2 -0
  264. package/src/component/core/mutations.ts +3 -0
  265. package/src/component/core/personal-account-mapping.test.ts +173 -0
  266. package/src/component/core/personalAccountMapping.ts +81 -0
  267. package/src/component/core/queries.ts +11 -0
  268. package/src/component/core/reset.test.ts +8 -1
  269. package/src/component/earnings/earnings-totals.test.ts +14 -10
  270. package/src/component/earnings/triggers.ts +9 -1
  271. package/src/component/financialObservations/continuation.test.ts +445 -0
  272. package/src/component/financialObservations/continuation.ts +159 -0
  273. package/src/component/financialObservations/generations.ts +53 -0
  274. package/src/component/financialObservations/mutations.ts +75 -0
  275. package/src/component/financialObservations/observation-boundaries.test.ts +466 -0
  276. package/src/component/financialObservations/queries.ts +246 -0
  277. package/src/component/financialObservations/schema.ts +68 -0
  278. package/src/component/financialObservations/settlement-observations.test.ts +86 -0
  279. package/src/component/financialObservations/settlement.ts +142 -0
  280. package/src/component/financialObservations/settlementHelpers.ts +92 -0
  281. package/src/component/financialObservations/transfer-batches.test.ts +61 -0
  282. package/src/component/financialObservations/transfer-boundaries.test.ts +116 -0
  283. package/src/component/financialObservations/transfer-continuation-guards.test.ts +428 -0
  284. package/src/component/financialObservations/transfer-continuation.test.ts +154 -0
  285. package/src/component/financialObservations/transfer-observations.test.ts +212 -0
  286. package/src/component/financialObservations/transfer-overflow.test.ts +181 -0
  287. package/src/component/financialObservations/transfer-writers.test.ts +162 -0
  288. package/src/component/financialObservations/transferBatches.ts +96 -0
  289. package/src/component/financialObservations/transferContinuation.ts +53 -0
  290. package/src/component/financialObservations/transferContinuationState.ts +85 -0
  291. package/src/component/financialObservations/transferContinuationSteps.ts +232 -0
  292. package/src/component/financialObservations/transferHelpers.ts +38 -0
  293. package/src/component/financialObservations/transferReferenceSchema.ts +20 -0
  294. package/src/component/financialObservations/transferSchema.ts +74 -0
  295. package/src/component/financialObservations/transfers.ts +99 -0
  296. package/src/component/financialOwnership/financial-ownership.test.ts +102 -0
  297. package/src/component/financialOwnership/helpers.ts +98 -0
  298. package/src/component/financialOwnership/mutations.ts +83 -0
  299. package/src/component/financialOwnership/ownership-boundaries.test.ts +308 -0
  300. package/src/component/financialOwnership/queries.ts +65 -0
  301. package/src/component/financialOwnership/schema.ts +35 -0
  302. package/src/component/refundHistory/command-evidence.test.ts +288 -0
  303. package/src/component/refundHistory/command-normalization-resource.test.ts +77 -0
  304. package/src/component/refundHistory/command-normalization.test.ts +229 -0
  305. package/src/component/refundHistory/command-provenance.test.ts +59 -0
  306. package/src/component/refundHistory/commandBinding.ts +54 -0
  307. package/src/component/refundHistory/commandEvidence.ts +71 -0
  308. package/src/component/refundHistory/commandEvidenceValidator.ts +18 -0
  309. package/src/component/refundHistory/commandFields.ts +9 -0
  310. package/src/component/refundHistory/mutations.ts +33 -0
  311. package/src/component/refundHistory/queries.ts +15 -0
  312. package/src/component/schema.ts +24 -0
  313. package/src/component/settlement/mutations.ts +5 -1
  314. package/src/shared/refundCommandScope.ts +19 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transferHelpers.js","sourceRoot":"","sources":["../../../src/component/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EAAE,GAAG,CAAC,gBAAgB;QACtC,cAAc,EAAE,GAAG,CAAC,cAAc;QAClC,eAAe,EAAE,GAAG,CAAC,eAAe;QACpC,oBAAoB,EAAE,GAAG,CAAC,oBAAoB;QAC9C,MAAM,EAAE,GAAG,CAAC,MAAM;QAClB,QAAQ,EAAE,GAAG,CAAC,QAAQ;QACtB,IAAI,EAAE,GAAG,CAAC,IAAI;QACd,SAAS,EAAE,GAAG,CAAC,SAAS;QACxB,aAAa,EAAE,GAAG,CAAC,aAAa;KACjC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,56 @@
1
+ export declare const transferReferenceFields: {
2
+ batchId: import("convex/values").VId<import("convex/values").GenericId<"financialTransferBatches">, "required">;
3
+ position: import("convex/values").VFloat64<number, "required">;
4
+ transferId: import("convex/values").VId<import("convex/values").GenericId<"transfers">, "required">;
5
+ observationId: import("convex/values").VId<import("convex/values").GenericId<"financialTransferObservations">, "required">;
6
+ observationGeneration: import("convex/values").VFloat64<number, "required">;
7
+ sourceFingerprint: import("convex/values").VString<string, "required">;
8
+ observedFingerprint: import("convex/values").VString<string, "required">;
9
+ ownershipFingerprint: import("convex/values").VString<string, "required">;
10
+ };
11
+ export declare const transferReferenceDoc: import("convex/values").VObject<{
12
+ _creationTime: number;
13
+ _id: import("convex/values").GenericId<"financialTransferBatchReferences">;
14
+ batchId: import("convex/values").GenericId<"financialTransferBatches">;
15
+ observationGeneration: number;
16
+ observationId: import("convex/values").GenericId<"financialTransferObservations">;
17
+ observedFingerprint: string;
18
+ ownershipFingerprint: string;
19
+ position: number;
20
+ sourceFingerprint: string;
21
+ transferId: import("convex/values").GenericId<"transfers">;
22
+ }, {
23
+ batchId: import("convex/values").VId<import("convex/values").GenericId<"financialTransferBatches">, "required">;
24
+ position: import("convex/values").VFloat64<number, "required">;
25
+ transferId: import("convex/values").VId<import("convex/values").GenericId<"transfers">, "required">;
26
+ observationId: import("convex/values").VId<import("convex/values").GenericId<"financialTransferObservations">, "required">;
27
+ observationGeneration: import("convex/values").VFloat64<number, "required">;
28
+ sourceFingerprint: import("convex/values").VString<string, "required">;
29
+ observedFingerprint: import("convex/values").VString<string, "required">;
30
+ ownershipFingerprint: import("convex/values").VString<string, "required">;
31
+ _id: import("convex/values").VId<import("convex/values").GenericId<"financialTransferBatchReferences">, "required">;
32
+ _creationTime: import("convex/values").VFloat64<number, "required">;
33
+ }, "required", "_creationTime" | "_id" | "batchId" | "observationGeneration" | "observationId" | "observedFingerprint" | "ownershipFingerprint" | "position" | "sourceFingerprint" | "transferId">;
34
+ export declare const transferBatchReferencesTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
35
+ batchId: import("convex/values").GenericId<"financialTransferBatches">;
36
+ observationGeneration: number;
37
+ observationId: import("convex/values").GenericId<"financialTransferObservations">;
38
+ observedFingerprint: string;
39
+ ownershipFingerprint: string;
40
+ position: number;
41
+ sourceFingerprint: string;
42
+ transferId: import("convex/values").GenericId<"transfers">;
43
+ }, {
44
+ batchId: import("convex/values").VId<import("convex/values").GenericId<"financialTransferBatches">, "required">;
45
+ position: import("convex/values").VFloat64<number, "required">;
46
+ transferId: import("convex/values").VId<import("convex/values").GenericId<"transfers">, "required">;
47
+ observationId: import("convex/values").VId<import("convex/values").GenericId<"financialTransferObservations">, "required">;
48
+ observationGeneration: import("convex/values").VFloat64<number, "required">;
49
+ sourceFingerprint: import("convex/values").VString<string, "required">;
50
+ observedFingerprint: import("convex/values").VString<string, "required">;
51
+ ownershipFingerprint: import("convex/values").VString<string, "required">;
52
+ }, "required", "batchId" | "observationGeneration" | "observationId" | "observedFingerprint" | "ownershipFingerprint" | "position" | "sourceFingerprint" | "transferId">, {
53
+ by_batch_position: ["batchId", "position", "_creationTime"];
54
+ by_batch_transfer: ["batchId", "transferId", "_creationTime"];
55
+ }, {}, {}>;
56
+ //# sourceMappingURL=transferReferenceSchema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transferReferenceSchema.d.ts","sourceRoot":"","sources":["../../../src/component/financialObservations/transferReferenceSchema.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,uBAAuB;IAClC,OAAO;IACP,QAAQ;IACR,UAAU;IACV,aAAa;IACb,qBAAqB;IACrB,iBAAiB;IACjB,mBAAmB;IACnB,oBAAoB;CACrB,CAAC;AACF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;kMAI/B,CAAC;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;UAEe,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { defineTable } from "convex/server";
2
+ import { v } from "convex/values";
3
+ export const transferReferenceFields = {
4
+ batchId: v.id("financialTransferBatches"),
5
+ position: v.number(),
6
+ transferId: v.id("transfers"),
7
+ observationId: v.id("financialTransferObservations"),
8
+ observationGeneration: v.number(),
9
+ sourceFingerprint: v.string(),
10
+ observedFingerprint: v.string(),
11
+ ownershipFingerprint: v.string(),
12
+ };
13
+ export const transferReferenceDoc = v.object({
14
+ ...transferReferenceFields,
15
+ _id: v.id("financialTransferBatchReferences"),
16
+ _creationTime: v.number(),
17
+ });
18
+ export const transferBatchReferencesTable = defineTable(transferReferenceFields)
19
+ .index("by_batch_position", ["batchId", "position"])
20
+ .index("by_batch_transfer", ["batchId", "transferId"]);
21
+ //# sourceMappingURL=transferReferenceSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transferReferenceSchema.js","sourceRoot":"","sources":["../../../src/component/financialObservations/transferReferenceSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,0BAA0B,CAAC;IACzC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,WAAW,CAAC;IAC7B,aAAa,EAAE,CAAC,CAAC,EAAE,CAAC,+BAA+B,CAAC;IACpD,qBAAqB,EAAE,CAAC,CAAC,MAAM,EAAE;IACjC,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC7B,mBAAmB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC/B,oBAAoB,EAAE,CAAC,CAAC,MAAM,EAAE;CACjC,CAAC;AACF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,GAAG,uBAAuB;IAC1B,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,kCAAkC,CAAC;IAC7C,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;CAC1B,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,WAAW,CAAC,uBAAuB,CAAC;KAC7E,KAAK,CAAC,mBAAmB,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;KACnD,KAAK,CAAC,mBAAmB,EAAE,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC"}
@@ -0,0 +1,237 @@
1
+ export declare const transferFields: {
2
+ transferId: import("convex/values").VId<import("convex/values").GenericId<"transfers">, "required">;
3
+ stripeTransferId: import("convex/values").VString<string, "required">;
4
+ sourceChargeId: import("convex/values").VString<string | undefined, "optional">;
5
+ sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
6
+ bucketKey: import("convex/values").VString<string, "required">;
7
+ 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>;
8
+ registrationId: import("convex/values").VId<import("convex/values").GenericId<"financialOwnership"> | undefined, "optional">;
9
+ userId: import("convex/values").VString<string | undefined, "optional">;
10
+ orgId: import("convex/values").VString<string | undefined, "optional">;
11
+ 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>;
12
+ producer: import("convex/values").VLiteral<"transfer_fact", "required">;
13
+ producerVersion: import("convex/values").VLiteral<1, "required">;
14
+ fingerprint: import("convex/values").VString<string, "required">;
15
+ observedFingerprint: import("convex/values").VString<string, "required">;
16
+ ownershipFingerprint: import("convex/values").VString<string, "required">;
17
+ generation: import("convex/values").VFloat64<number, "required">;
18
+ isContradictory: import("convex/values").VBoolean<boolean, "required">;
19
+ };
20
+ export declare const transferObservationDoc: import("convex/values").VObject<{
21
+ _creationTime: number;
22
+ _id: import("convex/values").GenericId<"financialTransferObservations">;
23
+ bucketKey: string;
24
+ fingerprint: string;
25
+ generation: number;
26
+ isContradictory: boolean;
27
+ observedFingerprint: string;
28
+ orgId?: string | undefined;
29
+ ownershipFingerprint: string;
30
+ ownershipStatus: "ambiguous" | "contradictory" | "registered" | "unknown";
31
+ producer: "transfer_fact";
32
+ producerVersion: 1;
33
+ registrationId?: import("convex/values").GenericId<"financialOwnership"> | undefined;
34
+ role?: "affiliate" | "other" | "store" | undefined;
35
+ sourceChargeId?: string | undefined;
36
+ sourceInvoiceId?: string | undefined;
37
+ stripeTransferId: string;
38
+ transferId: import("convex/values").GenericId<"transfers">;
39
+ userId?: string | undefined;
40
+ }, {
41
+ transferId: import("convex/values").VId<import("convex/values").GenericId<"transfers">, "required">;
42
+ stripeTransferId: import("convex/values").VString<string, "required">;
43
+ sourceChargeId: import("convex/values").VString<string | undefined, "optional">;
44
+ sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
45
+ bucketKey: import("convex/values").VString<string, "required">;
46
+ 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>;
47
+ registrationId: import("convex/values").VId<import("convex/values").GenericId<"financialOwnership"> | undefined, "optional">;
48
+ userId: import("convex/values").VString<string | undefined, "optional">;
49
+ orgId: import("convex/values").VString<string | undefined, "optional">;
50
+ 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>;
51
+ producer: import("convex/values").VLiteral<"transfer_fact", "required">;
52
+ producerVersion: import("convex/values").VLiteral<1, "required">;
53
+ fingerprint: import("convex/values").VString<string, "required">;
54
+ observedFingerprint: import("convex/values").VString<string, "required">;
55
+ ownershipFingerprint: import("convex/values").VString<string, "required">;
56
+ generation: import("convex/values").VFloat64<number, "required">;
57
+ isContradictory: import("convex/values").VBoolean<boolean, "required">;
58
+ _id: import("convex/values").VId<import("convex/values").GenericId<"financialTransferObservations">, "required">;
59
+ _creationTime: import("convex/values").VFloat64<number, "required">;
60
+ }, "required", "_creationTime" | "_id" | "bucketKey" | "fingerprint" | "generation" | "isContradictory" | "observedFingerprint" | "orgId" | "ownershipFingerprint" | "ownershipStatus" | "producer" | "producerVersion" | "registrationId" | "role" | "sourceChargeId" | "sourceInvoiceId" | "stripeTransferId" | "transferId" | "userId">;
61
+ export declare const transferObservationsTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
62
+ bucketKey: string;
63
+ fingerprint: string;
64
+ generation: number;
65
+ isContradictory: boolean;
66
+ observedFingerprint: string;
67
+ orgId?: string | undefined;
68
+ ownershipFingerprint: string;
69
+ ownershipStatus: "ambiguous" | "contradictory" | "registered" | "unknown";
70
+ producer: "transfer_fact";
71
+ producerVersion: 1;
72
+ registrationId?: import("convex/values").GenericId<"financialOwnership"> | undefined;
73
+ role?: "affiliate" | "other" | "store" | undefined;
74
+ sourceChargeId?: string | undefined;
75
+ sourceInvoiceId?: string | undefined;
76
+ stripeTransferId: string;
77
+ transferId: import("convex/values").GenericId<"transfers">;
78
+ userId?: string | undefined;
79
+ }, {
80
+ transferId: import("convex/values").VId<import("convex/values").GenericId<"transfers">, "required">;
81
+ stripeTransferId: import("convex/values").VString<string, "required">;
82
+ sourceChargeId: import("convex/values").VString<string | undefined, "optional">;
83
+ sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
84
+ bucketKey: import("convex/values").VString<string, "required">;
85
+ 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>;
86
+ registrationId: import("convex/values").VId<import("convex/values").GenericId<"financialOwnership"> | undefined, "optional">;
87
+ userId: import("convex/values").VString<string | undefined, "optional">;
88
+ orgId: import("convex/values").VString<string | undefined, "optional">;
89
+ 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>;
90
+ producer: import("convex/values").VLiteral<"transfer_fact", "required">;
91
+ producerVersion: import("convex/values").VLiteral<1, "required">;
92
+ fingerprint: import("convex/values").VString<string, "required">;
93
+ observedFingerprint: import("convex/values").VString<string, "required">;
94
+ ownershipFingerprint: import("convex/values").VString<string, "required">;
95
+ generation: import("convex/values").VFloat64<number, "required">;
96
+ isContradictory: import("convex/values").VBoolean<boolean, "required">;
97
+ }, "required", "bucketKey" | "fingerprint" | "generation" | "isContradictory" | "observedFingerprint" | "orgId" | "ownershipFingerprint" | "ownershipStatus" | "producer" | "producerVersion" | "registrationId" | "role" | "sourceChargeId" | "sourceInvoiceId" | "stripeTransferId" | "transferId" | "userId">, {
98
+ by_bucket_key: ["bucketKey", "_creationTime"];
99
+ by_owner: ["userId", "orgId", "_creationTime"];
100
+ by_transfer_id: ["transferId", "_creationTime"];
101
+ }, {}, {}>;
102
+ export declare const transferBatchFields: {
103
+ originalOperationId: import("convex/values").VId<import("convex/values").GenericId<"transferReversalOps">, "required">;
104
+ operationId: import("convex/values").VString<string, "required">;
105
+ sourceChargeId: import("convex/values").VString<string, "required">;
106
+ 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>;
107
+ producerVersion: import("convex/values").VLiteral<1, "required">;
108
+ fingerprint: import("convex/values").VString<string, "required">;
109
+ generation: import("convex/values").VFloat64<number, "required">;
110
+ observedFingerprint: import("convex/values").VString<string, "required">;
111
+ isContradictory: import("convex/values").VBoolean<boolean, "required">;
112
+ referenceCount: import("convex/values").VFloat64<number, "required">;
113
+ transferIds: import("convex/values").VArray<import("convex/values").GenericId<"transfers">[], import("convex/values").VId<import("convex/values").GenericId<"transfers">, "required">, "required">;
114
+ isOverflow: import("convex/values").VLiteral<true, "required">;
115
+ state: import("convex/values").VUnion<"complete" | "pending", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"complete", "required">], "required", never>;
116
+ continuation: import("convex/values").VObject<{
117
+ nextReference: number;
118
+ producerGeneration: number;
119
+ sourceFingerprint: string;
120
+ state: "complete" | "held" | "indexing" | "validating";
121
+ validatedReferences: number;
122
+ } | undefined, {
123
+ 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>;
124
+ nextReference: import("convex/values").VFloat64<number, "required">;
125
+ validatedReferences: import("convex/values").VFloat64<number, "required">;
126
+ producerGeneration: import("convex/values").VFloat64<number, "required">;
127
+ sourceFingerprint: import("convex/values").VString<string, "required">;
128
+ }, "optional", "nextReference" | "producerGeneration" | "sourceFingerprint" | "state" | "validatedReferences">;
129
+ };
130
+ export declare const transferBatchDoc: import("convex/values").VObject<{
131
+ _creationTime: number;
132
+ _id: import("convex/values").GenericId<"financialTransferBatches">;
133
+ continuation?: {
134
+ nextReference: number;
135
+ producerGeneration: number;
136
+ sourceFingerprint: string;
137
+ state: "complete" | "held" | "indexing" | "validating";
138
+ validatedReferences: number;
139
+ } | undefined;
140
+ fingerprint: string;
141
+ generation: number;
142
+ isContradictory: boolean;
143
+ isOverflow: true;
144
+ observedFingerprint: string;
145
+ operationId: string;
146
+ originalOperationId: import("convex/values").GenericId<"transferReversalOps">;
147
+ producer: "transfer_frontier_claim" | "transfer_frontier_release";
148
+ producerVersion: 1;
149
+ referenceCount: number;
150
+ sourceChargeId: string;
151
+ state: "complete" | "pending";
152
+ transferIds: import("convex/values").GenericId<"transfers">[];
153
+ }, {
154
+ originalOperationId: import("convex/values").VId<import("convex/values").GenericId<"transferReversalOps">, "required">;
155
+ operationId: import("convex/values").VString<string, "required">;
156
+ sourceChargeId: import("convex/values").VString<string, "required">;
157
+ 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>;
158
+ producerVersion: import("convex/values").VLiteral<1, "required">;
159
+ fingerprint: import("convex/values").VString<string, "required">;
160
+ generation: import("convex/values").VFloat64<number, "required">;
161
+ observedFingerprint: import("convex/values").VString<string, "required">;
162
+ isContradictory: import("convex/values").VBoolean<boolean, "required">;
163
+ referenceCount: import("convex/values").VFloat64<number, "required">;
164
+ transferIds: import("convex/values").VArray<import("convex/values").GenericId<"transfers">[], import("convex/values").VId<import("convex/values").GenericId<"transfers">, "required">, "required">;
165
+ isOverflow: import("convex/values").VLiteral<true, "required">;
166
+ state: import("convex/values").VUnion<"complete" | "pending", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"complete", "required">], "required", never>;
167
+ continuation: import("convex/values").VObject<{
168
+ nextReference: number;
169
+ producerGeneration: number;
170
+ sourceFingerprint: string;
171
+ state: "complete" | "held" | "indexing" | "validating";
172
+ validatedReferences: number;
173
+ } | undefined, {
174
+ 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>;
175
+ nextReference: import("convex/values").VFloat64<number, "required">;
176
+ validatedReferences: import("convex/values").VFloat64<number, "required">;
177
+ producerGeneration: import("convex/values").VFloat64<number, "required">;
178
+ sourceFingerprint: import("convex/values").VString<string, "required">;
179
+ }, "optional", "nextReference" | "producerGeneration" | "sourceFingerprint" | "state" | "validatedReferences">;
180
+ _id: import("convex/values").VId<import("convex/values").GenericId<"financialTransferBatches">, "required">;
181
+ _creationTime: import("convex/values").VFloat64<number, "required">;
182
+ }, "required", "_creationTime" | "_id" | "continuation" | "continuation.nextReference" | "continuation.producerGeneration" | "continuation.sourceFingerprint" | "continuation.state" | "continuation.validatedReferences" | "fingerprint" | "generation" | "isContradictory" | "isOverflow" | "observedFingerprint" | "operationId" | "originalOperationId" | "producer" | "producerVersion" | "referenceCount" | "sourceChargeId" | "state" | "transferIds">;
183
+ export declare const transferBatchesTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
184
+ continuation?: {
185
+ nextReference: number;
186
+ producerGeneration: number;
187
+ sourceFingerprint: string;
188
+ state: "complete" | "held" | "indexing" | "validating";
189
+ validatedReferences: number;
190
+ } | undefined;
191
+ fingerprint: string;
192
+ generation: number;
193
+ isContradictory: boolean;
194
+ isOverflow: true;
195
+ observedFingerprint: string;
196
+ operationId: string;
197
+ originalOperationId: import("convex/values").GenericId<"transferReversalOps">;
198
+ producer: "transfer_frontier_claim" | "transfer_frontier_release";
199
+ producerVersion: 1;
200
+ referenceCount: number;
201
+ sourceChargeId: string;
202
+ state: "complete" | "pending";
203
+ transferIds: import("convex/values").GenericId<"transfers">[];
204
+ }, {
205
+ originalOperationId: import("convex/values").VId<import("convex/values").GenericId<"transferReversalOps">, "required">;
206
+ operationId: import("convex/values").VString<string, "required">;
207
+ sourceChargeId: import("convex/values").VString<string, "required">;
208
+ 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>;
209
+ producerVersion: import("convex/values").VLiteral<1, "required">;
210
+ fingerprint: import("convex/values").VString<string, "required">;
211
+ generation: import("convex/values").VFloat64<number, "required">;
212
+ observedFingerprint: import("convex/values").VString<string, "required">;
213
+ isContradictory: import("convex/values").VBoolean<boolean, "required">;
214
+ referenceCount: import("convex/values").VFloat64<number, "required">;
215
+ transferIds: import("convex/values").VArray<import("convex/values").GenericId<"transfers">[], import("convex/values").VId<import("convex/values").GenericId<"transfers">, "required">, "required">;
216
+ isOverflow: import("convex/values").VLiteral<true, "required">;
217
+ state: import("convex/values").VUnion<"complete" | "pending", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"complete", "required">], "required", never>;
218
+ continuation: import("convex/values").VObject<{
219
+ nextReference: number;
220
+ producerGeneration: number;
221
+ sourceFingerprint: string;
222
+ state: "complete" | "held" | "indexing" | "validating";
223
+ validatedReferences: number;
224
+ } | undefined, {
225
+ 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>;
226
+ nextReference: import("convex/values").VFloat64<number, "required">;
227
+ validatedReferences: import("convex/values").VFloat64<number, "required">;
228
+ producerGeneration: import("convex/values").VFloat64<number, "required">;
229
+ sourceFingerprint: import("convex/values").VString<string, "required">;
230
+ }, "optional", "nextReference" | "producerGeneration" | "sourceFingerprint" | "state" | "validatedReferences">;
231
+ }, "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">, {
232
+ by_operation_id: ["operationId", "_creationTime"];
233
+ by_original_operation_id: ["originalOperationId", "_creationTime"];
234
+ by_original_operation_producer: ["originalOperationId", "producer", "_creationTime"];
235
+ by_state: ["state", "_creationTime"];
236
+ }, {}, {}>;
237
+ //# sourceMappingURL=transferSchema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transferSchema.d.ts","sourceRoot":"","sources":["../../../src/component/financialObservations/transferSchema.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc;IACzB,UAAU;IACV,gBAAgB;IAChB,cAAc;IACd,eAAe;IACf,SAAS;IACT,IAAI;IACJ,cAAc;IACd,MAAM;IACN,KAAK;IACL,eAAe;IACf,QAAQ;IACR,eAAe;IACf,WAAW;IACX,mBAAmB;IACnB,oBAAoB;IACpB,UAAU;IACV,eAAe;CAChB,CAAC;AACF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0UAIjC,CAAC;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAGG,CAAC;AAC1C,eAAO,MAAM,mBAAmB;IAC9B,mBAAmB;IACnB,WAAW;IACX,cAAc;IACd,QAAQ;IAIR,eAAe;IACf,WAAW;IACX,UAAU;IACV,mBAAmB;IACnB,eAAe;IACf,cAAc;IACd,WAAW;IACX,UAAU;IACV,KAAK;IACL,YAAY;;;;;;;;;;;;;CAcb,CAAC;AACF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6bAI3B,CAAC;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAIF,CAAC"}
@@ -0,0 +1,65 @@
1
+ import { defineTable } from "convex/server";
2
+ import { v } from "convex/values";
3
+ import { splitRecipientRoleValidator } from "../lib/fees.js";
4
+ import { legFields } from "./schema.js";
5
+ export const transferFields = {
6
+ transferId: v.id("transfers"),
7
+ stripeTransferId: v.string(),
8
+ sourceChargeId: v.optional(v.string()),
9
+ sourceInvoiceId: v.optional(v.string()),
10
+ bucketKey: v.string(),
11
+ role: v.optional(splitRecipientRoleValidator),
12
+ registrationId: legFields.registrationId,
13
+ userId: legFields.userId,
14
+ orgId: legFields.orgId,
15
+ ownershipStatus: legFields.ownershipStatus,
16
+ producer: v.literal("transfer_fact"),
17
+ producerVersion: v.literal(1),
18
+ fingerprint: v.string(),
19
+ observedFingerprint: v.string(),
20
+ ownershipFingerprint: v.string(),
21
+ generation: v.number(),
22
+ isContradictory: v.boolean(),
23
+ };
24
+ export const transferObservationDoc = v.object({
25
+ ...transferFields,
26
+ _id: v.id("financialTransferObservations"),
27
+ _creationTime: v.number(),
28
+ });
29
+ export const transferObservationsTable = defineTable(transferFields)
30
+ .index("by_transfer_id", ["transferId"])
31
+ .index("by_bucket_key", ["bucketKey"])
32
+ .index("by_owner", ["userId", "orgId"]);
33
+ export const transferBatchFields = {
34
+ originalOperationId: v.id("transferReversalOps"),
35
+ operationId: v.string(),
36
+ sourceChargeId: v.string(),
37
+ producer: v.union(v.literal("transfer_frontier_release"), v.literal("transfer_frontier_claim")),
38
+ producerVersion: v.literal(1),
39
+ fingerprint: v.string(),
40
+ generation: v.number(),
41
+ observedFingerprint: v.string(),
42
+ isContradictory: v.boolean(),
43
+ referenceCount: v.number(),
44
+ transferIds: v.array(v.id("transfers")),
45
+ isOverflow: v.literal(true),
46
+ state: v.union(v.literal("pending"), v.literal("complete")),
47
+ continuation: v.optional(v.object({
48
+ state: v.union(v.literal("indexing"), v.literal("validating"), v.literal("complete"), v.literal("held")),
49
+ nextReference: v.number(),
50
+ validatedReferences: v.number(),
51
+ producerGeneration: v.number(),
52
+ sourceFingerprint: v.string(),
53
+ })),
54
+ };
55
+ export const transferBatchDoc = v.object({
56
+ ...transferBatchFields,
57
+ _id: v.id("financialTransferBatches"),
58
+ _creationTime: v.number(),
59
+ });
60
+ export const transferBatchesTable = defineTable(transferBatchFields)
61
+ .index("by_original_operation_id", ["originalOperationId"])
62
+ .index("by_original_operation_producer", ["originalOperationId", "producer"])
63
+ .index("by_operation_id", ["operationId"])
64
+ .index("by_state", ["state"]);
65
+ //# sourceMappingURL=transferSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transferSchema.js","sourceRoot":"","sources":["../../../src/component/financialObservations/transferSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,OAAO,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,WAAW,CAAC;IAC7B,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC5B,cAAc,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACtC,eAAe,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACvC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,2BAA2B,CAAC;IAC7C,cAAc,EAAE,SAAS,CAAC,cAAc;IACxC,MAAM,EAAE,SAAS,CAAC,MAAM;IACxB,KAAK,EAAE,SAAS,CAAC,KAAK;IACtB,eAAe,EAAE,SAAS,CAAC,eAAe;IAC1C,QAAQ,EAAE,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC;IACpC,eAAe,EAAE,CAAC,CAAC,OAAO,C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AAa,CAAC,CAAC;KACzC,KAAK,CAAC,UAAU,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { Doc } from "../_generated/dataModel.js";
2
+ import type { MutationCtx } from "../_generated/server.js";
3
+ /** Record references only; never reject or rewrite a financial source to repair diagnostics. */
4
+ export declare function observeTransfer(ctx: MutationCtx, row: Doc<"transfers">, options?: {
5
+ preserveUnregisteredOwnership?: boolean;
6
+ }): Promise<void>;
7
+ //# sourceMappingURL=transfers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transfers.d.ts","sourceRoot":"","sources":["../../../src/component/financialObservations/transfers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAQ3D,gGAAgG;AAChG,wBAAsB,eAAe,CACnC,GAAG,EAAE,WAAW,EAChB,GAAG,EAAE,GAAG,CAAC,WAAW,CAAC,EACrB,OAAO,GAAE;IAAE,6BAA6B,CAAC,EAAE,OAAO,CAAA;CAAO,iBAqF1D"}
@@ -0,0 +1,79 @@
1
+ import { advanceObservationGeneration } from "./generations.js";
2
+ import { invalidate, legOwnership } from "./settlementHelpers.js";
3
+ import { transferFingerprint, transferIdentity, transferProducerScope, } from "./transferHelpers.js";
4
+ /** Record references only; never reject or rewrite a financial source to repair diagnostics. */
5
+ export async function observeTransfer(ctx, row, options = {}) {
6
+ const markers = await ctx.db
7
+ .query("financialTransferObservations")
8
+ .withIndex("by_transfer_id", (q) => q.eq("transferId", row._id))
9
+ .take(2);
10
+ if (markers.length > 1) {
11
+ await advanceObservationGeneration(ctx, transferProducerScope);
12
+ return;
13
+ }
14
+ const prior = markers[0];
15
+ const identity = await transferFingerprint(transferIdentity(row));
16
+ const { totalsRecorded, ...financial } = row;
17
+ void totalsRecorded;
18
+ const observedFingerprint = await transferFingerprint(financial);
19
+ const ownership = options.preserveUnregisteredOwnership && prior && !prior.registrationId
20
+ ? {
21
+ registrationId: prior.registrationId,
22
+ userId: prior.userId,
23
+ orgId: prior.orgId,
24
+ ownershipStatus: prior.ownershipStatus,
25
+ }
26
+ : await legOwnership(ctx, prior?.bucketKey ?? row.destinationAccountId, prior);
27
+ const ownershipFingerprint = await transferFingerprint(ownership);
28
+ const sourceRows = await ctx.db
29
+ .query("transfers")
30
+ .withIndex("by_stripe_transfer_id", (q) => q.eq("stripeTransferId", row.stripeTransferId))
31
+ .take(2);
32
+ const isContradictory = sourceRows.length !== 1 ||
33
+ sourceRows[0]?._id !== row._id ||
34
+ prior?.isContradictory === true ||
35
+ (prior !== undefined && prior.fingerprint !== identity);
36
+ if (prior?.observedFingerprint === observedFingerprint &&
37
+ prior.ownershipFingerprint === ownershipFingerprint &&
38
+ prior.isContradictory === isContradictory)
39
+ return;
40
+ const generation = (prior?.generation ?? 0) + 1;
41
+ if (!Number.isSafeInteger(generation) ||
42
+ generation < 1 ||
43
+ (prior && prior.generation < 1)) {
44
+ if (prior)
45
+ await ctx.db.patch("financialTransferObservations", prior._id, {
46
+ generation: 0,
47
+ isContradictory: true,
48
+ });
49
+ await advanceObservationGeneration(ctx, transferProducerScope);
50
+ return;
51
+ }
52
+ const fields = {
53
+ transferId: row._id,
54
+ stripeTransferId: prior?.stripeTransferId ?? row.stripeTransferId,
55
+ sourceChargeId: prior ? prior.sourceChargeId : row.sourceChargeId,
56
+ sourceInvoiceId: prior ? prior.sourceInvoiceId : row.sourceInvoiceId,
57
+ bucketKey: prior?.bucketKey ?? row.destinationAccountId,
58
+ role: prior ? prior.role : row.role,
59
+ ...ownership,
60
+ producer: "transfer_fact",
61
+ producerVersion: 1,
62
+ fingerprint: prior?.fingerprint ?? identity,
63
+ observedFingerprint,
64
+ ownershipFingerprint,
65
+ generation,
66
+ isContradictory,
67
+ };
68
+ if (prior)
69
+ await ctx.db.patch("financialTransferObservations", prior._id, fields);
70
+ else
71
+ await ctx.db.insert("financialTransferObservations", fields);
72
+ await invalidate(ctx, [
73
+ ...(prior ? [prior] : []),
74
+ fields,
75
+ { bucketKey: row.destinationAccountId },
76
+ ]);
77
+ await advanceObservationGeneration(ctx, transferProducerScope);
78
+ }
79
+ //# sourceMappingURL=transfers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transfers.js","sourceRoot":"","sources":["../../../src/component/financialObservations/transfers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,4BAA4B,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAC9B,gGAAgG;AAChG,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,GAAgB,EAChB,GAAqB,EACrB,OAAO,GAAgD,EAAE;IAEzD,MAAM,OAAO,GAAG,MAAM,GAAG,CAAC,EAAE;SACzB,KAAK,CAAC,+BAA+B,CAAC;SACtC,SAAS,CAAC,gBAAgB,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,YAAY,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;SAC/D,IAAI,CAAC,CAAC,CAAC,CAAC;IACX,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvB,MAAM,4BAA4B,CAAC,GAAG,EAAE,qBAAqB,CAAC,CAAC;QAC/D,OAAO;IACT,CAAC;IACD,MAAM,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACzB,MAAM,QAAQ,GAAG,MAAM,mBAAmB,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC;IAClE,MAAM,EAAE,cAAc,EAAE,GAAG,SAAS,EAAE,GAAG,GAAG,CAAC;IAC7C,KAAK,cAAc,CAAC;IACpB,MAAM,mBAAmB,GAAG,MAAM,mBAAmB,CAAC,SA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,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACzB,MAAM;QACN,EAAE,SAAS,EAAE,GAAG,CAAC,oBAAoB,EAAE;KACxC,CAAC,CAAC;IACH,MAAM,4BAA4B,CAAC,GAAG,EAAE,qBAAqB,CAAC,CAAC;AACjE,CAAC"}
@@ -0,0 +1,37 @@
1
+ import type { QueryCtx } from "../_generated/server.js";
2
+ export type Owner = {
3
+ userId: string;
4
+ orgId?: string;
5
+ };
6
+ export declare function assertSelector(value: string): void;
7
+ export declare function assertOwner(owner: Owner): void;
8
+ export declare function sameOwner(a: Owner, b: Owner): boolean;
9
+ export declare function registrationByKey(ctx: QueryCtx, bucketKey: string): Promise<{
10
+ _creationTime: number;
11
+ _id: import("convex/values").GenericId<"financialOwnership">;
12
+ bucketKey: string;
13
+ generation: number;
14
+ kind: "logical" | "stripe_account";
15
+ orgId?: string | undefined;
16
+ source: {
17
+ integration: string;
18
+ recordId: string;
19
+ };
20
+ userId: string;
21
+ }>;
22
+ export declare function ownerGeneration(ctx: QueryCtx, owner: Owner): Promise<{
23
+ _creationTime: number;
24
+ _id: import("convex/values").GenericId<"financialOwnershipGenerations">;
25
+ generation: number;
26
+ orgId?: string | undefined;
27
+ userId: string;
28
+ }>;
29
+ /** Physical provenance only; neither onboarding nor financial eligibility is established. */
30
+ export declare function physicalSource(ctx: QueryCtx, bucketKey: string, owner: Owner): Promise<{
31
+ integration: string;
32
+ recordId: import("convex/values").GenericId<"accountClosures">;
33
+ } | {
34
+ integration: string;
35
+ recordId: import("convex/values").GenericId<"accounts">;
36
+ }>;
37
+ //# sourceMappingURL=helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/component/financialOwnership/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAMxD,MAAM,MAAM,KAAK,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AACvD,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,QAE3C;AACD,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,QAGvC;AACD,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,WAE3C;AACD,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM;;;;;;;;;;;;GAQvE;AACD,wBAAsB,eAAe,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK;;;;;;GAehE;AACD,6FAA6F;AAC7F,wBAAsB,cAAc,CAClC,GAAG,EAAE,QAAQ,EACb,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,KAAK;;;;;;GAmDb"}