@fantastic.dev/better-stripe 0.42.0 → 0.43.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 (126) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +1 -1
  3. package/dist/client/connect/payoutAdoptionTestHelpers.d.ts +1022 -0
  4. package/dist/client/connect/payoutAdoptionTestHelpers.d.ts.map +1 -1
  5. package/dist/client/connect/payoutExecutionTestHelpers.d.ts +511 -0
  6. package/dist/client/connect/payoutExecutionTestHelpers.d.ts.map +1 -1
  7. package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts +1054 -32
  8. package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts.map +1 -1
  9. package/dist/client/connect/payoutSyncTestHelpers.d.ts +527 -16
  10. package/dist/client/connect/payoutSyncTestHelpers.d.ts.map +1 -1
  11. package/dist/client/costRecovery-invoices.d.ts +3 -2
  12. package/dist/client/costRecovery-invoices.d.ts.map +1 -1
  13. package/dist/client/costRecovery-invoices.js +10 -5
  14. package/dist/client/costRecovery-invoices.js.map +1 -1
  15. package/dist/client/costRecovery.d.ts +4 -2
  16. package/dist/client/costRecovery.d.ts.map +1 -1
  17. package/dist/client/costRecovery.js +2 -2
  18. package/dist/client/costRecovery.js.map +1 -1
  19. package/dist/client/processingCostReconciliation/client.d.ts +14 -0
  20. package/dist/client/processingCostReconciliation/client.d.ts.map +1 -0
  21. package/dist/client/processingCostReconciliation/client.js +35 -0
  22. package/dist/client/processingCostReconciliation/client.js.map +1 -0
  23. package/dist/client/processingCostReconciliation/contracts.d.ts +172 -0
  24. package/dist/client/processingCostReconciliation/contracts.d.ts.map +1 -0
  25. package/dist/client/processingCostReconciliation/contracts.js +55 -0
  26. package/dist/client/processingCostReconciliation/contracts.js.map +1 -0
  27. package/dist/client/processingCostReconciliation/invoiceFunding.d.ts +15 -0
  28. package/dist/client/processingCostReconciliation/invoiceFunding.d.ts.map +1 -0
  29. package/dist/client/processingCostReconciliation/invoiceFunding.js +195 -0
  30. package/dist/client/processingCostReconciliation/invoiceFunding.js.map +1 -0
  31. package/dist/client/processingCostReconciliation/provider.d.ts +9 -0
  32. package/dist/client/processingCostReconciliation/provider.d.ts.map +1 -0
  33. package/dist/client/processingCostReconciliation/provider.js +148 -0
  34. package/dist/client/processingCostReconciliation/provider.js.map +1 -0
  35. package/dist/client/settlement/processingCostHistory.d.ts +12 -0
  36. package/dist/client/settlement/processingCostHistory.d.ts.map +1 -0
  37. package/dist/client/settlement/processingCostHistory.js +20 -0
  38. package/dist/client/settlement/processingCostHistory.js.map +1 -0
  39. package/dist/client/settlement/processingCosts.d.ts +3 -0
  40. package/dist/client/settlement/processingCosts.d.ts.map +1 -1
  41. package/dist/client/settlement/processingCosts.js +27 -7
  42. package/dist/client/settlement/processingCosts.js.map +1 -1
  43. package/dist/component/_generated/api.d.ts +18 -0
  44. package/dist/component/_generated/api.d.ts.map +1 -1
  45. package/dist/component/_generated/api.js.map +1 -1
  46. package/dist/component/_generated/component.d.ts +515 -0
  47. package/dist/component/_generated/component.d.ts.map +1 -1
  48. package/dist/component/balanceFunding/internal/actions.d.ts +11 -11
  49. package/dist/component/balanceFunding/mutations.d.ts +16 -16
  50. package/dist/component/balanceFunding/stateHandlers.d.ts +8 -8
  51. package/dist/component/balanceFunding/workflowValidators.d.ts +16 -16
  52. package/dist/component/earnings/triggers.d.ts +318 -16
  53. package/dist/component/earnings/triggers.d.ts.map +1 -1
  54. package/dist/component/payoutRelease/queries.d.ts +2 -2
  55. package/dist/component/payoutRelease/queries.d.ts.map +1 -1
  56. package/dist/component/processingCostReconciliation/adoption.d.ts +29 -0
  57. package/dist/component/processingCostReconciliation/adoption.d.ts.map +1 -0
  58. package/dist/component/processingCostReconciliation/adoption.js +58 -0
  59. package/dist/component/processingCostReconciliation/adoption.js.map +1 -0
  60. package/dist/component/processingCostReconciliation/bridge.d.ts +45 -0
  61. package/dist/component/processingCostReconciliation/bridge.d.ts.map +1 -0
  62. package/dist/component/processingCostReconciliation/bridge.js +41 -0
  63. package/dist/component/processingCostReconciliation/bridge.js.map +1 -0
  64. package/dist/component/processingCostReconciliation/helpers.d.ts +327 -0
  65. package/dist/component/processingCostReconciliation/helpers.d.ts.map +1 -0
  66. package/dist/component/processingCostReconciliation/helpers.js +39 -0
  67. package/dist/component/processingCostReconciliation/helpers.js.map +1 -0
  68. package/dist/component/processingCostReconciliation/mutations.d.ts +303 -0
  69. package/dist/component/processingCostReconciliation/mutations.d.ts.map +1 -0
  70. package/dist/component/processingCostReconciliation/mutations.js +121 -0
  71. package/dist/component/processingCostReconciliation/mutations.js.map +1 -0
  72. package/dist/component/processingCostReconciliation/queries.d.ts +422 -0
  73. package/dist/component/processingCostReconciliation/queries.d.ts.map +1 -0
  74. package/dist/component/processingCostReconciliation/queries.js +19 -0
  75. package/dist/component/processingCostReconciliation/queries.js.map +1 -0
  76. package/dist/component/processingCostReconciliation/rollback.d.ts +21 -0
  77. package/dist/component/processingCostReconciliation/rollback.d.ts.map +1 -0
  78. package/dist/component/processingCostReconciliation/rollback.js +54 -0
  79. package/dist/component/processingCostReconciliation/rollback.js.map +1 -0
  80. package/dist/component/processingCostReconciliation/schema.d.ts +2460 -0
  81. package/dist/component/processingCostReconciliation/schema.d.ts.map +1 -0
  82. package/dist/component/processingCostReconciliation/schema.js +137 -0
  83. package/dist/component/processingCostReconciliation/schema.js.map +1 -0
  84. package/dist/component/processingCostReconciliation/steps.d.ts +306 -0
  85. package/dist/component/processingCostReconciliation/steps.d.ts.map +1 -0
  86. package/dist/component/processingCostReconciliation/steps.js +149 -0
  87. package/dist/component/processingCostReconciliation/steps.js.map +1 -0
  88. package/dist/component/processingCostReconciliation/validation.d.ts +13 -0
  89. package/dist/component/processingCostReconciliation/validation.d.ts.map +1 -0
  90. package/dist/component/processingCostReconciliation/validation.js +61 -0
  91. package/dist/component/processingCostReconciliation/validation.js.map +1 -0
  92. package/dist/component/processingCostReconciliation/workflow.d.ts +105 -0
  93. package/dist/component/processingCostReconciliation/workflow.d.ts.map +1 -0
  94. package/dist/component/processingCostReconciliation/workflow.js +33 -0
  95. package/dist/component/processingCostReconciliation/workflow.js.map +1 -0
  96. package/dist/component/schema.d.ts +511 -0
  97. package/dist/component/schema.js +2 -0
  98. package/dist/component/schema.js.map +1 -1
  99. package/package.json +1 -1
  100. package/src/client/costRecovery-invoices.ts +19 -4
  101. package/src/client/costRecovery.ts +4 -2
  102. package/src/client/processingCostReconciliation/client.ts +75 -0
  103. package/src/client/processingCostReconciliation/contracts.ts +176 -0
  104. package/src/client/processingCostReconciliation/invoiceFunding.ts +270 -0
  105. package/src/client/processingCostReconciliation/invoiceProvider.test.ts +353 -0
  106. package/src/client/processingCostReconciliation/provider.test.ts +324 -0
  107. package/src/client/processingCostReconciliation/provider.ts +178 -0
  108. package/src/client/settlement/processingCostHistory.ts +31 -0
  109. package/src/client/settlement/processingCosts.ts +50 -15
  110. package/src/component/_generated/api.ts +18 -0
  111. package/src/component/_generated/component.ts +570 -0
  112. package/src/component/processingCostReconciliation/adoption.test.ts +206 -0
  113. package/src/component/processingCostReconciliation/adoption.ts +77 -0
  114. package/src/component/processingCostReconciliation/bridge.ts +50 -0
  115. package/src/component/processingCostReconciliation/helpers.ts +55 -0
  116. package/src/component/processingCostReconciliation/invoice.test.ts +152 -0
  117. package/src/component/processingCostReconciliation/mutations.ts +148 -0
  118. package/src/component/processingCostReconciliation/queries.ts +18 -0
  119. package/src/component/processingCostReconciliation/rollback.ts +72 -0
  120. package/src/component/processingCostReconciliation/schema.ts +191 -0
  121. package/src/component/processingCostReconciliation/state.test.ts +407 -0
  122. package/src/component/processingCostReconciliation/steps.ts +168 -0
  123. package/src/component/processingCostReconciliation/validation.ts +79 -0
  124. package/src/component/processingCostReconciliation/workflow.test.ts +329 -0
  125. package/src/component/processingCostReconciliation/workflow.ts +50 -0
  126. package/src/component/schema.ts +2 -0
