Compare commits

..

No commits in common. "master" and "v1.0.12" have entirely different histories.

27 changed files with 1889 additions and 6384 deletions

View File

@ -1,66 +0,0 @@
name: Default (not tags)
on:
push:
tags-ignore:
- '**'
env:
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
jobs:
security:
runs-on: ubuntu-latest
continue-on-error: true
container:
image: ${{ env.IMAGE }}
steps:
- uses: actions/checkout@v3
- name: Install pnpm and npmci
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
- name: Run npm prepare
run: npmci npm prepare
- name: Audit production dependencies
run: |
npmci command npm config set registry https://registry.npmjs.org
npmci command pnpm audit --audit-level=high --prod
continue-on-error: true
- name: Audit development dependencies
run: |
npmci command npm config set registry https://registry.npmjs.org
npmci command pnpm audit --audit-level=high --dev
continue-on-error: true
test:
if: ${{ always() }}
needs: security
runs-on: ubuntu-latest
container:
image: ${{ env.IMAGE }}
steps:
- uses: actions/checkout@v3
- name: Test stable
run: |
npmci node install stable
npmci npm install
npmci npm test
- name: Test build
run: |
npmci node install stable
npmci npm install
npmci npm build

View File

@ -1,124 +0,0 @@
name: Default (tags)
on:
push:
tags:
- '*'
env:
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
jobs:
security:
runs-on: ubuntu-latest
continue-on-error: true
container:
image: ${{ env.IMAGE }}
steps:
- uses: actions/checkout@v3
- name: Prepare
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
npmci npm prepare
- name: Audit production dependencies
run: |
npmci command npm config set registry https://registry.npmjs.org
npmci command pnpm audit --audit-level=high --prod
continue-on-error: true
- name: Audit development dependencies
run: |
npmci command npm config set registry https://registry.npmjs.org
npmci command pnpm audit --audit-level=high --dev
continue-on-error: true
test:
if: ${{ always() }}
needs: security
runs-on: ubuntu-latest
container:
image: ${{ env.IMAGE }}
steps:
- uses: actions/checkout@v3
- name: Prepare
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
npmci npm prepare
- name: Test stable
run: |
npmci node install stable
npmci npm install
npmci npm test
- name: Test build
run: |
npmci node install stable
npmci npm install
npmci npm build
release:
needs: test
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
container:
image: ${{ env.IMAGE }}
steps:
- uses: actions/checkout@v3
- name: Prepare
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
npmci npm prepare
- name: Release
run: |
npmci node install stable
npmci npm publish
metadata:
needs: test
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
container:
image: ${{ env.IMAGE }}
continue-on-error: true
steps:
- uses: actions/checkout@v3
- name: Prepare
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
npmci npm prepare
- name: Code quality
run: |
npmci command npm install -g typescript
npmci npm install
- name: Trigger
run: npmci trigger
- name: Build docs and upload artifacts
run: |
npmci node install stable
npmci npm install
pnpm install -g @git.zone/tsdoc
npmci command tsdoc
continue-on-error: true

4
.gitignore vendored
View File

@ -15,6 +15,8 @@ node_modules/
# builds
dist/
dist_*/
dist_web/
dist_serve/
dist_ts_web/
# custom

View File

