@fantastic.dev/better-stripe 0.12.0 → 0.14.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 +24 -0
- package/README.md +93 -8
- package/dist/client/connect/disputes.d.ts +20 -0
- package/dist/client/connect/disputes.d.ts.map +1 -1
- package/dist/client/connect/disputes.js +55 -0
- package/dist/client/connect/disputes.js.map +1 -1
- package/dist/client/costRecovery-invoices.d.ts +44 -0
- package/dist/client/costRecovery-invoices.d.ts.map +1 -0
- package/dist/client/costRecovery-invoices.js +109 -0
- package/dist/client/costRecovery-invoices.js.map +1 -0
- package/dist/client/costRecovery.d.ts +59 -2
- package/dist/client/costRecovery.d.ts.map +1 -1
- package/dist/client/costRecovery.js +73 -2
- package/dist/client/costRecovery.js.map +1 -1
- package/dist/client/errors.d.ts +1 -1
- package/dist/client/errors.d.ts.map +1 -1
- package/dist/client/errors.js.map +1 -1
- package/dist/client/index.d.ts +5 -14
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +4 -8
- package/dist/client/index.js.map +1 -1
- package/dist/component/_generated/component.d.ts +137 -0
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/costRecovery/claims.d.ts +12 -0
- package/dist/component/costRecovery/claims.d.ts.map +1 -1
- package/dist/component/costRecovery/claims.js +15 -8
- package/dist/component/costRecovery/claims.js.map +1 -1
- package/dist/component/costRecovery/completion.d.ts +6 -0
- package/dist/component/costRecovery/completion.d.ts.map +1 -1
- package/dist/component/costRecovery/helpers.d.ts +6 -0
- package/dist/component/costRecovery/helpers.d.ts.map +1 -1
- package/dist/component/costRecovery/imports.d.ts +53 -0
- package/dist/component/costRecovery/imports.d.ts.map +1 -0
- package/dist/component/costRecovery/imports.js +67 -0
- package/dist/component/costRecovery/imports.js.map +1 -0
- package/dist/component/costRecovery/mutations.d.ts +119 -0
- package/dist/component/costRecovery/mutations.d.ts.map +1 -1
- package/dist/component/costRecovery/mutations.js +64 -1
- package/dist/component/costRecovery/mutations.js.map +1 -1
- package/dist/component/costRecovery/queries.d.ts +18 -0
- package/dist/component/costRecovery/queries.d.ts.map +1 -1
- package/dist/component/costRecovery/reservations.d.ts +12 -0
- package/dist/component/costRecovery/reservations.d.ts.map +1 -1
- package/dist/component/costRecovery/schema.d.ts +116 -4
- package/dist/component/costRecovery/schema.d.ts.map +1 -1
- package/dist/component/costRecovery/schema.js +19 -0
- package/dist/component/costRecovery/schema.js.map +1 -1
- package/dist/component/schema.d.ts +36 -2
- package/dist/react/workflows/Collections.d.ts.map +1 -1
- package/dist/react/workflows/Collections.js +2 -1
- package/dist/react/workflows/Collections.js.map +1 -1
- package/dist/react/workflows/EvidenceUpload.d.ts +18 -0
- package/dist/react/workflows/EvidenceUpload.d.ts.map +1 -0
- package/dist/react/workflows/EvidenceUpload.js +35 -0
- package/dist/react/workflows/EvidenceUpload.js.map +1 -0
- package/dist/react/workflows/Onboarding.d.ts +3 -3
- package/dist/react/workflows/Onboarding.d.ts.map +1 -1
- package/dist/react/workflows/Onboarding.js +8 -6
- package/dist/react/workflows/Onboarding.js.map +1 -1
- package/dist/react/workflows/Refunds.d.ts +14 -3
- package/dist/react/workflows/Refunds.d.ts.map +1 -1
- package/dist/react/workflows/Refunds.js +58 -16
- package/dist/react/workflows/Refunds.js.map +1 -1
- package/dist/react/workflows/index.d.ts +5 -1
- package/dist/react/workflows/index.d.ts.map +1 -1
- package/dist/react/workflows/index.js +3 -1
- package/dist/react/workflows/index.js.map +1 -1
- package/dist/react/workflows/refund-preview.d.ts +16 -0
- package/dist/react/workflows/refund-preview.d.ts.map +1 -0
- package/dist/react/workflows/refund-preview.js +38 -0
- package/dist/react/workflows/refund-preview.js.map +1 -0
- package/dist/react/workflows/useWorkflowAction.d.ts +1 -1
- package/dist/react/workflows/useWorkflowAction.d.ts.map +1 -1
- package/dist/react/workflows/useWorkflowAction.js +6 -2
- package/dist/react/workflows/useWorkflowAction.js.map +1 -1
- package/docs/react-workflows.md +121 -4
- package/package.json +1 -1
- package/src/client/connect/dispute-upload.test.ts +208 -0
- package/src/client/connect/disputes.ts +103 -0
- package/src/client/costRecovery-import.test.ts +174 -0
- package/src/client/costRecovery-invoices.test.ts +470 -0
- package/src/client/costRecovery-invoices.transport.test.ts +107 -0
- package/src/client/costRecovery-invoices.ts +176 -0
- package/src/client/costRecovery.ts +123 -2
- package/src/client/errors.ts +1 -0
- package/src/client/index.ts +15 -14
- package/src/component/_generated/api.ts +2 -0
- package/src/component/_generated/component.ts +164 -0
- package/src/component/costRecovery/claims.ts +18 -8
- package/src/component/costRecovery/imports.ts +74 -0
- package/src/component/costRecovery/mutations.ts +80 -0
- package/src/component/costRecovery/schema.ts +21 -0
- package/src/react/workflows/Collections.test.tsx +36 -0
- package/src/react/workflows/Collections.tsx +3 -1
- package/src/react/workflows/EvidenceUpload.test.tsx +56 -0
- package/src/react/workflows/EvidenceUpload.tsx +71 -0
- package/src/react/workflows/Onboarding.test.tsx +73 -0
- package/src/react/workflows/Onboarding.tsx +8 -5
- package/src/react/workflows/Refunds.currency.test.tsx +290 -0
- package/src/react/workflows/Refunds.tsx +115 -25
- package/src/react/workflows/index.ts +11 -1
- package/src/react/workflows/refund-preview.test.ts +65 -0
- package/src/react/workflows/refund-preview.ts +56 -0
- package/src/react/workflows/useWorkflowAction.ts +6 -1
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { type Infer } from "convex/values";
|
|
2
|
+
import type { MutationCtx } from "../_generated/server.js";
|
|
3
|
+
declare const _argsValidator: import("convex/values").VObject<{
|
|
4
|
+
accountId: string;
|
|
5
|
+
amountDue: number;
|
|
6
|
+
claimKey: string;
|
|
7
|
+
collectedAmount: number;
|
|
8
|
+
currency: string;
|
|
9
|
+
operationKey: string;
|
|
10
|
+
revision: number;
|
|
11
|
+
scopeKey: string;
|
|
12
|
+
sourceChargeId: string;
|
|
13
|
+
sourceGross: number;
|
|
14
|
+
sourceProcessingFee: number;
|
|
15
|
+
}, {
|
|
16
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
17
|
+
scopeKey: import("convex/values").VString<string, "required">;
|
|
18
|
+
currency: import("convex/values").VString<string, "required">;
|
|
19
|
+
claimKey: import("convex/values").VString<string, "required">;
|
|
20
|
+
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
21
|
+
sourceGross: import("convex/values").VFloat64<number, "required">;
|
|
22
|
+
sourceProcessingFee: import("convex/values").VFloat64<number, "required">;
|
|
23
|
+
amountDue: import("convex/values").VFloat64<number, "required">;
|
|
24
|
+
revision: import("convex/values").VFloat64<number, "required">;
|
|
25
|
+
operationKey: import("convex/values").VString<string, "required">;
|
|
26
|
+
collectedAmount: import("convex/values").VFloat64<number, "required">;
|
|
27
|
+
}, "required", "accountId" | "amountDue" | "claimKey" | "collectedAmount" | "currency" | "operationKey" | "revision" | "scopeKey" | "sourceChargeId" | "sourceGross" | "sourceProcessingFee">;
|
|
28
|
+
/** The host verifies historical collection; this operation performs no provider IO. */
|
|
29
|
+
export declare function importOpeningClaim(ctx: MutationCtx, args: Infer<typeof _argsValidator>): Promise<{
|
|
30
|
+
_creationTime: number;
|
|
31
|
+
_id: import("convex/values").GenericId<"recoveryClaims">;
|
|
32
|
+
accountId: string;
|
|
33
|
+
amountDue: number;
|
|
34
|
+
claimKey: string;
|
|
35
|
+
collectedAmount: number;
|
|
36
|
+
currency: string;
|
|
37
|
+
openingCollection?: {
|
|
38
|
+
amountDue: number;
|
|
39
|
+
collectedAmount: number;
|
|
40
|
+
operationKey: string;
|
|
41
|
+
revision: number;
|
|
42
|
+
} | undefined;
|
|
43
|
+
outstanding: number;
|
|
44
|
+
reservedAmount: number;
|
|
45
|
+
revision: number;
|
|
46
|
+
scopeKey: string;
|
|
47
|
+
sign: "negative" | "positive" | "zero";
|
|
48
|
+
sourceChargeId: string;
|
|
49
|
+
sourceGross: number;
|
|
50
|
+
sourceProcessingFee: number;
|
|
51
|
+
}>;
|
|
52
|
+
export {};
|
|
53
|
+
//# sourceMappingURL=imports.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"imports.d.ts","sourceRoot":"","sources":["../../../src/component/costRecovery/imports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAK,KAAK,KAAK,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAI3D,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;6LAAuB,CAAC;AAC5C,uFAAuF;AACvF,wBAAsB,kBAAkB,CACtC,GAAG,EAAE,WAAW,EAChB,IAAI,EAAE,KAAK,CAAC,OAAO,cAAc,CAAC;;;;;;;;;;;;;;;;;;;;;;GAgEnC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { v } from "convex/values";
|
|
2
|
+
import { importArgs } from "./schema.js";
|
|
3
|
+
import { recordClaim } from "./claims.js";
|
|
4
|
+
import { adjustTotals, balance, integer, sign } from "./helpers.js";
|
|
5
|
+
const _argsValidator = v.object(importArgs);
|
|
6
|
+
/** The host verifies historical collection; this operation performs no provider IO. */
|
|
7
|
+
export async function importOpeningClaim(ctx, args) {
|
|
8
|
+
integer(args.collectedAmount);
|
|
9
|
+
if (!args.operationKey.trim() || args.claimKey.startsWith("rollback:"))
|
|
10
|
+
throw new Error("Invalid recovery import identity.");
|
|
11
|
+
const imported = await ctx.db
|
|
12
|
+
.query("recoveryClaims")
|
|
13
|
+
.withIndex("by_import", (q) => q.eq("openingCollection.operationKey", args.operationKey))
|
|
14
|
+
.unique();
|
|
15
|
+
if (imported && imported.claimKey !== args.claimKey)
|
|
16
|
+
throw new Error("Recovery import identity cannot change.");
|
|
17
|
+
const existing = await ctx.db
|
|
18
|
+
.query("recoveryClaims")
|
|
19
|
+
.withIndex("by_key", (q) => q.eq("claimKey", args.claimKey))
|
|
20
|
+
.unique();
|
|
21
|
+
const openingCollection = {
|
|
22
|
+
operationKey: args.operationKey,
|
|
23
|
+
amountDue: args.amountDue,
|
|
24
|
+
revision: args.revision,
|
|
25
|
+
collectedAmount: args.collectedAmount,
|
|
26
|
+
};
|
|
27
|
+
if (existing) {
|
|
28
|
+
for (const key of [
|
|
29
|
+
"accountId",
|
|
30
|
+
"scopeKey",
|
|
31
|
+
"currency",
|
|
32
|
+
"sourceChargeId",
|
|
33
|
+
"sourceGross",
|
|
34
|
+
"sourceProcessingFee",
|
|
35
|
+
])
|
|
36
|
+
if (existing[key] !== args[key])
|
|
37
|
+
throw new Error("Recovery import source identity cannot change.");
|
|
38
|
+
if (!existing.openingCollection)
|
|
39
|
+
throw new Error("Cannot import over an existing live recovery claim.");
|
|
40
|
+
for (const key of [
|
|
41
|
+
"operationKey",
|
|
42
|
+
"amountDue",
|
|
43
|
+
"revision",
|
|
44
|
+
"collectedAmount",
|
|
45
|
+
])
|
|
46
|
+
if (existing.openingCollection[key] !== openingCollection[key])
|
|
47
|
+
throw new Error("Recovery opening snapshot cannot change.");
|
|
48
|
+
return existing;
|
|
49
|
+
}
|
|
50
|
+
if ((await balance(ctx, args)).activeGroupKey)
|
|
51
|
+
throw new Error("Cannot import while another recovery boundary is pending.");
|
|
52
|
+
const { operationKey: _operationKey, collectedAmount, ...observation } = args;
|
|
53
|
+
const claim = await recordClaim(ctx, observation);
|
|
54
|
+
const outstanding = integer(claim.amountDue - collectedAmount);
|
|
55
|
+
await ctx.db.patch("recoveryClaims", claim._id, {
|
|
56
|
+
collectedAmount,
|
|
57
|
+
outstanding,
|
|
58
|
+
sign: sign(outstanding),
|
|
59
|
+
openingCollection,
|
|
60
|
+
});
|
|
61
|
+
await adjustTotals(ctx, args, {
|
|
62
|
+
collectedAmount,
|
|
63
|
+
outstanding: -collectedAmount,
|
|
64
|
+
});
|
|
65
|
+
return (await ctx.db.get("recoveryClaims", claim._id));
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=imports.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"imports.js","sourceRoot":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AAG,EAAE;QAC9C,eAAe;QACf,WAAW;QACX,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC;QACvB,iBAAiB;KAClB,CAAC,CAAC;IACH,MAAM,YAAY,CAAC,GAAG,EAAE,IAAI,EAAE;QAC5B,eAAe;QACf,WAAW,EAAE,CAAC,eAAe;KAC9B,CAAC,CAAC;IACH,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,gBAAgB,EAAE,KAAK,CAAC,GAAG,CAAC,CAAE,CAAC;AAC1D,CAAC"}
|
|
@@ -16,6 +16,12 @@ export declare const record: import("convex/server").RegisteredMutation<"public"
|
|
|
16
16
|
claimKey: string;
|
|
17
17
|
collectedAmount: number;
|
|
18
18
|
currency: string;
|
|
19
|
+
openingCollection?: {
|
|
20
|
+
amountDue: number;
|
|
21
|
+
collectedAmount: number;
|
|
22
|
+
operationKey: string;
|
|
23
|
+
revision: number;
|
|
24
|
+
} | undefined;
|
|
19
25
|
outstanding: number;
|
|
20
26
|
reservedAmount: number;
|
|
21
27
|
revision: number;
|
|
@@ -37,6 +43,12 @@ export declare const rollback: import("convex/server").RegisteredMutation<"publi
|
|
|
37
43
|
claimKey: string;
|
|
38
44
|
collectedAmount: number;
|
|
39
45
|
currency: string;
|
|
46
|
+
openingCollection?: {
|
|
47
|
+
amountDue: number;
|
|
48
|
+
collectedAmount: number;
|
|
49
|
+
operationKey: string;
|
|
50
|
+
revision: number;
|
|
51
|
+
} | undefined;
|
|
40
52
|
outstanding: number;
|
|
41
53
|
reservedAmount: number;
|
|
42
54
|
revision: number;
|
|
@@ -81,6 +93,12 @@ export declare const reserve: import("convex/server").RegisteredMutation<"public
|
|
|
81
93
|
amount: number;
|
|
82
94
|
currency: string;
|
|
83
95
|
groupKey: string;
|
|
96
|
+
invoiceFunding?: {
|
|
97
|
+
sourceChargeId: string;
|
|
98
|
+
sourceGross: number;
|
|
99
|
+
sourceProcessingFee: number;
|
|
100
|
+
} | undefined;
|
|
101
|
+
invoiceItemId?: string | undefined;
|
|
84
102
|
maxCredit: number;
|
|
85
103
|
maxDebit: number;
|
|
86
104
|
pendingOperations: number;
|
|
@@ -101,6 +119,12 @@ export declare const seal: import("convex/server").RegisteredMutation<"public",
|
|
|
101
119
|
amount: number;
|
|
102
120
|
currency: string;
|
|
103
121
|
groupKey: string;
|
|
122
|
+
invoiceFunding?: {
|
|
123
|
+
sourceChargeId: string;
|
|
124
|
+
sourceGross: number;
|
|
125
|
+
sourceProcessingFee: number;
|
|
126
|
+
} | undefined;
|
|
127
|
+
invoiceItemId?: string | undefined;
|
|
104
128
|
maxCredit: number;
|
|
105
129
|
maxDebit: number;
|
|
106
130
|
pendingOperations: number;
|
|
@@ -123,6 +147,12 @@ export declare const finish: import("convex/server").RegisteredMutation<"public"
|
|
|
123
147
|
amount: number;
|
|
124
148
|
currency: string;
|
|
125
149
|
groupKey: string;
|
|
150
|
+
invoiceFunding?: {
|
|
151
|
+
sourceChargeId: string;
|
|
152
|
+
sourceGross: number;
|
|
153
|
+
sourceProcessingFee: number;
|
|
154
|
+
} | undefined;
|
|
155
|
+
invoiceItemId?: string | undefined;
|
|
126
156
|
maxCredit: number;
|
|
127
157
|
maxDebit: number;
|
|
128
158
|
pendingOperations: number;
|
|
@@ -135,4 +165,93 @@ export declare const finish: import("convex/server").RegisteredMutation<"public"
|
|
|
135
165
|
};
|
|
136
166
|
isDone: boolean;
|
|
137
167
|
}>>;
|
|
168
|
+
export declare const bindInvoiceItem: import("convex/server").RegisteredMutation<"public", {
|
|
169
|
+
groupKey: string;
|
|
170
|
+
invoiceItemId: string;
|
|
171
|
+
}, Promise<{
|
|
172
|
+
_creationTime: number;
|
|
173
|
+
_id: import("convex/values").GenericId<"recoveryGroups">;
|
|
174
|
+
accountId: string;
|
|
175
|
+
amount: number;
|
|
176
|
+
currency: string;
|
|
177
|
+
groupKey: string;
|
|
178
|
+
invoiceFunding?: {
|
|
179
|
+
sourceChargeId: string;
|
|
180
|
+
sourceGross: number;
|
|
181
|
+
sourceProcessingFee: number;
|
|
182
|
+
} | undefined;
|
|
183
|
+
invoiceItemId?: string | undefined;
|
|
184
|
+
maxCredit: number;
|
|
185
|
+
maxDebit: number;
|
|
186
|
+
pendingOperations: number;
|
|
187
|
+
scopeKey: string;
|
|
188
|
+
sourceGross?: number | undefined;
|
|
189
|
+
sourceId: string;
|
|
190
|
+
sourceKind: "invoice" | "settlement";
|
|
191
|
+
sourceProcessingFee?: number | undefined;
|
|
192
|
+
status: "collected" | "collecting" | "open" | "released" | "releasing" | "sealed";
|
|
193
|
+
}>>;
|
|
194
|
+
export declare const bindInvoiceFunding: import("convex/server").RegisteredMutation<"public", {
|
|
195
|
+
groupKey: string;
|
|
196
|
+
sourceChargeId: string;
|
|
197
|
+
sourceGross: number;
|
|
198
|
+
sourceProcessingFee: number;
|
|
199
|
+
}, Promise<{
|
|
200
|
+
_creationTime: number;
|
|
201
|
+
_id: import("convex/values").GenericId<"recoveryGroups">;
|
|
202
|
+
accountId: string;
|
|
203
|
+
amount: number;
|
|
204
|
+
currency: string;
|
|
205
|
+
groupKey: string;
|
|
206
|
+
invoiceFunding?: {
|
|
207
|
+
sourceChargeId: string;
|
|
208
|
+
sourceGross: number;
|
|
209
|
+
sourceProcessingFee: number;
|
|
210
|
+
} | undefined;
|
|
211
|
+
invoiceItemId?: string | undefined;
|
|
212
|
+
maxCredit: number;
|
|
213
|
+
maxDebit: number;
|
|
214
|
+
pendingOperations: number;
|
|
215
|
+
scopeKey: string;
|
|
216
|
+
sourceGross?: number | undefined;
|
|
217
|
+
sourceId: string;
|
|
218
|
+
sourceKind: "invoice" | "settlement";
|
|
219
|
+
sourceProcessingFee?: number | undefined;
|
|
220
|
+
status: "collected" | "collecting" | "open" | "released" | "releasing" | "sealed";
|
|
221
|
+
}>>;
|
|
222
|
+
export declare const importClaim: import("convex/server").RegisteredMutation<"public", {
|
|
223
|
+
accountId: string;
|
|
224
|
+
amountDue: number;
|
|
225
|
+
claimKey: string;
|
|
226
|
+
collectedAmount: number;
|
|
227
|
+
currency: string;
|
|
228
|
+
operationKey: string;
|
|
229
|
+
revision: number;
|
|
230
|
+
scopeKey: string;
|
|
231
|
+
sourceChargeId: string;
|
|
232
|
+
sourceGross: number;
|
|
233
|
+
sourceProcessingFee: number;
|
|
234
|
+
}, Promise<{
|
|
235
|
+
_creationTime: number;
|
|
236
|
+
_id: import("convex/values").GenericId<"recoveryClaims">;
|
|
237
|
+
accountId: string;
|
|
238
|
+
amountDue: number;
|
|
239
|
+
claimKey: string;
|
|
240
|
+
collectedAmount: number;
|
|
241
|
+
currency: string;
|
|
242
|
+
openingCollection?: {
|
|
243
|
+
amountDue: number;
|
|
244
|
+
collectedAmount: number;
|
|
245
|
+
operationKey: string;
|
|
246
|
+
revision: number;
|
|
247
|
+
} | undefined;
|
|
248
|
+
outstanding: number;
|
|
249
|
+
reservedAmount: number;
|
|
250
|
+
revision: number;
|
|
251
|
+
scopeKey: string;
|
|
252
|
+
sign: "negative" | "positive" | "zero";
|
|
253
|
+
sourceChargeId: string;
|
|
254
|
+
sourceGross: number;
|
|
255
|
+
sourceProcessingFee: number;
|
|
256
|
+
}>>;
|
|
138
257
|
//# sourceMappingURL=mutations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../../src/component/costRecovery/mutations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../../src/component/costRecovery/mutations.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAQjB,CAAC;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;GAInB,CAAC;AACH,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAIlB,CAAC;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;GAIf,CAAC;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAIjB,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;GA0B1B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyC7B,CAAC;AAEH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAItB,CAAC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { importOpeningClaim } from "./imports.js";
|
|
2
|
+
import { getGroup, integer } from "./helpers.js";
|
|
1
3
|
import { v } from "convex/values";
|
|
2
4
|
import { mutation } from "../_generated/server.js";
|
|
3
5
|
import { recordClaim, rollbackClaim } from "./claims.js";
|
|
4
6
|
import { reserveGroup, sealGroup } from "./reservations.js";
|
|
5
7
|
import { finishGroup } from "./completion.js";
|
|
6
|
-
import { observationFields, claimDoc, groupDoc, reservationDoc, reserveArgs, rollbackArgs, finishArgs, } from "./schema.js";
|
|
8
|
+
import { observationFields, importArgs, claimDoc, groupDoc, reservationDoc, reserveArgs, rollbackArgs, finishArgs, } from "./schema.js";
|
|
7
9
|
export const record = mutation({
|
|
8
10
|
args: observationFields,
|
|
9
11
|
returns: claimDoc,
|
|
@@ -33,4 +35,65 @@ export const finish = mutation({
|
|
|
33
35
|
returns: v.object({ group: groupDoc, isDone: v.boolean() }),
|
|
34
36
|
handler: finishGroup,
|
|
35
37
|
});
|
|
38
|
+
export const bindInvoiceItem = mutation({
|
|
39
|
+
args: { groupKey: v.string(), invoiceItemId: v.string() },
|
|
40
|
+
returns: groupDoc,
|
|
41
|
+
handler: async (ctx, args) => {
|
|
42
|
+
const group = await ctx.db
|
|
43
|
+
.query("recoveryGroups")
|
|
44
|
+
.withIndex("by_key", (q) => q.eq("groupKey", args.groupKey))
|
|
45
|
+
.unique();
|
|
46
|
+
if (!group ||
|
|
47
|
+
group.sourceKind !== "invoice" ||
|
|
48
|
+
group.status === "open" ||
|
|
49
|
+
group.status === "released" ||
|
|
50
|
+
group.status === "releasing")
|
|
51
|
+
throw new Error("Invoice recovery group must be sealed and active.");
|
|
52
|
+
if (!args.invoiceItemId ||
|
|
53
|
+
(group.invoiceItemId && group.invoiceItemId !== args.invoiceItemId))
|
|
54
|
+
throw new Error("Recovery invoice item identity cannot change.");
|
|
55
|
+
await ctx.db.patch("recoveryGroups", group._id, {
|
|
56
|
+
invoiceItemId: args.invoiceItemId,
|
|
57
|
+
});
|
|
58
|
+
return (await ctx.db.get("recoveryGroups", group._id));
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
export const bindInvoiceFunding = mutation({
|
|
62
|
+
args: {
|
|
63
|
+
groupKey: v.string(),
|
|
64
|
+
sourceChargeId: v.string(),
|
|
65
|
+
sourceGross: v.number(),
|
|
66
|
+
sourceProcessingFee: v.number(),
|
|
67
|
+
},
|
|
68
|
+
returns: groupDoc,
|
|
69
|
+
handler: async (ctx, args) => {
|
|
70
|
+
const group = await getGroup(ctx, args.groupKey);
|
|
71
|
+
if (group.sourceKind !== "invoice" || group.status !== "collected")
|
|
72
|
+
throw new Error("Invoice funding requires a collected invoice recovery group.");
|
|
73
|
+
integer(args.sourceGross);
|
|
74
|
+
integer(args.sourceProcessingFee);
|
|
75
|
+
if (!args.sourceChargeId ||
|
|
76
|
+
args.sourceGross <= 0 ||
|
|
77
|
+
args.sourceProcessingFee < 0)
|
|
78
|
+
throw new Error("Invalid invoice funding economics.");
|
|
79
|
+
const funding = {
|
|
80
|
+
sourceChargeId: args.sourceChargeId,
|
|
81
|
+
sourceGross: args.sourceGross,
|
|
82
|
+
sourceProcessingFee: args.sourceProcessingFee,
|
|
83
|
+
};
|
|
84
|
+
if (group.invoiceFunding &&
|
|
85
|
+
Object.keys(funding).some((key) => group.invoiceFunding[key] !==
|
|
86
|
+
funding[key]))
|
|
87
|
+
throw new Error("Original invoice funding economics cannot change.");
|
|
88
|
+
await ctx.db.patch("recoveryGroups", group._id, {
|
|
89
|
+
invoiceFunding: funding,
|
|
90
|
+
});
|
|
91
|
+
return (await ctx.db.get("recoveryGroups", group._id));
|
|
92
|
+
},
|
|
93
|
+
});
|
|
94
|
+
export const importClaim = mutation({
|
|
95
|
+
args: importArgs,
|
|
96
|
+
returns: claimDoc,
|
|
97
|
+
handler: importOpeningClaim,
|
|
98
|
+
});
|
|
36
99
|
//# sourceMappingURL=mutations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutations.js","sourceRoot":"","sources":["../../../src/component/costRecovery/mutations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EACL,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,cAAc,EACd,WAAW,EACX,YAAY,EACZ,UAAU,GACX,MAAM,aAAa,CAAC;AACrB,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC;IAC7B,IAAI,EAAE,iBAAiB;IACvB,OAAO,EAAE,QAAQ;IACjB,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QAC3B,IAAI,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,WAAW,CAAC;YACvC,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;QACvD,OAAO,WAAW,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IAChC,CAAC;CACF,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,QAAQ,CAAC;IAC/B,IAAI,EAAE,YAAY;IAClB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AC,CAAC;QACH,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,gBAAgB,EAAE,KAAK,CAAC,GAAG,CAAC,CAAE,CAAC;IAC1D,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC;IAClC,IAAI,EAAE,UAAU;IAChB,OAAO,EAAE,QAAQ;IACjB,OAAO,EAAE,kBAAkB;CAC5B,CAAC,CAAC"}
|
|
@@ -33,6 +33,12 @@ export declare const listClaims: import("convex/server").RegisteredQuery<"public
|
|
|
33
33
|
claimKey: string;
|
|
34
34
|
collectedAmount: number;
|
|
35
35
|
currency: string;
|
|
36
|
+
openingCollection?: {
|
|
37
|
+
amountDue: number;
|
|
38
|
+
collectedAmount: number;
|
|
39
|
+
operationKey: string;
|
|
40
|
+
revision: number;
|
|
41
|
+
} | undefined;
|
|
36
42
|
outstanding: number;
|
|
37
43
|
reservedAmount: number;
|
|
38
44
|
revision: number;
|
|
@@ -54,6 +60,12 @@ export declare const group: import("convex/server").RegisteredQuery<"public", {
|
|
|
54
60
|
amount: number;
|
|
55
61
|
currency: string;
|
|
56
62
|
groupKey: string;
|
|
63
|
+
invoiceFunding?: {
|
|
64
|
+
sourceChargeId: string;
|
|
65
|
+
sourceGross: number;
|
|
66
|
+
sourceProcessingFee: number;
|
|
67
|
+
} | undefined;
|
|
68
|
+
invoiceItemId?: string | undefined;
|
|
57
69
|
maxCredit: number;
|
|
58
70
|
maxDebit: number;
|
|
59
71
|
pendingOperations: number;
|
|
@@ -90,6 +102,12 @@ export declare const claim: import("convex/server").RegisteredQuery<"public", {
|
|
|
90
102
|
claimKey: string;
|
|
91
103
|
collectedAmount: number;
|
|
92
104
|
currency: string;
|
|
105
|
+
openingCollection?: {
|
|
106
|
+
amountDue: number;
|
|
107
|
+
collectedAmount: number;
|
|
108
|
+
operationKey: string;
|
|
109
|
+
revision: number;
|
|
110
|
+
} | undefined;
|
|
93
111
|
outstanding: number;
|
|
94
112
|
reservedAmount: number;
|
|
95
113
|
revision: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../src/component/costRecovery/queries.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,OAAO;;;;;;;;;;;;;GAiBlB,CAAC;AACH,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../src/component/costRecovery/queries.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,OAAO;;;;;;;;;;;;;GAiBlB,CAAC;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BrB,CAAC;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;UAQhB,CAAC;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;UAQtB,CAAC;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;UAQhB,CAAC"}
|
|
@@ -49,6 +49,12 @@ export declare function reserveGroup(ctx: MutationCtx, args: Infer<typeof _reser
|
|
|
49
49
|
amount: number;
|
|
50
50
|
currency: string;
|
|
51
51
|
groupKey: string;
|
|
52
|
+
invoiceFunding?: {
|
|
53
|
+
sourceChargeId: string;
|
|
54
|
+
sourceGross: number;
|
|
55
|
+
sourceProcessingFee: number;
|
|
56
|
+
} | undefined;
|
|
57
|
+
invoiceItemId?: string | undefined;
|
|
52
58
|
maxCredit: number;
|
|
53
59
|
maxDebit: number;
|
|
54
60
|
pendingOperations: number;
|
|
@@ -69,6 +75,12 @@ export declare function sealGroup(ctx: MutationCtx, args: {
|
|
|
69
75
|
amount: number;
|
|
70
76
|
currency: string;
|
|
71
77
|
groupKey: string;
|
|
78
|
+
invoiceFunding?: {
|
|
79
|
+
sourceChargeId: string;
|
|
80
|
+
sourceGross: number;
|
|
81
|
+
sourceProcessingFee: number;
|
|
82
|
+
} | undefined;
|
|
83
|
+
invoiceItemId?: string | undefined;
|
|
72
84
|
maxCredit: number;
|
|
73
85
|
maxDebit: number;
|
|
74
86
|
pendingOperations: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reservations.d.ts","sourceRoot":"","sources":["../../../src/component/costRecovery/reservations.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAY3D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;4LAAwB,CAAC;AAC3C,wBAAsB,YAAY,CAChC,GAAG,EAAE,WAAW,EAChB,IAAI,EAAE,KAAK,CAAC,OAAO,YAAY,CAAC
|
|
1
|
+
{"version":3,"file":"reservations.d.ts","sourceRoot":"","sources":["../../../src/component/costRecovery/reservations.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAY3D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;4LAAwB,CAAC;AAC3C,wBAAsB,YAAY,CAChC,GAAG,EAAE,WAAW,EAChB,IAAI,EAAE,KAAK,CAAC,OAAO,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyIjC;AACD,wBAAsB,SAAS,CAAC,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE;;;;;;;;;;;;;;;;;;;;;;GAQ3E"}
|