Compare commits

...

124 Commits

Author SHA1 Message Date
c761c7aeae 3.0.44 2022-01-14 04:50:26 +01:00
bd17b4c94f fix(core): update 2022-01-14 04:50:25 +01:00
a71106dcae 3.0.43 2022-01-14 04:45:56 +01:00
32608912b6 fix(core): update 2022-01-14 04:45:56 +01:00
b3fbaff314 3.0.42 2022-01-14 04:32:03 +01:00
3a334418cc fix(core): update 2022-01-14 04:32:02 +01:00
759a19c731 3.0.41 2022-01-08 04:56:56 +01:00
0bb5ee7fac fix(core): update 2022-01-08 04:56:55 +01:00
d9327084a0 3.0.40 2022-01-08 04:20:36 +01:00
14af89dc8b fix(core): update 2022-01-08 04:20:35 +01:00
f1b62ce326 3.0.39 2022-01-08 04:19:18 +01:00
662909a84b fix(core): update 2022-01-08 04:19:18 +01:00
10c7111cbb 3.0.38 2022-01-08 02:29:24 +01:00
ae8c091f2d fix(core): update 2022-01-08 02:29:24 +01:00
2026a84865 3.0.37 2021-12-10 17:50:55 +01:00
6f0a8dcfac fix(core): update 2021-12-10 17:50:55 +01:00
7d148166c3 3.0.36 2021-11-07 03:17:52 +01:00
cd380c9791 fix(core): update 2021-11-07 03:17:51 +01:00
2a3236c2a6 3.0.35 2021-11-07 03:16:41 +01:00
cb556f71da fix(core): update 2021-11-07 03:16:41 +01:00
416aa9ee1e 3.0.34 2021-10-05 14:56:38 +02:00
3375f8aa4f fix(core): update 2021-10-05 14:56:37 +02:00
283e53fea3 3.0.33 2021-02-18 19:46:55 +00:00
ae396892bc fix(core): update 2021-02-18 19:46:55 +00:00
e292ec1de9 3.0.32 2021-02-15 21:36:27 +00:00
b1107a5945 fix(core): update 2021-02-15 21:36:26 +00:00
45149ff081 3.0.31 2021-02-15 21:31:01 +00:00
caef1047e4 fix(core): update 2021-02-15 21:31:01 +00:00
1b36f64e4c 3.0.30 2021-02-15 15:29:59 +00:00
3cabc47e51 fix(core): update 2021-02-15 15:29:58 +00:00
2c6a9d9fae 3.0.29 2020-10-31 10:53:14 +00:00
1ee8d36b68 fix(core): update 2020-10-31 10:53:14 +00:00
d6351421b3 3.0.28 2020-10-31 10:52:33 +00:00
d8ae73007a fix(core): update 2020-10-31 10:52:33 +00:00
9a63a9197b 3.0.27 2020-10-29 17:32:46 +00:00
07d5665deb fix(core): update 2020-10-29 17:32:45 +00:00
9a14f7e356 3.0.26 2020-10-29 11:40:14 +00:00
600ca80d33 fix(core): update 2020-10-29 11:40:14 +00:00
c6a9893ce1 3.0.25 2020-08-24 15:51:52 +00:00
ea60921761 fix(core): update 2020-08-24 15:51:51 +00:00
fef1ddcd93 3.0.24 2020-08-18 14:59:34 +00:00
c54db0d9a8 fix(core): update 2020-08-18 14:59:34 +00:00
5120d9b9bd 3.0.23 2020-08-18 14:46:00 +00:00
2e40bc20df fix(core): update 2020-08-18 14:45:59 +00:00
f64721addc 3.0.22 2020-08-18 14:39:16 +00:00
17cc1c646a fix(core): update 2020-08-18 14:39:15 +00:00
2a92733329 3.0.21 2020-08-04 09:38:50 +00:00
6d0993d381 fix(CI): should now test merge requests with public GitLab.com runners 2020-08-04 09:38:49 +00:00
5724d96f23 3.0.20 2020-07-23 08:29:29 +00:00
70fc60d865 fix(core): update 2020-07-23 08:29:28 +00:00
e21d6dabe1 3.0.19 2020-07-23 05:36:55 +00:00
335717a025 fix(core): update 2020-07-23 05:36:55 +00:00
69afa1dfcb 3.0.18 2020-06-26 20:20:44 +00:00
b2e11c9841 fix(core): update 2020-06-26 20:20:43 +00:00
69cb421ad1 3.0.17 2020-03-25 20:12:10 +00:00
c7f210a526 fix(core): update 2020-03-25 20:12:09 +00:00
7c3976d169 3.0.16 2020-03-25 11:40:26 +00:00
6f92823f56 fix(core): update 2020-03-25 11:40:26 +00:00
dac8ca4be5 3.0.15 2020-03-25 11:40:11 +00:00
a227973238 fix(core): update 2020-03-25 11:40:10 +00:00
2307e01c81 3.0.14 2020-03-24 23:13:01 +00:00
852626457f fix(core): update 2020-03-24 23:13:01 +00:00
ce8708266f 3.0.13 2020-03-22 22:21:48 +00:00
4027eedf64 fix(core): update 2020-03-22 22:21:47 +00:00
14314ee394 3.0.12 2020-03-06 14:23:04 +00:00
44b849bf86 fix(core): update 2020-03-06 14:23:04 +00:00
b985bf1d30 3.0.11 2020-03-06 13:15:07 +00:00
7f29739ca0 fix(company): added website to definition 2020-03-06 13:15:06 +00:00
c453dc9001 3.0.10 2020-02-20 22:13:58 +00:00
cd4127da73 fix(core): update 2020-02-20 22:13:57 +00:00
ab5f8bf470 3.0.9 2020-02-20 22:13:15 +00:00
968219384d fix(core): update 2020-02-20 22:13:14 +00:00
dd5ca4b3f1 3.0.8 2020-02-20 22:06:38 +00:00
3c99bfe922 fix(core): update 2020-02-20 22:06:37 +00:00
4f62bfb622 3.0.7 2020-02-15 16:28:47 +00:00
5f00526a7c fix(core): update 2020-02-15 16:28:46 +00:00
0c1b9b3345 3.0.6 2020-02-15 15:17:47 +00:00
b32d64e5f2 fix(core): update 2020-02-15 15:17:46 +00:00
8342460c65 3.0.5 2020-02-15 15:16:52 +00:00
363142392b fix(core): update 2020-02-15 15:16:51 +00:00
390ee5edb7 3.0.4 2020-02-09 16:38:23 +00:00
35341c49ab fix(core): update 2020-02-09 16:38:22 +00:00
ba42658ee9 3.0.3 2020-01-19 10:20:40 +00:00
68687c2bca fix(core): update 2020-01-19 10:20:39 +00:00
2b76f54408 3.0.2 2020-01-19 10:20:19 +00:00
64561ab878 fix(core): update 2020-01-19 10:20:19 +00:00
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
52 changed files with 27295 additions and 561 deletions

