Add bank synchronization features with FinTS support and update dependencies

This commit is contained in:
Matthias
2026-06-15 13:56:32 +02:00
parent fc0a6fb975
commit d65e7681ac
23 changed files with 2609 additions and 150 deletions

View File

@@ -1,5 +1,5 @@
{
"guidelinesHash": "62d72acb9afcc18f658d88dd772f34b5b1da5fa60ef0402e57a784d97c458e57",
"guidelinesHash": "31cdf5763fda9ffee83f538073d80fd995883c95a2bfaf4f6441010f3c391819",
"agentsMdSectionHash": "5934f676ea9a332e7cd4a4f64aa23b59d926e9faca026c758d4b1f87d2101cc3",
"claudeMdHash": "5934f676ea9a332e7cd4a4f64aa23b59d926e9faca026c758d4b1f87d2101cc3",
"agentSkillsSha": "7a6fcc6882f344577a34365fdadbd0f8f8c467d7"

View File

@@ -1,5 +1,7 @@
# Convex guidelines
These guidelines target Convex `^1.41.0`.
## Function guidelines
### Http endpoint syntax
@@ -224,6 +226,7 @@ export const exampleQuery = query({
```
- Be strict with types, particularly around id's of documents. For example, if a function takes in an id for a document in the 'users' table, take in `Id<'users'>` rather than `string`.
- For typed app environment variables, declare them in `convex/convex.config.ts` with `defineApp({ env: { MY_KEY: v.optional(v.string()) } })` and read them with `env` from `./_generated/server` instead of `process.env`.
## Full text search guidelines
@@ -241,7 +244,7 @@ q.search("body", "hello hi").eq("channel", "#general"),
- Do NOT use `filter` in queries. Instead, define an index in the schema and use `withIndex` instead.
- If the user does not explicitly tell you to return all results from a query you should ALWAYS return a bounded collection instead. So that is instead of using `.collect()` you should use `.take()` or paginate on database queries. This prevents future performance issues when tables grow in an unbounded way.
- Never use `.collect().length` to count rows. Convex has no built-in count operator, so if you need a count that stays efficient at scale, maintain a denormalized counter in a separate document and update it in your mutations.
- Convex queries do NOT support `.delete()`. If you need to delete all documents matching a query, use `.take(n)` to read them in batches, iterate over each batch calling `ctx.db.delete(row._id)`, and repeat until no more results are returned.
- Convex queries do NOT support `.delete()`. If you need to delete all documents matching a query, use `.take(n)` to read them in batches, iterate over each batch calling `ctx.db.delete("tasks", row._id)`, and repeat until no more results are returned.
- Convex mutations are transactions with limits on the number of documents read and written. If a mutation needs to process more documents than fit in a single transaction (e.g. bulk deletion on a large table), process a batch with `.take(n)` and then call `ctx.scheduler.runAfter(0, api.myModule.myMutation, args)` to schedule itself to continue. This way each invocation stays within transaction limits.
- Use `.unique()` to get a single document from a query. This method will throw an error if there are multiple documents that match the query.
- When using async iteration, don't use `.collect()` or `.take(n)` on the result of a query. Instead, use the `for await (const row of query)` syntax.
@@ -254,8 +257,8 @@ q.search("body", "hello hi").eq("channel", "#general"),
## Mutation guidelines
- Use `ctx.db.replace` to fully replace an existing document. This method will throw an error if the document does not exist. Syntax: `await ctx.db.replace('tasks', taskId, { name: 'Buy milk', completed: false })`
- Use `ctx.db.patch` to shallow merge updates into an existing document. This method will throw an error if the document does not exist. Syntax: `await ctx.db.patch('tasks', taskId, { completed: true })`
- Use `ctx.db.replace` to fully replace an existing document. This method will throw an error if the document does not exist. Syntax: `await ctx.db.replace("tasks", taskId, { name: "Buy milk", completed: false })`
- Use `ctx.db.patch` to shallow merge updates into an existing document. This method will throw an error if the document does not exist. Syntax: `await ctx.db.patch("tasks", taskId, { completed: true })`
## Action guidelines

View File

@@ -10,6 +10,15 @@
import type * as accounts from "../accounts.js";
import type * as auth from "../auth.js";
import type * as bank_comdirectProvider from "../bank/comdirectProvider.js";
import type * as bank_config from "../bank/config.js";
import type * as bank_fintsConfig from "../bank/fintsConfig.js";
import type * as bank_fintsMap from "../bank/fintsMap.js";
import type * as bank_fintsSession from "../bank/fintsSession.js";
import type * as bank_internal from "../bank/internal.js";
import type * as bank_orchestrator from "../bank/orchestrator.js";
import type * as bank_sync from "../bank/sync.js";
import type * as bank_types from "../bank/types.js";
import type * as categories from "../categories.js";
import type * as comdirect_auth from "../comdirect/auth.js";
import type * as comdirect_client from "../comdirect/client.js";
@@ -38,6 +47,15 @@ import type {
declare const fullApi: ApiFromModules<{
accounts: typeof accounts;
auth: typeof auth;
"bank/comdirectProvider": typeof bank_comdirectProvider;
"bank/config": typeof bank_config;
"bank/fintsConfig": typeof bank_fintsConfig;
"bank/fintsMap": typeof bank_fintsMap;
"bank/fintsSession": typeof bank_fintsSession;
"bank/internal": typeof bank_internal;
"bank/orchestrator": typeof bank_orchestrator;
"bank/sync": typeof bank_sync;
"bank/types": typeof bank_types;
categories: typeof categories;
"comdirect/auth": typeof comdirect_auth;
"comdirect/client": typeof comdirect_client;