@fantastic.dev/better-stripe 0.34.0 → 0.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (308) hide show
  1. package/CHANGELOG.md +260 -0
  2. package/README.md +1 -1
  3. package/dist/client/connect/payoutAdoptionTestHelpers.d.ts +664 -2
  4. package/dist/client/connect/payoutAdoptionTestHelpers.d.ts.map +1 -1
  5. package/dist/client/connect/payoutExecutionTestHelpers.d.ts +332 -1
  6. package/dist/client/connect/payoutExecutionTestHelpers.d.ts.map +1 -1
  7. package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts +664 -2
  8. package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts.map +1 -1
  9. package/dist/client/connect/payoutSyncTestHelpers.d.ts +332 -1
  10. package/dist/client/connect/payoutSyncTestHelpers.d.ts.map +1 -1
  11. package/dist/client/connect/refundCommandEvidence.d.ts +14 -0
  12. package/dist/client/connect/refundCommandEvidence.d.ts.map +1 -0
  13. package/dist/client/connect/refundCommandEvidence.js +20 -0
  14. package/dist/client/connect/refundCommandEvidence.js.map +1 -0
  15. package/dist/client/connect/refundCommandNormalization.d.ts +11 -0
  16. package/dist/client/connect/refundCommandNormalization.d.ts.map +1 -0
  17. package/dist/client/connect/refundCommandNormalization.js +12 -0
  18. package/dist/client/connect/refundCommandNormalization.js.map +1 -0
  19. package/dist/client/financialObservations.d.ts +42 -0
  20. package/dist/client/financialObservations.d.ts.map +1 -0
  21. package/dist/client/financialObservations.js +58 -0
  22. package/dist/client/financialObservations.js.map +1 -0
  23. package/dist/client/financialOwnership.d.ts +52 -0
  24. package/dist/client/financialOwnership.d.ts.map +1 -0
  25. package/dist/client/financialOwnership.js +72 -0
  26. package/dist/client/financialOwnership.js.map +1 -0
  27. package/dist/client/index.d.ts +2 -2
  28. package/dist/client/index.d.ts.map +1 -1
  29. package/dist/client/index.js +2 -2
  30. package/dist/client/index.js.map +1 -1
  31. package/dist/client/observationPagination.d.ts +10 -0
  32. package/dist/client/observationPagination.d.ts.map +1 -0
  33. package/dist/client/observationPagination.js +12 -0
  34. package/dist/client/observationPagination.js.map +1 -0
  35. package/dist/client/operationEvidence.d.ts +37 -0
  36. package/dist/client/operationEvidence.d.ts.map +1 -0
  37. package/dist/client/operationEvidence.js +44 -0
  38. package/dist/client/operationEvidence.js.map +1 -0
  39. package/dist/client/publicTypes.d.ts +6 -0
  40. package/dist/client/publicTypes.d.ts.map +1 -1
  41. package/dist/client/readContracts.d.ts +31 -0
  42. package/dist/client/readContracts.d.ts.map +1 -1
  43. package/dist/client/readContracts.js +14 -0
  44. package/dist/client/readContracts.js.map +1 -1
  45. package/dist/client/transferObservations.d.ts +59 -0
  46. package/dist/client/transferObservations.d.ts.map +1 -0
  47. package/dist/client/transferObservations.js +82 -0
  48. package/dist/client/transferObservations.js.map +1 -0
  49. package/dist/component/_generated/component.d.ts +687 -0
  50. package/dist/component/_generated/component.d.ts.map +1 -1
  51. package/dist/component/affiliateRecovery/mutations.d.ts.map +1 -1
  52. package/dist/component/affiliateRecovery/mutations.js +4 -1
  53. package/dist/component/affiliateRecovery/mutations.js.map +1 -1
  54. package/dist/component/connect/mutations.d.ts.map +1 -1
  55. package/dist/component/connect/mutations.js +18 -2
  56. package/dist/component/connect/mutations.js.map +1 -1
  57. package/dist/component/connect/queries.d.ts +8 -0
  58. package/dist/component/connect/queries.d.ts.map +1 -1
  59. package/dist/component/connect/reversalClaims.d.ts.map +1 -1
  60. package/dist/component/connect/reversalClaims.js +7 -1
  61. package/dist/component/connect/reversalClaims.js.map +1 -1
  62. package/dist/component/connect/reversalReceipts.d.ts.map +1 -1
  63. package/dist/component/connect/reversalReceipts.js +2 -0
  64. package/dist/component/connect/reversalReceipts.js.map +1 -1
  65. package/dist/component/connect/schema.d.ts +11 -1
  66. package/dist/component/connect/schema.d.ts.map +1 -1
  67. package/dist/component/connect/schema.js +9 -1
  68. package/dist/component/connect/schema.js.map +1 -1
  69. package/dist/component/connect/validators.d.ts +9 -1
  70. package/dist/component/connect/validators.d.ts.map +1 -1
  71. package/dist/component/connect/validators.js +2 -0
  72. package/dist/component/connect/validators.js.map +1 -1
  73. package/dist/component/earnings/pairedAdjustment.d.ts +12 -0
  74. package/dist/component/earnings/pairedAdjustment.d.ts.map +1 -0
  75. package/dist/component/earnings/pairedAdjustment.js +46 -0
  76. package/dist/component/earnings/pairedAdjustment.js.map +1 -0
  77. package/dist/component/earnings/triggers.d.ts +546 -2
  78. package/dist/component/earnings/triggers.d.ts.map +1 -1
  79. package/dist/component/earnings/triggers.js +17 -3
  80. package/dist/component/earnings/triggers.js.map +1 -1
  81. package/dist/component/financialObservations/continuation.d.ts +7 -0
  82. package/dist/component/financialObservations/continuation.d.ts.map +1 -0
  83. package/dist/component/financialObservations/continuation.js +131 -0
  84. package/dist/component/financialObservations/continuation.js.map +1 -0
  85. package/dist/component/financialObservations/generations.d.ts +6 -0
  86. package/dist/component/financialObservations/generations.d.ts.map +1 -0
  87. package/dist/component/financialObservations/generations.js +46 -0
  88. package/dist/component/financialObservations/generations.js.map +1 -0
  89. package/dist/component/financialObservations/mutations.d.ts +62 -0
  90. package/dist/component/financialObservations/mutations.d.ts.map +1 -0
  91. package/dist/component/financialObservations/mutations.js +69 -0
  92. package/dist/component/financialObservations/mutations.js.map +1 -0
  93. package/dist/component/financialObservations/queries.d.ts +307 -0
  94. package/dist/component/financialObservations/queries.d.ts.map +1 -0
  95. package/dist/component/financialObservations/queries.js +219 -0
  96. package/dist/component/financialObservations/queries.js.map +1 -0
  97. package/dist/component/financialObservations/schema.d.ts +182 -0
  98. package/dist/component/financialObservations/schema.d.ts.map +1 -0
  99. package/dist/component/financialObservations/schema.js +53 -0
  100. package/dist/component/financialObservations/schema.js.map +1 -0
  101. package/dist/component/financialObservations/settlement.d.ts +7 -0
  102. package/dist/component/financialObservations/settlement.d.ts.map +1 -0
  103. package/dist/component/financialObservations/settlement.js +118 -0
  104. package/dist/component/financialObservations/settlement.js.map +1 -0
  105. package/dist/component/financialObservations/settlementHelpers.d.ts +46 -0
  106. package/dist/component/financialObservations/settlementHelpers.d.ts.map +1 -0
  107. package/dist/component/financialObservations/settlementHelpers.js +70 -0
  108. package/dist/component/financialObservations/settlementHelpers.js.map +1 -0
  109. package/dist/component/financialObservations/transferBatches.d.ts +12 -0
  110. package/dist/component/financialObservations/transferBatches.d.ts.map +1 -0
  111. package/dist/component/financialObservations/transferBatches.js +76 -0
  112. package/dist/component/financialObservations/transferBatches.js.map +1 -0
  113. package/dist/component/financialObservations/transferContinuation.d.ts +5 -0
  114. package/dist/component/financialObservations/transferContinuation.d.ts.map +1 -0
  115. package/dist/component/financialObservations/transferContinuation.js +35 -0
  116. package/dist/component/financialObservations/transferContinuation.js.map +1 -0
  117. package/dist/component/financialObservations/transferContinuationState.d.ts +8 -0
  118. package/dist/component/financialObservations/transferContinuationState.d.ts.map +1 -0
  119. package/dist/component/financialObservations/transferContinuationState.js +69 -0
  120. package/dist/component/financialObservations/transferContinuationState.js.map +1 -0
  121. package/dist/component/financialObservations/transferContinuationSteps.d.ts +5 -0
  122. package/dist/component/financialObservations/transferContinuationSteps.d.ts.map +1 -0
  123. package/dist/component/financialObservations/transferContinuationSteps.js +174 -0
  124. package/dist/component/financialObservations/transferContinuationSteps.js.map +1 -0
  125. package/dist/component/financialObservations/transferHelpers.d.ts +18 -0
  126. package/dist/component/financialObservations/transferHelpers.d.ts.map +1 -0
  127. package/dist/component/financialObservations/transferHelpers.js +37 -0
  128. package/dist/component/financialObservations/transferHelpers.js.map +1 -0
  129. package/dist/component/financialObservations/transferReferenceSchema.d.ts +56 -0
  130. package/dist/component/financialObservations/transferReferenceSchema.d.ts.map +1 -0
  131. package/dist/component/financialObservations/transferReferenceSchema.js +21 -0
  132. package/dist/component/financialObservations/transferReferenceSchema.js.map +1 -0
  133. package/dist/component/financialObservations/transferSchema.d.ts +237 -0
  134. package/dist/component/financialObservations/transferSchema.d.ts.map +1 -0
  135. package/dist/component/financialObservations/transferSchema.js +65 -0
  136. package/dist/component/financialObservations/transferSchema.js.map +1 -0
  137. package/dist/component/financialObservations/transfers.d.ts +7 -0
  138. package/dist/component/financialObservations/transfers.d.ts.map +1 -0
  139. package/dist/component/financialObservations/transfers.js +79 -0
  140. package/dist/component/financialObservations/transfers.js.map +1 -0
  141. package/dist/component/financialOwnership/helpers.d.ts +37 -0
  142. package/dist/component/financialOwnership/helpers.d.ts.map +1 -0
  143. package/dist/component/financialOwnership/helpers.js +76 -0
  144. package/dist/component/financialOwnership/helpers.js.map +1 -0
  145. package/dist/component/financialOwnership/mutations.d.ts +28 -0
  146. package/dist/component/financialOwnership/mutations.d.ts.map +1 -0
  147. package/dist/component/financialOwnership/mutations.js +74 -0
  148. package/dist/component/financialOwnership/mutations.js.map +1 -0
  149. package/dist/component/financialOwnership/queries.d.ts +57 -0
  150. package/dist/component/financialOwnership/queries.d.ts.map +1 -0
  151. package/dist/component/financialOwnership/queries.js +50 -0
  152. package/dist/component/financialOwnership/queries.js.map +1 -0
  153. package/dist/component/financialOwnership/schema.d.ts +140 -0
  154. package/dist/component/financialOwnership/schema.d.ts.map +1 -0
  155. package/dist/component/financialOwnership/schema.js +35 -0
  156. package/dist/component/financialOwnership/schema.js.map +1 -0
  157. package/dist/component/operationEvidence/canonical.d.ts +4 -0
  158. package/dist/component/operationEvidence/canonical.d.ts.map +1 -0
  159. package/dist/component/operationEvidence/canonical.js +8 -0
  160. package/dist/component/operationEvidence/canonical.js.map +1 -0
  161. package/dist/component/operationEvidence/helpers.d.ts +87 -0
  162. package/dist/component/operationEvidence/helpers.d.ts.map +1 -0
  163. package/dist/component/operationEvidence/helpers.js +49 -0
  164. package/dist/component/operationEvidence/helpers.js.map +1 -0
  165. package/dist/component/operationEvidence/maintenance.d.ts +88 -0
  166. package/dist/component/operationEvidence/maintenance.d.ts.map +1 -0
  167. package/dist/component/operationEvidence/maintenance.js +59 -0
  168. package/dist/component/operationEvidence/maintenance.js.map +1 -0
  169. package/dist/component/operationEvidence/mutations.d.ts +97 -0
  170. package/dist/component/operationEvidence/mutations.d.ts.map +1 -0
  171. package/dist/component/operationEvidence/mutations.js +14 -0
  172. package/dist/component/operationEvidence/mutations.js.map +1 -0
  173. package/dist/component/operationEvidence/queries.d.ts +205 -0
  174. package/dist/component/operationEvidence/queries.d.ts.map +1 -0
  175. package/dist/component/operationEvidence/queries.js +75 -0
  176. package/dist/component/operationEvidence/queries.js.map +1 -0
  177. package/dist/component/operationEvidence/schema.d.ts +536 -0
  178. package/dist/component/operationEvidence/schema.d.ts.map +1 -0
  179. package/dist/component/operationEvidence/schema.js +53 -0
  180. package/dist/component/operationEvidence/schema.js.map +1 -0
  181. package/dist/component/refundHistory/commandBinding.d.ts +17 -0
  182. package/dist/component/refundHistory/commandBinding.d.ts.map +1 -0
  183. package/dist/component/refundHistory/commandBinding.js +41 -0
  184. package/dist/component/refundHistory/commandBinding.js.map +1 -0
  185. package/dist/component/refundHistory/commandEvidence.d.ts +50 -0
  186. package/dist/component/refundHistory/commandEvidence.d.ts.map +1 -0
  187. package/dist/component/refundHistory/commandEvidence.js +58 -0
  188. package/dist/component/refundHistory/commandEvidence.js.map +1 -0
  189. package/dist/component/refundHistory/commandEvidenceValidator.d.ts +89 -0
  190. package/dist/component/refundHistory/commandEvidenceValidator.d.ts.map +1 -0
  191. package/dist/component/refundHistory/commandEvidenceValidator.js +8 -0
  192. package/dist/component/refundHistory/commandEvidenceValidator.js.map +1 -0
  193. package/dist/component/refundHistory/commandFields.d.ts +8 -0
  194. package/dist/component/refundHistory/commandFields.d.ts.map +1 -0
  195. package/dist/component/refundHistory/commandFields.js +9 -0
  196. package/dist/component/refundHistory/commandFields.js.map +1 -0
  197. package/dist/component/refundHistory/mutations.d.ts +8 -0
  198. package/dist/component/refundHistory/mutations.d.ts.map +1 -0
  199. package/dist/component/refundHistory/mutations.js +25 -0
  200. package/dist/component/refundHistory/mutations.js.map +1 -0
  201. package/dist/component/refundHistory/originalSeller.d.ts +5 -0
  202. package/dist/component/refundHistory/originalSeller.d.ts.map +1 -0
  203. package/dist/component/refundHistory/originalSeller.js +35 -0
  204. package/dist/component/refundHistory/originalSeller.js.map +1 -0
  205. package/dist/component/refundHistory/queries.d.ts +51 -0
  206. package/dist/component/refundHistory/queries.d.ts.map +1 -1
  207. package/dist/component/refundHistory/queries.js +14 -0
  208. package/dist/component/refundHistory/queries.js.map +1 -1
  209. package/dist/component/schema.d.ts +332 -1
  210. package/dist/component/schema.js +15 -0
  211. package/dist/component/schema.js.map +1 -1
  212. package/dist/component/settlement/mutations.d.ts.map +1 -1
  213. package/dist/component/settlement/mutations.js +5 -1
  214. package/dist/component/settlement/mutations.js.map +1 -1
  215. package/dist/shared/refundCommandScope.d.ts +10 -0
  216. package/dist/shared/refundCommandScope.d.ts.map +1 -0
  217. package/dist/shared/refundCommandScope.js +9 -0
  218. package/dist/shared/refundCommandScope.js.map +1 -0
  219. package/docs/financial-observations.md +244 -0
  220. package/docs/financial-ownership.md +54 -0
  221. package/docs/refund-command-evidence.md +55 -0
  222. package/package.json +5 -2
  223. package/src/client/connect/refundCommandEvidence.ts +41 -0
  224. package/src/client/connect/refundCommandNormalization.ts +28 -0
  225. package/src/client/financialObservations.test.ts +109 -0
  226. package/src/client/financialObservations.ts +106 -0
  227. package/src/client/financialOwnership.test.ts +80 -0
  228. package/src/client/financialOwnership.ts +116 -0
  229. package/src/client/index.ts +2 -2
  230. package/src/client/observationPagination.ts +11 -0
  231. package/src/client/operationEvidence.test.ts +110 -0
  232. package/src/client/operationEvidence.ts +92 -0
  233. package/src/client/publicTypes.ts +45 -0
  234. package/src/client/readContracts.ts +25 -0
  235. package/src/client/refund-command-evidence.test.ts +68 -0
  236. package/src/client/refund-command-normalization.test.ts +61 -0
  237. package/src/client/transferContinuation.test.ts +94 -0
  238. package/src/client/transferObservations.test.ts +98 -0
  239. package/src/client/transferObservations.ts +180 -0
  240. package/src/component/_generated/api.ts +54 -0
  241. package/src/component/_generated/component.ts +797 -0
  242. package/src/component/affiliateRecovery/mutations.ts +10 -1
  243. package/src/component/connect/mutations.ts +29 -2
  244. package/src/component/connect/reversalClaims.ts +19 -1
  245. package/src/component/connect/reversalReceipts.ts +2 -0
  246. package/src/component/connect/schema.ts +9 -1
  247. package/src/component/connect/validators.ts +2 -0
  248. package/src/component/core/reset.test.ts +8 -1
  249. package/src/component/earnings/earnings-totals.test.ts +14 -10
  250. package/src/component/earnings/paired-adjustment.test.ts +258 -0
  251. package/src/component/earnings/pairedAdjustment.ts +77 -0
  252. package/src/component/earnings/triggers.ts +23 -11
  253. package/src/component/financialObservations/continuation.test.ts +445 -0
  254. package/src/component/financialObservations/continuation.ts +159 -0
  255. package/src/component/financialObservations/generations.ts +53 -0
  256. package/src/component/financialObservations/mutations.ts +75 -0
  257. package/src/component/financialObservations/observation-boundaries.test.ts +466 -0
  258. package/src/component/financialObservations/queries.ts +246 -0
  259. package/src/component/financialObservations/schema.ts +68 -0
  260. package/src/component/financialObservations/settlement-observations.test.ts +86 -0
  261. package/src/component/financialObservations/settlement.ts +142 -0
  262. package/src/component/financialObservations/settlementHelpers.ts +92 -0
  263. package/src/component/financialObservations/transfer-batches.test.ts +61 -0
  264. package/src/component/financialObservations/transfer-boundaries.test.ts +116 -0
  265. package/src/component/financialObservations/transfer-continuation-guards.test.ts +428 -0
  266. package/src/component/financialObservations/transfer-continuation.test.ts +154 -0
  267. package/src/component/financialObservations/transfer-observations.test.ts +212 -0
  268. package/src/component/financialObservations/transfer-overflow.test.ts +181 -0
  269. package/src/component/financialObservations/transfer-writers.test.ts +162 -0
  270. package/src/component/financialObservations/transferBatches.ts +96 -0
  271. package/src/component/financialObservations/transferContinuation.ts +53 -0
  272. package/src/component/financialObservations/transferContinuationState.ts +85 -0
  273. package/src/component/financialObservations/transferContinuationSteps.ts +232 -0
  274. package/src/component/financialObservations/transferHelpers.ts +38 -0
  275. package/src/component/financialObservations/transferReferenceSchema.ts +20 -0
  276. package/src/component/financialObservations/transferSchema.ts +74 -0
  277. package/src/component/financialObservations/transfers.ts +99 -0
  278. package/src/component/financialOwnership/financial-ownership.test.ts +102 -0
  279. package/src/component/financialOwnership/helpers.ts +98 -0
  280. package/src/component/financialOwnership/mutations.ts +83 -0
  281. package/src/component/financialOwnership/ownership-boundaries.test.ts +308 -0
  282. package/src/component/financialOwnership/queries.ts +65 -0
  283. package/src/component/financialOwnership/schema.ts +35 -0
  284. package/src/component/operationEvidence/canonical.ts +10 -0
  285. package/src/component/operationEvidence/helpers.ts +65 -0
  286. package/src/component/operationEvidence/integrity.test.ts +257 -0
  287. package/src/component/operationEvidence/maintenance.test.ts +152 -0
  288. package/src/component/operationEvidence/maintenance.ts +89 -0
  289. package/src/component/operationEvidence/mutations.ts +14 -0
  290. package/src/component/operationEvidence/queries.ts +108 -0
  291. package/src/component/operationEvidence/reads.test.ts +140 -0
  292. package/src/component/operationEvidence/schema.ts +62 -0
  293. package/src/component/refundHistory/command-evidence.test.ts +288 -0
  294. package/src/component/refundHistory/command-normalization-resource.test.ts +77 -0
  295. package/src/component/refundHistory/command-normalization.test.ts +229 -0
  296. package/src/component/refundHistory/command-provenance.test.ts +59 -0
  297. package/src/component/refundHistory/commandBinding.ts +54 -0
  298. package/src/component/refundHistory/commandEvidence.ts +76 -0
  299. package/src/component/refundHistory/commandEvidenceValidator.ts +18 -0
  300. package/src/component/refundHistory/commandFields.ts +9 -0
  301. package/src/component/refundHistory/mutations.ts +33 -0
  302. package/src/component/refundHistory/original-seller-boundaries.test.ts +138 -0
  303. package/src/component/refundHistory/original-seller.test.ts +175 -0
  304. package/src/component/refundHistory/originalSeller.ts +48 -0
  305. package/src/component/refundHistory/queries.ts +15 -0
  306. package/src/component/schema.ts +28 -0
  307. package/src/component/settlement/mutations.ts +5 -1
  308. package/src/shared/refundCommandScope.ts +19 -0
