Compare commits
276 Commits
Author | SHA1 | Date | |
---|---|---|---|
3cd02b61b3 | |||
f7fb032f4d | |||
2cef38c54b | |||
26cec00b4e | |||
faa173b034 | |||
e13236e10f | |||
18d52a9018 | |||
582b269d63 | |||
6293db82fd | |||
eda528b6d9 | |||
4e52240ae7 | |||
61b6835b31 | |||
48c65d726b | |||
8b61ec02a2 | |||
90c3a9b3b4 | |||
f25fb72924 | |||
995f7772ef | |||
60a528aad4 | |||
310d60a84e | |||
5fd5fc501f | |||
bf79856f67 | |||
b1025faa62 | |||
f22ec7d654 | |||
585e9fd4b3 | |||
537c54b5f3 | |||
2f95b5d2ef | |||
c1f22e0cb1 | |||
5c430fddfc | |||
f9478aa3c2 | |||
055b85c7c4 | |||
5730d87b0c | |||
610fda5f36 | |||
e206405d70 | |||
fdc63b0f4f | |||
4307bb68a7 | |||
5c60875d46 | |||
0a5443c646 | |||
f38274e325 | |||
800123586e | |||
bf37575140 | |||
c7420aba79 | |||
3770b7dada | |||
5b00b5d7e9 | |||
e7d2eb5cab | |||
b38a59f91a | |||
f92abdfb4e | |||
8bc0506b60 | |||
8a690e5065 | |||
50b401db9b | |||
96e86993bf | |||
485ed3630d | |||
9a6ffcbc03 | |||
d39d9c2a86 | |||
3c67658a0e | |||
e9d4a1641f | |||
2cec65f8a0 | |||
d20073a2b0 | |||
4563ba2404 | |||
62eeeecfef | |||
c48c6a2d79 | |||
25d2bb077e | |||
fee1e3cb58 | |||
66732c5f81 | |||
62f78f0866 | |||
6bb30e4e5b | |||
b0de29a26a | |||
3363a12082 | |||
b63ca0fd23 | |||
c95fd41f59 | |||
38e5bd39d9 | |||
f978af4b4f | |||
6f35eed240 | |||
636177b119 | |||
05bd86a0ce | |||
d4cc9f7843 | |||
45e8460474 | |||
15bbb6ee22 | |||
7bf736ec75 | |||
a43113860a | |||
76cff5259b | |||
34b49123e1 | |||
ecf1b945b5 | |||
dd3182536e | |||
5e8ab7012f | |||
12a0a1402d | |||
79c334da3b | |||
5c71e8c97d | |||
48b01b43ed | |||
97d7b3cb61 | |||
82d080a4f7 | |||
0c7875ca0d | |||
e03fe0db7c | |||
aa74f5d2e4 | |||
55d5e89bb8 | |||
5838948117 | |||
e5e3562eef | |||
d081dc4b98 | |||
ee9efae18d | |||
df39fcbe37 | |||
4ad0b3745e | |||
7f53cb2f7f | |||
59ca7e6c93 | |||
ba0237f9a7 | |||
1609a2b65c | |||
09f1496cf4 | |||
5d96d25176 | |||
87a303f7be | |||
34cb1384ea | |||
d672b9973e | |||
d8e1609851 | |||
9302766e91 | |||
318e9a2476 | |||
7434f8a6a4 | |||
0f23c88a45 | |||
9ef38d21d7 | |||
058c8cbfc2 | |||
9f1b5df136 | |||
1862444da9 | |||
c69b595fd1 | |||
c761c7aeae | |||
bd17b4c94f | |||
a71106dcae | |||
32608912b6 | |||
b3fbaff314 | |||
3a334418cc | |||
759a19c731 | |||
0bb5ee7fac | |||
d9327084a0 | |||
14af89dc8b | |||
f1b62ce326 | |||
662909a84b | |||
10c7111cbb | |||
ae8c091f2d | |||
2026a84865 | |||
6f0a8dcfac | |||
7d148166c3 | |||
cd380c9791 | |||
2a3236c2a6 | |||
cb556f71da | |||
416aa9ee1e | |||
3375f8aa4f | |||
283e53fea3 | |||
ae396892bc | |||
e292ec1de9 | |||
b1107a5945 | |||
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 | |||
65d87fdefb | |||
4a54935521 | |||
e10a45a4d0 | |||
074f6bfd1e | |||
6a1fafeab7 | |||
b019cf48b5 |
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
|
143
.gitlab-ci.yml
143
.gitlab-ci.yml
@ -1,125 +1,122 @@
|
||||
# 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
|
||||
|
||||
before_script:
|
||||
- pnpm install -g pnpm
|
||||
- pnpm install -g @shipzone/npmci
|
||||
- npmci npm prepare
|
||||
|
||||
# ====================
|
||||
# security stage
|
||||
# ====================
|
||||
mirror:
|
||||
# ====================
|
||||
# security stage
|
||||
# ====================
|
||||
auditProductionDependencies:
|
||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
stage: security
|
||||
script:
|
||||
- npmci git mirror
|
||||
- npmci command npm config set registry https://registry.npmjs.org
|
||||
- npmci command pnpm audit --audit-level=high --prod
|
||||
tags:
|
||||
- docker
|
||||
- notpriv
|
||||
- lossless
|
||||
- docker
|
||||
allow_failure: true
|
||||
|
||||
snyk:
|
||||
auditDevDependencies:
|
||||
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 command npm config set registry https://registry.npmjs.org
|
||||
- npmci command pnpm audit --audit-level=high --dev
|
||||
tags:
|
||||
- docker
|
||||
- notpriv
|
||||
- lossless
|
||||
- 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 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 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 typescript
|
||||
- npmci npm prepare
|
||||
- npmci npm install
|
||||
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 stable
|
||||
- npmci npm install
|
||||
- npmci command npm run buildDocs
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
only:
|
||||
@ -127,15 +124,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
|
||||
|
11
.vscode/launch.json
vendored
Normal file
11
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"command": "npm test",
|
||||
"name": "Run npm test",
|
||||
"request": "launch",
|
||||
"type": "node-terminal"
|
||||
}
|
||||
]
|
||||
}
|
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,35 @@
|
||||
{
|
||||
"npmci": {
|
||||
"npmGlobalTools": [
|
||||
"npmts"
|
||||
],
|
||||
"npmGlobalTools": [],
|
||||
"npmAccessLevel": "public"
|
||||
},
|
||||
"gitzone": {
|
||||
"projectType": "npm",
|
||||
"module": {
|
||||
"githost": "code.foss.global",
|
||||
"gitscope": "tsclass",
|
||||
"gitrepo": "tsclass",
|
||||
"description": "Provides TypeScript definitions for various business, financial, networking, content, and other common classes.",
|
||||
"npmPackagename": "@tsclass/tsclass",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"TypeScript",
|
||||
"Classes",
|
||||
"Interfaces",
|
||||
"Code Quality",
|
||||
"Networking",
|
||||
"Business",
|
||||
"Finance",
|
||||
"Content Management",
|
||||
"Containerization",
|
||||
"Database",
|
||||
"Event Management",
|
||||
"Authentication",
|
||||
"Web Development"
|
||||
]
|
||||
}
|
||||
},
|
||||
"tsdoc": {
|
||||
"legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
|
||||
}
|
||||
}
|
108
package-lock.json
generated
108
package-lock.json
generated
@ -1,108 +0,0 @@
|
||||
{
|
||||
"name": "@tsclass/tsclass",
|
||||
"version": "1.0.30",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@gitzone/tsrun": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@gitzone/tsrun/-/tsrun-1.0.5.tgz",
|
||||
"integrity": "sha512-zSiRnlvNAlBmrqknwH9B0gIRx7IEegPzmN+DZ4yN3f+L62WlVbKyPLeeV09SKE8BFiGo+0VIGiQW3EV/9mXMfw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ts-node": "^6.1.0",
|
||||
"typescript": "^2.9.1"
|
||||
}
|
||||
},
|
||||
"arrify": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
|
||||
"integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=",
|
||||
"dev": true
|
||||
},
|
||||
"buffer-from": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.0.tgz",
|
||||
"integrity": "sha512-c5mRlguI/Pe2dSZmpER62rSCu0ryKmWddzRYsuXc50U2/g8jMOulc31VZMa4mYx31U5xsmSOpDCgH88Vl9cDGQ==",
|
||||
"dev": true
|
||||
},
|
||||
"diff": {
|
||||
"version": "3.5.0",
|
||||
"resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
|
||||
"integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==",
|
||||
"dev": true
|
||||
},
|
||||
"make-error": {
|
||||
"version": "1.3.4",
|
||||
"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.4.tgz",
|
||||
"integrity": "sha512-0Dab5btKVPhibSalc9QGXb559ED7G7iLjFXBaj9Wq8O3vorueR5K5jaE3hkG6ZQINyhA/JgG6Qk4qdFQjsYV6g==",
|
||||
"dev": true
|
||||
},
|
||||
"minimist": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
|
||||
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
|
||||
"dev": true
|
||||
},
|
||||
"mkdirp": {
|
||||
"version": "0.5.1",
|
||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
|
||||
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"minimist": "0.0.8"
|
||||
},
|
||||
"dependencies": {
|
||||
"minimist": {
|
||||
"version": "0.0.8",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
|
||||
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
||||
"dev": true
|
||||
},
|
||||
"source-map-support": {
|
||||
"version": "0.5.6",
|
||||
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.6.tgz",
|
||||
"integrity": "sha512-N4KXEz7jcKqPf2b2vZF11lQIz9W5ZMuUcIOGj243lduidkf2fjkVKJS9vNxVWn3u/uxX38AcE8U9nnH9FPcq+g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"buffer-from": "^1.0.0",
|
||||
"source-map": "^0.6.0"
|
||||
}
|
||||
},
|
||||
"ts-node": {
|
||||
"version": "6.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-6.1.1.tgz",
|
||||
"integrity": "sha512-79FnymLGDBd/nXoiak1L6w6fd9Zz9Ge/x8/Aglaeh31KkqRLDzbfT1vBGlO5dqc76WzufTlW4IYl7e01CVUF5A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"arrify": "^1.0.0",
|
||||
"diff": "^3.1.0",
|
||||
"make-error": "^1.1.1",
|
||||
"minimist": "^1.2.0",
|
||||
"mkdirp": "^0.5.1",
|
||||
"source-map-support": "^0.5.6",
|
||||
"yn": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"typescript": {
|
||||
"version": "2.9.2",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz",
|
||||
"integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==",
|
||||
"dev": true
|
||||
},
|
||||
"yn": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz",
|
||||
"integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
}
|
54
package.json
54
package.json
@ -1,13 +1,15 @@
|
||||
{
|
||||
"name": "@tsclass/tsclass",
|
||||
"version": "1.0.30",
|
||||
"version": "4.0.54",
|
||||
"private": false,
|
||||
"description": "common classes for TypeScript",
|
||||
"main": "dist/index.js",
|
||||
"typings": "dist/index.d.ts",
|
||||
"description": "Provides TypeScript definitions for various business, financial, networking, content, and other common classes.",
|
||||
"main": "dist_ts/index.js",
|
||||
"typings": "dist_ts/index.d.ts",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"test": "tsrun test/test.ts",
|
||||
"build": "npmts --notest"
|
||||
"test": "tstest test/",
|
||||
"build": "(tsbuild --web)",
|
||||
"buildDocs": "tsdoc"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -15,7 +17,18 @@
|
||||
},
|
||||
"keywords": [
|
||||
"TypeScript",
|
||||
"Classes"
|
||||
"Classes",
|
||||
"Interfaces",
|
||||
"Code Quality",
|
||||
"Networking",
|
||||
"Business",
|
||||
"Finance",
|
||||
"Content Management",
|
||||
"Containerization",
|
||||
"Database",
|
||||
"Event Management",
|
||||
"Authentication",
|
||||
"Web Development"
|
||||
],
|
||||
"author": "Lossless GmbH",
|
||||
"license": "MIT",
|
||||
@ -23,8 +36,29 @@
|
||||
"url": "https://github.com/tsclass/tsclass/issues"
|
||||
},
|
||||
"homepage": "https://github.com/tsclass/tsclass#readme",
|
||||
"dependencies": {},
|
||||
"dependencies": {
|
||||
"type-fest": "^4.10.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gitzone/tsrun": "^1.0.5"
|
||||
}
|
||||
"@git.zone/tsbuild": "^2.1.72",
|
||||
"@git.zone/tsrun": "^1.2.46",
|
||||
"@git.zone/tstest": "^1.0.86",
|
||||
"@push.rocks/tapbundle": "^5.0.15",
|
||||
"@types/node": "^20.11.17"
|
||||
},
|
||||
"files": [
|
||||
"ts/**/*",
|
||||
"ts_web/**/*",
|
||||
"dist/**/*",
|
||||
"dist_*/**/*",
|
||||
"dist_ts/**/*",
|
||||
"dist_ts_web/**/*",
|
||||
"assets/**/*",
|
||||
"cli.js",
|
||||
"npmextra.json",
|
||||
"readme.md"
|
||||
],
|
||||
"browserslist": [
|
||||
"last 1 chrome versions"
|
||||
]
|
||||
}
|
||||
|
5985
pnpm-lock.yaml
generated
Normal file
5985
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
1
readme.hints.md
Normal file
1
readme.hints.md
Normal file
@ -0,0 +1 @@
|
||||
|
144
readme.md
Normal file
144
readme.md
Normal file
@ -0,0 +1,144 @@
|
||||
# @tsclass/tsclass
|
||||
common classes for TypeScript
|
||||
|
||||
## Install
|
||||
|
||||
To install `@tsclass/tsclass`, run the following command in your project directory:
|
||||
|
||||
```bash
|
||||
npm install @tsclass/tsclass
|
||||
```
|
||||
|
||||
This will add `@tsclass/tsclass` to your project's dependencies.
|
||||
|
||||
## Usage
|
||||
|
||||
`@tsclass/tsclass` offers a comprehensive TypeScript library that provides common classes and interfaces for various domains, including business, finance, content, networking, and more. The package utilizes ESM syntax and is intended for use with TypeScript for optimal developer experience.
|
||||
|
||||
### Getting Started
|
||||
|
||||
First, ensure that you are using ES Modules in your TypeScript project by having `"type": "module"` in your `package.json`, and install the package as described above.
|
||||
|
||||
### Importing Classes and Interfaces
|
||||
|
||||
You can import classes and interfaces from `@tsclass/tsclass` as follows:
|
||||
|
||||
```typescript
|
||||
import { business, finance, content } from '@tsclass/tsclass';
|
||||
```
|
||||
|
||||
### Business Domain
|
||||
|
||||
The business domain includes classes for managing contacts, companies, and projects. Here is how you can work with a company and contact classes:
|
||||
|
||||
```typescript
|
||||
import { business } from '@tsclass/tsclass';
|
||||
|
||||
const companyContact: business.IContact = {
|
||||
type: 'company',
|
||||
name: 'Example Company',
|
||||
address: {
|
||||
streetName: 'Main St',
|
||||
houseNumber: '123',
|
||||
postalCode: '12345',
|
||||
city: 'Example City',
|
||||
country: 'Exland'
|
||||
},
|
||||
description: 'An example company for demonstration purposes.',
|
||||
email: 'contact@example.com'
|
||||
};
|
||||
|
||||
const exampleCompany: business.ICompany = {
|
||||
name: 'Example Company',
|
||||
foundedDate: {
|
||||
day: 1,
|
||||
month: 1,
|
||||
year: 2020
|
||||
},
|
||||
status: 'active',
|
||||
contact: companyContact
|
||||
};
|
||||
```
|
||||
|
||||
### Finance Domain
|
||||
|
||||
The finance domain provides interfaces for working with invoices, transactions, and payment information. Here’s how you can define an invoice:
|
||||
|
||||
```typescript
|
||||
import { finance } from '@tsclass/tsclass';
|
||||
|
||||
const exampleInvoice: finance.IInvoice = {
|
||||
id: 'INV12345',
|
||||
billedBy: companyContact,
|
||||
billedTo: companyContact, // In a real scenario, this should be a different contact.
|
||||
status: 'draft',
|
||||
items: [
|
||||
{
|
||||
name: 'Product 1',
|
||||
unitType: 'Item',
|
||||
unitQuantity: 2,
|
||||
unitNetPrice: 50,
|
||||
vatPercentage: 20,
|
||||
currency: 'EUR'
|
||||
}
|
||||
],
|
||||
dueInDays: 30,
|
||||
reverseCharge: false
|
||||
};
|
||||
```
|
||||
|
||||
### Network Domain
|
||||
|
||||
Networking interfaces, such as those for managing SSH keys or network nodes, are available under the `network` namespace:
|
||||
|
||||
```typescript
|
||||
import { network } from '@tsclass/tsclass';
|
||||
|
||||
const sshKey: network.ISshKey = {
|
||||
keyName: 'example-ssh-key',
|
||||
public: 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD...'
|
||||
// Private key is typically kept secret and not included in source code
|
||||
};
|
||||
```
|
||||
|
||||
### Storage Domain
|
||||
|
||||
Interfaces for storage management, such as S3 descriptors, can be found under the `storage` namespace:
|
||||
|
||||
```typescript
|
||||
import { storage } from '@tsclass/tsclass';
|
||||
|
||||
const s3Descriptor: storage.IS3Descriptor = {
|
||||
endpoint: 's3.example.com',
|
||||
accessKey: 'AKIAIOSFODNN7EXAMPLE',
|
||||
accessSecret: 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY',
|
||||
useSsl: true
|
||||
};
|
||||
```
|
||||
|
||||
### Content and More
|
||||
|
||||
`@tsclass/tsclass` also provides classes for the content domain (e.g., articles, authors) and many other utilities across different fields. The examples above only scratch the surface of what `@tsclass/tsclass` offers. Depending on your project's needs, explore other domains and interfaces provided by the library.
|
||||
|
||||
Remember, while `@tsclass/tsclass` aims to streamline the TypeScript development process by providing ready-to-use classes and interfaces, it is crucial to adapt these examples to your specific project requirements, ensuring that all aspects, such as security (especially for networking and storage operations), are adequately handled.
|
||||
|
||||
For a deeper look into all available classes and interfaces, refer to the TypeScript definitions in the package. This will also give you insight into additional functionalities such as content management, events, authentication, and more detailed use cases within each domain.
|
||||
|
||||
## License and Legal Information
|
||||
|
||||
This repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository.
|
||||
|
||||
**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.
|
||||
|
||||
### Trademarks
|
||||
|
||||
This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.
|
||||
|
||||
### Company Information
|
||||
|
||||
Task Venture Capital GmbH
|
||||
Registered at District court Bremen HRB 35230 HB, Germany
|
||||
|
||||
For any legal inquiries or if you require further information, please contact us via email at hello@task.vc.
|
||||
|
||||
By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.
|
9
test/test.both.ts
Normal file
9
test/test.both.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import { tap, expect } from '@push.rocks/tapbundle';
|
||||
|
||||
import * as tsclass from '../ts/index.js';
|
||||
|
||||
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;
|
8
ts/00_commitinfo_data.ts
Normal file
8
ts/00_commitinfo_data.ts
Normal file
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* autocreated commitinfo by @pushrocks/commitinfo
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@tsclass/tsclass',
|
||||
version: '4.0.54',
|
||||
description: 'Provides TypeScript definitions for various business, financial, networking, content, and other common classes.'
|
||||
}
|
5
ts/00helperfunctions.ts/finance.ts
Normal file
5
ts/00helperfunctions.ts/finance.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import { type IInvoice } from "../finance/invoice.js";
|
||||
|
||||
export function createLetterFromInvoice(invoiceArg: IInvoice) {
|
||||
|
||||
}
|
1
ts/00helperfunctions.ts/index.ts
Normal file
1
ts/00helperfunctions.ts/index.ts
Normal file
@ -0,0 +1 @@
|
||||
export * from './finance.js';
|
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[];
|
||||
}
|
2
ts/authentication/index.ts
Normal file
2
ts/authentication/index.ts
Normal file
@ -0,0 +1,2 @@
|
||||
export * from './claim.js';
|
||||
export * from './processedclaim.js';
|
7
ts/authentication/processedclaim.ts
Normal file
7
ts/authentication/processedclaim.ts
Normal file
@ -0,0 +1,7 @@
|
||||
import { type IClaim } from './claim.js';
|
||||
|
||||
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 '../index.js';
|
||||
|
||||
/**
|
||||
* describes a company's lifecycle state
|
||||
@ -11,7 +10,11 @@ export type TCompanyStatus = 'planed' | 'founding' | 'active' | 'liquidation' |
|
||||
*/
|
||||
export interface ICompany {
|
||||
name: string;
|
||||
foundedDate: IDate;
|
||||
closedDate: IDate;
|
||||
status: TCompanyStatus;
|
||||
slogan?: string;
|
||||
description?: string;
|
||||
logoLink?: string;
|
||||
foundedDate: general.IDate;
|
||||
closedDate: general.IDate;
|
||||
status: business.TCompanyStatus;
|
||||
contact: business.IContact;
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { IAddress } from '../index';
|
||||
import { finance } from '../index.js';
|
||||
import { business } from '../index.js';
|
||||
|
||||
export type TContactSalutation = 'Mr' | 'Ms' | 'Mrs';
|
||||
|
||||
@ -16,16 +17,22 @@ 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?: finance.ISepaConnection;
|
||||
}
|
||||
|
20
ts/business/contract.ts
Normal file
20
ts/business/contract.ts
Normal file
@ -0,0 +1,20 @@
|
||||
import * as database from '../database/index.js';
|
||||
import { type IPerson } from './person.js';
|
||||
|
||||
export interface IContract {
|
||||
parties: {
|
||||
signingOrder: number;
|
||||
referencedAs: string;
|
||||
person: IPerson;
|
||||
role: 'signer' | 'cc';
|
||||
signature: {
|
||||
given: boolean;
|
||||
timestamp?: number;
|
||||
location?: string;
|
||||
ip?: string;
|
||||
verifications?: [];
|
||||
};
|
||||
}[];
|
||||
contractTextMarkdown: string;
|
||||
actions: database.IObjectAction[];
|
||||
}
|
8
ts/business/index.ts
Normal file
8
ts/business/index.ts
Normal file
@ -0,0 +1,8 @@
|
||||
export * from './address.js';
|
||||
export * from './company.js';
|
||||
export * from './contact.js';
|
||||
export * from './job.js';
|
||||
export * from './letter.js';
|
||||
export * from './pdf.js';
|
||||
export * from './person.js';
|
||||
export * from './project.js';
|
18
ts/business/job.ts
Normal file
18
ts/business/job.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import * as finance from '../finance/index.js';
|
||||
import { type ICompany } from './company.js';
|
||||
import { type IContact } from './contact.js';
|
||||
export class IJob {
|
||||
type: 'contract' | 'employment';
|
||||
techTags?: string[];
|
||||
qualificationTags?: string[];
|
||||
languages?: {
|
||||
name: string;
|
||||
level: 'basic' | 'intermediate' | 'advanced' | 'native';
|
||||
}[];
|
||||
name: string;
|
||||
description: string;
|
||||
monthlyTotal: number;
|
||||
currency: finance.TCurrency;
|
||||
from: ICompany;
|
||||
contact: IContact;
|
||||
}
|
35
ts/business/letter.ts
Normal file
35
ts/business/letter.ts
Normal file
@ -0,0 +1,35 @@
|
||||
import * as business from './index.js';
|
||||
import * as finance from '../finance/index.js';
|
||||
import * as database from '../database/index.js';
|
||||
export interface ILetter {
|
||||
versionInfo: {
|
||||
type: 'draft' | 'final';
|
||||
/**
|
||||
* should follow semVer
|
||||
*/
|
||||
version: string;
|
||||
};
|
||||
incidenceId: string;
|
||||
type: 'invoice' | 'notice' | 'warning' | 'verification' | 'contract';
|
||||
date: number;
|
||||
from: business.IContact;
|
||||
to: business.IContact;
|
||||
legalContact: business.IContact;
|
||||
logoUrl: string;
|
||||
subject: string;
|
||||
accentColor?: string;
|
||||
needsCoverSheet: boolean;
|
||||
content: {
|
||||
textData: string[];
|
||||
invoiceData?: finance.IInvoice;
|
||||
contractData?: {
|
||||
id: string;
|
||||
contractDate: number;
|
||||
};
|
||||
timesheetData: string;
|
||||
}
|
||||
pdf?: business.IPdf;
|
||||
pdfAttachments: business.IPdf[];
|
||||
language: string;
|
||||
objectActions: database.IObjectAction[];
|
||||
}
|
8
ts/business/pdf.ts
Normal file
8
ts/business/pdf.ts
Normal file
@ -0,0 +1,8 @@
|
||||
export interface IPdf {
|
||||
name: string;
|
||||
id: string;
|
||||
metadata: {
|
||||
textExtraction: string;
|
||||
};
|
||||
buffer: Uint8Array;
|
||||
}
|
12
ts/business/person.ts
Normal file
12
ts/business/person.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import { type IContact } from './contact.js';
|
||||
|
||||
export interface IPerson {
|
||||
title: string;
|
||||
name: string;
|
||||
surname: string;
|
||||
sex: 'male' | 'female' | 'queer';
|
||||
legalProxyFor?: {
|
||||
type: 'self' | 'other';
|
||||
contact?: IContact;
|
||||
};
|
||||
}
|
18
ts/business/project.ts
Normal file
18
ts/business/project.ts
Normal file
@ -0,0 +1,18 @@
|
||||
export interface IProject {
|
||||
active: boolean;
|
||||
category: 'SaaS' | 'IaaS' | 'Media' | 'Blockchain' | 'Open Source' | 'Consulting' | 'internal' | 'partner';
|
||||
branch?: null;
|
||||
branchId? : string;
|
||||
domain: string;
|
||||
redirectDomains: string[];
|
||||
gitlab: string;
|
||||
name: string;
|
||||
social: {
|
||||
facebook?: string;
|
||||
gitlab?: string;
|
||||
github?: string;
|
||||
twitter?: string;
|
||||
};
|
||||
tagLine: string;
|
||||
tags: string[];
|
||||
}
|
@ -1 +0,0 @@
|
||||
export type TDnsRecord = 'A' | 'AAAA' | 'CNAME' | 'TXT' | 'SRV' | 'LOC' | 'MX' | 'NS' | 'SPF';
|
5
ts/code/commitinfo.ts
Normal file
5
ts/code/commitinfo.ts
Normal file
@ -0,0 +1,5 @@
|
||||
export interface ICommitInfo {
|
||||
name: string;
|
||||
version: string;
|
||||
description: string;
|
||||
}
|
2
ts/code/index.ts
Normal file
2
ts/code/index.ts
Normal file
@ -0,0 +1,2 @@
|
||||
export * from './commitinfo.js';
|
||||
export * from './statusobject.js';
|
13
ts/code/statusobject.ts
Normal file
13
ts/code/statusobject.ts
Normal file
@ -0,0 +1,13 @@
|
||||
export type TStatus = 'ok' | 'partly_ok' | 'not_ok';
|
||||
export interface IStatusObject {
|
||||
id?: string;
|
||||
name: string;
|
||||
combinedStatus?: TStatus;
|
||||
combinedStatusText: string;
|
||||
details: Array<{
|
||||
name: string;
|
||||
value: string;
|
||||
status: TStatus;
|
||||
statusText: string;
|
||||
}>
|
||||
}
|
9
ts/container/container.ts
Normal file
9
ts/container/container.ts
Normal 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
2
ts/container/index.ts
Normal file
@ -0,0 +1,2 @@
|
||||
export * from './container.js';
|
||||
export * from './volumemount.js';
|
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,24 @@
|
||||
import { IAuthor } from '../index';
|
||||
import { content } from '../index.js';
|
||||
|
||||
/**
|
||||
* a general content article:
|
||||
* * can be news
|
||||
* * can be a productdescription,
|
||||
* * can be anything that has text with a title
|
||||
*/
|
||||
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 +27,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,6 +1,8 @@
|
||||
import { IDate } from '../index';
|
||||
import { IArticle } from '../index';
|
||||
import { general, content } from '../index.js';
|
||||
|
||||
/**
|
||||
* answers the question "Who wrote that?"
|
||||
*/
|
||||
export interface IAuthor {
|
||||
/**
|
||||
* the first name of an author
|
||||
@ -15,10 +17,10 @@ export interface IAuthor {
|
||||
/**
|
||||
* the birthday of an author
|
||||
*/
|
||||
birthday: IDate;
|
||||
birthday: general.IDate;
|
||||
|
||||
/**
|
||||
* articles of an author
|
||||
*/
|
||||
articles: IArticle[];
|
||||
articles: content.IArticle[];
|
||||
}
|
||||
|
10
ts/content/documentationset.ts
Normal file
10
ts/content/documentationset.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import { type IArticle } from './article.js';
|
||||
|
||||
/**
|
||||
* a set of articles that together form a body of documentation
|
||||
*/
|
||||
export interface IDocumentationSet {
|
||||
id: string;
|
||||
creationTimestamp: number;
|
||||
articles: IArticle[];
|
||||
}
|
3
ts/content/index.ts
Normal file
3
ts/content/index.ts
Normal file
@ -0,0 +1,3 @@
|
||||
export * from './article.js';
|
||||
export * from './author.js';
|
||||
export * from './documentationset.js';
|
4
ts/database/index.ts
Normal file
4
ts/database/index.ts
Normal file
@ -0,0 +1,4 @@
|
||||
export * from './mongodescriptor.js';
|
||||
export * from './objectaction.js';
|
||||
export * from './objectstatus.js';
|
||||
export * from './wrappeddata.js';
|
25
ts/database/mongodescriptor.ts
Normal file
25
ts/database/mongodescriptor.ts
Normal file
@ -0,0 +1,25 @@
|
||||
/**
|
||||
* contains the complete info for how to connect to a mongodb database.
|
||||
*/
|
||||
export interface IMongoDescriptor {
|
||||
/**
|
||||
* the URL to connect to
|
||||
*/
|
||||
mongoDbUrl: string;
|
||||
|
||||
/**
|
||||
* the db to use for the project
|
||||
*/
|
||||
mongoDbName?: string;
|
||||
|
||||
/**
|
||||
* a username to use to connect to the database
|
||||
*/
|
||||
|
||||
mongoDbUser?: string;
|
||||
|
||||
/**
|
||||
* an optional password that will be replace <PASSWORD> in the connection string
|
||||
*/
|
||||
mongoDbPass?: string;
|
||||
}
|
8
ts/database/objectaction.ts
Normal file
8
ts/database/objectaction.ts
Normal file
@ -0,0 +1,8 @@
|
||||
export interface IObjectAction {
|
||||
timestamp: number;
|
||||
name: string;
|
||||
userId: string;
|
||||
data: any;
|
||||
message: string;
|
||||
privateMessage: string;
|
||||
}
|
7
ts/database/objectstatus.ts
Normal file
7
ts/database/objectstatus.ts
Normal file
@ -0,0 +1,7 @@
|
||||
export interface IObjectStatus {
|
||||
current: 'active' | 'inactive' | 'hidden' | 'markedForDeletion';
|
||||
scheduledDeletion: number;
|
||||
justForLooks: {
|
||||
scheduledDeletionIso: string;
|
||||
};
|
||||
}
|
3
ts/database/wrappeddata.ts
Normal file
3
ts/database/wrappeddata.ts
Normal file
@ -0,0 +1,3 @@
|
||||
export interface IWrappedData<T> {
|
||||
data: T;
|
||||
}
|
10
ts/events/contractevent.ts
Normal file
10
ts/events/contractevent.ts
Normal file
@ -0,0 +1,10 @@
|
||||
/**
|
||||
* a contract 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.js';
|
||||
export * from './moneyevent.js';
|
||||
export * from './releaseevent.js';
|
||||
export * from './requestevent.js';
|
||||
export * from './sessionevent.js';
|
||||
export * from './userevent.js';
|
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 {}
|
7
ts/finance/checkingaccount.ts
Normal file
7
ts/finance/checkingaccount.ts
Normal file
@ -0,0 +1,7 @@
|
||||
import { finance } from '../index.js';
|
||||
|
||||
export interface ICheckingAccount {
|
||||
name: string;
|
||||
currency: finance.TCurrency;
|
||||
transactions?: finance.ITransaction[];
|
||||
}
|
172
ts/finance/currency.ts
Normal file
172
ts/finance/currency.ts
Normal 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';
|
@ -1,6 +1,17 @@
|
||||
import { IInvoice } from './invoice';
|
||||
import { business } from '../index.js';
|
||||
|
||||
export interface IExpense {
|
||||
invoice: IInvoice;
|
||||
account: string;
|
||||
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;
|
||||
}
|
||||
|
6
ts/finance/index.ts
Normal file
6
ts/finance/index.ts
Normal file
@ -0,0 +1,6 @@
|
||||
export * from './checkingaccount.js';
|
||||
export * from './currency.js';
|
||||
export * from './expense.js';
|
||||
export * from './invoice.js';
|
||||
export * from './payment.js';
|
||||
export * from './transaction.js';
|
@ -1,18 +1,38 @@
|
||||
import { IContact } from '..';
|
||||
import { business, finance } from '../index.js';
|
||||
|
||||
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 {
|
||||
pdfFile?: any;
|
||||
billedBy: IContact;
|
||||
billedTo: IContact;
|
||||
id: string;
|
||||
billedBy: business.IContact;
|
||||
billedTo: business.IContact;
|
||||
status: TInvoiceStatus;
|
||||
items: IInvoiceItem[];
|
||||
periodOfPerformance?: {
|
||||
from: number;
|
||||
to: number;
|
||||
};
|
||||
deliveryDate?: number;
|
||||
dueInDays: number;
|
||||
reverseCharge: boolean;
|
||||
printResult?: {
|
||||
pdfBufferString: string;
|
||||
totalNet: number;
|
||||
totalGross: number;
|
||||
vatGroups: {
|
||||
percentage: number;
|
||||
items: IInvoiceItem[];
|
||||
};
|
||||
};
|
||||
paymentOptions?: finance.IPaymentOptionInfo;
|
||||
}
|
||||
|
14
ts/finance/payment.ts
Normal file
14
ts/finance/payment.ts
Normal file
@ -0,0 +1,14 @@
|
||||
export interface ISepaConnection {
|
||||
institution?: string;
|
||||
iban: string;
|
||||
bic: string;
|
||||
}
|
||||
|
||||
export interface IPayPalConnection {
|
||||
email: string;
|
||||
}
|
||||
|
||||
export interface IPaymentOptionInfo {
|
||||
sepaConnection: ISepaConnection;
|
||||
payPal: IPayPalConnection;
|
||||
}
|
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.js';
|
||||
export * from './time.js';
|
44
ts/index.ts
44
ts/index.ts
@ -1,17 +1,39 @@
|
||||
// Business
|
||||
export * from './business/address';
|
||||
export * from './business/company';
|
||||
export * from './business/contact';
|
||||
export * from './finance/invoice';
|
||||
export * from './finance/expense';
|
||||
import * as business from './business/index.js';
|
||||
|
||||
// Cloud
|
||||
export * from './cloud/dns';
|
||||
// Code
|
||||
import * as code from './code/index.js';
|
||||
|
||||
// Container
|
||||
import * as container from './container/index.js';
|
||||
|
||||
// Database
|
||||
import * as database from './database/index.js';
|
||||
|
||||
// Finance
|
||||
import * as finance from './finance/index.js';
|
||||
|
||||
// Content
|
||||
export * from './content/article';
|
||||
export * from './content/author';
|
||||
import * as content from './content/index.js';
|
||||
|
||||
// General
|
||||
export * from './general/date';
|
||||
export * from './general/time';
|
||||
import * as general from './general/index.js';
|
||||
|
||||
// Network
|
||||
import * as network from './network/index.js';
|
||||
|
||||
// SaaS
|
||||
import * as saas from './saas/index.js';
|
||||
|
||||
// Storage
|
||||
import * as storage from './storage/index.js';
|
||||
|
||||
// Website
|
||||
import * as website from './website/index.js';
|
||||
|
||||
export { business, container, code, database, finance, content, general, network, saas, storage, website };
|
||||
|
||||
import type * as typeFest from 'type-fest';
|
||||
import * as typeFestOwn from './typefest.own.js';
|
||||
|
||||
export { type typeFest, type typeFestOwn };
|
||||
|
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;
|
||||
}
|
29
ts/network/cname.ts
Normal file
29
ts/network/cname.ts
Normal file
@ -0,0 +1,29 @@
|
||||
import { type ICert } from "./cert.js";
|
||||
|
||||
export class ICnameDescriptor {
|
||||
/**
|
||||
* the original domain that is being cnamed
|
||||
*/
|
||||
cnamedDomain: string;
|
||||
|
||||
/**
|
||||
* the cname proxy domain
|
||||
* the domain that is used for the cname dns entry
|
||||
*/
|
||||
cnameProxyDomain: string;
|
||||
|
||||
/**
|
||||
* the internal target url
|
||||
*/
|
||||
targetUrl: string;
|
||||
|
||||
/**
|
||||
* a description
|
||||
*/
|
||||
description: string;
|
||||
|
||||
/**
|
||||
* the ssl certificate
|
||||
*/
|
||||
sslCertificate?: ICert;
|
||||
};
|
10
ts/network/device.ts
Normal file
10
ts/network/device.ts
Normal file
@ -0,0 +1,10 @@
|
||||
export interface IDevice {
|
||||
id: string;
|
||||
resolutionWidth?: number;
|
||||
resolutionHeight?: number;
|
||||
dpi?: number;
|
||||
manufacturer?: string;
|
||||
name?: string;
|
||||
ipv4?: string;
|
||||
ipv6?: 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;
|
||||
}
|
31
ts/network/domaindelegation.ts
Normal file
31
ts/network/domaindelegation.ts
Normal file
@ -0,0 +1,31 @@
|
||||
export interface IDomainDelegation {
|
||||
/**
|
||||
* only if it applis: the origininating url
|
||||
*/
|
||||
fullUrl: string;
|
||||
/**
|
||||
* the full domain name
|
||||
*/
|
||||
fullDomain: string;
|
||||
/**
|
||||
* the domain, meaning whats usually considered a domain like google.com
|
||||
*/
|
||||
domain: string;
|
||||
/**
|
||||
* the public suffix, meaning whats usually considered a public suffix like .com
|
||||
*/
|
||||
publicSuffix: string;
|
||||
|
||||
/**
|
||||
* the domain without the public suffix
|
||||
*/
|
||||
domainWithoutSuffix: string;
|
||||
|
||||
/**
|
||||
* the subdomain, meaning whats usually considered a subdomain like www
|
||||
*/
|
||||
subdomain: string;
|
||||
|
||||
isIcann?: boolean;
|
||||
dnsSecEnabled?: boolean;
|
||||
}
|
11
ts/network/index.ts
Normal file
11
ts/network/index.ts
Normal file
@ -0,0 +1,11 @@
|
||||
export * from './cert.js';
|
||||
export * from './cname.js';
|
||||
export * from './device.js';
|
||||
export * from './dns.js';
|
||||
export * from './dnschallenge.js';
|
||||
export * from './domaindelegation.js';
|
||||
export * from './jwt.js';
|
||||
export * from './networknode.js';
|
||||
export * from './request.js';
|
||||
export * from './reverseproxy.js';
|
||||
export * from './ssh.js';
|
4
ts/network/jwt.ts
Normal file
4
ts/network/jwt.ts
Normal file
@ -0,0 +1,4 @@
|
||||
export interface IJwtKeypair {
|
||||
privatePem: string;
|
||||
publicPem: string;
|
||||
}
|
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;
|
||||
};
|
||||
}
|
5
ts/network/ssh.ts
Normal file
5
ts/network/ssh.ts
Normal file
@ -0,0 +1,5 @@
|
||||
export interface ISshKey {
|
||||
keyName: string;
|
||||
public: string;
|
||||
private?: string;
|
||||
}
|
2
ts/saas/index.ts
Normal file
2
ts/saas/index.ts
Normal file
@ -0,0 +1,2 @@
|
||||
export * from './subscriptionplan.js';
|
||||
export * from './product.js';
|
14
ts/saas/product.ts
Normal file
14
ts/saas/product.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import { type ICompany } from "../business/company.js";
|
||||
|
||||
export interface IProduct {
|
||||
name: string;
|
||||
slogan: string;
|
||||
description: string;
|
||||
os: 'web-based',
|
||||
category: 'Business Application',
|
||||
offers: any[];
|
||||
landingPage: string;
|
||||
appLink: string;
|
||||
logoLink: string;
|
||||
publisher?: ICompany;
|
||||
}
|
14
ts/saas/subscriptionplan.ts
Normal file
14
ts/saas/subscriptionplan.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import { type IProduct } from './product.js';
|
||||
|
||||
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;
|
||||
}
|
7
ts/storage/index.ts
Normal file
7
ts/storage/index.ts
Normal file
@ -0,0 +1,7 @@
|
||||
export interface IS3Descriptor {
|
||||
endpoint: string;
|
||||
port?: number;
|
||||
useSsl?: boolean;
|
||||
accessKey: string;
|
||||
accessSecret: string;
|
||||
}
|
8
ts/typefest.own.ts
Normal file
8
ts/typefest.own.ts
Normal file
@ -0,0 +1,8 @@
|
||||
type SecondArgument<T> = T extends (arg1: any, arg2: infer P, ...args: any[]) => any ? P : never;
|
||||
|
||||
type ValueType<T> = T extends { [key: string]: infer U } ? U : never;
|
||||
|
||||
export type {
|
||||
SecondArgument,
|
||||
ValueType
|
||||
}
|
1
ts/website/index.ts
Normal file
1
ts/website/index.ts
Normal file
@ -0,0 +1 @@
|
||||
export * from './menuitem.js';
|
5
ts/website/menuitem.ts
Normal file
5
ts/website/menuitem.ts
Normal file
@ -0,0 +1,5 @@
|
||||
export interface IMenuItem<T = any, U = any> {
|
||||
name: string;
|
||||
iconName?: string;
|
||||
action: (optionsArg?: T) => Promise<U>;
|
||||
}
|
14
tsconfig.json
Normal file
14
tsconfig.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"experimentalDecorators": true,
|
||||
"useDefineForClassFields": false,
|
||||
"target": "ES2022",
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"esModuleInterop": true,
|
||||
"verbatimModuleSyntax": true
|
||||
},
|
||||
"exclude": [
|
||||
"dist_*/**/*.d.ts"
|
||||
]
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
{
|
||||
"extends": "tslint-config-standard"
|
||||
}
|
Reference in New Issue
Block a user