Compare commits
73 Commits
Author | SHA1 | Date | |
---|---|---|---|
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 | |||
5c60875d46 | |||
0a5443c646 | |||
f38274e325 | |||
800123586e | |||
bf37575140 | |||
c7420aba79 | |||
3770b7dada | |||
5b00b5d7e9 | |||
e7d2eb5cab | |||
b38a59f91a | |||
f92abdfb4e | |||
8bc0506b60 | |||
8a690e5065 | |||
50b401db9b | |||
96e86993bf | |||
485ed3630d | |||
9a6ffcbc03 | |||
d39d9c2a86 | |||
3c67658a0e | |||
e9d4a1641f | |||
2cec65f8a0 | |||
d20073a2b0 | |||
4563ba2404 | |||
62eeeecfef | |||
c48c6a2d79 | |||
25d2bb077e | |||
fee1e3cb58 | |||
66732c5f81 |
@ -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"
|
||||
}
|
||||
}
|
28
package.json
28
package.json
@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "@tsclass/tsclass",
|
||||
"version": "4.0.23",
|
||||
"version": "4.0.59",
|
||||
"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",
|
||||
@ -17,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",
|
||||
@ -26,13 +37,14 @@
|
||||
},
|
||||
"homepage": "https://github.com/tsclass/tsclass#readme",
|
||||
"dependencies": {
|
||||
"type-fest": "^3.1.0"
|
||||
"type-fest": "^4.10.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.1.65",
|
||||
"@gitzone/tsrun": "^1.2.37",
|
||||
"@gitzone/tstest": "^1.0.73",
|
||||
"@pushrocks/tapbundle": "^5.0.4"
|
||||
"@git.zone/tsbuild": "^2.1.72",
|
||||
"@git.zone/tsrun": "^1.2.46",
|
||||
"@git.zone/tstest": "^1.0.86",
|
||||
"@push.rocks/tapbundle": "^5.0.15",
|
||||
"@types/node": "^20.11.17"
|
||||
},
|
||||
"files": [
|
||||
"ts/**/*",
|
||||
|
4800
pnpm-lock.yaml
generated
4800
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 @@
|
||||
|
164
readme.md
164
readme.md
@ -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 | [](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)
|
||||
```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. Here’s 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:
|
||||
|
||||
[](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.
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { tap, expect } from '@pushrocks/tapbundle';
|
||||
import { tap, expect } from '@push.rocks/tapbundle';
|
||||
|
||||
import * as tsclass from '../ts/index.js';
|
||||
|
||||
|
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@tsclass/tsclass',
|
||||
version: '4.0.23',
|
||||
description: 'common classes for TypeScript'
|
||||
version: '4.0.59',
|
||||
description: 'Provides TypeScript definitions for various business, financial, networking, content, and other common classes.'
|
||||
}
|
||||
|
5
ts/00helperfunctions.ts/finance.ts
Normal file
5
ts/00helperfunctions.ts/finance.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import { type IInvoice } from "../finance/invoice.js";
|
||||
|
||||
export function createLetterFromInvoice(invoiceArg: IInvoice) {
|
||||
|
||||
}
|
1
ts/00helperfunctions.ts/index.ts
Normal file
1
ts/00helperfunctions.ts/index.ts
Normal file
@ -0,0 +1 @@
|
||||
export * from './finance.js';
|
@ -1,4 +1,4 @@
|
||||
import { IClaim } from './claim.js';
|
||||
import { type IClaim } from './claim.js';
|
||||
|
||||
export interface IProcessedClaim {
|
||||
originalJWT: string;
|
||||
|
@ -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;
|
||||
|
20
ts/business/contract.ts
Normal file
20
ts/business/contract.ts
Normal file
@ -0,0 +1,20 @@
|
||||
import * as database from '../database/index.js';
|
||||
import { type IPerson } from './person.js';
|
||||
|
||||
export interface IContract {
|
||||
parties: {
|
||||
signingOrder: number;
|
||||
referencedAs: string;
|
||||
person: IPerson;
|
||||
role: 'signer' | 'cc';
|
||||
signature: {
|
||||
given: boolean;
|
||||
timestamp?: number;
|
||||
location?: string;
|
||||
ip?: string;
|
||||
verifications?: [];
|
||||
};
|
||||
}[];
|
||||
contractTextMarkdown: string;
|
||||
actions: database.IObjectAction[];
|
||||
}
|
@ -1,6 +1,8 @@
|
||||
export * from './address.js';
|
||||
export * from './company.js';
|
||||
export * from './contact.js';
|
||||
export * from './job.js';
|
||||
export * from './letter.js';
|
||||
export * from './pdf.js';
|
||||
export * from './person.js';
|
||||
export * from './project.js';
|
||||
|
18
ts/business/job.ts
Normal file
18
ts/business/job.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import * as finance from '../finance/index.js';
|
||||
import { type ICompany } from './company.js';
|
||||
import { type IContact } from './contact.js';
|
||||
export class IJob {
|
||||
type: 'contract' | 'employment';
|
||||
techTags?: string[];
|
||||
qualificationTags?: string[];
|
||||
languages?: {
|
||||
name: string;
|
||||
level: 'basic' | 'intermediate' | 'advanced' | 'native';
|
||||
}[];
|
||||
name: string;
|
||||
description: string;
|
||||
monthlyTotal: number;
|
||||
currency: finance.TCurrency;
|
||||
from: ICompany;
|
||||
contact: IContact;
|
||||
}
|
@ -1,8 +1,14 @@
|
||||
import * as business from './index.js';
|
||||
import * as finance from '../finance/index.js';
|
||||
import * as database from '../database/index.js';
|
||||
import type { TypedArray } from 'type-fest';
|
||||
export interface ILetter {
|
||||
versionInfo: {
|
||||
type: 'draft' | 'final';
|
||||
/**
|
||||
* should follow semVer
|
||||
*/
|
||||
version: string;
|
||||
};
|
||||
incidenceId: string;
|
||||
type: 'invoice' | 'notice' | 'warning' | 'verification' | 'contract';
|
||||
date: number;
|
||||
@ -11,15 +17,17 @@ export interface ILetter {
|
||||
legalContact: business.IContact;
|
||||
logoUrl: string;
|
||||
subject: string;
|
||||
text: string[];
|
||||
accentColor?: string;
|
||||
needsCoverSheet: boolean;
|
||||
invoiceData?: finance.IInvoice;
|
||||
contractData?: {
|
||||
id: string;
|
||||
contractDate: number;
|
||||
};
|
||||
timesheetData: string;
|
||||
content: {
|
||||
textData: string[];
|
||||
invoiceData?: finance.IInvoice;
|
||||
contractData?: {
|
||||
id: string;
|
||||
contractDate: number;
|
||||
};
|
||||
timesheetData: string;
|
||||
}
|
||||
pdf?: business.IPdf;
|
||||
pdfAttachments: business.IPdf[];
|
||||
language: string;
|
||||
|
@ -4,5 +4,5 @@ export interface IPdf {
|
||||
metadata: {
|
||||
textExtraction: string;
|
||||
};
|
||||
buffer: ArrayBufferLike;
|
||||
buffer: Uint8Array;
|
||||
}
|
||||
|
@ -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
18
ts/business/project.ts
Normal file
@ -0,0 +1,18 @@
|
||||
export interface IProject {
|
||||
active: boolean;
|
||||
category: 'SaaS' | 'IaaS' | 'Media' | 'Blockchain' | 'Open Source' | 'Consulting' | 'internal' | 'partner';
|
||||
branch?: null;
|
||||
branchId? : string;
|
||||
domain: string;
|
||||
redirectDomains: string[];
|
||||
gitlab: string;
|
||||
name: string;
|
||||
social: {
|
||||
facebook?: string;
|
||||
gitlab?: string;
|
||||
github?: string;
|
||||
twitter?: string;
|
||||
};
|
||||
tagLine: string;
|
||||
tags: string[];
|
||||
}
|
@ -1 +1,2 @@
|
||||
export * from './commitinfo.js';
|
||||
export * from './statusobject.js';
|
13
ts/code/statusobject.ts
Normal file
13
ts/code/statusobject.ts
Normal file
@ -0,0 +1,13 @@
|
||||
export type TStatus = 'ok' | 'partly_ok' | 'not_ok';
|
||||
export interface IStatusObject {
|
||||
id?: string;
|
||||
name: string;
|
||||
combinedStatus?: TStatus;
|
||||
combinedStatusText: string;
|
||||
details: Array<{
|
||||
name: string;
|
||||
value: string;
|
||||
status: TStatus;
|
||||
statusText: string;
|
||||
}>
|
||||
}
|
@ -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
|
||||
|
@ -1,3 +1,4 @@
|
||||
export * from './mongodescriptor.js';
|
||||
export * from './objectaction.js';
|
||||
export * from './objectstatus.js';
|
||||
export * from './wrappeddata.js';
|
||||
|
7
ts/database/objectstatus.ts
Normal file
7
ts/database/objectstatus.ts
Normal file
@ -0,0 +1,7 @@
|
||||
export interface IObjectStatus {
|
||||
current: 'active' | 'inactive' | 'hidden' | 'markedForDeletion';
|
||||
scheduledDeletion: number;
|
||||
justForLooks: {
|
||||
scheduledDeletionIso: string;
|
||||
};
|
||||
}
|
@ -25,11 +25,15 @@ 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 };
|
||||
|
29
ts/network/cname.ts
Normal file
29
ts/network/cname.ts
Normal file
@ -0,0 +1,29 @@
|
||||
import { type ICert } from "./cert.js";
|
||||
|
||||
export class ICnameDescriptor {
|
||||
/**
|
||||
* the original domain that is being cnamed
|
||||
*/
|
||||
cnamedDomain: string;
|
||||
|
||||
/**
|
||||
* the cname proxy domain
|
||||
* the domain that is used for the cname dns entry
|
||||
*/
|
||||
cnameProxyDomain: string;
|
||||
|
||||
/**
|
||||
* the internal target url
|
||||
*/
|
||||
targetUrl: string;
|
||||
|
||||
/**
|
||||
* a description
|
||||
*/
|
||||
description: string;
|
||||
|
||||
/**
|
||||
* the ssl certificate
|
||||
*/
|
||||
sslCertificate?: ICert;
|
||||
};
|
@ -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;
|
||||
|
31
ts/network/domaindelegation.ts
Normal file
31
ts/network/domaindelegation.ts
Normal file
@ -0,0 +1,31 @@
|
||||
export interface IDomainDelegation {
|
||||
/**
|
||||
* only if it applis: the origininating url
|
||||
*/
|
||||
fullUrl: string;
|
||||
/**
|
||||
* the full domain name
|
||||
*/
|
||||
fullDomain: string;
|
||||
/**
|
||||
* the domain, meaning whats usually considered a domain like google.com
|
||||
*/
|
||||
domain: string;
|
||||
/**
|
||||
* the public suffix, meaning whats usually considered a public suffix like .com
|
||||
*/
|
||||
publicSuffix: string;
|
||||
|
||||
/**
|
||||
* the domain without the public suffix
|
||||
*/
|
||||
domainWithoutSuffix: string;
|
||||
|
||||
/**
|
||||
* the subdomain, meaning whats usually considered a subdomain like www
|
||||
*/
|
||||
subdomain: string;
|
||||
|
||||
isIcann?: boolean;
|
||||
dnsSecEnabled?: boolean;
|
||||
}
|
@ -1,7 +1,11 @@
|
||||
export * from './cert.js';
|
||||
export * from './cname.js';
|
||||
export * from './device.js';
|
||||
export * from './dns.js';
|
||||
export * from './dnschallenge.js';
|
||||
export * from './domaindelegation.js';
|
||||
export * from './jwt.js';
|
||||
export * from './networknode.js';
|
||||
export * from './request.js';
|
||||
export * from './reverseproxy.js';
|
||||
export * from './ssh.js';
|
||||
|
4
ts/network/jwt.ts
Normal file
4
ts/network/jwt.ts
Normal file
@ -0,0 +1,4 @@
|
||||
export interface IJwtKeypair {
|
||||
privatePem: string;
|
||||
publicPem: string;
|
||||
}
|
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,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;
|
||||
}
|
@ -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;
|
||||
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
8
ts/typefest.own.ts
Normal file
@ -0,0 +1,8 @@
|
||||
type SecondArgument<T> = T extends (arg1: any, arg2: infer P, ...args: any[]) => any ? P : never;
|
||||
|
||||
type ValueType<T> = T extends { [key: string]: infer U } ? U : never;
|
||||
|
||||
export type {
|
||||
SecondArgument,
|
||||
ValueType
|
||||
}
|
@ -1,4 +1,5 @@
|
||||
export interface IMenuItem {
|
||||
export interface IMenuItem<T = any, U = any> {
|
||||
name: string;
|
||||
action: <T = any>() => void | Promise<T>;
|
||||
iconName?: string;
|
||||
action: (optionsArg?: T) => Promise<U>;
|
||||
}
|
||||
|
@ -3,7 +3,12 @@
|
||||
"experimentalDecorators": true,
|
||||
"useDefineForClassFields": false,
|
||||
"target": "ES2022",
|
||||
"module": "ES2022",
|
||||
"moduleResolution": "nodenext"
|
||||
}
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"esModuleInterop": true,
|
||||
"verbatimModuleSyntax": true
|
||||
},
|
||||
"exclude": [
|
||||
"dist_*/**/*.d.ts"
|
||||
]
|
||||
}
|
||||
|
Reference in New Issue
Block a user