5 Commits

Author SHA1 Message Date
b61903f5c8
🎉 Working prototype
- Added missing field payee_name to TransactionEntity type
- Date function to convert DayJs to DateString
- Temp disabled cronjob for testing
- Fixed mapping to ActualModel
- fetchToken db function returns DayJs object for date
- Fixed fetching tokens from db
- Logging
- Fixed fetch previous day transactions
- Fixed token refresh
- Fixed stub based on model changes
2025-01-25 18:01:47 +01:00
4a773e4b43
🔑 Store tokens in Sqllite, moved queries, other fixes
- Create cache dir if missing
- Moved Sqlite queries to queries.ts
- Updated dependencies
- Added pino-pretty to dev-dependencies
- Changed Sqlite to store tokens as separate rows
- Removed in-memory storage of tokens
- isValidToken function
- Throw Exception if refresh token is present but invalid
- Fixed fetch query in smn http file
2025-01-22 21:00:04 +01:00
Martin Berg Alstad
3bf354b4bf
SQLite
Moved DB queries to separate file
Moved Sparebank1 API call to separate file
Create database tokens table if it doesn't exist

Signed-off-by: Martin Berg Alstad <git@martials.no>
2024-12-26 14:08:09 +01:00
Martin Berg Alstad
6650e2cd2b
Removed
- accessToken and refreshToken methods from interface
- accessToken param from transactionsPastDay
- Unused env variables from config.ts

Added
- Initial Refresh token to env
- Dayjs library for working with dates

Implemented
- getAccessToken
- getRefreshToken
- fetchNewRefreshToken
- transactionsPastDay

Signed-off-by: Martin Berg Alstad <git@martials.no>
2024-12-25 21:06:42 +01:00
Martin Berg Alstad
29b394baf4
Moved sparebank1.ts to bank dir
Signed-off-by: Martin Berg Alstad <git@martials.no>
2024-12-22 16:06:20 +01:00