@fantastic.dev/better-stripe 0.11.0 → 0.13.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 +30 -0
- package/README.md +267 -2
- package/dist/client/billing/balanceFunding.d.ts +36 -0
- package/dist/client/billing/balanceFunding.d.ts.map +1 -0
- package/dist/client/billing/balanceFunding.js +107 -0
- package/dist/client/billing/balanceFunding.js.map +1 -0
- package/dist/client/billing/invoicePreview.d.ts +28 -0
- package/dist/client/billing/invoicePreview.d.ts.map +1 -0
- package/dist/client/billing/invoicePreview.js +56 -0
- package/dist/client/billing/invoicePreview.js.map +1 -0
- package/dist/client/charge-currency-format.d.ts +3 -0
- package/dist/client/charge-currency-format.d.ts.map +1 -0
- package/dist/client/charge-currency-format.js +22 -0
- package/dist/client/charge-currency-format.js.map +1 -0
- package/dist/client/charge-currency.d.ts +14 -0
- package/dist/client/charge-currency.d.ts.map +1 -0
- package/dist/client/charge-currency.js +85 -0
- package/dist/client/charge-currency.js.map +1 -0
- package/dist/client/costRecovery-invoices.d.ts +38 -0
- package/dist/client/costRecovery-invoices.d.ts.map +1 -0
- package/dist/client/costRecovery-invoices.js +105 -0
- package/dist/client/costRecovery-invoices.js.map +1 -0
- package/dist/client/costRecovery.d.ts +156 -0
- package/dist/client/costRecovery.d.ts.map +1 -0
- package/dist/client/costRecovery.js +117 -0
- package/dist/client/costRecovery.js.map +1 -0
- package/dist/client/index.d.ts +28 -66
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +25 -0
- package/dist/client/index.js.map +1 -1
- package/dist/client/products/prices.d.ts +3 -2
- package/dist/client/products/prices.d.ts.map +1 -1
- package/dist/client/products/prices.js +0 -3
- package/dist/client/products/prices.js.map +1 -1
- package/dist/client/products/products.d.ts +3 -2
- package/dist/client/products/products.d.ts.map +1 -1
- package/dist/client/products/products.js +0 -3
- package/dist/client/products/products.js.map +1 -1
- package/dist/client/settlement/processingCosts.d.ts +56 -0
- package/dist/client/settlement/processingCosts.d.ts.map +1 -0
- package/dist/client/settlement/processingCosts.js +173 -0
- package/dist/client/settlement/processingCosts.js.map +1 -0
- package/dist/client/utils/webhookEndpoints.d.ts +1 -1
- package/dist/client/utils/webhookEndpoints.d.ts.map +1 -1
- package/dist/client/utils/webhookEndpoints.js +1 -0
- package/dist/client/utils/webhookEndpoints.js.map +1 -1
- package/dist/client/webhooks/processors.d.ts.map +1 -1
- package/dist/client/webhooks/processors.js +1 -0
- package/dist/client/webhooks/processors.js.map +1 -1
- package/dist/component/_generated/component.d.ts +322 -0
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/costRecovery/claims.d.ts +68 -0
- package/dist/component/costRecovery/claims.d.ts.map +1 -0
- package/dist/component/costRecovery/claims.js +92 -0
- package/dist/component/costRecovery/claims.js.map +1 -0
- package/dist/component/costRecovery/completion.d.ts +39 -0
- package/dist/component/costRecovery/completion.d.ts.map +1 -0
- package/dist/component/costRecovery/completion.js +69 -0
- package/dist/component/costRecovery/completion.js.map +1 -0
- package/dist/component/costRecovery/helpers.d.ts +68 -0
- package/dist/component/costRecovery/helpers.d.ts.map +1 -0
- package/dist/component/costRecovery/helpers.js +71 -0
- package/dist/component/costRecovery/helpers.js.map +1 -0
- package/dist/component/costRecovery/mutations.d.ts +210 -0
- package/dist/component/costRecovery/mutations.d.ts.map +1 -0
- package/dist/component/costRecovery/mutations.js +93 -0
- package/dist/component/costRecovery/mutations.js.map +1 -0
- package/dist/component/costRecovery/queries.d.ts +108 -0
- package/dist/component/costRecovery/queries.d.ts.map +1 -0
- package/dist/component/costRecovery/queries.js +73 -0
- package/dist/component/costRecovery/queries.js.map +1 -0
- package/dist/component/costRecovery/reservations.d.ts +95 -0
- package/dist/component/costRecovery/reservations.d.ts.map +1 -0
- package/dist/component/costRecovery/reservations.js +134 -0
- package/dist/component/costRecovery/reservations.js.map +1 -0
- package/dist/component/costRecovery/schema.d.ts +382 -0
- package/dist/component/costRecovery/schema.d.ts.map +1 -0
- package/dist/component/costRecovery/schema.js +115 -0
- package/dist/component/costRecovery/schema.js.map +1 -0
- package/dist/component/schema.d.ts +135 -0
- package/dist/component/schema.js +5 -0
- package/dist/component/schema.js.map +1 -1
- package/dist/react/components/PriceCard.d.ts +3 -1
- package/dist/react/components/PriceCard.d.ts.map +1 -1
- package/dist/react/components/PriceCard.js +2 -2
- package/dist/react/components/PriceCard.js.map +1 -1
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +1 -0
- package/dist/react/index.js.map +1 -1
- package/dist/react/lib/price-helpers.d.ts +4 -6
- package/dist/react/lib/price-helpers.d.ts.map +1 -1
- package/dist/react/lib/price-helpers.js +16 -9
- package/dist/react/lib/price-helpers.js.map +1 -1
- 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/PlanPricingEditor.d.ts +4 -0
- package/dist/react/workflows/PlanPricingEditor.d.ts.map +1 -1
- package/dist/react/workflows/PlanPricingEditor.js +12 -9
- package/dist/react/workflows/PlanPricingEditor.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 +3 -1
- package/dist/react/workflows/index.d.ts.map +1 -1
- package/dist/react/workflows/index.js +2 -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/docs/react-workflows.md +167 -1
- package/package.json +2 -2
- package/src/client/billing/balanceFunding.test.ts +257 -0
- package/src/client/billing/balanceFunding.ts +183 -0
- package/src/client/billing/balanceFundingTransport.test.ts +89 -0
- package/src/client/billing/invoicePreview.test.ts +123 -0
- package/src/client/billing/invoicePreview.ts +94 -0
- package/src/client/billing/invoicePreviewTransport.test.ts +70 -0
- package/src/client/charge-currency-format.ts +29 -0
- package/src/client/charge-currency.test.ts +113 -0
- package/src/client/charge-currency.ts +119 -0
- package/src/client/costRecovery-invoices.test.ts +401 -0
- package/src/client/costRecovery-invoices.transport.test.ts +107 -0
- package/src/client/costRecovery-invoices.ts +144 -0
- package/src/client/costRecovery.test.ts +76 -0
- package/src/client/costRecovery.ts +254 -0
- package/src/client/index.ts +76 -75
- package/src/client/products/prices.ts +13 -11
- package/src/client/products/products.ts +10 -10
- package/src/client/settlement/processingCosts.test.ts +349 -0
- package/src/client/settlement/processingCosts.ts +315 -0
- package/src/client/settlement/processingCostsTransport.test.ts +135 -0
- package/src/client/utils/webhookEndpoints.test.ts +5 -0
- package/src/client/utils/webhookEndpoints.ts +1 -0
- package/src/client/webhooks/hooks.test.ts +9 -0
- package/src/client/webhooks/payout-canceled.integration.test.ts +192 -0
- package/src/client/webhooks/processors.ts +1 -0
- package/src/component/_generated/api.ts +12 -0
- package/src/component/_generated/component.ts +407 -0
- package/src/component/cost-recovery.test.ts +344 -0
- package/src/component/costRecovery/claims.ts +119 -0
- package/src/component/costRecovery/completion.ts +92 -0
- package/src/component/costRecovery/helpers.ts +83 -0
- package/src/component/costRecovery/mutations.ts +115 -0
- package/src/component/costRecovery/queries.ts +88 -0
- package/src/component/costRecovery/reservations.ts +164 -0
- package/src/component/costRecovery/schema.ts +135 -0
- package/src/component/schema.ts +10 -0
- package/src/react/components/PayoutSchedule.render.test.tsx +15 -0
- package/src/react/components/PriceCard.render.test.tsx +37 -0
- package/src/react/components/PriceCard.tsx +9 -1
- package/src/react/index.test.ts +5 -0
- package/src/react/index.ts +7 -0
- package/src/react/lib/price-helpers.test.ts +15 -2
- package/src/react/lib/price-helpers.ts +25 -8
- package/src/react/workflows/Billing.test.tsx +1 -1
- package/src/react/workflows/Collections.test.tsx +36 -0
- package/src/react/workflows/Collections.tsx +3 -1
- package/src/react/workflows/PlanPricingEditor.currency.test.tsx +164 -0
- package/src/react/workflows/PlanPricingEditor.tsx +26 -10
- package/src/react/workflows/Refunds.currency.test.tsx +290 -0
- package/src/react/workflows/Refunds.tsx +115 -25
- package/src/react/workflows/index.ts +8 -1
- package/src/react/workflows/refund-preview.test.ts +65 -0
- package/src/react/workflows/refund-preview.ts +56 -0
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
export declare const scopeFields: {
|
|
2
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
3
|
+
scopeKey: import("convex/values").VString<string, "required">;
|
|
4
|
+
currency: import("convex/values").VString<string, "required">;
|
|
5
|
+
};
|
|
6
|
+
export declare const totalsFields: {
|
|
7
|
+
amountDue: import("convex/values").VFloat64<number, "required">;
|
|
8
|
+
collectedAmount: import("convex/values").VFloat64<number, "required">;
|
|
9
|
+
reservedAmount: import("convex/values").VFloat64<number, "required">;
|
|
10
|
+
outstanding: import("convex/values").VFloat64<number, "required">;
|
|
11
|
+
};
|
|
12
|
+
export declare const signValidator: 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>;
|
|
13
|
+
export declare const observationFields: {
|
|
14
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
15
|
+
scopeKey: import("convex/values").VString<string, "required">;
|
|
16
|
+
currency: import("convex/values").VString<string, "required">;
|
|
17
|
+
claimKey: import("convex/values").VString<string, "required">;
|
|
18
|
+
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
19
|
+
sourceGross: import("convex/values").VFloat64<number, "required">;
|
|
20
|
+
sourceProcessingFee: import("convex/values").VFloat64<number, "required">;
|
|
21
|
+
amountDue: import("convex/values").VFloat64<number, "required">;
|
|
22
|
+
revision: import("convex/values").VFloat64<number, "required">;
|
|
23
|
+
};
|
|
24
|
+
export declare const claimFields: {
|
|
25
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
26
|
+
scopeKey: import("convex/values").VString<string, "required">;
|
|
27
|
+
currency: import("convex/values").VString<string, "required">;
|
|
28
|
+
claimKey: import("convex/values").VString<string, "required">;
|
|
29
|
+
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
30
|
+
sourceGross: import("convex/values").VFloat64<number, "required">;
|
|
31
|
+
sourceProcessingFee: import("convex/values").VFloat64<number, "required">;
|
|
32
|
+
amountDue: import("convex/values").VFloat64<number, "required">;
|
|
33
|
+
revision: import("convex/values").VFloat64<number, "required">;
|
|
34
|
+
collectedAmount: import("convex/values").VFloat64<number, "required">;
|
|
35
|
+
reservedAmount: import("convex/values").VFloat64<number, "required">;
|
|
36
|
+
outstanding: import("convex/values").VFloat64<number, "required">;
|
|
37
|
+
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>;
|
|
38
|
+
};
|
|
39
|
+
export declare const claimDoc: import("convex/values").VObject<{
|
|
40
|
+
_creationTime: number;
|
|
41
|
+
_id: import("convex/values").GenericId<"recoveryClaims">;
|
|
42
|
+
accountId: string;
|
|
43
|
+
amountDue: number;
|
|
44
|
+
claimKey: string;
|
|
45
|
+
collectedAmount: number;
|
|
46
|
+
currency: string;
|
|
47
|
+
outstanding: number;
|
|
48
|
+
reservedAmount: number;
|
|
49
|
+
revision: number;
|
|
50
|
+
scopeKey: string;
|
|
51
|
+
sign: "negative" | "positive" | "zero";
|
|
52
|
+
sourceChargeId: string;
|
|
53
|
+
sourceGross: number;
|
|
54
|
+
sourceProcessingFee: number;
|
|
55
|
+
}, {
|
|
56
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
57
|
+
scopeKey: import("convex/values").VString<string, "required">;
|
|
58
|
+
currency: import("convex/values").VString<string, "required">;
|
|
59
|
+
claimKey: import("convex/values").VString<string, "required">;
|
|
60
|
+
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
61
|
+
sourceGross: import("convex/values").VFloat64<number, "required">;
|
|
62
|
+
sourceProcessingFee: import("convex/values").VFloat64<number, "required">;
|
|
63
|
+
amountDue: import("convex/values").VFloat64<number, "required">;
|
|
64
|
+
revision: import("convex/values").VFloat64<number, "required">;
|
|
65
|
+
collectedAmount: import("convex/values").VFloat64<number, "required">;
|
|
66
|
+
reservedAmount: import("convex/values").VFloat64<number, "required">;
|
|
67
|
+
outstanding: import("convex/values").VFloat64<number, "required">;
|
|
68
|
+
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>;
|
|
69
|
+
_id: import("convex/values").VId<import("convex/values").GenericId<"recoveryClaims">, "required">;
|
|
70
|
+
_creationTime: import("convex/values").VFloat64<number, "required">;
|
|
71
|
+
}, "required", "_creationTime" | "_id" | "accountId" | "amountDue" | "claimKey" | "collectedAmount" | "currency" | "outstanding" | "reservedAmount" | "revision" | "scopeKey" | "sign" | "sourceChargeId" | "sourceGross" | "sourceProcessingFee">;
|
|
72
|
+
export declare const balanceFields: {
|
|
73
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
74
|
+
scopeKey: import("convex/values").VString<string, "required">;
|
|
75
|
+
currency: import("convex/values").VString<string, "required">;
|
|
76
|
+
amountDue: import("convex/values").VFloat64<number, "required">;
|
|
77
|
+
collectedAmount: import("convex/values").VFloat64<number, "required">;
|
|
78
|
+
reservedAmount: import("convex/values").VFloat64<number, "required">;
|
|
79
|
+
outstanding: import("convex/values").VFloat64<number, "required">;
|
|
80
|
+
activeGroupKey: import("convex/values").VString<string | undefined, "optional">;
|
|
81
|
+
};
|
|
82
|
+
export declare const groupInput: {
|
|
83
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
84
|
+
scopeKey: import("convex/values").VString<string, "required">;
|
|
85
|
+
currency: import("convex/values").VString<string, "required">;
|
|
86
|
+
groupKey: import("convex/values").VString<string, "required">;
|
|
87
|
+
sourceKind: import("convex/values").VUnion<"invoice" | "settlement", [import("convex/values").VLiteral<"settlement", "required">, import("convex/values").VLiteral<"invoice", "required">], "required", never>;
|
|
88
|
+
sourceId: import("convex/values").VString<string, "required">;
|
|
89
|
+
sourceGross: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
90
|
+
sourceProcessingFee: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
91
|
+
maxDebit: import("convex/values").VFloat64<number, "required">;
|
|
92
|
+
maxCredit: import("convex/values").VFloat64<number, "required">;
|
|
93
|
+
};
|
|
94
|
+
export declare const groupFields: {
|
|
95
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
96
|
+
scopeKey: import("convex/values").VString<string, "required">;
|
|
97
|
+
currency: import("convex/values").VString<string, "required">;
|
|
98
|
+
groupKey: import("convex/values").VString<string, "required">;
|
|
99
|
+
sourceKind: import("convex/values").VUnion<"invoice" | "settlement", [import("convex/values").VLiteral<"settlement", "required">, import("convex/values").VLiteral<"invoice", "required">], "required", never>;
|
|
100
|
+
sourceId: import("convex/values").VString<string, "required">;
|
|
101
|
+
sourceGross: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
102
|
+
sourceProcessingFee: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
103
|
+
maxDebit: import("convex/values").VFloat64<number, "required">;
|
|
104
|
+
maxCredit: import("convex/values").VFloat64<number, "required">;
|
|
105
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
106
|
+
pendingOperations: import("convex/values").VFloat64<number, "required">;
|
|
107
|
+
invoiceItemId: import("convex/values").VString<string | undefined, "optional">;
|
|
108
|
+
invoiceFunding: import("convex/values").VObject<{
|
|
109
|
+
sourceChargeId: string;
|
|
110
|
+
sourceGross: number;
|
|
111
|
+
sourceProcessingFee: number;
|
|
112
|
+
} | undefined, {
|
|
113
|
+
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
114
|
+
sourceGross: import("convex/values").VFloat64<number, "required">;
|
|
115
|
+
sourceProcessingFee: import("convex/values").VFloat64<number, "required">;
|
|
116
|
+
}, "optional", "sourceChargeId" | "sourceGross" | "sourceProcessingFee">;
|
|
117
|
+
status: import("convex/values").VUnion<"collected" | "collecting" | "open" | "released" | "releasing" | "sealed", [import("convex/values").VLiteral<"open", "required">, import("convex/values").VLiteral<"sealed", "required">, import("convex/values").VLiteral<"collecting", "required">, import("convex/values").VLiteral<"releasing", "required">, import("convex/values").VLiteral<"collected", "required">, import("convex/values").VLiteral<"released", "required">], "required", never>;
|
|
118
|
+
};
|
|
119
|
+
export declare const groupDoc: import("convex/values").VObject<{
|
|
120
|
+
_creationTime: number;
|
|
121
|
+
_id: import("convex/values").GenericId<"recoveryGroups">;
|
|
122
|
+
accountId: string;
|
|
123
|
+
amount: number;
|
|
124
|
+
currency: string;
|
|
125
|
+
groupKey: string;
|
|
126
|
+
invoiceFunding?: {
|
|
127
|
+
sourceChargeId: string;
|
|
128
|
+
sourceGross: number;
|
|
129
|
+
sourceProcessingFee: number;
|
|
130
|
+
} | undefined;
|
|
131
|
+
invoiceItemId?: string | undefined;
|
|
132
|
+
maxCredit: number;
|
|
133
|
+
maxDebit: number;
|
|
134
|
+
pendingOperations: number;
|
|
135
|
+
scopeKey: string;
|
|
136
|
+
sourceGross?: number | undefined;
|
|
137
|
+
sourceId: string;
|
|
138
|
+
sourceKind: "invoice" | "settlement";
|
|
139
|
+
sourceProcessingFee?: number | undefined;
|
|
140
|
+
status: "collected" | "collecting" | "open" | "released" | "releasing" | "sealed";
|
|
141
|
+
}, {
|
|
142
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
143
|
+
scopeKey: import("convex/values").VString<string, "required">;
|
|
144
|
+
currency: import("convex/values").VString<string, "required">;
|
|
145
|
+
groupKey: import("convex/values").VString<string, "required">;
|
|
146
|
+
sourceKind: import("convex/values").VUnion<"invoice" | "settlement", [import("convex/values").VLiteral<"settlement", "required">, import("convex/values").VLiteral<"invoice", "required">], "required", never>;
|
|
147
|
+
sourceId: import("convex/values").VString<string, "required">;
|
|
148
|
+
sourceGross: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
149
|
+
sourceProcessingFee: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
150
|
+
maxDebit: import("convex/values").VFloat64<number, "required">;
|
|
151
|
+
maxCredit: import("convex/values").VFloat64<number, "required">;
|
|
152
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
153
|
+
pendingOperations: import("convex/values").VFloat64<number, "required">;
|
|
154
|
+
invoiceItemId: import("convex/values").VString<string | undefined, "optional">;
|
|
155
|
+
invoiceFunding: import("convex/values").VObject<{
|
|
156
|
+
sourceChargeId: string;
|
|
157
|
+
sourceGross: number;
|
|
158
|
+
sourceProcessingFee: number;
|
|
159
|
+
} | undefined, {
|
|
160
|
+
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
161
|
+
sourceGross: import("convex/values").VFloat64<number, "required">;
|
|
162
|
+
sourceProcessingFee: import("convex/values").VFloat64<number, "required">;
|
|
163
|
+
}, "optional", "sourceChargeId" | "sourceGross" | "sourceProcessingFee">;
|
|
164
|
+
status: import("convex/values").VUnion<"collected" | "collecting" | "open" | "released" | "releasing" | "sealed", [import("convex/values").VLiteral<"open", "required">, import("convex/values").VLiteral<"sealed", "required">, import("convex/values").VLiteral<"collecting", "required">, import("convex/values").VLiteral<"releasing", "required">, import("convex/values").VLiteral<"collected", "required">, import("convex/values").VLiteral<"released", "required">], "required", never>;
|
|
165
|
+
_id: import("convex/values").VId<import("convex/values").GenericId<"recoveryGroups">, "required">;
|
|
166
|
+
_creationTime: import("convex/values").VFloat64<number, "required">;
|
|
167
|
+
}, "required", "_creationTime" | "_id" | "accountId" | "amount" | "currency" | "groupKey" | "invoiceFunding" | "invoiceFunding.sourceChargeId" | "invoiceFunding.sourceGross" | "invoiceFunding.sourceProcessingFee" | "invoiceItemId" | "maxCredit" | "maxDebit" | "pendingOperations" | "scopeKey" | "sourceGross" | "sourceId" | "sourceKind" | "sourceProcessingFee" | "status">;
|
|
168
|
+
export declare const reservationFields: {
|
|
169
|
+
operationKey: import("convex/values").VString<string, "required">;
|
|
170
|
+
groupKey: import("convex/values").VString<string, "required">;
|
|
171
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
172
|
+
limit: import("convex/values").VFloat64<number, "required">;
|
|
173
|
+
allocations: import("convex/values").VArray<{
|
|
174
|
+
amount: number;
|
|
175
|
+
claimId: import("convex/values").GenericId<"recoveryClaims">;
|
|
176
|
+
claimKey: string;
|
|
177
|
+
}[], import("convex/values").VObject<{
|
|
178
|
+
amount: number;
|
|
179
|
+
claimId: import("convex/values").GenericId<"recoveryClaims">;
|
|
180
|
+
claimKey: string;
|
|
181
|
+
}, {
|
|
182
|
+
claimId: import("convex/values").VId<import("convex/values").GenericId<"recoveryClaims">, "required">;
|
|
183
|
+
claimKey: import("convex/values").VString<string, "required">;
|
|
184
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
185
|
+
}, "required", "amount" | "claimId" | "claimKey">, "required">;
|
|
186
|
+
status: import("convex/values").VUnion<"collected" | "empty" | "released" | "reserved", [import("convex/values").VLiteral<"reserved", "required">, import("convex/values").VLiteral<"collected", "required">, import("convex/values").VLiteral<"released", "required">, import("convex/values").VLiteral<"empty", "required">], "required", never>;
|
|
187
|
+
};
|
|
188
|
+
export declare const reservationDoc: import("convex/values").VObject<{
|
|
189
|
+
_creationTime: number;
|
|
190
|
+
_id: import("convex/values").GenericId<"recoveryReservations">;
|
|
191
|
+
allocations: {
|
|
192
|
+
amount: number;
|
|
193
|
+
claimId: import("convex/values").GenericId<"recoveryClaims">;
|
|
194
|
+
claimKey: string;
|
|
195
|
+
}[];
|
|
196
|
+
amount: number;
|
|
197
|
+
groupKey: string;
|
|
198
|
+
limit: number;
|
|
199
|
+
operationKey: string;
|
|
200
|
+
status: "collected" | "empty" | "released" | "reserved";
|
|
201
|
+
}, {
|
|
202
|
+
operationKey: import("convex/values").VString<string, "required">;
|
|
203
|
+
groupKey: import("convex/values").VString<string, "required">;
|
|
204
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
205
|
+
limit: import("convex/values").VFloat64<number, "required">;
|
|
206
|
+
allocations: import("convex/values").VArray<{
|
|
207
|
+
amount: number;
|
|
208
|
+
claimId: import("convex/values").GenericId<"recoveryClaims">;
|
|
209
|
+
claimKey: string;
|
|
210
|
+
}[], import("convex/values").VObject<{
|
|
211
|
+
amount: number;
|
|
212
|
+
claimId: import("convex/values").GenericId<"recoveryClaims">;
|
|
213
|
+
claimKey: string;
|
|
214
|
+
}, {
|
|
215
|
+
claimId: import("convex/values").VId<import("convex/values").GenericId<"recoveryClaims">, "required">;
|
|
216
|
+
claimKey: import("convex/values").VString<string, "required">;
|
|
217
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
218
|
+
}, "required", "amount" | "claimId" | "claimKey">, "required">;
|
|
219
|
+
status: import("convex/values").VUnion<"collected" | "empty" | "released" | "reserved", [import("convex/values").VLiteral<"reserved", "required">, import("convex/values").VLiteral<"collected", "required">, import("convex/values").VLiteral<"released", "required">, import("convex/values").VLiteral<"empty", "required">], "required", never>;
|
|
220
|
+
_id: import("convex/values").VId<import("convex/values").GenericId<"recoveryReservations">, "required">;
|
|
221
|
+
_creationTime: import("convex/values").VFloat64<number, "required">;
|
|
222
|
+
}, "required", "_creationTime" | "_id" | "allocations" | "amount" | "groupKey" | "limit" | "operationKey" | "status">;
|
|
223
|
+
export declare const claimsTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
224
|
+
accountId: string;
|
|
225
|
+
amountDue: number;
|
|
226
|
+
claimKey: string;
|
|
227
|
+
collectedAmount: number;
|
|
228
|
+
currency: string;
|
|
229
|
+
outstanding: number;
|
|
230
|
+
reservedAmount: number;
|
|
231
|
+
revision: number;
|
|
232
|
+
scopeKey: string;
|
|
233
|
+
sign: "negative" | "positive" | "zero";
|
|
234
|
+
sourceChargeId: string;
|
|
235
|
+
sourceGross: number;
|
|
236
|
+
sourceProcessingFee: number;
|
|
237
|
+
}, {
|
|
238
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
239
|
+
scopeKey: import("convex/values").VString<string, "required">;
|
|
240
|
+
currency: import("convex/values").VString<string, "required">;
|
|
241
|
+
claimKey: import("convex/values").VString<string, "required">;
|
|
242
|
+
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
243
|
+
sourceGross: import("convex/values").VFloat64<number, "required">;
|
|
244
|
+
sourceProcessingFee: import("convex/values").VFloat64<number, "required">;
|
|
245
|
+
amountDue: import("convex/values").VFloat64<number, "required">;
|
|
246
|
+
revision: import("convex/values").VFloat64<number, "required">;
|
|
247
|
+
collectedAmount: import("convex/values").VFloat64<number, "required">;
|
|
248
|
+
reservedAmount: import("convex/values").VFloat64<number, "required">;
|
|
249
|
+
outstanding: import("convex/values").VFloat64<number, "required">;
|
|
250
|
+
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>;
|
|
251
|
+
}, "required", "accountId" | "amountDue" | "claimKey" | "collectedAmount" | "currency" | "outstanding" | "reservedAmount" | "revision" | "scopeKey" | "sign" | "sourceChargeId" | "sourceGross" | "sourceProcessingFee">, {
|
|
252
|
+
by_key: ["claimKey", "_creationTime"];
|
|
253
|
+
by_scope: ["accountId", "scopeKey", "currency", "_creationTime"];
|
|
254
|
+
by_sign: ["accountId", "scopeKey", "currency", "sign", "_creationTime"];
|
|
255
|
+
}, {}, {}>;
|
|
256
|
+
export declare const balancesTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
257
|
+
accountId: string;
|
|
258
|
+
activeGroupKey?: string | undefined;
|
|
259
|
+
amountDue: number;
|
|
260
|
+
collectedAmount: number;
|
|
261
|
+
currency: string;
|
|
262
|
+
outstanding: number;
|
|
263
|
+
reservedAmount: number;
|
|
264
|
+
scopeKey: string;
|
|
265
|
+
}, {
|
|
266
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
267
|
+
scopeKey: import("convex/values").VString<string, "required">;
|
|
268
|
+
currency: import("convex/values").VString<string, "required">;
|
|
269
|
+
amountDue: import("convex/values").VFloat64<number, "required">;
|
|
270
|
+
collectedAmount: import("convex/values").VFloat64<number, "required">;
|
|
271
|
+
reservedAmount: import("convex/values").VFloat64<number, "required">;
|
|
272
|
+
outstanding: import("convex/values").VFloat64<number, "required">;
|
|
273
|
+
activeGroupKey: import("convex/values").VString<string | undefined, "optional">;
|
|
274
|
+
}, "required", "accountId" | "activeGroupKey" | "amountDue" | "collectedAmount" | "currency" | "outstanding" | "reservedAmount" | "scopeKey">, {
|
|
275
|
+
by_scope: ["accountId", "scopeKey", "currency", "_creationTime"];
|
|
276
|
+
}, {}, {}>;
|
|
277
|
+
export declare const groupsTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
278
|
+
accountId: string;
|
|
279
|
+
amount: number;
|
|
280
|
+
currency: string;
|
|
281
|
+
groupKey: string;
|
|
282
|
+
invoiceFunding?: {
|
|
283
|
+
sourceChargeId: string;
|
|
284
|
+
sourceGross: number;
|
|
285
|
+
sourceProcessingFee: number;
|
|
286
|
+
} | undefined;
|
|
287
|
+
invoiceItemId?: string | undefined;
|
|
288
|
+
maxCredit: number;
|
|
289
|
+
maxDebit: number;
|
|
290
|
+
pendingOperations: number;
|
|
291
|
+
scopeKey: string;
|
|
292
|
+
sourceGross?: number | undefined;
|
|
293
|
+
sourceId: string;
|
|
294
|
+
sourceKind: "invoice" | "settlement";
|
|
295
|
+
sourceProcessingFee?: number | undefined;
|
|
296
|
+
status: "collected" | "collecting" | "open" | "released" | "releasing" | "sealed";
|
|
297
|
+
}, {
|
|
298
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
299
|
+
scopeKey: import("convex/values").VString<string, "required">;
|
|
300
|
+
currency: import("convex/values").VString<string, "required">;
|
|
301
|
+
groupKey: import("convex/values").VString<string, "required">;
|
|
302
|
+
sourceKind: import("convex/values").VUnion<"invoice" | "settlement", [import("convex/values").VLiteral<"settlement", "required">, import("convex/values").VLiteral<"invoice", "required">], "required", never>;
|
|
303
|
+
sourceId: import("convex/values").VString<string, "required">;
|
|
304
|
+
sourceGross: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
305
|
+
sourceProcessingFee: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
306
|
+
maxDebit: import("convex/values").VFloat64<number, "required">;
|
|
307
|
+
maxCredit: import("convex/values").VFloat64<number, "required">;
|
|
308
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
309
|
+
pendingOperations: import("convex/values").VFloat64<number, "required">;
|
|
310
|
+
invoiceItemId: import("convex/values").VString<string | undefined, "optional">;
|
|
311
|
+
invoiceFunding: import("convex/values").VObject<{
|
|
312
|
+
sourceChargeId: string;
|
|
313
|
+
sourceGross: number;
|
|
314
|
+
sourceProcessingFee: number;
|
|
315
|
+
} | undefined, {
|
|
316
|
+
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
317
|
+
sourceGross: import("convex/values").VFloat64<number, "required">;
|
|
318
|
+
sourceProcessingFee: import("convex/values").VFloat64<number, "required">;
|
|
319
|
+
}, "optional", "sourceChargeId" | "sourceGross" | "sourceProcessingFee">;
|
|
320
|
+
status: import("convex/values").VUnion<"collected" | "collecting" | "open" | "released" | "releasing" | "sealed", [import("convex/values").VLiteral<"open", "required">, import("convex/values").VLiteral<"sealed", "required">, import("convex/values").VLiteral<"collecting", "required">, import("convex/values").VLiteral<"releasing", "required">, import("convex/values").VLiteral<"collected", "required">, import("convex/values").VLiteral<"released", "required">], "required", never>;
|
|
321
|
+
}, "required", "accountId" | "amount" | "currency" | "groupKey" | "invoiceFunding" | "invoiceFunding.sourceChargeId" | "invoiceFunding.sourceGross" | "invoiceFunding.sourceProcessingFee" | "invoiceItemId" | "maxCredit" | "maxDebit" | "pendingOperations" | "scopeKey" | "sourceGross" | "sourceId" | "sourceKind" | "sourceProcessingFee" | "status">, {
|
|
322
|
+
by_key: ["groupKey", "_creationTime"];
|
|
323
|
+
}, {}, {}>;
|
|
324
|
+
export declare const reservationsTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
325
|
+
allocations: {
|
|
326
|
+
amount: number;
|
|
327
|
+
claimId: import("convex/values").GenericId<"recoveryClaims">;
|
|
328
|
+
claimKey: string;
|
|
329
|
+
}[];
|
|
330
|
+
amount: number;
|
|
331
|
+
groupKey: string;
|
|
332
|
+
limit: number;
|
|
333
|
+
operationKey: string;
|
|
334
|
+
status: "collected" | "empty" | "released" | "reserved";
|
|
335
|
+
}, {
|
|
336
|
+
operationKey: import("convex/values").VString<string, "required">;
|
|
337
|
+
groupKey: import("convex/values").VString<string, "required">;
|
|
338
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
339
|
+
limit: import("convex/values").VFloat64<number, "required">;
|
|
340
|
+
allocations: import("convex/values").VArray<{
|
|
341
|
+
amount: number;
|
|
342
|
+
claimId: import("convex/values").GenericId<"recoveryClaims">;
|
|
343
|
+
claimKey: string;
|
|
344
|
+
}[], import("convex/values").VObject<{
|
|
345
|
+
amount: number;
|
|
346
|
+
claimId: import("convex/values").GenericId<"recoveryClaims">;
|
|
347
|
+
claimKey: string;
|
|
348
|
+
}, {
|
|
349
|
+
claimId: import("convex/values").VId<import("convex/values").GenericId<"recoveryClaims">, "required">;
|
|
350
|
+
claimKey: import("convex/values").VString<string, "required">;
|
|
351
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
352
|
+
}, "required", "amount" | "claimId" | "claimKey">, "required">;
|
|
353
|
+
status: import("convex/values").VUnion<"collected" | "empty" | "released" | "reserved", [import("convex/values").VLiteral<"reserved", "required">, import("convex/values").VLiteral<"collected", "required">, import("convex/values").VLiteral<"released", "required">, import("convex/values").VLiteral<"empty", "required">], "required", never>;
|
|
354
|
+
}, "required", "allocations" | "amount" | "groupKey" | "limit" | "operationKey" | "status">, {
|
|
355
|
+
by_group_status: ["groupKey", "status", "_creationTime"];
|
|
356
|
+
by_key: ["operationKey", "_creationTime"];
|
|
357
|
+
}, {}, {}>;
|
|
358
|
+
export declare const reserveArgs: {
|
|
359
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
360
|
+
scopeKey: import("convex/values").VString<string, "required">;
|
|
361
|
+
currency: import("convex/values").VString<string, "required">;
|
|
362
|
+
groupKey: import("convex/values").VString<string, "required">;
|
|
363
|
+
sourceKind: import("convex/values").VUnion<"invoice" | "settlement", [import("convex/values").VLiteral<"settlement", "required">, import("convex/values").VLiteral<"invoice", "required">], "required", never>;
|
|
364
|
+
sourceId: import("convex/values").VString<string, "required">;
|
|
365
|
+
sourceGross: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
366
|
+
sourceProcessingFee: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
367
|
+
maxDebit: import("convex/values").VFloat64<number, "required">;
|
|
368
|
+
maxCredit: import("convex/values").VFloat64<number, "required">;
|
|
369
|
+
operationKey: import("convex/values").VString<string, "required">;
|
|
370
|
+
limit: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
371
|
+
};
|
|
372
|
+
export declare const finishArgs: {
|
|
373
|
+
groupKey: import("convex/values").VString<string, "required">;
|
|
374
|
+
outcome: import("convex/values").VUnion<"collect" | "release", [import("convex/values").VLiteral<"collect", "required">, import("convex/values").VLiteral<"release", "required">], "required", never>;
|
|
375
|
+
limit: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
376
|
+
};
|
|
377
|
+
export declare const rollbackArgs: {
|
|
378
|
+
groupKey: import("convex/values").VString<string, "required">;
|
|
379
|
+
returnedPrincipal: import("convex/values").VFloat64<number, "required">;
|
|
380
|
+
revision: import("convex/values").VFloat64<number, "required">;
|
|
381
|
+
};
|
|
382
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/component/costRecovery/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OAAO;IACP,KAAK;CACN,CAAC;AACF,eAAO,MAAM,YAAY;IACvB,QAAQ;IACR,iBAAiB;IACjB,QAAQ;CACT,CAAC"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { defineTable } from "convex/server";
|
|
2
|
+
import { v } from "convex/values";
|
|
3
|
+
export const scopeFields = {
|
|
4
|
+
accountId: v.string(),
|
|
5
|
+
scopeKey: v.string(),
|
|
6
|
+
currency: v.string(),
|
|
7
|
+
};
|
|
8
|
+
export const totalsFields = {
|
|
9
|
+
amountDue: v.number(),
|
|
10
|
+
collectedAmount: v.number(),
|
|
11
|
+
reservedAmount: v.number(),
|
|
12
|
+
outstanding: v.number(),
|
|
13
|
+
};
|
|
14
|
+
export const signValidator = v.union(v.literal("positive"), v.literal("negative"), v.literal("zero"));
|
|
15
|
+
export const observationFields = {
|
|
16
|
+
...scopeFields,
|
|
17
|
+
claimKey: v.string(),
|
|
18
|
+
sourceChargeId: v.string(),
|
|
19
|
+
sourceGross: v.number(),
|
|
20
|
+
sourceProcessingFee: v.number(),
|
|
21
|
+
amountDue: v.number(),
|
|
22
|
+
revision: v.number(),
|
|
23
|
+
};
|
|
24
|
+
export const claimFields = {
|
|
25
|
+
...observationFields,
|
|
26
|
+
collectedAmount: v.number(),
|
|
27
|
+
reservedAmount: v.number(),
|
|
28
|
+
outstanding: v.number(),
|
|
29
|
+
sign: signValidator,
|
|
30
|
+
};
|
|
31
|
+
export const claimDoc = v.object({
|
|
32
|
+
...claimFields,
|
|
33
|
+
_id: v.id("recoveryClaims"),
|
|
34
|
+
_creationTime: v.number(),
|
|
35
|
+
});
|
|
36
|
+
export const balanceFields = {
|
|
37
|
+
...scopeFields,
|
|
38
|
+
...totalsFields,
|
|
39
|
+
activeGroupKey: v.optional(v.string()),
|
|
40
|
+
};
|
|
41
|
+
export const groupInput = {
|
|
42
|
+
...scopeFields,
|
|
43
|
+
groupKey: v.string(),
|
|
44
|
+
sourceKind: v.union(v.literal("settlement"), v.literal("invoice")),
|
|
45
|
+
sourceId: v.string(),
|
|
46
|
+
sourceGross: v.optional(v.number()),
|
|
47
|
+
sourceProcessingFee: v.optional(v.number()),
|
|
48
|
+
maxDebit: v.number(),
|
|
49
|
+
maxCredit: v.number(),
|
|
50
|
+
};
|
|
51
|
+
export const groupFields = {
|
|
52
|
+
...groupInput,
|
|
53
|
+
amount: v.number(),
|
|
54
|
+
pendingOperations: v.number(),
|
|
55
|
+
invoiceItemId: v.optional(v.string()),
|
|
56
|
+
invoiceFunding: v.optional(v.object({
|
|
57
|
+
sourceChargeId: v.string(),
|
|
58
|
+
sourceGross: v.number(),
|
|
59
|
+
sourceProcessingFee: v.number(),
|
|
60
|
+
})),
|
|
61
|
+
status: v.union(v.literal("open"), v.literal("sealed"), v.literal("collecting"), v.literal("releasing"), v.literal("collected"), v.literal("released")),
|
|
62
|
+
};
|
|
63
|
+
export const groupDoc = v.object({
|
|
64
|
+
...groupFields,
|
|
65
|
+
_id: v.id("recoveryGroups"),
|
|
66
|
+
_creationTime: v.number(),
|
|
67
|
+
});
|
|
68
|
+
export const reservationFields = {
|
|
69
|
+
operationKey: v.string(),
|
|
70
|
+
groupKey: v.string(),
|
|
71
|
+
amount: v.number(),
|
|
72
|
+
limit: v.number(),
|
|
73
|
+
allocations: v.array(v.object({
|
|
74
|
+
claimId: v.id("recoveryClaims"),
|
|
75
|
+
claimKey: v.string(),
|
|
76
|
+
amount: v.number(),
|
|
77
|
+
})),
|
|
78
|
+
status: v.union(v.literal("reserved"), v.literal("collected"), v.literal("released"), v.literal("empty")),
|
|
79
|
+
};
|
|
80
|
+
export const reservationDoc = v.object({
|
|
81
|
+
...reservationFields,
|
|
82
|
+
_id: v.id("recoveryReservations"),
|
|
83
|
+
_creationTime: v.number(),
|
|
84
|
+
});
|
|
85
|
+
export const claimsTable = defineTable(claimFields)
|
|
86
|
+
.index("by_key", ["claimKey"])
|
|
87
|
+
.index("by_scope", ["accountId", "scopeKey", "currency"])
|
|
88
|
+
.index("by_sign", ["accountId", "scopeKey", "currency", "sign"]);
|
|
89
|
+
export const balancesTable = defineTable(balanceFields).index("by_scope", [
|
|
90
|
+
"accountId",
|
|
91
|
+
"scopeKey",
|
|
92
|
+
"currency",
|
|
93
|
+
]);
|
|
94
|
+
export const groupsTable = defineTable(groupFields).index("by_key", [
|
|
95
|
+
"groupKey",
|
|
96
|
+
]);
|
|
97
|
+
export const reservationsTable = defineTable(reservationFields)
|
|
98
|
+
.index("by_key", ["operationKey"])
|
|
99
|
+
.index("by_group_status", ["groupKey", "status"]);
|
|
100
|
+
export const reserveArgs = {
|
|
101
|
+
...groupInput,
|
|
102
|
+
operationKey: v.string(),
|
|
103
|
+
limit: v.optional(v.number()),
|
|
104
|
+
};
|
|
105
|
+
export const finishArgs = {
|
|
106
|
+
groupKey: v.string(),
|
|
107
|
+
outcome: v.union(v.literal("collect"), v.literal("release")),
|
|
108
|
+
limit: v.optional(v.number()),
|
|
109
|
+
};
|
|
110
|
+
export const rollbackArgs = {
|
|
111
|
+
groupKey: v.string(),
|
|
112
|
+
returnedPrincipal: v.number(),
|
|
113
|
+
revision: v.number(),
|
|
114
|
+
};
|
|
115
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/component/costRecovery/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;CACrB,CAAC;AACF,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,eAAe,EAAE,CAAC,CAAC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