Compare commits

...

125 Commits

Author SHA1 Message Date
8bb8574da7 3.0.1 2020-01-19 10:19:39 +00:00
6a5ecfcb19 fix(core): update 2020-01-19 10:19:38 +00:00
9a1c79c5de 3.0.0 2020-01-19 09:57:18 +00:00
1da9d73e5a BREAKING CHANGE(removed direct links in favour of directory style api): update 2020-01-19 09:57:17 +00:00
75173b1b37 2.0.13 2019-11-03 01:21:38 +01:00
e826047b9c fix(core): update 2019-11-03 01:21:38 +01:00
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
0dd921675e 1.0.47 2018-08-07 21:49:11 +02:00
343b81ac39 1.0.46 2018-08-07 19:05:16 +02:00
f848b2ae7c fix(IExpense): add date and description for Expenses 2018-08-07 19:05:16 +02:00
8558addaad 1.0.45 2018-08-07 15:17:23 +02:00
99bcfcd44c fix(update currencies): update 2018-08-07 15:17:22 +02:00
78df7e07e0 1.0.44 2018-08-07 13:53:55 +02:00
a03b54e5a1 fix(ITransaction): added .description 2018-08-07 13:53:55 +02:00
d27647009f 1.0.43 2018-07-25 23:43:16 +02:00
fe2d5269c3 fix(build): update build step 2018-07-25 23:43:16 +02:00
cc19c6c215 1.0.42 2018-07-25 22:37:42 +02:00
6e8c1f7aff fix(core): update 2018-07-25 22:37:42 +02:00
63d1e0f65a 1.0.41 2018-07-25 22:33:51 +02:00
f296ce24aa fix(ci): fix build step 2018-07-25 22:33:50 +02:00
b38b691458 1.0.40 2018-07-25 22:13:20 +02:00
64d8a0b0f8 fix(core): update 2018-07-25 22:13:19 +02:00
594c2cfe40 1.0.39 2018-07-22 23:14:11 +02:00
ac94cb1630 fix( ITransaction): import structure 2018-07-22 23:14:11 +02:00
ddea031bbe 1.0.38 2018-07-22 23:01:56 +02:00
6132076aed fix(core): update 2018-07-22 23:01:56 +02:00
a5bd50850e 1.0.37 2018-07-22 23:01:40 +02:00
8df838935c fix(core): update 2018-07-22 23:01:40 +02:00
504dbdea1f 1.0.36 2018-07-22 19:50:47 +02:00
c8d2095942 fix(ICheckingAccount): update 2018-07-22 19:50:47 +02:00
96f525ef0b 1.0.35 2018-07-22 19:28:11 +02:00
7eb2ce7fe3 fix(core): import structure 2018-07-22 19:28:11 +02:00
d67dc9ab44 1.0.34 2018-07-22 18:20:23 +02:00
c193fd4c59 fix(ci): add better docs 2018-07-22 18:20:22 +02:00
65d87fdefb 1.0.33 2018-07-22 18:19:47 +02:00
4a54935521 fix(core): add ICheckingAccount, IPayment, TCurrency 2018-07-22 18:19:47 +02:00
e10a45a4d0 1.0.32 2018-07-12 01:04:25 +02:00
074f6bfd1e fix(IExpense): update 2018-07-12 01:04:25 +02:00
6a1fafeab7 1.0.31 2018-07-11 21:42:05 +02:00
b019cf48b5 fix(fix IExpense): update 2018-07-11 21:42:04 +02:00
1db0a7adec 1.0.30 2018-07-11 21:27:13 +02:00
1901c57a1d fix(core): update structure 2018-07-11 21:27:13 +02:00
5723ddd059 1.0.29 2018-07-10 23:59:07 +02:00
5b67ad1c1c fix(finance): add IExpense 2018-07-10 23:59:07 +02:00
0044ab7b7e 1.0.28 2018-06-21 21:18:47 +02:00
e40c6b60d1 fix(Contact): add email and phone 2018-06-21 21:18:46 +02:00
af427347d9 1.0.27 2018-06-20 23:29:02 +02:00
952103c64e fix(Contact): update 2018-06-20 23:29:02 +02:00
65ba20253c 1.0.26 2018-06-20 23:14:39 +02:00
73e90165a4 fix(Contact): add customerNumber 2018-06-20 23:14:39 +02:00
bc16d5e8ea 1.0.25 2018-06-20 23:12:33 +02:00
7bb964603c fix(IContact): add description 2018-06-20 23:12:33 +02:00
a8ee64eb54 1.0.24 2018-06-19 23:48:38 +02:00
f75d0f9378 fix(core): update 2018-06-19 23:48:38 +02:00
e9293ec31e 1.0.23 2018-06-19 23:30:59 +02:00
b04155e4f1 fix(core): update 2018-06-19 23:30:59 +02:00
bc8534d382 1.0.22 2018-06-19 23:25:57 +02:00
a2a1d61671 fix(Contact): add surname 2018-06-19 23:25:57 +02:00
a580ba53dd 1.0.21 2018-06-09 15:28:47 +02:00
e194e2a3b6 fix(packagename): fix packagename 2018-06-09 15:28:47 +02:00
0c2ded6288 1.0.20 2018-06-09 15:15:54 +02:00
6742e3ca73 fix(snyk): give snyk something to test 2018-06-09 15:15:54 +02:00
e2deb4f7b3 1.0.19 2018-06-09 15:11:38 +02:00
0d48aa8b00 BREAKING CHANGE(scope): change cope 2018-06-09 15:11:37 +02:00
bfc646c308 1.0.18 2017-11-09 12:41:51 +01:00
ab008d16e8 break out address from contact 2017-11-09 12:41:49 +01:00
7f5b86864d 1.0.17 2017-11-09 12:13:29 +01:00
825148442b update Invoice interface 2017-11-09 12:13:27 +01:00
2a18ec1555 1.0.16 2017-11-09 02:20:25 +01:00
c5284ff813 update internal structure 2017-11-09 02:20:21 +01:00
498934237d 1.0.15 2017-11-09 02:17:00 +01:00
ac73badd76 update ci 2017-11-09 02:16:56 +01:00
90698230ae 1.0.14 2017-11-09 02:06:12 +01:00
04f37d5665 update ci 2017-11-09 02:06:08 +01:00
0f26791ee2 1.0.13 2017-11-09 01:46:49 +01:00
34e65462e2 start invoice interface 2017-11-09 01:46:45 +01:00
f55ac65e20 1.0.12 2017-06-11 20:57:32 +02:00
474ce92b88 update structure 2017-06-11 20:57:30 +02:00
de95e03699 1.0.11 2017-06-11 20:54:17 +02:00
1e4adeede6 structure + dns record type 2017-06-11 20:54:06 +02:00
ca67505870 1.0.10 2017-06-10 12:48:16 +02:00
18eabb11af update compilation 2017-06-10 12:48:11 +02:00
3572dc6574 1.0.9 2017-06-10 12:46:14 +02:00
0d815f0414 update structure 2017-06-10 12:29:54 +02:00
d6c361750d 1.0.8 2017-03-24 23:23:46 +01:00
d877aed78b add yarn 2017-03-24 23:23:44 +01:00
ac7848a462 1.0.7 2017-03-24 23:20:31 +01:00
76037fba47 clean dependencies 2017-03-16 19:38:32 +01:00
36a7347a3d 1.0.6 2017-03-16 19:37:51 +01:00
d748505b8a add npmextra.json 2017-03-16 19:37:47 +01:00
def1a8add3 1.0.5 2017-03-16 19:34:33 +01:00
1f75449985 update to latest standards 2017-03-16 19:34:27 +01:00
d2380c2192 Merge branch 'master' into 'master'
add ICompany