@@ -0,0 +1,41 @@
1
+ function keyFrom(metadata) {
2
+ if (metadata === null ||
3
+ typeof metadata !== "object" ||
4
+ Array.isArray(metadata))
5
+ return { kind: "missing" };
6
+ const key = metadata.betterStripeRefundCommand;
7
+ if (key === undefined)
8
+ return { kind: "missing" };
9
+ return typeof key === "string" && /^[A-Za-z0-9:_-]{16,200}$/.test(key)
10
+ ? { kind: "valid", key }
11
+ : { kind: "invalid" };
12
+ }
13
+ /** First known metadata is observed before incoming changes; it is not provider-creation provenance. */
14
+ export function refundCommandBinding(existing, incoming, now) {
15
+ const old = keyFrom(existing?.metadata);
16
+ const next = Object.prototype.hasOwnProperty.call(incoming, "metadata")
17
+ ? keyFrom(incoming.metadata)
18
+ : undefined;
19
+ const first = existing?.refundCommandKey ?? (old.kind === "valid" ? old.key : undefined);
20
+ const key = first ?? (next?.kind === "valid" ? next.key : undefined);
21
+ const conflict = existing?.refundCommandConflict === true ||
22
+ old.kind === "invalid" ||
23
+ next?.kind === "invalid" ||
24
+ (existing?.refundCommandKey !== undefined &&
25
+ old.kind === "valid" &&
26
+ old.key !== existing.refundCommandKey) ||
27
+ (first !== undefined &&
28
+ next !== undefined &&
29
+ (next.kind !== "valid" || next.key !== first));
30
+ return {
31
+ refundCommandNormalizationVersion: 1,
32
+ refundCommandConflict: conflict,
33
+ ...(key
34
+ ? {
35
+ refundCommandKey: key,
36
+ refundCommandObservedAt: existing?.refundCommandObservedAt ?? now,
37
+ }
38
+ : {}),
39
+ };
40
+ }
41
+ //# sourceMappingURL=commandBinding.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commandBinding.js","sourceRoot":"","sources":["../../../src/component/refundHistory/commandBinding.ts"],"names":[],"mappings":"AAMA,SAAS,OAAO,CAAC,QAAiB;IAChC,IACE,QAAQ,KAAK,IAAI;QACjB,OAAO,QAAQ,KAAK,QAAQ;QAC5B,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC;QAEvB,OAAO,EAAE,IAAI,EAAE,SAAkB,EAAE,CAAC;IACtC,MAAM,GAAG,GAAI,QAAoC,CAAC,yBAAyB,CAAC;IAC5E,IAAI,GAAG,KAAK,SAAS;QAAE,OAAO,EAAE,IAAI,EAA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AO,IAAI,IAAI,CAAC,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC;IACnD,OAAO;QACL,iCAAiC,EAAE,CAAU;QAC7C,qBAAqB,EAAE,QAAQ;QAC/B,GAAG,CAAC,GAAG;YACL,CAAC,CAAC;gBACE,gBAAgB,EAAE,GAAG;gBACrB,uBAAuB,EAAE,QAAQ,EAAE,uBAAuB,IAAI,GAAG;aAClE;YACH,CAAC,CAAC,EAAE,CAAC;KACR,CAAC;AACJ,CAAC"}
@@ -0,0 +1,50 @@
1
+ import type { QueryCtx } from "../_generated/server.js";
2
+ import { type RefundCommandScope } from "../../shared/refundCommandScope.js";
3
+ /** Bounded global normalization and exact-key proof, never a provider history or retry claim. */
4
+ export declare function readRefundCommandEvidence(ctx: QueryCtx, scope: RefundCommandScope): Promise<{
5
+ status: "unavailable";
6
+ reason: "normalization_incomplete";
7
+ refund?: undefined;
8
+ } | {
9
+ status: "unavailable";
10
+ reason: "ambiguous";
11
+ refund?: undefined;
12
+ } | {
13
+ status: "unavailable";
14
+ reason: "missing";
15
+ refund?: undefined;
16
+ } | {
17
+ status: "unavailable";
18
+ reason: "correlation_conflict";
19
+ refund?: undefined;
20
+ } | {
21
+ status: "unavailable";
22
+ reason: "scope_mismatch";
23
+ refund?: undefined;
24
+ } | {
25
+ status: "unavailable";
26
+ reason: "invalid_receipt";
27
+ refund?: undefined;
28
+ } | {
29
+ reason?: undefined;
30
+ status: "observed";
31
+ refund: {
32
+ _creationTime: number;
33
+ _id: import("convex/values").GenericId<"refunds">;
34
+ accountId: string;
35
+ amount: number;
36
+ currency: string;
37
+ failureReason?: string | undefined;
38
+ metadata?: any;
39
+ reason?: "duplicate" | "expired_uncaptured_charge" | "fraudulent" | "requested_by_customer" | undefined;
40
+ refundCommandConflict?: boolean | undefined;
41
+ refundCommandKey?: string | undefined;
42
+ refundCommandNormalizationVersion?: 1 | undefined;
43
+ refundCommandObservedAt?: number | undefined;
44
+ status: "canceled" | "failed" | "pending" | "requires_action" | "succeeded";
45
+ stripeChargeId?: string | undefined;
46
+ stripePaymentIntentId?: string | undefined;
47
+ stripeRefundId: string;
48
+ };
49
+ }>;
50
+ //# sourceMappingURL=commandEvidence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commandEvidence.d.ts","sourceRoot":"","sources":["../../../src/component/refundHistory/commandEvidence.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,oCAAoC,CAAC;AAE5C,iGAAiG;AACjG,wBAAsB,yBAAyB,CAC7C,GAAG,EAAE,QAAQ,EACb,KAAK,EAAE,kBAAkB;YAWb,aAAa;YACb,0BAA0B;;;YASnB,aAAa;YAAmB,WAAW;;;YAG3C,aAAa;YAAmB,SAAS;;;YAGhD,aAAa;YACb,sBAAsB;;;YAatB,aAAa;YACb,gBAAgB;;;YAWhB,aAAa;YACb,iBAAiB;;;;YAUZ,UAAU;;;;;;;;;;;;;;;;;;;GAC5B"}
@@ -0,0 +1,58 @@
1
+ import { originalRefundSeller } from "./originalSeller.js";
2
+ import { assertRefundCommandScope, } from "../../shared/refundCommandScope.js";
3
+ /** Bounded global normalization and exact-key proof, never a provider history or retry claim. */
4
+ export async function readRefundCommandEvidence(ctx, scope) {
5
+ assertRefundCommandScope(scope);
6
+ const legacy = await ctx.db
7
+ .query("refunds")
8
+ .withIndex("by_refund_command_normalization_version", (q) => q.eq("refundCommandNormalizationVersion", undefined))
9
+ .take(1);
10
+ if (legacy.length)
11
+ return {
12
+ status: "unavailable",
13
+ reason: "normalization_incomplete",
14
+ };
15
+ const rows = await ctx.db
16
+ .query("refunds")
17
+ .withIndex("by_refund_command_key", (q) => q.eq("refundCommandKey", scope.commandKey))
18
+ .take(2);
19
+ if (rows.length > 1)
20
+ return { status: "unavailable", reason: "ambiguous" };
21
+ const row = rows[0];
22
+ if (!row)
23
+ return { status: "unavailable", reason: "missing" };
24
+ if (row.refundCommandConflict)
25
+ return {
26
+ status: "unavailable",
27
+ reason: "correlation_conflict",
28
+ };
29
+ const accountId = row.accountId === undefined
30
+ ? await originalRefundSeller(ctx, scope)
31
+ : row.accountId;
32
+ if (accountId !== scope.accountId ||
33
+ row.stripePaymentIntentId !== scope.stripePaymentIntentId ||
34
+ row.stripeChargeId !== scope.stripeChargeId ||
35
+ row.currency !== scope.currency)
36
+ return {
37
+ status: "unavailable",
38
+ reason: "scope_mismatch",
39
+ };
40
+ if (!/^re_[A-Za-z0-9_]{1,252}$/.test(row.stripeRefundId) ||
41
+ !Number.isSafeInteger(row.amount) ||
42
+ row.amount <= 0 ||
43
+ !Number.isSafeInteger(row.refundCommandObservedAt) ||
44
+ (row.refundCommandObservedAt ?? -1) < 0 ||
45
+ (row.refundCommandObservedAt ?? Infinity) > Date.now())
46
+ return {
47
+ status: "unavailable",
48
+ reason: "invalid_receipt",
49
+ };
50
+ const identity = await ctx.db
51
+ .query("refunds")
52
+ .withIndex("by_stripe_refund_id", (q) => q.eq("stripeRefundId", row.stripeRefundId))
53
+ .take(2);
54
+ if (identity.length !== 1 || identity[0]?._id !== row._id)
55
+ return { status: "unavailable", reason: "ambiguous" };
56
+ return { status: "observed", refund: { ...row, accountId } };
57
+ }
58
+ //# sourceMappingURL=commandEvidence.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commandEvidence.js","sourceRoot":"","sources":["../../../src/component/refundHistory/commandEvidence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAE3D,OAAO,EACL,wBAAwB,GAEzB,MAAM,oCAAoC,CAAC;AAE5C,iGAAiG;AACjG,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAC7C,GAAa,EACb,KAAyB;IAEzB,wBAAwB,CAAC,KAAK,CAAC,CAAC;IAChC,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,EAAE;SACxB,KAAK,CAAC,SAAS,CAAC;SAChB,SA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B,OAAO;YACL,MAAM,EAAE,aAAsB;YAC9B,MAAM,EAAE,gBAAyB;SAClC,CAAC;IACJ,IACE,CAAC,0BAA0B,CAAC,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC;QACpD,CAAC,MAAM,CAAC,aAAa,CAAC,GAAG,CAAC,MAAM,CAAC;QACjC,GAAG,CAAC,MAAM,IAAI,CAAC;QACf,CAAC,MAAM,CAAC,aAAa,CAAC,GAAG,CAAC,uBAAuB,CAAC;QAClD,CAAC,GAAG,CAAC,uBAAuB,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;QACvC,CAAC,GAAG,CAAC,uBAAuB,IAAI,QAAQ,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE;QAEtD,OAAO;YACL,MAAM,EAAE,aAAsB;YAC9B,MAAM,EAAE,iBAA0B;SACnC,CAAC;IACJ,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,EAAE;SAC1B,KAAK,CAAC,SAAS,CAAC;SAChB,SAAS,CAAC,qBAAqB,EAAE,CAAC,CAAC,EAAE,EAAE,CACtC,CAAC,CAAC,EAAE,CAAC,gBAAgB,EAAE,GAAG,CAAC,cAAc,CAAC,CAC3C;SACA,IAAI,CAAC,CAAC,CAAC,CAAC;IACX,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,KAAK,GAAG,CAAC,GAAG;QACvD,OAAO,EAAE,MAAM,EAAE,aAAsB,EAAE,MAAM,EAAE,WAAoB,EAAE,CAAC;IAC1E,OAAO,EAAE,MAAM,EAAE,UAAmB,EAAE,MAAM,EAAE,EAAE,GAAG,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC;AACxE,CAAC"}
@@ -0,0 +1,89 @@
1
+ /** Observation and coverage only; no state here means provider absence or retry authority. */
2
+ export declare const refundCommandEvidenceValidator: import("convex/values").VUnion<{
3
+ refund: {
4
+ _creationTime: number;
5
+ _id: import("convex/values").GenericId<"refunds">;
6
+ accountId?: string | undefined;
7
+ amount: number;
8
+ currency: string;
9
+ failureReason?: string | undefined;
10
+ metadata?: any;
11
+ reason?: "duplicate" | "expired_uncaptured_charge" | "fraudulent" | "requested_by_customer" | undefined;
12
+ refundCommandConflict?: boolean | undefined;
13
+ refundCommandKey?: string | undefined;
14
+ refundCommandNormalizationVersion?: 1 | undefined;
15
+ refundCommandObservedAt?: number | undefined;
16
+ status: "canceled" | "failed" | "pending" | "requires_action" | "succeeded";
17
+ stripeChargeId?: string | undefined;
18
+ stripePaymentIntentId?: string | undefined;
19
+ stripeRefundId: string;
20
+ };
21
+ status: "observed";
22
+ } | {
23
+ reason: "ambiguous" | "correlation_conflict" | "invalid_receipt" | "missing" | "normalization_incomplete" | "scope_mismatch";
24
+ status: "unavailable";
25
+ }, [import("convex/values").VObject<{
26
+ refund: {
27
+ _creationTime: number;
28
+ _id: import("convex/values").GenericId<"refunds">;
29
+ accountId?: string | undefined;
30
+ amount: number;
31
+ currency: string;
32
+ failureReason?: string | undefined;
33
+ metadata?: any;
34
+ reason?: "duplicate" | "expired_uncaptured_charge" | "fraudulent" | "requested_by_customer" | undefined;
35
+ refundCommandConflict?: boolean | undefined;
36
+ refundCommandKey?: string | undefined;
37
+ refundCommandNormalizationVersion?: 1 | undefined;
38
+ refundCommandObservedAt?: number | undefined;
39
+ status: "canceled" | "failed" | "pending" | "requires_action" | "succeeded";
40
+ stripeChargeId?: string | undefined;
41
+ stripePaymentIntentId?: string | undefined;
42
+ stripeRefundId: string;
43
+ };
44
+ status: "observed";
45
+ }, {
46
+ status: import("convex/values").VLiteral<"observed", "required">;
47
+ refund: import("convex/values").VObject<{
48
+ _creationTime: number;
49
+ _id: import("convex/values").GenericId<"refunds">;
50
+ accountId?: string | undefined;
51
+ amount: number;
52
+ currency: string;
53
+ failureReason?: string | undefined;
54
+ metadata?: any;
55
+ reason?: "duplicate" | "expired_uncaptured_charge" | "fraudulent" | "requested_by_customer" | undefined;
56
+ refundCommandConflict?: boolean | undefined;
57
+ refundCommandKey?: string | undefined;
58
+ refundCommandNormalizationVersion?: 1 | undefined;
59
+ refundCommandObservedAt?: number | undefined;
60
+ status: "canceled" | "failed" | "pending" | "requires_action" | "succeeded";
61
+ stripeChargeId?: string | undefined;
62
+ stripePaymentIntentId?: string | undefined;
63
+ stripeRefundId: string;
64
+ }, {
65
+ refundCommandNormalizationVersion: import("convex/values").VLiteral<1 | undefined, "optional">;
66
+ refundCommandKey: import("convex/values").VString<string | undefined, "optional">;
67
+ refundCommandConflict: import("convex/values").VBoolean<boolean | undefined, "optional">;
68
+ refundCommandObservedAt: import("convex/values").VFloat64<number | undefined, "optional">;
69
+ stripeRefundId: import("convex/values").VString<string, "required">;
70
+ stripePaymentIntentId: import("convex/values").VString<string | undefined, "optional">;
71
+ stripeChargeId: import("convex/values").VString<string | undefined, "optional">;
72
+ accountId: import("convex/values").VString<string | undefined, "optional">;
73
+ amount: import("convex/values").VFloat64<number, "required">;
74
+ currency: import("convex/values").VString<string, "required">;
75
+ status: import("convex/values").VUnion<"canceled" | "failed" | "pending" | "requires_action" | "succeeded", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"requires_action", "required">, import("convex/values").VLiteral<"succeeded", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"canceled", "required">], "required", never>;
76
+ reason: import("convex/values").VUnion<"duplicate" | "expired_uncaptured_charge" | "fraudulent" | "requested_by_customer" | undefined, [import("convex/values").VLiteral<"duplicate", "required">, import("convex/values").VLiteral<"fraudulent", "required">, import("convex/values").VLiteral<"requested_by_customer", "required">, import("convex/values").VLiteral<"expired_uncaptured_charge", "required">], "optional", never>;
77
+ failureReason: import("convex/values").VString<string | undefined, "optional">;
78
+ metadata: import("convex/values").VAny<any, "optional", string>;
79
+ _id: import("convex/values").VId<import("convex/values").GenericId<"refunds">, "required">;
80
+ _creationTime: import("convex/values").VFloat64<number, "required">;
81
+ }, "required", "_creationTime" | "_id" | "accountId" | "amount" | "currency" | "failureReason" | "metadata" | "reason" | "refundCommandConflict" | "refundCommandKey" | "refundCommandNormalizationVersion" | "refundCommandObservedAt" | "status" | "stripeChargeId" | "stripePaymentIntentId" | "stripeRefundId" | `metadata.${string}`>;
82
+ }, "required", "refund" | "refund._creationTime" | "refund._id" | "refund.accountId" | "refund.amount" | "refund.currency" | "refund.failureReason" | "refund.metadata" | "refund.reason" | "refund.refundCommandConflict" | "refund.refundCommandKey" | "refund.refundCommandNormalizationVersion" | "refund.refundCommandObservedAt" | "refund.status" | "refund.stripeChargeId" | "refund.stripePaymentIntentId" | "refund.stripeRefundId" | "status" | `refund.metadata.${string}`>, import("convex/values").VObject<{
83
+ reason: "ambiguous" | "correlation_conflict" | "invalid_receipt" | "missing" | "normalization_incomplete" | "scope_mismatch";
84
+ status: "unavailable";
85
+ }, {
86
+ status: import("convex/values").VLiteral<"unavailable", "required">;
87
+ reason: import("convex/values").VUnion<"ambiguous" | "correlation_conflict" | "invalid_receipt" | "missing" | "normalization_incomplete" | "scope_mismatch", [import("convex/values").VLiteral<"missing", "required">, import("convex/values").VLiteral<"normalization_incomplete", "required">, import("convex/values").VLiteral<"ambiguous", "required">, import("convex/values").VLiteral<"correlation_conflict", "required">, import("convex/values").VLiteral<"scope_mismatch", "required">, import("convex/values").VLiteral<"invalid_receipt", "required">], "required", never>;
88
+ }, "required", "reason" | "status">], "required", "reason" | "refund" | "refund._creationTime" | "refund._id" | "refund.accountId" | "refund.amount" | "refund.currency" | "refund.failureReason" | "refund.metadata" | "refund.reason" | "refund.refundCommandConflict" | "refund.refundCommandKey" | "refund.refundCommandNormalizationVersion" | "refund.refundCommandObservedAt" | "refund.status" | "refund.stripeChargeId" | "refund.stripePaymentIntentId" | "refund.stripeRefundId" | "status" | `refund.metadata.${string}`>;
89
+ //# sourceMappingURL=commandEvidenceValidator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commandEvidenceValidator.d.ts","sourceRoot":"","sources":["../../../src/component/refundHistory/commandEvidenceValidator.ts"],"names":[],"mappings":"AAGA,8FAA8F;AAC9F,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qgBAa1C,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { v } from "convex/values";
2
+ import { refundDocValidator } from "../connect/validators.js";
3
+ /** Observation and coverage only; no state here means provider absence or retry authority. */
4
+ export const refundCommandEvidenceValidator = v.union(v.object({ status: v.literal("observed"), refund: refundDocValidator }), v.object({
5
+ status: v.literal("unavailable"),
6
+ reason: v.union(v.literal("missing"), v.literal("normalization_incomplete"), v.literal("ambiguous"), v.literal("correlation_conflict"), v.literal("scope_mismatch"), v.literal("invalid_receipt")),
7
+ }));
8
+ //# sourceMappingURL=commandEvidenceValidator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commandEvidenceValidator.js","sourceRoot":"","sources":["../../../src/component/refundHistory/commandEvidenceValidator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9D,8FAA8F;AAC9F,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CACnD,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,kBAAkB,EAAE,CAAC,EACvE,CAAC,CAAC,MAAM,CAAC;IACP,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC;IAChC,MAAM,EAAE,CAAC,CAAC,KAAK,CACb,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,EACpB,CAAC,CAAC,OAAO,CAAC,0BAA0B,CAAC,EACrC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,EACtB,CAAC,CAAC,OAAO,CAAC,sBAAsB,CAAC,EACjC,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAC3B,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAC7B;CACF,CAAC,CACH,CAAC"}
@@ -0,0 +1,8 @@
1
+ /** Correlation projection only; raw provider refund fields remain authoritative. */
2
+ export declare const refundCommandFields: {
3
+ refundCommandNormalizationVersion: import("convex/values").VLiteral<1 | undefined, "optional">;
4
+ refundCommandKey: import("convex/values").VString<string | undefined, "optional">;
5
+ refundCommandConflict: import("convex/values").VBoolean<boolean | undefined, "optional">;
6
+ refundCommandObservedAt: import("convex/values").VFloat64<number | undefined, "optional">;
7
+ };
8
+ //# sourceMappingURL=commandFields.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commandFields.d.ts","sourceRoot":"","sources":["../../../src/component/refundHistory/commandFields.ts"],"names":[],"mappings":"AAEA,oFAAoF;AACpF,eAAO,MAAM,mBAAmB;IAC9B,iCAAiC;IACjC,gBAAgB;IAChB,qBAAqB;IACrB,uBAAuB;CACxB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { v } from "convex/values";
2
+ /** Correlation projection only; raw provider refund fields remain authoritative. */
3
+ export const refundCommandFields = {
4
+ refundCommandNormalizationVersion: v.optional(v.literal(1)),
5
+ refundCommandKey: v.optional(v.string()),
6
+ refundCommandConflict: v.optional(v.boolean()),
7
+ refundCommandObservedAt: v.optional(v.number()),
8
+ };
9
+ //# sourceMappingURL=commandFields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commandFields.js","sourceRoot":"","sources":["../../../src/component/refundHistory/commandFields.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAElC,oFAAoF;AACpF,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,iCAAiC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3D,gBAAgB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACxC,qBAAqB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;IAC9C,uBAAuB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CAChD,CAAC"}
@@ -0,0 +1,8 @@
1
+ /** Trusted-host projection backfill; completion covers current component rows, never provider history. */
2
+ export declare const normalizeRefundCommandBindings: import("convex/server").RegisteredMutation<"public", {
3
+ limit: number;
4
+ }, Promise<{
5
+ normalized: number;
6
+ hasMore: boolean;
7
+ }>>;
8
+ //# sourceMappingURL=mutations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../../src/component/refundHistory/mutations.ts"],"names":[],"mappings":"AAIA,0GAA0G;AAC1G,eAAO,MAAM,8BAA8B;;;;;GA2BzC,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { v } from "convex/values";
2
+ import { mutation } from "../_generated/server.js";
3
+ import { refundCommandBinding } from "./commandBinding.js";
4
+ /** Trusted-host projection backfill; completion covers current component rows, never provider history. */
5
+ export const normalizeRefundCommandBindings = mutation({
6
+ args: { limit: v.number() },
7
+ returns: v.object({ normalized: v.number(), hasMore: v.boolean() }),
8
+ handler: async (ctx, { limit }) => {
9
+ if (!Number.isInteger(limit) || limit < 1 || limit > 100)
10
+ throw new Error("Normalization limit must be an integer from 1 to 100");
11
+ const rows = await ctx.db
12
+ .query("refunds")
13
+ .withIndex("by_refund_command_normalization_version", (q) => q.eq("refundCommandNormalizationVersion", undefined))
14
+ .take(limit);
15
+ const now = Date.now();
16
+ for (const row of rows)
17
+ await ctx.db.patch("refunds", row._id, refundCommandBinding(row, {}, now));
18
+ const pending = await ctx.db
19
+ .query("refunds")
20
+ .withIndex("by_refund_command_normalization_version", (q) => q.eq("refundCommandNormalizationVersion", undefined))
21
+ .take(1);
22
+ return { normalized: rows.length, hasMore: pending.length > 0 };
23
+ },
24
+ });
25
+ //# sourceMappingURL=mutations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mutations.js","sourceRoot":"","sources":["../../../src/component/refundHistory/mutations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAE3D,0GAA0G;AAC1G,MAAM,CAAC,MAAM,8BAA8B,GAAG,QAAQ,CAAC;IACrD,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE;IAC3B,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC;IACnE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;QAChC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI,KAAK,GAAG,GAAG;YACtD,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;QAC1E,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,EAAE;aACtB,KAAK,CAAC,SAAS,CAAC;aAChB,SAAS,CAAC,yCAAyC,EAAE,CAAC,CAAC,EAAE,EAAE,CAC1D,CAAC,CAAC,EAAE,CAAC,mCAAmC,EAAE,SAAS,CAAC,CACrD;aACA,IAAI,CAAC,KAAK,CAAC,CAAC;QACf,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACvB,KAAK,MAAM,GAAG,IAAI,IAAI;YACpB,MAAM,GAAG,CAAC,EAAE,CAAC,KAAK,CAChB,SAAS,EACT,GAAG,CAAC,GAAG,EACP,oBAAoB,CAAC,GAAG,EAAE,EAAE,EAAE,GAAG,CAAC,CACnC,CAAC;QACJ,MAAM,OAAO,GAAG,MAAM,GAAG,CAAC,EAAE;aACzB,KAAK,CAAC,SAAS,CAAC;aAChB,SAAS,CAAC,yCAAyC,EAAE,CAAC,CAAC,EAAE,EAAE,CAC1D,CAAC,CAAC,EAAE,CAAC,mCAAmC,EAAE,SAAS,CAAC,CACrD;aACA,IAAI,CAAC,CAAC,CAAC,CAAC;QACX,OAAO,EAAE,UAAU,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;IAClE,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { QueryCtx } from "../_generated/server.js";
2
+ import type { RefundCommandScope } from "../../shared/refundCommandScope.js";
3
+ /** At most two exact-charge allocations; mutable payments never establish original ownership. */
4
+ export declare function originalRefundSeller(ctx: QueryCtx, scope: RefundCommandScope): Promise<string | undefined>;
5
+ //# sourceMappingURL=originalSeller.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"originalSeller.d.ts","sourceRoot":"","sources":["../../../src/component/refundHistory/originalSeller.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAyB7E,iGAAiG;AACjG,wBAAsB,oBAAoB,CACxC,GAAG,EAAE,QAAQ,EACb,KAAK,EAAE,kBAAkB,GACxB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAgB7B"}
@@ -0,0 +1,35 @@
1
+ const account = (value) => /^acct_[A-Za-z0-9_]{1,128}$/.test(value);
2
+ /** Immutable allocation routing only. Observation does not authorize a refund. */
3
+ function seller(allocation) {
4
+ const destinations = new Set();
5
+ let store;
6
+ for (const recipient of allocation.transfers) {
7
+ if (!account(recipient.destinationAccountId) ||
8
+ destinations.has(recipient.destinationAccountId) ||
9
+ !Number.isSafeInteger(recipient.amount) ||
10
+ recipient.amount < 0)
11
+ return undefined;
12
+ destinations.add(recipient.destinationAccountId);
13
+ if (recipient.role === "store") {
14
+ if (store !== undefined)
15
+ return undefined;
16
+ store = recipient.destinationAccountId;
17
+ }
18
+ }
19
+ return store;
20
+ }
21
+ /** At most two exact-charge allocations; mutable payments never establish original ownership. */
22
+ export async function originalRefundSeller(ctx, scope) {
23
+ const allocations = await ctx.db
24
+ .query("settlementAllocations")
25
+ .withIndex("by_source_charge", (q) => q.eq("sourceChargeId", scope.stripeChargeId))
26
+ .take(2);
27
+ const allocation = allocations[0];
28
+ if (allocations.length !== 1 ||
29
+ !allocation ||
30
+ allocation.paymentIntentId !== scope.stripePaymentIntentId ||
31
+ allocation.currency !== scope.currency)
32
+ return undefined;
33
+ return seller(allocation);
34
+ }
35
+ //# sourceMappingURL=originalSeller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"originalSeller.js","sourceRoot":"","sources":["../../../src/component/refundHistory/originalSeller.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,4BAA4B,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAE5E,kFAAkF;AAClF,SAAS,MAAM,CAAC,UAAwC;IACtD,MAAM,YAAY,GAAG,IAAI,GAAG,EAAU,CAAC;IACvC,IAAI,KAAyB,CAAC;IAC9B,KAAK,MAAM,SAAS,IAAI,UAAU,CAAC,SAAS,EAAE,CAAC;QAC7C,IACE,CAAC,OAAO,CAAC,SAAS,CAAC,oBAAoB,CAAC;YACxC,YAAY,CAAC,GAAG,CAAC,SAAS,CAAC,oBAAoB,CAAC;YAChD,CAAC,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC,MAAM,CAAC;YACvC,SAAS,CAAC,MAAM,GAAG,CAAC;YAEpB,OAAO,SAAS,CAAC;QACnB,YAAY,CAAC,GAAG,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC;QACjD,IAAI,SAAS,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;YAC/B,IAAI,KAAK,KAAK,SAAS;gBAAE,OAAO,SAAS,CAAC;YAC1C,KAAK,GAAG,SAAS,CAAC,oBAAoB,CAAC;QACzC,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,iGAAiG;AACjG,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,GAAa,EACb,KAAyB;IAEzB,MAAM,WAAW,GAAG,MAAM,GAAG,CAAC,EAAE;SAC7B,KAAK,CAAC,uBAAuB,CAAC;SAC9B,SAAS,CAAC,kBAAkB,EAAE,CAAC,CAAC,EAAE,EAAE,CACnC,CAAC,CAAC,EAAE,CAAC,gBAAgB,EAAE,KAAK,CAAC,cAAc,CAAC,CAC7C;SACA,IAAI,CAAC,CAAC,CAAC,CAAC;IACX,MAAM,UAAU,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;IAClC,IACE,WAAW,CAAC,MAAM,KAAK,CAAC;QACxB,CAAC,UAAU;QACX,UAAU,CAAC,eAAe,KAAK,KAAK,CAAC,qBAAqB;QAC1D,UAAU,CAAC,QAAQ,KAAK,KAAK,CAAC,QAAQ;QAEtC,OAAO,SAAS,CAAC;IACnB,OAAO,MAAM,CAAC,UAAU,CAAC,CAAC;AAC5B,CAAC"}
@@ -20,9 +20,60 @@ export declare const paginateRefunds: import("convex/server").RegisteredQuery<"p
20
20
  failureReason?: string | undefined;
