@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.
- package/CHANGELOG.md +15 -0
- package/README.md +1 -1
- package/dist/client/connect/payoutAdoptionTestHelpers.d.ts +1022 -0
- package/dist/client/connect/payoutAdoptionTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutExecutionTestHelpers.d.ts +511 -0
- package/dist/client/connect/payoutExecutionTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts +1054 -32
- package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutSyncTestHelpers.d.ts +527 -16
- package/dist/client/connect/payoutSyncTestHelpers.d.ts.map +1 -1
- package/dist/client/costRecovery-invoices.d.ts +3 -2
- package/dist/client/costRecovery-invoices.d.ts.map +1 -1
- package/dist/client/costRecovery-invoices.js +10 -5
- package/dist/client/costRecovery-invoices.js.map +1 -1
- package/dist/client/costRecovery.d.ts +4 -2
- package/dist/client/costRecovery.d.ts.map +1 -1
- package/dist/client/costRecovery.js +2 -2
- package/dist/client/costRecovery.js.map +1 -1
- package/dist/client/processingCostReconciliation/client.d.ts +14 -0
- package/dist/client/processingCostReconciliation/client.d.ts.map +1 -0
- package/dist/client/processingCostReconciliation/client.js +35 -0
- package/dist/client/processingCostReconciliation/client.js.map +1 -0
- package/dist/client/processingCostReconciliation/contracts.d.ts +172 -0
- package/dist/client/processingCostReconciliation/contracts.d.ts.map +1 -0
- package/dist/client/processingCostReconciliation/contracts.js +55 -0
- package/dist/client/processingCostReconciliation/contracts.js.map +1 -0
- package/dist/client/processingCostReconciliation/invoiceFunding.d.ts +15 -0
- package/dist/client/processingCostReconciliation/invoiceFunding.d.ts.map +1 -0
- package/dist/client/processingCostReconciliation/invoiceFunding.js +195 -0
- package/dist/client/processingCostReconciliation/invoiceFunding.js.map +1 -0
- package/dist/client/processingCostReconciliation/provider.d.ts +9 -0
- package/dist/client/processingCostReconciliation/provider.d.ts.map +1 -0
- package/dist/client/processingCostReconciliation/provider.js +148 -0
- package/dist/client/processingCostReconciliation/provider.js.map +1 -0
- package/dist/client/settlement/processingCostHistory.d.ts +12 -0
- package/dist/client/settlement/processingCostHistory.d.ts.map +1 -0
- package/dist/client/settlement/processingCostHistory.js +20 -0
- package/dist/client/settlement/processingCostHistory.js.map +1 -0
- package/dist/client/settlement/processingCosts.d.ts +3 -0
- package/dist/client/settlement/processingCosts.d.ts.map +1 -1
- package/dist/client/settlement/processingCosts.js +27 -7
- package/dist/client/settlement/processingCosts.js.map +1 -1
- package/dist/component/_generated/api.d.ts +18 -0
- package/dist/component/_generated/api.d.ts.map +1 -1
- package/dist/component/_generated/api.js.map +1 -1
- package/dist/component/_generated/component.d.ts +515 -0
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/balanceFunding/internal/actions.d.ts +11 -11
- package/dist/component/balanceFunding/mutations.d.ts +16 -16
- package/dist/component/balanceFunding/stateHandlers.d.ts +8 -8
- package/dist/component/balanceFunding/workflowValidators.d.ts +16 -16
- package/dist/component/earnings/triggers.d.ts +318 -16
- package/dist/component/earnings/triggers.d.ts.map +1 -1
- package/dist/component/payoutRelease/queries.d.ts +2 -2
- package/dist/component/payoutRelease/queries.d.ts.map +1 -1
- package/dist/component/processingCostReconciliation/adoption.d.ts +29 -0
- package/dist/component/processingCostReconciliation/adoption.d.ts.map +1 -0
- package/dist/component/processingCostReconciliation/adoption.js +58 -0
- package/dist/component/processingCostReconciliation/adoption.js.map +1 -0
- package/dist/component/processingCostReconciliation/bridge.d.ts +45 -0
- package/dist/component/processingCostReconciliation/bridge.d.ts.map +1 -0
- package/dist/component/processingCostReconciliation/bridge.js +41 -0
- package/dist/component/processingCostReconciliation/bridge.js.map +1 -0
- package/dist/component/processingCostReconciliation/helpers.d.ts +327 -0
- package/dist/component/processingCostReconciliation/helpers.d.ts.map +1 -0
- package/dist/component/processingCostReconciliation/helpers.js +39 -0
- package/dist/component/processingCostReconciliation/helpers.js.map +1 -0
- package/dist/component/processingCostReconciliation/mutations.d.ts +303 -0
- package/dist/component/processingCostReconciliation/mutations.d.ts.map +1 -0
- package/dist/component/processingCostReconciliation/mutations.js +121 -0
- package/dist/component/processingCostReconciliation/mutations.js.map +1 -0
- package/dist/component/processingCostReconciliation/queries.d.ts +422 -0
- package/dist/component/processingCostReconciliation/queries.d.ts.map +1 -0
- package/dist/component/processingCostReconciliation/queries.js +19 -0
- package/dist/component/processingCostReconciliation/queries.js.map +1 -0
- package/dist/component/processingCostReconciliation/rollback.d.ts +21 -0
- package/dist/component/processingCostReconciliation/rollback.d.ts.map +1 -0
- package/dist/component/processingCostReconciliation/rollback.js +54 -0
- package/dist/component/processingCostReconciliation/rollback.js.map +1 -0
- package/dist/component/processingCostReconciliation/schema.d.ts +2460 -0
- package/dist/component/processingCostReconciliation/schema.d.ts.map +1 -0
- package/dist/component/processingCostReconciliation/schema.js +137 -0
- package/dist/component/processingCostReconciliation/schema.js.map +1 -0
- package/dist/component/processingCostReconciliation/steps.d.ts +306 -0
- package/dist/component/processingCostReconciliation/steps.d.ts.map +1 -0
- package/dist/component/processingCostReconciliation/steps.js +149 -0
- package/dist/component/processingCostReconciliation/steps.js.map +1 -0
- package/dist/component/processingCostReconciliation/validation.d.ts +13 -0
- package/dist/component/processingCostReconciliation/validation.d.ts.map +1 -0
- package/dist/component/processingCostReconciliation/validation.js +61 -0
- package/dist/component/processingCostReconciliation/validation.js.map +1 -0
- package/dist/component/processingCostReconciliation/workflow.d.ts +105 -0
- package/dist/component/processingCostReconciliation/workflow.d.ts.map +1 -0
- package/dist/component/processingCostReconciliation/workflow.js +33 -0
- package/dist/component/processingCostReconciliation/workflow.js.map +1 -0
- package/dist/component/schema.d.ts +511 -0
- package/dist/component/schema.js +2 -0
- package/dist/component/schema.js.map +1 -1
- package/package.json +1 -1
- package/src/client/costRecovery-invoices.ts +19 -4
- package/src/client/costRecovery.ts +4 -2
- package/src/client/processingCostReconciliation/client.ts +75 -0
- package/src/client/processingCostReconciliation/contracts.ts +176 -0
- package/src/client/processingCostReconciliation/invoiceFunding.ts +270 -0
- package/src/client/processingCostReconciliation/invoiceProvider.test.ts +353 -0
- package/src/client/processingCostReconciliation/provider.test.ts +324 -0
- package/src/client/processingCostReconciliation/provider.ts +178 -0
- package/src/client/settlement/processingCostHistory.ts +31 -0
- package/src/client/settlement/processingCosts.ts +50 -15
- package/src/component/_generated/api.ts +18 -0
- package/src/component/_generated/component.ts +570 -0
- package/src/component/processingCostReconciliation/adoption.test.ts +206 -0
- package/src/component/processingCostReconciliation/adoption.ts +77 -0
- package/src/component/processingCostReconciliation/bridge.ts +50 -0
- package/src/component/processingCostReconciliation/helpers.ts +55 -0
- package/src/component/processingCostReconciliation/invoice.test.ts +152 -0
- package/src/component/processingCostReconciliation/mutations.ts +148 -0
- package/src/component/processingCostReconciliation/queries.ts +18 -0
- package/src/component/processingCostReconciliation/rollback.ts +72 -0
- package/src/component/processingCostReconciliation/schema.ts +191 -0
- package/src/component/processingCostReconciliation/state.test.ts +407 -0
- package/src/component/processingCostReconciliation/steps.ts +168 -0
- package/src/component/processingCostReconciliation/validation.ts +79 -0
- package/src/component/processingCostReconciliation/workflow.test.ts +329 -0
- package/src/component/processingCostReconciliation/workflow.ts +50 -0
- package/src/component/schema.ts +2 -0
|
@@ -9,6 +9,517 @@ export declare const scope: {
|
|
|
9
9
|
};
|
|
10
10
|
export declare function setup(amounts?: number[], currency?: string): Promise<{
|
|
11
11
|
t: import("convex-test").TestConvex<import("convex/server").SchemaDefinition<{
|
|
12
|
+
processingCostReconciliationOperations: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
13
|
+
accountId: string;
|
|
14
|
+
claimKey: string;
|
|
15
|
+
currency: string;
|
|
16
|
+
definitionVersion: number;
|
|
17
|
+
expectedRevision: number;
|
|
18
|
+
failure?: {
|
|
19
|
+
reason: "fee_pending" | "history_incomplete" | "provider_pending";
|
|
20
|
+
retryable: true;
|
|
21
|
+
status: "not_ready";
|
|
22
|
+
} | {
|
|
23
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
24
|
+
retryable: false;
|
|
25
|
+
status: "conflict";
|
|
26
|
+
} | {
|
|
27
|
+
reason: "currency_mismatch" | "invalid_scope" | "payment_not_payable" | "policy_invalid" | "unsupported_source";
|
|
28
|
+
retryable: false;
|
|
29
|
+
status: "rejected";
|
|
30
|
+
} | {
|
|
31
|
+
reason: "history_incomplete" | "provider_outcome_unknown";
|
|
32
|
+
retryable: false;
|
|
33
|
+
status: "unknown";
|
|
34
|
+
} | undefined;
|
|
35
|
+
importHook?: string | undefined;
|
|
36
|
+
maxAttempts: number;
|
|
37
|
+
policy: {
|
|
38
|
+
liability: {
|
|
39
|
+
disputeCosts: "all" | "none";
|
|
40
|
+
processingCosts: "all" | "none" | "uncovered";
|
|
41
|
+
};
|
|
42
|
+
rounding: "ceil" | "floor" | "nearest";
|
|
43
|
+
sellingFee: number;
|
|
44
|
+
};
|
|
45
|
+
projection?: string | undefined;
|
|
46
|
+
provider: string;
|
|
47
|
+
providerApiVersion: string;
|
|
48
|
+
requestKey: string;
|
|
49
|
+
result?: {
|
|
50
|
+
claim: {
|
|
51
|
+
_creationTime: number;
|
|
52
|
+
_id: import("convex/values").GenericId<"recoveryClaims">;
|
|
53
|
+
accountId: string;
|
|
54
|
+
amountDue: number;
|
|
55
|
+
claimKey: string;
|
|
56
|
+
collectedAmount: number;
|
|
57
|
+
currency: string;
|
|
58
|
+
openingCollection?: {
|
|
59
|
+
amountDue: number;
|
|
60
|
+
collectedAmount: number;
|
|
61
|
+
operationKey: string;
|
|
62
|
+
revision: number;
|
|
63
|
+
} | undefined;
|
|
64
|
+
outstanding: number;
|
|
65
|
+
reservedAmount: number;
|
|
66
|
+
revision: number;
|
|
67
|
+
scopeKey: string;
|
|
68
|
+
sign: "negative" | "positive" | "zero";
|
|
69
|
+
sourceChargeId: string;
|
|
70
|
+
sourceGross: number;
|
|
71
|
+
sourceProcessingFee: number;
|
|
72
|
+
};
|
|
73
|
+
deficit: {
|
|
74
|
+
amountDue: number;
|
|
75
|
+
currency: string;
|
|
76
|
+
disputeLiability: number;
|
|
77
|
+
processingLiability: number;
|
|
78
|
+
retainedFee: number;
|
|
79
|
+
};
|
|
80
|
+
observation: {
|
|
81
|
+
currency: string;
|
|
82
|
+
disputeFees: number;
|
|
83
|
+
gross: number;
|
|
84
|
+
originalProcessingFee: number;
|
|
85
|
+
paymentIntentId: string;
|
|
86
|
+
principalReturned: number;
|
|
87
|
+
processingFee: number;
|
|
88
|
+
provenance: {
|
|
89
|
+
customerAccountId: string;
|
|
90
|
+
invoiceId: string;
|
|
91
|
+
invoicePaymentId: string;
|
|
92
|
+
recoveryInvoiceItemId?: string | undefined;
|
|
93
|
+
stripePriceId?: string | undefined;
|
|
94
|
+
stripeProductId?: string | undefined;
|
|
95
|
+
subscriptionId?: string | undefined;
|
|
96
|
+
};
|
|
97
|
+
sourceChargeId: string;
|
|
98
|
+
};
|
|
99
|
+
rollbackClaim?: {
|
|
100
|
+
_creationTime: number;
|
|
101
|
+
_id: import("convex/values").GenericId<"recoveryClaims">;
|
|
102
|
+
accountId: string;
|
|
103
|
+
amountDue: number;
|
|
104
|
+
claimKey: string;
|
|
105
|
+
collectedAmount: number;
|
|
106
|
+
currency: string;
|
|
107
|
+
openingCollection?: {
|
|
108
|
+
amountDue: number;
|
|
109
|
+
collectedAmount: number;
|
|
110
|
+
operationKey: string;
|
|
111
|
+
revision: number;
|
|
112
|
+
} | undefined;
|
|
113
|
+
outstanding: number;
|
|
114
|
+
reservedAmount: number;
|
|
115
|
+
revision: number;
|
|
116
|
+
scopeKey: string;
|
|
117
|
+
sign: "negative" | "positive" | "zero";
|
|
118
|
+
sourceChargeId: string;
|
|
119
|
+
sourceGross: number;
|
|
120
|
+
sourceProcessingFee: number;
|
|
121
|
+
} | undefined;
|
|
122
|
+
} | undefined;
|
|
123
|
+
retryDelayMs: number;
|
|
124
|
+
rollback?: {
|
|
125
|
+
expectedRevision: number;
|
|
126
|
+
groupKey: string;
|
|
127
|
+
} | undefined;
|
|
128
|
+
scopeKey: string;
|
|
129
|
+
source: {
|
|
130
|
+
customerAccountId: string;
|
|
131
|
+
gross: number;
|
|
132
|
+
invoiceId?: string | undefined;
|
|
133
|
+
kind: "sale";
|
|
134
|
+
paymentIntentId: string;
|
|
135
|
+
stripeAccountId?: string | undefined;
|
|
136
|
+
stripePriceId?: string | undefined;
|
|
137
|
+
stripeProductId?: string | undefined;
|
|
138
|
+
subscriptionId?: string | undefined;
|
|
139
|
+
} | {
|
|
140
|
+
gross: number;
|
|
141
|
+
groupKey: string;
|
|
142
|
+
kind: "invoice_recovery";
|
|
143
|
+
paymentIntentId: string;
|
|
144
|
+
};
|
|
145
|
+
status: "completed" | "conflict" | "queued" | "rejected" | "running" | "unknown" | "waiting";
|
|
146
|
+
version: number;
|
|
147
|
+
workflowId?: string | undefined;
|
|
148
|
+
}, {
|
|
149
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
150
|
+
scopeKey: import("convex/values").VString<string, "required">;
|
|
151
|
+
currency: import("convex/values").VString<string, "required">;
|
|
152
|
+
claimKey: import("convex/values").VString<string, "required">;
|
|
153
|
+
source: import("convex/values").VUnion<{
|
|
154
|
+
customerAccountId: string;
|
|
155
|
+
gross: number;
|
|
156
|
+
invoiceId?: string | undefined;
|
|
157
|
+
kind: "sale";
|
|
158
|
+
paymentIntentId: string;
|
|
159
|
+
stripeAccountId?: string | undefined;
|
|
160
|
+
stripePriceId?: string | undefined;
|
|
161
|
+
stripeProductId?: string | undefined;
|
|
162
|
+
subscriptionId?: string | undefined;
|
|
163
|
+
} | {
|
|
164
|
+
gross: number;
|
|
165
|
+
groupKey: string;
|
|
166
|
+
kind: "invoice_recovery";
|
|
167
|
+
paymentIntentId: string;
|
|
168
|
+
}, [import("convex/values").VObject<{
|
|
169
|
+
customerAccountId: string;
|
|
170
|
+
gross: number;
|
|
171
|
+
invoiceId?: string | undefined;
|
|
172
|
+
kind: "sale";
|
|
173
|
+
paymentIntentId: string;
|
|
174
|
+
stripeAccountId?: string | undefined;
|
|
175
|
+
stripePriceId?: string | undefined;
|
|
176
|
+
stripeProductId?: string | undefined;
|
|
177
|
+
subscriptionId?: string | undefined;
|
|
178
|
+
}, {
|
|
179
|
+
kind: import("convex/values").VLiteral<"sale", "required">;
|
|
180
|
+
paymentIntentId: import("convex/values").VString<string, "required">;
|
|
181
|
+
gross: import("convex/values").VFloat64<number, "required">;
|
|
182
|
+
customerAccountId: import("convex/values").VString<string, "required">;
|
|
183
|
+
invoiceId: import("convex/values").VString<string | undefined, "optional">;
|
|
184
|
+
subscriptionId: import("convex/values").VString<string | undefined, "optional">;
|
|
185
|
+
stripeAccountId: import("convex/values").VString<string | undefined, "optional">;
|
|
186
|
+
stripePriceId: import("convex/values").VString<string | undefined, "optional">;
|
|
187
|
+
stripeProductId: import("convex/values").VString<string | undefined, "optional">;
|
|
188
|
+
}, "required", "customerAccountId" | "gross" | "invoiceId" | "kind" | "paymentIntentId" | "stripeAccountId" | "stripePriceId" | "stripeProductId" | "subscriptionId">, import("convex/values").VObject<{
|
|
189
|
+
gross: number;
|
|
190
|
+
groupKey: string;
|
|
191
|
+
kind: "invoice_recovery";
|
|
192
|
+
paymentIntentId: string;
|
|
193
|
+
}, {
|
|
194
|
+
kind: import("convex/values").VLiteral<"invoice_recovery", "required">;
|
|
195
|
+
paymentIntentId: import("convex/values").VString<string, "required">;
|
|
196
|
+
gross: import("convex/values").VFloat64<number, "required">;
|
|
197
|
+
groupKey: import("convex/values").VString<string, "required">;
|
|
198
|
+
}, "required", "gross" | "groupKey" | "kind" | "paymentIntentId">], "required", "customerAccountId" | "gross" | "groupKey" | "invoiceId" | "kind" | "paymentIntentId" | "stripeAccountId" | "stripePriceId" | "stripeProductId" | "subscriptionId">;
|
|
199
|
+
policy: import("convex/values").VObject<{
|
|
200
|
+
liability: {
|
|
201
|
+
disputeCosts: "all" | "none";
|
|
202
|
+
processingCosts: "all" | "none" | "uncovered";
|
|
203
|
+
};
|
|
204
|
+
rounding: "ceil" | "floor" | "nearest";
|
|
205
|
+
sellingFee: number;
|
|
206
|
+
}, {
|
|
207
|
+
sellingFee: import("convex/values").VFloat64<number, "required">;
|
|
208
|
+
liability: import("convex/values").VObject<{
|
|
209
|
+
disputeCosts: "all" | "none";
|
|
210
|
+
processingCosts: "all" | "none" | "uncovered";
|
|
211
|
+
}, {
|
|
212
|
+
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>;
|
|
213
|
+
disputeCosts: import("convex/values").VUnion<"all" | "none", [import("convex/values").VLiteral<"all", "required">, import("convex/values").VLiteral<"none", "required">], "required", never>;
|
|
214
|
+
}, "required", "disputeCosts" | "processingCosts">;
|
|
215
|
+
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>;
|
|
216
|
+
}, "required", "liability" | "liability.disputeCosts" | "liability.processingCosts" | "rounding" | "sellingFee">;
|
|
217
|
+
expectedRevision: import("convex/values").VFloat64<number, "required">;
|
|
218
|
+
rollback: import("convex/values").VObject<{
|
|
219
|
+
expectedRevision: number;
|
|
220
|
+
groupKey: string;
|
|
221
|
+
} | undefined, {
|
|
222
|
+
groupKey: import("convex/values").VString<string, "required">;
|
|
223
|
+
expectedRevision: import("convex/values").VFloat64<number, "required">;
|
|
224
|
+
}, "optional", "expectedRevision" | "groupKey">;
|
|
225
|
+
provider: import("convex/values").VString<string, "required">;
|
|
226
|
+
projection: import("convex/values").VString<string | undefined, "optional">;
|
|
227
|
+
importHook: import("convex/values").VString<string | undefined, "optional">;
|
|
228
|
+
providerApiVersion: import("convex/values").VString<string, "required">;
|
|
229
|
+
definitionVersion: import("convex/values").VFloat64<number, "required">;
|
|
230
|
+
maxAttempts: import("convex/values").VFloat64<number, "required">;
|
|
231
|
+
retryDelayMs: import("convex/values").VFloat64<number, "required">;
|
|
232
|
+
requestKey: import("convex/values").VString<string, "required">;
|
|
233
|
+
version: import("convex/values").VFloat64<number, "required">;
|
|
234
|
+
workflowId: import("convex/values").VString<string | undefined, "optional">;
|
|
235
|
+
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>;
|
|
236
|
+
failure: import("convex/values").VUnion<{
|
|
237
|
+
reason: "fee_pending" | "history_incomplete" | "provider_pending";
|
|
238
|
+
retryable: true;
|
|
239
|
+
status: "not_ready";
|
|
240
|
+
} | {
|
|
241
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
242
|
+
retryable: false;
|
|
243
|
+
status: "conflict";
|
|
244
|
+
} | {
|
|
245
|
+
reason: "currency_mismatch" | "invalid_scope" | "payment_not_payable" | "policy_invalid" | "unsupported_source";
|
|
246
|
+
retryable: false;
|
|
247
|
+
status: "rejected";
|
|
248
|
+
} | {
|
|
249
|
+
reason: "history_incomplete" | "provider_outcome_unknown";
|
|
250
|
+
retryable: false;
|
|
251
|
+
status: "unknown";
|
|
252
|
+
} | undefined, [import("convex/values").VObject<{
|
|
253
|
+
reason: "fee_pending" | "history_incomplete" | "provider_pending";
|
|
254
|
+
retryable: true;
|
|
255
|
+
status: "not_ready";
|
|
256
|
+
}, {
|
|
257
|
+
status: import("convex/values").VLiteral<"not_ready", "required">;
|
|
258
|
+
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>;
|
|
259
|
+
retryable: import("convex/values").VLiteral<true, "required">;
|
|
260
|
+
}, "required", "reason" | "retryable" | "status">, import("convex/values").VObject<{
|
|
261
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
262
|
+
retryable: false;
|
|
263
|
+
status: "conflict";
|
|
264
|
+
}, {
|
|
265
|
+
status: import("convex/values").VLiteral<"conflict", "required">;
|
|
266
|
+
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>;
|
|
267
|
+
retryable: import("convex/values").VLiteral<false, "required">;
|
|
268
|
+
}, "required", "reason" | "retryable" | "status">, import("convex/values").VObject<{
|
|
269
|
+
reason: "currency_mismatch" | "invalid_scope" | "payment_not_payable" | "policy_invalid" | "unsupported_source";
|
|
270
|
+
retryable: false;
|
|
271
|
+
status: "rejected";
|
|
272
|
+
}, {
|
|
273
|
+
status: import("convex/values").VLiteral<"rejected", "required">;
|
|
274
|
+
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>;
|
|
275
|
+
retryable: import("convex/values").VLiteral<false, "required">;
|
|
276
|
+
}, "required", "reason" | "retryable" | "status">, import("convex/values").VObject<{
|
|
277
|
+
reason: "history_incomplete" | "provider_outcome_unknown";
|
|
278
|
+
retryable: false;
|
|
279
|
+
status: "unknown";
|
|
280
|
+
}, {
|
|
281
|
+
status: import("convex/values").VLiteral<"unknown", "required">;
|
|
282
|
+
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>;
|
|
283
|
+
retryable: import("convex/values").VLiteral<false, "required">;
|
|
284
|
+
}, "required", "reason" | "retryable" | "status">], "optional", "reason" | "retryable" | "status">;
|
|
285
|
+
result: import("convex/values").VObject<{
|
|
286
|
+
claim: {
|
|
287
|
+
_creationTime: number;
|
|
288
|
+
_id: import("convex/values").GenericId<"recoveryClaims">;
|
|
289
|
+
accountId: string;
|
|
290
|
+
amountDue: number;
|
|
291
|
+
claimKey: string;
|
|
292
|
+
collectedAmount: number;
|
|
293
|
+
currency: string;
|
|
294
|
+
openingCollection?: {
|
|
295
|
+
amountDue: number;
|
|
296
|
+
collectedAmount: number;
|
|
297
|
+
operationKey: string;
|
|
298
|
+
revision: number;
|
|
299
|
+
} | undefined;
|
|
300
|
+
outstanding: number;
|
|
301
|
+
reservedAmount: number;
|
|
302
|
+
revision: number;
|
|
303
|
+
scopeKey: string;
|
|
304
|
+
sign: "negative" | "positive" | "zero";
|
|
305
|
+
sourceChargeId: string;
|
|
306
|
+
sourceGross: number;
|
|
307
|
+
sourceProcessingFee: number;
|
|
308
|
+
};
|
|
309
|
+
deficit: {
|
|
310
|
+
amountDue: number;
|
|
311
|
+
currency: string;
|
|
312
|
+
disputeLiability: number;
|
|
313
|
+
processingLiability: number;
|
|
314
|
+
retainedFee: number;
|
|
315
|
+
};
|
|
316
|
+
observation: {
|
|
317
|
+
currency: string;
|
|
318
|
+
disputeFees: number;
|
|
319
|
+
gross: number;
|
|
320
|
+
originalProcessingFee: number;
|
|
321
|
+
paymentIntentId: string;
|
|
322
|
+
principalReturned: number;
|
|
323
|
+
processingFee: number;
|
|
324
|
+
provenance: {
|
|
325
|
+
customerAccountId: string;
|
|
326
|
+
invoiceId: string;
|
|
327
|
+
invoicePaymentId: string;
|
|
328
|
+
recoveryInvoiceItemId?: string | undefined;
|
|
329
|
+
stripePriceId?: string | undefined;
|
|
330
|
+
stripeProductId?: string | undefined;
|
|
331
|
+
subscriptionId?: string | undefined;
|
|
332
|
+
};
|
|
333
|
+
sourceChargeId: string;
|
|
334
|
+
};
|
|
335
|
+
rollbackClaim?: {
|
|
336
|
+
_creationTime: number;
|
|
337
|
+
_id: import("convex/values").GenericId<"recoveryClaims">;
|
|
338
|
+
accountId: string;
|
|
339
|
+
amountDue: number;
|
|
340
|
+
claimKey: string;
|
|
341
|
+
collectedAmount: number;
|
|
342
|
+
currency: string;
|
|
343
|
+
openingCollection?: {
|
|
344
|
+
amountDue: number;
|
|
345
|
+
collectedAmount: number;
|
|
346
|
+
operationKey: string;
|
|
347
|
+
revision: number;
|
|
348
|
+
} | undefined;
|
|
349
|
+
outstanding: number;
|
|
350
|
+
reservedAmount: number;
|
|
351
|
+
revision: number;
|
|
352
|
+
scopeKey: string;
|
|
353
|
+
sign: "negative" | "positive" | "zero";
|
|
354
|
+
sourceChargeId: string;
|
|
355
|
+
sourceGross: number;
|
|
356
|
+
sourceProcessingFee: number;
|
|
357
|
+
} | undefined;
|
|
358
|
+
} | undefined, {
|
|
359
|
+
claim: import("convex/values").VObject<{
|
|
360
|
+
_creationTime: number;
|
|
361
|
+
_id: import("convex/values").GenericId<"recoveryClaims">;
|
|
362
|
+
accountId: string;
|
|
363
|
+
amountDue: number;
|
|
364
|
+
claimKey: string;
|
|
365
|
+
collectedAmount: number;
|
|
366
|
+
currency: string;
|
|
367
|
+
openingCollection?: {
|
|
368
|
+
amountDue: number;
|
|
369
|
+
collectedAmount: number;
|
|
370
|
+
operationKey: string;
|
|
371
|
+
revision: number;
|
|
372
|
+
} | undefined;
|
|
373
|
+
outstanding: number;
|
|
374
|
+
reservedAmount: number;
|
|
375
|
+
revision: number;
|
|
376
|
+
scopeKey: string;
|
|
377
|
+
sign: "negative" | "positive" | "zero";
|
|
378
|
+
sourceChargeId: string;
|
|
379
|
+
sourceGross: number;
|
|
380
|
+
sourceProcessingFee: number;
|
|
381
|
+
}, {
|
|
382
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
383
|
+
scopeKey: import("convex/values").VString<string, "required">;
|
|
384
|
+
currency: import("convex/values").VString<string, "required">;
|
|
385
|
+
claimKey: import("convex/values").VString<string, "required">;
|
|
386
|
+
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
387
|
+
sourceGross: import("convex/values").VFloat64<number, "required">;
|
|
388
|
+
sourceProcessingFee: import("convex/values").VFloat64<number, "required">;
|
|
389
|
+
amountDue: import("convex/values").VFloat64<number, "required">;
|
|
390
|
+
revision: import("convex/values").VFloat64<number, "required">;
|
|
391
|
+
collectedAmount: import("convex/values").VFloat64<number, "required">;
|
|
392
|
+
reservedAmount: import("convex/values").VFloat64<number, "required">;
|
|
393
|
+
outstanding: import("convex/values").VFloat64<number, "required">;
|
|
394
|
+
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>;
|
|
395
|
+
openingCollection: import("convex/values").VObject<{
|
|
396
|
+
amountDue: number;
|
|
397
|
+
collectedAmount: number;
|
|
398
|
+
operationKey: string;
|
|
399
|
+
revision: number;
|
|
400
|
+
} | undefined, {
|
|
401
|
+
operationKey: import("convex/values").VString<string, "required">;
|
|
402
|
+
amountDue: import("convex/values").VFloat64<number, "required">;
|
|
403
|
+
revision: import("convex/values").VFloat64<number, "required">;
|
|
404
|
+
collectedAmount: import("convex/values").VFloat64<number, "required">;
|
|
405
|
+
}, "optional", "amountDue" | "collectedAmount" | "operationKey" | "revision">;
|
|
406
|
+
_id: import("convex/values").VId<import("convex/values").GenericId<"recoveryClaims">, "required">;
|
|
407
|
+
_creationTime: import("convex/values").VFloat64<number, "required">;
|
|
408
|
+
}, "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">;
|
|
409
|
+
rollbackClaim: import("convex/values").VObject<{
|
|
410
|
+
_creationTime: number;
|
|
411
|
+
_id: import("convex/values").GenericId<"recoveryClaims">;
|
|
412
|
+
accountId: string;
|
|
413
|
+
amountDue: number;
|
|
414
|
+
claimKey: string;
|
|
415
|
+
collectedAmount: number;
|
|
416
|
+
currency: string;
|
|
417
|
+
openingCollection?: {
|
|
418
|
+
amountDue: number;
|
|
419
|
+
collectedAmount: number;
|
|
420
|
+
operationKey: string;
|
|
421
|
+
revision: number;
|
|
422
|
+
} | undefined;
|
|
423
|
+
outstanding: number;
|
|
424
|
+
reservedAmount: number;
|
|
425
|
+
revision: number;
|
|
426
|
+
scopeKey: string;
|
|
427
|
+
sign: "negative" | "positive" | "zero";
|
|
428
|
+
sourceChargeId: string;
|
|
429
|
+
sourceGross: number;
|
|
430
|
+
sourceProcessingFee: number;
|
|
431
|
+
} | undefined, {
|
|
432
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
433
|
+
scopeKey: import("convex/values").VString<string, "required">;
|
|
434
|
+
currency: import("convex/values").VString<string, "required">;
|
|
435
|
+
claimKey: import("convex/values").VString<string, "required">;
|
|
436
|
+
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
437
|
+
sourceGross: import("convex/values").VFloat64<number, "required">;
|
|
438
|
+
sourceProcessingFee: import("convex/values").VFloat64<number, "required">;
|
|
439
|
+
amountDue: import("convex/values").VFloat64<number, "required">;
|
|
440
|
+
revision: import("convex/values").VFloat64<number, "required">;
|
|
441
|
+
collectedAmount: import("convex/values").VFloat64<number, "required">;
|
|
442
|
+
reservedAmount: import("convex/values").VFloat64<number, "required">;
|
|
443
|
+
outstanding: import("convex/values").VFloat64<number, "required">;
|
|
444
|
+
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>;
|
|
445
|
+
openingCollection: import("convex/values").VObject<{
|
|
446
|
+
amountDue: number;
|
|
447
|
+
collectedAmount: number;
|
|
448
|
+
operationKey: string;
|
|
449
|
+
revision: number;
|
|
450
|
+
} | undefined, {
|
|
451
|
+
operationKey: import("convex/values").VString<string, "required">;
|
|
452
|
+
amountDue: import("convex/values").VFloat64<number, "required">;
|
|
453
|
+
revision: import("convex/values").VFloat64<number, "required">;
|
|
454
|
+
collectedAmount: import("convex/values").VFloat64<number, "required">;
|
|
455
|
+
}, "optional", "amountDue" | "collectedAmount" | "operationKey" | "revision">;
|
|
456
|
+
_id: import("convex/values").VId<import("convex/values").GenericId<"recoveryClaims">, "required">;
|
|
457
|
+
_creationTime: import("convex/values").VFloat64<number, "required">;
|
|
458
|
+
}, "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">;
|
|
459
|
+
deficit: import("convex/values").VObject<{
|
|
460
|
+
amountDue: number;
|
|
461
|
+
currency: string;
|
|
462
|
+
disputeLiability: number;
|
|
463
|
+
processingLiability: number;
|
|
464
|
+
retainedFee: number;
|
|
465
|
+
}, {
|
|
466
|
+
currency: import("convex/values").VString<string, "required">;
|
|
467
|
+
retainedFee: import("convex/values").VFloat64<number, "required">;
|
|
468
|
+
processingLiability: import("convex/values").VFloat64<number, "required">;
|
|
469
|
+
disputeLiability: import("convex/values").VFloat64<number, "required">;
|
|
470
|
+
amountDue: import("convex/values").VFloat64<number, "required">;
|
|
471
|
+
}, "required", "amountDue" | "currency" | "disputeLiability" | "processingLiability" | "retainedFee">;
|
|
472
|
+
observation: import("convex/values").VObject<{
|
|
473
|
+
currency: string;
|
|
474
|
+
disputeFees: number;
|
|
475
|
+
gross: number;
|
|
476
|
+
originalProcessingFee: number;
|
|
477
|
+
paymentIntentId: string;
|
|
478
|
+
principalReturned: number;
|
|
479
|
+
processingFee: number;
|
|
480
|
+
provenance: {
|
|
481
|
+
customerAccountId: string;
|
|
482
|
+
invoiceId: string;
|
|
483
|
+
invoicePaymentId: string;
|
|
484
|
+
recoveryInvoiceItemId?: string | undefined;
|
|
485
|
+
stripePriceId?: string | undefined;
|
|
486
|
+
stripeProductId?: string | undefined;
|
|
487
|
+
subscriptionId?: string | undefined;
|
|
488
|
+
};
|
|
489
|
+
sourceChargeId: string;
|
|
490
|
+
}, {
|
|
491
|
+
paymentIntentId: import("convex/values").VString<string, "required">;
|
|
492
|
+
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
493
|
+
currency: import("convex/values").VString<string, "required">;
|
|
494
|
+
gross: import("convex/values").VFloat64<number, "required">;
|
|
495
|
+
originalProcessingFee: import("convex/values").VFloat64<number, "required">;
|
|
496
|
+
processingFee: import("convex/values").VFloat64<number, "required">;
|
|
497
|
+
disputeFees: import("convex/values").VFloat64<number, "required">;
|
|
498
|
+
principalReturned: import("convex/values").VFloat64<number, "required">;
|
|
499
|
+
provenance: import("convex/values").VObject<{
|
|
500
|
+
customerAccountId: string;
|
|
501
|
+
invoiceId: string;
|
|
502
|
+
invoicePaymentId: string;
|
|
503
|
+
recoveryInvoiceItemId?: string | undefined;
|
|
504
|
+
stripePriceId?: string | undefined;
|
|
505
|
+
stripeProductId?: string | undefined;
|
|
506
|
+
subscriptionId?: string | undefined;
|
|
507
|
+
}, {
|
|
508
|
+
invoiceId: import("convex/values").VString<string, "required">;
|
|
509
|
+
invoicePaymentId: import("convex/values").VString<string, "required">;
|
|
510
|
+
recoveryInvoiceItemId: import("convex/values").VString<string | undefined, "optional">;
|
|
511
|
+
customerAccountId: import("convex/values").VString<string, "required">;
|
|
512
|
+
subscriptionId: import("convex/values").VString<string | undefined, "optional">;
|
|
513
|
+
stripePriceId: import("convex/values").VString<string | undefined, "optional">;
|
|
514
|
+
stripeProductId: import("convex/values").VString<string | undefined, "optional">;
|
|
515
|
+
}, "required", "customerAccountId" | "invoiceId" | "invoicePaymentId" | "recoveryInvoiceItemId" | "stripePriceId" | "stripeProductId" | "subscriptionId">;
|
|
516
|
+
}, "required", "currency" | "disputeFees" | "gross" | "originalProcessingFee" | "paymentIntentId" | "principalReturned" | "processingFee" | "provenance" | "provenance.customerAccountId" | "provenance.invoiceId" | "provenance.invoicePaymentId" | "provenance.recoveryInvoiceItemId" | "provenance.stripePriceId" | "provenance.stripeProductId" | "provenance.subscriptionId" | "sourceChargeId">;
|
|
517
|
+
}, "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">;
|
|
518
|
+
}, "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">, {
|
|
519
|
+
by_claim_status: ["claimKey", "status", "_creationTime"];
|
|
520
|
+
by_payment_scope: ["accountId", "scopeKey", "currency", "source.paymentIntentId", "_creationTime"];
|
|
521
|
+
by_request: ["requestKey", "_creationTime"];
|
|
522
|
+
}, {}, {}>;
|
|
12
523
|
recoveryWorkflowOperations: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
13
524
|
accountId: string;
|
|
14
525
|
activePhase?: "execute" | "reconcile" | undefined;
|
|
@@ -2877,6 +3388,517 @@ export declare function setup(amounts?: number[], currency?: string): Promise<{
|
|
|
2877
3388
|
}>;
|
|
2878
3389
|
export declare function historical(currency?: string): Promise<{
|
|
2879
3390
|
t: import("convex-test").TestConvex<import("convex/server").SchemaDefinition<{
|
|
3391
|
+
processingCostReconciliationOperations: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
3392
|
+
accountId: string;
|
|
3393
|
+
claimKey: string;
|
|
3394
|
+
currency: string;
|
|
3395
|
+
definitionVersion: number;
|
|
3396
|
+
expectedRevision: number;
|
|
3397
|
+
failure?: {
|
|
3398
|
+
reason: "fee_pending" | "history_incomplete" | "provider_pending";
|
|
3399
|
+
retryable: true;
|
|
3400
|
+
status: "not_ready";
|
|
3401
|
+
} | {
|
|
3402
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
3403
|
+
retryable: false;
|
|
3404
|
+
status: "conflict";
|
|
3405
|
+
} | {
|
|
3406
|
+
reason: "currency_mismatch" | "invalid_scope" | "payment_not_payable" | "policy_invalid" | "unsupported_source";
|
|
3407
|
+
retryable: false;
|
|
3408
|
+
status: "rejected";
|
|
3409
|
+
} | {
|
|
3410
|
+
reason: "history_incomplete" | "provider_outcome_unknown";
|
|
3411
|
+
retryable: false;
|
|
3412
|
+
status: "unknown";
|
|
3413
|
+
} | undefined;
|
|
3414
|
+
importHook?: string | undefined;
|
|
3415
|
+
maxAttempts: number;
|
|
3416
|
+
policy: {
|
|
3417
|
+
liability: {
|
|
3418
|
+
disputeCosts: "all" | "none";
|
|
3419
|
+
processingCosts: "all" | "none" | "uncovered";
|
|
3420
|
+
};
|
|
3421
|
+
rounding: "ceil" | "floor" | "nearest";
|
|
3422
|
+
sellingFee: number;
|
|
3423
|
+
};
|
|
3424
|
+
projection?: string | undefined;
|
|
3425
|
+
provider: string;
|
|
3426
|
+
providerApiVersion: string;
|
|
3427
|
+
requestKey: string;
|
|
3428
|
+
result?: {
|
|
3429
|
+
claim: {
|
|
3430
|
+
_creationTime: number;
|
|
3431
|
+
_id: import("convex/values").GenericId<"recoveryClaims">;
|
|
3432
|
+
accountId: string;
|
|
3433
|
+
amountDue: number;
|
|
3434
|
+
claimKey: string;
|
|
3435
|
+
collectedAmount: number;
|
|
3436
|
+
currency: string;
|
|
3437
|
+
openingCollection?: {
|
|
3438
|
+
amountDue: number;
|
|
3439
|
+
collectedAmount: number;
|
|
3440
|
+
operationKey: string;
|
|
3441
|
+
revision: number;
|
|
3442
|
+
} | undefined;
|
|
3443
|
+
outstanding: number;
|
|
3444
|
+
reservedAmount: number;
|
|
3445
|
+
revision: number;
|
|
3446
|
+
scopeKey: string;
|
|
3447
|
+
sign: "negative" | "positive" | "zero";
|
|
3448
|
+
sourceChargeId: string;
|
|
3449
|
+
sourceGross: number;
|
|
3450
|
+
sourceProcessingFee: number;
|
|
3451
|
+
};
|
|
3452
|
+
deficit: {
|
|
3453
|
+
amountDue: number;
|
|
3454
|
+
currency: string;
|
|
3455
|
+
disputeLiability: number;
|
|
3456
|
+
processingLiability: number;
|
|
3457
|
+
retainedFee: number;
|
|
3458
|
+
};
|
|
3459
|
+
observation: {
|
|
3460
|
+
currency: string;
|
|
3461
|
+
disputeFees: number;
|
|
3462
|
+
gross: number;
|
|
3463
|
+
originalProcessingFee: number;
|
|
3464
|
+
paymentIntentId: string;
|
|
3465
|
+
principalReturned: number;
|
|
3466
|
+
processingFee: number;
|
|
3467
|
+
provenance: {
|
|
3468
|
+
customerAccountId: string;
|
|
3469
|
+
invoiceId: string;
|
|
3470
|
+
invoicePaymentId: string;
|
|
3471
|
+
recoveryInvoiceItemId?: string | undefined;
|
|
3472
|
+
stripePriceId?: string | undefined;
|
|
3473
|
+
stripeProductId?: string | undefined;
|
|
3474
|
+
subscriptionId?: string | undefined;
|
|
3475
|
+
};
|
|
3476
|
+
sourceChargeId: string;
|
|
3477
|
+
};
|
|
3478
|
+
rollbackClaim?: {
|
|
3479
|
+
_creationTime: number;
|
|
3480
|
+
_id: import("convex/values").GenericId<"recoveryClaims">;
|
|
3481
|
+
accountId: string;
|
|
3482
|
+
amountDue: number;
|
|
3483
|
+
claimKey: string;
|
|
3484
|
+
collectedAmount: number;
|
|
3485
|
+
currency: string;
|
|
3486
|
+
openingCollection?: {
|
|
3487
|
+
amountDue: number;
|
|
3488
|
+
collectedAmount: number;
|
|
3489
|
+
operationKey: string;
|
|
3490
|
+
revision: number;
|
|
3491
|
+
} | undefined;
|
|
3492
|
+
outstanding: number;
|
|
3493
|
+
reservedAmount: number;
|
|
3494
|
+
revision: number;
|
|
3495
|
+
scopeKey: string;
|
|
3496
|
+
sign: "negative" | "positive" | "zero";
|
|
3497
|
+
sourceChargeId: string;
|
|
3498
|
+
sourceGross: number;
|
|
3499
|
+
sourceProcessingFee: number;
|
|
3500
|
+
} | undefined;
|
|
3501
|
+
} | undefined;
|
|
3502
|
+
retryDelayMs: number;
|
|
3503
|
+
rollback?: {
|
|
3504
|
+
expectedRevision: number;
|
|
3505
|
+
groupKey: string;
|
|
3506
|
+
} | undefined;
|
|
3507
|
+
scopeKey: string;
|
|
3508
|
+
source: {
|
|
3509
|
+
customerAccountId: string;
|
|
3510
|
+
gross: number;
|
|
3511
|
+
invoiceId?: string | undefined;
|
|
3512
|
+
kind: "sale";
|
|
3513
|
+
paymentIntentId: string;
|
|
3514
|
+
stripeAccountId?: string | undefined;
|
|
3515
|
+
stripePriceId?: string | undefined;
|
|
3516
|
+
stripeProductId?: string | undefined;
|
|
3517
|
+
subscriptionId?: string | undefined;
|
|
3518
|
+
} | {
|
|
3519
|
+
gross: number;
|
|
3520
|
+
groupKey: string;
|
|
3521
|
+
kind: "invoice_recovery";
|
|
3522
|
+
paymentIntentId: string;
|
|
3523
|
+
};
|
|
3524
|
+
status: "completed" | "conflict" | "queued" | "rejected" | "running" | "unknown" | "waiting";
|
|
3525
|
+
version: number;
|
|
3526
|
+
workflowId?: string | undefined;
|
|
3527
|
+
}, {
|
|
3528
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
3529
|
+
scopeKey: import("convex/values").VString<string, "required">;
|
|
3530
|
+
currency: import("convex/values").VString<string, "required">;
|
|
3531
|
+
claimKey: import("convex/values").VString<string, "required">;
|
|
3532
|
+
source: import("convex/values").VUnion<{
|
|
3533
|
+
customerAccountId: string;
|
|
3534
|
+
gross: number;
|
|
3535
|
+
invoiceId?: string | undefined;
|
|
3536
|
+
kind: "sale";
|
|
3537
|
+
paymentIntentId: string;
|
|
3538
|
+
stripeAccountId?: string | undefined;
|
|
3539
|
+
stripePriceId?: string | undefined;
|
|
3540
|
+
stripeProductId?: string | undefined;
|
|
3541
|
+
subscriptionId?: string | undefined;
|
|
3542
|
+
} | {
|
|
3543
|
+
gross: number;
|
|
3544
|
+
groupKey: string;
|
|
3545
|
+
kind: "invoice_recovery";
|
|
3546
|
+
paymentIntentId: string;
|
|
3547
|
+
}, [import("convex/values").VObject<{
|
|
3548
|
+
customerAccountId: string;
|
|
3549
|
+
gross: number;
|
|
3550
|
+
invoiceId?: string | undefined;
|
|
3551
|
+
kind: "sale";
|
|
3552
|
+
paymentIntentId: string;
|
|
3553
|
+
stripeAccountId?: string | undefined;
|
|
3554
|
+
stripePriceId?: string | undefined;
|
|
3555
|
+
stripeProductId?: string | undefined;
|
|
3556
|
+
subscriptionId?: string | undefined;
|
|
3557
|
+
}, {
|
|
3558
|
+
kind: import("convex/values").VLiteral<"sale", "required">;
|
|
3559
|
+
paymentIntentId: import("convex/values").VString<string, "required">;
|
|
3560
|
+
gross: import("convex/values").VFloat64<number, "required">;
|
|
3561
|
+
customerAccountId: import("convex/values").VString<string, "required">;
|
|
3562
|
+
invoiceId: import("convex/values").VString<string | undefined, "optional">;
|
|
3563
|
+
subscriptionId: import("convex/values").VString<string | undefined, "optional">;
|
|
3564
|
+
stripeAccountId: import("convex/values").VString<string | undefined, "optional">;
|
|
3565
|
+
stripePriceId: import("convex/values").VString<string | undefined, "optional">;
|
|
3566
|
+
stripeProductId: import("convex/values").VString<string | undefined, "optional">;
|
|
3567
|
+
}, "required", "customerAccountId" | "gross" | "invoiceId" | "kind" | "paymentIntentId" | "stripeAccountId" | "stripePriceId" | "stripeProductId" | "subscriptionId">, import("convex/values").VObject<{
|
|
3568
|
+
gross: number;
|
|
3569
|
+
groupKey: string;
|
|
3570
|
+
kind: "invoice_recovery";
|
|
3571
|
+
paymentIntentId: string;
|
|
3572
|
+
}, {
|
|
3573
|
+
kind: import("convex/values").VLiteral<"invoice_recovery", "required">;
|
|
3574
|
+
paymentIntentId: import("convex/values").VString<string, "required">;
|
|
3575
|
+
gross: import("convex/values").VFloat64<number, "required">;
|
|
3576
|
+
groupKey: import("convex/values").VString<string, "required">;
|
|
3577
|
+
}, "required", "gross" | "groupKey" | "kind" | "paymentIntentId">], "required", "customerAccountId" | "gross" | "groupKey" | "invoiceId" | "kind" | "paymentIntentId" | "stripeAccountId" | "stripePriceId" | "stripeProductId" | "subscriptionId">;
|
|
3578
|
+
policy: import("convex/values").VObject<{
|
|
3579
|
+
liability: {
|
|
3580
|
+
disputeCosts: "all" | "none";
|
|
3581
|
+
processingCosts: "all" | "none" | "uncovered";
|
|
3582
|
+
};
|
|
3583
|
+
rounding: "ceil" | "floor" | "nearest";
|
|
3584
|
+
sellingFee: number;
|
|
3585
|
+
}, {
|
|
3586
|
+
sellingFee: import("convex/values").VFloat64<number, "required">;
|
|
3587
|
+
liability: import("convex/values").VObject<{
|
|
3588
|
+
disputeCosts: "all" | "none";
|
|
3589
|
+
processingCosts: "all" | "none" | "uncovered";
|
|
3590
|
+
}, {
|
|
3591
|
+
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>;
|
|
3592
|
+
disputeCosts: import("convex/values").VUnion<"all" | "none", [import("convex/values").VLiteral<"all", "required">, import("convex/values").VLiteral<"none", "required">], "required", never>;
|
|
3593
|
+
}, "required", "disputeCosts" | "processingCosts">;
|
|
3594
|
+
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>;
|
|
3595
|
+
}, "required", "liability" | "liability.disputeCosts" | "liability.processingCosts" | "rounding" | "sellingFee">;
|
|
3596
|
+
expectedRevision: import("convex/values").VFloat64<number, "required">;
|
|
3597
|
+
rollback: import("convex/values").VObject<{
|
|
3598
|
+
expectedRevision: number;
|
|
3599
|
+
groupKey: string;
|
|
3600
|
+
} | undefined, {
|
|
3601
|
+
groupKey: import("convex/values").VString<string, "required">;
|
|
3602
|
+
expectedRevision: import("convex/values").VFloat64<number, "required">;
|
|
3603
|
+
}, "optional", "expectedRevision" | "groupKey">;
|
|
3604
|
+
provider: import("convex/values").VString<string, "required">;
|
|
3605
|
+
projection: import("convex/values").VString<string | undefined, "optional">;
|
|
3606
|
+
importHook: import("convex/values").VString<string | undefined, "optional">;
|
|
3607
|
+
providerApiVersion: import("convex/values").VString<string, "required">;
|
|
3608
|
+
definitionVersion: import("convex/values").VFloat64<number, "required">;
|
|
3609
|
+
maxAttempts: import("convex/values").VFloat64<number, "required">;
|
|
3610
|
+
retryDelayMs: import("convex/values").VFloat64<number, "required">;
|
|
3611
|
+
requestKey: import("convex/values").VString<string, "required">;
|
|
3612
|
+
version: import("convex/values").VFloat64<number, "required">;
|
|
3613
|
+
workflowId: import("convex/values").VString<string | undefined, "optional">;
|
|
3614
|
+
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>;
|
|
3615
|
+
failure: import("convex/values").VUnion<{
|
|
3616
|
+
reason: "fee_pending" | "history_incomplete" | "provider_pending";
|
|
3617
|
+
retryable: true;
|
|
3618
|
+
status: "not_ready";
|
|
3619
|
+
} | {
|
|
3620
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
3621
|
+
retryable: false;
|
|
3622
|
+
status: "conflict";
|
|
3623
|
+
} | {
|
|
3624
|
+
reason: "currency_mismatch" | "invalid_scope" | "payment_not_payable" | "policy_invalid" | "unsupported_source";
|
|
3625
|
+
retryable: false;
|
|
3626
|
+
status: "rejected";
|
|
3627
|
+
} | {
|
|
3628
|
+
reason: "history_incomplete" | "provider_outcome_unknown";
|
|
3629
|
+
retryable: false;
|
|
3630
|
+
status: "unknown";
|
|
3631
|
+
} | undefined, [import("convex/values").VObject<{
|
|
3632
|
+
reason: "fee_pending" | "history_incomplete" | "provider_pending";
|
|
3633
|
+
retryable: true;
|
|
3634
|
+
status: "not_ready";
|
|
3635
|
+
}, {
|
|
3636
|
+
status: import("convex/values").VLiteral<"not_ready", "required">;
|
|
3637
|
+
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>;
|
|
3638
|
+
retryable: import("convex/values").VLiteral<true, "required">;
|
|
3639
|
+
}, "required", "reason" | "retryable" | "status">, import("convex/values").VObject<{
|
|
3640
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
3641
|
+
retryable: false;
|
|
3642
|
+
status: "conflict";
|
|
3643
|
+
}, {
|
|
3644
|
+
status: import("convex/values").VLiteral<"conflict", "required">;
|
|
3645
|
+
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>;
|
|
3646
|
+
retryable: import("convex/values").VLiteral<false, "required">;
|
|
3647
|
+
}, "required", "reason" | "retryable" | "status">, import("convex/values").VObject<{
|
|
3648
|
+
reason: "currency_mismatch" | "invalid_scope" | "payment_not_payable" | "policy_invalid" | "unsupported_source";
|
|
3649
|
+
retryable: false;
|
|
3650
|
+
status: "rejected";
|
|
3651
|
+
}, {
|
|
3652
|
+
status: import("convex/values").VLiteral<"rejected", "required">;
|
|
3653
|
+
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>;
|
|
3654
|
+
retryable: import("convex/values").VLiteral<false, "required">;
|
|
3655
|
+
}, "required", "reason" | "retryable" | "status">, import("convex/values").VObject<{
|
|
3656
|
+
reason: "history_incomplete" | "provider_outcome_unknown";
|
|
3657
|
+
retryable: false;
|
|
3658
|
+
status: "unknown";
|
|
3659
|
+
}, {
|
|
3660
|
+
status: import("convex/values").VLiteral<"unknown", "required">;
|
|
3661
|
+
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>;
|
|
3662
|
+
retryable: import("convex/values").VLiteral<false, "required">;
|
|
3663
|
+
}, "required", "reason" | "retryable" | "status">], "optional", "reason" | "retryable" | "status">;
|
|
3664
|
+
result: import("convex/values").VObject<{
|
|
3665
|
+
claim: {
|
|
3666
|
+
_creationTime: number;
|
|
3667
|
+
_id: import("convex/values").GenericId<"recoveryClaims">;
|
|
3668
|
+
accountId: string;
|
|
3669
|
+
amountDue: number;
|
|
3670
|
+
claimKey: string;
|
|
3671
|
+
collectedAmount: number;
|
|
3672
|
+
currency: string;
|
|
3673
|
+
openingCollection?: {
|
|
3674
|
+
amountDue: number;
|
|
3675
|
+
collectedAmount: number;
|
|
3676
|
+
operationKey: string;
|
|
3677
|
+
revision: number;
|
|
3678
|
+
} | undefined;
|
|
3679
|
+
outstanding: number;
|
|
3680
|
+
reservedAmount: number;
|
|
3681
|
+
revision: number;
|
|
3682
|
+
scopeKey: string;
|
|
3683
|
+
sign: "negative" | "positive" | "zero";
|
|
3684
|
+
sourceChargeId: string;
|
|
3685
|
+
sourceGross: number;
|
|
3686
|
+
sourceProcessingFee: number;
|
|
3687
|
+
};
|
|
3688
|
+
deficit: {
|
|
3689
|
+
amountDue: number;
|
|
3690
|
+
currency: string;
|
|
3691
|
+
disputeLiability: number;
|
|
3692
|
+
processingLiability: number;
|
|
3693
|
+
retainedFee: number;
|
|
3694
|
+
};
|
|
3695
|
+
observation: {
|
|
3696
|
+
currency: string;
|
|
3697
|
+
disputeFees: number;
|
|
3698
|
+
gross: number;
|
|
3699
|
+
originalProcessingFee: number;
|
|
3700
|
+
paymentIntentId: string;
|
|
3701
|
+
principalReturned: number;
|
|
3702
|
+
processingFee: number;
|
|
3703
|
+
provenance: {
|
|
3704
|
+
customerAccountId: string;
|
|
3705
|
+
invoiceId: string;
|
|
3706
|
+
invoicePaymentId: string;
|
|
3707
|
+
recoveryInvoiceItemId?: string | undefined;
|
|
3708
|
+
stripePriceId?: string | undefined;
|
|
3709
|
+
stripeProductId?: string | undefined;
|
|
3710
|
+
subscriptionId?: string | undefined;
|
|
3711
|
+
};
|
|
3712
|
+
sourceChargeId: string;
|
|
3713
|
+
};
|
|
3714
|
+
rollbackClaim?: {
|
|
3715
|
+
_creationTime: number;
|
|
3716
|
+
_id: import("convex/values").GenericId<"recoveryClaims">;
|
|
3717
|
+
accountId: string;
|
|
3718
|
+
amountDue: number;
|
|
3719
|
+
claimKey: string;
|
|
3720
|
+
collectedAmount: number;
|
|
3721
|
+
currency: string;
|
|
3722
|
+
openingCollection?: {
|
|
3723
|
+
amountDue: number;
|
|
3724
|
+
collectedAmount: number;
|
|
3725
|
+
operationKey: string;
|
|
3726
|
+
revision: number;
|
|
3727
|
+
} | undefined;
|
|
3728
|
+
outstanding: number;
|
|
3729
|
+
reservedAmount: number;
|
|
3730
|
+
revision: number;
|
|
3731
|
+
scopeKey: string;
|
|
3732
|
+
sign: "negative" | "positive" | "zero";
|
|
3733
|
+
sourceChargeId: string;
|
|
3734
|
+
sourceGross: number;
|
|
3735
|
+
sourceProcessingFee: number;
|
|
3736
|
+
} | undefined;
|
|
3737
|
+
} | undefined, {
|
|
3738
|
+
claim: import("convex/values").VObject<{
|
|
3739
|
+
_creationTime: number;
|
|
3740
|
+
_id: import("convex/values").GenericId<"recoveryClaims">;
|
|
3741
|
+
accountId: string;
|
|
3742
|
+
amountDue: number;
|
|
3743
|
+
claimKey: string;
|
|
3744
|
+
collectedAmount: number;
|
|
3745
|
+
currency: string;
|
|
3746
|
+
openingCollection?: {
|
|
3747
|
+
amountDue: number;
|
|
3748
|
+
collectedAmount: number;
|
|
3749
|
+
operationKey: string;
|
|
3750
|
+
revision: number;
|
|
3751
|
+
} | undefined;
|
|
3752
|
+
outstanding: number;
|
|
3753
|
+
reservedAmount: number;
|
|
3754
|
+
revision: number;
|
|
3755
|
+
scopeKey: string;
|
|
3756
|
+
sign: "negative" | "positive" | "zero";
|
|
3757
|
+
sourceChargeId: string;
|
|
3758
|
+
sourceGross: number;
|
|
3759
|
+
sourceProcessingFee: number;
|
|
3760
|
+
}, {
|
|
3761
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
3762
|
+
scopeKey: import("convex/values").VString<string, "required">;
|
|
3763
|
+
currency: import("convex/values").VString<string, "required">;
|
|
3764
|
+
claimKey: import("convex/values").VString<string, "required">;
|
|
3765
|
+
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
3766
|
+
sourceGross: import("convex/values").VFloat64<number, "required">;
|
|
3767
|
+
sourceProcessingFee: import("convex/values").VFloat64<number, "required">;
|
|
3768
|
+
amountDue: import("convex/values").VFloat64<number, "required">;
|
|
3769
|
+
revision: import("convex/values").VFloat64<number, "required">;
|
|
3770
|
+
collectedAmount: import("convex/values").VFloat64<number, "required">;
|
|
3771
|
+
reservedAmount: import("convex/values").VFloat64<number, "required">;
|
|
3772
|
+
outstanding: import("convex/values").VFloat64<number, "required">;
|
|
3773
|
+
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>;
|
|
3774
|
+
openingCollection: import("convex/values").VObject<{
|
|
3775
|
+
amountDue: number;
|
|
3776
|
+
collectedAmount: number;
|
|
3777
|
+
operationKey: string;
|
|
3778
|
+
revision: number;
|
|
3779
|
+
} | undefined, {
|
|
3780
|
+
operationKey: import("convex/values").VString<string, "required">;
|
|
3781
|
+
amountDue: import("convex/values").VFloat64<number, "required">;
|
|
3782
|
+
revision: import("convex/values").VFloat64<number, "required">;
|
|
3783
|
+
collectedAmount: import("convex/values").VFloat64<number, "required">;
|
|
3784
|
+
}, "optional", "amountDue" | "collectedAmount" | "operationKey" | "revision">;
|
|
3785
|
+
_id: import("convex/values").VId<import("convex/values").GenericId<"recoveryClaims">, "required">;
|
|
3786
|
+
_creationTime: import("convex/values").VFloat64<number, "required">;
|
|
3787
|
+
}, "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">;
|
|
3788
|
+
rollbackClaim: import("convex/values").VObject<{
|
|
3789
|
+
_creationTime: number;
|
|
3790
|
+
_id: import("convex/values").GenericId<"recoveryClaims">;
|
|
3791
|
+
accountId: string;
|
|
3792
|
+
amountDue: number;
|
|
3793
|
+
claimKey: string;
|
|
3794
|
+
collectedAmount: number;
|
|
3795
|
+
currency: string;
|
|
3796
|
+
openingCollection?: {
|
|
3797
|
+
amountDue: number;
|
|
3798
|
+
collectedAmount: number;
|
|
3799
|
+
operationKey: string;
|
|
3800
|
+
revision: number;
|
|
3801
|
+
} | undefined;
|
|
3802
|
+
outstanding: number;
|
|
3803
|
+
reservedAmount: number;
|
|
3804
|
+
revision: number;
|
|
3805
|
+
scopeKey: string;
|
|
3806
|
+
sign: "negative" | "positive" | "zero";
|
|
3807
|
+
sourceChargeId: string;
|
|
3808
|
+
sourceGross: number;
|
|
3809
|
+
sourceProcessingFee: number;
|
|
3810
|
+
} | undefined, {
|
|
3811
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
3812
|
+
scopeKey: import("convex/values").VString<string, "required">;
|
|
3813
|
+
currency: import("convex/values").VString<string, "required">;
|
|
3814
|
+
claimKey: import("convex/values").VString<string, "required">;
|
|
3815
|
+
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
3816
|
+
sourceGross: import("convex/values").VFloat64<number, "required">;
|
|
3817
|
+
sourceProcessingFee: import("convex/values").VFloat64<number, "required">;
|
|
3818
|
+
amountDue: import("convex/values").VFloat64<number, "required">;
|
|
3819
|
+
revision: import("convex/values").VFloat64<number, "required">;
|
|
3820
|
+
collectedAmount: import("convex/values").VFloat64<number, "required">;
|
|
3821
|
+
reservedAmount: import("convex/values").VFloat64<number, "required">;
|
|
3822
|
+
outstanding: import("convex/values").VFloat64<number, "required">;
|
|
3823
|
+
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>;
|
|
3824
|
+
openingCollection: import("convex/values").VObject<{
|
|
3825
|
+
amountDue: number;
|
|
3826
|
+
collectedAmount: number;
|
|
3827
|
+
operationKey: string;
|
|
3828
|
+
revision: number;
|
|
3829
|
+
} | undefined, {
|
|
3830
|
+
operationKey: import("convex/values").VString<string, "required">;
|
|
3831
|
+
amountDue: import("convex/values").VFloat64<number, "required">;
|
|
3832
|
+
revision: import("convex/values").VFloat64<number, "required">;
|
|
3833
|
+
collectedAmount: import("convex/values").VFloat64<number, "required">;
|
|
3834
|
+
}, "optional", "amountDue" | "collectedAmount" | "operationKey" | "revision">;
|
|
3835
|
+
_id: import("convex/values").VId<import("convex/values").GenericId<"recoveryClaims">, "required">;
|
|
3836
|
+
_creationTime: import("convex/values").VFloat64<number, "required">;
|
|
3837
|
+
}, "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">;
|
|
3838
|
+
deficit: import("convex/values").VObject<{
|
|
3839
|
+
amountDue: number;
|
|
3840
|
+
currency: string;
|
|
3841
|
+
disputeLiability: number;
|
|
3842
|
+
processingLiability: number;
|
|
3843
|
+
retainedFee: number;
|
|
3844
|
+
}, {
|
|
3845
|
+
currency: import("convex/values").VString<string, "required">;
|
|
3846
|
+
retainedFee: import("convex/values").VFloat64<number, "required">;
|
|
3847
|
+
processingLiability: import("convex/values").VFloat64<number, "required">;
|
|
3848
|
+
disputeLiability: import("convex/values").VFloat64<number, "required">;
|
|
3849
|
+
amountDue: import("convex/values").VFloat64<number, "required">;
|
|
3850
|
+
}, "required", "amountDue" | "currency" | "disputeLiability" | "processingLiability" | "retainedFee">;
|
|
3851
|
+
observation: import("convex/values").VObject<{
|
|
3852
|
+
currency: string;
|
|
3853
|
+
disputeFees: number;
|
|
3854
|
+
gross: number;
|
|
3855
|
+
originalProcessingFee: number;
|
|
3856
|
+
paymentIntentId: string;
|
|
3857
|
+
principalReturned: number;
|
|
3858
|
+
processingFee: number;
|
|
3859
|
+
provenance: {
|
|
3860
|
+
customerAccountId: string;
|
|
3861
|
+
invoiceId: string;
|
|
3862
|
+
invoicePaymentId: string;
|
|
3863
|
+
recoveryInvoiceItemId?: string | undefined;
|
|
3864
|
+
stripePriceId?: string | undefined;
|
|
3865
|
+
stripeProductId?: string | undefined;
|
|
3866
|
+
subscriptionId?: string | undefined;
|
|
3867
|
+
};
|
|
3868
|
+
sourceChargeId: string;
|
|
3869
|
+
}, {
|
|
3870
|
+
paymentIntentId: import("convex/values").VString<string, "required">;
|
|
3871
|
+
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
3872
|
+
currency: import("convex/values").VString<string, "required">;
|
|
3873
|
+
gross: import("convex/values").VFloat64<number, "required">;
|
|
3874
|
+
originalProcessingFee: import("convex/values").VFloat64<number, "required">;
|
|
3875
|
+
processingFee: import("convex/values").VFloat64<number, "required">;
|
|
3876
|
+
disputeFees: import("convex/values").VFloat64<number, "required">;
|
|
3877
|
+
principalReturned: import("convex/values").VFloat64<number, "required">;
|
|
3878
|
+
provenance: import("convex/values").VObject<{
|
|
3879
|
+
customerAccountId: string;
|
|
3880
|
+
invoiceId: string;
|
|
3881
|
+
invoicePaymentId: string;
|
|
3882
|
+
recoveryInvoiceItemId?: string | undefined;
|
|
3883
|
+
stripePriceId?: string | undefined;
|
|
3884
|
+
stripeProductId?: string | undefined;
|
|
3885
|
+
subscriptionId?: string | undefined;
|
|
3886
|
+
}, {
|
|
3887
|
+
invoiceId: import("convex/values").VString<string, "required">;
|
|
3888
|
+
invoicePaymentId: import("convex/values").VString<string, "required">;
|
|
3889
|
+
recoveryInvoiceItemId: import("convex/values").VString<string | undefined, "optional">;
|
|
3890
|
+
customerAccountId: import("convex/values").VString<string, "required">;
|
|
3891
|
+
subscriptionId: import("convex/values").VString<string | undefined, "optional">;
|
|
3892
|
+
stripePriceId: import("convex/values").VString<string | undefined, "optional">;
|
|
3893
|
+
stripeProductId: import("convex/values").VString<string | undefined, "optional">;
|
|
3894
|
+
}, "required", "customerAccountId" | "invoiceId" | "invoicePaymentId" | "recoveryInvoiceItemId" | "stripePriceId" | "stripeProductId" | "subscriptionId">;
|
|
3895
|
+
}, "required", "currency" | "disputeFees" | "gross" | "originalProcessingFee" | "paymentIntentId" | "principalReturned" | "processingFee" | "provenance" | "provenance.customerAccountId" | "provenance.invoiceId" | "provenance.invoicePaymentId" | "provenance.recoveryInvoiceItemId" | "provenance.stripePriceId" | "provenance.stripeProductId" | "provenance.subscriptionId" | "sourceChargeId">;
|
|
3896
|
+
}, "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">;
|
|
3897
|
+
}, "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">, {
|
|
3898
|
+
by_claim_status: ["claimKey", "status", "_creationTime"];
|
|
3899
|
+
by_payment_scope: ["accountId", "scopeKey", "currency", "source.paymentIntentId", "_creationTime"];
|
|
3900
|
+
by_request: ["requestKey", "_creationTime"];
|
|
3901
|
+
}, {}, {}>;
|
|
2880
3902
|
recoveryWorkflowOperations: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
2881
3903
|
accountId: string;
|
|
2882
3904
|
activePhase?: "execute" | "reconcile" | undefined;
|