@fantastic.dev/better-stripe 0.23.1 → 0.24.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 (287) hide show
  1. package/CHANGELOG.md +26 -2
  2. package/README.md +40 -5
  3. package/dist/client/affiliateRecovery/disputes.d.ts +18 -0
  4. package/dist/client/affiliateRecovery/disputes.d.ts.map +1 -0
  5. package/dist/client/affiliateRecovery/disputes.js +33 -0
  6. package/dist/client/affiliateRecovery/disputes.js.map +1 -0
  7. package/dist/client/affiliateRecovery/engine.d.ts +29 -0
  8. package/dist/client/affiliateRecovery/engine.d.ts.map +1 -0
  9. package/dist/client/affiliateRecovery/engine.js +116 -0
  10. package/dist/client/affiliateRecovery/engine.js.map +1 -0
  11. package/dist/client/affiliateRecovery/payoutGate.d.ts +24 -0
  12. package/dist/client/affiliateRecovery/payoutGate.d.ts.map +1 -0
  13. package/dist/client/affiliateRecovery/payoutGate.js +30 -0
  14. package/dist/client/affiliateRecovery/payoutGate.js.map +1 -0
  15. package/dist/client/affiliateRecovery/provider.d.ts +14 -0
  16. package/dist/client/affiliateRecovery/provider.d.ts.map +1 -0
  17. package/dist/client/affiliateRecovery/provider.js +96 -0
  18. package/dist/client/affiliateRecovery/provider.js.map +1 -0
  19. package/dist/client/affiliateRecovery/review.d.ts +28 -0
  20. package/dist/client/affiliateRecovery/review.d.ts.map +1 -0
  21. package/dist/client/affiliateRecovery/review.js +86 -0
  22. package/dist/client/affiliateRecovery/review.js.map +1 -0
  23. package/dist/client/affiliateRecovery/validators.d.ts +402 -0
  24. package/dist/client/affiliateRecovery/validators.d.ts.map +1 -0
  25. package/dist/client/affiliateRecovery/validators.js +27 -0
  26. package/dist/client/affiliateRecovery/validators.js.map +1 -0
  27. package/dist/client/affiliateRecovery.d.ts +131 -0
  28. package/dist/client/affiliateRecovery.d.ts.map +1 -0
  29. package/dist/client/affiliateRecovery.js +69 -0
  30. package/dist/client/affiliateRecovery.js.map +1 -0
  31. package/dist/client/connect/commissionReceipts.d.ts +4 -0
  32. package/dist/client/connect/commissionReceipts.d.ts.map +1 -0
  33. package/dist/client/connect/commissionReceipts.js +17 -0
  34. package/dist/client/connect/commissionReceipts.js.map +1 -0
  35. package/dist/client/connect/payoutAdoptionTestHelpers.d.ts +536 -2
  36. package/dist/client/connect/payoutAdoptionTestHelpers.d.ts.map +1 -1
  37. package/dist/client/connect/payoutSync.d.ts +32 -0
  38. package/dist/client/connect/payoutSync.d.ts.map +1 -0
  39. package/dist/client/connect/payoutSync.js +48 -0
  40. package/dist/client/connect/payoutSync.js.map +1 -0
  41. package/dist/client/connect/payoutSyncTestHelpers.d.ts +1509 -0
  42. package/dist/client/connect/payoutSyncTestHelpers.d.ts.map +1 -0
  43. package/dist/client/connect/payoutSyncTestHelpers.js +62 -0
  44. package/dist/client/connect/payoutSyncTestHelpers.js.map +1 -0
  45. package/dist/client/connect/payoutSyncValidation.d.ts +16 -0
  46. package/dist/client/connect/payoutSyncValidation.d.ts.map +1 -0
  47. package/dist/client/connect/payoutSyncValidation.js +54 -0
  48. package/dist/client/connect/payoutSyncValidation.js.map +1 -0
  49. package/dist/client/connect/payouts.d.ts +3 -1
  50. package/dist/client/connect/payouts.d.ts.map +1 -1
  51. package/dist/client/connect/payouts.js +45 -12
  52. package/dist/client/connect/payouts.js.map +1 -1
  53. package/dist/client/connect/refundPrincipal.d.ts +4 -0
  54. package/dist/client/connect/refundPrincipal.d.ts.map +1 -0
  55. package/dist/client/connect/refundPrincipal.js +21 -0
  56. package/dist/client/connect/refundPrincipal.js.map +1 -0
  57. package/dist/client/connect/reversalExecution.d.ts +47 -0
  58. package/dist/client/connect/reversalExecution.d.ts.map +1 -0
  59. package/dist/client/connect/reversalExecution.js +84 -0
  60. package/dist/client/connect/reversalExecution.js.map +1 -0
  61. package/dist/client/connect/transfers.d.ts +8 -4
  62. package/dist/client/connect/transfers.d.ts.map +1 -1
  63. package/dist/client/connect/transfers.js +52 -57
  64. package/dist/client/connect/transfers.js.map +1 -1
  65. package/dist/client/index.d.ts +29 -9
  66. package/dist/client/index.d.ts.map +1 -1
  67. package/dist/client/index.js +9 -6
  68. package/dist/client/index.js.map +1 -1
  69. package/dist/client/readContracts.d.ts +8 -0
  70. package/dist/client/readContracts.d.ts.map +1 -1
  71. package/dist/client/readContracts.js +7 -0
  72. package/dist/client/readContracts.js.map +1 -1
  73. package/dist/client/settlement/execution.d.ts.map +1 -1
  74. package/dist/client/settlement/execution.js +30 -3
  75. package/dist/client/settlement/execution.js.map +1 -1
  76. package/dist/client/settlement/reconciliation.d.ts.map +1 -1
  77. package/dist/client/settlement/reconciliation.js +16 -2
  78. package/dist/client/settlement/reconciliation.js.map +1 -1
  79. package/dist/client/webhooks/disputeRecovery.d.ts +4 -0
  80. package/dist/client/webhooks/disputeRecovery.d.ts.map +1 -0
  81. package/dist/client/webhooks/disputeRecovery.js +40 -0
  82. package/dist/client/webhooks/disputeRecovery.js.map +1 -0
  83. package/dist/client/webhooks/processors.d.ts.map +1 -1
  84. package/dist/client/webhooks/processors.js +14 -29
  85. package/dist/client/webhooks/processors.js.map +1 -1
  86. package/dist/component/_generated/component.d.ts +560 -0
  87. package/dist/component/_generated/component.d.ts.map +1 -1
  88. package/dist/component/affiliateEarnings/mutations.d.ts +22 -0
  89. package/dist/component/affiliateEarnings/mutations.d.ts.map +1 -0
  90. package/dist/component/affiliateEarnings/mutations.js +160 -0
  91. package/dist/component/affiliateEarnings/mutations.js.map +1 -0
  92. package/dist/component/affiliatePayouts/mutations.d.ts +25 -0
  93. package/dist/component/affiliatePayouts/mutations.d.ts.map +1 -0
  94. package/dist/component/affiliatePayouts/mutations.js +104 -0
  95. package/dist/component/affiliatePayouts/mutations.js.map +1 -0
  96. package/dist/component/affiliatePayouts/queries.d.ts +23 -0
  97. package/dist/component/affiliatePayouts/queries.d.ts.map +1 -0
  98. package/dist/component/affiliatePayouts/queries.js +23 -0
  99. package/dist/component/affiliatePayouts/queries.js.map +1 -0
  100. package/dist/component/affiliatePayouts/recipientGuard.d.ts +12 -0
  101. package/dist/component/affiliatePayouts/recipientGuard.d.ts.map +1 -0
  102. package/dist/component/affiliatePayouts/recipientGuard.js +26 -0
  103. package/dist/component/affiliatePayouts/recipientGuard.js.map +1 -0
  104. package/dist/component/affiliateRecovery/accounting.d.ts +28 -0
  105. package/dist/component/affiliateRecovery/accounting.d.ts.map +1 -0
  106. package/dist/component/affiliateRecovery/accounting.js +71 -0
  107. package/dist/component/affiliateRecovery/accounting.js.map +1 -0
  108. package/dist/component/affiliateRecovery/mutations.d.ts +65 -0
  109. package/dist/component/affiliateRecovery/mutations.d.ts.map +1 -0
  110. package/dist/component/affiliateRecovery/mutations.js +250 -0
  111. package/dist/component/affiliateRecovery/mutations.js.map +1 -0
  112. package/dist/component/affiliateRecovery/queries.d.ts +305 -0
  113. package/dist/component/affiliateRecovery/queries.d.ts.map +1 -0
  114. package/dist/component/affiliateRecovery/queries.js +113 -0
  115. package/dist/component/affiliateRecovery/queries.js.map +1 -0
  116. package/dist/component/affiliateRecovery/schema.d.ts +171 -0
  117. package/dist/component/affiliateRecovery/schema.d.ts.map +1 -0
  118. package/dist/component/affiliateRecovery/schema.js +71 -0
  119. package/dist/component/affiliateRecovery/schema.js.map +1 -0
  120. package/dist/component/connect/mutations.d.ts +36 -23
  121. package/dist/component/connect/mutations.d.ts.map +1 -1
  122. package/dist/component/connect/mutations.js +11 -151
  123. package/dist/component/connect/mutations.js.map +1 -1
  124. package/dist/component/connect/payoutWrites.d.ts +21 -0
  125. package/dist/component/connect/payoutWrites.d.ts.map +1 -0
  126. package/dist/component/connect/payoutWrites.js +19 -0
  127. package/dist/component/connect/payoutWrites.js.map +1 -0
  128. package/dist/component/connect/queries.d.ts +10 -0
  129. package/dist/component/connect/queries.d.ts.map +1 -1
  130. package/dist/component/connect/queries.js +3 -40
  131. package/dist/component/connect/queries.js.map +1 -1
  132. package/dist/component/connect/reversalClaims.d.ts +169 -0
  133. package/dist/component/connect/reversalClaims.d.ts.map +1 -0
  134. package/dist/component/connect/reversalClaims.js +176 -0
  135. package/dist/component/connect/reversalClaims.js.map +1 -0
  136. package/dist/component/connect/reversalDiagnostics.d.ts +59 -0
  137. package/dist/component/connect/reversalDiagnostics.d.ts.map +1 -0
  138. package/dist/component/connect/reversalDiagnostics.js +50 -0
  139. package/dist/component/connect/reversalDiagnostics.js.map +1 -0
  140. package/dist/component/connect/reversalReceipts.d.ts +27 -0
  141. package/dist/component/connect/reversalReceipts.d.ts.map +1 -0
  142. package/dist/component/connect/reversalReceipts.js +85 -0
  143. package/dist/component/connect/reversalReceipts.js.map +1 -0
  144. package/dist/component/connect/schema.d.ts +31 -1
  145. package/dist/component/connect/schema.d.ts.map +1 -1
  146. package/dist/component/connect/schema.js +3 -1
  147. package/dist/component/connect/schema.js.map +1 -1
  148. package/dist/component/connect/validators.d.ts +49 -1
  149. package/dist/component/connect/validators.d.ts.map +1 -1
  150. package/dist/component/connect/validators.js +2 -0
  151. package/dist/component/connect/validators.js.map +1 -1
  152. package/dist/component/earnings/triggers.d.ts +454 -2
  153. package/dist/component/earnings/triggers.d.ts.map +1 -1
  154. package/dist/component/payoutRelease/mutations.d.ts.map +1 -1
  155. package/dist/component/payoutRelease/mutations.js +6 -0
  156. package/dist/component/payoutRelease/mutations.js.map +1 -1
  157. package/dist/component/payoutRelease/queries.d.ts.map +1 -1
  158. package/dist/component/payoutRelease/queries.js +3 -1
  159. package/dist/component/payoutRelease/queries.js.map +1 -1
  160. package/dist/component/payoutSync/helpers.d.ts +44 -0
  161. package/dist/component/payoutSync/helpers.d.ts.map +1 -0
  162. package/dist/component/payoutSync/helpers.js +60 -0
  163. package/dist/component/payoutSync/helpers.js.map +1 -0
  164. package/dist/component/payoutSync/mutations.d.ts +51 -0
  165. package/dist/component/payoutSync/mutations.d.ts.map +1 -0
  166. package/dist/component/payoutSync/mutations.js +88 -0
  167. package/dist/component/payoutSync/mutations.js.map +1 -0
  168. package/dist/component/payoutSync/queries.d.ts +16 -0
  169. package/dist/component/payoutSync/queries.d.ts.map +1 -0
  170. package/dist/component/payoutSync/queries.js +11 -0
  171. package/dist/component/payoutSync/queries.js.map +1 -0
  172. package/dist/component/payoutSync/schema.d.ts +46 -0
  173. package/dist/component/payoutSync/schema.d.ts.map +1 -0
  174. package/dist/component/payoutSync/schema.js +22 -0
  175. package/dist/component/payoutSync/schema.js.map +1 -0
  176. package/dist/component/payoutSync/validators.d.ts +137 -0
  177. package/dist/component/payoutSync/validators.d.ts.map +1 -0
  178. package/dist/component/payoutSync/validators.js +19 -0
  179. package/dist/component/payoutSync/validators.js.map +1 -0
  180. package/dist/component/schema.d.ts +268 -1
  181. package/dist/component/schema.js +11 -0
  182. package/dist/component/schema.js.map +1 -1
  183. package/dist/component/settlement/clawbackSchema.d.ts +161 -0
  184. package/dist/component/settlement/clawbackSchema.d.ts.map +1 -0
  185. package/dist/component/settlement/clawbackSchema.js +73 -0
  186. package/dist/component/settlement/clawbackSchema.js.map +1 -0
  187. package/dist/component/settlement/clawbacks.d.ts +55 -0
  188. package/dist/component/settlement/clawbacks.d.ts.map +1 -0
  189. package/dist/component/settlement/clawbacks.js +146 -0
  190. package/dist/component/settlement/clawbacks.js.map +1 -0
  191. package/dist/component/settlement/mutations.d.ts +16 -0
  192. package/dist/component/settlement/mutations.d.ts.map +1 -1
  193. package/dist/component/settlement/mutations.js +48 -0
  194. package/dist/component/settlement/mutations.js.map +1 -1
  195. package/dist/component/settlement/queries.d.ts +53 -0
  196. package/dist/component/settlement/queries.d.ts.map +1 -1
  197. package/dist/component/settlement/queries.js +26 -0
  198. package/dist/component/settlement/queries.js.map +1 -1
  199. package/dist/react/workflows/AffiliateRecovery.d.ts +46 -0
  200. package/dist/react/workflows/AffiliateRecovery.d.ts.map +1 -0
  201. package/dist/react/workflows/AffiliateRecovery.js +84 -0
  202. package/dist/react/workflows/AffiliateRecovery.js.map +1 -0
  203. package/dist/react/workflows/index.d.ts +2 -0
  204. package/dist/react/workflows/index.d.ts.map +1 -1
  205. package/dist/react/workflows/index.js +1 -0
  206. package/dist/react/workflows/index.js.map +1 -1
  207. package/dist/testing/affiliate-recovery.d.ts +10 -0
  208. package/dist/testing/affiliate-recovery.d.ts.map +1 -0
  209. package/dist/testing/affiliate-recovery.js +126 -0
  210. package/dist/testing/affiliate-recovery.js.map +1 -0
  211. package/dist/testing/index.d.ts +2 -0
  212. package/dist/testing/index.d.ts.map +1 -1
  213. package/dist/testing/index.js +1 -0
  214. package/dist/testing/index.js.map +1 -1
  215. package/docs/affiliate-clawbacks.md +306 -0
  216. package/docs/read-contracts.md +40 -5
  217. package/docs/settlement.md +17 -0
  218. package/package.json +2 -1
  219. package/src/client/affiliateRecovery/disputes.ts +62 -0
  220. package/src/client/affiliateRecovery/engine.ts +196 -0
  221. package/src/client/affiliateRecovery/payoutGate.ts +65 -0
  222. package/src/client/affiliateRecovery/provider.ts +127 -0
  223. package/src/client/affiliateRecovery/review.ts +117 -0
  224. package/src/client/affiliateRecovery/validators.ts +38 -0
  225. package/src/client/affiliateRecovery.ts +173 -0
  226. package/src/client/connect/commissionReceipts.test.ts +157 -0
  227. package/src/client/connect/commissionReceipts.ts +23 -0
  228. package/src/client/connect/payoutSync.test.ts +313 -0
  229. package/src/client/connect/payoutSync.ts +93 -0
  230. package/src/client/connect/payoutSyncTestHelpers.ts +82 -0
  231. package/src/client/connect/payoutSyncValidation.ts +74 -0
  232. package/src/client/connect/payouts.ts +75 -15
  233. package/src/client/connect/refundPrincipal.test.ts +46 -0
  234. package/src/client/connect/refundPrincipal.ts +26 -0
  235. package/src/client/connect/reversalExecution.ts +130 -0
  236. package/src/client/connect/transfers.test.ts +3 -3
  237. package/src/client/connect/transfers.ts +93 -92
  238. package/src/client/index.ts +20 -18
  239. package/src/client/readContracts.ts +12 -0
  240. package/src/client/settlement/execution.test.ts +5 -0
  241. package/src/client/settlement/execution.ts +50 -3
  242. package/src/client/settlement/reconciliation.ts +20 -2
  243. package/src/client/webhooks/disputeRecovery.ts +74 -0
  244. package/src/client/webhooks/processors.test.ts +36 -53
  245. package/src/client/webhooks/processors.ts +18 -31
  246. package/src/component/_generated/api.ts +34 -0
  247. package/src/component/_generated/component.ts +696 -1
  248. package/src/component/affiliate-clawbacks.test.ts +370 -0
  249. package/src/component/affiliate-component-pagination.test.ts +83 -0
  250. package/src/component/affiliate-direct-payout.test.ts +160 -0
  251. package/src/component/affiliate-recovery-lifecycle.test.ts +587 -0
  252. package/src/component/affiliateEarnings/mutations.ts +196 -0
  253. package/src/component/affiliatePayouts/mutations.ts +121 -0
  254. package/src/component/affiliatePayouts/queries.ts +28 -0
  255. package/src/component/affiliatePayouts/recipientGuard.ts +42 -0
  256. package/src/component/affiliateRecovery/accounting.ts +111 -0
  257. package/src/component/affiliateRecovery/mutations.ts +275 -0
  258. package/src/component/affiliateRecovery/queries.ts +138 -0
  259. package/src/component/affiliateRecovery/schema.ts +86 -0
  260. package/src/component/connect/mutations.ts +13 -190
  261. package/src/component/connect/payoutWrites.ts +25 -0
  262. package/src/component/connect/queries.ts +4 -47
  263. package/src/component/connect/reversalClaims.ts +232 -0
  264. package/src/component/connect/reversalDiagnostics.ts +61 -0
  265. package/src/component/connect/reversalReceipts.ts +147 -0
  266. package/src/component/connect/schema.ts +3 -3
  267. package/src/component/connect/validators.ts +2 -0
  268. package/src/component/payout-recovery-integration.test.ts +172 -0
  269. package/src/component/payout-sync.test.ts +117 -0
  270. package/src/component/payoutRelease/mutations.ts +9 -0
  271. package/src/component/payoutRelease/queries.ts +3 -1
  272. package/src/component/payoutSync/helpers.ts +86 -0
  273. package/src/component/payoutSync/mutations.ts +102 -0
  274. package/src/component/payoutSync/queries.ts +10 -0
  275. package/src/component/payoutSync/schema.ts +25 -0
  276. package/src/component/payoutSync/validators.ts +21 -0
  277. package/src/component/schema.ts +20 -0
  278. package/src/component/settlement/clawbackSchema.ts +78 -0
  279. package/src/component/settlement/clawbacks.ts +233 -0
  280. package/src/component/settlement/mutations.ts +54 -0
  281. package/src/component/settlement/queries.ts +35 -0
  282. package/src/component/summary-arithmetic.test.ts +9 -4
  283. package/src/react/workflows/AffiliateRecovery.test.tsx +106 -0
  284. package/src/react/workflows/AffiliateRecovery.tsx +273 -0
  285. package/src/react/workflows/index.ts +9 -0
  286. package/src/testing/affiliate-recovery.ts +137 -0
  287. package/src/testing/index.ts +2 -0
