Compare commits
130 Commits
Author | SHA1 | Date | |
---|---|---|---|
f93daa90ae | |||
dfae08f3b1 | |||
7b419d4ed6 | |||
5d342bc43f | |||
9717989831 | |||
8cfaad2071 | |||
339c41c259 | |||
bf6b323df5 | |||
41e4dad65c | |||
572454e54f | |||
82b0325d7c | |||
12cddd99e0 | |||
1f798fc578 | |||
29f27d1a0c | |||
edb7690eb8 | |||
1a54bf5979 | |||
5dd087c16a | |||
4a79416d02 | |||
5bb38bc983 | |||
d2149daca9 | |||
5520ff6390 | |||
1c44e6a8f8 | |||
170163ec73 | |||
76a47f737f | |||
e4028e6ac1 | |||
dfee187404 | |||
065b5faba2 | |||
7ddc98d9c8 | |||
65503e554b | |||
9b66c438b4 | |||
0c977bd869 | |||
6d3f097bb8 | |||
d87b50fb45 | |||
4f72f484d0 | |||
7931d458c5 | |||
d5b21e6567 | |||
1ccafa8c87 | |||
850d56df8b | |||
dead451ab0 | |||
d7855494a7 | |||
0a12915c7e | |||
9a942cafa5 | |||
0292b4fef4 | |||
2d9d2a5a47 | |||
079e315b23 | |||
caf3e4766f | |||
50b5630aed | |||
a8776be6b8 | |||
4e173d4dd4 | |||
edcbdea31f | |||
6072974bda | |||
8883bf181e | |||
cd09a70232 | |||
e6811c75fc | |||
e0ba9c6cef | |||
90c56c6d4f | |||
91caa9a747 | |||
115250edab | |||
1127b8961f | |||
cc15835c8e | |||
300ac01629 | |||
a9a2f94f7e | |||
5e8473d16b | |||
6366b4f990 | |||
a3e147f946 | |||
1c6fc3666d | |||
891b0f0f10 | |||
96a31cbc71 | |||
450139682f | |||
741b361f4b | |||
cabd160fb2 | |||
12a9e231ae | |||
f9c7f90d73 | |||
6095e0ea5c | |||
63b2bd59a2 | |||
c4d13e6f8a | |||
f6bda9a20c | |||
4f1947d38a | |||
c59ad68771 | |||
4d0af19155 | |||
d06b82faaa | |||
c319415c76 | |||
75177cc097 | |||
85c4caa861 | |||
85ae355e2c | |||
09ea75ed5b | |||
58b3fbb03e | |||
89698b30f6 | |||
09eaa7ff3b | |||
806f28849f | |||
dd4ff90b3b | |||
cede9eaebf | |||
a25425f0ac | |||
54ad67c93e | |||
dba7193605 | |||
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 |
66
.gitea/workflows/default_nottags.yaml
Normal file
66
.gitea/workflows/default_nottags.yaml
Normal file
@ -0,0 +1,66 @@
|
||||
name: Default (not tags)
|
||||
|
||||
on:
|
||||
push:
|
||||
tags-ignore:
|
||||
- '**'
|
||||
|
||||
env:
|
||||
IMAGE: code.foss.global/host.today/ht-docker-node:npmci
|
||||
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@/${{gitea.repository}}.git
|
||||
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
|
||||
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
|
||||
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
|
||||
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
|
||||
|
||||
jobs:
|
||||
security:
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
container:
|
||||
image: ${{ env.IMAGE }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install pnpm and npmci
|
||||
run: |
|
||||
pnpm install -g pnpm
|
||||
pnpm install -g @ship.zone/npmci
|
||||
|
||||
- name: Run npm prepare
|
||||
run: npmci npm prepare
|
||||
|
||||
- name: Audit production dependencies
|
||||
run: |
|
||||
npmci command npm config set registry https://registry.npmjs.org
|
||||
npmci command pnpm audit --audit-level=high --prod
|
||||
continue-on-error: true
|
||||
|
||||
- name: Audit development dependencies
|
||||
run: |
|
||||
npmci command npm config set registry https://registry.npmjs.org
|
||||
npmci command pnpm audit --audit-level=high --dev
|
||||
continue-on-error: true
|
||||
|
||||
test:
|
||||
if: ${{ always() }}
|
||||
needs: security
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ${{ env.IMAGE }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Test stable
|
||||
run: |
|
||||
npmci node install stable
|
||||
npmci npm install
|
||||
npmci npm test
|
||||
|
||||
- name: Test build
|
||||
run: |
|
||||
npmci node install stable
|
||||
npmci npm install
|
||||
npmci npm build
|
124
.gitea/workflows/default_tags.yaml
Normal file
124
.gitea/workflows/default_tags.yaml
Normal file
@ -0,0 +1,124 @@
|
||||
name: Default (tags)
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
env:
|
||||
IMAGE: code.foss.global/host.today/ht-docker-node:npmci
|
||||
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@/${{gitea.repository}}.git
|
||||
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
|
||||
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
|
||||
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
|
||||
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
|
||||
|
||||
jobs:
|
||||
security:
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
container:
|
||||
image: ${{ env.IMAGE }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Prepare
|
||||
run: |
|
||||
pnpm install -g pnpm
|
||||
pnpm install -g @ship.zone/npmci
|
||||
npmci npm prepare
|
||||
|
||||
- name: Audit production dependencies
|
||||
run: |
|
||||
npmci command npm config set registry https://registry.npmjs.org
|
||||
npmci command pnpm audit --audit-level=high --prod
|
||||
continue-on-error: true
|
||||
|
||||
- name: Audit development dependencies
|
||||
run: |
|
||||
npmci command npm config set registry https://registry.npmjs.org
|
||||
npmci command pnpm audit --audit-level=high --dev
|
||||
continue-on-error: true
|
||||
|
||||
test:
|
||||
if: ${{ always() }}
|
||||
needs: security
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ${{ env.IMAGE }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Prepare
|
||||
run: |
|
||||
pnpm install -g pnpm
|
||||
pnpm install -g @ship.zone/npmci
|
||||
npmci npm prepare
|
||||
|
||||
- name: Test stable
|
||||
run: |
|
||||
npmci node install stable
|
||||
npmci npm install
|
||||
npmci npm test
|
||||
|
||||
- name: Test build
|
||||
run: |
|
||||
npmci node install stable
|
||||
npmci npm install
|
||||
npmci npm build
|
||||
|
||||
release:
|
||||
needs: test
|
||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ${{ env.IMAGE }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Prepare
|
||||
run: |
|
||||
pnpm install -g pnpm
|
||||
pnpm install -g @ship.zone/npmci
|
||||
npmci npm prepare
|
||||
|
||||
- name: Release
|
||||
run: |
|
||||
npmci node install stable
|
||||
npmci npm publish
|
||||
|
||||
metadata:
|
||||
needs: test
|
||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ${{ env.IMAGE }}
|
||||
continue-on-error: true
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Prepare
|
||||
run: |
|
||||
pnpm install -g pnpm
|
||||
pnpm install -g @ship.zone/npmci
|
||||
npmci npm prepare
|
||||
|
||||
- name: Code quality
|
||||
run: |
|
||||
npmci command npm install -g typescript
|
||||
npmci npm install
|
||||
|
||||
- name: Trigger
|
||||
run: npmci trigger
|
||||
|
||||
- name: Build docs and upload artifacts
|
||||
run: |
|
||||
npmci node install stable
|
||||
npmci npm install
|
||||
pnpm install -g @git.zone/tsdoc
|
||||
npmci command tsdoc
|
||||
continue-on-error: true
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -3,7 +3,6 @@
|
||||
# artifacts
|
||||
coverage/
|
||||
public/
|
||||
pages/
|
||||
|
||||
# installs
|
||||
node_modules/
|
||||
@ -17,4 +16,4 @@ node_modules/
|
||||
dist/
|
||||
dist_*/
|
||||
|
||||
# custom
|
||||
#------# custom
|
128
.gitlab-ci.yml
128
.gitlab-ci.yml
@ -1,128 +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
|
||||
|
||||
before_script:
|
||||
- pnpm install -g pnpm
|
||||
- pnpm install -g @shipzone/npmci
|
||||
- npmci npm prepare
|
||||
|
||||
# ====================
|
||||
# security stage
|
||||
# ====================
|
||||
# ====================
|
||||
# security stage
|
||||
# ====================
|
||||
auditProductionDependencies:
|
||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
stage: security
|
||||
script:
|
||||
- npmci command npm config set registry https://registry.npmjs.org
|
||||
- npmci command pnpm audit --audit-level=high --prod
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
allow_failure: true
|
||||
|
||||
auditDevDependencies:
|
||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
stage: security
|
||||
script:
|
||||
- npmci command npm config set registry https://registry.npmjs.org
|
||||
- npmci command pnpm audit --audit-level=high --dev
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
allow_failure: true
|
||||
|
||||
# ====================
|
||||
# test stage
|
||||
# ====================
|
||||
|
||||
testStable:
|
||||
stage: test
|
||||
script:
|
||||
- npmci node install stable
|
||||
- npmci npm install
|
||||
- npmci npm test
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- docker
|
||||
|
||||
testBuild:
|
||||
stage: test
|
||||
script:
|
||||
- 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 typescript
|
||||
- npmci npm prepare
|
||||
- npmci npm install
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- priv
|
||||
|
||||
trigger:
|
||||
stage: metadata
|
||||
script:
|
||||
- npmci trigger
|
||||
only:
|
||||
- tags
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
pages:
|
||||
stage: metadata
|
||||
script:
|
||||
- npmci node install stable
|
||||
- npmci npm install
|
||||
- npmci command npm run buildDocs
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
only:
|
||||
- tags
|
||||
artifacts:
|
||||
expire_in: 1 week
|
||||
paths:
|
||||
- public
|
||||
allow_failure: true
|
375
changelog.md
Normal file
375
changelog.md
Normal file
@ -0,0 +1,375 @@
|
||||
# Changelog
|
||||
|
||||
## 2025-04-29 - 9.1.0 - feat(network)
|
||||
Add DNS convenience interface to support ACME DNS-01 challenge management in the network module.
|
||||
|
||||
- Added IConvenientDnsProvider interface in ts/network/dnsconvenience.ts
|
||||
- Updated ts/network/index.ts to export the DNS convenience interface
|
||||
|
||||
## 2025-04-16 - 9.0.0 - BREAKING CHANGE(finance)
|
||||
refactor: migrate invoice APIs to unified accounting document types
|
||||
|
||||
- Introduced new accounting document types in ts/finance/accountingdoc.ts to standardize invoice, credit note, debit note, and self-billed invoice representations
|
||||
- Updated ts/finance/index.ts to export the new accounting document module
|
||||
- Removed the legacy ts/finance/invoice.ts module
|
||||
|
||||
## 2025-04-12 - 8.2.1 - fix(business/job)
|
||||
Refactor job interface to support expanded employment details and improve type safety
|
||||
|
||||
- Changed exported IJob from a class to an interface
|
||||
- Removed obsolete properties (monthlyTotal, currency)
|
||||
- Added new types for contract, work location, experience level, and job status
|
||||
- Introduced detailed fields: url, location, postedDate, salary, contractType, skillTags, qualificationTags, languages, and history
|
||||
|
||||
## 2025-04-04 - 8.2.0 - feat(finance/payment)
|
||||
Add optional 'description' field to payment option info.
|
||||
|
||||
- Enhanced the IPaymentOptionInfo interface in ts/finance/payment.ts by adding an optional 'description' property for improved context.
|
||||
|
||||
## 2025-03-26 - 8.1.1 - fix(business/letter)
|
||||
Remove extraneous inline comment from TLetter type union in business/letter.ts
|
||||
|
||||
- Clean up redundant comment to improve code clarity
|
||||
- Maintain consistency in type definitions
|
||||
|
||||
## 2025-03-26 - 8.1.0 - feat(business/letter)
|
||||
Extend TLetter to include invoice support and update dependency versions
|
||||
|
||||
- Bump type-fest to ^4.38.0 and @types/node to ^22.13.13 in package.json
|
||||
- Modify TLetter type in ts/business/letter.ts to support finance.TInvoice alongside simple letters
|
||||
|
||||
## 2025-03-25 - 8.0.4 - fix(license/business-letter)
|
||||
Remove legacy commented-out code from letter module and update copyright header
|
||||
|
||||
- Removed unused commented block in ts/business/letter.ts
|
||||
- Updated copyright header in license file
|
||||
|
||||
## 2025-03-24 - 8.0.3 - fix(ci)
|
||||
Add Gitea workflow files for CI/CD, update repository URLs, and standardize formatting
|
||||
|
||||
- Added .gitea/workflows/default_nottags.yaml and default_tags.yaml to manage CI for tagged and non-tagged pushes
|
||||
- Updated package.json repository, homepage, and bugs URLs to reflect the new code.foss.global location
|
||||
- Modified .gitignore custom section comment for clarity
|
||||
- Standardized code formatting and string quoting across various source files
|
||||
- Enhanced tsconfig.json by adding baseUrl and paths settings
|
||||
|
||||
## 2025-03-24 - 8.0.2 - fix(commitinfo)
|
||||
Refresh autogenerated commit info and internal metadata for version consistency
|
||||
|
||||
- No functional changes were made
|
||||
- Updated internal commit metadata to reflect the current project state
|
||||
|
||||
## 2025-03-24 - 8.0.1 - fix(documentation)
|
||||
Improve documentation clarity and update package metadata
|
||||
|
||||
- Correct author field in package.json to 'Task Venture Capital GmbH'
|
||||
- Enhance readme.md with comprehensive usage examples and detailed type structure for better guidance
|
||||
|
||||
## 2025-03-24 - 8.0.0 - BREAKING CHANGE(tsclass)
|
||||
Trigger patch release with no code changes
|
||||
|
||||
|
||||
## 2025-03-20 - 7.1.1 - fix(finance)
|
||||
Add optional date property to the IInvoice interface
|
||||
|
||||
- Introduced an optional 'date' field with explanatory comments to capture the invoice date if not provided from the encompassing letter
|
||||
|
||||
## 2025-03-20 - 7.1.0 - feat(ts/finance/invoice)
|
||||
Add electronicAddress field to IInvoice for circular xinvoice support
|
||||
|
||||
- Introduce optional electronicAddress property with scheme and value
|
||||
- Enhance documentation for buyer reference in invoice interface
|
||||
|
||||
## 2025-03-20 - 7.0.0 - BREAKING CHANGE(business/address)
|
||||
Remove eAddress property from IAddress interface
|
||||
|
||||
- Removed eAddress field that allowed storage of electronic contact means (phone, email, peppolId)
|
||||
|
||||
## 2025-03-20 - 6.1.2 - fix(business/address)
|
||||
Improve documentation comments for address interface properties
|
||||
|
||||
- Added detailed comments for the 'coordinates' property to explain its usage
|
||||
- Added detailed comments for the 'eAddress' property to describe the storage of electronic contact information
|
||||
|
||||
## 2025-03-20 - 6.1.1 - fix(finance)
|
||||
Add clarifying comment for the buyerReference field in the invoice interface
|
||||
|
||||
- Document buyerReference as an optional field to help buyers identify the invoice
|
||||
|
||||
## 2025-03-20 - 6.1.0 - feat(business/address)
|
||||
Add optional countryCode and coordinates properties to IAddress interface
|
||||
|
||||
- Extend address interface with an optional countryCode property
|
||||
- Add optional coordinates object with lat and lng for geographic metadata
|
||||
|
||||
## 2025-03-19 - 6.0.1 - fix(business)
|
||||
Remove exports for 'company' and 'person' modules from the business index
|
||||
|
||||
- Removed export statement for './company.js' in ts/business/index.ts
|
||||
- Removed export statement for './person.js' in ts/business/index.ts
|
||||
|
||||
## 2025-03-19 - 6.0.0 - BREAKING CHANGE(TContact)
|
||||
Reaffirm project metadata and documentation consistency
|
||||
|
||||
- Verified commitinfo data, package.json, and README content for correctness
|
||||
- No functional code changes were introduced
|
||||
|
||||
## 2025-03-11 - 5.0.0 - BREAKING CHANGE(network)
|
||||
Update reverse proxy configuration to support multiple destination IPs and ports
|
||||
|
||||
- Replaced 'destinationIp' and 'destinationPort' with 'destinationIps' (array) and 'destinationPorts' (array) to enable multiple destinations
|
||||
|
||||
## 2025-03-10 - 4.4.4 - fix(business)
|
||||
Fixes typo in ILetter interface
|
||||
|
||||
- Removed unused property 'letterData' from ILetter content structure.
|
||||
|
||||
## 2025-03-07 - 4.4.3 - fix(network)
|
||||
Fix destinationPort type for IReverseProxyConfig
|
||||
|
||||
- Corrected the type of destinationPort in IReverseProxyConfig from 'string' to 'number'.
|
||||
|
||||
## 2025-03-07 - 4.4.2 - fix(dependencies)
|
||||
Updated package dependencies for improved stability and performance.
|
||||
|
||||
- Updated 'type-fest' dependency to version ^4.37.0.
|
||||
- Updated '@git.zone/tsbuild' to version ^2.2.6.
|
||||
- Updated '@git.zone/tstest' to version ^1.0.96.
|
||||
- Updated '@push.rocks/tapbundle' to ^5.5.6.
|
||||
- Updated '@types/node' to ^22.13.9.
|
||||
|
||||
## 2025-03-07 - 4.4.1 - fix(business)
|
||||
Fix missing letterData property in ILetter interface.
|
||||
|
||||
- Added missing letterData property to the content structure of the ILetter interface.
|
||||
- Ensured consistency and completeness of ILetter interface for proper data handling of letter components.
|
||||
|
||||
## 2025-01-11 - 4.4.0 - feat(website)
|
||||
Add ILinkBlock interface for managing groups of links
|
||||
|
||||
- Introduced a new interface ILinkBlock in ts/website/linkblock.ts for managing grouped links.
|
||||
- Exported ILinkBlock from ts/website/index.ts to make it available for external usage.
|
||||
|
||||
## 2025-01-10 - 4.3.0 - feat(website)
|
||||
Added new ILink interface to the website module.
|
||||
|
||||
- Introduced ILink interface with properties like url, text, description, icon, and target.
|
||||
- Updated ts/website/index.ts to export the new link interface.
|
||||
|
||||
## 2024-12-11 - 4.2.0 - feat(dependencies)
|
||||
Update dependencies and enhance code documentation
|
||||
|
||||
- Updated 'type-fest' dependency from ^4.20.1 to ^4.30.0 for improved type definitions.
|
||||
- Updated development dependencies for better development experience.
|
||||
- Enhanced code documentation for the ICommitInfo interface with detailed JSDoc comments.
|
||||
|
||||
## 2024-07-26 - 4.1.2 - fix(finance)
|
||||
Updated IInvoice interface to support various currencies.
|
||||
|
||||
- Changed the 'currency' field in the IInvoice interface from fixed 'EUR' to type TCurrency.
|
||||
|
||||
## 2024-07-26 - 4.1.1 - fix(finance)
|
||||
Fix IInvoice interface to correctly include the currency field
|
||||
|
||||
- Corrected the IInvoice interface definition in `ts/finance/invoice.ts`
|
||||
- Moved `position` field to the top of the IInvoiceItem interface
|
||||
|
||||
## 2024-07-26 - 4.1.0 - feat(finance)
|
||||
Added notes field to IInvoice interface
|
||||
|
||||
- Expanded IInvoice interface to include notes field allowing additional notes for invoices.
|
||||
|
||||
## 2024-07-24 - 4.0.65 - fix(finance)
|
||||
Added 'type' property to IInvoice interface
|
||||
|
||||
- Added 'type' property to the IInvoice interface in the finance domain.
|
||||
- This property indicates whether the invoice is a 'creditnote' or 'debitnote'.
|
||||
|
||||
## 2024-07-18 - 4.0.64 - fix(business)
|
||||
Add relationship field to contact interface
|
||||
|
||||
- Added 'relationship' field to the IContact interface in ts/business/contact.ts
|
||||
|
||||
## 2024-06-28 - 4.0.63 - fix(saas)
|
||||
Refactor IProduct to separate IProductFeature interface
|
||||
|
||||
- Updated @types/node from 20.14.8 to 20.14.9
|
||||
- Refactored IProduct's features property to a standalone IProductFeature interface in saas/product.ts
|
||||
|
||||
## 2024-06-24 - 4.0.62 - fix(dependencies)
|
||||
Updated 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-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
|
2
license
2
license
@ -1,6 +1,6 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016
|
||||
Copyright (c) 2016 Task Venture Capital GmbH
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -6,12 +6,30 @@
|
||||
"gitzone": {
|
||||
"projectType": "npm",
|
||||
"module": {
|
||||
"githost": "gitlab.com",
|
||||
"githost": "code.foss.global",
|
||||
"gitscope": "tsclass",
|
||||
"gitrepo": "tsclass",
|
||||
"description": "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"
|
||||
}
|
||||
}
|
42
package.json
42
package.json
@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "@tsclass/tsclass",
|
||||
"version": "4.0.37",
|
||||
"version": "9.1.0",
|
||||
"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",
|
||||
@ -13,27 +13,38 @@
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/tsclass/tsclass.git"
|
||||
"url": "https://code.foss.global/tsclass/tsclass.git"
|
||||
},
|
||||
"keywords": [
|
||||
"TypeScript",
|
||||
"Classes"
|
||||
"Classes",
|
||||
"Interfaces",
|
||||
"Code Quality",
|
||||
"Networking",
|
||||
"Business",
|
||||
"Finance",
|
||||
"Content Management",
|
||||
"Containerization",
|
||||
"Database",
|
||||
"Event Management",
|
||||
"Authentication",
|
||||
"Web Development"
|
||||
],
|
||||
"author": "Lossless GmbH",
|
||||
"author": "Task Venture Capital GmbH",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/tsclass/tsclass/issues"
|
||||
"url": "https://code.foss.global/tsclass/tsclass/issues"
|
||||
},
|
||||
"homepage": "https://github.com/tsclass/tsclass#readme",
|
||||
"homepage": "https://code.foss.global/tsclass/tsclass#readme",
|
||||
"dependencies": {
|
||||
"type-fest": "^3.7.2"
|
||||
"type-fest": "^4.38.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.1.65",
|
||||
"@gitzone/tsrun": "^1.2.39",
|
||||
"@gitzone/tstest": "^1.0.74",
|
||||
"@pushrocks/tapbundle": "^5.0.4",
|
||||
"@types/node": "^18.15.11"
|
||||
"@git.zone/tsbuild": "^2.3.2",
|
||||
"@git.zone/tsrun": "^1.3.3",
|
||||
"@git.zone/tstest": "^1.0.96",
|
||||
"@push.rocks/tapbundle": "^5.6.0",
|
||||
"@types/node": "^22.13.13"
|
||||
},
|
||||
"files": [
|
||||
"ts/**/*",
|
||||
@ -49,5 +60,8 @@
|
||||
],
|
||||
"browserslist": [
|
||||
"last 1 chrome versions"
|
||||
]
|
||||
],
|
||||
"pnpm": {
|
||||
"overrides": {}
|
||||
}
|
||||
}
|
||||
|
12164
pnpm-lock.yaml
generated
12164
pnpm-lock.yaml
generated
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 @@
|
||||
|
186
readme.md
186
readme.md
@ -1,68 +1,154 @@
|
||||
# @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/)
|
||||
A comprehensive TypeScript library providing well-structured type definitions for various domains including business, finance, networking, content management, and more.
|
||||
|
||||
## Status for master
|
||||
## Installation
|
||||
|
||||
Status Category | Status Badge
|
||||
-- | --
|
||||
GitLab Pipelines | [](https://lossless.cloud)
|
||||
GitLab Pipline Test Coverage | [](https://lossless.cloud)
|
||||
npm | [](https://lossless.cloud)
|
||||
Snyk | [](https://lossless.cloud)
|
||||
TypeScript Support | [](https://lossless.cloud)
|
||||
node Support | [](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||
Code Style | [](https://lossless.cloud)
|
||||
PackagePhobia (total standalone install weight) | [](https://lossless.cloud)
|
||||
PackagePhobia (package size on registry) | [](https://lossless.cloud)
|
||||
BundlePhobia (total size when bundled) | [](https://lossless.cloud)
|
||||
Platform support | [](https://lossless.cloud) [](https://lossless.cloud)
|
||||
|
||||
## Usage
|
||||
|
||||
Use TypeScript for best in class instellisense.
|
||||
|
||||
tsclass exposes many commonly used objects as interface to implement (-> extends keyword) by individual implementations.
|
||||
They come complete with best in class intellisense and are easy to require.
|
||||
|
||||
```javascript
|
||||
import { IInvoice } from 'tsclass';
|
||||
|
||||
class myOwnInvoice implements IInvoice {
|
||||
constructor() {
|
||||
super(); // you need to call super() in the constructor
|
||||
}
|
||||
}
|
||||
```bash
|
||||
npm install @tsclass/tsclass
|
||||
```
|
||||
|
||||
### Time/Date
|
||||
## Overview
|
||||
|
||||
- Date
|
||||
- Time
|
||||
This library offers a rich collection of TypeScript interfaces and types designed to provide consistent structures for common business and development needs. It's organized into domain-specific modules to maintain clarity and separation of concerns.
|
||||
|
||||
### Publications/Websites/Blogs
|
||||
## Type Structure
|
||||
|
||||
- Article
|
||||
- Author
|
||||
### Authentication
|
||||
- **IClaim**: Authentication claims with user and role data
|
||||
- **IProcessedClaim**: Processed JWT claims with verification status
|
||||
|
||||
### Business
|
||||
- **TDocumentEnvelope**: Base type for all document types
|
||||
- **IAddress**: Physical/postal address structure
|
||||
- **TContact**: Person and company contact information
|
||||
- **TContractEnvelope**: Various contract types (Employment, NDA, Service, Lease)
|
||||
- **TLetterEnvelope**: Letter document types
|
||||
- **IPdf**: PDF document with metadata
|
||||
|
||||
### Finance
|
||||
- **TCurrency**: Currency representation
|
||||
- **TInvoiceEnvelope**: Invoice document structure
|
||||
- **TInvoiceItem**: Line items for invoices
|
||||
- **IPaymentOptionInfo**: Banking and payment method details
|
||||
|
||||
- Invoice
|
||||
### Network
|
||||
- **INetworkNode**: Network device representation
|
||||
- **ICert**: Certificate management
|
||||
- **IJWT**: JWT token structure
|
||||
- **IDnsChallenge**: DNS verification challenges
|
||||
|
||||
> The modules in bold letters exist as own modules and can be used seperately
|
||||
### Container
|
||||
- **IContainer**: Container configuration
|
||||
- **IVolumeMount**: Volume mount specification
|
||||
|
||||
## Contribution
|
||||
### Database
|
||||
- **IMongoDescriptor**: MongoDB connection details
|
||||
- **IObjectAction**: Document lifecycle tracking
|
||||
|
||||
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). :)
|
||||
### Content
|
||||
- **IArticle**: Content article structure
|
||||
- **IAuthor**: Content author metadata
|
||||
- **IDocumentationSet**: Documentation collections
|
||||
|
||||
For further information read the linked docs at the top of this readme.
|
||||
### Code
|
||||
- **ICommitInfo**: Code commit information
|
||||
- **IStatusObject**: Status tracking object
|
||||
|
||||
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
|
||||
### Website
|
||||
- **ILink**: Website link structure
|
||||
- **ILinkBlock**: Link collection
|
||||
- **IMenuItem**: Navigation menu items
|
||||
|
||||
[](https://maintainedby.lossless.com)
|
||||
### SaaS
|
||||
- **IProduct**: SaaS product definition
|
||||
- **ISubscriptionPlan**: Subscription plan details
|
||||
|
||||
## Usage Examples
|
||||
|
||||
### Business Contact
|
||||
|
||||
```typescript
|
||||
import { business } from '@tsclass/tsclass';
|
||||
|
||||
const companyContact: business.TCompany = {
|
||||
type: 'company',
|
||||
name: 'Example Company',
|
||||
address: {
|
||||
streetName: 'Main St',
|
||||
houseNumber: '123',
|
||||
postalCode: '12345',
|
||||
city: 'Example City',
|
||||
country: 'Exland'
|
||||
},
|
||||
email: 'contact@example.com',
|
||||
foundedDate: {
|
||||
day: 1,
|
||||
month: 1,
|
||||
year: 2020
|
||||
},
|
||||
status: 'active'
|
||||
};
|
||||
```
|
||||
|
||||
### Invoice
|
||||
|
||||
```typescript
|
||||
import { finance, business } from '@tsclass/tsclass';
|
||||
|
||||
const invoice: finance.TInvoiceEnvelope = {
|
||||
id: 'INV-2023-001',
|
||||
status: 'invoice',
|
||||
issueDate: {
|
||||
day: 15,
|
||||
month: 3,
|
||||
year: 2023
|
||||
},
|
||||
items: [
|
||||
{
|
||||
name: 'Consulting Services',
|
||||
unitType: 'hour',
|
||||
unitQuantity: 10,
|
||||
unitNetPrice: 150,
|
||||
vatPercentage: 20,
|
||||
currency: 'EUR'
|
||||
}
|
||||
],
|
||||
dueInDays: 30,
|
||||
billedBy: { /* company details */ },
|
||||
billedTo: { /* client details */ }
|
||||
};
|
||||
```
|
||||
|
||||
### Network Certificate
|
||||
|
||||
```typescript
|
||||
import { network } from '@tsclass/tsclass';
|
||||
|
||||
const certificate: network.ICert = {
|
||||
domain: 'example.com',
|
||||
validFrom: { day: 1, month: 1, year: 2023 },
|
||||
validTo: { day: 1, month: 1, year: 2024 },
|
||||
issuer: 'Let\'s Encrypt',
|
||||
certificateBody: '-----BEGIN CERTIFICATE-----\n...'
|
||||
};
|
||||
```
|
||||
|
||||
## 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.
|
@ -1,9 +1,9 @@
|
||||
import { tap, expect } from '@pushrocks/tapbundle';
|
||||
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;
|
||||
let contact: tsclass.business.TContact;
|
||||
});
|
||||
|
||||
tap.start();
|
||||
|
@ -1,8 +1,8 @@
|
||||
/**
|
||||
* autocreated commitinfo by @pushrocks/commitinfo
|
||||
* autocreated commitinfo by @push.rocks/commitinfo
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@tsclass/tsclass',
|
||||
version: '4.0.37',
|
||||
description: 'common classes for TypeScript'
|
||||
version: '9.1.0',
|
||||
description: 'Provides TypeScript definitions for various business, financial, networking, content, and other common classes.'
|
||||
}
|
||||
|
@ -1,5 +0,0 @@
|
||||
import { IInvoice } from "../finance/invoice.js";
|
||||
|
||||
export function createLetterFromInvoice(invoiceArg: IInvoice) {
|
||||
|
||||
}
|
@ -1 +0,0 @@
|
||||
export * from './finance.js';
|
@ -1,4 +1,4 @@
|
||||
import { IClaim } from './claim.js';
|
||||
import { type IClaim } from './claim.js';
|
||||
|
||||
export interface IProcessedClaim {
|
||||
originalJWT: string;
|
||||
|
@ -5,4 +5,13 @@ export interface IAddress {
|
||||
postalCode: string;
|
||||
city: string;
|
||||
country: string;
|
||||
countryCode?: string;
|
||||
/**
|
||||
* allows storage of coordinates for this address
|
||||
* useful for countries where addresses are not unique
|
||||
*/
|
||||
coordinates?: {
|
||||
lat: number;
|
||||
lng: number;
|
||||
};
|
||||
}
|
||||
|
@ -1,17 +0,0 @@
|
||||
import { business, general } from '../index.js';
|
||||
|
||||
/**
|
||||
* describes a company's lifecycle state
|
||||
*/
|
||||
export type TCompanyStatus = 'planed' | 'founding' | 'active' | 'liquidation' | 'closed';
|
||||
|
||||
/**
|
||||
* describes a company
|
||||
*/
|
||||
export interface ICompany {
|
||||
name: string;
|
||||
foundedDate: general.IDate;
|
||||
closedDate: general.IDate;
|
||||
status: business.TCompanyStatus;
|
||||
contact: business.IContact;
|
||||
}
|
@ -1,38 +1,84 @@
|
||||
import { finance } from '../index.js';
|
||||
import { business } from '../index.js';
|
||||
import { finance, general } from "../index.js";
|
||||
import { business } from "../index.js";
|
||||
|
||||
export type TContactSalutation = 'Mr' | 'Ms' | 'Mrs';
|
||||
export type TSocialLinks = {
|
||||
type: "facebook" | "twitter" | "linkedin" | string;
|
||||
url: string;
|
||||
};
|
||||
|
||||
export type TContactType = 'person' | 'company';
|
||||
export type TRegistrationDetails = {
|
||||
vatId: string;
|
||||
registrationId: string;
|
||||
registrationName: string;
|
||||
};
|
||||
|
||||
export type TContactTitle = 'Doctor' | 'Professor';
|
||||
|
||||
export interface IContact {
|
||||
// =======
|
||||
// general
|
||||
// =======
|
||||
salutation?: TContactSalutation;
|
||||
type: TContactType;
|
||||
title?: TContactTitle;
|
||||
type TContactEnvelope<TYPE extends string, FIELDS> = {
|
||||
type: TYPE;
|
||||
name: string;
|
||||
surname?: string;
|
||||
legalEntity?: string;
|
||||
address: business.IAddress;
|
||||
description: string;
|
||||
legalEntity?: string;
|
||||
customerNumber?: string;
|
||||
relationship?: "customer" | "supplier" | "partner" | "employee" | "other";
|
||||
|
||||
email?: string;
|
||||
|
||||
logoUrl?: string;
|
||||
website?: string;
|
||||
facebookUrl?: string;
|
||||
twitterUrl?: string;
|
||||
|
||||
phone?: string;
|
||||
fax?: string;
|
||||
|
||||
// =========
|
||||
// financial
|
||||
// =========
|
||||
vatId?: string;
|
||||
logoUrl?: string;
|
||||
website?: string;
|
||||
|
||||
socials?: TSocialLinks[];
|
||||
|
||||
sepaConnection?: finance.ISepaConnection;
|
||||
}
|
||||
} & FIELDS;
|
||||
|
||||
export type TPerson = TContactEnvelope<
|
||||
"person",
|
||||
{
|
||||
surname: string;
|
||||
salutation: "Mr" | "Ms" | "Mrs";
|
||||
sex: "male" | "female" | "other";
|
||||
title: "Doctor" | "Professor";
|
||||
registrationDetails?: TRegistrationDetails;
|
||||
legalProxyFor?: {
|
||||
type: "self" | "other";
|
||||
contact?: TContact;
|
||||
};
|
||||
}
|
||||
>;
|
||||
|
||||
type TCompanyInCreation = {
|
||||
status: "planned" | "founding";
|
||||
};
|
||||
|
||||
type TCompanyActive = {
|
||||
status: "active";
|
||||
foundedDate: general.IDate;
|
||||
};
|
||||
|
||||
type TCompanyInLiquidation = {
|
||||
status: "liquidation";
|
||||
foundedDate: general.IDate;
|
||||
liquidationDate: general.IDate;
|
||||
};
|
||||
|
||||
type TCompanyClosed = {
|
||||
status: "closed";
|
||||
foundedDate: general.IDate;
|
||||
liquidationDate: general.IDate;
|
||||
closedDate: general.IDate;
|
||||
};
|
||||
|
||||
type TCompanyStatus =
|
||||
| TCompanyInCreation
|
||||
| TCompanyActive
|
||||
| TCompanyInLiquidation
|
||||
| TCompanyClosed;
|
||||
|
||||
export type TCompany = TContactEnvelope<
|
||||
"company",
|
||||
{ registrationDetails: TRegistrationDetails } & TCompanyStatus
|
||||
>;
|
||||
|
||||
export type TContact = TPerson | TCompany;
|
||||
|
@ -1,20 +1,157 @@
|
||||
import * as database from '../database/index.js';
|
||||
import { IPerson } from './person.js';
|
||||
import * as database from "../database/index.js";
|
||||
import { business } from "../index.js";
|
||||
|
||||
export interface IContract {
|
||||
parties: {
|
||||
signingOrder: number;
|
||||
referencedAs: string;
|
||||
person: IPerson;
|
||||
role: 'signer' | 'cc';
|
||||
signature: {
|
||||
given: boolean;
|
||||
timestamp?: number;
|
||||
/**
|
||||
* Represents a paragraph or section in a contract.
|
||||
*/
|
||||
export type TContractParagraph = {
|
||||
id: string;
|
||||
title?: string;
|
||||
content: string; // Markdown formatted text
|
||||
order: number;
|
||||
type: "heading" | "clause" | "subclause" | "definition" | "exhibit";
|
||||
isRequired: boolean;
|
||||
metadata?: {
|
||||
applicableJurisdictions?: string[];
|
||||
tags?: string[];
|
||||
lastModified?: number;
|
||||
versionId?: string;
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Contract party with signature information.
|
||||
*/
|
||||
export type TContractParty = {
|
||||
signingOrder: number;
|
||||
referencedAs: string;
|
||||
person: business.TPerson;
|
||||
role: "signer" | "cc" | "witness";
|
||||
signature: {
|
||||
given: boolean;
|
||||
timestamp?: number;
|
||||
location?: string;
|
||||
ip?: string;
|
||||
verifications?: any[];
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Contract attachment like exhibits, appendices.
|
||||
*/
|
||||
export type TContractAttachment = {
|
||||
id: string;
|
||||
title: string;
|
||||
type: "exhibit" | "appendix" | "schedule";
|
||||
fileReference?: string;
|
||||
content?: string; // Markdown or reference
|
||||
};
|
||||
|
||||
/**
|
||||
* Base envelope type for all contract types, extending the common document type.
|
||||
*/
|
||||
export type TContractEnvelope<TYPE extends string, FIELDS> = business.TDocumentEnvelope<
|
||||
TYPE,
|
||||
{
|
||||
// Contract-specific dates
|
||||
effectiveDate: number;
|
||||
expirationDate?: number;
|
||||
|
||||
// Contract-specific status
|
||||
status: "draft" | "negotiation" | "active" | "expired" | "terminated" | "renewed";
|
||||
|
||||
// Parties (multiple, without sender/recipient distinction)
|
||||
parties: TContractParty[];
|
||||
|
||||
// Structured content
|
||||
paragraphs: TContractParagraph[];
|
||||
|
||||
// Additional attachments
|
||||
attachments?: TContractAttachment[];
|
||||
} & FIELDS
|
||||
>;
|
||||
|
||||
/**
|
||||
* Employment contract specific type.
|
||||
*/
|
||||
export type TEmploymentContract = TContractEnvelope<
|
||||
"employment",
|
||||
{
|
||||
employmentTerms: {
|
||||
startDate: number;
|
||||
position: string;
|
||||
compensationDetails: string;
|
||||
workingHours?: string;
|
||||
location?: string;
|
||||
ip?: string;
|
||||
verifications?: [];
|
||||
probationPeriod?: {
|
||||
durationInMonths: number;
|
||||
terms?: string;
|
||||
};
|
||||
};
|
||||
}[];
|
||||
contractTextMarkdown: string;
|
||||
actions: database.IObjectAction[];
|
||||
}
|
||||
}
|
||||
>;
|
||||
|
||||
/**
|
||||
* Non-disclosure agreement specific type.
|
||||
*/
|
||||
export type TNDAContract = TContractEnvelope<
|
||||
"nda",
|
||||
{
|
||||
confidentialityTerms: {
|
||||
duration: number; // In months
|
||||
scope: string;
|
||||
exclusions?: string[];
|
||||
};
|
||||
}
|
||||
>;
|
||||
|
||||
/**
|
||||
* Service agreement specific type.
|
||||
*/
|
||||
export type TServiceContract = TContractEnvelope<
|
||||
"service",
|
||||
{
|
||||
serviceTerms: {
|
||||
scope: string;
|
||||
deliverables: string[];
|
||||
timeline?: {
|
||||
milestones: {
|
||||
description: string;
|
||||
dueDate: number;
|
||||
}[];
|
||||
};
|
||||
paymentTerms: string;
|
||||
};
|
||||
}
|
||||
>;
|
||||
|
||||
/**
|
||||
* Real estate lease agreement specific type.
|
||||
*/
|
||||
export type TLeaseContract = TContractEnvelope<
|
||||
"lease",
|
||||
{
|
||||
propertyDetails: {
|
||||
address: business.IAddress;
|
||||
propertyType: string;
|
||||
areaSize?: number;
|
||||
areaSizeUnit?: string;
|
||||
};
|
||||
leaseTerms: {
|
||||
rentAmount: number;
|
||||
rentCurrency: string;
|
||||
paymentFrequency: "monthly" | "quarterly" | "annually";
|
||||
depositAmount?: number;
|
||||
utilities?: string[];
|
||||
};
|
||||
}
|
||||
>;
|
||||
|
||||
/**
|
||||
* Union type for all contract types.
|
||||
*/
|
||||
export type TContract =
|
||||
| TEmploymentContract
|
||||
| TNDAContract
|
||||
| TServiceContract
|
||||
| TLeaseContract;
|
||||
|
107
ts/business/document.ts
Normal file
107
ts/business/document.ts
Normal file
@ -0,0 +1,107 @@
|
||||
import * as database from "../database/index.js";
|
||||
import * as business from "./index.js";
|
||||
|
||||
/**
|
||||
* Base type for common document properties across different document types.
|
||||
*/
|
||||
export type TDocumentEnvelope<TYPE extends string, FIELDS> = {
|
||||
/**
|
||||
* Document type identifier
|
||||
*/
|
||||
type: TYPE;
|
||||
|
||||
/**
|
||||
* Unique identifier for the document
|
||||
*/
|
||||
id: string;
|
||||
|
||||
/**
|
||||
* Document creation/issuance date as a Unix timestamp
|
||||
*/
|
||||
date: number;
|
||||
|
||||
/**
|
||||
* Document status in its lifecycle
|
||||
*/
|
||||
status: string;
|
||||
|
||||
/**
|
||||
* Version information for the document
|
||||
*/
|
||||
versionInfo: {
|
||||
/**
|
||||
* Should follow semVer format
|
||||
*/
|
||||
version: string;
|
||||
|
||||
/**
|
||||
* Type of version (draft vs final)
|
||||
*/
|
||||
type: "draft" | "final";
|
||||
|
||||
/**
|
||||
* When this version was last modified
|
||||
*/
|
||||
lastModified?: number;
|
||||
|
||||
/**
|
||||
* Version history for tracking changes
|
||||
*/
|
||||
history?: {
|
||||
version: string;
|
||||
modifiedAt: number;
|
||||
modifiedBy?: string;
|
||||
changeDescription?: string;
|
||||
}[];
|
||||
};
|
||||
|
||||
/**
|
||||
* Primary language of the document
|
||||
*/
|
||||
language: string;
|
||||
|
||||
/**
|
||||
* The text displayed at the top of the document, often a greeting or introduction
|
||||
*/
|
||||
topText?: string;
|
||||
|
||||
/**
|
||||
* The text displayed at the bottom of the document, often a signature or conclusion
|
||||
*/
|
||||
bottomText?: string;
|
||||
|
||||
/**
|
||||
* Formatting/branding information
|
||||
*/
|
||||
appearance?: {
|
||||
/**
|
||||
* URL to the logo to be displayed on the document
|
||||
*/
|
||||
logoUrl?: string;
|
||||
|
||||
/**
|
||||
* Primary color for document styling
|
||||
*/
|
||||
accentColor?: string;
|
||||
|
||||
/**
|
||||
* Font family for the document
|
||||
*/
|
||||
fontFamily?: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* References to PDF versions of the document
|
||||
*/
|
||||
pdf?: business.IPdf;
|
||||
|
||||
/**
|
||||
* PDF attachments are additional PDFs attached to the document
|
||||
*/
|
||||
pdfAttachments?: business.IPdf[];
|
||||
|
||||
/**
|
||||
* Track document lifecycle actions
|
||||
*/
|
||||
objectActions?: database.IObjectAction[];
|
||||
} & FIELDS;
|
@ -1,8 +1,7 @@
|
||||
export * from './address.js';
|
||||
export * from './company.js';
|
||||
export * from './contact.js';
|
||||
export * from './document.js';
|
||||
export * from './job.js';
|
||||
export * from './letter.js';
|
||||
export * from './pdf.js';
|
||||
export * from './person.js';
|
||||
export * from './project.js';
|
||||
|
@ -1,12 +1,124 @@
|
||||
import * as finance from '../finance/index.js';
|
||||
import { ICompany } from './company.js';
|
||||
import { IContact } from './contact.js';
|
||||
export class IJob {
|
||||
type: 'contract' | 'employment';
|
||||
import * as finance from "../finance/index.js";
|
||||
import { type TContact } from "./contact.js";
|
||||
|
||||
/**
|
||||
* Represents the type of employment contract
|
||||
*/
|
||||
export type TContractType =
|
||||
| 'full-time'
|
||||
| 'part-time'
|
||||
| 'contract'
|
||||
| 'freelance'
|
||||
| 'internship'
|
||||
| 'apprenticeship'
|
||||
| 'volunteer'
|
||||
| 'temporary'
|
||||
| 'seasonal';
|
||||
|
||||
/**
|
||||
* Represents the work location arrangement
|
||||
*/
|
||||
export type TWorkLocationType =
|
||||
| 'on-site'
|
||||
| 'hybrid'
|
||||
| 'remote';
|
||||
|
||||
/**
|
||||
* Represents the experience level required for the job
|
||||
*/
|
||||
export type TExperienceLevel =
|
||||
| 'entry'
|
||||
| 'mid'
|
||||
| 'senior'
|
||||
| 'executive';
|
||||
|
||||
/**
|
||||
* Represents the status of a job posting
|
||||
*/
|
||||
export type TJobStatus =
|
||||
| 'active'
|
||||
| 'closed'
|
||||
| 'expired'
|
||||
| 'filled'
|
||||
| 'archived';
|
||||
|
||||
/**
|
||||
* Language proficiency levels
|
||||
*/
|
||||
export type TLanguageProficiency =
|
||||
| 'basic'
|
||||
| 'intermediate'
|
||||
| 'advanced'
|
||||
| 'native';
|
||||
|
||||
/**
|
||||
* Represents a language requirement with name and proficiency level
|
||||
*/
|
||||
export interface ILanguageRequirement {
|
||||
name: string;
|
||||
level: TLanguageProficiency;
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents salary information with structure if needed
|
||||
*/
|
||||
export interface ISalaryInfo {
|
||||
min?: number;
|
||||
max?: number;
|
||||
currency?: finance.TCurrency;
|
||||
period?: 'hourly' | 'daily' | 'weekly' | 'monthly' | 'annually';
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents a record in the job history
|
||||
*/
|
||||
export interface IJobHistory {
|
||||
timestamp: string;
|
||||
source: string;
|
||||
category?: string;
|
||||
action?: string;
|
||||
details?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Universal Job Interface representing a job posting
|
||||
*/
|
||||
export interface IJob {
|
||||
// Core job information
|
||||
id: string;
|
||||
title: string;
|
||||
company: string;
|
||||
description: string;
|
||||
monthlyTotal: number;
|
||||
currency: finance.TCurrency;
|
||||
from: ICompany;
|
||||
contact: IContact;
|
||||
url: string;
|
||||
|
||||
// Location information
|
||||
location: string;
|
||||
locationType?: TWorkLocationType;
|
||||
|
||||
// Dates
|
||||
postedDate?: string;
|
||||
|
||||
// Compensation
|
||||
salary?: ISalaryInfo;
|
||||
|
||||
// Classification
|
||||
contractType?: TContractType;
|
||||
category?: string;
|
||||
experienceLevel?: TExperienceLevel;
|
||||
|
||||
// Skills and requirements
|
||||
skillTags?: string[];
|
||||
qualificationTags?: string[];
|
||||
languages?: ILanguageRequirement[];
|
||||
|
||||
// Contact information
|
||||
from?: TContact;
|
||||
contact?: TContact;
|
||||
|
||||
// Metadata
|
||||
source: string;
|
||||
status: TJobStatus;
|
||||
firstScrapedAt: string;
|
||||
lastScrapedAt: string;
|
||||
history: IJobHistory[];
|
||||
}
|
@ -1,28 +1,54 @@
|
||||
import * as business from './index.js';
|
||||
import * as finance from '../finance/index.js';
|
||||
import * as database from '../database/index.js';
|
||||
export interface ILetter {
|
||||
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;
|
||||
import * as business from "./index.js";
|
||||
import * as finance from "../finance/index.js";
|
||||
|
||||
/**
|
||||
* Letter-specific envelope extending the base document type
|
||||
*/
|
||||
export type TLetterEnvelope<TYPE extends string, FIELDS> = business.TDocumentEnvelope<
|
||||
TYPE,
|
||||
{
|
||||
/**
|
||||
* The incident or case ID this letter relates to
|
||||
*/
|
||||
incidenceId: string;
|
||||
|
||||
/**
|
||||
* The sender of the letter
|
||||
*/
|
||||
from: business.TContact;
|
||||
|
||||
/**
|
||||
* The recipient of the letter
|
||||
*/
|
||||
to: business.TContact;
|
||||
|
||||
/**
|
||||
* The legal contact is the contact that is responsible for the letter
|
||||
* this is often the same as the from contact, but not always
|
||||
*/
|
||||
legalContact?: business.TContact;
|
||||
|
||||
/**
|
||||
* Subject line of the letter
|
||||
*/
|
||||
subject: string;
|
||||
|
||||
/**
|
||||
* Cover sheet configuration for the letter
|
||||
*/
|
||||
coverSheet?: {
|
||||
enabled: boolean;
|
||||
coverSheetText: string;
|
||||
/**
|
||||
* if true, the cover sheet will be marked as confidential
|
||||
* hinting that only authorized persons should handle the letter
|
||||
*/
|
||||
confidential: boolean;
|
||||
};
|
||||
timesheetData: string;
|
||||
}
|
||||
pdf?: business.IPdf;
|
||||
pdfAttachments: business.IPdf[];
|
||||
language: string;
|
||||
objectActions: database.IObjectAction[];
|
||||
}
|
||||
} & FIELDS
|
||||
>;
|
||||
|
||||
export type TLetterSimple = TLetterEnvelope<"simple", {}>;
|
||||
|
||||
|
||||
export type TLetter = TLetterSimple | finance.TInvoice
|
||||
|
@ -4,5 +4,5 @@ export interface IPdf {
|
||||
metadata: {
|
||||
textExtraction: string;
|
||||
};
|
||||
buffer: ArrayBufferLike;
|
||||
buffer: Uint8Array;
|
||||
}
|
||||
|
@ -1,12 +0,0 @@
|
||||
import { IContact } from './contact.js';
|
||||
|
||||
export interface IPerson {
|
||||
title: string;
|
||||
name: string;
|
||||
surname: string;
|
||||
sex: 'male' | 'female' | 'queer';
|
||||
legalProxyFor?: {
|
||||
type: 'self' | 'other';
|
||||
contact?: IContact;
|
||||
};
|
||||
}
|
@ -1,5 +1,20 @@
|
||||
export interface ICommitInfo {
|
||||
/**
|
||||
* the name of the project
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* the current version of the project
|
||||
*/
|
||||
version: string;
|
||||
|
||||
/**
|
||||
* the description of the project
|
||||
*/
|
||||
description: string;
|
||||
|
||||
/**
|
||||
* the changelog of the project
|
||||
*/
|
||||
changelog?: string[];
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { IArticle } from './article.js';
|
||||
import { type IArticle } from './article.js';
|
||||
|
||||
/**
|
||||
* a set of articles that together form a body of documentation
|
||||
|
206
ts/finance/accountingdoc.ts
Normal file
206
ts/finance/accountingdoc.ts
Normal file
@ -0,0 +1,206 @@
|
||||
import { business, finance } from '../index.js';
|
||||
import type { TCurrency } from './currency.js';
|
||||
|
||||
/**
|
||||
* Status of an accounting document
|
||||
*
|
||||
* draft: Document is in preparation (Entwurf)
|
||||
* issued: Document has been issued/sent (Ausgestellt)
|
||||
* paid: Document has been paid (Bezahlt)
|
||||
* canceled: Document has been canceled (Storniert)
|
||||
* refunded: Payment has been refunded (Erstattet)
|
||||
*/
|
||||
export type TAccountingDocStatus = 'draft' | 'issued' | 'paid' | 'canceled' | 'refunded';
|
||||
|
||||
/**
|
||||
* Type of accounting document
|
||||
*
|
||||
* invoice: Standard invoice (Rechnung)
|
||||
* creditnote: Credit note (Gutschrift als Rechnungskorrektur)
|
||||
* debitnote: Debit note (Lastschrift/Belastungsanzeige)
|
||||
* self-billed-invoice: Self-billed invoice (Gutschrift im Gutschriftverfahren)
|
||||
*/
|
||||
export type TAccountingDocType = 'invoice' | 'creditnote' | 'debitnote' | 'self-billed-invoice';
|
||||
|
||||
/**
|
||||
* Item in an accounting document
|
||||
* (Position in einer Rechnung/Gutschrift/Lastschrift)
|
||||
*/
|
||||
export type TAccountingDocItem = {
|
||||
position: number;
|
||||
name: string;
|
||||
articleNumber?: string;
|
||||
unitType: string;
|
||||
unitQuantity: number;
|
||||
unitNetPrice: number;
|
||||
vatPercentage: number;
|
||||
};
|
||||
|
||||
/**
|
||||
* Reference to a related document
|
||||
* (Referenz zu einem zugehörigen Dokument)
|
||||
*/
|
||||
export type TRelatedDocument = {
|
||||
/**
|
||||
* Type of relationship
|
||||
* (Art der Beziehung)
|
||||
*/
|
||||
relationType: 'corrects' | 'replaces' | 'references';
|
||||
|
||||
/**
|
||||
* ID of the related document
|
||||
* (ID des zugehörigen Dokuments)
|
||||
*/
|
||||
documentId: string;
|
||||
|
||||
/**
|
||||
* Issue date of the related document
|
||||
* (Ausstellungsdatum des zugehörigen Dokuments)
|
||||
*/
|
||||
issueDate?: number;
|
||||
};
|
||||
|
||||
/**
|
||||
* Base type for all accounting documents (Basis-Typ für alle Buchungsdokumente)
|
||||
*/
|
||||
export type TAccountingDocEnvelope<
|
||||
TYPE extends TAccountingDocType,
|
||||
FIELDS,
|
||||
> = business.TLetterEnvelope<
|
||||
'accounting-doc',
|
||||
{
|
||||
/**
|
||||
* Unique identifier of the accounting document
|
||||
* (Eindeutige Kennung des Buchungsdokuments)
|
||||
*/
|
||||
accountingDocId: string;
|
||||
|
||||
/**
|
||||
* Type of accounting document
|
||||
* (Art des Buchungsdokuments)
|
||||
*/
|
||||
accountingDocType: TYPE;
|
||||
|
||||
/**
|
||||
* Current status of the accounting document
|
||||
* (Aktueller Status des Buchungsdokuments)
|
||||
*/
|
||||
accountingDocStatus: TAccountingDocStatus;
|
||||
|
||||
/**
|
||||
* Line items of the accounting document
|
||||
* (Positionen des Buchungsdokuments)
|
||||
*/
|
||||
items: TAccountingDocItem[];
|
||||
|
||||
/**
|
||||
* Period of performance/service delivery
|
||||
* (Leistungszeitraum)
|
||||
*/
|
||||
periodOfPerformance?: {
|
||||
from: number;
|
||||
to: number;
|
||||
};
|
||||
|
||||
/**
|
||||
* Date of delivery or service completion
|
||||
* (Lieferdatum oder Leistungsdatum)
|
||||
*/
|
||||
deliveryDate?: number;
|
||||
|
||||
/**
|
||||
* Payment due in days after issue
|
||||
* (Zahlungsfrist in Tagen)
|
||||
*/
|
||||
dueInDays: number;
|
||||
|
||||
/**
|
||||
* Whether reverse charge applies (VAT liability shifted to recipient)
|
||||
* (Steuerschuldnerschaft des Leistungsempfängers)
|
||||
*/
|
||||
reverseCharge: boolean;
|
||||
|
||||
/**
|
||||
* Reference provided by the buyer to identify the document
|
||||
* (Referenz des Käufers zur Identifizierung des Dokuments)
|
||||
*/
|
||||
buyerReference?: string;
|
||||
|
||||
/**
|
||||
* Electronic address information, needed for CII/XRechnung support
|
||||
* (Elektronische Adressinformationen, benötigt für CII/XRechnung)
|
||||
*/
|
||||
electronicAddress?: {
|
||||
scheme: string;
|
||||
value: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* References to related documents (e.g., an invoice referenced by a credit note)
|
||||
* (Referenzen zu zugehörigen Dokumenten)
|
||||
*/
|
||||
relatedDocuments?: TRelatedDocument[];
|
||||
|
||||
/**
|
||||
* Result of document printing/generation
|
||||
* (Ergebnis der Dokumentenerstellung)
|
||||
*/
|
||||
printResult?: {
|
||||
pdfBufferString: string;
|
||||
totalNet: number;
|
||||
totalGross: number;
|
||||
vatGroups: {
|
||||
percentage: number;
|
||||
items: TAccountingDocItem[];
|
||||
}[];
|
||||
};
|
||||
|
||||
/**
|
||||
* Additional notes or comments
|
||||
* (Zusätzliche Anmerkungen oder Kommentare)
|
||||
*/
|
||||
notes: string[];
|
||||
|
||||
/**
|
||||
* Payment options information
|
||||
* (Zahlungsoptionen)
|
||||
*/
|
||||
paymentOptions?: finance.IPaymentOptionInfo;
|
||||
|
||||
/**
|
||||
* Currency used in the document
|
||||
* (Verwendete Währung)
|
||||
*/
|
||||
currency: TCurrency;
|
||||
} & FIELDS
|
||||
>;
|
||||
|
||||
/**
|
||||
* Credit Note - document reducing amount owed
|
||||
* (Gutschrift - Dokument zur Minderung einer Forderung)
|
||||
*/
|
||||
export type TCreditNote = TAccountingDocEnvelope<'creditnote', {}>;
|
||||
|
||||
/**
|
||||
* Debit Note - document increasing amount owed
|
||||
* (Lastschrift/Belastungsanzeige - Dokument zur Erhöhung einer Forderung)
|
||||
*/
|
||||
export type TDebitNote = TAccountingDocEnvelope<'debitnote', {}>;
|
||||
|
||||
/**
|
||||
* Standard Invoice
|
||||
* (Standardrechnung)
|
||||
*/
|
||||
export type TInvoice = TAccountingDocEnvelope<'invoice', {}>;
|
||||
|
||||
/**
|
||||
* Self-billed Invoice - invoice created by the buyer
|
||||
* (Gutschrift im Gutschriftverfahren - vom Käufer erstellte Rechnung)
|
||||
*/
|
||||
export type TSelfBilledInvoice = TAccountingDocEnvelope<'self-billed-invoice', {}>;
|
||||
|
||||
/**
|
||||
* Union type for all accounting document types
|
||||
* (Vereinigungstyp für alle Buchungsdokumentarten)
|
||||
*/
|
||||
export type TAccountingDoc = TCreditNote | TDebitNote | TInvoice | TSelfBilledInvoice;
|
@ -13,5 +13,5 @@ export interface IVoucher {
|
||||
date: Date;
|
||||
description: string;
|
||||
expenseItems: IExpenseItem[];
|
||||
contactRef: business.IContact;
|
||||
contactRef: business.TContact;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
export * from './checkingaccount.js';
|
||||
export * from './currency.js';
|
||||
export * from './expense.js';
|
||||
export * from './invoice.js';
|
||||
export * from './accountingdoc.js';
|
||||
export * from './payment.js';
|
||||
export * from './transaction.js';
|
||||
|
@ -1,38 +0,0 @@
|
||||
import { business, finance } from '../index.js';
|
||||
|
||||
export type TInvoiceStatus = 'draft' | 'invoice' | 'paid' | 'refunded';
|
||||
|
||||
export interface IInvoiceItem {
|
||||
name: string;
|
||||
articleNumber?: string;
|
||||
unitType: string;
|
||||
unitQuantity: number;
|
||||
unitNetPrice: number;
|
||||
vatPercentage: 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;
|
||||
}
|
@ -9,6 +9,7 @@ export interface IPayPalConnection {
|
||||
}
|
||||
|
||||
export interface IPaymentOptionInfo {
|
||||
description?: string;
|
||||
sepaConnection: ISepaConnection;
|
||||
payPal: IPayPalConnection;
|
||||
}
|
||||
|
20
ts/index.ts
20
ts/index.ts
@ -25,11 +25,27 @@ 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, website };
|
||||
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 };
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { ICert } from "./cert.js";
|
||||
import { type ICert } from './cert.js';
|
||||
|
||||
export class ICnameDescriptor {
|
||||
/**
|
||||
@ -26,4 +26,4 @@ export class ICnameDescriptor {
|
||||
* the ssl certificate
|
||||
*/
|
||||
sslCertificate?: ICert;
|
||||
};
|
||||
}
|
||||
|
@ -7,10 +7,18 @@ export type TDnsRecordType =
|
||||
| 'MX'
|
||||
| 'NAPTR'
|
||||
| 'NS'
|
||||
| 'SOA'
|
||||
| 'SPF'
|
||||
| 'SRV'
|
||||
| 'TXT';
|
||||
| 'TXT'
|
||||
| 'CAA'
|
||||
| 'CERT'
|
||||
| 'DNSKEY'
|
||||
| 'DS'
|
||||
| 'HTTPS'
|
||||
| 'SMIMEA'
|
||||
| 'SSHFP'
|
||||
| 'SVCB'
|
||||
| 'TLSA'
|
||||
| 'URI';
|
||||
|
||||
export interface IDnsRecord {
|
||||
name: string;
|
||||
|
20
ts/network/dnsconvenience.ts
Normal file
20
ts/network/dnsconvenience.ts
Normal file
@ -0,0 +1,20 @@
|
||||
import type { IDnsChallenge } from './dnschallenge.js'
|
||||
|
||||
export interface IConvenientDnsProvider {
|
||||
convenience: {
|
||||
/**
|
||||
* Create the TXT record for an ACME DNS-01 challenge.
|
||||
*/
|
||||
acmeSetDnsChallenge(dnsChallengeArg: IDnsChallenge): Promise<void>;
|
||||
|
||||
/**
|
||||
* Remove the TXT record for an ACME DNS-01 challenge.
|
||||
*/
|
||||
acmeRemoveDnsChallenge(dnsChallengeArg: IDnsChallenge): Promise<void>;
|
||||
|
||||
/**
|
||||
* Check whether this DNS provider can serve the given domain.
|
||||
*/
|
||||
isDomainSupported(domain: string): Promise<boolean>;
|
||||
};
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
export interface IDomainIdentifier {
|
||||
export interface IDomainDelegation {
|
||||
/**
|
||||
* only if it applis: the origininating url
|
||||
*/
|
||||
@ -15,8 +15,17 @@ export interface IDomainIdentifier {
|
||||
* 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;
|
||||
}
|
@ -3,7 +3,10 @@ export * from './cname.js';
|
||||
export * from './device.js';
|
||||
export * from './dns.js';
|
||||
export * from './dnschallenge.js';
|
||||
export * from './domainidentifier.js';
|
||||
export * from './dnsconvenience.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;
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
export interface IReverseProxyConfig {
|
||||
destinationIp: string;
|
||||
destinationPort: string;
|
||||
destinationIps: string[];
|
||||
destinationPorts: number[];
|
||||
hostName: string;
|
||||
privateKey: string;
|
||||
publicKey: 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;
|
||||
}
|
@ -1 +1,22 @@
|
||||
export interface IProduct {}
|
||||
import type { TCompany } from '../business/contact.js';
|
||||
|
||||
export interface IProduct {
|
||||
name: string;
|
||||
slogan: string;
|
||||
description: string;
|
||||
os: 'web-based';
|
||||
category: 'Business Application';
|
||||
offers: any[];
|
||||
features: IProductFeature[];
|
||||
landingPage: string;
|
||||
appLink: string;
|
||||
logoLink: string;
|
||||
publisher?: TCompany;
|
||||
}
|
||||
|
||||
export interface IProductFeature {
|
||||
heading: string;
|
||||
description: string;
|
||||
linkText: string;
|
||||
linkUrl: string;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { IProduct } from './product.js';
|
||||
import { type IProduct } from './product.js';
|
||||
|
||||
export interface ISubscriptionPlan {
|
||||
name: string;
|
||||
|
16
ts/storage/index.ts
Normal file
16
ts/storage/index.ts
Normal 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;
|
||||
}
|
5
ts/typefest.own.ts
Normal file
5
ts/typefest.own.ts
Normal file
@ -0,0 +1,5 @@
|
||||
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 +1,3 @@
|
||||
export * from './link.js';
|
||||
export * from './menuitem.js';
|
||||
export * from './linkblock.js';
|
||||
|
7
ts/website/link.ts
Normal file
7
ts/website/link.ts
Normal file
@ -0,0 +1,7 @@
|
||||
export interface ILink {
|
||||
url: string;
|
||||
text?: string;
|
||||
description?: string;
|
||||
icon?: string;
|
||||
target?: '_blank' | '_self' | '_parent' | '_top';
|
||||
}
|
6
ts/website/linkblock.ts
Normal file
6
ts/website/linkblock.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import type { ILink } from './link.js';
|
||||
|
||||
export interface ILinkBlock {
|
||||
title: string;
|
||||
links: ILink[];
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
export interface IMenuItem {
|
||||
export interface IMenuItem<T = any, U = any> {
|
||||
name: string;
|
||||
iconName?: string;
|
||||
action: <T = any>() => void | Promise<T>;
|
||||
action: (optionsArg?: T) => Promise<U>;
|
||||
}
|
||||
|
@ -3,7 +3,14 @@
|
||||
"experimentalDecorators": true,
|
||||
"useDefineForClassFields": false,
|
||||
"target": "ES2022",
|
||||
"module": "ES2022",
|
||||
"moduleResolution": "nodenext"
|
||||
}
|
||||
}
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"esModuleInterop": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
"baseUrl": ".",
|
||||
"paths": {}
|
||||
},
|
||||
"exclude": [
|
||||
"dist_*/**/*.d.ts"
|
||||
]
|
||||
}
|
Reference in New Issue
Block a user