21
21
  metadata?: any;
22
22
  reason?: "duplicate" | "expired_uncaptured_charge" | "fraudulent" | "requested_by_customer" | undefined;
23
+ refundCommandConflict?: boolean | undefined;
24
+ refundCommandKey?: string | undefined;
25
+ refundCommandNormalizationVersion?: 1 | undefined;
26
+ refundCommandObservedAt?: number | undefined;
23
27
  status: "canceled" | "failed" | "pending" | "requires_action" | "succeeded";
24
28
  stripeChargeId?: string | undefined;
25
29
  stripePaymentIntentId?: string | undefined;
26
30
  stripeRefundId: string;
27
31
  }>>>;
32
+ /** Exact command evidence is read-only and never authorizes a provider retry. */
33
+ export declare const getRefundCommandEvidence: import("convex/server").RegisteredQuery<"public", import("../../shared/refundCommandScope.js").RefundCommandScope, Promise<{
34
+ status: "unavailable";
35
+ reason: "normalization_incomplete";
36
+ refund?: undefined;
37
+ } | {
38
+ status: "unavailable";
39
+ reason: "ambiguous";
40
+ refund?: undefined;
41
+ } | {
42
+ status: "unavailable";
43
+ reason: "missing";
44
+ refund?: undefined;
45
+ } | {
46
+ status: "unavailable";
47
+ reason: "correlation_conflict";
48
+ refund?: undefined;
49
+ } | {
50
+ status: "unavailable";
51
+ reason: "scope_mismatch";
52
+ refund?: undefined;
53
+ } | {
54
+ status: "unavailable";
55
+ reason: "invalid_receipt";
56
+ refund?: undefined;
57
+ } | {
58
+ reason?: undefined;
59
+ status: "observed";
60
+ refund: {
61
+ _creationTime: number;
62
+ _id: import("convex/values").GenericId<"refunds">;
63
+ accountId: string;
64
+ amount: number;
65
+ currency: string;
66
+ failureReason?: string | undefined;
67
+ metadata?: any;
68
+ reason?: "duplicate" | "expired_uncaptured_charge" | "fraudulent" | "requested_by_customer" | undefined;
69
+ refundCommandConflict?: boolean | undefined;
70
+ refundCommandKey?: string | undefined;
71
+ refundCommandNormalizationVersion?: 1 | undefined;
72
+ refundCommandObservedAt?: number | undefined;
73
+ status: "canceled" | "failed" | "pending" | "requires_action" | "succeeded";
74
+ stripeChargeId?: string | undefined;
75
+ stripePaymentIntentId?: string | undefined;
76
+ stripeRefundId: string;
77
+ };
78
+ }>>;
28
79
  //# sourceMappingURL=queries.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../src/component/refundHistory/queries.ts"],"names":[],"mappings":"AAeA,wFAAwF;AACxF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;IA0B1B,CAAC"}
