From 53aada4638ff44cd86bbf500d564fdab447d3d05 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Thu, 15 Apr 2021 00:59:56 +0000 Subject: [PATCH] fix(core): update --- .../csvparser.ts | 2 +- ts/abstractclasses/index.ts | 1 + ts/index.ts | 4 +-- ts/interfaces/index.ts | 1 - ts/interfaces/paymentaccount.ts | 36 +++++++++++++++++++ ts/interfaces/transaction.ts | 21 +++++++++++ ts/interfaces/voucher.ts | 5 +++ 7 files changed, 66 insertions(+), 4 deletions(-) rename ts/{interfaces => abstractclasses}/csvparser.ts (69%) create mode 100644 ts/abstractclasses/index.ts create mode 100644 ts/interfaces/paymentaccount.ts create mode 100644 ts/interfaces/transaction.ts create mode 100644 ts/interfaces/voucher.ts diff --git a/ts/interfaces/csvparser.ts b/ts/abstractclasses/csvparser.ts similarity index 69% rename from ts/interfaces/csvparser.ts rename to ts/abstractclasses/csvparser.ts index fec8ca1..93992b1 100644 --- a/ts/interfaces/csvparser.ts +++ b/ts/abstractclasses/csvparser.ts @@ -1,5 +1,5 @@ export abstract class AcCsvParser { public abstract paymentProviderName: string; public abstract transactionArray: T[]; - public abstract async getTransactions(): Promise; + public abstract getTransactions(): Promise; } diff --git a/ts/abstractclasses/index.ts b/ts/abstractclasses/index.ts new file mode 100644 index 0000000..7f76bbd --- /dev/null +++ b/ts/abstractclasses/index.ts @@ -0,0 +1 @@ +export * from './csvparser'; diff --git a/ts/index.ts b/ts/index.ts index dcb91b0..650abf5 100644 --- a/ts/index.ts +++ b/ts/index.ts @@ -1,3 +1,3 @@ -import * as plugins from './finplus-interfaces.plugins'; +export * from './abstractclasses'; +export * from './interfaces'; -export * from './interfaces/csvparser'; diff --git a/ts/interfaces/index.ts b/ts/interfaces/index.ts index 7f76bbd..e69de29 100644 --- a/ts/interfaces/index.ts +++ b/ts/interfaces/index.ts @@ -1 +0,0 @@ -export * from './csvparser'; diff --git a/ts/interfaces/paymentaccount.ts b/ts/interfaces/paymentaccount.ts new file mode 100644 index 0000000..ab37899 --- /dev/null +++ b/ts/interfaces/paymentaccount.ts @@ -0,0 +1,36 @@ +import { IVoucher } from './voucher'; + +export interface IMonthlyCheckpoint { + start: number; + end: number; + pdfVoucher: IVoucher; +} + +export interface IFinplusPaymentAccount { + finplusPaymentAccountId: string; + data: { + status: 'active' | 'inactive' | 'deleted'; + connectionData: { + bankAdapterType: string; + credentials: unknown; + }; + currency: 'EUR' | 'USD'; + name: string; + checkpoints: { + [key: string]: { + 1: IMonthlyCheckpoint; + 2: IMonthlyCheckpoint; + 3: IMonthlyCheckpoint; + 4: IMonthlyCheckpoint; + 5: IMonthlyCheckpoint; + 6: IMonthlyCheckpoint; + 7: IMonthlyCheckpoint; + 8: IMonthlyCheckpoint; + 9: IMonthlyCheckpoint; + 10: IMonthlyCheckpoint; + 11: IMonthlyCheckpoint; + 12: IMonthlyCheckpoint; + }; + }; + }; +} diff --git a/ts/interfaces/transaction.ts b/ts/interfaces/transaction.ts new file mode 100644 index 0000000..6865278 --- /dev/null +++ b/ts/interfaces/transaction.ts @@ -0,0 +1,21 @@ +import { IVoucher } from "./voucher"; + +export interface IFinplusTransaction { + finplusTransactionId: string; + data: { + finplusPaymentAccountId: string; + originTransactionId: string; + originAccountId: string; + additionalIds: string[]; + date: number; + amount: number; + description: string; + name: string; + voucherData?: IVoucher; + justForLooks?: { + paymentAcountName: string; + voucherSizeInMB: number; + dateIso?: string; + }; + }; +} \ No newline at end of file diff --git a/ts/interfaces/voucher.ts b/ts/interfaces/voucher.ts new file mode 100644 index 0000000..e09af05 --- /dev/null +++ b/ts/interfaces/voucher.ts @@ -0,0 +1,5 @@ +export interface IVoucher { + voucherDate: Date; + voucherId: string; + voucherStatus: 'uploaded' | 'transmitted'; +}