@ -4,7 +4,7 @@ image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
cache:
paths:
- .npmci_cache/
key: '$CI_BUILD_STAGE'
key: "$CI_BUILD_STAGE"
stages:
- security
@ -19,71 +19,45 @@ mirror:
stage: security
script:
- npmci git mirror
only:
- tags
tags:
- lossless
- docker
- notpriv
auditProductionDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security
script:
- npmci npm prepare
- npmci command npm install --production --ignore-scripts
- npmci command npm config set registry https://registry.npmjs.org
- npmci command npm audit --audit-level=high --only=prod --production
tags:
- docker
auditDevDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
snyk:
stage: security
script:
- npmci npm prepare
- npmci command npm install -g snyk
- npmci command npm install --ignore-scripts
- npmci command npm config set registry https://registry.npmjs.org
- npmci command npm audit --audit-level=high --only=dev
- npmci command snyk test
tags:
- docker
allow_failure: true
- notpriv
# ====================
# test stage
# ====================
testStable:
testLTS:
stage: test
script:
- npmci npm prepare
- npmci node install stable
- npmci node install lts
- npmci npm install
- npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
testBuild:
stage: test
script:
- npmci npm prepare
- npmci node install stable
- npmci npm install
- npmci command npm run build
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
- notpriv
release:
stage: release
script:
- npmci node install stable
- npmci node install lts
- npmci npm publish
only:
- tags
tags:
- lossless
- docker
- notpriv
@ -93,15 +67,11 @@ release:
codequality:
stage: metadata
allow_failure: true
only:
- tags
script:
- npmci command npm install -g tslint typescript
- npmci npm prepare
- npmci npm install
- npmci command "tslint -c tslint.json ./ts/**/*.ts"
tags:
- lossless
- docker
- priv
@ -112,20 +82,18 @@ trigger:
only:
- tags
tags:
- lossless
- docker
- notpriv
pages:
image: hosttoday/ht-docker-node:npmci
stage: metadata
script:
- npmci node install lts
- npmci command npm install -g @git.zone/tsdoc
- npmci command npm install -g @gitzone/tsdoc
- npmci npm prepare
- npmci npm install
- npmci command tsdoc
tags:
- lossless
- docker
- notpriv
only:

1
.npmrc
View File

@ -1 +0,0 @@
registry=https://verdaccio.nevermind.cloud

11
.vscode/launch.json vendored
View File

@ -1,11 +0,0 @@
{
"version": "0.2.0",
"configurations": [
{
"command": "npm test",
"name": "Run npm test",
"request": "launch",
"type": "node-terminal"
}
]
}

26
.vscode/settings.json vendored
View File

@ -1,26 +0,0 @@
{
"json.schemas": [
{
"fileMatch": ["/npmextra.json"],
"schema": {
"type": "object",
"properties": {
"npmci": {
"type": "object",
"description": "settings for npmci"
},
"gitzone": {
"type": "object",
"description": "settings for gitzone",
"properties": {
"projectType": {
"type": "string",
"enum": ["website", "element", "service", "npm", "wcc"]
}
}
}
}
}
}
]
}

View File

@ -1,50 +0,0 @@
# Changelog
## 2024-07-05 - 1.0.28 - fix(documentation)
Updated documentation in readme.md
- Fixed and elaborated on the installation steps for npm and yarn.
- Added usage examples and interfaces overview sections.
- Included sections on advanced usage scenarios like handling multiple CSV files, transaction filtering and aggregation.
## 2024-07-02 - 1.0.27 - fix(core)
Fix npm package availability links and status badges in readme.md
- Updated npm, GitLab, and GitHub links in readme.md.
- Enhanced status badges for clearer visibility.
## 2024-07-02 - 1.0.26 - fix(core)
Update package.json dependencies and metadata
- Updated devDependencies versions in package.json
## 2023-11-17 - 1.0.25 - core
Fixes and updates to the core functionalities.
- update
## 2023-11-16 - 1.0.15 to 1.0.24 - core
Series of fixes and updates to the core functionalities.
- update
## 2021-04-16 - 1.0.11 to 1.0.15 - core
Series of fixes and updates to the core functionalities.
- update
## 2019-07-07 - 1.0.8 - core
Fixes and added new features related to CSV parsing.
- add Base class for CSV Parsers
## 2019-06-24 - 1.0.5 to 1.0.7 - core
Series of fixes and updates to the core functionalities.
- update
## 2019-05-23 - 1.0.1 to 1.0.4 - core
Initial series of updates and fixes following project launch.
- update

View File

