Compare commits
14 Commits
Author | SHA1 | Date | |
---|---|---|---|
fd3932976d | |||
c0539be66e | |||
00e5a96f05 | |||
53aada4638 | |||
9724813028 | |||
e5b39e0709 | |||
12242006aa | |||
2e0164eaf0 | |||
163f4c0154 | |||
7afcabf3f9 | |||
9e7a23edb0 | |||
0cf6aab426 | |||
a971c6e1bc | |||
3470b66ef3 |
@ -1,5 +1,5 @@
|
||||
# gitzone standard
|
||||
image: hosttoday/ht-docker-node:npmci
|
||||
# gitzone ci_default
|
||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
|
||||
cache:
|
||||
paths:
|
||||
@ -49,23 +49,11 @@ testLTS:
|
||||
tags:
|
||||
- docker
|
||||
- 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:
|
||||
stage: release
|
||||
script:
|
||||
- npmci node install stable
|
||||
- npmci node install lts
|
||||
- npmci npm publish
|
||||
only:
|
||||
- tags
|
||||
@ -78,19 +66,11 @@ release:
|
||||
# ====================
|
||||
codequality:
|
||||
stage: metadata
|
||||
image: docker:stable
|
||||
allow_failure: true
|
||||
services:
|
||||
- docker:stable-dind
|
||||
script:
|
||||
- export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
|
||||
- docker run
|
||||
--env SOURCE_CODE="$PWD"
|
||||
--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]
|
||||
- npmci command npm install -g tslint typescript
|
||||
- npmci npm install
|
||||
- npmci command "tslint -c tslint.json ./ts/**/*.ts"
|
||||
tags:
|
||||
- docker
|
||||
- priv
|
||||
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
"gitzone": {
|
||||
"projectType": "npm",
|
||||
"module": {
|
||||
"githost": "gitlab.com",
|
||||
"gitscope": "financeplus",
|
||||
|
12715
package-lock.json
generated
12715
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
33
package.json
33
package.json
@ -1,24 +1,33 @@
|
||||
{
|
||||
"name": "@financeplus/finplus-interfaces",
|
||||
"version": "1.0.6",
|
||||
"version": "1.0.13",
|
||||
"private": false,
|
||||
"description": "an interface package for the financeplus organization",
|
||||
"main": "dist/index.js",
|
||||
"typings": "dist/index.d.ts",
|
||||
"main": "dist_ts/index.js",
|
||||
"typings": "dist_ts/index.d.ts",
|
||||
"author": "Lossless GmbH",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"test": "(tstest test/)",
|
||||
"build": "(tsbuild)",
|
||||
"format": "(gitzone format)"
|
||||
"test": "(tstest test/ --web)",
|
||||
"build": "(tsbuild --web)"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.0.22",
|
||||
"@gitzone/tstest": "^1.0.15",
|
||||
"@pushrocks/tapbundle": "^3.0.7",
|
||||
"@types/node": "^10.11.7",
|
||||
"tslint": "^5.11.0",
|
||||
"@gitzone/tsbuild": "^2.1.25",
|
||||
"@gitzone/tstest": "^1.0.52",
|
||||
"@pushrocks/tapbundle": "^3.2.14",
|
||||
"@types/node": "^14.14.39",
|
||||
"tslint": "^6.1.3",
|
||||
"tslint-config-prettier": "^1.15.0"
|
||||
},
|
||||
"dependencies": {}
|
||||
"dependencies": {},
|
||||
"files": [
|
||||
"ts/*",
|
||||
"ts_web/*",
|
||||
"dist/*",
|
||||
"dist_web/*",
|
||||
"assets/*",
|
||||
"cli.js",
|
||||
"npmextra.json",
|
||||
"readme.md"
|
||||
]
|
||||
}
|
||||
|
12
test/test.ts
12
test/test.ts
@ -1,8 +1,18 @@
|
||||
import { expect, tap } from '@pushrocks/tapbundle';
|
||||
import * as finplusInterfaces from '../ts/index';
|
||||
|
||||
interface ITestTransaction {
|
||||
date: Date;
|
||||
amount: number;
|
||||
}
|
||||
|
||||
tap.test('first test', async () => {
|
||||
console.log(finplusInterfaces.standardExport);
|
||||
class MyCsvParser extends finplusInterfaces.AcCsvParser<ITestTransaction> {
|
||||
public transactionArray: ITestTransaction[] = [];
|
||||
public async getTransactions(): Promise<ITestTransaction[]> {
|
||||
return this.transactionArray;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
tap.start();
|
||||
|
5
ts/abstractclasses/csvparser.ts
Normal file
5
ts/abstractclasses/csvparser.ts
Normal file
@ -0,0 +1,5 @@
|
||||
export abstract class AcCsvParser<T> {
|
||||
public abstract paymentProviderName: string;
|
||||
public abstract transactionArray: T[];
|
||||
public abstract getTransactions(): Promise<T[]>;
|
||||
}
|
1
ts/abstractclasses/index.ts
Normal file
1
ts/abstractclasses/index.ts
Normal file
@ -0,0 +1 @@
|
||||
export * from './csvparser';
|
@ -1,4 +1,3 @@
|
||||
import * as plugins from './finplus-interfaces.plugins';
|
||||
|
||||
export * from './interfaces/csvparser.ts';
|
||||
export * from './abstractclasses';
|
||||
export * from './interfaces';
|
||||
|
||||
|
@ -1,4 +0,0 @@
|
||||
export interface ICsvParser {
|
||||
parse: () => Promise<any>;
|
||||
|
||||
}
|
3
ts/interfaces/index.ts
Normal file
3
ts/interfaces/index.ts
Normal file
@ -0,0 +1,3 @@
|
||||
export * from './paymentaccount';
|
||||
export * from './transaction';
|
||||
export * from './voucher';
|
36
ts/interfaces/paymentaccount.ts
Normal file
36
ts/interfaces/paymentaccount.ts
Normal 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
21
ts/interfaces/transaction.ts
Normal file
21
ts/interfaces/transaction.ts
Normal 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
5
ts/interfaces/voucher.ts
Normal file
@ -0,0 +1,5 @@
|
||||
export interface IVoucher {
|
||||
voucherDate: Date;
|
||||
voucherId: string;
|
||||
voucherStatus: 'uploaded' | 'transmitted';
|
||||
}
|
Reference in New Issue
Block a user