paisa-mcp 0.0.4 → 0.0.6
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/dist/index.js +8 -4
- package/dist/index.js.map +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -45242,13 +45242,17 @@ function settlementEnrichedData(description, type, source) {
|
|
|
45242
45242
|
}
|
|
45243
45243
|
// src/tools/transactions.ts
|
|
45244
45244
|
async function runRescan(client) {
|
|
45245
|
-
const
|
|
45246
|
-
const bag = learningRes.data?.bag ?? {
|
|
45245
|
+
const EMPTY_BAG2 = {
|
|
45247
45246
|
merchantAliases: [],
|
|
45248
45247
|
personAliases: [],
|
|
45249
45248
|
merchantRules: {},
|
|
45250
45249
|
personRules: {}
|
|
45251
45250
|
};
|
|
45251
|
+
let bag = EMPTY_BAG2;
|
|
45252
|
+
try {
|
|
45253
|
+
const learningRes = await client.get("/api/household-learning");
|
|
45254
|
+
bag = learningRes.data?.bag ?? EMPTY_BAG2;
|
|
45255
|
+
} catch {}
|
|
45252
45256
|
const merchantsRes = await client.get("/api/merchants");
|
|
45253
45257
|
const allMerchants = merchantsRes.data ?? [];
|
|
45254
45258
|
const globalMerchants = allMerchants.filter((m2) => !m2.householdId && m2.cleanName).map((m2) => ({ id: m2.id, name: m2.cleanName }));
|
|
@@ -45257,7 +45261,7 @@ async function runRescan(client) {
|
|
|
45257
45261
|
const persons = (personsRes.data ?? []).filter((p2) => p2.name);
|
|
45258
45262
|
const allRows = [];
|
|
45259
45263
|
let offset = 0;
|
|
45260
|
-
const limit =
|
|
45264
|
+
const limit = 200;
|
|
45261
45265
|
while (true) {
|
|
45262
45266
|
const res = await client.get("/api/transactions", { limit, offset });
|
|
45263
45267
|
const rows = res.data ?? [];
|
|
@@ -45551,5 +45555,5 @@ main().catch((err) => {
|
|
|
45551
45555
|
process.exit(1);
|
|
45552
45556
|
});
|
|
45553
45557
|
|
|
45554
|
-
//# debugId=
|
|
45558
|
+
//# debugId=557FA489B90AB7D964756E2164756E21
|
|
45555
45559
|
//# sourceMappingURL=index.js.map
|