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'; +}