Compare commits

...

159 Commits

Author SHA1 Message Date
c319415c76 4.0.61 2024-06-24 21:21:39 +02:00
75177cc097 fix(dependencies): Update dependencies to latest versions 2024-06-24 21:21:38 +02:00
85c4caa861 4.0.60 2024-06-19 18:27:24 +02:00
85ae355e2c fix(core): update 2024-06-19 18:27:23 +02:00
09ea75ed5b 4.0.59 2024-06-17 14:56:50 +02:00
58b3fbb03e fix(core): update 2024-06-17 14:56:49 +02:00
89698b30f6 4.0.58 2024-06-15 18:10:01 +02:00
09eaa7ff3b fix(core): update 2024-06-15 18:10:00 +02:00
806f28849f 4.0.57 2024-06-15 18:08:36 +02:00
dd4ff90b3b fix(core): update 2024-06-15 18:08:35 +02:00
cede9eaebf 4.0.56 2024-06-15 18:00:07 +02:00
a25425f0ac fix(core): update 2024-06-15 18:00:07 +02:00
54ad67c93e 4.0.55 2024-06-08 19:10:47 +02:00
dba7193605 fix(core): update 2024-06-08 19:10:46 +02:00
3cd02b61b3 4.0.54 2024-04-17 19:17:11 +02:00
f7fb032f4d fix(core): update 2024-04-17 19:17:10 +02:00
2cef38c54b 4.0.53 2024-04-17 19:16:04 +02:00
26cec00b4e fix(core): update 2024-04-17 19:16:04 +02:00
faa173b034 update documentation 2024-04-16 18:40:54 +02:00
e13236e10f 4.0.52 2024-02-17 20:54:54 +01:00
18d52a9018 fix(core): update 2024-02-17 20:54:53 +01:00
582b269d63 4.0.51 2024-02-13 01:08:22 +01:00
6293db82fd fix(core): update 2024-02-13 01:08:21 +01:00
eda528b6d9 4.0.50 2024-02-10 04:34:23 +01:00
4e52240ae7 fix(core): update 2024-02-10 04:34:22 +01:00
61b6835b31 4.0.49 2024-02-10 04:22:55 +01:00
48c65d726b fix(core): update 2024-02-10 04:22:54 +01:00
8b61ec02a2 4.0.48 2024-02-09 16:39:37 +01:00
90c3a9b3b4 fix(core): update 2024-02-09 16:39:37 +01:00
f25fb72924 4.0.47 2023-10-15 12:26:47 +02:00
995f7772ef fix(core): update 2023-10-15 12:26:46 +02:00
60a528aad4 4.0.46 2023-10-15 12:26:02 +02:00
310d60a84e fix(core): update 2023-10-15 12:26:01 +02:00
5fd5fc501f 4.0.45 2023-10-13 17:37:28 +02:00
bf79856f67 fix(core): update 2023-10-13 17:37:27 +02:00
b1025faa62 4.0.44 2023-10-13 17:31:29 +02:00
f22ec7d654 fix(core): update 2023-10-13 17:31:28 +02:00
585e9fd4b3 4.0.43 2023-09-13 13:31:30 +02:00
537c54b5f3 fix(core): update 2023-09-13 13:31:30 +02:00
2f95b5d2ef 4.0.42 2023-05-08 16:46:00 +02:00
c1f22e0cb1 fix(core): update 2023-05-08 16:45:59 +02:00
5c430fddfc 4.0.41 2023-05-08 15:05:52 +02:00
f9478aa3c2 fix(core): update 2023-05-08 15:05:52 +02:00
055b85c7c4 4.0.40 2023-05-06 21:21:02 +02:00
5730d87b0c fix(core): update 2023-05-06 21:21:01 +02:00
610fda5f36 4.0.39 2023-05-06 17:23:46 +02:00
e206405d70 fix(core): update 2023-05-06 17:23:46 +02:00
fdc63b0f4f 4.0.38 2023-04-19 21:06:51 +02:00
4307bb68a7 fix(core): update 2023-04-19 21:06:50 +02:00
5c60875d46 4.0.37 2023-04-19 21:03:08 +02:00
0a5443c646 fix(core): update 2023-04-19 21:03:08 +02:00
f38274e325 4.0.36 2023-04-05 14:30:31 +02:00
800123586e fix(core): update 2023-04-05 14:30:29 +02:00
bf37575140 4.0.35 2023-04-05 13:28:59 +02:00
c7420aba79 fix(core): update 2023-04-05 13:28:58 +02:00
3770b7dada 4.0.34 2023-03-14 11:55:33 +01:00
5b00b5d7e9 fix(core): update 2023-03-14 11:55:32 +01:00
e7d2eb5cab 4.0.33 2023-03-09 01:22:44 +01:00
b38a59f91a fix(core): update 2023-03-09 01:22:43 +01:00
f92abdfb4e 4.0.32 2023-03-09 01:21:06 +01:00
8bc0506b60 fix(core): update 2023-03-09 01:21:06 +01:00
8a690e5065 4.0.31 2023-02-15 20:19:25 +01:00
50b401db9b fix(core): update 2023-02-15 20:19:24 +01:00
96e86993bf 4.0.30 2023-02-06 16:16:29 +01:00
485ed3630d fix(core): update 2023-02-06 16:16:28 +01:00
9a6ffcbc03 4.0.29 2023-01-12 20:58:34 +01:00
d39d9c2a86 fix(core): update 2023-01-12 20:58:34 +01:00
3c67658a0e 4.0.28 2022-11-20 10:28:14 +01:00
e9d4a1641f fix(core): update 2022-11-20 10:28:14 +01:00
2cec65f8a0 4.0.27 2022-10-31 13:59:04 +01:00
d20073a2b0 fix(core): update 2022-10-31 13:59:03 +01:00
4563ba2404 4.0.26 2022-10-24 12:58:24 +02:00
62eeeecfef fix(core): update 2022-10-24 12:58:24 +02:00
c48c6a2d79 4.0.25 2022-10-24 10:10:53 +02:00
25d2bb077e fix(business.IContract): added contract logic 2022-10-24 10:10:52 +02:00
fee1e3cb58 4.0.24 2022-10-15 11:00:11 +02:00
66732c5f81 fix(core): update 2022-10-15 11:00:10 +02:00
62f78f0866 4.0.23 2022-10-15 10:51:42 +02:00
6bb30e4e5b fix(core): update 2022-10-15 10:51:42 +02:00
b0de29a26a 4.0.22 2022-10-15 10:51:25 +02:00
3363a12082 fix(core): update 2022-10-15 10:51:24 +02:00
b63ca0fd23 4.0.21 2022-09-14 09:40:03 +02:00
c95fd41f59 fix(core): update 2022-09-14 09:40:03 +02:00
38e5bd39d9 4.0.20 2022-09-14 08:43:55 +02:00
f978af4b4f fix(core): update 2022-09-14 08:43:54 +02:00
6f35eed240 4.0.19 2022-08-17 17:28:04 +02:00
636177b119 fix(core): update 2022-08-17 17:28:03 +02:00
05bd86a0ce 4.0.18 2022-08-17 15:46:43 +02:00
d4cc9f7843 fix(core): update 2022-08-17 15:46:42 +02:00
45e8460474 4.0.17 2022-06-16 12:25:27 +02:00
15bbb6ee22 fix(core): update 2022-06-16 12:25:26 +02:00
7bf736ec75 4.0.16 2022-06-15 22:37:40 +02:00
a43113860a fix(core): update 2022-06-15 22:37:40 +02:00
76cff5259b 4.0.15 2022-06-15 21:55:57 +02:00
34b49123e1 fix(core): update 2022-06-15 21:55:57 +02:00
ecf1b945b5 4.0.14 2022-06-15 21:29:39 +02:00
dd3182536e fix(core): update 2022-06-15 21:29:39 +02:00
5e8ab7012f 4.0.13 2022-06-15 01:17:47 +02:00
12a0a1402d fix(core): update 2022-06-15 01:17:47 +02:00
79c334da3b 4.0.12 2022-06-15 01:13:52 +02:00
5c71e8c97d fix(core): update 2022-06-15 01:13:51 +02:00
48b01b43ed 4.0.11 2022-06-15 01:11:42 +02:00
97d7b3cb61 fix(core): update 2022-06-15 01:11:41 +02:00
82d080a4f7 4.0.10 2022-06-15 00:44:08 +02:00
0c7875ca0d fix(core): update 2022-06-15 00:44:08 +02:00
e03fe0db7c 4.0.9 2022-06-14 23:09:58 +02:00
aa74f5d2e4 fix(core): update 2022-06-14 23:09:57 +02:00
55d5e89bb8 4.0.8 2022-06-12 19:29:28 +02:00
5838948117 fix(core): update 2022-06-12 19:29:27 +02:00
e5e3562eef 4.0.7 2022-06-11 12:56:39 +02:00
d081dc4b98 fix(core): update 2022-06-11 12:56:39 +02:00
ee9efae18d 4.0.6 2022-06-10 13:38:20 +02:00
df39fcbe37 fix(core): update 2022-06-10 13:38:20 +02:00
4ad0b3745e 4.0.5 2022-06-10 13:35:00 +02:00
7f53cb2f7f fix(core): update 2022-06-10 13:35:00 +02:00
59ca7e6c93 4.0.4 2022-06-10 13:31:18 +02:00
ba0237f9a7 fix(core): update 2022-06-10 13:31:18 +02:00
1609a2b65c 4.0.3 2022-06-05 16:44:48 +02:00
09f1496cf4 fix(core): update 2022-06-05 16:44:48 +02:00
5d96d25176 4.0.2 2022-04-28 14:25:21 +02:00
87a303f7be fix(core): update 2022-04-28 14:25:21 +02:00
34cb1384ea 4.0.1 2022-04-28 12:20:28 +02:00
d672b9973e fix(core): update 2022-04-28 12:20:27 +02:00
d8e1609851 4.0.0 2022-04-28 12:18:27 +02:00
9302766e91 BREAKING CHANGE(core): switch to esm 2022-04-28 12:18:26 +02:00
318e9a2476 3.0.48 2022-01-14 06:12:27 +01:00
7434f8a6a4 fix(core): update 2022-01-14 06:12:27 +01:00
0f23c88a45 3.0.47 2022-01-14 05:59:06 +01:00
9ef38d21d7 fix(core): update 2022-01-14 05:59:05 +01:00
058c8cbfc2 3.0.46 2022-01-14 05:17:56 +01:00
9f1b5df136 fix(core): update 2022-01-14 05:17:55 +01:00
1862444da9 3.0.45 2022-01-14 04:54:35 +01:00
c69b595fd1 fix(core): update 2022-01-14 04:54:35 +01:00
c761c7aeae 3.0.44 2022-01-14 04:50:26 +01:00
bd17b4c94f fix(core): update 2022-01-14 04:50:25 +01:00
a71106dcae 3.0.43 2022-01-14 04:45:56 +01:00
32608912b6 fix(core): update 2022-01-14 04:45:56 +01:00
b3fbaff314 3.0.42 2022-01-14 04:32:03 +01:00
3a334418cc fix(core): update 2022-01-14 04:32:02 +01:00
759a19c731 3.0.41 2022-01-08 04:56:56 +01:00
0bb5ee7fac fix(core): update 2022-01-08 04:56:55 +01:00
d9327084a0 3.0.40 2022-01-08 04:20:36 +01:00
14af89dc8b fix(core): update 2022-01-08 04:20:35 +01:00
f1b62ce326 3.0.39 2022-01-08 04:19:18 +01:00
662909a84b fix(core): update 2022-01-08 04:19:18 +01:00
10c7111cbb 3.0.38 2022-01-08 02:29:24 +01:00
ae8c091f2d fix(core): update 2022-01-08 02:29:24 +01:00
2026a84865 3.0.37 2021-12-10 17:50:55 +01:00
6f0a8dcfac fix(core): update 2021-12-10 17:50:55 +01:00
7d148166c3 3.0.36 2021-11-07 03:17:52 +01:00
cd380c9791 fix(core): update 2021-11-07 03:17:51 +01:00
2a3236c2a6 3.0.35 2021-11-07 03:16:41 +01:00
cb556f71da fix(core): update 2021-11-07 03:16:41 +01:00
416aa9ee1e 3.0.34 2021-10-05 14:56:38 +02:00
3375f8aa4f fix(core): update 2021-10-05 14:56:37 +02:00
283e53fea3 3.0.33 2021-02-18 19:46:55 +00:00
ae396892bc fix(core): update 2021-02-18 19:46:55 +00:00
e292ec1de9 3.0.32 2021-02-15 21:36:27 +00:00
b1107a5945 fix(core): update 2021-02-15 21:36:26 +00:00
64 changed files with 7416 additions and 11494 deletions