See merge request !1
2017-03-16 18:31:29 +00:00
1e3fd5830d add ICompany 2017-03-16 14:47:43 +01:00
56 changed files with 4008 additions and 185 deletions

20
.gitignore vendored
View File

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

View File

@ -1,59 +1,118 @@
image: hosttoday/ht-docker-node:npmts
# gitzone ci_default
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
cache:
paths:
- .npmci_cache/
key: "$CI_BUILD_STAGE"
stages:
- security
- test
- release
- trigger
- pages
- metadata
testLEGACY:
stage: test
# ====================
# security stage
# ====================
mirror:
stage: security
script:
- npmci test legacy
- npmci git mirror
tags:
- docker
allow_failure: true
- notpriv
testLTS:
stage: test
snyk:
stage: security
script:
- npmci test lts
- npmci npm prepare
- npmci command npm install -g snyk
- npmci command npm install --ignore-scripts
- npmci command snyk test
tags:
- docker
- notpriv
testSTABLE:
# ====================
# test stage
# ====================
testStable:
stage: test
script:
- npmci test stable
- 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:
stage: release
script:
- npmci publish
- npmci node install stable
- npmci npm publish
only:
- tags
tags:
- docker
- notpriv
# ====================
# metadata stage
# ====================
codequality:
stage: metadata
allow_failure: true
script:
- npmci command npm install -g tslint typescript
- npmci npm prepare
- npmci npm install
- npmci command "tslint -c tslint.json ./ts/**/*.ts"
tags:
- docker
- priv
trigger:
stage: trigger
stage: metadata
script:
- npmci trigger
only:
- tags
tags:
- docker
- notpriv
pages:
image: hosttoday/ht-docker-node:npmpage
stage: pages
stage: metadata
script:
- npmci command npmpage --host gitlab
- npmci node install lts
- npmci command npm install -g @gitzone/tsdoc
- npmci npm prepare
- npmci npm install
- npmci command tsdoc
tags:
- docker
- notpriv
only:
- tags
artifacts:
expire_in: 1 week
paths:
- public
allow_failure: true

