
- 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>
32 lines
666 B
TypeScript
32 lines
666 B
TypeScript
import type { Bank, Transaction } from "@/bank/sparebank1.ts"
|
|
|
|
export class BankStub implements Bank {
|
|
async transactionsPastDay(
|
|
_accountIds: ReadonlyArray<string> | string,
|
|
): Promise<ReadonlyArray<Transaction>> {
|
|
const someFields = {
|
|
date: "2019-08-20",
|
|
description: "Test transaction",
|
|
cleanedDescription: "Test transaction",
|
|
remoteAccountName: "Test account",
|
|
}
|
|
return [
|
|
{
|
|
id: "1",
|
|
amount: 100,
|
|
...someFields,
|
|
},
|
|
{
|
|
id: "2",
|
|
amount: 200,
|
|
...someFields,
|
|
},
|
|
{
|
|
id: "3",
|
|
amount: -50,
|
|
...someFields,
|
|
},
|
|
]
|
|
}
|
|
}
|