Compare commits
125 Commits
Author | SHA1 | Date | |
---|---|---|---|
45149ff081 | |||
caef1047e4 | |||
1b36f64e4c | |||
3cabc47e51 | |||
2c6a9d9fae | |||
1ee8d36b68 | |||
d6351421b3 | |||
d8ae73007a | |||
9a63a9197b | |||
07d5665deb | |||
9a14f7e356 | |||
600ca80d33 | |||
c6a9893ce1 | |||
ea60921761 | |||
fef1ddcd93 | |||
c54db0d9a8 | |||
5120d9b9bd | |||
2e40bc20df | |||
f64721addc | |||
17cc1c646a | |||
2a92733329 | |||
6d0993d381 | |||
5724d96f23 | |||
70fc60d865 | |||
e21d6dabe1 | |||
335717a025 | |||
69afa1dfcb | |||
b2e11c9841 | |||
69cb421ad1 | |||
c7f210a526 | |||
7c3976d169 | |||
6f92823f56 | |||
dac8ca4be5 | |||
a227973238 | |||
2307e01c81 | |||
852626457f | |||
ce8708266f | |||
4027eedf64 | |||
14314ee394 | |||
44b849bf86 | |||
b985bf1d30 | |||
7f29739ca0 | |||
c453dc9001 | |||
cd4127da73 | |||
ab5f8bf470 | |||
968219384d | |||
dd5ca4b3f1 | |||
3c99bfe922 | |||
4f62bfb622 | |||
5f00526a7c | |||
0c1b9b3345 | |||
b32d64e5f2 | |||
8342460c65 | |||
363142392b | |||
390ee5edb7 | |||
35341c49ab | |||
ba42658ee9 | |||
68687c2bca | |||
2b76f54408 | |||
64561ab878 | |||
8bb8574da7 | |||
6a5ecfcb19 | |||
9a1c79c5de | |||
1da9d73e5a | |||
75173b1b37 | |||
e826047b9c | |||
dd39b5d2ce | |||
ab24929c6c | |||
5da0b73a9d | |||
73e10fc59b | |||
a2e8b41042 | |||
a0ff9427cb | |||
e37485adbd | |||
e1592f322c | |||
6604a58885 | |||
312b6d0e67 | |||
3565360610 | |||
f71b131d8d | |||
a1638ff3fd | |||
6b56a605fa | |||
2042e3c08a | |||
ac15227a94 | |||
85adcbdba4 | |||
0ed11287eb | |||
6b88e2632c | |||
d017888b3c | |||
7ad6e75fb0 | |||
50f8dffe97 | |||
716228fcd3 | |||
a0c97dea45 | |||
784bc6d956 | |||
8aac756af2 | |||
63d4561980 | |||
8befdba50a | |||
24a0fb1a8a | |||
b4ac1242e4 | |||
fb26eec4c6 | |||
3912ed3167 | |||
0dd921675e | |||
343b81ac39 | |||
f848b2ae7c | |||
8558addaad | |||
99bcfcd44c | |||
78df7e07e0 | |||
a03b54e5a1 | |||
d27647009f | |||
fe2d5269c3 | |||
cc19c6c215 | |||
6e8c1f7aff | |||
63d1e0f65a | |||
f296ce24aa | |||
b38b691458 | |||
64d8a0b0f8 | |||
594c2cfe40 | |||
ac94cb1630 | |||
ddea031bbe | |||
6132076aed | |||
a5bd50850e | |||
8df838935c | |||
504dbdea1f | |||
c8d2095942 | |||
96f525ef0b | |||
7eb2ce7fe3 | |||
d67dc9ab44 | |||
c193fd4c59 |
20
.gitignore
vendored
20
.gitignore
vendored
@ -1,4 +1,20 @@
|
||||
.nogit/
|
||||
|
||||
# artifacts
|
||||
coverage/
|
||||
pages/
|
||||
public/
|
||||
node_modules/
|
||||
pages/
|
||||
|
||||
# installs
|
||||
node_modules/
|
||||
|
||||
# caches
|
||||
.yarn/
|
||||
.cache/
|
||||
.rpt2_cache
|
||||
|
||||
# builds
|
||||
dist/
|
||||
dist_*/
|
||||
|
||||
# custom
|
150
.gitlab-ci.yml
150
.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,108 +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 npmpage
|
||||
- npmci command npmpage
|
||||
- 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:
|
||||
@ -127,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
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"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
62
README.md
62
README.md
@ -1,62 +0,0 @@
|
||||
# tsclass
|
||||
|
||||
common classes for TypeScript
|
||||
|
||||
## Availabililty
|
||||
|
||||
[](https://www.npmjs.com/package/tsclass)
|
||||
[](https://GitLab.com/tsclass/tsclass)
|
||||
[](https://github.com/tsclass/tsclass)
|
||||
[](https://tsclass.gitlab.io/tsclass/)
|
||||
|
||||
## Status for master
|
||||
|
||||
[](https://GitLab.com/tsclass/tsclass/commits/master)
|
||||
[](https://GitLab.com/tsclass/tsclass/commits/master)
|
||||
[](https://www.npmjs.com/package/tsclass)
|
||||
[](https://david-dm.org/tsclass/tsclass)
|
||||
[](https://www.bithound.io/github/tsclass/tsclass/master/dependencies/npm)
|
||||
[](https://www.bithound.io/github/tsclass/tsclass)
|
||||
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
||||
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
||||
[](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)
|
||||
|
||||
[](https://push.rocks)
|
@ -1,8 +1,17 @@
|
||||
{
|
||||
"npmci": {
|
||||
"npmGlobalTools": [
|
||||
"npmts"
|
||||
],
|
||||
"npmGlobalTools": [],
|
||||
"npmAccessLevel": "public"
|
||||
},
|
||||
"gitzone": {
|
||||
"projectType": "npm",
|
||||
"module": {
|
||||
"githost": "gitlab.com",
|
||||
"gitscope": "tsclass",
|
||||
"gitrepo": "tsclass",
|
||||
"shortDescription": "common classes for TypeScript",
|
||||
"npmPackagename": "@tsclass/tsclass",
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
}
|
11242
package-lock.json
generated
11242
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
38
package.json
38
package.json
@ -1,13 +1,13 @@
|
||||
{
|
||||
"name": "@tsclass/tsclass",
|
||||
"version": "1.0.33",
|
||||
"version": "3.0.31",
|
||||
"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": "npmts --notest"
|
||||
"test": "tstest test/",
|
||||
"build": "(tsbuild --web)"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -23,8 +23,30 @@
|
||||
"url": "https://github.com/tsclass/tsclass/issues"
|
||||
},
|
||||
"homepage": "https://github.com/tsclass/tsclass#readme",
|
||||
"dependencies": {},
|
||||
"dependencies": {
|
||||
"@pushrocks/tapbundle": "^3.2.9",
|
||||
"type-fest": "^0.16.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gitzone/tsrun": "^1.0.5"
|
||||
}
|
||||
"@gitzone/tsbuild": "^2.1.25",
|
||||
"@gitzone/tsrun": "^1.2.12",
|
||||
"@gitzone/tstest": "^1.0.44",
|
||||
"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
68
readme.md
Normal 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 | [](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
|
||||
|
||||
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)
|
||||
|
||||
[](https://maintainedby.lossless.com)
|
9
test/test.both.ts
Normal file
9
test/test.both.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;
|
6
ts/authentication/claim.ts
Normal file
6
ts/authentication/claim.ts
Normal file
@ -0,0 +1,6 @@
|
||||
export interface IClaim {
|
||||
userName: string;
|
||||
userId: string;
|
||||
validUntil: number;
|
||||
roles: string[];
|
||||
}
|
1
ts/authentication/index.ts
Normal file
1
ts/authentication/index.ts
Normal file
@ -0,0 +1 @@
|
||||
export * from './claim';
|
7
ts/authentication/processedclaim.ts
Normal file
7
ts/authentication/processedclaim.ts
Normal file
@ -0,0 +1,7 @@
|
||||
import { IClaim } from './claim';
|
||||
|
||||
export interface IProcessedClaim {
|
||||
originalJWT: string;
|
||||
claim: IClaim;
|
||||
signed: boolean;
|
||||
}
|
@ -1,5 +1,4 @@
|
||||
import { IContact } from '../index';
|
||||
import { IDate } from '../index';
|
||||
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;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { IAddress } from '../index';
|
||||
import { business } from '..';
|
||||
|
||||
export type TContactSalutation = 'Mr' | 'Ms' | 'Mrs';
|
||||
|
||||
@ -16,12 +16,18 @@ 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
|
||||
|
4
ts/business/index.ts
Normal file
4
ts/business/index.ts
Normal file
@ -0,0 +1,4 @@
|
||||
export * from './address';
|
||||
export * from './company';
|
||||
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 +0,0 @@
|
||||
export type TDnsRecord = 'A' | 'AAAA' | 'CNAME' | 'TXT' | 'SRV' | 'LOC' | 'MX' | 'NS' | 'SPF';
|
5
ts/container/container.ts
Normal file
5
ts/container/container.ts
Normal file
@ -0,0 +1,5 @@
|
||||
export interface IContainer {
|
||||
registryUrl: string;
|
||||
tag: string;
|
||||
version: string;
|
||||
}
|
2
ts/container/index.ts
Normal file
2
ts/container/index.ts
Normal file
@ -0,0 +1,2 @@
|
||||
export * from './container';
|
||||
export * from './volumemount';
|
4
ts/container/volumemount.ts
Normal file
4
ts/container/volumemount.ts
Normal file
@ -0,0 +1,4 @@
|
||||
export interface IVolumeMount {
|
||||
hostFsPath: string;
|
||||
containerFsPath: string;
|
||||
}
|
@ -1,6 +1,16 @@
|
||||
import { IAuthor } from '../index';
|
||||
import { content } from '..';
|
||||
|
||||
export interface IArticle {
|
||||
/**
|
||||
* the main url of an article
|
||||
*/
|
||||
url?: string;
|
||||
|
||||
/**
|
||||
* the mainimage of the article
|
||||
*/
|
||||
featuredImageUrl?: string;
|
||||
|
||||
/**
|
||||
* the title of an article
|
||||
*/
|
||||
@ -9,13 +19,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
|
||||
*/
|
||||
|
@ -1,5 +1,4 @@
|
||||
import { IDate } from '../index';
|
||||
import { IArticle } from '../index';
|
||||
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
2
ts/content/index.ts
Normal file
@ -0,0 +1,2 @@
|
||||
export * from './article';
|
||||
export * from './author';
|
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 { IPayment } from "./payment";
|
||||
import { finance } from '../';
|
||||
|
||||
export interface ICheckingAccount {
|
||||
name: string;
|
||||
currency: TCurrency;
|
||||
payment: IPayment[];
|
||||
}
|
||||
currency: finance.TCurrency;
|
||||
transactions?: finance.ITransaction[];
|
||||
}
|
||||
|
@ -1 +1,172 @@
|
||||
export type TCurrency = 'eur' | 'usd' | 'sek'
|
||||
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';
|
||||
|
@ -1,14 +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 {
|
||||
voucherFile?: any
|
||||
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
5
ts/finance/index.ts
Normal file
@ -0,0 +1,5 @@
|
||||
export * from './checkingaccount';
|
||||
export * from './currency';
|
||||
export * from './expense';
|
||||
export * from './invoice';
|
||||
export * from './transaction';
|
@ -1,4 +1,4 @@
|
||||
import { IContact } from '..';
|
||||
import { business } from '..';
|
||||
|
||||
export type TInvoiceStatus = 'draft' | 'invoice' | 'paid' | 'refunded';
|
||||
|
||||
@ -7,11 +7,13 @@ export interface IInvoiceItem {
|
||||
unitType: string;
|
||||
quantity: number;
|
||||
vatPercentage: number;
|
||||
netUnitPrice: number;
|
||||
currency: 'EUR';
|
||||
}
|
||||
|
||||
export interface IInvoice {
|
||||
billedBy: IContact;
|
||||
billedTo: IContact;
|
||||
billedBy: business.IContact;
|
||||
billedTo: business.IContact;
|
||||
status: TInvoiceStatus;
|
||||
items: IInvoiceItem[];
|
||||
}
|
||||
|
@ -1,4 +0,0 @@
|
||||
export interface IPayment {
|
||||
amount: number;
|
||||
date: Date;
|
||||
}
|
8
ts/finance/transaction.ts
Normal file
8
ts/finance/transaction.ts
Normal file
@ -0,0 +1,8 @@
|
||||
export interface ITransaction {
|
||||
id?: string;
|
||||
accountId?: string;
|
||||
amount: number;
|
||||
date: Date;
|
||||
description: string;
|
||||
name: string;
|
||||
}
|
2
ts/general/index.ts
Normal file
2
ts/general/index.ts
Normal file
@ -0,0 +1,2 @@
|
||||
export * from './date';
|
||||
export * from './time';
|
34
ts/index.ts
34
ts/index.ts
@ -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/payment'
|
||||
|
||||
// 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
9
ts/network/cert.ts
Normal 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
20
ts/network/dns.ts
Normal 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;
|
||||
}
|
4
ts/network/dnschallenge.ts
Normal file
4
ts/network/dnschallenge.ts
Normal file
@ -0,0 +1,4 @@
|
||||
export interface IDnsChallenge {
|
||||
hostName: string;
|
||||
challenge: string;
|
||||
}
|
6
ts/network/index.ts
Normal file
6
ts/network/index.ts
Normal file
@ -0,0 +1,6 @@
|
||||
export * from './cert';
|
||||
export * from './dns';
|
||||
export * from './dnschallenge';
|
||||
export * from './networknode';
|
||||
export * from './request';
|
||||
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';
|
||||
}
|
26
ts/network/request.ts
Normal file
26
ts/network/request.ts
Normal 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>;
|
12
ts/network/reverseproxy.ts
Normal file
12
ts/network/reverseproxy.ts
Normal 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
2
ts/saas/index.ts
Normal file
@ -0,0 +1,2 @@
|
||||
export * from './subscriptionplan';
|
||||
export * from './product';
|
1
ts/saas/product.ts
Normal file
1
ts/saas/product.ts
Normal file
@ -0,0 +1 @@
|
||||
export interface IProduct {}
|
14
ts/saas/subscriptionplan.ts
Normal file
14
ts/saas/subscriptionplan.ts
Normal 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;
|
||||
}
|
16
tslint.json
16
tslint.json
@ -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"
|
||||
}
|
||||
|
Reference in New Issue
Block a user