View File

@ -1,47 +1,57 @@
# tsclass
common classes for TypeScript.
# @tsclass/tsclass
common classes for TypeScript
## Availabililty
[![npm](https://push.rocks/assets/repo-button-npm.svg)](https://www.npmjs.com/package/tsclass)
[![git](https://push.rocks/assets/repo-button-git.svg)](https://gitlab.com/tsclass/tsclass)
[![git](https://push.rocks/assets/repo-button-mirror.svg)](https://github.com/tsclass/tsclass)
[![docs](https://push.rocks/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)
[![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/)
[![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
Use TypeScript for best in class instellisense.
tsclass exposes many commonly used objects as interface to implement (-> extends keyword) by individual implementations.
They come complete with best in class intellisense and are easy to require.
```javascript
import { IInvoice } from 'tsclass'
import { IInvoice } from 'tsclass';
class myOwnInvoice implements IInvoice {
constructor() {
super() // you need to call super() in the constructor
super(); // you need to call super() in the constructor
}
}
```
### Time/Date
* Date
* Time
- Date
- Time
### Publications/Websites/Blogs
* Article
* Author
- Article
- Author
### Finance
* Invoice
- Invoice
> 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)
[![repo-footer](https://lossless.gitlab.io/publicrelations/repofooter.svg)](https://maintainedby.lossless.com)

19
dist/article.d.ts vendored
View File

@ -1,19 +0,0 @@
import { IAuthor } from './author';
export interface IArticle {
/**
* the title of an article
*/
title: string;
/**
* the Author of an article
*/
author: IAuthor;
/**
* the content of an article
*/
content: string;
/**
* the tags of an article
*/
tags: string[];
}

2
dist/article.js vendored
View File

@ -1,2 +0,0 @@
"use strict";
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXJ0aWNsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL2FydGljbGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9

20
dist/author.d.ts vendored
View File

@ -1,20 +0,0 @@
import { IDate } from './date';
import { IArticle } from './article';
export interface IAuthor {
/**
* the first name of an author
*/
firstName: string;
/**
* the surname of an author
*/
surName: string;
/**
* the birthday of an author
*/
birthday: IDate;
/**
* articles of an author
*/
articles: IArticle[];
}

2
dist/author.js vendored
View File

@ -1,2 +0,0 @@
"use strict";
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0aG9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvYXV0aG9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ==

5
dist/date.d.ts vendored
View File

@ -1,5 +0,0 @@
export interface IDate {
day: number;
month: number;
year: number;
}

2
dist/date.js vendored
View File

@ -1,2 +0,0 @@
"use strict";
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL2RhdGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9

5
dist/index.d.ts vendored
View File

@ -1,5 +0,0 @@
export * from './article';
export * from './author';
export * from './date';
export * from './invoice';
export * from './time';

2
dist/index.js vendored
View File

@ -1,2 +0,0 @@
"use strict";
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=

2
dist/invoice.d.ts vendored
View File

@ -1,2 +0,0 @@
export interface IInvoice {
}

2
dist/invoice.js vendored
View File

@ -1,2 +0,0 @@
"use strict";
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW52b2ljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL2ludm9pY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9

2
dist/time.d.ts vendored
View File

@ -1,2 +0,0 @@
export interface ITime {
}

2
dist/time.js vendored
View File

@ -1,2 +0,0 @@
"use strict";
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGltZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3RpbWUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9

0
docs/index.md Normal file
View File

16
npmextra.json Normal file
View File

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

3372
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +1,13 @@
{
"name": "tsclass",
"version": "1.0.4",
"name": "@tsclass/tsclass",
"version": "3.0.1",
"private": false,
"description": "common classes for TypeScript",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"scripts": {
"test": "(npmts)"
"test": "tstest test/",
"build": "tsbuild"
},
"repository": {
"type": "git",
@ -21,7 +23,25 @@
"url": "https://github.com/tsclass/tsclass/issues"
},
"homepage": "https://github.com/tsclass/tsclass#readme",
"dependencies": {
"@pushrocks/tapbundle": "^3.0.13"
},
"devDependencies": {
"npmts": "^5.1.5"
}
"@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.business.IContact;
});
tap.start();

View File

@ -1,23 +0,0 @@
import { IAuthor } from './author'
export interface IArticle {
/**
* the title of an article
*/
title: string
/**
* the Author of an article
*/
author: IAuthor
/**
* the content of an article
*/
content: string
/**
* the tags of an article
*/
tags: string[]
}

View File

@ -1,25 +0,0 @@
import { IDate } from './date'
import { IArticle } from './article'
export interface IAuthor {
/**
* the first name of an author
*/
firstName: string
/**
* the surname of an author
*/
surName: string
/**
* the birthday of an author
*/
birthday: IDate
/**
* articles of an author
*/
articles: IArticle[]
}

8
ts/business/address.ts Normal file
View File

@ -0,0 +1,8 @@
export interface IAddress {
name?: string;
streetName: string;
houseNumber: string;
postalCode: string;
city: string;
country: string;
}

17
ts/business/company.ts Normal file
View File

@ -0,0 +1,17 @@
import { business, general } from '..';
/**
* describes a company's lifecycle state
*/
export type TCompanyStatus = 'planed' | 'founding' | 'active' | 'liquidation' | 'closed';
/**
* describes a company
*/
export interface ICompany {
name: string;
foundedDate: general.IDate;
closedDate: general.IDate;
status: business.TCompanyStatus;
contact: business.IContact;
}

32
ts/business/contact.ts Normal file
View File

@ -0,0 +1,32 @@
import { business } from '..';
export type TContactSalutation = 'Mr' | 'Ms' | 'Mrs';
export type TContactType = 'person' | 'company';
export type TContactTitle = 'Doctor' | 'Professor';
export interface IContact {
// =======
// general
// =======
salutation?: TContactSalutation;
type: TContactType;
title?: TContactTitle;
name: string;
surname?: string;
legalEntity?: string;
address: business.IAddress;
description: string;
customerNumber?: string;
email?: string;
phone?: string;
fax?: string;
// =========
// financial
// =========
vatId?: string;
bankAccountNumber?: string;
}

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

23
ts/content/article.ts Normal file
View File

@ -0,0 +1,23 @@
import { content } from '..';
export interface IArticle {
/**
* the title of an article
*/
title: string;
/**
* the Author of an article
*/
author: content.IAuthor;
/**
* the content of an article
*/
content: string;
/**
* the tags of an article
*/
tags: string[];
}

23
ts/content/author.ts Normal file
View File

@ -0,0 +1,23 @@
import { general, content } from '..';
export interface IAuthor {
/**
* the first name of an author
*/
firstName: string;
/**
* the surname of an author
*/
surName: string;
/**
* the birthday of an author
*/
birthday: general.IDate;
/**
* articles of an author
*/
articles: content.IArticle[];
}

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

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

View File

@ -1,5 +0,0 @@
export interface IDate {
day: number
month: number
year: number
}

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

@ -0,0 +1,7 @@
import { finance } from '../';
export interface ICheckingAccount {
name: string;
currency: finance.TCurrency;
transactions: finance.ITransaction[];
}

172
ts/finance/currency.ts Normal file
View File

@ -0,0 +1,172 @@
export type TCurrency =
| 'AED'
| 'AFN'
| 'ALL'
| 'AMD'
| 'ANG'
| 'AOA'
| 'ARS'
| 'AUD'
| 'AWG'
| 'AZN'
| 'BAM'
| 'BBD'
| 'BDT'
| 'BGN'
| 'BHD'
| 'BIF'
| 'BMD'
| 'BND'
| 'BOB'
| 'BRL'
| 'BSD'
| 'BTC'
| 'BTN'
| 'BWP'
| 'BYR'
| 'BZD'
| 'CAD'
| 'CDF'
| 'CHF'
| 'CLF'
| 'CLP'
| 'CNY'
| 'COP'
| 'CRC'
| 'CUC'
| 'CUP'
| 'CVE'
| 'CZK'
| 'DJF'
| 'DKK'
| 'DOP'
| 'DZD'
| 'EEK'
| 'EGP'
| 'ERN'
| 'ETB'
| 'EUR'
| 'FJD'
| 'FKP'
| 'GBP'
| 'GEL'
| 'GGP'
| 'GHS'
| 'GIP'
| 'GMD'
| 'GNF'
| 'GTQ'
| 'GYD'
| 'HKD'
| 'HNL'
| 'HRK'
| 'HTG'
| 'HUF'
| 'IDR'
| 'ILS'
| 'IMP'
| 'INR'
| 'IQD'
| 'IRR'
| 'ISK'
| 'JEP'
| 'JMD'
| 'JOD'
| 'JPY'
| 'KES'
| 'KGS'
| 'KHR'
| 'KMF'
| 'KPW'
| 'KRW'
| 'KWD'
| 'KYD'
| 'KZT'
| 'LAK'
| 'LBP'
| 'LKR'
| 'LRD'
| 'LSL'
| 'LTL'
| 'LVL'
| 'LYD'
| 'MAD'
| 'MDL'
| 'MGA'
| 'MKD'
| 'MMK'
| 'MNT'
| 'MOP'
| 'MRO'
| 'MTL'
| 'MUR'
| 'MVR'
| 'MWK'
| 'MXN'
| 'MYR'
| 'MZN'
| 'NAD'
| 'NGN'
| 'NIO'
| 'NOK'
| 'NPR'
| 'NZD'
| 'OMR'
| 'PAB'
| 'PEN'
| 'PGK'
| 'PHP'
| 'PKR'
| 'PLN'
| 'PYG'
| 'QAR'
| 'RON'
| 'RSD'
| 'RUB'
| 'RWF'
| 'SAR'
| 'SBD'
| 'SCR'
| 'SDG'
| 'SEK'
| 'SGD'
| 'SHP'
| 'SLL'
| 'SOS'
| 'SRD'
| 'STD'
| 'SVC'
| 'SYP'
| 'SZL'
| 'THB'
| 'TJS'
| 'TMT'
| 'TND'
| 'TOP'
| 'TRY'
| 'TTD'
| 'TWD'
| 'TZS'
| 'UAH'
| 'UGX'
| 'USD'
| 'UYU'
| 'UZS'
| 'VEF'
| 'VND'
| 'VUV'
| 'WST'
| 'XAF'
| 'XAG'
| 'XAU'
| 'XCD'
| 'XDR'
| 'XOF'
| 'XPD'
| 'XPF'
| 'XPT'
| 'YER'
| 'ZAR'
| 'ZMK'
| 'ZMW'
| 'ZWL';

17
ts/finance/expense.ts Normal file
View File

@ -0,0 +1,17 @@
import { business } from '../';
export interface IExpenseItem {
description: string;
asset?: boolean;
accountingType?: any;
amount: number;
taxPercentage: number;
}
export interface IVoucher {
voucherFile?: any;
date: Date;
description: string;
expenseItems: IExpenseItem[];
contactRef: business.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';

17
ts/finance/invoice.ts Normal file
View File

@ -0,0 +1,17 @@
import { business } from '..';
export type TInvoiceStatus = 'draft' | 'invoice' | 'paid' | 'refunded';
export interface IInvoiceItem {
name: string;
unitType: string;
quantity: number;
vatPercentage: number;
}
export interface IInvoice {
billedBy: business.IContact;
billedTo: business.IContact;
status: TInvoiceStatus;
items: IInvoiceItem[];
}

View File

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

5
ts/general/date.ts Normal file
View File

@ -0,0 +1,5 @@
export interface IDate {
day: number;
month: number;
year: number;
}

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

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

1
ts/general/time.ts Normal file
View File

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

View File

@ -1,5 +1,16 @@
export * from './article'
export * from './author'
export * from './date'
export * from './invoice'
export * from './time'
// Business
import * as business from './business';
// Finance
import * as finance from './finance';
// Content
import * as content from './content';
// General
import * as general from './general';
// Network
import * as network from './network';
export { business, finance, content, general, network };

View File

@ -1,3 +0,0 @@
export interface IInvoice {
}

8
ts/network/cert.ts Normal file
View File

@ -0,0 +1,8 @@
export interface ICert {
id: string;
domainName: string;
created: number;
privateKey: string;
publicKey: string;
csr: string;
}

1
ts/network/dns.ts Normal file
View File

@ -0,0 +1 @@
export type TDnsRecord = 'A' | 'AAAA' | 'CNAME' | 'TXT' | 'SRV' | 'LOC' | 'MX' | 'NS' | 'SPF';

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

@ -0,0 +1,4 @@
export * from './cert';
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,12 @@
export interface IReverseProxyConfig {
destinationIp: string;
destinationPort: string;
hostName: string;
privateKey: string;
publicKey: string;
authentication?: {
type: 'Basic';
user: string;
pass: string;
};
}

View File

@ -1,3 +0,0 @@
export interface ITime {
}

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"
}