Compare commits
22 Commits
Author | SHA1 | Date | |
---|---|---|---|
8bb8574da7 | |||
6a5ecfcb19 | |||
9a1c79c5de | |||
1da9d73e5a | |||
75173b1b37 | |||
e826047b9c | |||
dd39b5d2ce | |||
ab24929c6c | |||
5da0b73a9d | |||
73e10fc59b | |||
a2e8b41042 | |||
a0ff9427cb | |||
e37485adbd | |||
e1592f322c | |||
6604a58885 | |||
312b6d0e67 | |||
3565360610 | |||
f71b131d8d | |||
a1638ff3fd | |||
6b56a605fa | |||
2042e3c08a | |||
ac15227a94 |
@ -1,7 +1,5 @@
|
|||||||
# gitzone ci_default
|
# gitzone ci_default
|
||||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||||
variables:
|
|
||||||
GIT_STRATEGY: clone
|
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
paths:
|
paths:
|
||||||
@ -40,11 +38,11 @@ snyk:
|
|||||||
# test stage
|
# test stage
|
||||||
# ====================
|
# ====================
|
||||||
|
|
||||||
testLTS:
|
testStable:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- npmci npm prepare
|
- npmci npm prepare
|
||||||
- npmci node install lts
|
- npmci node install stable
|
||||||
- npmci npm install
|
- npmci npm install
|
||||||
- npmci npm test
|
- npmci npm test
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
@ -56,7 +54,7 @@ testBuild:
|
|||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- npmci npm prepare
|
- npmci npm prepare
|
||||||
- npmci node install lts
|
- npmci node install stable
|
||||||
- npmci npm install
|
- npmci npm install
|
||||||
- npmci command npm run build
|
- npmci command npm run build
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
@ -67,7 +65,7 @@ testBuild:
|
|||||||
release:
|
release:
|
||||||
stage: release
|
stage: release
|
||||||
script:
|
script:
|
||||||
- npmci node install lts
|
- npmci node install stable
|
||||||
- npmci npm publish
|
- npmci npm publish
|
||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
@ -83,6 +81,7 @@ codequality:
|
|||||||
allow_failure: true
|
allow_failure: true
|
||||||
script:
|
script:
|
||||||
- npmci command npm install -g tslint typescript
|
- npmci command npm install -g tslint typescript
|
||||||
|
- npmci npm prepare
|
||||||
- npmci npm install
|
- npmci npm install
|
||||||
- npmci command "tslint -c tslint.json ./ts/**/*.ts"
|
- npmci command "tslint -c tslint.json ./ts/**/*.ts"
|
||||||
tags:
|
tags:
|
||||||
@ -100,11 +99,9 @@ trigger:
|
|||||||
- notpriv
|
- notpriv
|
||||||
|
|
||||||
pages:
|
pages:
|
||||||
image: hosttoday/ht-docker-dbase:npmci
|
|
||||||
services:
|
|
||||||
- docker:18-dind
|
|
||||||
stage: metadata
|
stage: metadata
|
||||||
script:
|
script:
|
||||||
|
- npmci node install lts
|
||||||
- npmci command npm install -g @gitzone/tsdoc
|
- npmci command npm install -g @gitzone/tsdoc
|
||||||
- npmci npm prepare
|
- npmci npm prepare
|
||||||
- npmci npm install
|
- npmci npm install
|
||||||
|
@ -49,13 +49,6 @@ class myOwnInvoice implements IInvoice {
|
|||||||
|
|
||||||
> The modules in bold letters exist as own modules and can be used seperately
|
> 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.
|
|
||||||
|
|
||||||
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
|
||||||
> | By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
|
|
||||||
|
|
||||||
[](https://push.rocks)
|
|
||||||
|
|
||||||
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)
|
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||||
|
2190
package-lock.json
generated
2190
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
27
package.json
27
package.json
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@tsclass/tsclass",
|
"name": "@tsclass/tsclass",
|
||||||
"version": "2.0.4",
|
"version": "3.0.1",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "common classes for TypeScript",
|
"description": "common classes for TypeScript",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"typings": "dist/index.d.ts",
|
"typings": "dist/index.d.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "tsrun test/test.ts",
|
"test": "tstest test/",
|
||||||
"build": "tsbuild"
|
"build": "tsbuild"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
@ -23,20 +23,23 @@
|
|||||||
"url": "https://github.com/tsclass/tsclass/issues"
|
"url": "https://github.com/tsclass/tsclass/issues"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/tsclass/tsclass#readme",
|
"homepage": "https://github.com/tsclass/tsclass#readme",
|
||||||
"dependencies": {},
|
"dependencies": {
|
||||||
|
"@pushrocks/tapbundle": "^3.0.13"
|
||||||
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "^2.1.11",
|
"@gitzone/tsbuild": "^2.1.17",
|
||||||
"@gitzone/tsrun": "^1.2.6",
|
"@gitzone/tsrun": "^1.2.8",
|
||||||
"tslint": "^5.18.0",
|
"@gitzone/tstest": "^1.0.27",
|
||||||
|
"tslint": "^5.20.0",
|
||||||
"tslint-config-prettier": "^1.18.0"
|
"tslint-config-prettier": "^1.18.0"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"ts/*",
|
"ts/**/*",
|
||||||
"ts_web/*",
|
"ts_web/**/*",
|
||||||
"dist/*",
|
"dist/**/*",
|
||||||
"dist_web/*",
|
"dist_web/**/*",
|
||||||
"dist_ts_web/*",
|
"dist_ts_web/**/*",
|
||||||
"assets/*",
|
"assets/**/*",
|
||||||
"cli.js",
|
"cli.js",
|
||||||
"npmextra.json",
|
"npmextra.json",
|
||||||
"readme.md"
|
"readme.md"
|
||||||
|
9
test/test.node.ts
Normal file
9
test/test.node.ts
Normal 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.business.IContact;
|
||||||
|
});
|
||||||
|
|
||||||
|
tap.start();
|
@ -1,3 +0,0 @@
|
|||||||
import * as tsclass from '../ts/index';
|
|
||||||
|
|
||||||
let contact: tsclass.IContact;
|
|
@ -1,5 +1,4 @@
|
|||||||
import { IContact } from '..';
|
import { business, general } from '..';
|
||||||
import { IDate } from '..';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* describes a company's lifecycle state
|
* describes a company's lifecycle state
|
||||||
@ -11,7 +10,8 @@ export type TCompanyStatus = 'planed' | 'founding' | 'active' | 'liquidation' |
|
|||||||
*/
|
*/
|
||||||
export interface ICompany {
|
export interface ICompany {
|
||||||
name: string;
|
name: string;
|
||||||
foundedDate: IDate;
|
foundedDate: general.IDate;
|
||||||
closedDate: IDate;
|
closedDate: general.IDate;
|
||||||
status: TCompanyStatus;
|
status: business.TCompanyStatus;
|
||||||
|
contact: business.IContact;
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { IAddress } from '..';
|
import { business } from '..';
|
||||||
|
|
||||||
export type TContactSalutation = 'Mr' | 'Ms' | 'Mrs';
|
export type TContactSalutation = 'Mr' | 'Ms' | 'Mrs';
|
||||||
|
|
||||||
@ -16,12 +16,13 @@ export interface IContact {
|
|||||||
name: string;
|
name: string;
|
||||||
surname?: string;
|
surname?: string;
|
||||||
legalEntity?: string;
|
legalEntity?: string;
|
||||||
address: IAddress;
|
address: business.IAddress;
|
||||||
description: string;
|
description: string;
|
||||||
customerNumber?: string;
|
customerNumber?: string;
|
||||||
|
|
||||||
email?: string;
|
email?: string;
|
||||||
phone?: string;
|
phone?: string;
|
||||||
|
fax?: string;
|
||||||
|
|
||||||
// =========
|
// =========
|
||||||
// financial
|
// financial
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
export * from './address';
|
export * from './address';
|
||||||
export * from './company';
|
export * from './company';
|
||||||
export * from './contact';
|
export * from './contact';
|
||||||
|
export * from './person';
|
||||||
|
6
ts/business/person.ts
Normal file
6
ts/business/person.ts
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
export interface IPerson {
|
||||||
|
title: string;
|
||||||
|
name: string;
|
||||||
|
surname: string;
|
||||||
|
sex: 'male' | 'female' | 'queer';
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
import { IAuthor } from '..';
|
import { content } from '..';
|
||||||
|
|
||||||
export interface IArticle {
|
export interface IArticle {
|
||||||
/**
|
/**
|
||||||
@ -9,7 +9,7 @@ export interface IArticle {
|
|||||||
/**
|
/**
|
||||||
* the Author of an article
|
* the Author of an article
|
||||||
*/
|
*/
|
||||||
author: IAuthor;
|
author: content.IAuthor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the content of an article
|
* the content of an article
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { IDate } from '..';
|
import { general, content } from '..';
|
||||||
import { IArticle } from '..';
|
|
||||||
|
|
||||||
export interface IAuthor {
|
export interface IAuthor {
|
||||||
/**
|
/**
|
||||||
@ -15,10 +14,10 @@ export interface IAuthor {
|
|||||||
/**
|
/**
|
||||||
* the birthday of an author
|
* the birthday of an author
|
||||||
*/
|
*/
|
||||||
birthday: IDate;
|
birthday: general.IDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* articles of an author
|
* articles of an author
|
||||||
*/
|
*/
|
||||||
articles: IArticle[];
|
articles: content.IArticle[];
|
||||||
}
|
}
|
||||||
|
10
ts/events/contractevent.ts
Normal file
10
ts/events/contractevent.ts
Normal 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
6
ts/events/index.ts
Normal 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
6
ts/events/moneyevent.ts
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
export interface IEvent_Money {
|
||||||
|
transferId: string;
|
||||||
|
valueInEuro: number;
|
||||||
|
channel: 'sepa' | 'creditcard' | 'paypal' | 'cardano';
|
||||||
|
direction: 'internal' | 'outgoing' | 'incoming';
|
||||||
|
}
|
6
ts/events/releaseevent.ts
Normal file
6
ts/events/releaseevent.ts
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
export interface IEvent_Release {
|
||||||
|
releaseType: 'Apple App Store' | 'Google Play' | 'npm package' | 'dockerimage';
|
||||||
|
dockerImageUrl: string;
|
||||||
|
npmPackageUrl: string;
|
||||||
|
appleAppStoreIdentifier: string;
|
||||||
|
}
|
5
ts/events/requestevent.ts
Normal file
5
ts/events/requestevent.ts
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
export interface IEvent_Request {
|
||||||
|
httpMethod: string;
|
||||||
|
httpRoute: string;
|
||||||
|
durationToResponse: number;
|
||||||
|
}
|
4
ts/events/sessionevent.ts
Normal file
4
ts/events/sessionevent.ts
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export interface IEvent_Session {
|
||||||
|
userID: string;
|
||||||
|
sessionType: 'new' | 'reactivated';
|
||||||
|
}
|
1
ts/events/userevent.ts
Normal file
1
ts/events/userevent.ts
Normal file
@ -0,0 +1 @@
|
|||||||
|
export interface IEvent_User {}
|
@ -1,8 +1,7 @@
|
|||||||
import { TCurrency } from './currency';
|
import { finance } from '../';
|
||||||
import { ITransaction } from './transaction';
|
|
||||||
|
|
||||||
export interface ICheckingAccount {
|
export interface ICheckingAccount {
|
||||||
name: string;
|
name: string;
|
||||||
currency: TCurrency;
|
currency: finance.TCurrency;
|
||||||
transactions: ITransaction[];
|
transactions: finance.ITransaction[];
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { IInvoice } from './invoice';
|
import { business } from '../';
|
||||||
import { IContact } from '../business/contact';
|
|
||||||
|
|
||||||
export interface IExpenseItem {
|
export interface IExpenseItem {
|
||||||
description: string;
|
description: string;
|
||||||
@ -14,5 +13,5 @@ export interface IVoucher {
|
|||||||
date: Date;
|
date: Date;
|
||||||
description: string;
|
description: string;
|
||||||
expenseItems: IExpenseItem[];
|
expenseItems: IExpenseItem[];
|
||||||
contactRef: IContact;
|
contactRef: business.IContact;
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { IContact } from '..';
|
import { business } from '..';
|
||||||
|
|
||||||
export type TInvoiceStatus = 'draft' | 'invoice' | 'paid' | 'refunded';
|
export type TInvoiceStatus = 'draft' | 'invoice' | 'paid' | 'refunded';
|
||||||
|
|
||||||
@ -10,8 +10,8 @@ export interface IInvoiceItem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface IInvoice {
|
export interface IInvoice {
|
||||||
billedBy: IContact;
|
billedBy: business.IContact;
|
||||||
billedTo: IContact;
|
billedTo: business.IContact;
|
||||||
status: TInvoiceStatus;
|
status: TInvoiceStatus;
|
||||||
items: IInvoiceItem[];
|
items: IInvoiceItem[];
|
||||||
}
|
}
|
||||||
|
@ -1,21 +1,16 @@
|
|||||||
// Business
|
// Business
|
||||||
import * as business from './business';
|
import * as business from './business';
|
||||||
export * from './business';
|
|
||||||
|
|
||||||
// Finance
|
// Finance
|
||||||
import * as finance from './finance';
|
import * as finance from './finance';
|
||||||
export * from './finance';
|
|
||||||
|
|
||||||
// Content
|
// Content
|
||||||
import * as content from './content';
|
import * as content from './content';
|
||||||
export * from './content';
|
|
||||||
|
|
||||||
// General
|
// General
|
||||||
import * as general from './general';
|
import * as general from './general';
|
||||||
export * from './general';
|
|
||||||
|
|
||||||
// Network
|
// Network
|
||||||
import * as network from './network';
|
import * as network from './network';
|
||||||
export * from './network';
|
|
||||||
|
|
||||||
export { business, finance, content, general, network };
|
export { business, finance, content, general, network };
|
||||||
|
8
ts/network/cert.ts
Normal file
8
ts/network/cert.ts
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
export interface ICert {
|
||||||
|
id: string;
|
||||||
|
domainName: string;
|
||||||
|
created: number;
|
||||||
|
privateKey: string;
|
||||||
|
publicKey: string;
|
||||||
|
csr: string;
|
||||||
|
}
|
@ -1,2 +1,4 @@
|
|||||||
export * from './reverseproxy';
|
export * from './cert';
|
||||||
export * from './dns';
|
export * from './dns';
|
||||||
|
export * from './networknode';
|
||||||
|
export * from './reverseproxy';
|
||||||
|
6
ts/network/networknode.ts
Normal file
6
ts/network/networknode.ts
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
export interface INetworkNode {
|
||||||
|
name: string;
|
||||||
|
ipv4: string;
|
||||||
|
ipv6: string;
|
||||||
|
securityLevel: 'private' | 'public' | 'confidential';
|
||||||
|
}
|
@ -4,4 +4,9 @@ export interface IReverseProxyConfig {
|
|||||||
hostName: string;
|
hostName: string;
|
||||||
privateKey: string;
|
privateKey: string;
|
||||||
publicKey: string;
|
publicKey: string;
|
||||||
|
authentication?: {
|
||||||
|
type: 'Basic';
|
||||||
|
user: string;
|
||||||
|
pass: string;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user