Compare commits
21 Commits
Author | SHA1 | Date | |
---|---|---|---|
64e334761e | |||
d2014b8e96 | |||
fd3932976d | |||
c0539be66e | |||
00e5a96f05 | |||
53aada4638 | |||
9724813028 | |||
e5b39e0709 | |||
12242006aa | |||
2e0164eaf0 | |||
163f4c0154 | |||
7afcabf3f9 | |||
9e7a23edb0 | |||
0cf6aab426 | |||
a971c6e1bc | |||
3470b66ef3 | |||
444de6c2a1 | |||
acf9dac659 | |||
41ba681227 | |||
9c4cab0a01 | |||
e6a97a07da |
4
.gitignore
vendored
4
.gitignore
vendored
@ -15,8 +15,6 @@ node_modules/
|
||||
|
||||
# builds
|
||||
dist/
|
||||
dist_web/
|
||||
dist_serve/
|
||||
dist_ts_web/
|
||||
dist_*/
|
||||
|
||||
# custom
|
122
.gitlab-ci.yml
122
.gitlab-ci.yml
@ -1,16 +1,16 @@
|
||||
# gitzone standard
|
||||
image: hosttoday/ht-docker-node:npmci
|
||||
# gitzone ci_default
|
||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
|
||||
cache:
|
||||
paths:
|
||||
- .npmci_cache/
|
||||
key: "$CI_BUILD_STAGE"
|
||||
- .npmci_cache/
|
||||
key: '$CI_BUILD_STAGE'
|
||||
|
||||
stages:
|
||||
- security
|
||||
- test
|
||||
- release
|
||||
- metadata
|
||||
- security
|
||||
- test
|
||||
- release
|
||||
- metadata
|
||||
|
||||
# ====================
|
||||
# security stage
|
||||
@ -18,102 +18,114 @@ stages:
|
||||
mirror:
|
||||
stage: security
|
||||
script:
|
||||
- npmci git mirror
|
||||
- npmci git mirror
|
||||
only:
|
||||
- tags
|
||||
tags:
|
||||
- docker
|
||||
- notpriv
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
snyk:
|
||||
auditProductionDependencies:
|
||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
stage: security
|
||||
script:
|
||||
- npmci npm prepare
|
||||
- npmci command npm install -g snyk
|
||||
- npmci command npm install --ignore-scripts
|
||||
- npmci command snyk test
|
||||
- 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
|
||||
- notpriv
|
||||
- docker
|
||||
|
||||
auditDevDependencies:
|
||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
stage: security
|
||||
script:
|
||||
- npmci npm prepare
|
||||
- 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
|
||||
tags:
|
||||
- docker
|
||||
allow_failure: true
|
||||
|
||||
# ====================
|
||||
# test stage
|
||||
# ====================
|
||||
|
||||
testLTS:
|
||||
testStable:
|
||||
stage: test
|
||||
script:
|
||||
- npmci npm prepare
|
||||
- npmci node install lts
|
||||
- npmci npm install
|
||||
- npmci npm test
|
||||
- npmci npm prepare
|
||||
- npmci node install stable
|
||||
- npmci npm install
|
||||
- npmci npm test
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- docker
|
||||
- notpriv
|
||||
- docker
|
||||
|
||||
testSTABLE:
|
||||
testBuild:
|
||||
stage: test
|
||||
script:
|
||||
- npmci npm prepare
|
||||
- npmci node install stable
|
||||
- npmci npm install
|
||||
- npmci npm test
|
||||
- npmci npm prepare
|
||||
- npmci node install stable
|
||||
- npmci npm install
|
||||
- npmci command npm run build
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- docker
|
||||
- notpriv
|
||||
- docker
|
||||
|
||||
release:
|
||||
stage: release
|
||||
script:
|
||||
- npmci node install stable
|
||||
- npmci npm publish
|
||||
- npmci node install stable
|
||||
- npmci npm publish
|
||||
only:
|
||||
- tags
|
||||
- tags
|
||||
tags:
|
||||
- docker
|
||||
- notpriv
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
# ====================
|
||||
# metadata stage
|
||||
# ====================
|
||||
codequality:
|
||||
stage: metadata
|
||||
image: docker:stable
|
||||
allow_failure: true
|
||||
services:
|
||||
- docker:stable-dind
|
||||
only:
|
||||
- tags
|
||||
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 prepare
|
||||
- npmci npm install
|
||||
- npmci command "tslint -c tslint.json ./ts/**/*.ts"
|
||||
tags:
|
||||
- docker
|
||||
- priv
|
||||
- lossless
|
||||
- docker
|
||||
- priv
|
||||
|
||||
trigger:
|
||||
stage: metadata
|
||||
script:
|
||||
- npmci trigger
|
||||
- npmci trigger
|
||||
only:
|
||||
- tags
|
||||
- tags
|
||||
tags:
|
||||
- docker
|
||||
- notpriv
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
pages:
|
||||
image: hosttoday/ht-docker-node:npmci
|
||||
stage: metadata
|
||||
script:
|
||||
- npmci node install lts
|
||||
- npmci command npm install -g @gitzone/tsdoc
|
||||
- npmci npm prepare
|
||||
- npmci npm install
|
||||
- npmci command tsdoc
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
only:
|
||||
@ -121,5 +133,5 @@ pages:
|
||||
artifacts:
|
||||
expire_in: 1 week
|
||||
paths:
|
||||
- public
|
||||
- public
|
||||
allow_failure: true
|
||||
|
29
.vscode/launch.json
vendored
Normal file
29
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "current file",
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"args": [
|
||||
"${relativeFile}"
|
||||
],
|
||||
"runtimeArgs": ["-r", "@gitzone/tsrun"],
|
||||
"cwd": "${workspaceRoot}",
|
||||
"protocol": "inspector",
|
||||
"internalConsoleOptions": "openOnSessionStart"
|
||||
},
|
||||
{
|
||||
"name": "test.ts",
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"args": [
|
||||
"test/test.ts"
|
||||
],
|
||||
"runtimeArgs": ["-r", "@gitzone/tsrun"],
|
||||
"cwd": "${workspaceRoot}",
|
||||
"protocol": "inspector",
|
||||
"internalConsoleOptions": "openOnSessionStart"
|
||||
}
|
||||
]
|
||||
}
|
26
.vscode/settings.json
vendored
Normal file
26
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
{
|
||||
"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"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@ -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
38
package.json
38
package.json
@ -1,24 +1,38 @@
|
||||
{
|
||||
"name": "@financeplus/finplus-interfaces",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.14",
|
||||
"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_*/**/*",
|
||||
"dist_ts/**/*",
|
||||
"dist_ts_web/**/*",
|
||||
"assets/**/*",
|
||||
"cli.js",
|
||||
"npmextra.json",
|
||||
"readme.md"
|
||||
],
|
||||
"browserslist": [
|
||||
"last 1 chrome versions"
|
||||
]
|
||||
}
|
||||
|
30
readme.md
30
readme.md
@ -8,19 +8,31 @@ an interface package for the financeplus organization
|
||||
* [docs (typedoc)](https://financeplus.gitlab.io/finplus-interfaces/)
|
||||
|
||||
## Status for master
|
||||
[](https://gitlab.com/financeplus/finplus-interfaces/commits/master)
|
||||
[](https://gitlab.com/financeplus/finplus-interfaces/commits/master)
|
||||
[](https://www.npmjs.com/package/@financeplus/finplus-interfaces)
|
||||
[](https://snyk.io/test/npm/@financeplus/finplus-interfaces)
|
||||
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||
[](https://prettier.io/)
|
||||
|
||||
Status Category | Status Badge
|
||||
-- | --
|
||||
GitLab Pipelines | [](https://lossless.cloud)
|
||||
GitLab Pipline Test Coverage | [](https://lossless.cloud)
|
||||
npm | [](https://lossless.cloud)
|
||||
Snyk | [](https://lossless.cloud)
|
||||
TypeScript Support | [](https://lossless.cloud)
|
||||
node Support | [](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||
Code Style | [](https://lossless.cloud)
|
||||
PackagePhobia (total standalone install weight) | [](https://lossless.cloud)
|
||||
PackagePhobia (package size on registry) | [](https://lossless.cloud)
|
||||
BundlePhobia (total size when bundled) | [](https://lossless.cloud)
|
||||
Platform support | [](https://lossless.cloud) [](https://lossless.cloud)
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
## Contribution
|
||||
|
||||
We are always happy for code contributions. If you are not the code contributing type that is ok. Still, maintaining Open Source repositories takes considerable time and thought. If you like the quality of what we do and our modules are useful to you we would appreciate a little monthly contribution: You can [contribute one time](https://lossless.link/contribute-onetime) or [contribute monthly](https://lossless.link/contribute). :)
|
||||
|
||||
For further information read the linked docs at the top of this readme.
|
||||
|
||||
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
|
||||
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
|
||||
|
||||
[](https://maintainedby.lossless.com)
|
||||
[](https://maintainedby.lossless.com)
|
||||
|
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,3 +1,2 @@
|
||||
import * as plugins from './finplus-interfaces.plugins';
|
||||
|
||||
export let standardExport = 'Hi there! :) This is an exported string';
|
||||
export * from './abstractclasses';
|
||||
export * from './interfaces';
|
||||
|
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