@@ -1,4 +1,241 @@
1
1
  declare const _default: import("convex/server").SchemaDefinition<{
2
+ affiliateObligations: import("convex/server").TableDefinition<import("convex/values").VObject<{
3
+ accounted?: boolean | undefined;
4
+ activeOperationId?: import("convex/values").GenericId<"affiliateRecoveryOperations"> | undefined;
5
+ affiliateAccountId: string;
6
+ chargeAmount: number;
7
+ creditAmount?: number | undefined;
8
+ currency: string;
9
+ debtAmount?: number | undefined;
10
+ debtStatus?: "open" | "settled" | undefined;
11
+ disputeId?: string | undefined;
12
+ disputeState?: "lost" | "open" | "won" | undefined;
13
+ disputedPrincipal: number;
14
+ earningId?: import("convex/values").GenericId<"affiliateEarnings"> | undefined;
15
+ finalizedAmount: number;
16
+ lastError?: string | undefined;
17
+ lastRefundId?: string | undefined;
18
+ lastState?: string | undefined;
19
+ legacyReceiptIds?: string[] | undefined;
20
+ legacyRestorationIds?: string[] | undefined;
21
+ lostPrincipal: number;
22
+ needsReconciliation: boolean;
23
+ offsetAmount?: number | undefined;
24
+ operationSequence?: number | undefined;
25
+ operatorNote?: string | undefined;
26
+ originalCommission: number;
27
+ paymentId?: string | undefined;
28
+ paymentIntentId?: string | undefined;
29
+ provisionalAmount: number;
30
+ recoveredAmount: number;
31
+ refundedPrincipal: number;
32
+ releasedCommission?: number | undefined;
33
+ reservedRecovery?: number | undefined;
34
+ reservedRestoration?: number | undefined;
35
+ restoredAmount?: number | undefined;
36
+ sourceChargeId: string;
37
+ sourceInvoiceId?: string | undefined;
38
+ storeAccountId?: string | undefined;
39
+ stripeTransferId?: string | undefined;
40
+ }, {
41
+ stripeTransferId: import("convex/values").VString<string | undefined, "optional">;
42
+ sourceChargeId: import("convex/values").VString<string, "required">;
43
+ sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
44
+ paymentIntentId: import("convex/values").VString<string | undefined, "optional">;
45
+ paymentId: import("convex/values").VString<string | undefined, "optional">;
46
+ storeAccountId: import("convex/values").VString<string | undefined, "optional">;
47
+ lastRefundId: import("convex/values").VString<string | undefined, "optional">;
48
+ affiliateAccountId: import("convex/values").VString<string, "required">;
49
+ currency: import("convex/values").VString<string, "required">;
50
+ chargeAmount: import("convex/values").VFloat64<number, "required">;
51
+ originalCommission: import("convex/values").VFloat64<number, "required">;
52
+ refundedPrincipal: import("convex/values").VFloat64<number, "required">;
53
+ disputedPrincipal: import("convex/values").VFloat64<number, "required">;
54
+ lostPrincipal: import("convex/values").VFloat64<number, "required">;
55
+ finalizedAmount: import("convex/values").VFloat64<number, "required">;
56
+ provisionalAmount: import("convex/values").VFloat64<number, "required">;
57
+ recoveredAmount: import("convex/values").VFloat64<number, "required">;
58
+ needsReconciliation: import("convex/values").VBoolean<boolean, "required">;
59
+ accounted: import("convex/values").VBoolean<boolean | undefined, "optional">;
60
+ legacyReceiptIds: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
61
+ legacyRestorationIds: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
62
+ operatorNote: import("convex/values").VString<string | undefined, "optional">;
63
+ earningId: import("convex/values").VId<import("convex/values").GenericId<"affiliateEarnings"> | undefined, "optional">;
64
+ releasedCommission: import("convex/values").VFloat64<number | undefined, "optional">;
65
+ offsetAmount: import("convex/values").VFloat64<number | undefined, "optional">;
66
+ restoredAmount: import("convex/values").VFloat64<number | undefined, "optional">;
67
+ reservedRecovery: import("convex/values").VFloat64<number | undefined, "optional">;
68
+ reservedRestoration: import("convex/values").VFloat64<number | undefined, "optional">;
69
+ debtAmount: import("convex/values").VFloat64<number | undefined, "optional">;
70
+ creditAmount: import("convex/values").VFloat64<number | undefined, "optional">;
71
+ debtStatus: import("convex/values").VUnion<"open" | "settled" | undefined, [import("convex/values").VLiteral<"open", "required">, import("convex/values").VLiteral<"settled", "required">], "optional", never>;
72
+ disputeState: import("convex/values").VUnion<"lost" | "open" | "won" | undefined, [import("convex/values").VLiteral<"open", "required">, import("convex/values").VLiteral<"lost", "required">, import("convex/values").VLiteral<"won", "required">], "optional", never>;
73
+ disputeId: import("convex/values").VString<string | undefined, "optional">;
74
+ activeOperationId: import("convex/values").VId<import("convex/values").GenericId<"affiliateRecoveryOperations"> | undefined, "optional">;
75
+ lastState: import("convex/values").VString<string | undefined, "optional">;
76
+ lastError: import("convex/values").VString<string | undefined, "optional">;
77
+ operationSequence: import("convex/values").VFloat64<number | undefined, "optional">;
78
+ }, "required", "accounted" | "activeOperationId" | "affiliateAccountId" | "chargeAmount" | "creditAmount" | "currency" | "debtAmount" | "debtStatus" | "disputeId" | "disputeState" | "disputedPrincipal" | "earningId" | "finalizedAmount" | "lastError" | "lastRefundId" | "lastState" | "legacyReceiptIds" | "legacyRestorationIds" | "lostPrincipal" | "needsReconciliation" | "offsetAmount" | "operationSequence" | "operatorNote" | "originalCommission" | "paymentId" | "paymentIntentId" | "provisionalAmount" | "recoveredAmount" | "refundedPrincipal" | "releasedCommission" | "reservedRecovery" | "reservedRestoration" | "restoredAmount" | "sourceChargeId" | "sourceInvoiceId" | "storeAccountId" | "stripeTransferId">, {
79
+ by_affiliate_currency: ["affiliateAccountId", "currency", "_creationTime"];
80
+ by_affiliate_currency_debt: ["affiliateAccountId", "currency", "debtStatus", "_creationTime"];
81
+ by_charge: ["sourceChargeId", "_creationTime"];
82
+ by_transfer: ["stripeTransferId", "_creationTime"];
83
+ }, {}, {}>;
84
+ affiliateRecoveryOperations: import("convex/server").TableDefinition<import("convex/values").VObject<{
85
+ amount: number;
86
+ attempted: boolean;
87
+ createdAt: number;
88
+ error?: string | undefined;
89
+ kind: "recovery" | "restoration";
90
+ obligationId: import("convex/values").GenericId<"affiliateObligations">;
91
+ providerBaseline?: number | undefined;
92
+ receiptId?: string | undefined;
93
+ sourceEventId?: string | undefined;
94
+ state: "canceled" | "failed" | "insufficient_balance" | "pending" | "succeeded" | "unknown" | "unsupported";
95
+ }, {
96
+ obligationId: import("convex/values").VId<import("convex/values").GenericId<"affiliateObligations">, "required">;
97
+ sourceEventId: import("convex/values").VString<string | undefined, "optional">;
98
+ kind: import("convex/values").VUnion<"recovery" | "restoration", [import("convex/values").VLiteral<"recovery", "required">, import("convex/values").VLiteral<"restoration", "required">], "required", never>;
99
+ amount: import("convex/values").VFloat64<number, "required">;
100
+ state: import("convex/values").VUnion<"canceled" | "failed" | "insufficient_balance" | "pending" | "succeeded" | "unknown" | "unsupported", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"unknown", "required">, import("convex/values").VLiteral<"insufficient_balance", "required">, import("convex/values").VLiteral<"unsupported", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"succeeded", "required">, import("convex/values").VLiteral<"canceled", "required">], "required", never>;
101
+ receiptId: import("convex/values").VString<string | undefined, "optional">;
102
+ error: import("convex/values").VString<string | undefined, "optional">;
103
+ attempted: import("convex/values").VBoolean<boolean, "required">;
104
+ providerBaseline: import("convex/values").VFloat64<number | undefined, "optional">;
105
+ createdAt: import("convex/values").VFloat64<number, "required">;
106
+ }, "required", "amount" | "attempted" | "createdAt" | "error" | "kind" | "obligationId" | "providerBaseline" | "receiptId" | "sourceEventId" | "state">, {
107
+ by_obligation: ["obligationId", "_creationTime"];
108
+ by_state: ["state", "_creationTime"];
109
+ }, {}, {}>;
110
+ affiliatePayoutReleases: import("convex/server").TableDefinition<import("convex/values").VObject<{
111
+ affiliateAccountId: string;
112
+ amount: number;
113
+ createdAt: number;
114
+ currency: string;
115
+ minimumAmount: number;
116
+ operationKey: string;
117
+ state: "failed" | "pending" | "submitted" | "unknown";
118
+ stripePayoutId?: string | undefined;
119
+ }, {
120
+ affiliateAccountId: import("convex/values").VString<string, "required">;
121
+ currency: import("convex/values").VString<string, "required">;
122
+ operationKey: import("convex/values").VString<string, "required">;
123
+ amount: import("convex/values").VFloat64<number, "required">;
124
+ minimumAmount: import("convex/values").VFloat64<number, "required">;
125
+ state: import("convex/values").VUnion<"failed" | "pending" | "submitted" | "unknown", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"unknown", "required">, import("convex/values").VLiteral<"submitted", "required">, import("convex/values").VLiteral<"failed", "required">], "required", never>;
126
+ stripePayoutId: import("convex/values").VString<string | undefined, "optional">;
127
+ createdAt: import("convex/values").VFloat64<number, "required">;
128
+ }, "required", "affiliateAccountId" | "amount" | "createdAt" | "currency" | "minimumAmount" | "operationKey" | "state" | "stripePayoutId">, {
129
+ by_key: ["operationKey", "_creationTime"];
130
+ by_state: ["state", "_creationTime"];
131
+ }, {}, {}>;
132
+ affiliateEarnings: import("convex/server").TableDefinition<import("convex/values").VObject<{
133
+ affiliateAccountId: string;
134
+ currency: string;
135
+ originalCommission: number;
136
+ paymentIntentId?: string | undefined;
137
+ releaseAmount: number;
138
+ sourceChargeId: string;
139
+ sourceInvoiceId?: string | undefined;
140
+ status: "paid" | "reserved";
141
+ stripeTransferId?: string | undefined;
142
+ withheldAmount: number;
143
+ }, {
144
+ sourceChargeId: import("convex/values").VString<string, "required">;
145
+ affiliateAccountId: import("convex/values").VString<string, "required">;
146
+ currency: import("convex/values").VString<string, "required">;
147
+ originalCommission: import("convex/values").VFloat64<number, "required">;
148
+ withheldAmount: import("convex/values").VFloat64<number, "required">;
149
+ releaseAmount: import("convex/values").VFloat64<number, "required">;
150
+ sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
151
+ paymentIntentId: import("convex/values").VString<string | undefined, "optional">;
152
+ stripeTransferId: import("convex/values").VString<string | undefined, "optional">;
153
+ status: import("convex/values").VUnion<"paid" | "reserved", [import("convex/values").VLiteral<"reserved", "required">, import("convex/values").VLiteral<"paid", "required">], "required", never>;
154
+ }, "required", "affiliateAccountId" | "currency" | "originalCommission" | "paymentIntentId" | "releaseAmount" | "sourceChargeId" | "sourceInvoiceId" | "status" | "stripeTransferId" | "withheldAmount">, {
155
+ by_affiliate_currency: ["affiliateAccountId", "currency", "_creationTime"];
156
+ by_charge_affiliate: ["sourceChargeId", "affiliateAccountId", "_creationTime"];
157
+ }, {}, {}>;
158
+ affiliateOffsets: import("convex/server").TableDefinition<import("convex/values").VObject<{
159
+ amount: number;
160
+ earningId: import("convex/values").GenericId<"affiliateEarnings">;
161
+ obligationId: import("convex/values").GenericId<"affiliateObligations">;
162
+ }, {
163
+ earningId: import("convex/values").VId<import("convex/values").GenericId<"affiliateEarnings">, "required">;
164
+ obligationId: import("convex/values").VId<import("convex/values").GenericId<"affiliateObligations">, "required">;
165
+ amount: import("convex/values").VFloat64<number, "required">;
166
+ }, "required", "amount" | "earningId" | "obligationId">, {
167
+ by_earning: ["earningId", "_creationTime"];
168
+ by_obligation: ["obligationId", "_creationTime"];
169
+ }, {}, {}>;
170
+ affiliateRecoveryBalances: import("convex/server").TableDefinition<import("convex/values").VObject<{
171
+ activePayoutKey?: string | undefined;
172
+ affiliateAccountId: string;
173
+ currency: string;
174
+ netPayable: number;
175
+ offsetAmount: number;
176
+ originalCommission: number;
177
+ outstandingDebt: number;
178
+ pendingPayoutAmount?: number | undefined;
179
+ recoveredAmount: number;
180
+ reservedRecovery: number;
181
+ reservedRestoration: number;
182
+ restorationDue: number;
183
+ restoredAmount: number;
184
+ withheldAmount: number;
185
+ }, {
186
+ activePayoutKey: import("convex/values").VString<string | undefined, "optional">;
187
+ pendingPayoutAmount: import("convex/values").VFloat64<number | undefined, "optional">;
188
+ affiliateAccountId: import("convex/values").VString<string, "required">;
189
+ currency: import("convex/values").VString<string, "required">;
190
+ originalCommission: import("convex/values").VFloat64<number, "required">;
191
+ recoveredAmount: import("convex/values").VFloat64<number, "required">;
192
+ offsetAmount: import("convex/values").VFloat64<number, "required">;
193
+ restoredAmount: import("convex/values").VFloat64<number, "required">;
194
+ outstandingDebt: import("convex/values").VFloat64<number, "required">;
195
+ reservedRecovery: import("convex/values").VFloat64<number, "required">;
196
+ reservedRestoration: import("convex/values").VFloat64<number, "required">;
197
+ restorationDue: import("convex/values").VFloat64<number, "required">;
198
+ withheldAmount: import("convex/values").VFloat64<number, "required">;
199
+ netPayable: import("convex/values").VFloat64<number, "required">;
200
+ }, "required", "activePayoutKey" | "affiliateAccountId" | "currency" | "netPayable" | "offsetAmount" | "originalCommission" | "outstandingDebt" | "pendingPayoutAmount" | "recoveredAmount" | "reservedRecovery" | "reservedRestoration" | "restorationDue" | "restoredAmount" | "withheldAmount">, {
201
+ by_affiliate_currency: ["affiliateAccountId", "currency", "_creationTime"];
202
+ }, {}, {}>;
203
+ affiliateReversalReceipts: import("convex/server").TableDefinition<import("convex/values").VObject<{
204
+ amount: number;
205
+ operationId: string;
206
+ stripeReversalId: string;
207
+ stripeTransferId: string;
208
+ }, {
209
+ stripeReversalId: import("convex/values").VString<string, "required">;
210
+ stripeTransferId: import("convex/values").VString<string, "required">;
211
+ operationId: import("convex/values").VString<string, "required">;
212
+ amount: import("convex/values").VFloat64<number, "required">;
213
+ }, "required", "amount" | "operationId" | "stripeReversalId" | "stripeTransferId">, {
214
+ by_receipt: ["stripeReversalId", "_creationTime"];
215
+ by_transfer: ["stripeTransferId", "_creationTime"];
216
+ by_transfer_operation: ["stripeTransferId", "operationId", "_creationTime"];
217
+ }, {}, {}>;
218
+ payoutSyncClaims: import("convex/server").TableDefinition<import("convex/values").VObject<{
219
+ acceptedAt?: number | undefined;
220
+ acceptedFingerprint?: string | undefined;
221
+ acceptedGeneration?: number | undefined;
222
+ accountId: string;
223
+ generation: number;
224
+ startedAt: number;
225
+ status: "accepted" | "pending" | "unknown";
226
+ stripePayoutId: string;
227
+ }, {
228
+ stripePayoutId: import("convex/values").VString<string, "required">;
229
+ accountId: import("convex/values").VString<string, "required">;
230
+ generation: import("convex/values").VFloat64<number, "required">;
231
+ status: import("convex/values").VUnion<"accepted" | "pending" | "unknown", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"accepted", "required">, import("convex/values").VLiteral<"unknown", "required">], "required", never>;
232
+ startedAt: import("convex/values").VFloat64<number, "required">;
233
+ acceptedGeneration: import("convex/values").VFloat64<number | undefined, "optional">;
234
+ acceptedAt: import("convex/values").VFloat64<number | undefined, "optional">;
235
+ acceptedFingerprint: import("convex/values").VString<string | undefined, "optional">;
236
+ }, "required", "acceptedAt" | "acceptedFingerprint" | "acceptedGeneration" | "accountId" | "generation" | "startedAt" | "status" | "stripePayoutId">, {
237
+ by_stripe_payout_id: ["stripePayoutId", "_creationTime"];
238
+ }, {}, {}>;
2
239
  payoutFeeBalances: import("convex/server").TableDefinition<import("convex/values").VObject<{
3
240
  accountId: string;
4
241
  amount: number;
@@ -1098,6 +1335,16 @@ declare const _default: import("convex/server").SchemaDefinition<{
1098
1335
  by_stripe_transfer_id: ["stripeTransferId", "_creationTime"];
1099
1336
  }, {}, {}>;
1100
1337
  transferReversalOps: import("convex/server").TableDefinition<import("convex/values").VObject<{
1338
+ commissionExposure?: {
1339
+ chargeAmount: number;
1340
+ disputeId?: string | undefined;
1341
+ disputeState?: "lost" | "open" | "won" | undefined;
1342
+ finalized: boolean;
1343
+ kind: "dispute" | "refund";
1344
+ principal: number;
1345
+ refundId?: string | undefined;
1346
+ refundedPrincipal?: number | undefined;
1347
+ } | undefined;
1101
1348
  operationId: string;
1102
1349
  slices: {
1103
1350
  from: number;
@@ -1121,8 +1368,28 @@ declare const _default: import("convex/server").SchemaDefinition<{
1121
1368
  from: import("convex/values").VFloat64<number, "required">;
1122
1369
  to: import("convex/values").VFloat64<number, "required">;
1123
1370
  }, "required", "from" | "stripeTransferId" | "to">, "required">;
1124
- }, "required", "operationId" | "slices" | "sourceChargeId">, {
1371
+ commissionExposure: import("convex/values").VObject<{
1372
+ chargeAmount: number;
1373
+ disputeId?: string | undefined;
1374
+ disputeState?: "lost" | "open" | "won" | undefined;
1375
+ finalized: boolean;
1376
+ kind: "dispute" | "refund";
1377
+ principal: number;
1378
+ refundId?: string | undefined;
1379
+ refundedPrincipal?: number | undefined;
1380
+ } | undefined, {
1381
+ kind: import("convex/values").VUnion<"dispute" | "refund", [import("convex/values").VLiteral<"refund", "required">, import("convex/values").VLiteral<"dispute", "required">], "required", never>;
1382
+ chargeAmount: import("convex/values").VFloat64<number, "required">;
1383
+ principal: import("convex/values").VFloat64<number, "required">;
1384
+ finalized: import("convex/values").VBoolean<boolean, "required">;
1385
+ disputeState: import("convex/values").VUnion<"lost" | "open" | "won" | undefined, [import("convex/values").VLiteral<"open", "required">, import("convex/values").VLiteral<"lost", "required">, import("convex/values").VLiteral<"won", "required">], "optional", never>;
1386
+ disputeId: import("convex/values").VString<string | undefined, "optional">;
1387
+ refundedPrincipal: import("convex/values").VFloat64<number | undefined, "optional">;
1388
+ refundId: import("convex/values").VString<string | undefined, "optional">;
1389
+ }, "optional", "chargeAmount" | "disputeId" | "disputeState" | "finalized" | "kind" | "principal" | "refundId" | "refundedPrincipal">;
1390
+ }, "required", "commissionExposure" | "commissionExposure.chargeAmount" | "commissionExposure.disputeId" | "commissionExposure.disputeState" | "commissionExposure.finalized" | "commissionExposure.kind" | "commissionExposure.principal" | "commissionExposure.refundId" | "commissionExposure.refundedPrincipal" | "operationId" | "slices" | "sourceChargeId">, {
1125
1391
  by_operation_id: ["operationId", "_creationTime"];
1392
+ by_source_charge: ["sourceChargeId", "_creationTime"];
1126
1393
  }, {}, {}>;
1127
1394
  webhookEvents: import("convex/server").TableDefinition<import("convex/values").VObject<{
1128
1395
  eventType: string;
@@ -1,3 +1,6 @@
1
+ import { claimsTable as payoutSyncClaimsTable } from "./payoutSync/schema.js";
2
+ import { payoutReleasesTable as affiliatePayoutReleases, operationsTable as affiliateOperations, earningsTable as affiliateEarnings, offsetsTable as affiliateOffsets, balancesTable as affiliateBalances, } from "./affiliateRecovery/schema.js";
3
+ import { affiliateObligationsTable, affiliateReversalReceiptsTable, } from "./settlement/clawbackSchema.js";
1
4
  import { feeBalancesTable as payoutFeeBalancesTable, claimsTable as payoutReleaseClaimsTable, sourcesTable as payoutSourceAllocationsTable, } from "./payoutRelease/schema.js";
2
5
  import { policiesTable, operationsTable } from "./payoutPolicy/schema.js";
3
6
  import { currencyTotalsTable } from "./earnings/schema.js";
@@ -10,6 +13,14 @@ import { accountsTable } from "./core/schema";
10
13
  import { pricesTable, productsTable } from "./products/schema";
11
14
  import { webhookEventsTable } from "./webhooks/schema";
12
15
  export default defineSchema({
16
+ affiliateObligations: affiliateObligationsTable,
17
+ affiliateRecoveryOperations: affiliateOperations,
18
+ affiliatePayoutReleases,
19
+ affiliateEarnings,
20
+ affiliateOffsets,
21
+ affiliateRecoveryBalances: affiliateBalances,
22
+ affiliateReversalReceipts: affiliateReversalReceiptsTable,
23
+ payoutSyncClaims: payoutSyncClaimsTable,
13
24
  payoutFeeBalances: payoutFeeBalancesTable,
14
25
  payoutReleaseClaims: payoutReleaseClaimsTable,
15
26
  payoutSourceAllocations: payoutSourceAllocationsTable,
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/component/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,IAAI,sBAAsB,EAC1C,WAAW,IAAI,wBAAwB,EACvC,YAAY,IAAI,4BAA4B,GAC7C,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EACL,WAAW,EACX,aAAa,EACb,WAAW,EACX,iBAAiB,GAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,EACL,qBAAqB,EACrB,aAAa,EACb,kBAAkB,GACnB,MAAM,kBAAkB,CA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AAE,iBAAiB;IAC5C,yBAAyB,EAAE,8BAA8B;IACzD,gBAAgB,EAAE,qBAAqB;IACvC,iBAAiB,EAAE,sBAAsB;IACzC,mBAAmB,EAAE,wBAAwB;IAC7C,uBAAuB,EAAE,4BAA4B;IACrD,cAAc,EAAE,aAAa;IAC7B,sBAAsB,EAAE,eAAe;IACvC,cAAc,EAAE,mBAAmB;IACnC,cAAc,EAAE,WAAW;IAC3B,gBAAgB,EAAE,aAAa;IAC/B,cAAc,EAAE,WAAW;IAC3B,oBAAoB,EAAE,iBAAiB;IACvC,qBAAqB,EAAE,gBAAgB;IACvC,eAAe,EAAE,oBAAoB;IACrC,mBAAmB,EAAE,wBAAwB;IAC7C,OAAO;IACP,QAAQ,EAAE,aAAa;IAEvB,WAAW;IACX,QAAQ,EAAE,aAAa;IACvB,MAAM,EAAE,WAAW;IAEnB,UAAU;IACV,aAAa,EAAE,kBAAkB;IACjC,gBAAgB,EAAE,qBAAqB;IACvC,QAAQ,EAAE,aAAa;IAEvB,UAAU;IACV,QAAQ,EAAE,aAAa;IACvB,OAAO,EAAE,YAAY;IACrB,iBAAiB,EAAE,sBAAsB;IACzC,OAAO,EAAE,YAAY;IACrB,QAAQ,EAAE,aAAa;IACvB,SAAS,EAAE,cAAc;IACzB,mBAAmB,EAAE,wBAAwB;IAE7C,WAAW;IACX,aAAa,EAAE,kBAAkB;CAClC,CAAC,CAAC"}
@@ -0,0 +1,161 @@
1
+ /** Principal snapshots on the original charge axis, never incremental debits. */
2
+ export declare const commissionExposureValidator: import("convex/values").VObject<{
3
+ chargeAmount: number;
4
+ disputeId?: string | undefined;
5
+ disputeState?: "lost" | "open" | "won" | undefined;
6
+ finalized: boolean;
7
+ kind: "dispute" | "refund";
8
+ principal: number;
9
+ refundId?: string | undefined;
10
+ refundedPrincipal?: number | undefined;
11
+ }, {
12
+ kind: import("convex/values").VUnion<"dispute" | "refund", [import("convex/values").VLiteral<"refund", "required">, import("convex/values").VLiteral<"dispute", "required">], "required", never>;
13
+ chargeAmount: import("convex/values").VFloat64<number, "required">;
14
+ principal: import("convex/values").VFloat64<number, "required">;
15
+ finalized: import("convex/values").VBoolean<boolean, "required">;
16
+ disputeState: import("convex/values").VUnion<"lost" | "open" | "won" | undefined, [import("convex/values").VLiteral<"open", "required">, import("convex/values").VLiteral<"lost", "required">, import("convex/values").VLiteral<"won", "required">], "optional", never>;
17
+ disputeId: import("convex/values").VString<string | undefined, "optional">;
18
+ refundedPrincipal: import("convex/values").VFloat64<number | undefined, "optional">;
19
+ refundId: import("convex/values").VString<string | undefined, "optional">;
20
+ }, "required", "chargeAmount" | "disputeId" | "disputeState" | "finalized" | "kind" | "principal" | "refundId" | "refundedPrincipal">;
21
+ export declare const obligationFields: {
22
+ stripeTransferId: import("convex/values").VString<string | undefined, "optional">;
23
+ sourceChargeId: import("convex/values").VString<string, "required">;
24
+ sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
25
+ paymentIntentId: import("convex/values").VString<string | undefined, "optional">;
26
+ paymentId: import("convex/values").VString<string | undefined, "optional">;
27
+ storeAccountId: import("convex/values").VString<string | undefined, "optional">;
28
+ lastRefundId: import("convex/values").VString<string | undefined, "optional">;
29
+ affiliateAccountId: import("convex/values").VString<string, "required">;
30
+ currency: import("convex/values").VString<string, "required">;
31
+ chargeAmount: import("convex/values").VFloat64<number, "required">;
32
+ originalCommission: import("convex/values").VFloat64<number, "required">;
33
+ refundedPrincipal: import("convex/values").VFloat64<number, "required">;
34
+ disputedPrincipal: import("convex/values").VFloat64<number, "required">;
35
+ lostPrincipal: import("convex/values").VFloat64<number, "required">;
36
+ finalizedAmount: import("convex/values").VFloat64<number, "required">;
37
+ provisionalAmount: import("convex/values").VFloat64<number, "required">;
38
+ /** Confirmed transfer reversal total; reservations are not receipts. */
39
+ recoveredAmount: import("convex/values").VFloat64<number, "required">;
40
+ /** Existing reversals may have no attributable refund/dispute receipt. */
41
+ needsReconciliation: import("convex/values").VBoolean<boolean, "required">;
42
+ accounted: import("convex/values").VBoolean<boolean | undefined, "optional">;
43
+ legacyReceiptIds: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
44
+ legacyRestorationIds: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
45
+ operatorNote: import("convex/values").VString<string | undefined, "optional">;
46
+ earningId: import("convex/values").VId<import("convex/values").GenericId<"affiliateEarnings"> | undefined, "optional">;
47
+ releasedCommission: import("convex/values").VFloat64<number | undefined, "optional">;
48
+ offsetAmount: import("convex/values").VFloat64<number | undefined, "optional">;
49
+ restoredAmount: import("convex/values").VFloat64<number | undefined, "optional">;
50
+ reservedRecovery: import("convex/values").VFloat64<number | undefined, "optional">;
51
+ reservedRestoration: import("convex/values").VFloat64<number | undefined, "optional">;
52
+ debtAmount: import("convex/values").VFloat64<number | undefined, "optional">;
53
+ creditAmount: import("convex/values").VFloat64<number | undefined, "optional">;
54
+ debtStatus: import("convex/values").VUnion<"open" | "settled" | undefined, [import("convex/values").VLiteral<"open", "required">, import("convex/values").VLiteral<"settled", "required">], "optional", never>;
55
+ disputeState: import("convex/values").VUnion<"lost" | "open" | "won" | undefined, [import("convex/values").VLiteral<"open", "required">, import("convex/values").VLiteral<"lost", "required">, import("convex/values").VLiteral<"won", "required">], "optional", never>;
56
+ disputeId: import("convex/values").VString<string | undefined, "optional">;
57
+ activeOperationId: import("convex/values").VId<import("convex/values").GenericId<"affiliateRecoveryOperations"> | undefined, "optional">;
58
+ lastState: import("convex/values").VString<string | undefined, "optional">;
59
+ lastError: import("convex/values").VString<string | undefined, "optional">;
60
+ operationSequence: import("convex/values").VFloat64<number | undefined, "optional">;
61
+ };
62
+ export declare const affiliateObligationsTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
63
+ accounted?: boolean | undefined;
64
+ activeOperationId?: import("convex/values").GenericId<"affiliateRecoveryOperations"> | undefined;
65
+ affiliateAccountId: string;
66
+ chargeAmount: number;
67
+ creditAmount?: number | undefined;
68
+ currency: string;
69
+ debtAmount?: number | undefined;
70
+ debtStatus?: "open" | "settled" | undefined;
71
+ disputeId?: string | undefined;
72
+ disputeState?: "lost" | "open" | "won" | undefined;
73
+ disputedPrincipal: number;
74
+ earningId?: import("convex/values").GenericId<"affiliateEarnings"> | undefined;
75
+ finalizedAmount: number;
76
+ lastError?: string | undefined;
77
+ lastRefundId?: string | undefined;
78
+ lastState?: string | undefined;
79
+ legacyReceiptIds?: string[] | undefined;
80
+ legacyRestorationIds?: string[] | undefined;
81
+ lostPrincipal: number;
82
+ needsReconciliation: boolean;
83
+ offsetAmount?: number | undefined;
84
+ operationSequence?: number | undefined;
85
+ operatorNote?: string | undefined;
86
+ originalCommission: number;
87
+ paymentId?: string | undefined;
88
+ paymentIntentId?: string | undefined;
89
+ provisionalAmount: number;
90
+ recoveredAmount: number;
91
+ refundedPrincipal: number;
92
+ releasedCommission?: number | undefined;
93
+ reservedRecovery?: number | undefined;
94
+ reservedRestoration?: number | undefined;
95
+ restoredAmount?: number | undefined;
96
+ sourceChargeId: string;
97
+ sourceInvoiceId?: string | undefined;
98
+ storeAccountId?: string | undefined;
99
+ stripeTransferId?: string | undefined;
100
+ }, {
101
+ stripeTransferId: import("convex/values").VString<string | undefined, "optional">;
102
+ sourceChargeId: import("convex/values").VString<string, "required">;
103
+ sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
104
+ paymentIntentId: import("convex/values").VString<string | undefined, "optional">;
105
+ paymentId: import("convex/values").VString<string | undefined, "optional">;
106
+ storeAccountId: import("convex/values").VString<string | undefined, "optional">;
107
+ lastRefundId: import("convex/values").VString<string | undefined, "optional">;
108
+ affiliateAccountId: import("convex/values").VString<string, "required">;
109
+ currency: import("convex/values").VString<string, "required">;
110
+ chargeAmount: import("convex/values").VFloat64<number, "required">;
111
+ originalCommission: import("convex/values").VFloat64<number, "required">;
112
+ refundedPrincipal: import("convex/values").VFloat64<number, "required">;
113
+ disputedPrincipal: import("convex/values").VFloat64<number, "required">;
114
+ lostPrincipal: import("convex/values").VFloat64<number, "required">;
115
+ finalizedAmount: import("convex/values").VFloat64<number, "required">;
116
+ provisionalAmount: import("convex/values").VFloat64<number, "required">;
117
+ /** Confirmed transfer reversal total; reservations are not receipts. */
118
+ recoveredAmount: import("convex/values").VFloat64<number, "required">;
119
+ /** Existing reversals may have no attributable refund/dispute receipt. */
120
+ needsReconciliation: import("convex/values").VBoolean<boolean, "required">;
121
+ accounted: import("convex/values").VBoolean<boolean | undefined, "optional">;
122
+ legacyReceiptIds: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
123
+ legacyRestorationIds: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
124
+ operatorNote: import("convex/values").VString<string | undefined, "optional">;
125
+ earningId: import("convex/values").VId<import("convex/values").GenericId<"affiliateEarnings"> | undefined, "optional">;
126
+ releasedCommission: import("convex/values").VFloat64<number | undefined, "optional">;
127
+ offsetAmount: import("convex/values").VFloat64<number | undefined, "optional">;
128
+ restoredAmount: import("convex/values").VFloat64<number | undefined, "optional">;
129
+ reservedRecovery: import("convex/values").VFloat64<number | undefined, "optional">;
130
+ reservedRestoration: import("convex/values").VFloat64<number | undefined, "optional">;
131
+ debtAmount: import("convex/values").VFloat64<number | undefined, "optional">;
132
+ creditAmount: import("convex/values").VFloat64<number | undefined, "optional">;
133
+ debtStatus: import("convex/values").VUnion<"open" | "settled" | undefined, [import("convex/values").VLiteral<"open", "required">, import("convex/values").VLiteral<"settled", "required">], "optional", never>;
134
+ disputeState: import("convex/values").VUnion<"lost" | "open" | "won" | undefined, [import("convex/values").VLiteral<"open", "required">, import("convex/values").VLiteral<"lost", "required">, import("convex/values").VLiteral<"won", "required">], "optional", never>;
135
+ disputeId: import("convex/values").VString<string | undefined, "optional">;
136
+ activeOperationId: import("convex/values").VId<import("convex/values").GenericId<"affiliateRecoveryOperations"> | undefined, "optional">;
137
+ lastState: import("convex/values").VString<string | undefined, "optional">;
138
+ lastError: import("convex/values").VString<string | undefined, "optional">;
139
+ operationSequence: import("convex/values").VFloat64<number | undefined, "optional">;
140
+ }, "required", "accounted" | "activeOperationId" | "affiliateAccountId" | "chargeAmount" | "creditAmount" | "currency" | "debtAmount" | "debtStatus" | "disputeId" | "disputeState" | "disputedPrincipal" | "earningId" | "finalizedAmount" | "lastError" | "lastRefundId" | "lastState" | "legacyReceiptIds" | "legacyRestorationIds" | "lostPrincipal" | "needsReconciliation" | "offsetAmount" | "operationSequence" | "operatorNote" | "originalCommission" | "paymentId" | "paymentIntentId" | "provisionalAmount" | "recoveredAmount" | "refundedPrincipal" | "releasedCommission" | "reservedRecovery" | "reservedRestoration" | "restoredAmount" | "sourceChargeId" | "sourceInvoiceId" | "storeAccountId" | "stripeTransferId">, {
141
+ by_affiliate_currency: ["affiliateAccountId", "currency", "_creationTime"];
142
+ by_affiliate_currency_debt: ["affiliateAccountId", "currency", "debtStatus", "_creationTime"];
143
+ by_charge: ["sourceChargeId", "_creationTime"];
144
+ by_transfer: ["stripeTransferId", "_creationTime"];
145
+ }, {}, {}>;
146
+ export declare const affiliateReversalReceiptsTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
147
+ amount: number;
148
+ operationId: string;
149
+ stripeReversalId: string;
150
+ stripeTransferId: string;
151
+ }, {
152
+ stripeReversalId: import("convex/values").VString<string, "required">;
153
+ stripeTransferId: import("convex/values").VString<string, "required">;
154
+ operationId: import("convex/values").VString<string, "required">;
155
+ amount: import("convex/values").VFloat64<number, "required">;
156
+ }, "required", "amount" | "operationId" | "stripeReversalId" | "stripeTransferId">, {
157
+ by_receipt: ["stripeReversalId", "_creationTime"];
158
+ by_transfer: ["stripeTransferId", "_creationTime"];
159
+ by_transfer_operation: ["stripeTransferId", "operationId", "_creationTime"];
160
+ }, {}, {}>;
161
+ //# sourceMappingURL=clawbackSchema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clawbackSchema.d.ts","sourceRoot":"","sources":["../../../src/component/settlement/clawbackSchema.ts"],"names":[],"mappings":"AAGA,iFAAiF;AACjF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;qIAWtC,CAAC;AAEH,eAAO,MAAM,gBAAgB;IAC3B,gBAAgB;IAChB,cAAc;IACd,eAAe;IACf,eAAe;IACf,SAAS;IACT,cAAc;IACd,YAAY;IACZ,kBAAkB;IAClB,QAAQ;IACR,YAAY;IACZ,kBAAkB;IAClB,iBAAiB;IACjB,iBAAiB;IACjB,aAAa;IACb,eAAe;IACf,iBAAiB;IACjB,wEAAwE;IACxE,eAAe;IACf,0EAA0E;IAC1E,mBAAmB;IACnB,SAAS;IACT,gBAAgB;IAChB,oBAAoB;IACpB,YAAY;IACZ,SAAS;IACT,kBAAkB;IAClB,YAAY;IACZ,cAAc;IACd,gBAAgB;IAChB,mBAAmB;IACnB,UAAU;IACV,YAAY;IACZ,UAAU;IACV,YAAY;IAGZ,SAAS;IACT,iBAAiB;IACjB,SAAS;IACT,SAAS;IACT,iBAAiB;CAClB,CAAC;AACF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA1BpC,wEAAwE;;IAExE,0EAA0E;;;;;;;;;;;;;;;;;;;;;;;;;;UAgCP,CAAC;AACtE,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;UAQE,CAAC"}
@@ -0,0 +1,73 @@
1
+ import { defineTable } from "convex/server";
2
+ import { v } from "convex/values";
3
+ /** Principal snapshots on the original charge axis, never incremental debits. */
4
+ export const commissionExposureValidator = v.object({
5
+ kind: v.union(v.literal("refund"), v.literal("dispute")),
6
+ chargeAmount: v.number(),
7
+ principal: v.number(),
8
+ finalized: v.boolean(),
9
+ disputeState: v.optional(v.union(v.literal("open"), v.literal("lost"), v.literal("won"))),
10
+ disputeId: v.optional(v.string()),
11
+ refundedPrincipal: v.optional(v.number()),
12
+ refundId: v.optional(v.string()),
13
+ });
14
+ export const obligationFields = {
15
+ stripeTransferId: v.optional(v.string()),
16
+ sourceChargeId: v.string(),
17
+ sourceInvoiceId: v.optional(v.string()),
18
+ paymentIntentId: v.optional(v.string()),
19
+ paymentId: v.optional(v.string()),
20
+ storeAccountId: v.optional(v.string()),
21
+ lastRefundId: v.optional(v.string()),
22
+ affiliateAccountId: v.string(),
23
+ currency: v.string(),
24
+ chargeAmount: v.number(),
25
+ originalCommission: v.number(),
26
+ refundedPrincipal: v.number(),
27
+ disputedPrincipal: v.number(),
28
+ lostPrincipal: v.number(),
29
+ finalizedAmount: v.number(),
30
+ provisionalAmount: v.number(),
31
+ /** Confirmed transfer reversal total; reservations are not receipts. */
32
+ recoveredAmount: v.number(),
33
+ /** Existing reversals may have no attributable refund/dispute receipt. */
34
+ needsReconciliation: v.boolean(),
35
+ accounted: v.optional(v.boolean()),
36
+ legacyReceiptIds: v.optional(v.array(v.string())),
37
+ legacyRestorationIds: v.optional(v.array(v.string())),
38
+ operatorNote: v.optional(v.string()),
39
+ earningId: v.optional(v.id("affiliateEarnings")),
40
+ releasedCommission: v.optional(v.number()),
41
+ offsetAmount: v.optional(v.number()),
42
+ restoredAmount: v.optional(v.number()),
43
+ reservedRecovery: v.optional(v.number()),
44
+ reservedRestoration: v.optional(v.number()),
45
+ debtAmount: v.optional(v.number()),
46
+ creditAmount: v.optional(v.number()),
47
+ debtStatus: v.optional(v.union(v.literal("open"), v.literal("settled"))),
48
+ disputeState: v.optional(v.union(v.literal("open"), v.literal("lost"), v.literal("won"))),
49
+ disputeId: v.optional(v.string()),
50
+ activeOperationId: v.optional(v.id("affiliateRecoveryOperations")),
51
+ lastState: v.optional(v.string()),
52
+ lastError: v.optional(v.string()),
53
+ operationSequence: v.optional(v.number()),
54
+ };
55
+ export const affiliateObligationsTable = defineTable(obligationFields)
56
+ .index("by_transfer", ["stripeTransferId"])
57
+ .index("by_charge", ["sourceChargeId"])
58
+ .index("by_affiliate_currency_debt", [
59
+ "affiliateAccountId",
60
+ "currency",
61
+ "debtStatus",
62
+ ])
63
+ .index("by_affiliate_currency", ["affiliateAccountId", "currency"]);
64
+ export const affiliateReversalReceiptsTable = defineTable({
65
+ stripeReversalId: v.string(),
66
+ stripeTransferId: v.string(),
67
+ operationId: v.string(),
68
+ amount: v.number(),
69
+ })
70
+ .index("by_receipt", ["stripeReversalId"])
71
+ .index("by_transfer_operation", ["stripeTransferId", "operationId"])
72
+ .index("by_transfer", ["stripeTransferId"]);
73
+ //# sourceMappingURL=clawbackSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clawbackSchema.js","sourceRoot":"","sources":["../../../src/component/settlement/clawbackSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAElC,iFAAiF;AACjF,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAClD,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACxD,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE;IACtB,YAAY,EAAE,CAAC,CAAC,QAAQ,CACtB,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAChE;IACD,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACjC,iBAAiB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACzC,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CAC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