Compare commits

...

32 Commits

Author SHA1 Message Date
dd39b5d2ce 2.0.12 2019-10-21 17:29:11 +02:00
ab24929c6c fix(core): update 2019-10-21 17:29:10 +02:00
5da0b73a9d 2.0.11 2019-10-02 11:30:22 +02:00
73e10fc59b fix(core): update 2019-10-02 11:30:21 +02:00
a2e8b41042 2.0.10 2019-10-02 11:11:22 +02:00
a0ff9427cb fix(core): update 2019-10-02 11:11:22 +02:00
e37485adbd 2.0.9 2019-10-01 11:28:47 +02:00
e1592f322c fix(core): update 2019-10-01 11:28:47 +02:00
6604a58885 2.0.8 2019-10-01 11:25:12 +02:00
312b6d0e67 fix(core): update 2019-10-01 11:25:12 +02:00
3565360610 2.0.7 2019-09-30 19:24:04 +02:00
f71b131d8d fix(core): update 2019-09-30 19:24:04 +02:00
a1638ff3fd 2.0.6 2019-08-31 12:53:59 +02:00
6b56a605fa fix(core): update 2019-08-31 12:53:59 +02:00
2042e3c08a 2.0.5 2019-08-22 12:21:20 +02:00
ac15227a94 fix(core): update 2019-08-22 12:21:19 +02:00
85adcbdba4 2.0.4 2019-08-22 12:20:47 +02:00
0ed11287eb fix(core): update 2019-08-22 12:20:46 +02:00
6b88e2632c 2.0.3 2019-08-21 15:47:09 +02:00
d017888b3c fix(core): update 2019-08-21 15:47:09 +02:00
7ad6e75fb0 2.0.2 2019-08-21 15:46:48 +02:00
50f8dffe97 fix(core): update 2019-08-21 15:46:48 +02:00
716228fcd3 2.0.1 2019-07-08 14:04:12 +02:00
a0c97dea45 fix(core): update 2019-07-08 14:04:11 +02:00
784bc6d956 2.0.0 2018-09-05 21:45:17 +02:00
8aac756af2 BREAKING CHANGE(IVoucher): rename IExpense to IVoucher 2018-09-05 21:45:17 +02:00
63d4561980 1.0.50 2018-09-04 00:19:59 +02:00
8befdba50a fix(core): update 2018-09-04 00:19:59 +02:00
24a0fb1a8a 1.0.49 2018-09-03 11:28:54 +02:00
b4ac1242e4 fix(IExpense): update contactRef to be of type IContact 2018-09-03 11:28:53 +02:00
fb26eec4c6 1.0.48 2018-08-07 21:54:07 +02:00
3912ed3167 fix(update IExpense): update 2018-08-07 21:54:06 +02:00
30 changed files with 3174 additions and 337 deletions

22
.gitignore vendored
View File

@ -1,4 +1,22 @@
.nogit/
# artifacts
coverage/
pages/
public/
node_modules/
pages/
# installs
node_modules/
# caches
.yarn/
.cache/
.rpt2_cache
# builds
dist/
dist_web/
dist_serve/
dist_ts_web/
# custom

View File

@ -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:
@ -26,6 +26,7 @@ mirror:
snyk:
stage: security
script:
- npmci npm prepare
- npmci command npm install -g snyk
- npmci command npm install --ignore-scripts
- npmci command snyk test
@ -36,38 +37,29 @@ snyk:
# ====================
# test stage
# ====================
testLEGACY:
stage: test
script:
- npmci node install legacy
- npmci npm install
- npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
- notpriv
allow_failure: true
testLTS:
stage: test
script:
- npmci node install lts
- npmci npm install
- npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
- notpriv
testSTABLE:
testStable:
stage: test
script:
- npmci npm prepare
- npmci node install stable
- npmci npm install
- npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
- priv
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:
@ -86,19 +78,12 @@ 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 prepare
- npmci npm install
- npmci command "tslint -c tslint.json ./ts/**/*.ts"
tags:
- docker
- priv
@ -114,12 +99,13 @@ trigger:
- notpriv
pages:
image: hosttoday/ht-docker-node:npmci
stage: metadata
script:
- npmci command npm install -g typedoc typescript
- npmci node install lts
- npmci command npm install -g @gitzone/tsdoc
- npmci npm prepare
- npmci npm install
- npmci command typedoc --module "commonjs" --target "ES2016" --out public/ ts/
- npmci command tsdoc
tags:
- docker
- notpriv
@ -130,13 +116,3 @@ pages:
paths:
- public
allow_failure: true
windowsCompatibility:
image: stefanscherer/node-windows:10-build-tools
stage: metadata
script:
- npm install & npm test
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- windows
allow_failure: true

View File

