Files
WYGIWYH/app/apps/bank_sync/providers/__init__.py
T
Herculino Trotta 9238c48bb5 feat(bank-sync): add SimpleFIN provider
Users paste a one-time setup token. On save it's claimed and the access
URL it returns is stored; credentials go in a header, never the URL, so
errors don't leak them.

- Providers can validate or transform their settings (clean_settings),
  run by the service form once every other field is valid, so a token
  isn't spent on a form that fails anyway.
- Providers can declare a minimum sync interval. SimpleFIN Bridge
  disables tokens that go much past ~24 requests a day, so it's 6 hours.
- Tokens and access URLs are user input pointing the server at a host:
  only SimpleFIN Bridge is allowed unless SIMPLEFIN_ALLOWED_HOSTS says
  otherwise. Checked again on every request, for restored settings.
- Transactions are fetched per account in 90-day windows, Bridge's
  limit per request. Pending ones are skipped.
2026-11-08 16:08:37 -03:00

9 lines
272 B
Python

from apps.bank_sync.providers.lunchflow import LunchFlowProvider
from apps.bank_sync.providers.simplefin import SimpleFINProvider
# Keys must match BankSyncService.ServiceType
PROVIDER_MAPPING = {
"lunchflow": LunchFlowProvider,
"simplefin": SimpleFINProvider,
}