View File

@ -1,137 +0,0 @@
# gitzone ci_default
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
cache:
paths:
- .npmci_cache/
key: '$CI_BUILD_STAGE'
stages:
- security
- test
- release
- metadata
# ====================
# security stage
# ====================
mirror:
stage: security
script:
- npmci git mirror
only:
- tags
tags:
- lossless
- docker
- notpriv
auditProductionDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security
script:
- 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
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
# ====================
testStable:
stage: test
script:
- npmci npm prepare
- npmci node install stable
- npmci npm install
- npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
testBuild:
stage: test
script:
- npmci npm prepare
- npmci node install stable
- npmci npm install
- npmci command npm run build
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
release:
stage: release
script:
- npmci node install stable
- npmci npm publish
only:
- tags
tags:
- lossless
- docker
- notpriv
# ====================
# metadata stage
# ====================
codequality:
stage: metadata
allow_failure: true
only:
- tags
script:
- npmci command npm install -g tslint typescript
- npmci npm prepare
- npmci npm install
- npmci command "tslint -c tslint.json ./ts/**/*.ts"
tags:
- lossless
- docker
- priv
trigger:
stage: metadata
script:
- npmci trigger
only:
- tags
tags:
- lossless
- docker
- notpriv
pages:
stage: metadata
script:
- 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:
- tags
artifacts:
expire_in: 1 week
paths:
- public
allow_failure: true