@ -1,25 +1,20 @@
# tsclass
# @tsclass/tsclass
common classes for TypeScript
## Availabililty
[![npm](https://tsclass.gitlab.io/assets/repo-button-npm.svg)](https://www.npmjs.com/package/tsclass)
[![git](https://tsclass.gitlab.io/assets/repo-button-git.svg)](https://GitLab.com/tsclass/tsclass)
[![git](https://tsclass.gitlab.io/assets/repo-button-mirror.svg)](https://github.com/tsclass/tsclass)
[![docs](https://tsclass.gitlab.io/assets/repo-button-docs.svg)](https://tsclass.gitlab.io/tsclass/)
## Availabililty and Links
* [npmjs.org (npm package)](https://www.npmjs.com/package/@tsclass/tsclass)
* [gitlab.com (source)](https://gitlab.com/tsclass/tsclass)
* [github.com (source mirror)](https://github.com/tsclass/tsclass)
* [docs (typedoc)](https://tsclass.gitlab.io/tsclass/)
## Status for master
[![build status](https://GitLab.com/tsclass/tsclass/badges/master/build.svg)](https://GitLab.com/tsclass/tsclass/commits/master)
[![coverage report](https://GitLab.com/tsclass/tsclass/badges/master/coverage.svg)](https://GitLab.com/tsclass/tsclass/commits/master)
[![npm downloads per month](https://img.shields.io/npm/dm/tsclass.svg)](https://www.npmjs.com/package/tsclass)
[![Dependency Status](https://david-dm.org/tsclass/tsclass.svg)](https://david-dm.org/tsclass/tsclass)
[![bitHound Dependencies](https://www.bithound.io/github/tsclass/tsclass/badges/dependencies.svg)](https://www.bithound.io/github/tsclass/tsclass/master/dependencies/npm)
[![bitHound Code](https://www.bithound.io/github/tsclass/tsclass/badges/code.svg)](https://www.bithound.io/github/tsclass/tsclass)
[![TypeScript](https://img.shields.io/badge/TypeScript-2.x-blue.svg)](https://nodejs.org/dist/latest-v6.x/docs/api/)
[![node](https://img.shields.io/badge/node->=%206.x.x-blue.svg)](https://nodejs.org/dist/latest-v6.x/docs/api/)
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
[![build status](https://gitlab.com/tsclass/tsclass/badges/master/build.svg)](https://gitlab.com/tsclass/tsclass/commits/master)
[![coverage report](https://gitlab.com/tsclass/tsclass/badges/master/coverage.svg)](https://gitlab.com/tsclass/tsclass/commits/master)
[![npm downloads per month](https://img.shields.io/npm/dm/@tsclass/tsclass.svg)](https://www.npmjs.com/package/@tsclass/tsclass)
[![Known Vulnerabilities](https://snyk.io/test/npm/@tsclass/tsclass/badge.svg)](https://snyk.io/test/npm/@tsclass/tsclass)
[![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
@ -54,9 +49,9 @@ class myOwnInvoice implements IInvoice {
> The modules in bold letters exist as own modules and can be used seperately
For further information read the linked docs at the top of this README.
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)
[![repo-footer](https://tsclass.gitlab.io/assets/repo-footer.svg)](https://push.rocks)
[![repo-footer](https://lossless.gitlab.io/publicrelations/repofooter.svg)](https://maintainedby.lossless.com)

View File

@ -2,5 +2,15 @@
"npmci": {
"npmGlobalTools": [],
"npmAccessLevel": "public"
},
"gitzone": {
"module": {
"githost": "gitlab.com",
"gitscope": "tsclass",
"gitrepo": "tsclass",
"shortDescription": "common classes for TypeScript",
"npmPackagename": "@tsclass/tsclass",
"license": "MIT"
}
}
}

3197
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +1,12 @@
{
"name": "@tsclass/tsclass",
"version": "1.0.47",
"version": "2.0.12",
"private": false,
"description": "common classes for TypeScript",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"scripts": {
"test": "tsrun test/test.ts",
"test": "tstest test/",
"build": "tsbuild"
},
"repository": {
@ -23,9 +23,25 @@
"url": "https://github.com/tsclass/tsclass/issues"
},
"homepage": "https://github.com/tsclass/tsclass#readme",
"dependencies": {},
"dependencies": {
"@pushrocks/tapbundle": "^3.0.13"
},
"devDependencies": {
"@gitzone/tsbuild": "^2.0.21",
"@gitzone/tsrun": "^1.1.9"
}
"@gitzone/tsbuild": "^2.1.17",
"@gitzone/tsrun": "^1.2.8",
"@gitzone/tstest": "^1.0.27",
"tslint": "^5.20.0",
"tslint-config-prettier": "^1.18.0"
},
"files": [
"ts/**/*",
"ts_web/**/*",
"dist/**/*",
"dist_web/**/*",
"dist_ts_web/**/*",
"assets/**/*",
"cli.js",
"npmextra.json",
"readme.md"
]
}

9
test/test.node.ts Normal file
View File

@ -0,0 +1,9 @@
import { tap, expect } from '@pushrocks/tapbundle';
import * as tsclass from '../ts/index';
tap.test('should assign a correct type', async () => {
let contact: tsclass.IContact;
});
tap.start();

View File

@ -1,3 +0,0 @@
import * as tsclass from '../ts/index';
let contact: tsclass.IContact;

View File

@ -14,4 +14,5 @@ export interface ICompany {
foundedDate: IDate;
closedDate: IDate;
status: TCompanyStatus;
contact: IContact;
}

View File

@ -22,6 +22,7 @@ export interface IContact {
email?: string;
phone?: string;
fax?: string;
// =========
// financial

4
ts/business/index.ts Normal file
View File

@ -0,0 +1,4 @@
export * from './address';
export * from './company';
export * from './contact';
export * from './person';

6
ts/business/person.ts Normal file
View File

@ -0,0 +1,6 @@
export interface IPerson {
title: string;
name: string;
surname: string;
sex: 'male' | 'female' | 'queer';
}

2
ts/content/index.ts Normal file
View File

@ -0,0 +1,2 @@
export * from './article';
export * from './author';

View File

@ -0,0 +1,10 @@
/**
* a constract event describes any kind of sale
*/
export interface IEvent_Contract {
contractId: string;
date: number;
enddate: number;
product: string;
type: 'single purchase' | 'subscription' | 'canceled';
}

6
ts/events/index.ts Normal file
View File

@ -0,0 +1,6 @@
export * from './contractevent';
export * from './moneyevent';
export * from './releaseevent';
export * from './requestevent';
export * from './sessionevent';
export * from './userevent';

6
ts/events/moneyevent.ts Normal file
View File

@ -0,0 +1,6 @@
export interface IEvent_Money {
transferId: string;
valueInEuro: number;
channel: 'sepa' | 'creditcard' | 'paypal' | 'cardano';
direction: 'internal' | 'outgoing' | 'incoming';
}

View File

@ -0,0 +1,6 @@
export interface IEvent_Release {
releaseType: 'Apple App Store' | 'Google Play' | 'npm package' | 'dockerimage';
dockerImageUrl: string;
npmPackageUrl: string;
appleAppStoreIdentifier: string;
}

View File

@ -0,0 +1,5 @@
export interface IEvent_Request {
httpMethod: string;
httpRoute: string;
durationToResponse: number;
}

View File

@ -0,0 +1,4 @@
export interface IEvent_Session {
userID: string;
sessionType: 'new' | 'reactivated';
}

1
ts/events/userevent.ts Normal file
View File

@ -0,0 +1 @@
export interface IEvent_User {}

View File

@ -2,15 +2,17 @@ import { IInvoice } from './invoice';
import { IContact } from '../business/contact';
export interface IExpenseItem {
description: string;
asset?: boolean;
accountingType?: any;
amount: number;
taxPercentage: number;
}
export interface IExpense {
export interface IVoucher {
voucherFile?: any;
date: Date;
description: string;
expenseItems: IExpenseItem[];
contactRef: string;
accountRef: string;
contactRef: IContact;
}

5
ts/finance/index.ts Normal file
View File

@ -0,0 +1,5 @@
export * from './checkingaccount';
export * from './currency';
export * from './expense';
export * from './invoice';
export * from './transaction';

View File

@ -1,7 +1,8 @@
export interface ITransaction {
id?: string;
accountId?: string;
description: string;
amount: number;
date: Date;
description: string;
name: string;
}

2
ts/general/index.ts Normal file
View File

@ -0,0 +1,2 @@
export * from './date';
export * from './time';

View File

@ -1,22 +1,21 @@
// Business
export * from './business/address';
export * from './business/company';
export * from './business/contact';
import * as business from './business';
export * from './business';
// Finance
export * from './finance/checkingaccount';
export * from './finance/currency';
export * from './finance/expense';
export * from './finance/invoice';
export * from './finance/transaction';
// Cloud
export * from './cloud/dns';
import * as finance from './finance';
export * from './finance';
// Content
export * from './content/article';
export * from './content/author';
import * as content from './content';
export * from './content';
// General
export * from './general/date';
export * from './general/time';
import * as general from './general';
export * from './general';
// Network
import * as network from './network';
export * from './network';
export { business, finance, content, general, network };

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

@ -0,0 +1,3 @@
export * from './dns';
export * from './networknode';
export * from './reverseproxy';

View File

@ -0,0 +1,6 @@
export interface INetworkNode {
name: string;
ipv4: string;
ipv6: string;
securityLevel: 'private' | 'public' | 'confidential';
}

View File

@ -0,0 +1,7 @@
export interface IReverseProxyConfig {
destinationIp: string;
destinationPort: string;
hostName: string;
privateKey: string;
publicKey: string;
}

View File

@ -1,3 +1,17 @@
{
"extends": "tslint-config-standard"
"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"
}