1
+ {"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../src/component/refundHistory/queries.ts"],"names":[],"mappings":"AAiBA,wFAAwF;AACxF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA0B1B,CAAC;AA0DH,iFAAiF;AACjF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAUnC,CAAC"}
@@ -1,3 +1,5 @@
1
+ import { refundCommandEvidenceValidator } from "./commandEvidenceValidator.js";
2
+ import { readRefundCommandEvidence } from "./commandEvidence.js";
1
3
  import { paginationOptsValidator, paginationResultValidator, } from "convex/server";
2
4
  import { v } from "convex/values";
3
5
  import { paginator } from "convex-helpers/server/pagination";
@@ -56,4 +58,16 @@ function scopedRefunds(ctx, args) {
56
58
  return refunds.withIndex("by_status", (q) => q.eq("status", status));
57
59
  return refunds;
58
60
  }
61
+ /** Exact command evidence is read-only and never authorizes a provider retry. */
62
+ export const getRefundCommandEvidence = query({
63
+ args: {
64
+ commandKey: v.string(),
65
+ accountId: v.string(),
66
+ stripePaymentIntentId: v.string(),
67
+ stripeChargeId: v.string(),
68
+ currency: v.string(),
69
+ },
70
+ returns: refundCommandEvidenceValidator,
71
+ handler: readRefundCommandEvidence,
72
+ });
59
73
  //# sourceMappingURL=queries.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"queries.js","sourceRoot":"","sources":["../../../src/component/refundHistory/queries.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,yBAAyB,GAC1B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAE7D,OAAO,EAAE,KAAK,EAAiB,MAAM,yBAAyB,CAAC;AAC/D,OAAO,MAAM,MAAM,cAAc,CAAC;AAClC,OAAO,EACL,kBAAkB,EAClB,qBAAqB,GAEtB,MAAM,0BAA0B,CAAC;AAElC,wFAAwF;AACxF,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAA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