24
.vscode/launch.json vendored
View File

@ -2,28 +2,10 @@
"version": "0.2.0",
"configurations": [
{
"name": "current file",
"type": "node",
"command": "npm test",
"name": "Run npm test",
"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"
"type": "node-terminal"
}
]
}

142
changelog.md Normal file
View File

@ -0,0 +1,142 @@
# Changelog
## 2024-06-24 - 4.0.61 - fix(dependencies)
Update dependencies to latest versions
- Updated 'dependencies > type-fest' to version ^4.20.1
- Updated 'devDependencies > @git.zone/tsbuild' to version ^2.1.82
- Updated 'devDependencies > @git.zone/tsrun' to version ^1.2.49
- Updated 'devDependencies > @git.zone/tstest' to version ^1.0.90
- Updated 'devDependencies > @push.rocks/tapbundle' to version ^5.0.23
- Updated 'devDependencies > @types/node' to version ^20.14.8
## 2024-06-19 - 4.0.59 - core
Fixes and updates to core functionalities.
- Multiple updates and fixes applied to the core codebase
## 2024-06-17 - 4.0.59 to 4.0.56 - core
Routine updates and fixes to the core.
- Multiple core updates and fixes
## 2024-06-08 - 4.0.54 - core
Core fixes applied.
- Various fixes in the core functionality
## 2024-04-17 - 4.0.53 - core
Core functionality updated with fixes.
- Updates and fixes to core features
## 2024-04-16 - 4.0.52 - documentation
Documentation update.
- Documentation improved and updated
## 2024-02-17 - 4.0.51 - core
Fixes for core applied.
- Multiple core fixes implemented
## 2024-02-10 - 4.0.48 - core
Routine core updates and fixes.
- Several updates and fixes for core functionality
## 2023-10-15 - 4.0.46 - core
Core updates.
- Core functionalities updated and fixes applied
## 2023-10-13 - 4.0.44 - core
Routine fixes for core functionalities.
- Various updates to core functionalities
## 2023-09-13 - 4.0.43 - core
Core updates and fixes.
- Several core updates and fixes
## 2023-05-08 - 4.0.41 - core
Core updates.
- Core functionalities updated
## 2023-05-06 - 4.0.39 - core
Core updates and fixes.
- Multiple core updates and fixes
## 2023-04-19 - 4.0.37 - core
Routine core updates.
- Core fixes and updates applied
## 2023-04-05 - 4.0.35 - core
Core functionalities updated.
- Core functionalities updated and fixes applied
## 2023-03-14 - 4.0.33 - core
Routine core fixes and updates.
- Core functionalities updated
## 2023-03-09 - 4.0.32 - core
Routine maintenance for core.
- Core updates and fixes
## 2023-02-15 - 4.0.31 - core
Core updates applied.
- Fixes and updates to core functionalities
## 2023-02-06 - 4.0.30 - core
Routine fixes.
- Multiple core updates and fixes
## 2023-01-12 - 4.0.29 - core
Core updates applied.
- Fixes and updates to core functionalities
## 2022-11-20 - 4.0.27 - core
Routine core fixes.
- Core functionalities updated and fixed
## 2022-10-31 - 4.0.26 - core
Routine maintenance and fixes.
- Core functionalities updated
## 2022-10-24 - 4.0.24 - business.IContract
Added business logic for contracts.
- Added IContract logic to business module
## 2022-09-14 - 4.0.21 - core
Routine core updates and fixes.
- Core functionalities updated and fixed
## 2022-08-17 - 4.0.18 - core
Routine maintenance for core.
- Core functionalities updated and fixes applied
## 2022-06-16 - 4.0.17 - core
Routine fixes.
- Core functionalities updated
## 2022-04-28 - 4.0.0 - core
Major update with significant core changes.
- Switch to ESM format
- Multiple core functionalities updated and fixed