20
.gitignore vendored
View File

@ -1,4 +1,20 @@
.nogit/
# artifacts
coverage/
pages/
public/
node_modules/
pages/
# installs
node_modules/
# caches
.yarn/
.cache/
.rpt2_cache
# builds
dist/
dist_*/
# custom

View File

@ -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,109 +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 command npm install -g snyk
- npmci command npm install --ignore-scripts
- npmci command snyk test
- npmci npm prepare
- 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
# ====================
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:
testStable:
stage: test
script:
- 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
testSTABLE:
- docker
testBuild:
stage: test
script:
- 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 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:
- lossless
- docker
- notpriv
only:
@ -128,15 +133,5 @@ pages:
artifacts:
expire_in: 1 week
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
- public
allow_failure: true

29
.vscode/launch.json vendored Normal file
View 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
View 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"]
}
}
}
}
}
}
]
}

View File

@ -1,62 +0,0 @@
# 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/)
## 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/)
## 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';
class myOwnInvoice implements IInvoice {
constructor() {
super(); // you need to call super() in the constructor
}
}
```
### Time/Date
- Date
- Time
### Publications/Websites/Blogs
- Article
- Author
### Finance
- 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.html)
[![repo-footer](https://tsclass.gitlab.io/assets/repo-footer.svg)](https://push.rocks)

View File

View File

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

27080
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,13 +1,13 @@
{
"name": "@tsclass/tsclass",
"version": "1.0.47",
"version": "3.0.44",
"private": false,
"description": "common classes for TypeScript",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts",
"scripts": {
"test": "tsrun test/test.ts",
"build": "tsbuild"
"test": "tstest test/",
"build": "(tsbuild --web)"
},
"repository": {
"type": "git",
@ -23,9 +23,30 @@
"url": "https://github.com/tsclass/tsclass/issues"
},
"homepage": "https://github.com/tsclass/tsclass#readme",
"dependencies": {},
"dependencies": {
"type-fest": "^2.8.0"
},
"devDependencies": {
"@gitzone/tsbuild": "^2.0.21",
"@gitzone/tsrun": "^1.1.9"
}
"@gitzone/tsbuild": "^2.1.28",
"@gitzone/tsrun": "^1.2.18",
"@gitzone/tstest": "^1.0.60",
"@pushrocks/tapbundle": "^3.2.15",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.18.0"
},
"files": [
"ts/**/*",
"ts_web/**/*",
"dist/**/*",
"dist_*/**/*",
"dist_ts/**/*",
"dist_ts_web/**/*",
"assets/**/*",
"cli.js",
"npmextra.json",
"readme.md"
],
"browserslist": [
"last 1 chrome versions"
]
}

68
readme.md Normal file
View File

@ -0,0 +1,68 @@
# @tsclass/tsclass
common classes for TypeScript
## 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
Status Category | Status Badge
-- | --
GitLab Pipelines | [![pipeline status](https://gitlab.com/tsclass/tsclass/badges/master/pipeline.svg)](https://lossless.cloud)
GitLab Pipline Test Coverage | [![coverage report](https://gitlab.com/tsclass/tsclass/badges/master/coverage.svg)](https://lossless.cloud)
npm | [![npm downloads per month](https://badgen.net/npm/dy/@tsclass/tsclass)](https://lossless.cloud)
Snyk | [![Known Vulnerabilities](https://badgen.net/snyk/tsclass/tsclass)](https://lossless.cloud)
TypeScript Support | [![TypeScript](https://badgen.net/badge/TypeScript/>=%203.x/blue?icon=typescript)](https://lossless.cloud)
node Support | [![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
Code Style | [![Code Style](https://badgen.net/badge/style/prettier/purple)](https://lossless.cloud)
PackagePhobia (total standalone install weight) | [![PackagePhobia](https://badgen.net/packagephobia/install/@tsclass/tsclass)](https://lossless.cloud)
PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@tsclass/tsclass)](https://lossless.cloud)
BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@tsclass/tsclass)](https://lossless.cloud)
Platform support | [![Supports Windows 10](https://badgen.net/badge/supports%20Windows%2010/yes/green?icon=windows)](https://lossless.cloud) [![Supports Mac OS X](https://badgen.net/badge/supports%20Mac%20OS%20X/yes/green?icon=apple)](https://lossless.cloud)
## 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';
class myOwnInvoice implements IInvoice {
constructor() {
super(); // you need to call super() in the constructor
}
}
```
### Time/Date
- Date
- Time
### Publications/Websites/Blogs
- Article
- Author
### Finance
- Invoice
> The modules in bold letters exist as own modules and can be used seperately
## 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)
[![repo-footer](https://lossless.gitlab.io/publicrelations/repofooter.svg)](https://maintainedby.lossless.com)

9
test/test.both.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,3 +0,0 @@
import * as tsclass from '../ts/index';
let contact: tsclass.IContact;

View File

@ -0,0 +1,6 @@
export interface IClaim {
userName: string;
userId: string;
validUntil: number;
roles: string[];
}

View File

@ -0,0 +1 @@
export * from './claim';

View File

@ -0,0 +1,7 @@
import { IClaim } from './claim';
export interface IProcessedClaim {
originalJWT: string;
claim: IClaim;
signed: boolean;
}

View File

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

View File

@ -1,4 +1,4 @@
import { IAddress } from '..';
import { business } from '..';
export type TContactSalutation = 'Mr' | 'Ms' | 'Mrs';
@ -16,16 +16,25 @@ export interface IContact {
name: string;
surname?: string;
legalEntity?: string;
address: IAddress;
address: business.IAddress;
description: string;
customerNumber?: string;
email?: string;
logoUrl?: string;
website?: string;
facebookUrl?: string;
twitterUrl?: string;
phone?: string;
fax?: string;
// =========
// financial
// =========
vatId?: string;
bankAccountNumber?: string;
sepaConnection?: {
iban: string;
bic: string;
};
}

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

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

18
ts/business/letter.ts Normal file
View File

@ -0,0 +1,18 @@
import * as business from './';
import * as finance from '../finance';
export interface ILetter {
incidenceId: string;
date: number;
from: business.IAddress;
to: business.IAddress;
logoUrl: string;
accentColor: string;
subject: string;
text: string[];
invoice?: finance.IInvoice;
contractRef: string;
timesheetRef: string;
pdfAttachments: Uint8Array[];
legalContact: business.IContact;
language: string;
}

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

View File

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

View File

@ -0,0 +1,9 @@
export interface IContainer {
registryUrl: string;
tag: string;
/**
* version is usually derived from labels
*/
version: string;
labels: string[];
}

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

@ -0,0 +1,2 @@
export * from './container';
export * from './volumemount';

View File

@ -0,0 +1,4 @@
export interface IVolumeMount {
hostFsPath: string;
containerFsPath: string;
}

View File

@ -1,6 +1,18 @@
import { IAuthor } from '..';
import { content } from '..';
export interface IArticle<T = any> {
/**
* the main url of an article
*/
url?: string;
/**
* the mainimage of the article
*/
featuredImageUrl?: string;
referenceObject?: T;
export interface IArticle {
/**
* the title of an article
*/
@ -9,13 +21,18 @@ export interface IArticle {
/**
* the Author of an article
*/
author: IAuthor;
author: content.IAuthor;
/**
* the content of an article
*/
content: string;
/**
* a timestamp for when the article was written
*/
timestamp: number;
/**
* the tags of an article
*/

View File

@ -1,5 +1,4 @@
import { IDate } from '..';
import { IArticle } from '..';
import { general, content } from '..';
export interface IAuthor {
/**
@ -15,10 +14,10 @@ export interface IAuthor {
/**
* the birthday of an author
*/
birthday: IDate;
birthday: general.IDate;
/**
* articles of an author
*/
articles: IArticle[];
articles: content.IArticle[];
}

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

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

View File

@ -1,16 +1,17 @@
import { IInvoice } from './invoice';
import { IContact } from '../business/contact';
import { business } from '../';
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: 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';

View File

@ -1,17 +1,35 @@
import { IContact } from '..';
import { business } from '..';
export type TInvoiceStatus = 'draft' | 'invoice' | 'paid' | 'refunded';
export interface IInvoiceItem {
name: string;
articleNumber?: string;
unitType: string;
quantity: number;
unitQuantity: number;
unitNetPrice: number;
vatPercentage: number;
currency: 'EUR';
}
export interface IInvoice {
billedBy: IContact;
billedTo: IContact;
id: string;
billedBy: business.IContact;
billedTo: business.IContact;
status: TInvoiceStatus;
items: IInvoiceItem[];
periodOfPerformance?: {
from: number;
to: number;
};
deliveryDate?: number;
printResult?: {
pdfBufferString: string;
totalNet: number;
totalGross: number;
vatGroups: {
percentage: number;
items: IInvoiceItem[];
}
};
}

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,26 @@
// Business
export * from './business/address';
export * from './business/company';
export * from './business/contact';
import * as business from './business';
// Container
import * as container from './container';
// 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';
// Content
export * from './content/article';
export * from './content/author';
import * as content from './content';
// General
export * from './general/date';
export * from './general/time';
import * as general from './general';
// Network
import * as network from './network';
// SaaS
import * as saas from './saas';
export { business, container, finance, content, general, network, saas };
import type * as typeFest from 'type-fest';
export { typeFest };

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

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

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

@ -0,0 +1,20 @@
export type TDnsRecordType =
| 'A'
| 'AAAA'
| 'CNAME'
| 'LOC'
| 'PTR'
| 'MX'
| 'NAPTR'
| 'NS'
| 'SOA'
| 'SPF'
| 'SRV'
| 'TXT';
export interface IDnsRecord {
name: string;
type: TDnsRecordType;
value: string;
dnsSecEnabled: boolean;
}

View File

@ -0,0 +1,4 @@
export interface IDnsChallenge {
hostName: string;
challenge: string;
}

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

@ -0,0 +1,6 @@
export * from './cert';
export * from './dns';
export * from './dnschallenge';
export * from './networknode';
export * from './request';
export * from './reverseproxy';

View File

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

26
ts/network/request.ts Normal file
View File

@ -0,0 +1,26 @@
export interface ISimpleRequest {
headers: {};
parsedUrl: {
hash: string;
host: string;
hostname: string;
href: string;
readonly origin: string;
password: string;
pathname: string;
port: string;
protocol: string;
search: string;
readonly searchParams: any;
username: string;
toString: () => string;
toJSON: () => string;
};
body?: string | object | Buffer;
}
export interface ISimpleResponse {
headers: { [key: string]: string };
body: string;
}
export type IRenderFunction = (req: ISimpleRequest) => Promise<ISimpleResponse>;

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

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

@ -0,0 +1,2 @@
export * from './subscriptionplan';
export * from './product';

1
ts/saas/product.ts Normal file
View File

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

View File

@ -0,0 +1,14 @@
import { IProduct } from './product';
export interface ISubscriptionPlan {
name: string;
unit: 'device' | 'user';
quantity: boolean;
availableTerms: {
period: 'daily' | 'weekly' | 'monthly' | 'yearly';
price: number;
currency: 'EUR' | 'USD';
}[];
containedProducts: IProduct[];
limits: any;
}

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