@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,131 @@
1
+ import { hasInvalidLegIdentity, invalidate, legOwnership, settlementFingerprint, } from "./settlementHelpers.js";
2
+ const batchLimit = 100;
3
+ async function hold(ctx, marker) {
4
+ await ctx.db.patch("financialSourceObservations", marker._id, {
5
+ isContradictory: true,
6
+ generation: Number.isSafeInteger(marker.generation + 1)
7
+ ? marker.generation + 1
8
+ : 0,
9
+ continuation: {
10
+ state: "held",
11
+ nextLeg: marker.indexedLegCount,
12
+ validatedLegs: marker.continuation?.validatedLegs ?? 0,
13
+ },
14
+ });
15
+ }
16
+ async function indexBatch(ctx, row, marker) {
17
+ const start = marker.continuation?.nextLeg ?? 0;
18
+ const end = Math.min(start + batchLimit, row.transfers.length);
19
+ const existing = await ctx.db
20
+ .query("financialSourceLegs")
21
+ .withIndex("by_allocation_id_and_leg_index", (q) => q.eq("allocationId", row._id).gte("legIndex", start))
22
+ .take(1);
23
+ if (existing.length)
24
+ return hold(ctx, marker);
25
+ const legs = [];
26
+ for (let i = start; i < end; i++) {
27
+ const original = row.transfers[i];
28
+ const leg = {
29
+ allocationId: row._id,
30
+ sourceChargeId: row.sourceChargeId,
31
+ legIndex: i,
32
+ bucketKey: original.destinationAccountId,
33
+ role: original.role,
34
+ ...(await legOwnership(ctx, original.destinationAccountId, undefined)),
35
+ };
36
+ legs.push(leg);
37
+ await ctx.db.insert("financialSourceLegs", leg);
38
+ }
39
+ await invalidate(ctx, legs);
40
+ await ctx.db.patch("financialSourceObservations", marker._id, {
41
+ generation: marker.generation + 1,
42
+ indexedLegCount: end,
43
+ continuation: {
44
+ state: end === row.transfers.length ? "validating" : "indexing",
45
+ nextLeg: end,
46
+ validatedLegs: 0,
47
+ },
48
+ });
49
+ }
50
+ async function validateBatch(ctx, row, marker) {
51
+ const start = marker.continuation.validatedLegs;
52
+ const legs = await ctx.db
53
+ .query("financialSourceLegs")
54
+ .withIndex("by_allocation_id_and_leg_index", (q) => {
55
+ const allocation = q.eq("allocationId", row._id);
56
+ return start === 0 ? allocation : allocation.gte("legIndex", start);
57
+ })
58
+ .take(batchLimit + 1);
59
+ const batch = legs.slice(0, batchLimit);
60
+ if (hasInvalidLegIdentity(row, legs) ||
61
+ batch.some((leg, i) => leg.legIndex !== start + i) ||
62
+ (legs.length <= batchLimit && start + batch.length !== row.transfers.length))
63
+ return hold(ctx, marker);
64
+ for (const leg of batch) {
65
+ const ownership = await legOwnership(ctx, leg.bucketKey, leg);
66
+ if (JSON.stringify(ownership) !==
67
+ JSON.stringify({
68
+ registrationId: leg.registrationId,
69
+ userId: leg.userId,
70
+ orgId: leg.orgId,
71
+ ownershipStatus: leg.ownershipStatus,
72
+ })) {
73
+ await ctx.db.patch("financialSourceLegs", leg._id, ownership);
74
+ await invalidate(ctx, [leg, { ...leg, ...ownership }]);
75
+ }
76
+ }
77
+ const validatedLegs = start + batch.length;
78
+ await ctx.db.patch("financialSourceObservations", marker._id, {
79
+ generation: marker.generation + 1,
80
+ continuation: {
81
+ state: legs.length <= batchLimit ? "complete" : "validating",
82
+ nextLeg: marker.indexedLegCount,
83
+ validatedLegs,
84
+ },
85
+ });
86
+ }
87
+ /** One atomic bounded step. Callers drain explicitly; a stale acknowledgement never advances twice. */
88
+ export async function continueSettlementObservation(ctx, marker, expectedGeneration) {
89
+ if (marker.generation !== expectedGeneration ||
90
+ marker.isContradictory ||
91
+ !marker.isOverflow ||
92
+ marker.continuation?.state === "held")
93
+ return;
94
+ const row = await ctx.db.get("settlementAllocations", marker.allocationId);
95
+ const candidates = await ctx.db
96
+ .query("settlementAllocations")
97
+ .withIndex("by_source_charge", (q) => q.eq("sourceChargeId", marker.sourceChargeId))
98
+ .take(2);
99
+ const cursor = marker.continuation;
100
+ if (!row ||
101
+ candidates.length !== 1 ||
102
+ candidates[0]?._id !== row._id ||
103
+ marker.sourceChargeId !== row.sourceChargeId ||
104
+ marker.fingerprint !== (await settlementFingerprint(row)) ||
105
+ marker.legCount !== row.transfers.length ||
106
+ !Number.isSafeInteger(marker.generation + 1) ||
107
+ marker.generation < 1 ||
108
+ !Number.isInteger(marker.indexedLegCount) ||
109
+ marker.indexedLegCount < 0 ||
110
+ marker.indexedLegCount > row.transfers.length ||
111
+ (cursor
112
+ ? cursor.nextLeg !== marker.indexedLegCount ||
113
+ !Number.isInteger(cursor.validatedLegs) ||
114
+ cursor.validatedLegs < 0 ||
115
+ cursor.validatedLegs > cursor.nextLeg ||
116
+ (cursor.state === "indexing" && cursor.validatedLegs !== 0) ||
117
+ (cursor.state === "validating" &&
118
+ cursor.nextLeg !== row.transfers.length) ||
119
+ (cursor.state === "complete" &&
120
+ (cursor.nextLeg !== row.transfers.length ||
121
+ cursor.validatedLegs !== row.transfers.length))
122
+ : marker.indexedLegCount !== 0))
123
+ return hold(ctx, marker);
124
+ if (cursor?.state === "complete")
125
+ return;
126
+ if (cursor?.state === "validating")
127
+ await validateBatch(ctx, row, marker);
128
+ else
129
+ await indexBatch(ctx, row, marker);
130
+ }
131
+ //# sourceMappingURL=continuation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"continuation.js","sourceRoot":"","sources":["../../../src/component/financialObservations/continuation.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,qBAAqB,EACrB,UAAU,EACV,YAAY,EACZ,qBAAqB,GACtB,MAAM,wBAAwB,CAAC;AAGhC,MAAM,UAAU,GAAG,GAAG,CAAC;AACvB,KAAK,UAAU,IAAI,CAAC,GAAgB,EAAE,MAAmB;IACvD,MAAM,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,6BAA6B,EAAE,MAAM,CAAC,GAAG,EAAE;QAC5D,eAAe,EAAE,IAAI;QACrB,UAAU,EAAE,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,UAAU,GAAG,CAAC,CAAC;YACrD,CAAC,CAAC,MAAM,CAAC,UAAU,GAAG,CAAC;YACvB,CAAC,CAAC,CAAC;QACL,YAAY,EAAE;YACZ,KAAK,EAAE,MAAM;YACb,OAAO,EAAE,MAAM,CAAC,eAAe;YAC/B,aAAa,EAAE,MAAM,CAAC,YAAY,EAAE,aAAa,IAAI,CAAC;SACvD;KACF,CAAC,CA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AAC,MAAM;QAC7C,CAAC,MAAM;YACL,CAAC,CAAC,MAAM,CAAC,OAAO,KAAK,MAAM,CAAC,eAAe;gBACzC,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,aAAa,CAAC;gBACvC,MAAM,CAAC,aAAa,GAAG,CAAC;gBACxB,MAAM,CAAC,aAAa,GAAG,MAAM,CAAC,OAAO;gBACrC,CAAC,MAAM,CAAC,KAAK,KAAK,UAAU,IAAI,MAAM,CAAC,aAAa,KAAK,CAAC,CAAC;gBAC3D,CAAC,MAAM,CAAC,KAAK,KAAK,YAAY;oBAC5B,MAAM,CAAC,OAAO,KAAK,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC;gBAC1C,CAAC,MAAM,CAAC,KAAK,KAAK,UAAU;oBAC1B,CAAC,MAAM,CAAC,OAAO,KAAK,GAAG,CAAC,SAAS,CAAC,MAAM;wBACtC,MAAM,CAAC,aAAa,KAAK,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;YACrD,CAAC,CAAC,MAAM,CAAC,eAAe,KAAK,CAAC,CAAC;QAEjC,OAAO,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IAC3B,IAAI,MAAM,EAAE,KAAK,KAAK,UAAU;QAAE,OAAO;IACzC,IAAI,MAAM,EAAE,KAAK,KAAK,YAAY;QAAE,MAAM,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;;QACrE,MAAM,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;AAC1C,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { MutationCtx, QueryCtx } from "../_generated/server.js";
2
+ export declare function bucketScope(bucketKey: string): string;
3
+ export declare function ownerScope(userId: string, orgId?: string): string;
4
+ export declare function observationGeneration(ctx: QueryCtx, scopeKey: string): Promise<number | null>;
5
+ export declare function advanceObservationGeneration(ctx: MutationCtx, scopeKey: string): Promise<void>;
6
+ //# sourceMappingURL=generations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generations.d.ts","sourceRoot":"","sources":["../../../src/component/financialObservations/generations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAErE,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,UAE5C;AACD,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,UAExD;AACD,wBAAsB,qBAAqB,CAAC,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAY1E;AACD,wBAAsB,4BAA4B,CAChD,GAAG,EAAE,WAAW,EAChB,QAAQ,EAAE,MAAM,iBA6BjB"}
@@ -0,0 +1,46 @@
1
+ export function bucketScope(bucketKey) {
2
+ return JSON.stringify(["bucket", bucketKey]);
3
+ }
4
+ export function ownerScope(userId, orgId) {
5
+ return JSON.stringify(["owner", userId, orgId ?? null]);
6
+ }
7
+ export async function observationGeneration(ctx, scopeKey) {
8
+ const rows = await ctx.db
9
+ .query("financialObservationGenerations")
10
+ .withIndex("by_scope_key", (q) => q.eq("scopeKey", scopeKey))
11
+ .take(2);
12
+ if (rows.length > 1 ||
13
+ (rows[0] &&
14
+ (!Number.isSafeInteger(rows[0].generation) || rows[0].generation < 1)))
15
+ return null;
16
+ return rows[0]?.generation ?? 0;
17
+ }
18
+ export async function advanceObservationGeneration(ctx, scopeKey) {
19
+ const rows = await ctx.db
20
+ .query("financialObservationGenerations")
21
+ .withIndex("by_scope_key", (q) => q.eq("scopeKey", scopeKey))
22
+ .take(2);
23
+ if (rows.length > 1)
24
+ return;
25
+ if (rows[0] &&
26
+ (!Number.isSafeInteger(rows[0].generation) || rows[0].generation < 1))
27
+ return;
28
+ const generation = (rows[0]?.generation ?? 0) + 1;
29
+ if (!Number.isSafeInteger(generation)) {
30
+ if (rows[0])
31
+ await ctx.db.patch("financialObservationGenerations", rows[0]._id, {
32
+ generation: 0,
33
+ });
34
+ return;
35
+ }
36
+ if (rows[0])
37
+ await ctx.db.patch("financialObservationGenerations", rows[0]._id, {
38
+ generation,
39
+ });
40
+ else
41
+ await ctx.db.insert("financialObservationGenerations", {
42
+ scopeKey,
43
+ generation,
44
+ });
45
+ }
46
+ //# sourceMappingURL=generations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generations.js","sourceRoot":"","sources":["../../../src/component/financialObservations/generations.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,WAAW,CAAC,SAAiB;IAC3C,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC;AAC/C,CAAC;AACD,MAAM,UAAU,UAAU,CAAC,MAAc,EAAE,KAAc;IACvD,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC;AAC1D,CAAC;AACD,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,GAAa,EAAE,QAAgB;IACzE,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,EAAE;SACtB,KAAK,CAAC,iCAAiC,CAAC;SACxC,SAAS,CAAC,cAAc,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;SAC5D,IAAI,CAAC,CAAC,CAAC,CAAC;IACX,IACE,IAAI,CAAC,MAAM,GAAG,CAAC;QACf,CAAC,IAAI,CAAC,CAAC,CAAC;YACN,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC;QAExE,OAAO,IAAI,CAAC;IACd,OAAO,IAAI,CAAC,CAAC,CAAC,EAAE,UAAU,IAAI,CAAC,CAAC;AAClC,CAAC;AACD,MAAM,CAAC,KAA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bounded steps. */
2
+ export declare const resume: import("convex/server").RegisteredMutation<"public", {
3
+ allocationId: import("convex/values").GenericId<"settlementAllocations">;
4
+ expectedGeneration: number;
5
+ }, Promise<{
6
+ coverage: "unknown";
7
+ observation: {
8
+ _creationTime: number;
9
+ _id: import("convex/values").GenericId<"financialSourceObservations">;
10
+ allocationId: import("convex/values").GenericId<"settlementAllocations">;
11
+ continuation?: {
12
+ nextLeg: number;
13
+ state: "complete" | "held" | "indexing" | "validating";
14
+ validatedLegs: number;
15
+ } | undefined;
16
+ fingerprint: string;
17
+ generation: number;
18
+ indexedLegCount: number;
19
+ isContradictory: boolean;
20
+ isOverflow: boolean;
21
+ legCount: number;
22
+ observedFingerprint: string;
23
+ ownershipFingerprint: string;
24
+ producer: "settlement_allocation";
25
+ producerVersion: 1;
26
+ sourceChargeId: string;
27
+ } | null;
28
+ }>>;
29
+ /** Trusted host continuation; caller selects identity and generation, never cursor state. */
30
+ export declare const resumeTransferBatch: import("convex/server").RegisteredMutation<"public", {
31
+ batchId: import("convex/values").GenericId<"financialTransferBatches">;
32
+ expectedGeneration: number;
33
+ }, Promise<{
34
+ coverage: "unknown";
35
+ producerGeneration: number | null;
36
+ hasDeferredWork: boolean;
37
+ batch: {
38
+ _creationTime: number;
39
+ _id: import("convex/values").GenericId<"financialTransferBatches">;
40
+ continuation?: {
41
+ nextReference: number;
42
+ producerGeneration: number;
43
+ sourceFingerprint: string;
44
+ state: "complete" | "held" | "indexing" | "validating";
45
+ validatedReferences: number;
46
+ } | undefined;
47
+ fingerprint: string;
48
+ generation: number;
49
+ isContradictory: boolean;
50
+ isOverflow: true;
51
+ observedFingerprint: string;
52
+ operationId: string;
53
+ originalOperationId: import("convex/values").GenericId<"transferReversalOps">;
54
+ producer: "transfer_frontier_claim" | "transfer_frontier_release";
55
+ producerVersion: 1;
56
+ referenceCount: number;
57
+ sourceChargeId: string;
58
+ state: "complete" | "pending";
59
+ transferIds: import("convex/values").GenericId<"transfers">[];
60
+ } | null;
61
+ }>>;
62
+ //# sourceMappingURL=mutations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../../src/component/financialObservations/mutations.ts"],"names":[],"mappings":"AAOA,4FAA4F;AAC5F,eAAO,MAAM,MAAM;;;;cA4BH,SAAS;;;;;;;;;;;;;;;;;;;;;;GASvB,CAAC;AAEH,6FAA6F;AAC7F,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0B9B,CAAC"}
@@ -0,0 +1,69 @@
1
+ import { continueTransferBatch } from "./transferContinuation.js";
2
+ import { transferReaderState } from "./transferBatches.js";
3
+ import { transferBatchDoc } from "./transferSchema.js";
4
+ import { v } from "convex/values";
5
+ import { mutation } from "../_generated/server.js";
6
+ import { sourceDoc } from "./schema.js";
7
+ import { continueSettlementObservation } from "./continuation.js";
8
+ /** Trusted host mutation. Host must authorize access and explicitly drain bounded steps. */
9
+ export const resume = mutation({
10
+ args: {
11
+ allocationId: v.id("settlementAllocations"),
12
+ expectedGeneration: v.number(),
13
+ },
14
+ returns: v.object({
15
+ coverage: v.literal("unknown"),
16
+ observation: v.union(sourceDoc, v.null()),
17
+ }),
18
+ handler: async (ctx, args) => {
19
+ if (!Number.isSafeInteger(args.expectedGeneration) ||
20
+ args.expectedGeneration < 1)
21
+ throw new Error("Invalid observation generation");
22
+ const markers = await ctx.db
23
+ .query("financialSourceObservations")
24
+ .withIndex("by_allocation_id", (q) => q.eq("allocationId", args.allocationId))
25
+ .take(2);
26
+ const marker = markers.length === 1 ? markers[0] : null;
27
+ if (marker)
28
+ await continueSettlementObservation(ctx, marker, args.expectedGeneration);
29
+ const current = marker
30
+ ? await ctx.db.get("financialSourceObservations", marker._id)
31
+ : null;
32
+ return {
33
+ coverage: "unknown",
34
+ observation: current &&
35
+ Number.isSafeInteger(current.generation) &&
36
+ current.generation >= 1
37
+ ? current
38
+ : null,
39
+ };
40
+ },
41
+ });
42
+ /** Trusted host continuation; caller selects identity and generation, never cursor state. */
43
+ export const resumeTransferBatch = mutation({
44
+ args: {
45
+ batchId: v.id("financialTransferBatches"),
46
+ expectedGeneration: v.number(),
47
+ },
48
+ returns: v.object({
49
+ coverage: v.literal("unknown"),
50
+ producerGeneration: v.union(v.number(), v.null()),
51
+ hasDeferredWork: v.boolean(),
52
+ batch: v.union(transferBatchDoc, v.null()),
53
+ }),
54
+ handler: async (ctx, args) => {
55
+ if (!Number.isSafeInteger(args.expectedGeneration) ||
56
+ args.expectedGeneration < 1)
57
+ throw new Error("Invalid observation generation");
58
+ const batch = await ctx.db.get("financialTransferBatches", args.batchId);
59
+ if (batch)
60
+ await continueTransferBatch(ctx, batch, args.expectedGeneration);
61
+ return {
62
+ ...(await transferReaderState(ctx)),
63
+ batch: batch
64
+ ? await ctx.db.get("financialTransferBatches", batch._id)
65
+ : null,
66
+ };
67
+ },
68
+ });
69
+ //# sourceMappingURL=mutations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mutations.js","sourceRoot":"","sources":["../../../src/component/financialObservations/mutations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAClE,4FAA4F;AAC5F,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC;IAC7B,IAAI,EAAE;QACJ,YAAY,EAAE,CAAC,CAAC,EAAE,CAAC,uBAAuB,CAAC;QAC3C,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE;KAC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CAAC,IAAI;SACT,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,307 @@
1
+ export declare const source: import("convex/server").RegisteredQuery<"public", {
2
+ allocationId: import("convex/values").GenericId<"settlementAllocations">;
3
+ }, Promise<{
4
+ coverage: "unknown";
5
+ observation: {
6
+ _creationTime: number;
7
+ _id: import("convex/values").GenericId<"financialSourceObservations">;
8
+ allocationId: import("convex/values").GenericId<"settlementAllocations">;
9
+ continuation?: {
10
+ nextLeg: number;
11
+ state: "complete" | "held" | "indexing" | "validating";
12
+ validatedLegs: number;
13
+ } | undefined;
14
+ fingerprint: string;
15
+ generation: number;
16
+ indexedLegCount: number;
17
+ isContradictory: boolean;
18
+ isOverflow: boolean;
19
+ legCount: number;
20
+ observedFingerprint: string;
21
+ ownershipFingerprint: string;
22
+ producer: "settlement_allocation";
23
+ producerVersion: 1;
24
+ sourceChargeId: string;
25
+ } | null;
26
+ }>>;
27
+ /** Trusted host boundary; exact keys do not authorize end-user access. */
28
+ export declare const bucket: import("convex/server").RegisteredQuery<"public", {
29
+ bucketKey: string;
30
+ paginationOpts: {
31
+ id?: number;
32
+ endCursor?: string | null;
33
+ maximumRowsRead?: number;
34
+ maximumBytesRead?: number;
35
+ numItems: number;
36
+ cursor: string | null;
37
+ };
38
+ }, Promise<{
39
+ page: {
40
+ _creationTime: number;
41
+ _id: import("convex/values").GenericId<"financialSourceLegs">;
42
+ allocationId: import("convex/values").GenericId<"settlementAllocations">;
43
+ bucketKey: string;
44
+ legIndex: number;
45
+ orgId?: string | undefined;
46
+ ownershipStatus: "ambiguous" | "contradictory" | "registered" | "unknown";
47
+ registrationId?: import("convex/values").GenericId<"financialOwnership"> | undefined;
48
+ role: "affiliate" | "other" | "store";
49
+ sourceChargeId: string;
50
+ userId?: string | undefined;
51
+ }[];
52
+ isDone: boolean;
53
+ continueCursor: import("convex/server").Cursor;
54
+ splitCursor?: import("convex/server").Cursor | null;
55
+ pageStatus?: "SplitRecommended" | "SplitRequired" | null;
56
+ coverage: "unknown";
57
+ generation: number | null;
58
+ }>>;
59
+ export declare const owner: import("convex/server").RegisteredQuery<"public", {
60
+ orgId?: string | undefined;
61
+ paginationOpts: {
62
+ id?: number;
63
+ endCursor?: string | null;
64
+ maximumRowsRead?: number;
65
+ maximumBytesRead?: number;
66
+ numItems: number;
67
+ cursor: string | null;
68
+ };
69
+ userId: string;
70
+ }, Promise<{
71
+ page: {
72
+ _creationTime: number;
73
+ _id: import("convex/values").GenericId<"financialSourceLegs">;
74
+ allocationId: import("convex/values").GenericId<"settlementAllocations">;
75
+ bucketKey: string;
76
+ legIndex: number;
77
+ orgId?: string | undefined;
78
+ ownershipStatus: "ambiguous" | "contradictory" | "registered" | "unknown";
79
+ registrationId?: import("convex/values").GenericId<"financialOwnership"> | undefined;
80
+ role: "affiliate" | "other" | "store";
81
+ sourceChargeId: string;
82
+ userId?: string | undefined;
83
+ }[];
84
+ isDone: boolean;
85
+ continueCursor: import("convex/server").Cursor;
86
+ splitCursor?: import("convex/server").Cursor | null;
87
+ pageStatus?: "SplitRecommended" | "SplitRequired" | null;
88
+ coverage: "unknown";
89
+ generation: number | null;
90
+ }>>;
91
+ export declare const transfer: import("convex/server").RegisteredQuery<"public", {
92
+ transferId: import("convex/values").GenericId<"transfers">;
93
+ }, Promise<{
94
+ coverage: "unknown";
95
+ producerGeneration: number | null;
96
+ hasDeferredWork: boolean;
97
+ observation: {
98
+ _creationTime: number;
99
+ _id: import("convex/values").GenericId<"financialTransferObservations">;
100
+ bucketKey: string;
101
+ fingerprint: string;
102
+ generation: number;
103
+ isContradictory: boolean;
104
+ observedFingerprint: string;
105
+ orgId?: string | undefined;
106
+ ownershipFingerprint: string;
107
+ ownershipStatus: "ambiguous" | "contradictory" | "registered" | "unknown";
108
+ producer: "transfer_fact";
109
+ producerVersion: 1;
110
+ registrationId?: import("convex/values").GenericId<"financialOwnership"> | undefined;
111
+ role?: "affiliate" | "other" | "store" | undefined;
112
+ sourceChargeId?: string | undefined;
113
+ sourceInvoiceId?: string | undefined;
114
+ stripeTransferId: string;
115
+ transferId: import("convex/values").GenericId<"transfers">;
116
+ userId?: string | undefined;
117
+ } | null;
118
+ }>>;
119
+ export declare const transferBatches: import("convex/server").RegisteredQuery<"public", {
120
+ operationId: string;
121
+ paginationOpts: {
122
+ id?: number;
123
+ endCursor?: string | null;
124
+ maximumRowsRead?: number;
125
+ maximumBytesRead?: number;
126
+ numItems: number;
127
+ cursor: string | null;
128
+ };
129
+ }, Promise<{
130
+ page: {
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
+ isDone: boolean;
155
+ continueCursor: import("convex/server").Cursor;
156
+ splitCursor?: import("convex/server").Cursor | null;
157
+ pageStatus?: "SplitRecommended" | "SplitRequired" | null;
158
+ coverage: "unknown";
159
+ producerGeneration: number | null;
160
+ hasDeferredWork: boolean;
161
+ }>>;
162
+ export declare const transferBucket: import("convex/server").RegisteredQuery<"public", {
163
+ bucketKey: string;
164
+ paginationOpts: {
165
+ id?: number;
166
+ endCursor?: string | null;
167
+ maximumRowsRead?: number;
168
+ maximumBytesRead?: number;
169
+ numItems: number;
170
+ cursor: string | null;
171
+ };
172
+ }, Promise<{
173
+ page: {
174
+ _creationTime: number;
175
+ _id: import("convex/values").GenericId<"financialTransferObservations">;
176
+ bucketKey: string;
177
+ fingerprint: string;
178
+ generation: number;
179
+ isContradictory: boolean;
180
+ observedFingerprint: string;
181
+ orgId?: string | undefined;
182
+ ownershipFingerprint: string;
183
+ ownershipStatus: "ambiguous" | "contradictory" | "registered" | "unknown";
184
+ producer: "transfer_fact";
185
+ producerVersion: 1;
186
+ registrationId?: import("convex/values").GenericId<"financialOwnership"> | undefined;
187
+ role?: "affiliate" | "other" | "store" | undefined;
188
+ sourceChargeId?: string | undefined;
189
+ sourceInvoiceId?: string | undefined;
190
+ stripeTransferId: string;
191
+ transferId: import("convex/values").GenericId<"transfers">;
192
+ userId?: string | undefined;
193
+ }[];
194
+ isDone: boolean;
195
+ continueCursor: import("convex/server").Cursor;
196
+ splitCursor?: import("convex/server").Cursor | null;
197
+ pageStatus?: "SplitRecommended" | "SplitRequired" | null;
198
+ coverage: "unknown";
199
+ producerGeneration: number | null;
200
+ hasDeferredWork: boolean;
201
+ generation: number | null;
202
+ }>>;
203
+ export declare const transferOwner: import("convex/server").RegisteredQuery<"public", {
204
+ orgId?: string | undefined;
205
+ paginationOpts: {
206
+ id?: number;
207
+ endCursor?: string | null;
208
+ maximumRowsRead?: number;
209
+ maximumBytesRead?: number;
210
+ numItems: number;
211
+ cursor: string | null;
212
+ };
213
+ userId: string;
214
+ }, Promise<{
215
+ page: {
216
+ _creationTime: number;
217
+ _id: import("convex/values").GenericId<"financialTransferObservations">;
218
+ bucketKey: string;
219
+ fingerprint: string;
220
+ generation: number;
221
+ isContradictory: boolean;
222
+ observedFingerprint: string;
223
+ orgId?: string | undefined;
224
+ ownershipFingerprint: string;
225
+ ownershipStatus: "ambiguous" | "contradictory" | "registered" | "unknown";
226
+ producer: "transfer_fact";
227
+ producerVersion: 1;
228
+ registrationId?: import("convex/values").GenericId<"financialOwnership"> | undefined;
229
+ role?: "affiliate" | "other" | "store" | undefined;
230
+ sourceChargeId?: string | undefined;
231
+ sourceInvoiceId?: string | undefined;
232
+ stripeTransferId: string;
233
+ transferId: import("convex/values").GenericId<"transfers">;
234
+ userId?: string | undefined;
235
+ }[];
236
+ isDone: boolean;
237
+ continueCursor: import("convex/server").Cursor;
238
+ splitCursor?: import("convex/server").Cursor | null;
239
+ pageStatus?: "SplitRecommended" | "SplitRequired" | null;
240
+ coverage: "unknown";
241
+ producerGeneration: number | null;
242
+ hasDeferredWork: boolean;
243
+ generation: number | null;
244
+ }>>;
245
+ export declare const transferReferences: import("convex/server").RegisteredQuery<"public", {
246
+ batchId: import("convex/values").GenericId<"financialTransferBatches">;
247
+ paginationOpts: {
248
+ id?: number;
249
+ endCursor?: string | null;
250
+ maximumRowsRead?: number;
251
+ maximumBytesRead?: number;
252
+ numItems: number;
253
+ cursor: string | null;
254
+ };
255
+ }, Promise<{
256
+ page: {
257
+ _creationTime: number;
258
+ _id: import("convex/values").GenericId<"financialTransferBatchReferences">;
259
+ batchId: import("convex/values").GenericId<"financialTransferBatches">;
260
+ observationGeneration: number;
261
+ observationId: import("convex/values").GenericId<"financialTransferObservations">;
262
+ observedFingerprint: string;
263
+ ownershipFingerprint: string;
264
+ position: number;
265
+ sourceFingerprint: string;
266
+ transferId: import("convex/values").GenericId<"transfers">;
267
+ }[];
268
+ isDone: boolean;
269
+ continueCursor: import("convex/server").Cursor;
270
+ splitCursor?: import("convex/server").Cursor | null;
271
+ pageStatus?: "SplitRecommended" | "SplitRequired" | null;
272
+ coverage: "unknown";
273
+ producerGeneration: number | null;
274
+ hasDeferredWork: boolean;
275
+ }>>;
276
+ export declare const transferBatch: import("convex/server").RegisteredQuery<"public", {
277
+ batchId: import("convex/values").GenericId<"financialTransferBatches">;
278
+ }, Promise<{
279
+ coverage: "unknown";
280
+ producerGeneration: number | null;
281
+ hasDeferredWork: boolean;
282
+ batch: {
283
+ _creationTime: number;
284
+ _id: import("convex/values").GenericId<"financialTransferBatches">;
285
+ continuation?: {
286
+ nextReference: number;
287
+ producerGeneration: number;
288
+ sourceFingerprint: string;
289
+ state: "complete" | "held" | "indexing" | "validating";
290
+ validatedReferences: number;
291
+ } | undefined;
292
+ fingerprint: string;
293
+ generation: number;
294
+ isContradictory: boolean;
295
+ isOverflow: true;
296
+ observedFingerprint: string;
297
+ operationId: string;
298
+ originalOperationId: import("convex/values").GenericId<"transferReversalOps">;
299
+ producer: "transfer_frontier_claim" | "transfer_frontier_release";
300
+ producerVersion: 1;
301
+ referenceCount: number;
302
+ sourceChargeId: string;
303
+ state: "complete" | "pending";
304
+ transferIds: import("convex/values").GenericId<"transfers">[];
305
+ } | null;
306
+ }>>;
307
+ //# sourceMappingURL=queries.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../src/component/financialObservations/queries.ts"],"names":[],"mappings":"AA0BA,eAAO,MAAM,MAAM;;;cAcH,SAAS;;;;;;;;;;;;;;;;;;;;;;GASvB,CAAC;AAUH,0EAA0E;AAC1E,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAiBH,SAAS;;GAIvB,CAAC;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAmBF,SAAS;;GAOvB,CAAC;AAEH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoBnB,CAAC;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwB1B,CAAC;AAMH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqBzB,CAAC;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BxB,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsB7B,CAAC;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAUxB,CAAC"}