View File

View File

@ -6,12 +6,30 @@
"gitzone": {
"projectType": "npm",
"module": {
"githost": "gitlab.com",
"githost": "code.foss.global",
"gitscope": "tsclass",
"gitrepo": "tsclass",
"shortDescription": "common classes for TypeScript",
"description": "Provides TypeScript definitions for various business, financial, networking, content, and other common classes.",
"npmPackagename": "@tsclass/tsclass",
"license": "MIT"
"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"
}
}

11192
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,13 +1,15 @@
{
"name": "@tsclass/tsclass",
"version": "3.0.31",
"version": "4.0.61",
"private": false,
"description": "common classes for TypeScript",
"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": "tstest test/",
"build": "(tsbuild --web)"
"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",
@ -24,15 +37,14 @@
},
"homepage": "https://github.com/tsclass/tsclass#readme",
"dependencies": {
"@pushrocks/tapbundle": "^3.2.9",
"type-fest": "^0.16.0"
"type-fest": "^4.20.1"
},
"devDependencies": {
"@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"
"@git.zone/tsbuild": "^2.1.82",
"@git.zone/tsrun": "^1.2.49",
"@git.zone/tstest": "^1.0.90",
"@push.rocks/tapbundle": "^5.0.23",
"@types/node": "^20.14.8"
},
"files": [
"ts/**/*",

6620
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

1
readme.hints.md Normal file
View File

@ -0,0 +1 @@

164
readme.md
View File

@ -1,68 +1,144 @@
# @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/)
## Install
## Status for master
To install `@tsclass/tsclass`, run the following command in your project directory:
Status Category | Status Badge
-- | --
GitLab Pipelines | [![pipeline status](https://gitlab.com/tsclass/tsclass/badges/master/pipeline.svg)](https://lossless.cloud)
GitLab Pipline Test Coverage | [![coverage report](https://gitlab.com/tsclass/tsclass/badges/master/coverage.svg)](https://lossless.cloud)
npm | [![npm downloads per month](https://badgen.net/npm/dy/@tsclass/tsclass)](https://lossless.cloud)
Snyk | [![Known Vulnerabilities](https://badgen.net/snyk/tsclass/tsclass)](https://lossless.cloud)
TypeScript Support | [![TypeScript](https://badgen.net/badge/TypeScript/>=%203.x/blue?icon=typescript)](https://lossless.cloud)
node Support | [![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
Code Style | [![Code Style](https://badgen.net/badge/style/prettier/purple)](https://lossless.cloud)
PackagePhobia (total standalone install weight) | [![PackagePhobia](https://badgen.net/packagephobia/install/@tsclass/tsclass)](https://lossless.cloud)
PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@tsclass/tsclass)](https://lossless.cloud)
BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@tsclass/tsclass)](https://lossless.cloud)
Platform support | [![Supports Windows 10](https://badgen.net/badge/supports%20Windows%2010/yes/green?icon=windows)](https://lossless.cloud) [![Supports Mac OS X](https://badgen.net/badge/supports%20Mac%20OS%20X/yes/green?icon=apple)](https://lossless.cloud)
```bash
npm install @tsclass/tsclass
```
This will add `@tsclass/tsclass` to your project's dependencies.
## Usage
Use TypeScript for best in class instellisense.
`@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.
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.
### Getting Started
```javascript
import { IInvoice } from 'tsclass';
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.
class myOwnInvoice implements IInvoice {
constructor() {
super(); // you need to call super() in the constructor
}
}
### Importing Classes and Interfaces
You can import classes and interfaces from `@tsclass/tsclass` as follows:
```typescript
import { business, finance, content } from '@tsclass/tsclass';
```
### Time/Date
### Business Domain
- Date
- Time
The business domain includes classes for managing contacts, companies, and projects. Here is how you can work with a company and contact classes:
### Publications/Websites/Blogs
```typescript
import { business } from '@tsclass/tsclass';
- Article
- Author
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'
};
### Finance
const exampleCompany: business.ICompany = {
name: 'Example Company',
foundedDate: {
day: 1,
month: 1,
year: 2020
},
status: 'active',
contact: companyContact
};
```
- Invoice
### Finance Domain
> The modules in bold letters exist as own modules and can be used seperately
The finance domain provides interfaces for working with invoices, transactions, and payment information. Heres how you can define an invoice:
## Contribution
```typescript
import { finance } from '@tsclass/tsclass';
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). :)
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
};
```
For further information read the linked docs at the top of this readme.
### Network Domain
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
Networking interfaces, such as those for managing SSH keys or network nodes, are available under the `network` namespace:
[![repo-footer](https://lossless.gitlab.io/publicrelations/repofooter.svg)](https://maintainedby.lossless.com)
```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.

View File

@ -1,6 +1,6 @@
import { tap, expect } from '@pushrocks/tapbundle';
import { tap, expect } from '@push.rocks/tapbundle';
import * as tsclass from '../ts/index';
import * as tsclass from '../ts/index.js';
tap.test('should assign a correct type', async () => {
let contact: tsclass.business.IContact;

8
ts/00_commitinfo_data.ts Normal file
View File

@ -0,0 +1,8 @@
/**
* autocreated commitinfo by @push.rocks/commitinfo
*/
export const commitinfo = {
name: '@tsclass/tsclass',
version: '4.0.61',
description: 'Provides TypeScript definitions for various business, financial, networking, content, and other common classes.'
}

View File

@ -0,0 +1,5 @@
import { type IInvoice } from "../finance/invoice.js";
export function createLetterFromInvoice(invoiceArg: IInvoice) {
}

View File

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

View File

@ -1 +1,2 @@
export * from './claim';
export * from './claim.js';
export * from './processedclaim.js';

View File

@ -1,4 +1,4 @@
import { IClaim } from './claim';
import { type IClaim } from './claim.js';
export interface IProcessedClaim {
originalJWT: string;

View File

@ -1,4 +1,4 @@
import { business, general } from '..';
import { business, general } from '../index.js';
/**
* describes a company's lifecycle state
@ -10,6 +10,9 @@ export type TCompanyStatus = 'planed' | 'founding' | 'active' | 'liquidation' |
*/
export interface ICompany {
name: string;
slogan?: string;
description?: string;
logoLink?: string;
foundedDate: general.IDate;
closedDate: general.IDate;
status: business.TCompanyStatus;

View File

@ -1,4 +1,5 @@
import { business } from '..';
import { finance } from '../index.js';
import { business } from '../index.js';
export type TContactSalutation = 'Mr' | 'Ms' | 'Mrs';
@ -33,5 +34,5 @@ export interface IContact {
// financial
// =========
vatId?: string;
bankAccountNumber?: string;
sepaConnection?: finance.ISepaConnection;
}

20
ts/business/contract.ts Normal file
View 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[];
}

View File

@ -1,4 +1,8 @@
export * from './address';
export * from './company';
export * from './contact';
export * from './person';
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
View 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
View 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
View File

@ -0,0 +1,8 @@
export interface IPdf {
name: string;
id: string;
metadata: {
textExtraction: string;
};
buffer: Uint8Array;
}

View File

@ -1,6 +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
View 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[];
}

5
ts/code/commitinfo.ts Normal file
View File

@ -0,0 +1,5 @@
export interface ICommitInfo {
name: string;
version: string;
description: string;
}

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

@ -0,0 +1,2 @@
export * from './commitinfo.js';
export * from './statusobject.js';

13
ts/code/statusobject.ts Normal file
View 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;
}>
}

View File

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

View File

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

View File

@ -1,16 +1,24 @@
import { content } from '..';
import { content } from '../index.js';
export interface IArticle {
/**
* 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;
/**
* the title of an article
*/

View File

@ -1,5 +1,8 @@
import { general, content } from '..';
import { general, content } from '../index.js';
/**
* answers the question "Who wrote that?"
*/
export interface IAuthor {
/**
* the first name of an author

View 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[];
}

View File

@ -1,2 +1,3 @@
export * from './article';
export * from './author';
export * from './article.js';
export * from './author.js';
export * from './documentationset.js';

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

@ -0,0 +1,4 @@
export * from './mongodescriptor.js';
export * from './objectaction.js';
export * from './objectstatus.js';
export * from './wrappeddata.js';

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

View File

@ -0,0 +1,8 @@
export interface IObjectAction {
timestamp: number;
name: string;
userId: string;
data: any;
message: string;
privateMessage: string;
}

View File

@ -0,0 +1,7 @@
export interface IObjectStatus {
current: 'active' | 'inactive' | 'hidden' | 'markedForDeletion';
scheduledDeletion: number;
justForLooks: {
scheduledDeletionIso: string;
};
}

View File

@ -0,0 +1,3 @@
export interface IWrappedData<T> {
data: T;
}

View File

@ -1,5 +1,5 @@
/**
* a constract event describes any kind of sale
* a contract event describes any kind of sale
*/
export interface IEvent_Contract {
contractId: string;

View File

@ -1,6 +1,6 @@
export * from './contractevent';
export * from './moneyevent';
export * from './releaseevent';
export * from './requestevent';
export * from './sessionevent';
export * from './userevent';
export * from './contractevent.js';
export * from './moneyevent.js';
export * from './releaseevent.js';
export * from './requestevent.js';
export * from './sessionevent.js';
export * from './userevent.js';

View File

@ -1,4 +1,4 @@
import { finance } from '../';
import { finance } from '../index.js';
export interface ICheckingAccount {
name: string;

View File

@ -1,4 +1,4 @@
import { business } from '../';
import { business } from '../index.js';
export interface IExpenseItem {
description: string;

View File

@ -1,5 +1,6 @@
export * from './checkingaccount';
export * from './currency';
export * from './expense';
export * from './invoice';
export * from './transaction';
export * from './checkingaccount.js';
export * from './currency.js';
export * from './expense.js';
export * from './invoice.js';
export * from './payment.js';
export * from './transaction.js';

View File

@ -1,19 +1,38 @@
import { business } 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;
netUnitPrice: number;
currency: 'EUR';
}
export interface IInvoice {
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
View 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;
}

View File

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

View File

@ -1,26 +1,39 @@
// Business
import * as business from './business';
import * as business from './business/index.js';
// Code
import * as code from './code/index.js';
// Container
import * as container from './container';
import * as container from './container/index.js';
// Database
import * as database from './database/index.js';
// Finance
import * as finance from './finance';
import * as finance from './finance/index.js';
// Content
import * as content from './content';
import * as content from './content/index.js';
// General
import * as general from './general';
import * as general from './general/index.js';
// Network
import * as network from './network';
import * as network from './network/index.js';
// SaaS
import * as saas from './saas';
import * as saas from './saas/index.js';
export { business, container, finance, content, general, network, saas };
// 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 { typeFest };
export { type typeFest, type typeFestOwn };

29
ts/network/cname.ts Normal file
View 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
View File

@ -0,0 +1,10 @@
export interface IDevice {
id: string;
resolutionWidth?: number;
resolutionHeight?: number;
dpi?: number;
manufacturer?: string;
name?: string;
ipv4?: string;
ipv6?: string;
}

View File

@ -1,16 +1,24 @@
export type TDnsRecordType =
| 'A'
| 'AAAA'
| 'CNAME'
| 'LOC'
| 'PTR'
| 'MX'
| 'NAPTR'
| 'NS'
| 'SOA'
| 'SPF'
| 'SRV'
| 'TXT';
| "A"
| "AAAA"
| "CNAME"
| "LOC"
| "PTR"
| "MX"
| "NAPTR"
| "NS"
| "SRV"
| "TXT"
| "CAA"
| "CERT"
| "DNSKEY"
| "DS"
| "HTTPS"
| "SMIMEA"
| "SSHFP"
| "SVCB"
| "TLSA"
| "URI";
export interface IDnsRecord {
name: string;

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

View File

@ -1,6 +1,11 @@
export * from './cert';
export * from './dns';
export * from './dnschallenge';
export * from './networknode';
export * from './request';
export * from './reverseproxy';
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
View File

@ -0,0 +1,4 @@
export interface IJwtKeypair {
privatePem: string;
publicPem: string;
}

5
ts/network/ssh.ts Normal file
View File

@ -0,0 +1,5 @@
export interface ISshKey {
keyName: string;
public: string;
private?: string;
}

View File

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

View File

@ -1 +1,14 @@
export interface IProduct {}
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;
}

View File

@ -1,4 +1,4 @@
import { IProduct } from './product';
import { type IProduct } from './product.js';
export interface ISubscriptionPlan {
name: string;

16
ts/storage/index.ts Normal file
View File

@ -0,0 +1,16 @@
export interface IS3Descriptor {
endpoint: string;
port?: number | string;
useSsl?: boolean;
accessKey: string;
accessSecret: string;
/**
* may be used to preselect a certain bucket
*/
bucketName?: string;
/**
* may be used to preselect a certain directory
*/
directoryPath?: string;
region?: string;
}

8
ts/typefest.own.ts Normal file
View 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
View File

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

5
ts/website/menuitem.ts Normal file
View 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
View File

@ -0,0 +1,14 @@
{
"compilerOptions": {
"experimentalDecorators": true,
"useDefineForClassFields": false,
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"esModuleInterop": true,
"verbatimModuleSyntax": true
},
"exclude": [
"dist_*/**/*.d.ts"
]
}

View File

@ -1,17 +0,0 @@
{
"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"
}