@@ -0,0 +1,2460 @@
1
+ export declare const source: import("convex/values").VUnion<{
2
+ customerAccountId: string;
3
+ gross: number;
4
+ invoiceId?: string | undefined;
5
+ kind: "sale";
6
+ paymentIntentId: string;
7
+ stripeAccountId?: string | undefined;
8
+ stripePriceId?: string | undefined;
9
+ stripeProductId?: string | undefined;
10
+ subscriptionId?: string | undefined;
11
+ } | {
12
+ gross: number;
13
+ groupKey: string;
14
+ kind: "invoice_recovery";
15
+ paymentIntentId: string;
16
+ }, [import("convex/values").VObject<{
17
+ customerAccountId: string;
18
+ gross: number;
19
+ invoiceId?: string | undefined;
20
+ kind: "sale";
21
+ paymentIntentId: string;
22
+ stripeAccountId?: string | undefined;
23
+ stripePriceId?: string | undefined;
24
+ stripeProductId?: string | undefined;
25
+ subscriptionId?: string | undefined;
26
+ }, {
27
+ kind: import("convex/values").VLiteral<"sale", "required">;
28
+ paymentIntentId: import("convex/values").VString<string, "required">;
29
+ gross: import("convex/values").VFloat64<number, "required">;
30
+ customerAccountId: import("convex/values").VString<string, "required">;
31
+ invoiceId: import("convex/values").VString<string | undefined, "optional">;
32
+ subscriptionId: import("convex/values").VString<string | undefined, "optional">;
33
+ stripeAccountId: import("convex/values").VString<string | undefined, "optional">;
34
+ stripePriceId: import("convex/values").VString<string | undefined, "optional">;
35
+ stripeProductId: import("convex/values").VString<string | undefined, "optional">;
36
+ }, "required", "customerAccountId" | "gross" | "invoiceId" | "kind" | "paymentIntentId" | "stripeAccountId" | "stripePriceId" | "stripeProductId" | "subscriptionId">, import("convex/values").VObject<{
37
+ gross: number;
38
+ groupKey: string;
39
+ kind: "invoice_recovery";
40
+ paymentIntentId: string;
41
+ }, {
42
+ kind: import("convex/values").VLiteral<"invoice_recovery", "required">;
43
+ paymentIntentId: import("convex/values").VString<string, "required">;
44
+ gross: import("convex/values").VFloat64<number, "required">;
45
+ groupKey: import("convex/values").VString<string, "required">;
46
+ }, "required", "gross" | "groupKey" | "kind" | "paymentIntentId">], "required", "customerAccountId" | "gross" | "groupKey" | "invoiceId" | "kind" | "paymentIntentId" | "stripeAccountId" | "stripePriceId" | "stripeProductId" | "subscriptionId">;
47
+ export declare const policy: import("convex/values").VObject<{
48
+ liability: {
49
+ disputeCosts: "all" | "none";
50
+ processingCosts: "all" | "none" | "uncovered";
51
+ };
52
+ rounding: "ceil" | "floor" | "nearest";
53
+ sellingFee: number;
54
+ }, {
55
+ sellingFee: import("convex/values").VFloat64<number, "required">;
56
+ liability: import("convex/values").VObject<{
57
+ disputeCosts: "all" | "none";
58
+ processingCosts: "all" | "none" | "uncovered";
59
+ }, {
60
+ processingCosts: import("convex/values").VUnion<"all" | "none" | "uncovered", [import("convex/values").VLiteral<"uncovered", "required">, import("convex/values").VLiteral<"all", "required">, import("convex/values").VLiteral<"none", "required">], "required", never>;
61
+ disputeCosts: import("convex/values").VUnion<"all" | "none", [import("convex/values").VLiteral<"all", "required">, import("convex/values").VLiteral<"none", "required">], "required", never>;
62
+ }, "required", "disputeCosts" | "processingCosts">;
63
+ rounding: import("convex/values").VUnion<"ceil" | "floor" | "nearest", [import("convex/values").VLiteral<"nearest", "required">, import("convex/values").VLiteral<"floor", "required">, import("convex/values").VLiteral<"ceil", "required">], "required", never>;
64
+ }, "required", "liability" | "liability.disputeCosts" | "liability.processingCosts" | "rounding" | "sellingFee">;
65
+ export declare const provenance: import("convex/values").VObject<{
66
+ customerAccountId: string;
67
+ invoiceId: string;
68
+ invoicePaymentId: string;
69
+ recoveryInvoiceItemId?: string | undefined;
70
+ stripePriceId?: string | undefined;
71
+ stripeProductId?: string | undefined;
72
+ subscriptionId?: string | undefined;
73
+ }, {
74
+ invoiceId: import("convex/values").VString<string, "required">;
75
+ invoicePaymentId: import("convex/values").VString<string, "required">;
76
+ recoveryInvoiceItemId: import("convex/values").VString<string | undefined, "optional">;
77
+ customerAccountId: import("convex/values").VString<string, "required">;
78
+ subscriptionId: import("convex/values").VString<string | undefined, "optional">;
79
+ stripePriceId: import("convex/values").VString<string | undefined, "optional">;
80
+ stripeProductId: import("convex/values").VString<string | undefined, "optional">;
81
+ }, "required", "customerAccountId" | "invoiceId" | "invoicePaymentId" | "recoveryInvoiceItemId" | "stripePriceId" | "stripeProductId" | "subscriptionId">;
82
+ export declare const observation: import("convex/values").VObject<{
83
+ currency: string;
84
+ disputeFees: number;
85
+ gross: number;
86
+ originalProcessingFee: number;
87
+ paymentIntentId: string;
88
+ principalReturned: number;
89
+ processingFee: number;
90
+ provenance: {
91
+ customerAccountId: string;
92
+ invoiceId: string;
93
+ invoicePaymentId: string;
94
+ recoveryInvoiceItemId?: string | undefined;
95
+ stripePriceId?: string | undefined;
96
+ stripeProductId?: string | undefined;
97
+ subscriptionId?: string | undefined;
98
+ };
99
+ sourceChargeId: string;
100
+ }, {
101
+ paymentIntentId: import("convex/values").VString<string, "required">;
102
+ sourceChargeId: import("convex/values").VString<string, "required">;
103
+ currency: import("convex/values").VString<string, "required">;
104
+ gross: import("convex/values").VFloat64<number, "required">;
105
+ originalProcessingFee: import("convex/values").VFloat64<number, "required">;
106
+ processingFee: import("convex/values").VFloat64<number, "required">;
107
+ disputeFees: import("convex/values").VFloat64<number, "required">;
108
+ principalReturned: import("convex/values").VFloat64<number, "required">;
109
+ provenance: import("convex/values").VObject<{
110
+ customerAccountId: string;
111
+ invoiceId: string;
112
+ invoicePaymentId: string;
113
+ recoveryInvoiceItemId?: string | undefined;
114
+ stripePriceId?: string | undefined;
115
+ stripeProductId?: string | undefined;
116
+ subscriptionId?: string | undefined;
117
+ }, {
118
+ invoiceId: import("convex/values").VString<string, "required">;
119
+ invoicePaymentId: import("convex/values").VString<string, "required">;
120
+ recoveryInvoiceItemId: import("convex/values").VString<string | undefined, "optional">;
121
+ customerAccountId: import("convex/values").VString<string, "required">;
122
+ subscriptionId: import("convex/values").VString<string | undefined, "optional">;
123
+ stripePriceId: import("convex/values").VString<string | undefined, "optional">;
124
+ stripeProductId: import("convex/values").VString<string | undefined, "optional">;
125
+ }, "required", "customerAccountId" | "invoiceId" | "invoicePaymentId" | "recoveryInvoiceItemId" | "stripePriceId" | "stripeProductId" | "subscriptionId">;
126
+ }, "required", "currency" | "disputeFees" | "gross" | "originalProcessingFee" | "paymentIntentId" | "principalReturned" | "processingFee" | "provenance" | "provenance.customerAccountId" | "provenance.invoiceId" | "provenance.invoicePaymentId" | "provenance.recoveryInvoiceItemId" | "provenance.stripePriceId" | "provenance.stripeProductId" | "provenance.subscriptionId" | "sourceChargeId">;
127
+ export declare const deficit: import("convex/values").VObject<{
128
+ amountDue: number;
129
+ currency: string;
130
+ disputeLiability: number;
131
+ processingLiability: number;
132
+ retainedFee: number;
133
+ }, {
134
+ currency: import("convex/values").VString<string, "required">;
135
+ retainedFee: import("convex/values").VFloat64<number, "required">;
136
+ processingLiability: import("convex/values").VFloat64<number, "required">;
137
+ disputeLiability: import("convex/values").VFloat64<number, "required">;
138
+ amountDue: import("convex/values").VFloat64<number, "required">;
139
+ }, "required", "amountDue" | "currency" | "disputeLiability" | "processingLiability" | "retainedFee">;
140
+ export declare const result: import("convex/values").VObject<{
141
+ claim: {
142
+ _creationTime: number;
143
+ _id: import("convex/values").GenericId<"recoveryClaims">;
144
+ accountId: string;
145
+ amountDue: number;
146
+ claimKey: string;
147
+ collectedAmount: number;
148
+ currency: string;
149
+ openingCollection?: {
150
+ amountDue: number;
151
+ collectedAmount: number;
152
+ operationKey: string;
153
+ revision: number;
154
+ } | undefined;
155
+ outstanding: number;
156
+ reservedAmount: number;
157
+ revision: number;
158
+ scopeKey: string;
159
+ sign: "negative" | "positive" | "zero";
160
+ sourceChargeId: string;
161
+ sourceGross: number;
162
+ sourceProcessingFee: number;
163
+ };
164
+ deficit: {
165
+ amountDue: number;
166
+ currency: string;
167
+ disputeLiability: number;
168
+ processingLiability: number;
169
+ retainedFee: number;
170
+ };
171
+ observation: {
172
+ currency: string;
173
+ disputeFees: number;
174
+ gross: number;
175
+ originalProcessingFee: number;
176
+ paymentIntentId: string;
177
+ principalReturned: number;
178
+ processingFee: number;
179
+ provenance: {
180
+ customerAccountId: string;
181
+ invoiceId: string;
182
+ invoicePaymentId: string;
183
+ recoveryInvoiceItemId?: string | undefined;
184
+ stripePriceId?: string | undefined;
185
+ stripeProductId?: string | undefined;
186
+ subscriptionId?: string | undefined;
187
+ };
188
+ sourceChargeId: string;
189
+ };
190
+ rollbackClaim?: {
191
+ _creationTime: number;
192
+ _id: import("convex/values").GenericId<"recoveryClaims">;
193
+ accountId: string;
194
+ amountDue: number;
195
+ claimKey: string;
196
+ collectedAmount: number;
197
+ currency: string;
198
+ openingCollection?: {
199
+ amountDue: number;
200
+ collectedAmount: number;
201
+ operationKey: string;
202
+ revision: number;
203
+ } | undefined;
204
+ outstanding: number;
205
+ reservedAmount: number;
206
+ revision: number;
207
+ scopeKey: string;
208
+ sign: "negative" | "positive" | "zero";
209
+ sourceChargeId: string;
210
+ sourceGross: number;
211
+ sourceProcessingFee: number;
212
+ } | undefined;
213
+ }, {
214
+ claim: import("convex/values").VObject<{
215
+ _creationTime: number;
216
+ _id: import("convex/values").GenericId<"recoveryClaims">;
217
+ accountId: string;
218
+ amountDue: number;
219
+ claimKey: string;
220
+ collectedAmount: number;
221
+ currency: string;
222
+ openingCollection?: {
223
+ amountDue: number;
224
+ collectedAmount: number;
225
+ operationKey: string;
226
+ revision: number;
227
+ } | undefined;
228
+ outstanding: number;
229
+ reservedAmount: number;
230
+ revision: number;
231
+ scopeKey: string;
232
+ sign: "negative" | "positive" | "zero";
233
+ sourceChargeId: string;
234
+ sourceGross: number;
235
+ sourceProcessingFee: number;
236
+ }, {
237
+ accountId: import("convex/values").VString<string, "required">;
238
+ scopeKey: import("convex/values").VString<string, "required">;
239
+ currency: import("convex/values").VString<string, "required">;
240
+ claimKey: import("convex/values").VString<string, "required">;
241
+ sourceChargeId: import("convex/values").VString<string, "required">;
242
+ sourceGross: import("convex/values").VFloat64<number, "required">;
243
+ sourceProcessingFee: import("convex/values").VFloat64<number, "required">;
244
+ amountDue: import("convex/values").VFloat64<number, "required">;
245
+ revision: import("convex/values").VFloat64<number, "required">;
246
+ collectedAmount: import("convex/values").VFloat64<number, "required">;
247
+ reservedAmount: import("convex/values").VFloat64<number, "required">;
248
+ outstanding: import("convex/values").VFloat64<number, "required">;
249
+ sign: import("convex/values").VUnion<"negative" | "positive" | "zero", [import("convex/values").VLiteral<"positive", "required">, import("convex/values").VLiteral<"negative", "required">, import("convex/values").VLiteral<"zero", "required">], "required", never>;
250
+ openingCollection: import("convex/values").VObject<{
251
+ amountDue: number;
252
+ collectedAmount: number;
253
+ operationKey: string;
254
+ revision: number;
255
+ } | undefined, {
256
+ operationKey: import("convex/values").VString<string, "required">;
257
+ amountDue: import("convex/values").VFloat64<number, "required">;
258
+ revision: import("convex/values").VFloat64<number, "required">;
259
+ collectedAmount: import("convex/values").VFloat64<number, "required">;
260
+ }, "optional", "amountDue" | "collectedAmount" | "operationKey" | "revision">;
261
+ _id: import("convex/values").VId<import("convex/values").GenericId<"recoveryClaims">, "required">;
262
+ _creationTime: import("convex/values").VFloat64<number, "required">;
263
+ }, "required", "_creationTime" | "_id" | "accountId" | "amountDue" | "claimKey" | "collectedAmount" | "currency" | "openingCollection" | "openingCollection.amountDue" | "openingCollection.collectedAmount" | "openingCollection.operationKey" | "openingCollection.revision" | "outstanding" | "reservedAmount" | "revision" | "scopeKey" | "sign" | "sourceChargeId" | "sourceGross" | "sourceProcessingFee">;
264
+ rollbackClaim: import("convex/values").VObject<{
265
+ _creationTime: number;
266
+ _id: import("convex/values").GenericId<"recoveryClaims">;
267
+ accountId: string;
268
+ amountDue: number;
269
+ claimKey: string;
270
+ collectedAmount: number;
271
+ currency: string;
272
+ openingCollection?: {
273
+ amountDue: number;
274
+ collectedAmount: number;
275
+ operationKey: string;
276
+ revision: number;
277
+ } | undefined;
278
+ outstanding: number;
279
+ reservedAmount: number;
280
+ revision: number;
281
+ scopeKey: string;
282
+ sign: "negative" | "positive" | "zero";
283
+ sourceChargeId: string;
284
+ sourceGross: number;
285
+ sourceProcessingFee: number;
286
+ } | undefined, {
287
+ accountId: import("convex/values").VString<string, "required">;
288
+ scopeKey: import("convex/values").VString<string, "required">;
289
+ currency: import("convex/values").VString<string, "required">;
290
+ claimKey: import("convex/values").VString<string, "required">;
291
+ sourceChargeId: import("convex/values").VString<string, "required">;
292
+ sourceGross: import("convex/values").VFloat64<number, "required">;
293
+ sourceProcessingFee: import("convex/values").VFloat64<number, "required">;
294
+ amountDue: import("convex/values").VFloat64<number, "required">;
295
+ revision: import("convex/values").VFloat64<number, "required">;
296
+ collectedAmount: import("convex/values").VFloat64<number, "required">;
297
+ reservedAmount: import("convex/values").VFloat64<number, "required">;
298
+ outstanding: import("convex/values").VFloat64<number, "required">;
299
+ sign: import("convex/values").VUnion<"negative" | "positive" | "zero", [import("convex/values").VLiteral<"positive", "required">, import("convex/values").VLiteral<"negative", "required">, import("convex/values").VLiteral<"zero", "required">], "required", never>;
300
+ openingCollection: import("convex/values").VObject<{
301
+ amountDue: number;
302
+ collectedAmount: number;
303
+ operationKey: string;
304
+ revision: number;
305
+ } | undefined, {
306
+ operationKey: import("convex/values").VString<string, "required">;
307
+ amountDue: import("convex/values").VFloat64<number, "required">;
308
+ revision: import("convex/values").VFloat64<number, "required">;
309
+ collectedAmount: import("convex/values").VFloat64<number, "required">;
310
+ }, "optional", "amountDue" | "collectedAmount" | "operationKey" | "revision">;
311
+ _id: import("convex/values").VId<import("convex/values").GenericId<"recoveryClaims">, "required">;
312
+ _creationTime: import("convex/values").VFloat64<number, "required">;
313
+ }, "optional", "_creationTime" | "_id" | "accountId" | "amountDue" | "claimKey" | "collectedAmount" | "currency" | "openingCollection" | "openingCollection.amountDue" | "openingCollection.collectedAmount" | "openingCollection.operationKey" | "openingCollection.revision" | "outstanding" | "reservedAmount" | "revision" | "scopeKey" | "sign" | "sourceChargeId" | "sourceGross" | "sourceProcessingFee">;
314
+ deficit: import("convex/values").VObject<{
315
+ amountDue: number;
316
+ currency: string;
317
+ disputeLiability: number;
318
+ processingLiability: number;
319
+ retainedFee: number;
320
+ }, {
321
+ currency: import("convex/values").VString<string, "required">;
322
+ retainedFee: import("convex/values").VFloat64<number, "required">;
323
+ processingLiability: import("convex/values").VFloat64<number, "required">;
324
+ disputeLiability: import("convex/values").VFloat64<number, "required">;
325
+ amountDue: import("convex/values").VFloat64<number, "required">;
326
+ }, "required", "amountDue" | "currency" | "disputeLiability" | "processingLiability" | "retainedFee">;
327
+ observation: import("convex/values").VObject<{
328
+ currency: string;
329
+ disputeFees: number;
330
+ gross: number;
331
+ originalProcessingFee: number;
332
+ paymentIntentId: string;
333
+ principalReturned: number;
334
+ processingFee: number;
335
+ provenance: {
336
+ customerAccountId: string;
337
+ invoiceId: string;
338
+ invoicePaymentId: string;
339
+ recoveryInvoiceItemId?: string | undefined;
340
+ stripePriceId?: string | undefined;
341
+ stripeProductId?: string | undefined;
342
+ subscriptionId?: string | undefined;
343
+ };
344
+ sourceChargeId: string;
345
+ }, {
346
+ paymentIntentId: import("convex/values").VString<string, "required">;
347
+ sourceChargeId: import("convex/values").VString<string, "required">;
348
+ currency: import("convex/values").VString<string, "required">;
349
+ gross: import("convex/values").VFloat64<number, "required">;
350
+ originalProcessingFee: import("convex/values").VFloat64<number, "required">;
351
+ processingFee: import("convex/values").VFloat64<number, "required">;
352
+ disputeFees: import("convex/values").VFloat64<number, "required">;
353
+ principalReturned: import("convex/values").VFloat64<number, "required">;
354
+ provenance: import("convex/values").VObject<{
355
+ customerAccountId: string;
356
+ invoiceId: string;
357
+ invoicePaymentId: string;
358
+ recoveryInvoiceItemId?: string | undefined;
359
+ stripePriceId?: string | undefined;
360
+ stripeProductId?: string | undefined;
361
+ subscriptionId?: string | undefined;
362
+ }, {
363
+ invoiceId: import("convex/values").VString<string, "required">;
364
+ invoicePaymentId: import("convex/values").VString<string, "required">;
365
+ recoveryInvoiceItemId: import("convex/values").VString<string | undefined, "optional">;
366
+ customerAccountId: import("convex/values").VString<string, "required">;
367
+ subscriptionId: import("convex/values").VString<string | undefined, "optional">;
368
+ stripePriceId: import("convex/values").VString<string | undefined, "optional">;
369
+ stripeProductId: import("convex/values").VString<string | undefined, "optional">;
370
+ }, "required", "customerAccountId" | "invoiceId" | "invoicePaymentId" | "recoveryInvoiceItemId" | "stripePriceId" | "stripeProductId" | "subscriptionId">;
371
+ }, "required", "currency" | "disputeFees" | "gross" | "originalProcessingFee" | "paymentIntentId" | "principalReturned" | "processingFee" | "provenance" | "provenance.customerAccountId" | "provenance.invoiceId" | "provenance.invoicePaymentId" | "provenance.recoveryInvoiceItemId" | "provenance.stripePriceId" | "provenance.stripeProductId" | "provenance.subscriptionId" | "sourceChargeId">;
372
+ }, "required", "claim" | "claim._creationTime" | "claim._id" | "claim.accountId" | "claim.amountDue" | "claim.claimKey" | "claim.collectedAmount" | "claim.currency" | "claim.openingCollection" | "claim.openingCollection.amountDue" | "claim.openingCollection.collectedAmount" | "claim.openingCollection.operationKey" | "claim.openingCollection.revision" | "claim.outstanding" | "claim.reservedAmount" | "claim.revision" | "claim.scopeKey" | "claim.sign" | "claim.sourceChargeId" | "claim.sourceGross" | "claim.sourceProcessingFee" | "deficit" | "deficit.amountDue" | "deficit.currency" | "deficit.disputeLiability" | "deficit.processingLiability" | "deficit.retainedFee" | "observation" | "observation.currency" | "observation.disputeFees" | "observation.gross" | "observation.originalProcessingFee" | "observation.paymentIntentId" | "observation.principalReturned" | "observation.processingFee" | "observation.provenance" | "observation.provenance.customerAccountId" | "observation.provenance.invoiceId" | "observation.provenance.invoicePaymentId" | "observation.provenance.recoveryInvoiceItemId" | "observation.provenance.stripePriceId" | "observation.provenance.stripeProductId" | "observation.provenance.subscriptionId" | "observation.sourceChargeId" | "rollbackClaim" | "rollbackClaim._creationTime" | "rollbackClaim._id" | "rollbackClaim.accountId" | "rollbackClaim.amountDue" | "rollbackClaim.claimKey" | "rollbackClaim.collectedAmount" | "rollbackClaim.currency" | "rollbackClaim.openingCollection" | "rollbackClaim.openingCollection.amountDue" | "rollbackClaim.openingCollection.collectedAmount" | "rollbackClaim.openingCollection.operationKey" | "rollbackClaim.openingCollection.revision" | "rollbackClaim.outstanding" | "rollbackClaim.reservedAmount" | "rollbackClaim.revision" | "rollbackClaim.scopeKey" | "rollbackClaim.sign" | "rollbackClaim.sourceChargeId" | "rollbackClaim.sourceGross" | "rollbackClaim.sourceProcessingFee">;
373
+ export declare const failure: import("convex/values").VUnion<{
374
+ reason: "fee_pending" | "history_incomplete" | "provider_pending";
375
+ retryable: true;
376
+ status: "not_ready";
377
+ } | {
378
+ reason: "identity_changed" | "revision_changed" | "scope_busy";
379
+ retryable: false;
380
+ status: "conflict";
381
+ } | {
382
+ reason: "currency_mismatch" | "invalid_scope" | "payment_not_payable" | "policy_invalid" | "unsupported_source";
383
+ retryable: false;
384
+ status: "rejected";
385
+ } | {
386
+ reason: "history_incomplete" | "provider_outcome_unknown";
387
+ retryable: false;
388
+ status: "unknown";
389
+ }, [import("convex/values").VObject<{
390
+ reason: "fee_pending" | "history_incomplete" | "provider_pending";
391
+ retryable: true;
392
+ status: "not_ready";
393
+ }, {
394
+ status: import("convex/values").VLiteral<"not_ready", "required">;
395
+ reason: import("convex/values").VUnion<"fee_pending" | "history_incomplete" | "provider_pending", [import("convex/values").VLiteral<"provider_pending", "required">, import("convex/values").VLiteral<"fee_pending", "required">, import("convex/values").VLiteral<"history_incomplete", "required">], "required", never>;
396
+ retryable: import("convex/values").VLiteral<true, "required">;
397
+ }, "required", "reason" | "retryable" | "status">, import("convex/values").VObject<{
398
+ reason: "identity_changed" | "revision_changed" | "scope_busy";
399
+ retryable: false;
400
+ status: "conflict";
401
+ }, {
402
+ status: import("convex/values").VLiteral<"conflict", "required">;
403
+ reason: import("convex/values").VUnion<"identity_changed" | "revision_changed" | "scope_busy", [import("convex/values").VLiteral<"scope_busy", "required">, import("convex/values").VLiteral<"revision_changed", "required">, import("convex/values").VLiteral<"identity_changed", "required">], "required", never>;
404
+ retryable: import("convex/values").VLiteral<false, "required">;
405
+ }, "required", "reason" | "retryable" | "status">, import("convex/values").VObject<{
406
+ reason: "currency_mismatch" | "invalid_scope" | "payment_not_payable" | "policy_invalid" | "unsupported_source";
407
+ retryable: false;
408
+ status: "rejected";
409
+ }, {
410
+ status: import("convex/values").VLiteral<"rejected", "required">;
411
+ reason: import("convex/values").VUnion<"currency_mismatch" | "invalid_scope" | "payment_not_payable" | "policy_invalid" | "unsupported_source", [import("convex/values").VLiteral<"invalid_scope", "required">, import("convex/values").VLiteral<"unsupported_source", "required">, import("convex/values").VLiteral<"policy_invalid", "required">, import("convex/values").VLiteral<"payment_not_payable", "required">, import("convex/values").VLiteral<"currency_mismatch", "required">], "required", never>;
412
+ retryable: import("convex/values").VLiteral<false, "required">;
413
+ }, "required", "reason" | "retryable" | "status">, import("convex/values").VObject<{
414
+ reason: "history_incomplete" | "provider_outcome_unknown";
415
+ retryable: false;
416
+ status: "unknown";
417
+ }, {
418
+ status: import("convex/values").VLiteral<"unknown", "required">;
419
+ reason: import("convex/values").VUnion<"history_incomplete" | "provider_outcome_unknown", [import("convex/values").VLiteral<"provider_outcome_unknown", "required">, import("convex/values").VLiteral<"history_incomplete", "required">], "required", never>;
420
+ retryable: import("convex/values").VLiteral<false, "required">;
421
+ }, "required", "reason" | "retryable" | "status">], "required", "reason" | "retryable" | "status">;
422
+ export declare const bindingFields: {
423
+ accountId: import("convex/values").VString<string, "required">;
424
+ scopeKey: import("convex/values").VString<string, "required">;
425
+ currency: import("convex/values").VString<string, "required">;
426
+ claimKey: import("convex/values").VString<string, "required">;
427
+ source: import("convex/values").VUnion<{
428
+ customerAccountId: string;
429
+ gross: number;
430
+ invoiceId?: string | undefined;
431
+ kind: "sale";
432
+ paymentIntentId: string;
433
+ stripeAccountId?: string | undefined;
434
+ stripePriceId?: string | undefined;
435
+ stripeProductId?: string | undefined;
436
+ subscriptionId?: string | undefined;
437
+ } | {
438
+ gross: number;
439
+ groupKey: string;
440
+ kind: "invoice_recovery";
441
+ paymentIntentId: string;
442
+ }, [import("convex/values").VObject<{
443
+ customerAccountId: string;
444
+ gross: number;
445
+ invoiceId?: string | undefined;
446
+ kind: "sale";
447
+ paymentIntentId: string;
448
+ stripeAccountId?: string | undefined;
449
+ stripePriceId?: string | undefined;
450
+ stripeProductId?: string | undefined;
451
+ subscriptionId?: string | undefined;
452
+ }, {
453
+ kind: import("convex/values").VLiteral<"sale", "required">;
454
+ paymentIntentId: import("convex/values").VString<string, "required">;
455
+ gross: import("convex/values").VFloat64<number, "required">;
456
+ customerAccountId: import("convex/values").VString<string, "required">;
457
+ invoiceId: import("convex/values").VString<string | undefined, "optional">;
458
+ subscriptionId: import("convex/values").VString<string | undefined, "optional">;
459
+ stripeAccountId: import("convex/values").VString<string | undefined, "optional">;
460
+ stripePriceId: import("convex/values").VString<string | undefined, "optional">;
461
+ stripeProductId: import("convex/values").VString<string | undefined, "optional">;
462
+ }, "required", "customerAccountId" | "gross" | "invoiceId" | "kind" | "paymentIntentId" | "stripeAccountId" | "stripePriceId" | "stripeProductId" | "subscriptionId">, import("convex/values").VObject<{
463
+ gross: number;
464
+ groupKey: string;
465
+ kind: "invoice_recovery";
466
+ paymentIntentId: string;
467
+ }, {
468
+ kind: import("convex/values").VLiteral<"invoice_recovery", "required">;
469
+ paymentIntentId: import("convex/values").VString<string, "required">;
470
+ gross: import("convex/values").VFloat64<number, "required">;
471
+ groupKey: import("convex/values").VString<string, "required">;
472
+ }, "required", "gross" | "groupKey" | "kind" | "paymentIntentId">], "required", "customerAccountId" | "gross" | "groupKey" | "invoiceId" | "kind" | "paymentIntentId" | "stripeAccountId" | "stripePriceId" | "stripeProductId" | "subscriptionId">;
473
+ policy: import("convex/values").VObject<{
474
+ liability: {
475
+ disputeCosts: "all" | "none";
476
+ processingCosts: "all" | "none" | "uncovered";
477
+ };
478
+ rounding: "ceil" | "floor" | "nearest";
479
+ sellingFee: number;
480
+ }, {
481
+ sellingFee: import("convex/values").VFloat64<number, "required">;
482
+ liability: import("convex/values").VObject<{
483
+ disputeCosts: "all" | "none";
484
+ processingCosts: "all" | "none" | "uncovered";
485
+ }, {
486
+ processingCosts: import("convex/values").VUnion<"all" | "none" | "uncovered", [import("convex/values").VLiteral<"uncovered", "required">, import("convex/values").VLiteral<"all", "required">, import("convex/values").VLiteral<"none", "required">], "required", never>;
487
+ disputeCosts: import("convex/values").VUnion<"all" | "none", [import("convex/values").VLiteral<"all", "required">, import("convex/values").VLiteral<"none", "required">], "required", never>;
488
+ }, "required", "disputeCosts" | "processingCosts">;
489
+ rounding: import("convex/values").VUnion<"ceil" | "floor" | "nearest", [import("convex/values").VLiteral<"nearest", "required">, import("convex/values").VLiteral<"floor", "required">, import("convex/values").VLiteral<"ceil", "required">], "required", never>;
490
+ }, "required", "liability" | "liability.disputeCosts" | "liability.processingCosts" | "rounding" | "sellingFee">;
491
+ expectedRevision: import("convex/values").VFloat64<number, "required">;
492
+ rollback: import("convex/values").VObject<{
493
+ expectedRevision: number;
494
+ groupKey: string;
495
+ } | undefined, {
496
+ groupKey: import("convex/values").VString<string, "required">;
497
+ expectedRevision: import("convex/values").VFloat64<number, "required">;
498
+ }, "optional", "expectedRevision" | "groupKey">;
499
+ provider: import("convex/values").VString<string, "required">;
500
+ projection: import("convex/values").VString<string | undefined, "optional">;
501
+ importHook: import("convex/values").VString<string | undefined, "optional">;
502
+ providerApiVersion: import("convex/values").VString<string, "required">;
503
+ definitionVersion: import("convex/values").VFloat64<number, "required">;
504
+ maxAttempts: import("convex/values").VFloat64<number, "required">;
505
+ retryDelayMs: import("convex/values").VFloat64<number, "required">;
506
+ };
507
+ export declare const startFields: {
508
+ accountId: import("convex/values").VString<string, "required">;
509
+ scopeKey: import("convex/values").VString<string, "required">;
510
+ currency: import("convex/values").VString<string, "required">;
511
+ claimKey: import("convex/values").VString<string, "required">;
512
+ source: import("convex/values").VUnion<{
513
+ customerAccountId: string;
514
+ gross: number;
515
+ invoiceId?: string | undefined;
516
+ kind: "sale";
517
+ paymentIntentId: string;
518
+ stripeAccountId?: string | undefined;
519
+ stripePriceId?: string | undefined;
520
+ stripeProductId?: string | undefined;
521
+ subscriptionId?: string | undefined;
522
+ } | {
523
+ gross: number;
524
+ groupKey: string;
525
+ kind: "invoice_recovery";
526
+ paymentIntentId: string;
527
+ }, [import("convex/values").VObject<{
528
+ customerAccountId: string;
529
+ gross: number;
530
+ invoiceId?: string | undefined;
531
+ kind: "sale";
532
+ paymentIntentId: string;
533
+ stripeAccountId?: string | undefined;
534
+ stripePriceId?: string | undefined;
535
+ stripeProductId?: string | undefined;
536
+ subscriptionId?: string | undefined;
537
+ }, {
538
+ kind: import("convex/values").VLiteral<"sale", "required">;
539
+ paymentIntentId: import("convex/values").VString<string, "required">;
540
+ gross: import("convex/values").VFloat64<number, "required">;
541
+ customerAccountId: import("convex/values").VString<string, "required">;
542
+ invoiceId: import("convex/values").VString<string | undefined, "optional">;
543
+ subscriptionId: import("convex/values").VString<string | undefined, "optional">;
544
+ stripeAccountId: import("convex/values").VString<string | undefined, "optional">;
545
+ stripePriceId: import("convex/values").VString<string | undefined, "optional">;
546
+ stripeProductId: import("convex/values").VString<string | undefined, "optional">;
547
+ }, "required", "customerAccountId" | "gross" | "invoiceId" | "kind" | "paymentIntentId" | "stripeAccountId" | "stripePriceId" | "stripeProductId" | "subscriptionId">, import("convex/values").VObject<{
548
+ gross: number;
549
+ groupKey: string;
550
+ kind: "invoice_recovery";
551
+ paymentIntentId: string;
552
+ }, {
553
+ kind: import("convex/values").VLiteral<"invoice_recovery", "required">;
554
+ paymentIntentId: import("convex/values").VString<string, "required">;
555
+ gross: import("convex/values").VFloat64<number, "required">;
556
+ groupKey: import("convex/values").VString<string, "required">;
557
+ }, "required", "gross" | "groupKey" | "kind" | "paymentIntentId">], "required", "customerAccountId" | "gross" | "groupKey" | "invoiceId" | "kind" | "paymentIntentId" | "stripeAccountId" | "stripePriceId" | "stripeProductId" | "subscriptionId">;
558
+ policy: import("convex/values").VObject<{
559
+ liability: {
560
+ disputeCosts: "all" | "none";
561
+ processingCosts: "all" | "none" | "uncovered";
562
+ };
563
+ rounding: "ceil" | "floor" | "nearest";
564
+ sellingFee: number;
565
+ }, {
566
+ sellingFee: import("convex/values").VFloat64<number, "required">;
567
+ liability: import("convex/values").VObject<{
568
+ disputeCosts: "all" | "none";
569
+ processingCosts: "all" | "none" | "uncovered";
570
+ }, {
571
+ processingCosts: import("convex/values").VUnion<"all" | "none" | "uncovered", [import("convex/values").VLiteral<"uncovered", "required">, import("convex/values").VLiteral<"all", "required">, import("convex/values").VLiteral<"none", "required">], "required", never>;
572
+ disputeCosts: import("convex/values").VUnion<"all" | "none", [import("convex/values").VLiteral<"all", "required">, import("convex/values").VLiteral<"none", "required">], "required", never>;
573
+ }, "required", "disputeCosts" | "processingCosts">;
574
+ rounding: import("convex/values").VUnion<"ceil" | "floor" | "nearest", [import("convex/values").VLiteral<"nearest", "required">, import("convex/values").VLiteral<"floor", "required">, import("convex/values").VLiteral<"ceil", "required">], "required", never>;
575
+ }, "required", "liability" | "liability.disputeCosts" | "liability.processingCosts" | "rounding" | "sellingFee">;
576
+ expectedRevision: import("convex/values").VFloat64<number, "required">;
577
+ rollback: import("convex/values").VObject<{
578
+ expectedRevision: number;
579
+ groupKey: string;
580
+ } | undefined, {
581
+ groupKey: import("convex/values").VString<string, "required">;
582
+ expectedRevision: import("convex/values").VFloat64<number, "required">;
583
+ }, "optional", "expectedRevision" | "groupKey">;
584
+ provider: import("convex/values").VString<string, "required">;
585
+ projection: import("convex/values").VString<string | undefined, "optional">;
586
+ importHook: import("convex/values").VString<string | undefined, "optional">;
587
+ providerApiVersion: import("convex/values").VString<string, "required">;
588
+ definitionVersion: import("convex/values").VFloat64<number, "required">;
589
+ maxAttempts: import("convex/values").VFloat64<number, "required">;
590
+ retryDelayMs: import("convex/values").VFloat64<number, "required">;
591
+ requestKey: import("convex/values").VString<string, "required">;
592
+ };
593
+ export declare const operationFields: {
594
+ accountId: import("convex/values").VString<string, "required">;
595
+ scopeKey: import("convex/values").VString<string, "required">;
596
+ currency: import("convex/values").VString<string, "required">;
597
+ claimKey: import("convex/values").VString<string, "required">;
598
+ source: import("convex/values").VUnion<{
599
+ customerAccountId: string;
600
+ gross: number;
601
+ invoiceId?: string | undefined;
602
+ kind: "sale";
603
+ paymentIntentId: string;
604
+ stripeAccountId?: string | undefined;
605
+ stripePriceId?: string | undefined;
606
+ stripeProductId?: string | undefined;
607
+ subscriptionId?: string | undefined;
608
+ } | {
609
+ gross: number;
610
+ groupKey: string;
611
+ kind: "invoice_recovery";
612
+ paymentIntentId: string;
613
+ }, [import("convex/values").VObject<{
614
+ customerAccountId: string;
615
+ gross: number;
616
+ invoiceId?: string | undefined;
617
+ kind: "sale";
618
+ paymentIntentId: string;
619
+ stripeAccountId?: string | undefined;
620
+ stripePriceId?: string | undefined;
621
+ stripeProductId?: string | undefined;
622
+ subscriptionId?: string | undefined;
623
+ }, {
624
+ kind: import("convex/values").VLiteral<"sale", "required">;
625
+ paymentIntentId: import("convex/values").VString<string, "required">;
626
+ gross: import("convex/values").VFloat64<number, "required">;
627
+ customerAccountId: import("convex/values").VString<string, "required">;
628
+ invoiceId: import("convex/values").VString<string | undefined, "optional">;
629
+ subscriptionId: import("convex/values").VString<string | undefined, "optional">;
630
+ stripeAccountId: import("convex/values").VString<string | undefined, "optional">;
631
+ stripePriceId: import("convex/values").VString<string | undefined, "optional">;
632
+ stripeProductId: import("convex/values").VString<string | undefined, "optional">;
633
+ }, "required", "customerAccountId" | "gross" | "invoiceId" | "kind" | "paymentIntentId" | "stripeAccountId" | "stripePriceId" | "stripeProductId" | "subscriptionId">, import("convex/values").VObject<{
634
+ gross: number;
635
+ groupKey: string;
636
+ kind: "invoice_recovery";
637
+ paymentIntentId: string;
638
+ }, {
639
+ kind: import("convex/values").VLiteral<"invoice_recovery", "required">;
640
+ paymentIntentId: import("convex/values").VString<string, "required">;
641
+ gross: import("convex/values").VFloat64<number, "required">;
642
+ groupKey: import("convex/values").VString<string, "required">;
643
+ }, "required", "gross" | "groupKey" | "kind" | "paymentIntentId">], "required", "customerAccountId" | "gross" | "groupKey" | "invoiceId" | "kind" | "paymentIntentId" | "stripeAccountId" | "stripePriceId" | "stripeProductId" | "subscriptionId">;
644
+ policy: import("convex/values").VObject<{
645
+ liability: {
646
+ disputeCosts: "all" | "none";
647
+ processingCosts: "all" | "none" | "uncovered";
648
+ };
649
+ rounding: "ceil" | "floor" | "nearest";
650
+ sellingFee: number;
651
+ }, {
652
+ sellingFee: import("convex/values").VFloat64<number, "required">;
653
+ liability: import("convex/values").VObject<{
654
+ disputeCosts: "all" | "none";
655
+ processingCosts: "all" | "none" | "uncovered";
656
+ }, {
657
+ processingCosts: import("convex/values").VUnion<"all" | "none" | "uncovered", [import("convex/values").VLiteral<"uncovered", "required">, import("convex/values").VLiteral<"all", "required">, import("convex/values").VLiteral<"none", "required">], "required", never>;
658
+ disputeCosts: import("convex/values").VUnion<"all" | "none", [import("convex/values").VLiteral<"all", "required">, import("convex/values").VLiteral<"none", "required">], "required", never>;
659
+ }, "required", "disputeCosts" | "processingCosts">;
660
+ rounding: import("convex/values").VUnion<"ceil" | "floor" | "nearest", [import("convex/values").VLiteral<"nearest", "required">, import("convex/values").VLiteral<"floor", "required">, import("convex/values").VLiteral<"ceil", "required">], "required", never>;
661
+ }, "required", "liability" | "liability.disputeCosts" | "liability.processingCosts" | "rounding" | "sellingFee">;
662
+ expectedRevision: import("convex/values").VFloat64<number, "required">;
663
+ rollback: import("convex/values").VObject<{
664
+ expectedRevision: number;
665
+ groupKey: string;
666
+ } | undefined, {
667
+ groupKey: import("convex/values").VString<string, "required">;
668
+ expectedRevision: import("convex/values").VFloat64<number, "required">;
669
+ }, "optional", "expectedRevision" | "groupKey">;
670
+ provider: import("convex/values").VString<string, "required">;
671
+ projection: import("convex/values").VString<string | undefined, "optional">;
672
+ importHook: import("convex/values").VString<string | undefined, "optional">;
673
+ providerApiVersion: import("convex/values").VString<string, "required">;
674
+ definitionVersion: import("convex/values").VFloat64<number, "required">;
675
+ maxAttempts: import("convex/values").VFloat64<number, "required">;
676
+ retryDelayMs: import("convex/values").VFloat64<number, "required">;
677
+ requestKey: import("convex/values").VString<string, "required">;
678
+ version: import("convex/values").VFloat64<number, "required">;
679
+ workflowId: import("convex/values").VString<string | undefined, "optional">;
680
+ status: import("convex/values").VUnion<"completed" | "conflict" | "queued" | "rejected" | "running" | "unknown" | "waiting", [import("convex/values").VLiteral<"queued", "required">, import("convex/values").VLiteral<"running", "required">, import("convex/values").VLiteral<"waiting", "required">, import("convex/values").VLiteral<"completed", "required">, import("convex/values").VLiteral<"conflict", "required">, import("convex/values").VLiteral<"rejected", "required">, import("convex/values").VLiteral<"unknown", "required">], "required", never>;
681
+ failure: import("convex/values").VUnion<{
682
+ reason: "fee_pending" | "history_incomplete" | "provider_pending";
683
+ retryable: true;
684
+ status: "not_ready";
685
+ } | {
686
+ reason: "identity_changed" | "revision_changed" | "scope_busy";
687
+ retryable: false;
688
+ status: "conflict";
689
+ } | {
690
+ reason: "currency_mismatch" | "invalid_scope" | "payment_not_payable" | "policy_invalid" | "unsupported_source";
691
+ retryable: false;
692
+ status: "rejected";
693
+ } | {
694
+ reason: "history_incomplete" | "provider_outcome_unknown";
695
+ retryable: false;
696
+ status: "unknown";
697
+ } | undefined, [import("convex/values").VObject<{
698
+ reason: "fee_pending" | "history_incomplete" | "provider_pending";
699
+ retryable: true;
700
+ status: "not_ready";
701
+ }, {
702
+ status: import("convex/values").VLiteral<"not_ready", "required">;
703
+ reason: import("convex/values").VUnion<"fee_pending" | "history_incomplete" | "provider_pending", [import("convex/values").VLiteral<"provider_pending", "required">, import("convex/values").VLiteral<"fee_pending", "required">, import("convex/values").VLiteral<"history_incomplete", "required">], "required", never>;
704
+ retryable: import("convex/values").VLiteral<true, "required">;
705
+ }, "required", "reason" | "retryable" | "status">, import("convex/values").VObject<{
706
+ reason: "identity_changed" | "revision_changed" | "scope_busy";
707
+ retryable: false;
708
+ status: "conflict";
709
+ }, {
710
+ status: import("convex/values").VLiteral<"conflict", "required">;
711
+ reason: import("convex/values").VUnion<"identity_changed" | "revision_changed" | "scope_busy", [import("convex/values").VLiteral<"scope_busy", "required">, import("convex/values").VLiteral<"revision_changed", "required">, import("convex/values").VLiteral<"identity_changed", "required">], "required", never>;
712
+ retryable: import("convex/values").VLiteral<false, "required">;
713
+ }, "required", "reason" | "retryable" | "status">, import("convex/values").VObject<{
714
+ reason: "currency_mismatch" | "invalid_scope" | "payment_not_payable" | "policy_invalid" | "unsupported_source";
715
+ retryable: false;
716
+ status: "rejected";
717
+ }, {
718
+ status: import("convex/values").VLiteral<"rejected", "required">;
719
+ reason: import("convex/values").VUnion<"currency_mismatch" | "invalid_scope" | "payment_not_payable" | "policy_invalid" | "unsupported_source", [import("convex/values").VLiteral<"invalid_scope", "required">, import("convex/values").VLiteral<"unsupported_source", "required">, import("convex/values").VLiteral<"policy_invalid", "required">, import("convex/values").VLiteral<"payment_not_payable", "required">, import("convex/values").VLiteral<"currency_mismatch", "required">], "required", never>;
720
+ retryable: import("convex/values").VLiteral<false, "required">;
721
+ }, "required", "reason" | "retryable" | "status">, import("convex/values").VObject<{
722
+ reason: "history_incomplete" | "provider_outcome_unknown";
723
+ retryable: false;
724
+ status: "unknown";
725
+ }, {
726
+ status: import("convex/values").VLiteral<"unknown", "required">;
727
+ reason: import("convex/values").VUnion<"history_incomplete" | "provider_outcome_unknown", [import("convex/values").VLiteral<"provider_outcome_unknown", "required">, import("convex/values").VLiteral<"history_incomplete", "required">], "required", never>;
728
+ retryable: import("convex/values").VLiteral<false, "required">;
729
+ }, "required", "reason" | "retryable" | "status">], "optional", "reason" | "retryable" | "status">;
730
+ result: import("convex/values").VObject<{
731
+ claim: {
732
+ _creationTime: number;
733
+ _id: import("convex/values").GenericId<"recoveryClaims">;
734
+ accountId: string;
735
+ amountDue: number;
736
+ claimKey: string;
737
+ collectedAmount: number;
738
+ currency: string;
739
+ openingCollection?: {
740
+ amountDue: number;
741
+ collectedAmount: number;
742
+ operationKey: string;
743
+ revision: number;
744
+ } | undefined;
745
+ outstanding: number;
746
+ reservedAmount: number;
747
+ revision: number;
748
+ scopeKey: string;
749
+ sign: "negative" | "positive" | "zero";
750
+ sourceChargeId: string;
751
+ sourceGross: number;
752
+ sourceProcessingFee: number;
753
+ };
754
+ deficit: {
755
+ amountDue: number;
756
+ currency: string;
757
+ disputeLiability: number;
758
+ processingLiability: number;
759
+ retainedFee: number;
760
+ };
761
+ observation: {
762
+ currency: string;
763
+ disputeFees: number;
764
+ gross: number;
765
+ originalProcessingFee: number;
766
+ paymentIntentId: string;
767
+ principalReturned: number;
768
+ processingFee: number;
769
+ provenance: {
770
+ customerAccountId: string;
771
+ invoiceId: string;
772
+ invoicePaymentId: string;
773
+ recoveryInvoiceItemId?: string | undefined;
774
+ stripePriceId?: string | undefined;
775
+ stripeProductId?: string | undefined;
776
+ subscriptionId?: string | undefined;
777
+ };
778
+ sourceChargeId: string;
779
+ };
780
+ rollbackClaim?: {
781
+ _creationTime: number;
782
+ _id: import("convex/values").GenericId<"recoveryClaims">;
783
+ accountId: string;
784
+ amountDue: number;
785
+ claimKey: string;
786
+ collectedAmount: number;
787
+ currency: string;
788
+ openingCollection?: {
789
+ amountDue: number;
790
+ collectedAmount: number;
791
+ operationKey: string;
792
+ revision: number;
793
+ } | undefined;
794
+ outstanding: number;
795
+ reservedAmount: number;
796
+ revision: number;
797
+ scopeKey: string;
798
+ sign: "negative" | "positive" | "zero";
799
+ sourceChargeId: string;
800
+ sourceGross: number;
801
+ sourceProcessingFee: number;
802
+ } | undefined;
803
+ } | undefined, {
804
+ claim: import("convex/values").VObject<{
805
+ _creationTime: number;
806
+ _id: import("convex/values").GenericId<"recoveryClaims">;
807
+ accountId: string;
808
+ amountDue: number;
809
+ claimKey: string;
810
+ collectedAmount: number;
811
+ currency: string;
812
+ openingCollection?: {
813
+ amountDue: number;
814
+ collectedAmount: number;
815
+ operationKey: string;
816
+ revision: number;
817
+ } | undefined;
818
+ outstanding: number;
819
+ reservedAmount: number;
820
+ revision: number;
821
+ scopeKey: string;
822
+ sign: "negative" | "positive" | "zero";
823
+ sourceChargeId: string;
824
+ sourceGross: number;
825
+ sourceProcessingFee: number;
826
+ }, {
827
+ accountId: import("convex/values").VString<string, "required">;
828
+ scopeKey: import("convex/values").VString<string, "required">;
829
+ currency: import("convex/values").VString<string, "required">;
830
+ claimKey: import("convex/values").VString<string, "required">;
831
+ sourceChargeId: import("convex/values").VString<string, "required">;
832
+ sourceGross: import("convex/values").VFloat64<number, "required">;
833
+ sourceProcessingFee: import("convex/values").VFloat64<number, "required">;
834
+ amountDue: import("convex/values").VFloat64<number, "required">;
835
+ revision: import("convex/values").VFloat64<number, "required">;
836
+ collectedAmount: import("convex/values").VFloat64<number, "required">;
837
+ reservedAmount: import("convex/values").VFloat64<number, "required">;
838
+ outstanding: import("convex/values").VFloat64<number, "required">;
839
+ sign: import("convex/values").VUnion<"negative" | "positive" | "zero", [import("convex/values").VLiteral<"positive", "required">, import("convex/values").VLiteral<"negative", "required">, import("convex/values").VLiteral<"zero", "required">], "required", never>;
840
+ openingCollection: import("convex/values").VObject<{
841
+ amountDue: number;
842
+ collectedAmount: number;
843
+ operationKey: string;
844
+ revision: number;
845
+ } | undefined, {
846
+ operationKey: import("convex/values").VString<string, "required">;
847
+ amountDue: import("convex/values").VFloat64<number, "required">;
848
+ revision: import("convex/values").VFloat64<number, "required">;
849
+ collectedAmount: import("convex/values").VFloat64<number, "required">;
850
+ }, "optional", "amountDue" | "collectedAmount" | "operationKey" | "revision">;
851
+ _id: import("convex/values").VId<import("convex/values").GenericId<"recoveryClaims">, "required">;
852
+ _creationTime: import("convex/values").VFloat64<number, "required">;
853
+ }, "required", "_creationTime" | "_id" | "accountId" | "amountDue" | "claimKey" | "collectedAmount" | "currency" | "openingCollection" | "openingCollection.amountDue" | "openingCollection.collectedAmount" | "openingCollection.operationKey" | "openingCollection.revision" | "outstanding" | "reservedAmount" | "revision" | "scopeKey" | "sign" | "sourceChargeId" | "sourceGross" | "sourceProcessingFee">;
854
+ rollbackClaim: import("convex/values").VObject<{
855
+ _creationTime: number;
856
+ _id: import("convex/values").GenericId<"recoveryClaims">;
857
+ accountId: string;
858
+ amountDue: number;
859
+ claimKey: string;
860
+ collectedAmount: number;
861
+ currency: string;
862
+ openingCollection?: {
863
+ amountDue: number;
864
+ collectedAmount: number;
865
+ operationKey: string;
866
+ revision: number;
867
+ } | undefined;
868
+ outstanding: number;
869
+ reservedAmount: number;
870
+ revision: number;
871
+ scopeKey: string;
872
+ sign: "negative" | "positive" | "zero";
873
+ sourceChargeId: string;
874
+ sourceGross: number;
875
+ sourceProcessingFee: number;
876
+ } | undefined, {
877
+ accountId: import("convex/values").VString<string, "required">;
878
+ scopeKey: import("convex/values").VString<string, "required">;
879
+ currency: import("convex/values").VString<string, "required">;
880
+ claimKey: import("convex/values").VString<string, "required">;
881
+ sourceChargeId: import("convex/values").VString<string, "required">;
882
+ sourceGross: import("convex/values").VFloat64<number, "required">;
883
+ sourceProcessingFee: import("convex/values").VFloat64<number, "required">;
884
+ amountDue: import("convex/values").VFloat64<number, "required">;
885
+ revision: import("convex/values").VFloat64<number, "required">;
886
+ collectedAmount: import("convex/values").VFloat64<number, "required">;
887
+ reservedAmount: import("convex/values").VFloat64<number, "required">;
888
+ outstanding: import("convex/values").VFloat64<number, "required">;
889
+ sign: import("convex/values").VUnion<"negative" | "positive" | "zero", [import("convex/values").VLiteral<"positive", "required">, import("convex/values").VLiteral<"negative", "required">, import("convex/values").VLiteral<"zero", "required">], "required", never>;
890
+ openingCollection: import("convex/values").VObject<{
891
+ amountDue: number;
892
+ collectedAmount: number;
893
+ operationKey: string;
894
+ revision: number;
895
+ } | undefined, {
896
+ operationKey: import("convex/values").VString<string, "required">;
897
+ amountDue: import("convex/values").VFloat64<number, "required">;
898
+ revision: import("convex/values").VFloat64<number, "required">;
899
+ collectedAmount: import("convex/values").VFloat64<number, "required">;
900
+ }, "optional", "amountDue" | "collectedAmount" | "operationKey" | "revision">;
901
+ _id: import("convex/values").VId<import("convex/values").GenericId<"recoveryClaims">, "required">;
902
+ _creationTime: import("convex/values").VFloat64<number, "required">;
903
+ }, "optional", "_creationTime" | "_id" | "accountId" | "amountDue" | "claimKey" | "collectedAmount" | "currency" | "openingCollection" | "openingCollection.amountDue" | "openingCollection.collectedAmount" | "openingCollection.operationKey" | "openingCollection.revision" | "outstanding" | "reservedAmount" | "revision" | "scopeKey" | "sign" | "sourceChargeId" | "sourceGross" | "sourceProcessingFee">;
904
+ deficit: import("convex/values").VObject<{
905
+ amountDue: number;
906
+ currency: string;
907
+ disputeLiability: number;
908
+ processingLiability: number;
909
+ retainedFee: number;
910
+ }, {
911
+ currency: import("convex/values").VString<string, "required">;
912
+ retainedFee: import("convex/values").VFloat64<number, "required">;
913
+ processingLiability: import("convex/values").VFloat64<number, "required">;
914
+ disputeLiability: import("convex/values").VFloat64<number, "required">;
915
+ amountDue: import("convex/values").VFloat64<number, "required">;
916
+ }, "required", "amountDue" | "currency" | "disputeLiability" | "processingLiability" | "retainedFee">;
917
+ observation: import("convex/values").VObject<{
918
+ currency: string;
919
+ disputeFees: number;
920
+ gross: number;
921
+ originalProcessingFee: number;
922
+ paymentIntentId: string;
923
+ principalReturned: number;
924
+ processingFee: number;
925
+ provenance: {
926
+ customerAccountId: string;
927
+ invoiceId: string;
928
+ invoicePaymentId: string;
929
+ recoveryInvoiceItemId?: string | undefined;
930
+ stripePriceId?: string | undefined;
931
+ stripeProductId?: string | undefined;
932
+ subscriptionId?: string | undefined;
933
+ };
934
+ sourceChargeId: string;
935
+ }, {
936
+ paymentIntentId: import("convex/values").VString<string, "required">;
937
+ sourceChargeId: import("convex/values").VString<string, "required">;
938
+ currency: import("convex/values").VString<string, "required">;
939
+ gross: import("convex/values").VFloat64<number, "required">;
940
+ originalProcessingFee: import("convex/values").VFloat64<number, "required">;
941
+ processingFee: import("convex/values").VFloat64<number, "required">;
942
+ disputeFees: import("convex/values").VFloat64<number, "required">;
943
+ principalReturned: import("convex/values").VFloat64<number, "required">;
944
+ provenance: import("convex/values").VObject<{
945
+ customerAccountId: string;
946
+ invoiceId: string;
947
+ invoicePaymentId: string;
948
+ recoveryInvoiceItemId?: string | undefined;
949
+ stripePriceId?: string | undefined;
950
+ stripeProductId?: string | undefined;
951
+ subscriptionId?: string | undefined;
952
+ }, {
953
+ invoiceId: import("convex/values").VString<string, "required">;
954
+ invoicePaymentId: import("convex/values").VString<string, "required">;
955
+ recoveryInvoiceItemId: import("convex/values").VString<string | undefined, "optional">;
956
+ customerAccountId: import("convex/values").VString<string, "required">;
957
+ subscriptionId: import("convex/values").VString<string | undefined, "optional">;
958
+ stripePriceId: import("convex/values").VString<string | undefined, "optional">;
959
+ stripeProductId: import("convex/values").VString<string | undefined, "optional">;
960
+ }, "required", "customerAccountId" | "invoiceId" | "invoicePaymentId" | "recoveryInvoiceItemId" | "stripePriceId" | "stripeProductId" | "subscriptionId">;
961
+ }, "required", "currency" | "disputeFees" | "gross" | "originalProcessingFee" | "paymentIntentId" | "principalReturned" | "processingFee" | "provenance" | "provenance.customerAccountId" | "provenance.invoiceId" | "provenance.invoicePaymentId" | "provenance.recoveryInvoiceItemId" | "provenance.stripePriceId" | "provenance.stripeProductId" | "provenance.subscriptionId" | "sourceChargeId">;
962
+ }, "optional", "claim" | "claim._creationTime" | "claim._id" | "claim.accountId" | "claim.amountDue" | "claim.claimKey" | "claim.collectedAmount" | "claim.currency" | "claim.openingCollection" | "claim.openingCollection.amountDue" | "claim.openingCollection.collectedAmount" | "claim.openingCollection.operationKey" | "claim.openingCollection.revision" | "claim.outstanding" | "claim.reservedAmount" | "claim.revision" | "claim.scopeKey" | "claim.sign" | "claim.sourceChargeId" | "claim.sourceGross" | "claim.sourceProcessingFee" | "deficit" | "deficit.amountDue" | "deficit.currency" | "deficit.disputeLiability" | "deficit.processingLiability" | "deficit.retainedFee" | "observation" | "observation.currency" | "observation.disputeFees" | "observation.gross" | "observation.originalProcessingFee" | "observation.paymentIntentId" | "observation.principalReturned" | "observation.processingFee" | "observation.provenance" | "observation.provenance.customerAccountId" | "observation.provenance.invoiceId" | "observation.provenance.invoicePaymentId" | "observation.provenance.recoveryInvoiceItemId" | "observation.provenance.stripePriceId" | "observation.provenance.stripeProductId" | "observation.provenance.subscriptionId" | "observation.sourceChargeId" | "rollbackClaim" | "rollbackClaim._creationTime" | "rollbackClaim._id" | "rollbackClaim.accountId" | "rollbackClaim.amountDue" | "rollbackClaim.claimKey" | "rollbackClaim.collectedAmount" | "rollbackClaim.currency" | "rollbackClaim.openingCollection" | "rollbackClaim.openingCollection.amountDue" | "rollbackClaim.openingCollection.collectedAmount" | "rollbackClaim.openingCollection.operationKey" | "rollbackClaim.openingCollection.revision" | "rollbackClaim.outstanding" | "rollbackClaim.reservedAmount" | "rollbackClaim.revision" | "rollbackClaim.scopeKey" | "rollbackClaim.sign" | "rollbackClaim.sourceChargeId" | "rollbackClaim.sourceGross" | "rollbackClaim.sourceProcessingFee">;
963
+ };
964
+ export declare const operationsTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
965
+ accountId: string;
966
+ claimKey: string;
967
+ currency: string;
968
+ definitionVersion: number;
969
+ expectedRevision: number;
970
+ failure?: {
971
+ reason: "fee_pending" | "history_incomplete" | "provider_pending";
972
+ retryable: true;
973
+ status: "not_ready";
974
+ } | {
975
+ reason: "identity_changed" | "revision_changed" | "scope_busy";
976
+ retryable: false;
977
+ status: "conflict";
978
+ } | {
979
+ reason: "currency_mismatch" | "invalid_scope" | "payment_not_payable" | "policy_invalid" | "unsupported_source";
980
+ retryable: false;
981
+ status: "rejected";
982
+ } | {
983
+ reason: "history_incomplete" | "provider_outcome_unknown";
984
+ retryable: false;
985
+ status: "unknown";
986
+ } | undefined;
987
+ importHook?: string | undefined;
988
+ maxAttempts: number;
989
+ policy: {
990
+ liability: {
991
+ disputeCosts: "all" | "none";
992
+ processingCosts: "all" | "none" | "uncovered";
993
+ };
994
+ rounding: "ceil" | "floor" | "nearest";
995
+ sellingFee: number;
996
+ };
997
+ projection?: string | undefined;
998
+ provider: string;
999
+ providerApiVersion: string;
1000
+ requestKey: string;
1001
+ result?: {
1002
+ claim: {
1003
+ _creationTime: number;
1004
+ _id: import("convex/values").GenericId<"recoveryClaims">;
1005
+ accountId: string;
1006
+ amountDue: number;
1007
+ claimKey: string;
1008
+ collectedAmount: number;
1009
+ currency: string;
1010
+ openingCollection?: {
1011
+ amountDue: number;
1012
+ collectedAmount: number;
1013
+ operationKey: string;
1014
+ revision: number;
1015
+ } | undefined;
1016
+ outstanding: number;
1017
+ reservedAmount: number;
1018
+ revision: number;
1019
+ scopeKey: string;
1020
+ sign: "negative" | "positive" | "zero";
1021
+ sourceChargeId: string;
1022
+ sourceGross: number;
1023
+ sourceProcessingFee: number;
1024
+ };
1025
+ deficit: {
1026
+ amountDue: number;
1027
+ currency: string;
1028
+ disputeLiability: number;
1029
+ processingLiability: number;
1030
+ retainedFee: number;
1031
+ };
1032
+ observation: {
1033
+ currency: string;
1034
+ disputeFees: number;
1035
+ gross: number;
1036
+ originalProcessingFee: number;
1037
+ paymentIntentId: string;
1038
+ principalReturned: number;
1039
+ processingFee: number;
1040
+ provenance: {
1041
+ customerAccountId: string;
1042
+ invoiceId: string;
1043
+ invoicePaymentId: string;
1044
+ recoveryInvoiceItemId?: string | undefined;
1045
+ stripePriceId?: string | undefined;
1046
+ stripeProductId?: string | undefined;
1047
+ subscriptionId?: string | undefined;
1048
+ };
1049
+ sourceChargeId: string;
1050
+ };
1051
+ rollbackClaim?: {
1052
+ _creationTime: number;
1053
+ _id: import("convex/values").GenericId<"recoveryClaims">;
1054
+ accountId: string;
1055
+ amountDue: number;
1056
+ claimKey: string;
1057
+ collectedAmount: number;
1058
+ currency: string;
1059
+ openingCollection?: {
1060
+ amountDue: number;
1061
+ collectedAmount: number;
1062
+ operationKey: string;
1063
+ revision: number;
1064
+ } | undefined;
1065
+ outstanding: number;
1066
+ reservedAmount: number;
1067
+ revision: number;
1068
+ scopeKey: string;
1069
+ sign: "negative" | "positive" | "zero";
1070
+ sourceChargeId: string;
1071
+ sourceGross: number;
1072
+ sourceProcessingFee: number;
1073
+ } | undefined;
1074
+ } | undefined;
1075
+ retryDelayMs: number;
1076
+ rollback?: {
1077
+ expectedRevision: number;
1078
+ groupKey: string;
1079
+ } | undefined;
1080
+ scopeKey: string;
1081
+ source: {
1082
+ customerAccountId: string;
1083
+ gross: number;
1084
+ invoiceId?: string | undefined;
1085
+ kind: "sale";
1086
+ paymentIntentId: string;
1087
+ stripeAccountId?: string | undefined;
1088
+ stripePriceId?: string | undefined;
1089
+ stripeProductId?: string | undefined;
1090
+ subscriptionId?: string | undefined;
1091
+ } | {
1092
+ gross: number;
1093
+ groupKey: string;
1094
+ kind: "invoice_recovery";
1095
+ paymentIntentId: string;
1096
+ };
1097
+ status: "completed" | "conflict" | "queued" | "rejected" | "running" | "unknown" | "waiting";
1098
+ version: number;
1099
+ workflowId?: string | undefined;
1100
+ }, {
1101
+ accountId: import("convex/values").VString<string, "required">;
1102
+ scopeKey: import("convex/values").VString<string, "required">;
1103
+ currency: import("convex/values").VString<string, "required">;
1104
+ claimKey: import("convex/values").VString<string, "required">;
1105
+ source: import("convex/values").VUnion<{
1106
+ customerAccountId: string;
1107
+ gross: number;
1108
+ invoiceId?: string | undefined;
1109
+ kind: "sale";
1110
+ paymentIntentId: string;
1111
+ stripeAccountId?: string | undefined;
1112
+ stripePriceId?: string | undefined;
1113
+ stripeProductId?: string | undefined;
1114
+ subscriptionId?: string | undefined;
1115
+ } | {
1116
+ gross: number;
1117
+ groupKey: string;
1118
+ kind: "invoice_recovery";
1119
+ paymentIntentId: string;
1120
+ }, [import("convex/values").VObject<{
1121
+ customerAccountId: string;
1122
+ gross: number;
1123
+ invoiceId?: string | undefined;
1124
+ kind: "sale";
1125
+ paymentIntentId: string;
1126
+ stripeAccountId?: string | undefined;
1127
+ stripePriceId?: string | undefined;
1128
+ stripeProductId?: string | undefined;
1129
+ subscriptionId?: string | undefined;
1130
+ }, {
1131
+ kind: import("convex/values").VLiteral<"sale", "required">;
1132
+ paymentIntentId: import("convex/values").VString<string, "required">;
1133
+ gross: import("convex/values").VFloat64<number, "required">;
1134
+ customerAccountId: import("convex/values").VString<string, "required">;
1135
+ invoiceId: import("convex/values").VString<string | undefined, "optional">;
1136
+ subscriptionId: import("convex/values").VString<string | undefined, "optional">;
1137
+ stripeAccountId: import("convex/values").VString<string | undefined, "optional">;
1138
+ stripePriceId: import("convex/values").VString<string | undefined, "optional">;
1139
+ stripeProductId: import("convex/values").VString<string | undefined, "optional">;
1140
+ }, "required", "customerAccountId" | "gross" | "invoiceId" | "kind" | "paymentIntentId" | "stripeAccountId" | "stripePriceId" | "stripeProductId" | "subscriptionId">, import("convex/values").VObject<{
1141
+ gross: number;
1142
+ groupKey: string;
1143
+ kind: "invoice_recovery";
1144
+ paymentIntentId: string;
1145
+ }, {
1146
+ kind: import("convex/values").VLiteral<"invoice_recovery", "required">;
1147
+ paymentIntentId: import("convex/values").VString<string, "required">;
1148
+ gross: import("convex/values").VFloat64<number, "required">;
1149
+ groupKey: import("convex/values").VString<string, "required">;
1150
+ }, "required", "gross" | "groupKey" | "kind" | "paymentIntentId">], "required", "customerAccountId" | "gross" | "groupKey" | "invoiceId" | "kind" | "paymentIntentId" | "stripeAccountId" | "stripePriceId" | "stripeProductId" | "subscriptionId">;
1151
+ policy: import("convex/values").VObject<{
1152
+ liability: {
1153
+ disputeCosts: "all" | "none";
1154
+ processingCosts: "all" | "none" | "uncovered";
1155
+ };
1156
+ rounding: "ceil" | "floor" | "nearest";
1157
+ sellingFee: number;
1158
+ }, {
1159
+ sellingFee: import("convex/values").VFloat64<number, "required">;
1160
+ liability: import("convex/values").VObject<{
1161
+ disputeCosts: "all" | "none";
1162
+ processingCosts: "all" | "none" | "uncovered";
1163
+ }, {
1164
+ processingCosts: import("convex/values").VUnion<"all" | "none" | "uncovered", [import("convex/values").VLiteral<"uncovered", "required">, import("convex/values").VLiteral<"all", "required">, import("convex/values").VLiteral<"none", "required">], "required", never>;
1165
+ disputeCosts: import("convex/values").VUnion<"all" | "none", [import("convex/values").VLiteral<"all", "required">, import("convex/values").VLiteral<"none", "required">], "required", never>;
1166
+ }, "required", "disputeCosts" | "processingCosts">;
1167
+ rounding: import("convex/values").VUnion<"ceil" | "floor" | "nearest", [import("convex/values").VLiteral<"nearest", "required">, import("convex/values").VLiteral<"floor", "required">, import("convex/values").VLiteral<"ceil", "required">], "required", never>;
1168
+ }, "required", "liability" | "liability.disputeCosts" | "liability.processingCosts" | "rounding" | "sellingFee">;
1169
+ expectedRevision: import("convex/values").VFloat64<number, "required">;
1170
+ rollback: import("convex/values").VObject<{
1171
+ expectedRevision: number;
1172
+ groupKey: string;
1173
+ } | undefined, {
1174
+ groupKey: import("convex/values").VString<string, "required">;
1175
+ expectedRevision: import("convex/values").VFloat64<number, "required">;
1176
+ }, "optional", "expectedRevision" | "groupKey">;
1177
+ provider: import("convex/values").VString<string, "required">;
1178
+ projection: import("convex/values").VString<string | undefined, "optional">;
1179
+ importHook: import("convex/values").VString<string | undefined, "optional">;
1180
+ providerApiVersion: import("convex/values").VString<string, "required">;
1181
+ definitionVersion: import("convex/values").VFloat64<number, "required">;
1182
+ maxAttempts: import("convex/values").VFloat64<number, "required">;
1183
+ retryDelayMs: import("convex/values").VFloat64<number, "required">;
1184
+ requestKey: import("convex/values").VString<string, "required">;
1185
+ version: import("convex/values").VFloat64<number, "required">;
1186
+ workflowId: import("convex/values").VString<string | undefined, "optional">;
1187
+ status: import("convex/values").VUnion<"completed" | "conflict" | "queued" | "rejected" | "running" | "unknown" | "waiting", [import("convex/values").VLiteral<"queued", "required">, import("convex/values").VLiteral<"running", "required">, import("convex/values").VLiteral<"waiting", "required">, import("convex/values").VLiteral<"completed", "required">, import("convex/values").VLiteral<"conflict", "required">, import("convex/values").VLiteral<"rejected", "required">, import("convex/values").VLiteral<"unknown", "required">], "required", never>;
1188
+ failure: import("convex/values").VUnion<{
1189
+ reason: "fee_pending" | "history_incomplete" | "provider_pending";
1190
+ retryable: true;
1191
+ status: "not_ready";
1192
+ } | {
1193
+ reason: "identity_changed" | "revision_changed" | "scope_busy";
1194
+ retryable: false;
1195
+ status: "conflict";
1196
+ } | {
1197
+ reason: "currency_mismatch" | "invalid_scope" | "payment_not_payable" | "policy_invalid" | "unsupported_source";
1198
+ retryable: false;
1199
+ status: "rejected";
1200
+ } | {
1201
+ reason: "history_incomplete" | "provider_outcome_unknown";
1202
+ retryable: false;
1203
+ status: "unknown";
1204
+ } | undefined, [import("convex/values").VObject<{
1205
+ reason: "fee_pending" | "history_incomplete" | "provider_pending";
1206
+ retryable: true;
1207
+ status: "not_ready";
1208
+ }, {
1209
+ status: import("convex/values").VLiteral<"not_ready", "required">;
1210
+ reason: import("convex/values").VUnion<"fee_pending" | "history_incomplete" | "provider_pending", [import("convex/values").VLiteral<"provider_pending", "required">, import("convex/values").VLiteral<"fee_pending", "required">, import("convex/values").VLiteral<"history_incomplete", "required">], "required", never>;
1211
+ retryable: import("convex/values").VLiteral<true, "required">;
1212
+ }, "required", "reason" | "retryable" | "status">, import("convex/values").VObject<{
1213
+ reason: "identity_changed" | "revision_changed" | "scope_busy";
1214
+ retryable: false;
1215
+ status: "conflict";
1216
+ }, {
1217
+ status: import("convex/values").VLiteral<"conflict", "required">;
1218
+ reason: import("convex/values").VUnion<"identity_changed" | "revision_changed" | "scope_busy", [import("convex/values").VLiteral<"scope_busy", "required">, import("convex/values").VLiteral<"revision_changed", "required">, import("convex/values").VLiteral<"identity_changed", "required">], "required", never>;
1219
+ retryable: import("convex/values").VLiteral<false, "required">;
1220
+ }, "required", "reason" | "retryable" | "status">, import("convex/values").VObject<{
1221
+ reason: "currency_mismatch" | "invalid_scope" | "payment_not_payable" | "policy_invalid" | "unsupported_source";
1222
+ retryable: false;
1223
+ status: "rejected";
1224
+ }, {
1225
+ status: import("convex/values").VLiteral<"rejected", "required">;
1226
+ reason: import("convex/values").VUnion<"currency_mismatch" | "invalid_scope" | "payment_not_payable" | "policy_invalid" | "unsupported_source", [import("convex/values").VLiteral<"invalid_scope", "required">, import("convex/values").VLiteral<"unsupported_source", "required">, import("convex/values").VLiteral<"policy_invalid", "required">, import("convex/values").VLiteral<"payment_not_payable", "required">, import("convex/values").VLiteral<"currency_mismatch", "required">], "required", never>;
1227
+ retryable: import("convex/values").VLiteral<false, "required">;
1228
+ }, "required", "reason" | "retryable" | "status">, import("convex/values").VObject<{
1229
+ reason: "history_incomplete" | "provider_outcome_unknown";
1230
+ retryable: false;
1231
+ status: "unknown";
1232
+ }, {
1233
+ status: import("convex/values").VLiteral<"unknown", "required">;
1234
+ reason: import("convex/values").VUnion<"history_incomplete" | "provider_outcome_unknown", [import("convex/values").VLiteral<"provider_outcome_unknown", "required">, import("convex/values").VLiteral<"history_incomplete", "required">], "required", never>;
1235
+ retryable: import("convex/values").VLiteral<false, "required">;
1236
+ }, "required", "reason" | "retryable" | "status">], "optional", "reason" | "retryable" | "status">;
1237
+ result: import("convex/values").VObject<{
1238
+ claim: {
1239
+ _creationTime: number;
1240
+ _id: import("convex/values").GenericId<"recoveryClaims">;
1241
+ accountId: string;
1242
+ amountDue: number;
1243
+ claimKey: string;
1244
+ collectedAmount: number;
1245
+ currency: string;
1246
+ openingCollection?: {
1247
+ amountDue: number;
1248
+ collectedAmount: number;
1249
+ operationKey: string;
1250
+ revision: number;
1251
+ } | undefined;
1252
+ outstanding: number;
1253
+ reservedAmount: number;
1254
+ revision: number;
1255
+ scopeKey: string;
1256
+ sign: "negative" | "positive" | "zero";
1257
+ sourceChargeId: string;
1258
+ sourceGross: number;
1259
+ sourceProcessingFee: number;
1260
+ };
1261
+ deficit: {
1262
+ amountDue: number;
1263
+ currency: string;
1264
+ disputeLiability: number;
1265
+ processingLiability: number;
1266
+ retainedFee: number;
1267
+ };
1268
+ observation: {
1269
+ currency: string;
1270
+ disputeFees: number;
1271
+ gross: number;
1272
+ originalProcessingFee: number;
1273
+ paymentIntentId: string;
1274
+ principalReturned: number;
1275
+ processingFee: number;
1276
+ provenance: {
1277
+ customerAccountId: string;
1278
+ invoiceId: string;
1279
+ invoicePaymentId: string;
1280
+ recoveryInvoiceItemId?: string | undefined;
1281
+ stripePriceId?: string | undefined;
1282
+ stripeProductId?: string | undefined;
1283
+ subscriptionId?: string | undefined;
1284
+ };
1285
+ sourceChargeId: string;
1286
+ };
1287
+ rollbackClaim?: {
1288
+ _creationTime: number;
1289
+ _id: import("convex/values").GenericId<"recoveryClaims">;
1290
+ accountId: string;
1291
+ amountDue: number;
1292
+ claimKey: string;
1293
+ collectedAmount: number;
1294
+ currency: string;
1295
+ openingCollection?: {
1296
+ amountDue: number;
1297
+ collectedAmount: number;
1298
+ operationKey: string;
1299
+ revision: number;
1300
+ } | undefined;
1301
+ outstanding: number;
1302
+ reservedAmount: number;
1303
+ revision: number;
1304
+ scopeKey: string;
1305
+ sign: "negative" | "positive" | "zero";
1306
+ sourceChargeId: string;
1307
+ sourceGross: number;
1308
+ sourceProcessingFee: number;
1309
+ } | undefined;
1310
+ } | undefined, {
1311
+ claim: import("convex/values").VObject<{
1312
+ _creationTime: number;
1313
+ _id: import("convex/values").GenericId<"recoveryClaims">;
1314
+ accountId: string;
1315
+ amountDue: number;
1316
+ claimKey: string;
1317
+ collectedAmount: number;
1318
+ currency: string;
1319
+ openingCollection?: {
1320
+ amountDue: number;
1321
+ collectedAmount: number;
1322
+ operationKey: string;
1323
+ revision: number;
1324
+ } | undefined;
1325
+ outstanding: number;
1326
+ reservedAmount: number;
1327
+ revision: number;
1328
+ scopeKey: string;
1329
+ sign: "negative" | "positive" | "zero";
1330
+ sourceChargeId: string;
1331
+ sourceGross: number;
1332
+ sourceProcessingFee: number;
1333
+ }, {
1334
+ accountId: import("convex/values").VString<string, "required">;
1335
+ scopeKey: import("convex/values").VString<string, "required">;
1336
+ currency: import("convex/values").VString<string, "required">;
1337
+ claimKey: import("convex/values").VString<string, "required">;
1338
+ sourceChargeId: import("convex/values").VString<string, "required">;
1339
+ sourceGross: import("convex/values").VFloat64<number, "required">;
1340
+ sourceProcessingFee: import("convex/values").VFloat64<number, "required">;
1341
+ amountDue: import("convex/values").VFloat64<number, "required">;
1342
+ revision: import("convex/values").VFloat64<number, "required">;
1343
+ collectedAmount: import("convex/values").VFloat64<number, "required">;
1344
+ reservedAmount: import("convex/values").VFloat64<number, "required">;
1345
+ outstanding: import("convex/values").VFloat64<number, "required">;
1346
+ sign: import("convex/values").VUnion<"negative" | "positive" | "zero", [import("convex/values").VLiteral<"positive", "required">, import("convex/values").VLiteral<"negative", "required">, import("convex/values").VLiteral<"zero", "required">], "required", never>;
1347
+ openingCollection: import("convex/values").VObject<{
1348
+ amountDue: number;
1349
+ collectedAmount: number;
1350
+ operationKey: string;
1351
+ revision: number;
1352
+ } | undefined, {
1353
+ operationKey: import("convex/values").VString<string, "required">;
1354
+ amountDue: import("convex/values").VFloat64<number, "required">;
1355
+ revision: import("convex/values").VFloat64<number, "required">;
1356
+ collectedAmount: import("convex/values").VFloat64<number, "required">;
1357
+ }, "optional", "amountDue" | "collectedAmount" | "operationKey" | "revision">;
1358
+ _id: import("convex/values").VId<import("convex/values").GenericId<"recoveryClaims">, "required">;
1359
+ _creationTime: import("convex/values").VFloat64<number, "required">;
1360
+ }, "required", "_creationTime" | "_id" | "accountId" | "amountDue" | "claimKey" | "collectedAmount" | "currency" | "openingCollection" | "openingCollection.amountDue" | "openingCollection.collectedAmount" | "openingCollection.operationKey" | "openingCollection.revision" | "outstanding" | "reservedAmount" | "revision" | "scopeKey" | "sign" | "sourceChargeId" | "sourceGross" | "sourceProcessingFee">;
1361
+ rollbackClaim: import("convex/values").VObject<{
1362
+ _creationTime: number;
1363
+ _id: import("convex/values").GenericId<"recoveryClaims">;
1364
+ accountId: string;
1365
+ amountDue: number;
1366
+ claimKey: string;
1367
+ collectedAmount: number;
1368
+ currency: string;
1369
+ openingCollection?: {
1370
+ amountDue: number;
1371
+ collectedAmount: number;
1372
+ operationKey: string;
1373
+ revision: number;
1374
+ } | undefined;
1375
+ outstanding: number;
1376
+ reservedAmount: number;
1377
+ revision: number;
1378
+ scopeKey: string;
1379
+ sign: "negative" | "positive" | "zero";
1380
+ sourceChargeId: string;
1381
+ sourceGross: number;
1382
+ sourceProcessingFee: number;
1383
+ } | undefined, {
1384
+ accountId: import("convex/values").VString<string, "required">;
1385
+ scopeKey: import("convex/values").VString<string, "required">;
1386
+ currency: import("convex/values").VString<string, "required">;
1387
+ claimKey: import("convex/values").VString<string, "required">;
1388
+ sourceChargeId: import("convex/values").VString<string, "required">;
1389
+ sourceGross: import("convex/values").VFloat64<number, "required">;
1390
+ sourceProcessingFee: import("convex/values").VFloat64<number, "required">;
1391
+ amountDue: import("convex/values").VFloat64<number, "required">;
1392
+ revision: import("convex/values").VFloat64<number, "required">;
1393
+ collectedAmount: import("convex/values").VFloat64<number, "required">;
1394
+ reservedAmount: import("convex/values").VFloat64<number, "required">;
1395
+ outstanding: import("convex/values").VFloat64<number, "required">;
1396
+ sign: import("convex/values").VUnion<"negative" | "positive" | "zero", [import("convex/values").VLiteral<"positive", "required">, import("convex/values").VLiteral<"negative", "required">, import("convex/values").VLiteral<"zero", "required">], "required", never>;
1397
+ openingCollection: import("convex/values").VObject<{
1398
+ amountDue: number;
1399
+ collectedAmount: number;
1400
+ operationKey: string;
1401
+ revision: number;
1402
+ } | undefined, {
1403
+ operationKey: import("convex/values").VString<string, "required">;
1404
+ amountDue: import("convex/values").VFloat64<number, "required">;
1405
+ revision: import("convex/values").VFloat64<number, "required">;
1406
+ collectedAmount: import("convex/values").VFloat64<number, "required">;
1407
+ }, "optional", "amountDue" | "collectedAmount" | "operationKey" | "revision">;
1408
+ _id: import("convex/values").VId<import("convex/values").GenericId<"recoveryClaims">, "required">;
1409
+ _creationTime: import("convex/values").VFloat64<number, "required">;
1410
+ }, "optional", "_creationTime" | "_id" | "accountId" | "amountDue" | "claimKey" | "collectedAmount" | "currency" | "openingCollection" | "openingCollection.amountDue" | "openingCollection.collectedAmount" | "openingCollection.operationKey" | "openingCollection.revision" | "outstanding" | "reservedAmount" | "revision" | "scopeKey" | "sign" | "sourceChargeId" | "sourceGross" | "sourceProcessingFee">;
1411
+ deficit: import("convex/values").VObject<{
1412
+ amountDue: number;
1413
+ currency: string;
1414
+ disputeLiability: number;
1415
+ processingLiability: number;
1416
+ retainedFee: number;
1417
+ }, {
1418
+ currency: import("convex/values").VString<string, "required">;
1419
+ retainedFee: import("convex/values").VFloat64<number, "required">;
1420
+ processingLiability: import("convex/values").VFloat64<number, "required">;
1421
+ disputeLiability: import("convex/values").VFloat64<number, "required">;
1422
+ amountDue: import("convex/values").VFloat64<number, "required">;
1423
+ }, "required", "amountDue" | "currency" | "disputeLiability" | "processingLiability" | "retainedFee">;
1424
+ observation: import("convex/values").VObject<{
1425
+ currency: string;
1426
+ disputeFees: number;
1427
+ gross: number;
1428
+ originalProcessingFee: number;
1429
+ paymentIntentId: string;
1430
+ principalReturned: number;
1431
+ processingFee: number;
1432
+ provenance: {
1433
+ customerAccountId: string;
1434
+ invoiceId: string;
1435
+ invoicePaymentId: string;
1436
+ recoveryInvoiceItemId?: string | undefined;
1437
+ stripePriceId?: string | undefined;
1438
+ stripeProductId?: string | undefined;
1439
+ subscriptionId?: string | undefined;
1440
+ };
1441
+ sourceChargeId: string;
1442
+ }, {
1443
+ paymentIntentId: import("convex/values").VString<string, "required">;
1444
+ sourceChargeId: import("convex/values").VString<string, "required">;
1445
+ currency: import("convex/values").VString<string, "required">;
1446
+ gross: import("convex/values").VFloat64<number, "required">;
1447
+ originalProcessingFee: import("convex/values").VFloat64<number, "required">;
1448
+ processingFee: import("convex/values").VFloat64<number, "required">;
1449
+ disputeFees: import("convex/values").VFloat64<number, "required">;
1450
+ principalReturned: import("convex/values").VFloat64<number, "required">;
1451
+ provenance: import("convex/values").VObject<{
1452
+ customerAccountId: string;
1453
+ invoiceId: string;
1454
+ invoicePaymentId: string;
1455
+ recoveryInvoiceItemId?: string | undefined;
1456
+ stripePriceId?: string | undefined;
1457
+ stripeProductId?: string | undefined;
1458
+ subscriptionId?: string | undefined;
1459
+ }, {
1460
+ invoiceId: import("convex/values").VString<string, "required">;
1461
+ invoicePaymentId: import("convex/values").VString<string, "required">;
1462
+ recoveryInvoiceItemId: import("convex/values").VString<string | undefined, "optional">;
1463
+ customerAccountId: import("convex/values").VString<string, "required">;
1464
+ subscriptionId: import("convex/values").VString<string | undefined, "optional">;
1465
+ stripePriceId: import("convex/values").VString<string | undefined, "optional">;
1466
+ stripeProductId: import("convex/values").VString<string | undefined, "optional">;
1467
+ }, "required", "customerAccountId" | "invoiceId" | "invoicePaymentId" | "recoveryInvoiceItemId" | "stripePriceId" | "stripeProductId" | "subscriptionId">;
1468
+ }, "required", "currency" | "disputeFees" | "gross" | "originalProcessingFee" | "paymentIntentId" | "principalReturned" | "processingFee" | "provenance" | "provenance.customerAccountId" | "provenance.invoiceId" | "provenance.invoicePaymentId" | "provenance.recoveryInvoiceItemId" | "provenance.stripePriceId" | "provenance.stripeProductId" | "provenance.subscriptionId" | "sourceChargeId">;
1469
+ }, "optional", "claim" | "claim._creationTime" | "claim._id" | "claim.accountId" | "claim.amountDue" | "claim.claimKey" | "claim.collectedAmount" | "claim.currency" | "claim.openingCollection" | "claim.openingCollection.amountDue" | "claim.openingCollection.collectedAmount" | "claim.openingCollection.operationKey" | "claim.openingCollection.revision" | "claim.outstanding" | "claim.reservedAmount" | "claim.revision" | "claim.scopeKey" | "claim.sign" | "claim.sourceChargeId" | "claim.sourceGross" | "claim.sourceProcessingFee" | "deficit" | "deficit.amountDue" | "deficit.currency" | "deficit.disputeLiability" | "deficit.processingLiability" | "deficit.retainedFee" | "observation" | "observation.currency" | "observation.disputeFees" | "observation.gross" | "observation.originalProcessingFee" | "observation.paymentIntentId" | "observation.principalReturned" | "observation.processingFee" | "observation.provenance" | "observation.provenance.customerAccountId" | "observation.provenance.invoiceId" | "observation.provenance.invoicePaymentId" | "observation.provenance.recoveryInvoiceItemId" | "observation.provenance.stripePriceId" | "observation.provenance.stripeProductId" | "observation.provenance.subscriptionId" | "observation.sourceChargeId" | "rollbackClaim" | "rollbackClaim._creationTime" | "rollbackClaim._id" | "rollbackClaim.accountId" | "rollbackClaim.amountDue" | "rollbackClaim.claimKey" | "rollbackClaim.collectedAmount" | "rollbackClaim.currency" | "rollbackClaim.openingCollection" | "rollbackClaim.openingCollection.amountDue" | "rollbackClaim.openingCollection.collectedAmount" | "rollbackClaim.openingCollection.operationKey" | "rollbackClaim.openingCollection.revision" | "rollbackClaim.outstanding" | "rollbackClaim.reservedAmount" | "rollbackClaim.revision" | "rollbackClaim.scopeKey" | "rollbackClaim.sign" | "rollbackClaim.sourceChargeId" | "rollbackClaim.sourceGross" | "rollbackClaim.sourceProcessingFee">;
1470
+ }, "required", "accountId" | "claimKey" | "currency" | "definitionVersion" | "expectedRevision" | "failure" | "failure.reason" | "failure.retryable" | "failure.status" | "importHook" | "maxAttempts" | "policy" | "policy.liability" | "policy.liability.disputeCosts" | "policy.liability.processingCosts" | "policy.rounding" | "policy.sellingFee" | "projection" | "provider" | "providerApiVersion" | "requestKey" | "result" | "result.claim" | "result.claim._creationTime" | "result.claim._id" | "result.claim.accountId" | "result.claim.amountDue" | "result.claim.claimKey" | "result.claim.collectedAmount" | "result.claim.currency" | "result.claim.openingCollection" | "result.claim.openingCollection.amountDue" | "result.claim.openingCollection.collectedAmount" | "result.claim.openingCollection.operationKey" | "result.claim.openingCollection.revision" | "result.claim.outstanding" | "result.claim.reservedAmount" | "result.claim.revision" | "result.claim.scopeKey" | "result.claim.sign" | "result.claim.sourceChargeId" | "result.claim.sourceGross" | "result.claim.sourceProcessingFee" | "result.deficit" | "result.deficit.amountDue" | "result.deficit.currency" | "result.deficit.disputeLiability" | "result.deficit.processingLiability" | "result.deficit.retainedFee" | "result.observation" | "result.observation.currency" | "result.observation.disputeFees" | "result.observation.gross" | "result.observation.originalProcessingFee" | "result.observation.paymentIntentId" | "result.observation.principalReturned" | "result.observation.processingFee" | "result.observation.provenance" | "result.observation.provenance.customerAccountId" | "result.observation.provenance.invoiceId" | "result.observation.provenance.invoicePaymentId" | "result.observation.provenance.recoveryInvoiceItemId" | "result.observation.provenance.stripePriceId" | "result.observation.provenance.stripeProductId" | "result.observation.provenance.subscriptionId" | "result.observation.sourceChargeId" | "result.rollbackClaim" | "result.rollbackClaim._creationTime" | "result.rollbackClaim._id" | "result.rollbackClaim.accountId" | "result.rollbackClaim.amountDue" | "result.rollbackClaim.claimKey" | "result.rollbackClaim.collectedAmount" | "result.rollbackClaim.currency" | "result.rollbackClaim.openingCollection" | "result.rollbackClaim.openingCollection.amountDue" | "result.rollbackClaim.openingCollection.collectedAmount" | "result.rollbackClaim.openingCollection.operationKey" | "result.rollbackClaim.openingCollection.revision" | "result.rollbackClaim.outstanding" | "result.rollbackClaim.reservedAmount" | "result.rollbackClaim.revision" | "result.rollbackClaim.scopeKey" | "result.rollbackClaim.sign" | "result.rollbackClaim.sourceChargeId" | "result.rollbackClaim.sourceGross" | "result.rollbackClaim.sourceProcessingFee" | "retryDelayMs" | "rollback" | "rollback.expectedRevision" | "rollback.groupKey" | "scopeKey" | "source" | "source.customerAccountId" | "source.gross" | "source.groupKey" | "source.invoiceId" | "source.kind" | "source.paymentIntentId" | "source.stripeAccountId" | "source.stripePriceId" | "source.stripeProductId" | "source.subscriptionId" | "status" | "version" | "workflowId">, {
1471
+ by_claim_status: ["claimKey", "status", "_creationTime"];
1472
+ by_payment_scope: ["accountId", "scopeKey", "currency", "source.paymentIntentId", "_creationTime"];
1473
+ by_request: ["requestKey", "_creationTime"];
1474
+ }, {}, {}>;
1475
+ export declare const refFields: {
1476
+ accountId: import("convex/values").VString<string, "required">;
1477
+ scopeKey: import("convex/values").VString<string, "required">;
1478
+ currency: import("convex/values").VString<string, "required">;
1479
+ operationId: import("convex/values").VId<import("convex/values").GenericId<"processingCostReconciliationOperations">, "required">;
1480
+ version: import("convex/values").VFloat64<number, "required">;
1481
+ };
1482
+ export declare const operationDoc: import("convex/values").VObject<{
1483
+ _creationTime: number;
1484
+ _id: import("convex/values").GenericId<"processingCostReconciliationOperations">;
1485
+ accountId: string;
1486
+ claimKey: string;
1487
+ currency: string;
1488
+ definitionVersion: number;
1489
+ expectedRevision: number;
1490
+ failure?: {
1491
+ reason: "fee_pending" | "history_incomplete" | "provider_pending";
1492
+ retryable: true;
1493
+ status: "not_ready";
1494
+ } | {
1495
+ reason: "identity_changed" | "revision_changed" | "scope_busy";
1496
+ retryable: false;
1497
+ status: "conflict";
1498
+ } | {
1499
+ reason: "currency_mismatch" | "invalid_scope" | "payment_not_payable" | "policy_invalid" | "unsupported_source";
1500
+ retryable: false;
1501
+ status: "rejected";
1502
+ } | {
1503
+ reason: "history_incomplete" | "provider_outcome_unknown";
1504
+ retryable: false;
1505
+ status: "unknown";
1506
+ } | undefined;
1507
+ importHook?: string | undefined;
1508
+ maxAttempts: number;
1509
+ policy: {
1510
+ liability: {
1511
+ disputeCosts: "all" | "none";
1512
+ processingCosts: "all" | "none" | "uncovered";
1513
+ };
1514
+ rounding: "ceil" | "floor" | "nearest";
1515
+ sellingFee: number;
1516
+ };
1517
+ projection?: string | undefined;
1518
+ provider: string;
1519
+ providerApiVersion: string;
1520
+ requestKey: string;
1521
+ result?: {
1522
+ claim: {
1523
+ _creationTime: number;
1524
+ _id: import("convex/values").GenericId<"recoveryClaims">;
1525
+ accountId: string;
1526
+ amountDue: number;
1527
+ claimKey: string;
1528
+ collectedAmount: number;
1529
+ currency: string;
1530
+ openingCollection?: {
1531
+ amountDue: number;
1532
+ collectedAmount: number;
1533
+ operationKey: string;
1534
+ revision: number;
1535
+ } | undefined;
1536
+ outstanding: number;
1537
+ reservedAmount: number;
1538
+ revision: number;
1539
+ scopeKey: string;
1540
+ sign: "negative" | "positive" | "zero";
1541
+ sourceChargeId: string;
1542
+ sourceGross: number;
1543
+ sourceProcessingFee: number;
1544
+ };
1545
+ deficit: {
1546
+ amountDue: number;
1547
+ currency: string;
1548
+ disputeLiability: number;
1549
+ processingLiability: number;
1550
+ retainedFee: number;
1551
+ };
1552
+ observation: {
1553
+ currency: string;
1554
+ disputeFees: number;
1555
+ gross: number;
1556
+ originalProcessingFee: number;
1557
+ paymentIntentId: string;
1558
+ principalReturned: number;
1559
+ processingFee: number;
1560
+ provenance: {
1561
+ customerAccountId: string;
1562
+ invoiceId: string;
1563
+ invoicePaymentId: string;
1564
+ recoveryInvoiceItemId?: string | undefined;
1565
+ stripePriceId?: string | undefined;
1566
+ stripeProductId?: string | undefined;
1567
+ subscriptionId?: string | undefined;
1568
+ };
1569
+ sourceChargeId: string;
1570
+ };
1571
+ rollbackClaim?: {
1572
+ _creationTime: number;
1573
+ _id: import("convex/values").GenericId<"recoveryClaims">;
1574
+ accountId: string;
1575
+ amountDue: number;
1576
+ claimKey: string;
1577
+ collectedAmount: number;
1578
+ currency: string;
1579
+ openingCollection?: {
1580
+ amountDue: number;
1581
+ collectedAmount: number;
1582
+ operationKey: string;
1583
+ revision: number;
1584
+ } | undefined;
1585
+ outstanding: number;
1586
+ reservedAmount: number;
1587
+ revision: number;
1588
+ scopeKey: string;
1589
+ sign: "negative" | "positive" | "zero";
1590
+ sourceChargeId: string;
1591
+ sourceGross: number;
1592
+ sourceProcessingFee: number;
1593
+ } | undefined;
1594
+ } | undefined;
1595
+ retryDelayMs: number;
1596
+ rollback?: {
1597
+ expectedRevision: number;
1598
+ groupKey: string;
1599
+ } | undefined;
1600
+ scopeKey: string;
1601
+ source: {
1602
+ customerAccountId: string;
1603
+ gross: number;
1604
+ invoiceId?: string | undefined;
1605
+ kind: "sale";
1606
+ paymentIntentId: string;
1607
+ stripeAccountId?: string | undefined;
1608
+ stripePriceId?: string | undefined;
1609
+ stripeProductId?: string | undefined;
1610
+ subscriptionId?: string | undefined;
1611
+ } | {
1612
+ gross: number;
1613
+ groupKey: string;
1614
+ kind: "invoice_recovery";
1615
+ paymentIntentId: string;
1616
+ };
1617
+ status: "completed" | "conflict" | "queued" | "rejected" | "running" | "unknown" | "waiting";
1618
+ version: number;
1619
+ workflowId?: string | undefined;
1620
+ }, {
1621
+ accountId: import("convex/values").VString<string, "required">;
1622
+ scopeKey: import("convex/values").VString<string, "required">;
1623
+ currency: import("convex/values").VString<string, "required">;
1624
+ claimKey: import("convex/values").VString<string, "required">;
1625
+ source: import("convex/values").VUnion<{
1626
+ customerAccountId: string;
1627
+ gross: number;
1628
+ invoiceId?: string | undefined;
1629
+ kind: "sale";
1630
+ paymentIntentId: string;
1631
+ stripeAccountId?: string | undefined;
1632
+ stripePriceId?: string | undefined;
1633
+ stripeProductId?: string | undefined;
1634
+ subscriptionId?: string | undefined;
1635
+ } | {
1636
+ gross: number;
1637
+ groupKey: string;
1638
+ kind: "invoice_recovery";
1639
+ paymentIntentId: string;
1640
+ }, [import("convex/values").VObject<{
1641
+ customerAccountId: string;
1642
+ gross: number;
1643
+ invoiceId?: string | undefined;
1644
+ kind: "sale";
1645
+ paymentIntentId: string;
1646
+ stripeAccountId?: string | undefined;
1647
+ stripePriceId?: string | undefined;
1648
+ stripeProductId?: string | undefined;
1649
+ subscriptionId?: string | undefined;
1650
+ }, {
1651
+ kind: import("convex/values").VLiteral<"sale", "required">;
1652
+ paymentIntentId: import("convex/values").VString<string, "required">;
1653
+ gross: import("convex/values").VFloat64<number, "required">;
1654
+ customerAccountId: import("convex/values").VString<string, "required">;
1655
+ invoiceId: import("convex/values").VString<string | undefined, "optional">;
1656
+ subscriptionId: import("convex/values").VString<string | undefined, "optional">;
1657
+ stripeAccountId: import("convex/values").VString<string | undefined, "optional">;
1658
+ stripePriceId: import("convex/values").VString<string | undefined, "optional">;
1659
+ stripeProductId: import("convex/values").VString<string | undefined, "optional">;
1660
+ }, "required", "customerAccountId" | "gross" | "invoiceId" | "kind" | "paymentIntentId" | "stripeAccountId" | "stripePriceId" | "stripeProductId" | "subscriptionId">, import("convex/values").VObject<{
1661
+ gross: number;
1662
+ groupKey: string;
1663
+ kind: "invoice_recovery";
1664
+ paymentIntentId: string;
1665
+ }, {
1666
+ kind: import("convex/values").VLiteral<"invoice_recovery", "required">;
1667
+ paymentIntentId: import("convex/values").VString<string, "required">;
1668
+ gross: import("convex/values").VFloat64<number, "required">;
1669
+ groupKey: import("convex/values").VString<string, "required">;
1670
+ }, "required", "gross" | "groupKey" | "kind" | "paymentIntentId">], "required", "customerAccountId" | "gross" | "groupKey" | "invoiceId" | "kind" | "paymentIntentId" | "stripeAccountId" | "stripePriceId" | "stripeProductId" | "subscriptionId">;
1671
+ policy: import("convex/values").VObject<{
1672
+ liability: {
1673
+ disputeCosts: "all" | "none";
1674
+ processingCosts: "all" | "none" | "uncovered";
1675
+ };
1676
+ rounding: "ceil" | "floor" | "nearest";
1677
+ sellingFee: number;
1678
+ }, {
1679
+ sellingFee: import("convex/values").VFloat64<number, "required">;
1680
+ liability: import("convex/values").VObject<{
1681
+ disputeCosts: "all" | "none";
1682
+ processingCosts: "all" | "none" | "uncovered";
1683
+ }, {
1684
+ processingCosts: import("convex/values").VUnion<"all" | "none" | "uncovered", [import("convex/values").VLiteral<"uncovered", "required">, import("convex/values").VLiteral<"all", "required">, import("convex/values").VLiteral<"none", "required">], "required", never>;
1685
+ disputeCosts: import("convex/values").VUnion<"all" | "none", [import("convex/values").VLiteral<"all", "required">, import("convex/values").VLiteral<"none", "required">], "required", never>;
1686
+ }, "required", "disputeCosts" | "processingCosts">;
1687
+ rounding: import("convex/values").VUnion<"ceil" | "floor" | "nearest", [import("convex/values").VLiteral<"nearest", "required">, import("convex/values").VLiteral<"floor", "required">, import("convex/values").VLiteral<"ceil", "required">], "required", never>;
1688
+ }, "required", "liability" | "liability.disputeCosts" | "liability.processingCosts" | "rounding" | "sellingFee">;
1689
+ expectedRevision: import("convex/values").VFloat64<number, "required">;
1690
+ rollback: import("convex/values").VObject<{
1691
+ expectedRevision: number;
1692
+ groupKey: string;
1693
+ } | undefined, {
1694
+ groupKey: import("convex/values").VString<string, "required">;
1695
+ expectedRevision: import("convex/values").VFloat64<number, "required">;
1696
+ }, "optional", "expectedRevision" | "groupKey">;
1697
+ provider: import("convex/values").VString<string, "required">;
1698
+ projection: import("convex/values").VString<string | undefined, "optional">;
1699
+ importHook: import("convex/values").VString<string | undefined, "optional">;
1700
+ providerApiVersion: import("convex/values").VString<string, "required">;
1701
+ definitionVersion: import("convex/values").VFloat64<number, "required">;
1702
+ maxAttempts: import("convex/values").VFloat64<number, "required">;
1703
+ retryDelayMs: import("convex/values").VFloat64<number, "required">;
1704
+ requestKey: import("convex/values").VString<string, "required">;
1705
+ version: import("convex/values").VFloat64<number, "required">;
1706
+ workflowId: import("convex/values").VString<string | undefined, "optional">;
1707
+ status: import("convex/values").VUnion<"completed" | "conflict" | "queued" | "rejected" | "running" | "unknown" | "waiting", [import("convex/values").VLiteral<"queued", "required">, import("convex/values").VLiteral<"running", "required">, import("convex/values").VLiteral<"waiting", "required">, import("convex/values").VLiteral<"completed", "required">, import("convex/values").VLiteral<"conflict", "required">, import("convex/values").VLiteral<"rejected", "required">, import("convex/values").VLiteral<"unknown", "required">], "required", never>;
1708
+ failure: import("convex/values").VUnion<{
1709
+ reason: "fee_pending" | "history_incomplete" | "provider_pending";
1710
+ retryable: true;
1711
+ status: "not_ready";
1712
+ } | {
1713
+ reason: "identity_changed" | "revision_changed" | "scope_busy";
1714
+ retryable: false;
1715
+ status: "conflict";
1716
+ } | {
1717
+ reason: "currency_mismatch" | "invalid_scope" | "payment_not_payable" | "policy_invalid" | "unsupported_source";
1718
+ retryable: false;
1719
+ status: "rejected";
1720
+ } | {
1721
+ reason: "history_incomplete" | "provider_outcome_unknown";
1722
+ retryable: false;
1723
+ status: "unknown";
1724
+ } | undefined, [import("convex/values").VObject<{
1725
+ reason: "fee_pending" | "history_incomplete" | "provider_pending";
1726
+ retryable: true;
1727
+ status: "not_ready";
1728
+ }, {
1729
+ status: import("convex/values").VLiteral<"not_ready", "required">;
1730
+ reason: import("convex/values").VUnion<"fee_pending" | "history_incomplete" | "provider_pending", [import("convex/values").VLiteral<"provider_pending", "required">, import("convex/values").VLiteral<"fee_pending", "required">, import("convex/values").VLiteral<"history_incomplete", "required">], "required", never>;
1731
+ retryable: import("convex/values").VLiteral<true, "required">;
1732
+ }, "required", "reason" | "retryable" | "status">, import("convex/values").VObject<{
1733
+ reason: "identity_changed" | "revision_changed" | "scope_busy";
1734
+ retryable: false;
1735
+ status: "conflict";
1736
+ }, {
1737
+ status: import("convex/values").VLiteral<"conflict", "required">;
1738
+ reason: import("convex/values").VUnion<"identity_changed" | "revision_changed" | "scope_busy", [import("convex/values").VLiteral<"scope_busy", "required">, import("convex/values").VLiteral<"revision_changed", "required">, import("convex/values").VLiteral<"identity_changed", "required">], "required", never>;
1739
+ retryable: import("convex/values").VLiteral<false, "required">;
1740
+ }, "required", "reason" | "retryable" | "status">, import("convex/values").VObject<{
1741
+ reason: "currency_mismatch" | "invalid_scope" | "payment_not_payable" | "policy_invalid" | "unsupported_source";
1742
+ retryable: false;
1743
+ status: "rejected";
1744
+ }, {
1745
+ status: import("convex/values").VLiteral<"rejected", "required">;
1746
+ reason: import("convex/values").VUnion<"currency_mismatch" | "invalid_scope" | "payment_not_payable" | "policy_invalid" | "unsupported_source", [import("convex/values").VLiteral<"invalid_scope", "required">, import("convex/values").VLiteral<"unsupported_source", "required">, import("convex/values").VLiteral<"policy_invalid", "required">, import("convex/values").VLiteral<"payment_not_payable", "required">, import("convex/values").VLiteral<"currency_mismatch", "required">], "required", never>;
1747
+ retryable: import("convex/values").VLiteral<false, "required">;
1748
+ }, "required", "reason" | "retryable" | "status">, import("convex/values").VObject<{
1749
+ reason: "history_incomplete" | "provider_outcome_unknown";
1750
+ retryable: false;
1751
+ status: "unknown";
1752
+ }, {
1753
+ status: import("convex/values").VLiteral<"unknown", "required">;
1754
+ reason: import("convex/values").VUnion<"history_incomplete" | "provider_outcome_unknown", [import("convex/values").VLiteral<"provider_outcome_unknown", "required">, import("convex/values").VLiteral<"history_incomplete", "required">], "required", never>;
1755
+ retryable: import("convex/values").VLiteral<false, "required">;
1756
+ }, "required", "reason" | "retryable" | "status">], "optional", "reason" | "retryable" | "status">;
1757
+ result: import("convex/values").VObject<{
1758
+ claim: {
1759
+ _creationTime: number;
1760
+ _id: import("convex/values").GenericId<"recoveryClaims">;
1761
+ accountId: string;
1762
+ amountDue: number;
1763
+ claimKey: string;
1764
+ collectedAmount: number;
1765
+ currency: string;
1766
+ openingCollection?: {
1767
+ amountDue: number;
1768
+ collectedAmount: number;
1769
+ operationKey: string;
1770
+ revision: number;
1771
+ } | undefined;
1772
+ outstanding: number;
1773
+ reservedAmount: number;
1774
+ revision: number;
1775
+ scopeKey: string;
1776
+ sign: "negative" | "positive" | "zero";
1777
+ sourceChargeId: string;
1778
+ sourceGross: number;
1779
+ sourceProcessingFee: number;
1780
+ };
1781
+ deficit: {
1782
+ amountDue: number;
1783
+ currency: string;
1784
+ disputeLiability: number;
1785
+ processingLiability: number;
1786
+ retainedFee: number;
1787
+ };
1788
+ observation: {
1789
+ currency: string;
1790
+ disputeFees: number;
1791
+ gross: number;
1792
+ originalProcessingFee: number;
1793
+ paymentIntentId: string;
1794
+ principalReturned: number;
1795
+ processingFee: number;
1796
+ provenance: {
1797
+ customerAccountId: string;
1798
+ invoiceId: string;
1799
+ invoicePaymentId: string;
1800
+ recoveryInvoiceItemId?: string | undefined;
1801
+ stripePriceId?: string | undefined;
1802
+ stripeProductId?: string | undefined;
1803
+ subscriptionId?: string | undefined;
1804
+ };
1805
+ sourceChargeId: string;
1806
+ };
1807
+ rollbackClaim?: {
1808
+ _creationTime: number;
1809
+ _id: import("convex/values").GenericId<"recoveryClaims">;
1810
+ accountId: string;
1811
+ amountDue: number;
1812
+ claimKey: string;
1813
+ collectedAmount: number;
1814
+ currency: string;
1815
+ openingCollection?: {
1816
+ amountDue: number;
1817
+ collectedAmount: number;
1818
+ operationKey: string;
1819
+ revision: number;
1820
+ } | undefined;
1821
+ outstanding: number;
1822
+ reservedAmount: number;
1823
+ revision: number;
1824
+ scopeKey: string;
1825
+ sign: "negative" | "positive" | "zero";
1826
+ sourceChargeId: string;
1827
+ sourceGross: number;
1828
+ sourceProcessingFee: number;
1829
+ } | undefined;
1830
+ } | undefined, {
1831
+ claim: import("convex/values").VObject<{
1832
+ _creationTime: number;
1833
+ _id: import("convex/values").GenericId<"recoveryClaims">;
1834
+ accountId: string;
1835
+ amountDue: number;
1836
+ claimKey: string;
1837
+ collectedAmount: number;
1838
+ currency: string;
1839
+ openingCollection?: {
1840
+ amountDue: number;
1841
+ collectedAmount: number;
1842
+ operationKey: string;
1843
+ revision: number;
1844
+ } | undefined;
1845
+ outstanding: number;
1846
+ reservedAmount: number;
1847
+ revision: number;
1848
+ scopeKey: string;
1849
+ sign: "negative" | "positive" | "zero";
1850
+ sourceChargeId: string;
1851
+ sourceGross: number;
1852
+ sourceProcessingFee: number;
1853
+ }, {
1854
+ accountId: import("convex/values").VString<string, "required">;
1855
+ scopeKey: import("convex/values").VString<string, "required">;
1856
+ currency: import("convex/values").VString<string, "required">;
1857
+ claimKey: import("convex/values").VString<string, "required">;
1858
+ sourceChargeId: import("convex/values").VString<string, "required">;
1859
+ sourceGross: import("convex/values").VFloat64<number, "required">;
1860
+ sourceProcessingFee: import("convex/values").VFloat64<number, "required">;
1861
+ amountDue: import("convex/values").VFloat64<number, "required">;
1862
+ revision: import("convex/values").VFloat64<number, "required">;
1863
+ collectedAmount: import("convex/values").VFloat64<number, "required">;
1864
+ reservedAmount: import("convex/values").VFloat64<number, "required">;
1865
+ outstanding: import("convex/values").VFloat64<number, "required">;
1866
+ sign: import("convex/values").VUnion<"negative" | "positive" | "zero", [import("convex/values").VLiteral<"positive", "required">, import("convex/values").VLiteral<"negative", "required">, import("convex/values").VLiteral<"zero", "required">], "required", never>;
1867
+ openingCollection: import("convex/values").VObject<{
1868
+ amountDue: number;
1869
+ collectedAmount: number;
1870
+ operationKey: string;
1871
+ revision: number;
1872
+ } | undefined, {
1873
+ operationKey: import("convex/values").VString<string, "required">;
1874
+ amountDue: import("convex/values").VFloat64<number, "required">;
1875
+ revision: import("convex/values").VFloat64<number, "required">;
1876
+ collectedAmount: import("convex/values").VFloat64<number, "required">;
1877
+ }, "optional", "amountDue" | "collectedAmount" | "operationKey" | "revision">;
1878
+ _id: import("convex/values").VId<import("convex/values").GenericId<"recoveryClaims">, "required">;
1879
+ _creationTime: import("convex/values").VFloat64<number, "required">;
1880
+ }, "required", "_creationTime" | "_id" | "accountId" | "amountDue" | "claimKey" | "collectedAmount" | "currency" | "openingCollection" | "openingCollection.amountDue" | "openingCollection.collectedAmount" | "openingCollection.operationKey" | "openingCollection.revision" | "outstanding" | "reservedAmount" | "revision" | "scopeKey" | "sign" | "sourceChargeId" | "sourceGross" | "sourceProcessingFee">;
1881
+ rollbackClaim: import("convex/values").VObject<{
1882
+ _creationTime: number;
1883
+ _id: import("convex/values").GenericId<"recoveryClaims">;
1884
+ accountId: string;
1885
+ amountDue: number;
1886
+ claimKey: string;
1887
+ collectedAmount: number;
1888
+ currency: string;
1889
+ openingCollection?: {
1890
+ amountDue: number;
1891
+ collectedAmount: number;
1892
+ operationKey: string;
1893
+ revision: number;
1894
+ } | undefined;
1895
+ outstanding: number;
1896
+ reservedAmount: number;
1897
+ revision: number;
1898
+ scopeKey: string;
1899
+ sign: "negative" | "positive" | "zero";
1900
+ sourceChargeId: string;
1901
+ sourceGross: number;
1902
+ sourceProcessingFee: number;
1903
+ } | undefined, {
1904
+ accountId: import("convex/values").VString<string, "required">;
1905
+ scopeKey: import("convex/values").VString<string, "required">;
1906
+ currency: import("convex/values").VString<string, "required">;
1907
+ claimKey: import("convex/values").VString<string, "required">;
1908
+ sourceChargeId: import("convex/values").VString<string, "required">;
1909
+ sourceGross: import("convex/values").VFloat64<number, "required">;
1910
+ sourceProcessingFee: import("convex/values").VFloat64<number, "required">;
1911
+ amountDue: import("convex/values").VFloat64<number, "required">;
1912
+ revision: import("convex/values").VFloat64<number, "required">;
1913
+ collectedAmount: import("convex/values").VFloat64<number, "required">;
1914
+ reservedAmount: import("convex/values").VFloat64<number, "required">;
1915
+ outstanding: import("convex/values").VFloat64<number, "required">;
1916
+ sign: import("convex/values").VUnion<"negative" | "positive" | "zero", [import("convex/values").VLiteral<"positive", "required">, import("convex/values").VLiteral<"negative", "required">, import("convex/values").VLiteral<"zero", "required">], "required", never>;
1917
+ openingCollection: import("convex/values").VObject<{
1918
+ amountDue: number;
1919
+ collectedAmount: number;
1920
+ operationKey: string;
1921
+ revision: number;
1922
+ } | undefined, {
1923
+ operationKey: import("convex/values").VString<string, "required">;
1924
+ amountDue: import("convex/values").VFloat64<number, "required">;
1925
+ revision: import("convex/values").VFloat64<number, "required">;
1926
+ collectedAmount: import("convex/values").VFloat64<number, "required">;
1927
+ }, "optional", "amountDue" | "collectedAmount" | "operationKey" | "revision">;
1928
+ _id: import("convex/values").VId<import("convex/values").GenericId<"recoveryClaims">, "required">;
1929
+ _creationTime: import("convex/values").VFloat64<number, "required">;
1930
+ }, "optional", "_creationTime" | "_id" | "accountId" | "amountDue" | "claimKey" | "collectedAmount" | "currency" | "openingCollection" | "openingCollection.amountDue" | "openingCollection.collectedAmount" | "openingCollection.operationKey" | "openingCollection.revision" | "outstanding" | "reservedAmount" | "revision" | "scopeKey" | "sign" | "sourceChargeId" | "sourceGross" | "sourceProcessingFee">;
1931
+ deficit: import("convex/values").VObject<{
1932
+ amountDue: number;
1933
+ currency: string;
1934
+ disputeLiability: number;
1935
+ processingLiability: number;
1936
+ retainedFee: number;
1937
+ }, {
1938
+ currency: import("convex/values").VString<string, "required">;
1939
+ retainedFee: import("convex/values").VFloat64<number, "required">;
1940
+ processingLiability: import("convex/values").VFloat64<number, "required">;
1941
+ disputeLiability: import("convex/values").VFloat64<number, "required">;
1942
+ amountDue: import("convex/values").VFloat64<number, "required">;
1943
+ }, "required", "amountDue" | "currency" | "disputeLiability" | "processingLiability" | "retainedFee">;
1944
+ observation: import("convex/values").VObject<{
1945
+ currency: string;
1946
+ disputeFees: number;
1947
+ gross: number;
1948
+ originalProcessingFee: number;
1949
+ paymentIntentId: string;
1950
+ principalReturned: number;
1951
+ processingFee: number;
1952
+ provenance: {
1953
+ customerAccountId: string;
1954
+ invoiceId: string;
1955
+ invoicePaymentId: string;
1956
+ recoveryInvoiceItemId?: string | undefined;
1957
+ stripePriceId?: string | undefined;
1958
+ stripeProductId?: string | undefined;
1959
+ subscriptionId?: string | undefined;
1960
+ };
1961
+ sourceChargeId: string;
1962
+ }, {
1963
+ paymentIntentId: import("convex/values").VString<string, "required">;
1964
+ sourceChargeId: import("convex/values").VString<string, "required">;
1965
+ currency: import("convex/values").VString<string, "required">;
1966
+ gross: import("convex/values").VFloat64<number, "required">;
1967
+ originalProcessingFee: import("convex/values").VFloat64<number, "required">;
1968
+ processingFee: import("convex/values").VFloat64<number, "required">;
1969
+ disputeFees: import("convex/values").VFloat64<number, "required">;
1970
+ principalReturned: import("convex/values").VFloat64<number, "required">;
1971
+ provenance: import("convex/values").VObject<{
1972
+ customerAccountId: string;
1973
+ invoiceId: string;
1974
+ invoicePaymentId: string;
1975
+ recoveryInvoiceItemId?: string | undefined;
1976
+ stripePriceId?: string | undefined;
1977
+ stripeProductId?: string | undefined;
1978
+ subscriptionId?: string | undefined;
1979
+ }, {
1980
+ invoiceId: import("convex/values").VString<string, "required">;
1981
+ invoicePaymentId: import("convex/values").VString<string, "required">;
1982
+ recoveryInvoiceItemId: import("convex/values").VString<string | undefined, "optional">;
1983
+ customerAccountId: import("convex/values").VString<string, "required">;
1984
+ subscriptionId: import("convex/values").VString<string | undefined, "optional">;
1985
+ stripePriceId: import("convex/values").VString<string | undefined, "optional">;
1986
+ stripeProductId: import("convex/values").VString<string | undefined, "optional">;
1987
+ }, "required", "customerAccountId" | "invoiceId" | "invoicePaymentId" | "recoveryInvoiceItemId" | "stripePriceId" | "stripeProductId" | "subscriptionId">;
1988
+ }, "required", "currency" | "disputeFees" | "gross" | "originalProcessingFee" | "paymentIntentId" | "principalReturned" | "processingFee" | "provenance" | "provenance.customerAccountId" | "provenance.invoiceId" | "provenance.invoicePaymentId" | "provenance.recoveryInvoiceItemId" | "provenance.stripePriceId" | "provenance.stripeProductId" | "provenance.subscriptionId" | "sourceChargeId">;
1989
+ }, "optional", "claim" | "claim._creationTime" | "claim._id" | "claim.accountId" | "claim.amountDue" | "claim.claimKey" | "claim.collectedAmount" | "claim.currency" | "claim.openingCollection" | "claim.openingCollection.amountDue" | "claim.openingCollection.collectedAmount" | "claim.openingCollection.operationKey" | "claim.openingCollection.revision" | "claim.outstanding" | "claim.reservedAmount" | "claim.revision" | "claim.scopeKey" | "claim.sign" | "claim.sourceChargeId" | "claim.sourceGross" | "claim.sourceProcessingFee" | "deficit" | "deficit.amountDue" | "deficit.currency" | "deficit.disputeLiability" | "deficit.processingLiability" | "deficit.retainedFee" | "observation" | "observation.currency" | "observation.disputeFees" | "observation.gross" | "observation.originalProcessingFee" | "observation.paymentIntentId" | "observation.principalReturned" | "observation.processingFee" | "observation.provenance" | "observation.provenance.customerAccountId" | "observation.provenance.invoiceId" | "observation.provenance.invoicePaymentId" | "observation.provenance.recoveryInvoiceItemId" | "observation.provenance.stripePriceId" | "observation.provenance.stripeProductId" | "observation.provenance.subscriptionId" | "observation.sourceChargeId" | "rollbackClaim" | "rollbackClaim._creationTime" | "rollbackClaim._id" | "rollbackClaim.accountId" | "rollbackClaim.amountDue" | "rollbackClaim.claimKey" | "rollbackClaim.collectedAmount" | "rollbackClaim.currency" | "rollbackClaim.openingCollection" | "rollbackClaim.openingCollection.amountDue" | "rollbackClaim.openingCollection.collectedAmount" | "rollbackClaim.openingCollection.operationKey" | "rollbackClaim.openingCollection.revision" | "rollbackClaim.outstanding" | "rollbackClaim.reservedAmount" | "rollbackClaim.revision" | "rollbackClaim.scopeKey" | "rollbackClaim.sign" | "rollbackClaim.sourceChargeId" | "rollbackClaim.sourceGross" | "rollbackClaim.sourceProcessingFee">;
1990
+ _id: import("convex/values").VId<import("convex/values").GenericId<"processingCostReconciliationOperations">, "required">;
1991
+ _creationTime: import("convex/values").VFloat64<number, "required">;
1992
+ }, "required", "_creationTime" | "_id" | "accountId" | "claimKey" | "currency" | "definitionVersion" | "expectedRevision" | "failure" | "failure.reason" | "failure.retryable" | "failure.status" | "importHook" | "maxAttempts" | "policy" | "policy.liability" | "policy.liability.disputeCosts" | "policy.liability.processingCosts" | "policy.rounding" | "policy.sellingFee" | "projection" | "provider" | "providerApiVersion" | "requestKey" | "result" | "result.claim" | "result.claim._creationTime" | "result.claim._id" | "result.claim.accountId" | "result.claim.amountDue" | "result.claim.claimKey" | "result.claim.collectedAmount" | "result.claim.currency" | "result.claim.openingCollection" | "result.claim.openingCollection.amountDue" | "result.claim.openingCollection.collectedAmount" | "result.claim.openingCollection.operationKey" | "result.claim.openingCollection.revision" | "result.claim.outstanding" | "result.claim.reservedAmount" | "result.claim.revision" | "result.claim.scopeKey" | "result.claim.sign" | "result.claim.sourceChargeId" | "result.claim.sourceGross" | "result.claim.sourceProcessingFee" | "result.deficit" | "result.deficit.amountDue" | "result.deficit.currency" | "result.deficit.disputeLiability" | "result.deficit.processingLiability" | "result.deficit.retainedFee" | "result.observation" | "result.observation.currency" | "result.observation.disputeFees" | "result.observation.gross" | "result.observation.originalProcessingFee" | "result.observation.paymentIntentId" | "result.observation.principalReturned" | "result.observation.processingFee" | "result.observation.provenance" | "result.observation.provenance.customerAccountId" | "result.observation.provenance.invoiceId" | "result.observation.provenance.invoicePaymentId" | "result.observation.provenance.recoveryInvoiceItemId" | "result.observation.provenance.stripePriceId" | "result.observation.provenance.stripeProductId" | "result.observation.provenance.subscriptionId" | "result.observation.sourceChargeId" | "result.rollbackClaim" | "result.rollbackClaim._creationTime" | "result.rollbackClaim._id" | "result.rollbackClaim.accountId" | "result.rollbackClaim.amountDue" | "result.rollbackClaim.claimKey" | "result.rollbackClaim.collectedAmount" | "result.rollbackClaim.currency" | "result.rollbackClaim.openingCollection" | "result.rollbackClaim.openingCollection.amountDue" | "result.rollbackClaim.openingCollection.collectedAmount" | "result.rollbackClaim.openingCollection.operationKey" | "result.rollbackClaim.openingCollection.revision" | "result.rollbackClaim.outstanding" | "result.rollbackClaim.reservedAmount" | "result.rollbackClaim.revision" | "result.rollbackClaim.scopeKey" | "result.rollbackClaim.sign" | "result.rollbackClaim.sourceChargeId" | "result.rollbackClaim.sourceGross" | "result.rollbackClaim.sourceProcessingFee" | "retryDelayMs" | "rollback" | "rollback.expectedRevision" | "rollback.groupKey" | "scopeKey" | "source" | "source.customerAccountId" | "source.gross" | "source.groupKey" | "source.invoiceId" | "source.kind" | "source.paymentIntentId" | "source.stripeAccountId" | "source.stripePriceId" | "source.stripeProductId" | "source.subscriptionId" | "status" | "version" | "workflowId">;
1993
+ export declare const safeStatus: import("convex/values").VUnion<{
1994
+ accountId: string;
1995
+ currency: string;
1996
+ operationId: import("convex/values").GenericId<"processingCostReconciliationOperations">;
1997
+ scopeKey: string;
1998
+ status: "queued" | "running";
1999
+ version: number;
2000
+ } | {
2001
+ accountId: string;
2002
+ currency: string;
2003
+ operationId: import("convex/values").GenericId<"processingCostReconciliationOperations">;
2004
+ result: {
2005
+ claim: {
2006
+ _creationTime: number;
2007
+ _id: import("convex/values").GenericId<"recoveryClaims">;
2008
+ accountId: string;
2009
+ amountDue: number;
2010
+ claimKey: string;
2011
+ collectedAmount: number;
2012
+ currency: string;
2013
+ openingCollection?: {
2014
+ amountDue: number;
2015
+ collectedAmount: number;
2016
+ operationKey: string;
2017
+ revision: number;
2018
+ } | undefined;
2019
+ outstanding: number;
2020
+ reservedAmount: number;
2021
+ revision: number;
2022
+ scopeKey: string;
2023
+ sign: "negative" | "positive" | "zero";
2024
+ sourceChargeId: string;
2025
+ sourceGross: number;
2026
+ sourceProcessingFee: number;
2027
+ };
2028
+ deficit: {
2029
+ amountDue: number;
2030
+ currency: string;
2031
+ disputeLiability: number;
2032
+ processingLiability: number;
2033
+ retainedFee: number;
2034
+ };
2035
+ observation: {
2036
+ currency: string;
2037
+ disputeFees: number;
2038
+ gross: number;
2039
+ originalProcessingFee: number;
2040
+ paymentIntentId: string;
2041
+ principalReturned: number;
2042
+ processingFee: number;
2043
+ provenance: {
2044
+ customerAccountId: string;
2045
+ invoiceId: string;
2046
+ invoicePaymentId: string;
2047
+ recoveryInvoiceItemId?: string | undefined;
2048
+ stripePriceId?: string | undefined;
2049
+ stripeProductId?: string | undefined;
2050
+ subscriptionId?: string | undefined;
2051
+ };
2052
+ sourceChargeId: string;
2053
+ };
2054
+ rollbackClaim?: {
2055
+ _creationTime: number;
2056
+ _id: import("convex/values").GenericId<"recoveryClaims">;
2057
+ accountId: string;
2058
+ amountDue: number;
2059
+ claimKey: string;
2060
+ collectedAmount: number;
2061
+ currency: string;
2062
+ openingCollection?: {
2063
+ amountDue: number;
2064
+ collectedAmount: number;
2065
+ operationKey: string;
2066
+ revision: number;
2067
+ } | undefined;
2068
+ outstanding: number;
2069
+ reservedAmount: number;
2070
+ revision: number;
2071
+ scopeKey: string;
2072
+ sign: "negative" | "positive" | "zero";
2073
+ sourceChargeId: string;
2074
+ sourceGross: number;
2075
+ sourceProcessingFee: number;
2076
+ } | undefined;
2077
+ };
2078
+ scopeKey: string;
2079
+ status: "completed";
2080
+ version: number;
2081
+ } | {
2082
+ accountId: string;
2083
+ currency: string;
2084
+ operationId: import("convex/values").GenericId<"processingCostReconciliationOperations">;
2085
+ reason: string;
2086
+ retryable: boolean;
2087
+ scopeKey: string;
2088
+ status: "conflict" | "not_ready" | "rejected" | "unknown";
2089
+ version: number;
2090
+ }, [import("convex/values").VObject<{
2091
+ accountId: string;
2092
+ currency: string;
2093
+ operationId: import("convex/values").GenericId<"processingCostReconciliationOperations">;
2094
+ scopeKey: string;
2095
+ status: "queued" | "running";
2096
+ version: number;
2097
+ }, {
2098
+ accountId: import("convex/values").VString<string, "required">;
2099
+ scopeKey: import("convex/values").VString<string, "required">;
2100
+ currency: import("convex/values").VString<string, "required">;
2101
+ operationId: import("convex/values").VId<import("convex/values").GenericId<"processingCostReconciliationOperations">, "required">;
2102
+ version: import("convex/values").VFloat64<number, "required">;
2103
+ status: import("convex/values").VUnion<"queued" | "running", [import("convex/values").VLiteral<"queued", "required">, import("convex/values").VLiteral<"running", "required">], "required", never>;
2104
+ }, "required", "accountId" | "currency" | "operationId" | "scopeKey" | "status" | "version">, import("convex/values").VObject<{
2105
+ accountId: string;
2106
+ currency: string;
2107
+ operationId: import("convex/values").GenericId<"processingCostReconciliationOperations">;
2108
+ result: {
2109
+ claim: {
2110
+ _creationTime: number;
2111
+ _id: import("convex/values").GenericId<"recoveryClaims">;
2112
+ accountId: string;
2113
+ amountDue: number;
2114
+ claimKey: string;
2115
+ collectedAmount: number;
2116
+ currency: string;
2117
+ openingCollection?: {
2118
+ amountDue: number;
2119
+ collectedAmount: number;
2120
+ operationKey: string;
2121
+ revision: number;
2122
+ } | undefined;
2123
+ outstanding: number;
2124
+ reservedAmount: number;
2125
+ revision: number;
2126
+ scopeKey: string;
2127
+ sign: "negative" | "positive" | "zero";
2128
+ sourceChargeId: string;
2129
+ sourceGross: number;
2130
+ sourceProcessingFee: number;
2131
+ };
2132
+ deficit: {
2133
+ amountDue: number;
2134
+ currency: string;
2135
+ disputeLiability: number;
2136
+ processingLiability: number;
2137
+ retainedFee: number;
2138
+ };
2139
+ observation: {
2140
+ currency: string;
2141
+ disputeFees: number;
2142
+ gross: number;
2143
+ originalProcessingFee: number;
2144
+ paymentIntentId: string;
2145
+ principalReturned: number;
2146
+ processingFee: number;
2147
+ provenance: {
2148
+ customerAccountId: string;
2149
+ invoiceId: string;
2150
+ invoicePaymentId: string;
2151
+ recoveryInvoiceItemId?: string | undefined;
2152
+ stripePriceId?: string | undefined;
2153
+ stripeProductId?: string | undefined;
2154
+ subscriptionId?: string | undefined;
2155
+ };
2156
+ sourceChargeId: string;
2157
+ };
2158
+ rollbackClaim?: {
2159
+ _creationTime: number;
2160
+ _id: import("convex/values").GenericId<"recoveryClaims">;
2161
+ accountId: string;
2162
+ amountDue: number;
2163
+ claimKey: string;
2164
+ collectedAmount: number;
2165
+ currency: string;
2166
+ openingCollection?: {
2167
+ amountDue: number;
2168
+ collectedAmount: number;
2169
+ operationKey: string;
2170
+ revision: number;
2171
+ } | undefined;
2172
+ outstanding: number;
2173
+ reservedAmount: number;
2174
+ revision: number;
2175
+ scopeKey: string;
2176
+ sign: "negative" | "positive" | "zero";
2177
+ sourceChargeId: string;
2178
+ sourceGross: number;
2179
+ sourceProcessingFee: number;
2180
+ } | undefined;
2181
+ };
2182
+ scopeKey: string;
2183
+ status: "completed";
2184
+ version: number;
2185
+ }, {
2186
+ accountId: import("convex/values").VString<string, "required">;
2187
+ scopeKey: import("convex/values").VString<string, "required">;
2188
+ currency: import("convex/values").VString<string, "required">;
2189
+ operationId: import("convex/values").VId<import("convex/values").GenericId<"processingCostReconciliationOperations">, "required">;
2190
+ version: import("convex/values").VFloat64<number, "required">;
2191
+ status: import("convex/values").VLiteral<"completed", "required">;
2192
+ result: import("convex/values").VObject<{
2193
+ claim: {
2194
+ _creationTime: number;
2195
+ _id: import("convex/values").GenericId<"recoveryClaims">;
2196
+ accountId: string;
2197
+ amountDue: number;
2198
+ claimKey: string;
2199
+ collectedAmount: number;
2200
+ currency: string;
2201
+ openingCollection?: {
2202
+ amountDue: number;
2203
+ collectedAmount: number;
2204
+ operationKey: string;
2205
+ revision: number;
2206
+ } | undefined;
2207
+ outstanding: number;
2208
+ reservedAmount: number;
2209
+ revision: number;
2210
+ scopeKey: string;
2211
+ sign: "negative" | "positive" | "zero";
2212
+ sourceChargeId: string;
2213
+ sourceGross: number;
2214
+ sourceProcessingFee: number;
2215
+ };
2216
+ deficit: {
2217
+ amountDue: number;
2218
+ currency: string;
2219
+ disputeLiability: number;
2220
+ processingLiability: number;
2221
+ retainedFee: number;
2222
+ };
2223
+ observation: {
2224
+ currency: string;
2225
+ disputeFees: number;
2226
+ gross: number;
2227
+ originalProcessingFee: number;
2228
+ paymentIntentId: string;
2229
+ principalReturned: number;
2230
+ processingFee: number;
2231
+ provenance: {
2232
+ customerAccountId: string;
2233
+ invoiceId: string;
2234
+ invoicePaymentId: string;
2235
+ recoveryInvoiceItemId?: string | undefined;
2236
+ stripePriceId?: string | undefined;
2237
+ stripeProductId?: string | undefined;
2238
+ subscriptionId?: string | undefined;
2239
+ };
2240
+ sourceChargeId: string;
2241
+ };
2242
+ rollbackClaim?: {
2243
+ _creationTime: number;
2244
+ _id: import("convex/values").GenericId<"recoveryClaims">;
2245
+ accountId: string;
2246
+ amountDue: number;
2247
+ claimKey: string;
2248
+ collectedAmount: number;
2249
+ currency: string;
2250
+ openingCollection?: {
2251
+ amountDue: number;
2252
+ collectedAmount: number;
2253
+ operationKey: string;
2254
+ revision: number;
2255
+ } | undefined;
2256
+ outstanding: number;
2257
+ reservedAmount: number;
2258
+ revision: number;
2259
+ scopeKey: string;
2260
+ sign: "negative" | "positive" | "zero";
2261
+ sourceChargeId: string;
2262
+ sourceGross: number;
2263
+ sourceProcessingFee: number;
2264
+ } | undefined;
2265
+ }, {
2266
+ claim: import("convex/values").VObject<{
2267
+ _creationTime: number;
2268
+ _id: import("convex/values").GenericId<"recoveryClaims">;
2269
+ accountId: string;
2270
+ amountDue: number;
2271
+ claimKey: string;
2272
+ collectedAmount: number;
2273
+ currency: string;
2274
+ openingCollection?: {
2275
+ amountDue: number;
2276
+ collectedAmount: number;
2277
+ operationKey: string;
2278
+ revision: number;
2279
+ } | undefined;
2280
+ outstanding: number;
2281
+ reservedAmount: number;
2282
+ revision: number;
2283
+ scopeKey: string;
2284
+ sign: "negative" | "positive" | "zero";
2285
+ sourceChargeId: string;
2286
+ sourceGross: number;
2287
+ sourceProcessingFee: number;
2288
+ }, {
2289
+ accountId: import("convex/values").VString<string, "required">;
2290
+ scopeKey: import("convex/values").VString<string, "required">;
2291
+ currency: import("convex/values").VString<string, "required">;
2292
+ claimKey: import("convex/values").VString<string, "required">;
2293
+ sourceChargeId: import("convex/values").VString<string, "required">;
2294
+ sourceGross: import("convex/values").VFloat64<number, "required">;
2295
+ sourceProcessingFee: import("convex/values").VFloat64<number, "required">;
2296
+ amountDue: import("convex/values").VFloat64<number, "required">;
2297
+ revision: import("convex/values").VFloat64<number, "required">;
2298
+ collectedAmount: import("convex/values").VFloat64<number, "required">;
2299
+ reservedAmount: import("convex/values").VFloat64<number, "required">;
2300
+ outstanding: import("convex/values").VFloat64<number, "required">;
2301
+ sign: import("convex/values").VUnion<"negative" | "positive" | "zero", [import("convex/values").VLiteral<"positive", "required">, import("convex/values").VLiteral<"negative", "required">, import("convex/values").VLiteral<"zero", "required">], "required", never>;
2302
+ openingCollection: import("convex/values").VObject<{
2303
+ amountDue: number;
2304
+ collectedAmount: number;
2305
+ operationKey: string;
2306
+ revision: number;
2307
+ } | undefined, {
2308
+ operationKey: import("convex/values").VString<string, "required">;
2309
+ amountDue: import("convex/values").VFloat64<number, "required">;
2310
+ revision: import("convex/values").VFloat64<number, "required">;
2311
+ collectedAmount: import("convex/values").VFloat64<number, "required">;
2312
+ }, "optional", "amountDue" | "collectedAmount" | "operationKey" | "revision">;
2313
+ _id: import("convex/values").VId<import("convex/values").GenericId<"recoveryClaims">, "required">;
2314
+ _creationTime: import("convex/values").VFloat64<number, "required">;
2315
+ }, "required", "_creationTime" | "_id" | "accountId" | "amountDue" | "claimKey" | "collectedAmount" | "currency" | "openingCollection" | "openingCollection.amountDue" | "openingCollection.collectedAmount" | "openingCollection.operationKey" | "openingCollection.revision" | "outstanding" | "reservedAmount" | "revision" | "scopeKey" | "sign" | "sourceChargeId" | "sourceGross" | "sourceProcessingFee">;
2316
+ rollbackClaim: import("convex/values").VObject<{
2317
+ _creationTime: number;
2318
+ _id: import("convex/values").GenericId<"recoveryClaims">;
2319
+ accountId: string;
2320
+ amountDue: number;
2321
+ claimKey: string;
2322
+ collectedAmount: number;
2323
+ currency: string;
2324
+ openingCollection?: {
2325
+ amountDue: number;
2326
+ collectedAmount: number;
2327
+ operationKey: string;
2328
+ revision: number;
2329
+ } | undefined;
2330
+ outstanding: number;
2331
+ reservedAmount: number;
2332
+ revision: number;
2333
+ scopeKey: string;
2334
+ sign: "negative" | "positive" | "zero";
2335
+ sourceChargeId: string;
2336
+ sourceGross: number;
2337
+ sourceProcessingFee: number;
2338
+ } | undefined, {
2339
+ accountId: import("convex/values").VString<string, "required">;
2340
+ scopeKey: import("convex/values").VString<string, "required">;
2341
+ currency: import("convex/values").VString<string, "required">;
2342
+ claimKey: import("convex/values").VString<string, "required">;
2343
+ sourceChargeId: import("convex/values").VString<string, "required">;
2344
+ sourceGross: import("convex/values").VFloat64<number, "required">;
2345
+ sourceProcessingFee: import("convex/values").VFloat64<number, "required">;
2346
+ amountDue: import("convex/values").VFloat64<number, "required">;
2347
+ revision: import("convex/values").VFloat64<number, "required">;
2348
+ collectedAmount: import("convex/values").VFloat64<number, "required">;
2349
+ reservedAmount: import("convex/values").VFloat64<number, "required">;
2350
+ outstanding: import("convex/values").VFloat64<number, "required">;
2351
+ sign: import("convex/values").VUnion<"negative" | "positive" | "zero", [import("convex/values").VLiteral<"positive", "required">, import("convex/values").VLiteral<"negative", "required">, import("convex/values").VLiteral<"zero", "required">], "required", never>;
2352
+ openingCollection: import("convex/values").VObject<{
2353
+ amountDue: number;
2354
+ collectedAmount: number;
2355
+ operationKey: string;
2356
+ revision: number;
2357
+ } | undefined, {
2358
+ operationKey: import("convex/values").VString<string, "required">;
2359
+ amountDue: import("convex/values").VFloat64<number, "required">;
2360
+ revision: import("convex/values").VFloat64<number, "required">;
2361
+ collectedAmount: import("convex/values").VFloat64<number, "required">;
2362
+ }, "optional", "amountDue" | "collectedAmount" | "operationKey" | "revision">;
2363
+ _id: import("convex/values").VId<import("convex/values").GenericId<"recoveryClaims">, "required">;
2364
+ _creationTime: import("convex/values").VFloat64<number, "required">;
2365
+ }, "optional", "_creationTime" | "_id" | "accountId" | "amountDue" | "claimKey" | "collectedAmount" | "currency" | "openingCollection" | "openingCollection.amountDue" | "openingCollection.collectedAmount" | "openingCollection.operationKey" | "openingCollection.revision" | "outstanding" | "reservedAmount" | "revision" | "scopeKey" | "sign" | "sourceChargeId" | "sourceGross" | "sourceProcessingFee">;
2366
+ deficit: import("convex/values").VObject<{
2367
+ amountDue: number;
2368
+ currency: string;
2369
+ disputeLiability: number;
2370
+ processingLiability: number;
2371
+ retainedFee: number;
2372
+ }, {
2373
+ currency: import("convex/values").VString<string, "required">;
2374
+ retainedFee: import("convex/values").VFloat64<number, "required">;
2375
+ processingLiability: import("convex/values").VFloat64<number, "required">;
2376
+ disputeLiability: import("convex/values").VFloat64<number, "required">;
2377
+ amountDue: import("convex/values").VFloat64<number, "required">;
2378
+ }, "required", "amountDue" | "currency" | "disputeLiability" | "processingLiability" | "retainedFee">;
2379
+ observation: import("convex/values").VObject<{
2380
+ currency: string;
2381
+ disputeFees: number;
2382
+ gross: number;
2383
+ originalProcessingFee: number;
2384
+ paymentIntentId: string;
2385
+ principalReturned: number;
2386
+ processingFee: number;
2387
+ provenance: {
2388
+ customerAccountId: string;
2389
+ invoiceId: string;
2390
+ invoicePaymentId: string;
2391
+ recoveryInvoiceItemId?: string | undefined;
2392
+ stripePriceId?: string | undefined;
2393
+ stripeProductId?: string | undefined;
2394
+ subscriptionId?: string | undefined;
2395
+ };
2396
+ sourceChargeId: string;
2397
+ }, {
2398
+ paymentIntentId: import("convex/values").VString<string, "required">;
2399
+ sourceChargeId: import("convex/values").VString<string, "required">;
2400
+ currency: import("convex/values").VString<string, "required">;
2401
+ gross: import("convex/values").VFloat64<number, "required">;
2402
+ originalProcessingFee: import("convex/values").VFloat64<number, "required">;
2403
+ processingFee: import("convex/values").VFloat64<number, "required">;
2404
+ disputeFees: import("convex/values").VFloat64<number, "required">;
2405
+ principalReturned: import("convex/values").VFloat64<number, "required">;
2406
+ provenance: import("convex/values").VObject<{
2407
+ customerAccountId: string;
2408
+ invoiceId: string;
2409
+ invoicePaymentId: string;
2410
+ recoveryInvoiceItemId?: string | undefined;
2411
+ stripePriceId?: string | undefined;
2412
+ stripeProductId?: string | undefined;
2413
+ subscriptionId?: string | undefined;
2414
+ }, {
2415
+ invoiceId: import("convex/values").VString<string, "required">;
2416
+ invoicePaymentId: import("convex/values").VString<string, "required">;
2417
+ recoveryInvoiceItemId: import("convex/values").VString<string | undefined, "optional">;
2418
+ customerAccountId: import("convex/values").VString<string, "required">;
2419
+ subscriptionId: import("convex/values").VString<string | undefined, "optional">;
2420
+ stripePriceId: import("convex/values").VString<string | undefined, "optional">;
2421
+ stripeProductId: import("convex/values").VString<string | undefined, "optional">;
2422
+ }, "required", "customerAccountId" | "invoiceId" | "invoicePaymentId" | "recoveryInvoiceItemId" | "stripePriceId" | "stripeProductId" | "subscriptionId">;
2423
+ }, "required", "currency" | "disputeFees" | "gross" | "originalProcessingFee" | "paymentIntentId" | "principalReturned" | "processingFee" | "provenance" | "provenance.customerAccountId" | "provenance.invoiceId" | "provenance.invoicePaymentId" | "provenance.recoveryInvoiceItemId" | "provenance.stripePriceId" | "provenance.stripeProductId" | "provenance.subscriptionId" | "sourceChargeId">;
2424
+ }, "required", "claim" | "claim._creationTime" | "claim._id" | "claim.accountId" | "claim.amountDue" | "claim.claimKey" | "claim.collectedAmount" | "claim.currency" | "claim.openingCollection" | "claim.openingCollection.amountDue" | "claim.openingCollection.collectedAmount" | "claim.openingCollection.operationKey" | "claim.openingCollection.revision" | "claim.outstanding" | "claim.reservedAmount" | "claim.revision" | "claim.scopeKey" | "claim.sign" | "claim.sourceChargeId" | "claim.sourceGross" | "claim.sourceProcessingFee" | "deficit" | "deficit.amountDue" | "deficit.currency" | "deficit.disputeLiability" | "deficit.processingLiability" | "deficit.retainedFee" | "observation" | "observation.currency" | "observation.disputeFees" | "observation.gross" | "observation.originalProcessingFee" | "observation.paymentIntentId" | "observation.principalReturned" | "observation.processingFee" | "observation.provenance" | "observation.provenance.customerAccountId" | "observation.provenance.invoiceId" | "observation.provenance.invoicePaymentId" | "observation.provenance.recoveryInvoiceItemId" | "observation.provenance.stripePriceId" | "observation.provenance.stripeProductId" | "observation.provenance.subscriptionId" | "observation.sourceChargeId" | "rollbackClaim" | "rollbackClaim._creationTime" | "rollbackClaim._id" | "rollbackClaim.accountId" | "rollbackClaim.amountDue" | "rollbackClaim.claimKey" | "rollbackClaim.collectedAmount" | "rollbackClaim.currency" | "rollbackClaim.openingCollection" | "rollbackClaim.openingCollection.amountDue" | "rollbackClaim.openingCollection.collectedAmount" | "rollbackClaim.openingCollection.operationKey" | "rollbackClaim.openingCollection.revision" | "rollbackClaim.outstanding" | "rollbackClaim.reservedAmount" | "rollbackClaim.revision" | "rollbackClaim.scopeKey" | "rollbackClaim.sign" | "rollbackClaim.sourceChargeId" | "rollbackClaim.sourceGross" | "rollbackClaim.sourceProcessingFee">;
2425
+ }, "required", "accountId" | "currency" | "operationId" | "result" | "result.claim" | "result.claim._creationTime" | "result.claim._id" | "result.claim.accountId" | "result.claim.amountDue" | "result.claim.claimKey" | "result.claim.collectedAmount" | "result.claim.currency" | "result.claim.openingCollection" | "result.claim.openingCollection.amountDue" | "result.claim.openingCollection.collectedAmount" | "result.claim.openingCollection.operationKey" | "result.claim.openingCollection.revision" | "result.claim.outstanding" | "result.claim.reservedAmount" | "result.claim.revision" | "result.claim.scopeKey" | "result.claim.sign" | "result.claim.sourceChargeId" | "result.claim.sourceGross" | "result.claim.sourceProcessingFee" | "result.deficit" | "result.deficit.amountDue" | "result.deficit.currency" | "result.deficit.disputeLiability" | "result.deficit.processingLiability" | "result.deficit.retainedFee" | "result.observation" | "result.observation.currency" | "result.observation.disputeFees" | "result.observation.gross" | "result.observation.originalProcessingFee" | "result.observation.paymentIntentId" | "result.observation.principalReturned" | "result.observation.processingFee" | "result.observation.provenance" | "result.observation.provenance.customerAccountId" | "result.observation.provenance.invoiceId" | "result.observation.provenance.invoicePaymentId" | "result.observation.provenance.recoveryInvoiceItemId" | "result.observation.provenance.stripePriceId" | "result.observation.provenance.stripeProductId" | "result.observation.provenance.subscriptionId" | "result.observation.sourceChargeId" | "result.rollbackClaim" | "result.rollbackClaim._creationTime" | "result.rollbackClaim._id" | "result.rollbackClaim.accountId" | "result.rollbackClaim.amountDue" | "result.rollbackClaim.claimKey" | "result.rollbackClaim.collectedAmount" | "result.rollbackClaim.currency" | "result.rollbackClaim.openingCollection" | "result.rollbackClaim.openingCollection.amountDue" | "result.rollbackClaim.openingCollection.collectedAmount" | "result.rollbackClaim.openingCollection.operationKey" | "result.rollbackClaim.openingCollection.revision" | "result.rollbackClaim.outstanding" | "result.rollbackClaim.reservedAmount" | "result.rollbackClaim.revision" | "result.rollbackClaim.scopeKey" | "result.rollbackClaim.sign" | "result.rollbackClaim.sourceChargeId" | "result.rollbackClaim.sourceGross" | "result.rollbackClaim.sourceProcessingFee" | "scopeKey" | "status" | "version">, import("convex/values").VObject<{
2426
+ accountId: string;
2427
+ currency: string;
2428
+ operationId: import("convex/values").GenericId<"processingCostReconciliationOperations">;
2429
+ reason: string;
2430
+ retryable: boolean;
2431
+ scopeKey: string;
2432
+ status: "conflict" | "not_ready" | "rejected" | "unknown";
2433
+ version: number;
2434
+ }, {
2435
+ accountId: import("convex/values").VString<string, "required">;
2436
+ scopeKey: import("convex/values").VString<string, "required">;
2437
+ currency: import("convex/values").VString<string, "required">;
2438
+ operationId: import("convex/values").VId<import("convex/values").GenericId<"processingCostReconciliationOperations">, "required">;
2439
+ version: import("convex/values").VFloat64<number, "required">;
2440
+ status: import("convex/values").VUnion<"conflict" | "not_ready" | "rejected" | "unknown", [import("convex/values").VLiteral<"not_ready", "required">, import("convex/values").VLiteral<"conflict", "required">, import("convex/values").VLiteral<"rejected", "required">, import("convex/values").VLiteral<"unknown", "required">], "required", never>;
2441
+ reason: import("convex/values").VString<string, "required">;
2442
+ retryable: import("convex/values").VBoolean<boolean, "required">;
2443
+ }, "required", "accountId" | "currency" | "operationId" | "reason" | "retryable" | "scopeKey" | "status" | "version">], "required", "accountId" | "currency" | "operationId" | "reason" | "result" | "result.claim" | "result.claim._creationTime" | "result.claim._id" | "result.claim.accountId" | "result.claim.amountDue" | "result.claim.claimKey" | "result.claim.collectedAmount" | "result.claim.currency" | "result.claim.openingCollection" | "result.claim.openingCollection.amountDue" | "result.claim.openingCollection.collectedAmount" | "result.claim.openingCollection.operationKey" | "result.claim.openingCollection.revision" | "result.claim.outstanding" | "result.claim.reservedAmount" | "result.claim.revision" | "result.claim.scopeKey" | "result.claim.sign" | "result.claim.sourceChargeId" | "result.claim.sourceGross" | "result.claim.sourceProcessingFee" | "result.deficit" | "result.deficit.amountDue" | "result.deficit.currency" | "result.deficit.disputeLiability" | "result.deficit.processingLiability" | "result.deficit.retainedFee" | "result.observation" | "result.observation.currency" | "result.observation.disputeFees" | "result.observation.gross" | "result.observation.originalProcessingFee" | "result.observation.paymentIntentId" | "result.observation.principalReturned" | "result.observation.processingFee" | "result.observation.provenance" | "result.observation.provenance.customerAccountId" | "result.observation.provenance.invoiceId" | "result.observation.provenance.invoicePaymentId" | "result.observation.provenance.recoveryInvoiceItemId" | "result.observation.provenance.stripePriceId" | "result.observation.provenance.stripeProductId" | "result.observation.provenance.subscriptionId" | "result.observation.sourceChargeId" | "result.rollbackClaim" | "result.rollbackClaim._creationTime" | "result.rollbackClaim._id" | "result.rollbackClaim.accountId" | "result.rollbackClaim.amountDue" | "result.rollbackClaim.claimKey" | "result.rollbackClaim.collectedAmount" | "result.rollbackClaim.currency" | "result.rollbackClaim.openingCollection" | "result.rollbackClaim.openingCollection.amountDue" | "result.rollbackClaim.openingCollection.collectedAmount" | "result.rollbackClaim.openingCollection.operationKey" | "result.rollbackClaim.openingCollection.revision" | "result.rollbackClaim.outstanding" | "result.rollbackClaim.reservedAmount" | "result.rollbackClaim.revision" | "result.rollbackClaim.scopeKey" | "result.rollbackClaim.sign" | "result.rollbackClaim.sourceChargeId" | "result.rollbackClaim.sourceGross" | "result.rollbackClaim.sourceProcessingFee" | "retryable" | "scopeKey" | "status" | "version">;
2444
+ export declare const importSnapshot: import("convex/values").VUnion<{
2445
+ amountDue: number;
2446
+ collectedAmount: number;
2447
+ operationKey: string;
2448
+ revision: number;
2449
+ } | null, [import("convex/values").VNull<null, "required">, import("convex/values").VObject<{
2450
+ amountDue: number;
2451
+ collectedAmount: number;
2452
+ operationKey: string;
2453
+ revision: number;
2454
+ }, {
2455
+ operationKey: import("convex/values").VString<string, "required">;
2456
+ amountDue: import("convex/values").VFloat64<number, "required">;
2457
+ collectedAmount: import("convex/values").VFloat64<number, "required">;
2458
+ revision: import("convex/values").VFloat64<number, "required">;
2459
+ }, "required", "amountDue" | "collectedAmount" | "operationKey" | "revision">], "required", "amountDue" | "collectedAmount" | "operationKey" | "revision">;
2460
+ //# sourceMappingURL=schema.d.ts.map