Commit Graph

3 Commits

Author SHA1 Message Date
57a808c054 feat: GoCardless proxy server (all /api/v2/* routes)
Implements the full GoCardless Bank Account Data API surface that
actual-server expects:
  POST /api/v2/token/new/              fake GC tokens backed by stored secret_id/key
  POST /api/v2/token/refresh/
  GET  /api/v2/institutions/           proxies EB /aspsps, 1 h cache
  POST /api/v2/agreements/enduser/     stored locally
  GET  /api/v2/agreements/enduser/:id/
  POST /api/v2/requisitions/           calls EB /auth, returns OAuth link
  GET  /api/v2/requisitions/:id/       status CR→LN after callback
  DELETE /api/v2/requisitions/:id/
  GET  /api/v2/accounts/:id/           metadata from store
  GET  /api/v2/accounts/:id/details/   proxies EB /accounts/:uid/details
  GET  /api/v2/accounts/:id/balances/  proxies EB /accounts/:uid/balances
  GET  /api/v2/accounts/:id/transactions/ proxies EB transactions, splits booked/pending
  GET  /callback                       OAuth callback: exchanges code, links requisition,
                                       redirects back to actual-server

Balance type mapping: EB ISO 20022 (CLBD/ITBD/ITAV/FWAV…) → GC camelCase.
Transaction mapping: EB flat array with status field → GC {booked, pending}.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 10:34:12 +02:00
2d81b498d9 feat: add store (JSON persistence) and Enable Banking API client
store.js: read/write ./data/store.json; holds config, tokens, agreements,
requisitions, account mappings.

eb-client.js: RS256 JWT auth (cached, refreshed 60s before expiry),
wrappers for /aspsps, /auth, /sessions, /accounts/* endpoints.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 10:33:42 +02:00
ccb8efd72a chore: initialise project (package.json, .gitignore)
ESM Node.js project using express, jose, node-fetch, uuid.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 10:33:33 +02:00