12 Commits

Author SHA1 Message Date
fd3932976d 1.0.13 2021-04-15 01:06:14 +00:00
c0539be66e fix(core): update 2021-04-15 01:06:14 +00:00
00e5a96f05 1.0.12 2021-04-15 00:59:57 +00:00
53aada4638 fix(core): update 2021-04-15 00:59:56 +00:00
9724813028 1.0.11 2019-07-07 22:57:13 +02:00
e5b39e0709 fix(core): update 2019-07-07 22:57:12 +02:00
12242006aa 1.0.10 2019-07-07 18:10:57 +02:00
2e0164eaf0 fix(core): update 2019-07-07 18:10:57 +02:00
163f4c0154 1.0.9 2019-07-07 17:24:30 +02:00
7afcabf3f9 fix(core): add Base class for csv Parsers 2019-07-07 17:24:29 +02:00
9e7a23edb0 1.0.8 2019-07-07 17:18:13 +02:00
0cf6aab426 fix(core): update 2019-07-07 17:18:12 +02:00
13 changed files with 12079 additions and 795 deletions

View File

@ -1,5 +1,5 @@
# gitzone standard # gitzone ci_default
image: hosttoday/ht-docker-node:npmci image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
cache: cache:
paths: paths:
@ -49,23 +49,11 @@ testLTS:
tags: tags:
- docker - docker
- notpriv - notpriv
testSTABLE:
stage: test
script:
- npmci npm prepare
- npmci node install stable
- npmci npm install
- npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
- notpriv
release: release:
stage: release stage: release
script: script:
- npmci node install stable - npmci node install lts
- npmci npm publish - npmci npm publish
only: only:
- tags - tags
@ -78,19 +66,11 @@ release:
# ==================== # ====================
codequality: codequality:
stage: metadata stage: metadata
image: docker:stable
allow_failure: true allow_failure: true
services:
- docker:stable-dind
script: script:
- export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/') - npmci command npm install -g tslint typescript
- docker run - npmci npm install
--env SOURCE_CODE="$PWD" - npmci command "tslint -c tslint.json ./ts/**/*.ts"
--volume "$PWD":/code
--volume /var/run/docker.sock:/var/run/docker.sock
"registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code
artifacts:
paths: [codeclimate.json]
tags: tags:
- docker - docker
- priv - priv

View File

@ -1,5 +1,6 @@
{ {
"gitzone": { "gitzone": {
"projectType": "npm",
"module": { "module": {
"githost": "gitlab.com", "githost": "gitlab.com",
"gitscope": "financeplus", "gitscope": "financeplus",

12715
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,24 +1,33 @@
{ {
"name": "@financeplus/finplus-interfaces", "name": "@financeplus/finplus-interfaces",
"version": "1.0.7", "version": "1.0.13",
"private": false, "private": false,
"description": "an interface package for the financeplus organization", "description": "an interface package for the financeplus organization",
"main": "dist/index.js", "main": "dist_ts/index.js",
"typings": "dist/index.d.ts", "typings": "dist_ts/index.d.ts",
"author": "Lossless GmbH", "author": "Lossless GmbH",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"test": "(tstest test/)", "test": "(tstest test/ --web)",
"build": "(tsbuild)", "build": "(tsbuild --web)"
"format": "(gitzone format)"
}, },
"devDependencies": { "devDependencies": {
"@gitzone/tsbuild": "^2.0.22", "@gitzone/tsbuild": "^2.1.25",
"@gitzone/tstest": "^1.0.15", "@gitzone/tstest": "^1.0.52",
"@pushrocks/tapbundle": "^3.0.7", "@pushrocks/tapbundle": "^3.2.14",
"@types/node": "^10.11.7", "@types/node": "^14.14.39",
"tslint": "^5.11.0", "tslint": "^6.1.3",
"tslint-config-prettier": "^1.15.0" "tslint-config-prettier": "^1.15.0"
}, },
"dependencies": {} "dependencies": {},
"files": [
"ts/*",
"ts_web/*",
"dist/*",
"dist_web/*",
"assets/*",
"cli.js",
"npmextra.json",
"readme.md"
]
} }

View File

@ -1,9 +1,18 @@
import { expect, tap } from '@pushrocks/tapbundle'; import { expect, tap } from '@pushrocks/tapbundle';
import * as finplusInterfaces from '../ts/index'; import * as finplusInterfaces from '../ts/index';
interface ITestTransaction {
date: Date;
amount: number;
}
tap.test('first test', async () => { tap.test('first test', async () => {
let dummyCsvParser : finplusInterfaces.ICsvParser; class MyCsvParser extends finplusInterfaces.AcCsvParser<ITestTransaction> {
dummyCsvParser; public transactionArray: ITestTransaction[] = [];
public async getTransactions(): Promise<ITestTransaction[]> {
return this.transactionArray;
}
}
}); });
tap.start(); tap.start();

View File

@ -0,0 +1,5 @@
export abstract class AcCsvParser<T> {
public abstract paymentProviderName: string;
public abstract transactionArray: T[];
public abstract getTransactions(): Promise<T[]>;
}

View File

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

View File

@ -1,4 +1,3 @@
import * as plugins from './finplus-interfaces.plugins'; export * from './abstractclasses';
export * from './interfaces';
export * from './interfaces/csvparser';

View File

@ -1,4 +0,0 @@
export interface ICsvParser {
parse: () => Promise<any>;
}

3
ts/interfaces/index.ts Normal file
View File

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

View File

@ -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;
};
};
};
}

View File

@ -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;
};
};
}

5
ts/interfaces/voucher.ts Normal file
View File

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