@ -1,4 +1,4 @@
Copyright (c) 2019 Task Venture Capital GmbH (hello@task.vc)
Copyright (c) 2019 Lossless GmbH (hello@lossless.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,23 +1,13 @@
{
"gitzone": {
"projectType": "npm",
"module": {
"githost": "gitlab.com",
"gitscope": "fin.cx",
"gitrepo": "portablefinance",
"description": "An interface package for handling financial transactions and account data within the financeplus organization.",
"npmPackagename": "@fin.cx/portablefinance",
"gitscope": "financeplus",
"gitrepo": "finplus-interfaces",
"shortDescription": "an interface package for the financeplus organization",
"npmPackagename": "@financeplus/finplus-interfaces",
"license": "MIT",
"projectDomain": "fin.cx",
"keywords": [
"finance",
"financial transactions",
"payment accounts",
"interfaces",
"vouchers",
"csv",
"typescript"
]
"projectDomain": "finance.plus"
}
},
"npmci": {

1772
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,55 +1,34 @@
{
"name": "@fin.cx/portablefinance",
"version": "1.0.28",
"name": "@financeplus/finplus-interfaces",
"version": "1.0.12",
"private": false,
"description": "An interface package for handling financial transactions and account data within the financeplus organization.",
"main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts",
"description": "an interface package for the financeplus organization",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"author": "Lossless GmbH",
"license": "MIT",
"scripts": {
"test": "(tstest test/ --web)",
"build": "(tsbuild --web)",
"buildDocs": "tsdoc"
"test": "(tstest test/)",
"build": "(tsbuild)",
"format": "(gitzone format)"
},
"devDependencies": {
"@git.zone/tsbuild": "^2.1.25",
"@git.zone/tsrun": "^1.2.46",
"@git.zone/tstest": "^1.0.52",
"@push.rocks/tapbundle": "^5.0.15",
"@types/node": "^20.9.0"
"@gitzone/tsbuild": "^2.0.22",
"@gitzone/tstest": "^1.0.24",
"@pushrocks/tapbundle": "^3.0.11",
"@types/node": "^12.0.12",
"tslint": "^5.18.0",
"tslint-config-prettier": "^1.15.0"
},
"dependencies": {},
"files": [
"ts/**/*",
"ts_web/**/*",
"dist/**/*",
"dist_*/**/*",
"dist_ts/**/*",
"dist_ts_web/**/*",
"assets/**/*",
"ts/*",
"ts_web/*",
"dist/*",
"dist_web/*",
"assets/*",
"cli.js",
"npmextra.json",
"readme.md"
],
"browserslist": [
"last 1 chrome versions"
],
"repository": {
"type": "git",
"url": "git+https://gitlab.com/fin.cx/portablefinance.git"
},
"bugs": {
"url": "https://gitlab.com/fin.cx/portablefinance/issues"
},
"homepage": "https://gitlab.com/fin.cx/portablefinance#readme",
"type": "module",
"keywords": [
"finance",
"financial transactions",
"payment accounts",
"interfaces",
"vouchers",
"csv",
"typescript"
]
}

5701
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

245
readme.md
View File

@ -1,235 +1,26 @@
# @fin.cx/portablefinance
# @financeplus/finplus-interfaces
an interface package for the financeplus organization
## Install
To install the `@fin.cx/portablefinance` package, you can use npm or yarn. Make sure you have Node.js installed on your machine.
## Availabililty and Links
* [npmjs.org (npm package)](https://www.npmjs.com/package/@financeplus/finplus-interfaces)
* [gitlab.com (source)](https://gitlab.com/financeplus/finplus-interfaces)
* [github.com (source mirror)](https://github.com/financeplus/finplus-interfaces)
* [docs (typedoc)](https://financeplus.gitlab.io/finplus-interfaces/)
Using npm:
```sh
npm install @fin.cx/portablefinance
```
Using yarn:
```sh
yarn add @fin.cx/portablefinance
```
## Status for master
[![build status](https://gitlab.com/financeplus/finplus-interfaces/badges/master/build.svg)](https://gitlab.com/financeplus/finplus-interfaces/commits/master)
[![coverage report](https://gitlab.com/financeplus/finplus-interfaces/badges/master/coverage.svg)](https://gitlab.com/financeplus/finplus-interfaces/commits/master)
[![npm downloads per month](https://img.shields.io/npm/dm/@financeplus/finplus-interfaces.svg)](https://www.npmjs.com/package/@financeplus/finplus-interfaces)
[![Known Vulnerabilities](https://snyk.io/test/npm/@financeplus/finplus-interfaces/badge.svg)](https://snyk.io/test/npm/@financeplus/finplus-interfaces)
[![TypeScript](https://img.shields.io/badge/TypeScript->=%203.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
[![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-prettier-ff69b4.svg)](https://prettier.io/)
## Usage
```typescript
import {
AcCsvParser,
IMonetaryTransaction,
IPaymentAccount,
IMonthlyCheckpoint,
IVoucher,
ICsvDescriptor
} from '@fin.cx/portablefinance';
For further information read the linked docs at the top of this readme.
// 1. Define a CSV Parser
class MyCsvParser extends AcCsvParser<IMonetaryTransaction> {
public paymentProviderName = 'mybank';
public description = 'Custom CSV Parser for MyBank';
private transactions: IMonetaryTransaction[] = [];
> MIT licensed | **&copy;** [Lossless GmbH](https://lossless.gmbh)
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
public addCsvDecriptor(csvDescriptorArg: ICsvDescriptor): void {
// Implement the logic to parse the CSV and populate transactions array
// For simplicity, assume the CSV is correctly formatted and contains the necessary transaction details.
this.transactions = [
{
id: 'txn1',
data: {
paymentAccountId: 'acc1',
originTransactionId: 'orig1',
originAccountId: 'origAcc1',
additionalIds: ['add1', 'add2'],
date: Date.now(),
amount: 1000,
description: 'Payment for services',
name: 'Service Payment',
},
},
];
}
public async getTransactions(): Promise<IMonetaryTransaction[]> {
return this.transactions;
}
}
// 2. Define a Payment Account
const myVoucher: IVoucher = {
voucherDate: new Date(),
voucherId: 'vch1',
voucherStatus: 'uploaded',
voucherBinaryString: 'binarystringdata',
};
const myAccount: IPaymentAccount = {
id: 'acc1',
data: {
status: 'active',
connectionData: {
bankAdapterType: 'mybank',
credentials: {
username: 'user',
password: 'pass',
},
},
currency: 'USD',
name: 'MyBankAccount',
checkpoints: {
'2021': {
1: {
start: new Date('2021-01-01').getTime(),
end: new Date('2021-01-31').getTime(),
pdfVoucher: myVoucher,
},
2: {
start: new Date('2021-02-01').getTime(),
end: new Date('2021-02-28').getTime(),
pdfVoucher: myVoucher,
},
},
},
},
};
// 3. Working with Transactions and Accounts
(async () => {
const csvParser = new MyCsvParser();
const csvDescriptor: ICsvDescriptor = {
name: 'transactions.csv',
contentString: 'dummy content', // Replace with actual CSV content
};
csvParser.addCsvDecriptor(csvDescriptor);
const transactions = await csvParser.getTransactions();
console.log('Parsed Transactions:', transactions);
console.log('Payment Account:', myAccount);
})();
```
In this example, we demonstrate how to:
1. Define a custom CSV parser class (`MyCsvParser`) that extends the `AcCsvParser` abstract class.
2. Implement the `addCsvDecriptor` method to parse CSV content and populate transactions.
3. Define a sample payment account (`myAccount`) with necessary details.
4. Integrate the parser and account information in an asynchronous function to showcase the usage of parsed transactions and account data.
### Interfaces Overview
#### IVoucher Interface
The `IVoucher` interface is used to represent payment vouchers, with the following fields:
* `voucherDate`: Date The date the voucher was created.
* `voucherId`: string Unique identifier for the voucher.
* `voucherStatus`: 'uploaded' | 'transmitted' The status of the voucher.
* `voucherBinaryString`: string The binary string representation of the voucher content.
#### IMonetaryTransaction Interface
The `IMonetaryTransaction` interface is used to represent monetary transactions, with the following fields:
* `id`: string Unique identifier for the transaction.
* `data`: object Contains key details about the transaction:
* `paymentAccountId`: string Identifier for the payment account involved in the transaction.
* `originTransactionId`: string Identifier for the original transaction (in case of related transactions).
* `originAccountId`: string Identifier for the account from where the transaction originated.
* `additionalIds`: string[] Additional identifiers related to the transaction.
* `date`: number Date of the transaction (timestamp).
* `amount`: number Amount involved in the transaction.
* `description`: string Description of the transaction.
* `name`: string Name associated with the transaction.
* Optional properties for additional voucher data and metadata.
#### IPaymentAccount Interface
The `IPaymentAccount` interface represents a payment account with various properties, organized into nested structures.
* `id`: string Unique identifier for the payment account.
* `data`: object Contains the core data for the payment account:
* `status`: 'active' | 'inactive' | 'deleted' Status of the account.
* `connectionData`: object Holds connection-related data such as type and credentials.
* `currency`: 'EUR' | 'USD' Currency of the account.
* `name`: string Name of the account.
* `checkpoints`: object Monthly checkpoint data structured by year.
#### ICsvDescriptor Interface
The `ICsvDescriptor` interface describes a CSV file, consisting of:
* `name`: string Name of the CSV file.
* `contentString`: string The content of the CSV file as a string.
### Abstract Class AcCsvParser
The `AcCsvParser` abstract class serves as a blueprint for creating specific CSV parsers for different payment providers. It includes:
* `paymentProviderName`: Abstract property for the name of the payment provider.
* `description`: Abstract property for a description of the parser.
* `addCsvDecriptor`: Abstract method accepting a `ICsvDescriptor` object to process CSV data.
* `getTransactions`: Abstract method returning a promise which resolves to an array of `IMonetaryTransaction` objects.
### Advanced Usage
Beyond the basic usage demonstrated above, the `@fin.cx/portablefinance` package can be utilized for more advanced financial data management scenarios:
#### Handling Multiple CSV Files
```typescript
// Define multiple CSV descriptors
const csvDescriptors: ICsvDescriptor[] = [
{
name: 'transactions_jan.csv',
contentString: 'dummy content January', // Replace with actual content
},
{
name: 'transactions_feb.csv',
contentString: 'dummy content February', // Replace with actual content
},
];
// Add and parse all CSV files
csvDescriptors.forEach((descriptor) => {
csvParser.addCsvDecriptor(descriptor);
});
// Retrieve and process all transactions
const allTransactions = await csvParser.getTransactions();
console.log('All Transactions:', allTransactions);
```
#### Transaction Filtering and Aggregation
```typescript
// Filter transactions by date or amount
const filteredTransactions = allTransactions.filter((transaction) => {
return transaction.data.amount > 500; // Example: transactions greater than 500
});
console.log('Filtered Transactions:', filteredTransactions);
// Aggregate transaction amounts
const totalAmount = allTransactions.reduce((acc, transaction) => acc + transaction.data.amount, 0);
console.log('Total Transaction Amount:', totalAmount);
```
#### Integration with Payment Accounts
```typescript
// Assume we have multiple accounts
const accounts: IPaymentAccount[] = [myAccount]; // Add more accounts as needed
// Link transactions to payment accounts
const transactionsByAccount = accounts.map((account) => {
return {
accountId: account.id,
transactions: allTransactions.filter((txn) => txn.data.paymentAccountId === account.id),
};
});
console.log('Transactions by Account:', transactionsByAccount);
```
This comprehensive usage example covers the complete set of features provided by the `@fin.cx/portablefinance` package, demonstrating how to extend the abstract CSV parser, work with interfaces, handle multiple CSV files, filter and aggregate transactions, and integrate them with payment accounts. Feel free to customize the example based on your specific use cases and workflows.
For further information, consult the linked documentation at the top of this README.
Happy coding! 😊
[![repo-footer](https://financeplus.gitlab.io/assets/repo-footer.svg)](https://maintainedby.lossless.com)

View File

@ -1,14 +1,13 @@
import { expect, tap } from '@push.rocks/tapbundle';
import * as finplusInterfaces from '../ts/index.js';
import { expect, tap } from '@pushrocks/tapbundle';
import * as finplusInterfaces from '../ts/index';
interface ITestTransaction {
date: Date;
amount: number;
}
tap.test('implement test csv parser', async () => {
tap.test('first test', async () => {
class MyCsvParser extends finplusInterfaces.AcCsvParser<ITestTransaction> {
paymentProviderName: 'bunq';
public transactionArray: ITestTransaction[] = [];
public async getTransactions(): Promise<ITestTransaction[]> {
return this.transactionArray;

View File

@ -1,8 +0,0 @@
/**
* autocreated commitinfo by @push.rocks/commitinfo
*/
export const commitinfo = {
name: '@fin.cx/portablefinance',
version: '1.0.28',
description: 'An interface package for handling financial transactions and account data within the financeplus organization.'
}

View File

@ -1,9 +1,5 @@
import type { ICsvDescriptor } from '../interfaces/csvdescriptor.js';
import { type IMonetaryTransaction } from '../interfaces/transaction.js';
export abstract class AcCsvParser<TOriginalTrnasction> {
export abstract class AcCsvParser<T> {
public abstract paymentProviderName: string;
public abstract description: string;
public abstract addCsvDecriptor(csvDescriptorArg: ICsvDescriptor): void;
public abstract getTransactions(): Promise<IMonetaryTransaction[]>;
public abstract transactionArray: T[];
public abstract getTransactions(): Promise<T[]>;
}

View File

@ -1 +1 @@
export * from './csvparser.js';
export * from './csvparser';

View File

@ -1,2 +1,3 @@
export * from './abstractclasses/index.js';
export * from './interfaces/index.js';
export * from './abstractclasses';
export * from './interfaces';

View File

@ -1,4 +0,0 @@
export interface ICsvDescriptor {
name: string;
contentString: string;
}

View File

@ -1,4 +0,0 @@
export * from './csvdescriptor.js';
export * from './paymentaccount.js';
export * from './transaction.js';
export * from './voucher.js';

View File

@ -1,4 +1,4 @@
import { type IVoucher } from './voucher.js';
import { IVoucher } from './voucher';
export interface IMonthlyCheckpoint {
start: number;
@ -6,8 +6,8 @@ export interface IMonthlyCheckpoint {
pdfVoucher: IVoucher;
}
export interface IPaymentAccount {
id: string;
export interface IFinplusPaymentAccount {
finplusPaymentAccountId: string;
data: {
status: 'active' | 'inactive' | 'deleted';
connectionData: {

View File

@ -1,9 +1,9 @@
import { type IVoucher } from './voucher.js';
import { IVoucher } from "./voucher";
export interface IMonetaryTransaction {
id: string;
export interface IFinplusTransaction {
finplusTransactionId: string;
data: {
paymentAccountId: string;
finplusPaymentAccountId: string;
originTransactionId: string;
originAccountId: string;
additionalIds: string[];

View File

@ -2,5 +2,4 @@ export interface IVoucher {
voucherDate: Date;
voucherId: string;
voucherStatus: 'uploaded' | 'transmitted';
voucherBinaryString: string;
}

View File

@ -1,14 +0,0 @@
{
"compilerOptions": {
"experimentalDecorators": true,
"useDefineForClassFields": false,
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"esModuleInterop": true,
"verbatimModuleSyntax": true
},
"exclude": [
"dist_*/**/*.d.ts"
]
}

17
tslint.json Normal file
View File

@ -0,0 +1,17 @@
{
"extends": ["tslint:latest", "tslint-config-prettier"],
"rules": {
"semicolon": [true, "always"],
"no-console": false,
"ordered-imports": false,
"object-literal-sort-keys": false,
"member-ordering": {
"options":{
"order": [
"static-method"
]
}
}
},
"defaultSeverity": "warning"
}