Compare commits

..

31 Commits

Author SHA1 Message Date
079e315b23 6.0.1 2025-03-19 14:17:43 +00:00
caf3e4766f fix(business): Remove exports for company and person modules from the business index 2025-03-19 14:17:43 +00:00
50b5630aed 6.0.0 2025-03-19 14:16:55 +00:00
a8776be6b8 BREAKING CHANGE(TContact): new structure around TContact that combines functionality of previous interfaces like ICompany and IPerson 2025-03-19 14:16:55 +00:00
4e173d4dd4 Merge pull request 'feat: add registration info and refactor contact' (#1) from feat/add-registration-info into master
Reviewed-on: #1
2025-03-19 14:08:30 +00:00
edcbdea31f chore: fix typo 2025-03-18 16:49:51 +00:00
6072974bda feat: add registration info and refactor contact 2025-03-17 19:15:08 +00:00
8883bf181e 5.0.0 2025-03-11 12:07:33 +00:00
cd09a70232 BREAKING CHANGE(network): Update reverse proxy configuration to support multiple destination IPs and ports 2025-03-11 12:07:33 +00:00
e6811c75fc 4.4.4 2025-03-10 15:20:24 +00:00
e0ba9c6cef fix(business): Fixes typo in ILetter interface 2025-03-10 15:20:24 +00:00
90c56c6d4f 4.4.3 2025-03-07 14:21:32 +00:00
91caa9a747 fix(network): Fix destinationPort type for IReverseProxyConfig 2025-03-07 14:21:32 +00:00
115250edab 4.4.2 2025-03-07 14:20:18 +00:00
1127b8961f fix(dependencies): Updated package dependencies for improved stability and performance. 2025-03-07 14:20:18 +00:00
cc15835c8e 4.4.1 2025-03-07 14:18:42 +00:00
300ac01629 fix(business): Fix missing letterData property in ILetter interface. 2025-03-07 14:18:42 +00:00
a9a2f94f7e 4.4.0 2025-01-11 19:01:53 +01:00
5e8473d16b feat(website): Add ILinkBlock interface for managing groups of links 2025-01-11 19:01:53 +01:00
6366b4f990 4.3.0 2025-01-10 22:05:27 +01:00
a3e147f946 feat(website): Added new ILink interface to the website module. 2025-01-10 22:05:26 +01:00
1c6fc3666d 4.2.0 2024-12-11 12:53:04 +01:00
891b0f0f10 feat(dependencies): Update dependencies and enhance code documentation 2024-12-11 12:53:04 +01:00
96a31cbc71 4.1.2 2024-07-26 22:23:23 +02:00
450139682f fix(finance): Updated IInvoice interface to support various currencies. 2024-07-26 22:23:23 +02:00
741b361f4b 4.1.1 2024-07-26 22:20:19 +02:00
cabd160fb2 fix(finance): Fix IInvoice interface to correctly include the currency field 2024-07-26 22:20:18 +02:00
12a9e231ae 4.1.0 2024-07-26 16:51:34 +02:00
f9c7f90d73 feat(finance): Added notes field to IInvoice interface 2024-07-26 16:51:33 +02:00
6095e0ea5c 4.0.65 2024-07-24 15:16:28 +02:00
63b2bd59a2 fix(finance): Added type property to IInvoice interface 2024-07-24 15:16:27 +02:00
21 changed files with 5261 additions and 1552 deletions

View File

@ -1,5 +1,88 @@
# Changelog # Changelog
## 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) ## 2024-07-18 - 4.0.64 - fix(business)
Add relationship field to contact interface Add relationship field to contact interface

View File

@ -1,6 +1,6 @@
{ {
"name": "@tsclass/tsclass", "name": "@tsclass/tsclass",
"version": "4.0.64", "version": "6.0.1",
"private": false, "private": false,
"description": "Provides TypeScript definitions for various business, financial, networking, content, and other common classes.", "description": "Provides TypeScript definitions for various business, financial, networking, content, and other common classes.",
"main": "dist_ts/index.js", "main": "dist_ts/index.js",
@ -37,14 +37,14 @@
}, },
"homepage": "https://github.com/tsclass/tsclass#readme", "homepage": "https://github.com/tsclass/tsclass#readme",
"dependencies": { "dependencies": {
"type-fest": "^4.20.1" "type-fest": "^4.37.0"
}, },
"devDependencies": { "devDependencies": {
"@git.zone/tsbuild": "^2.1.82", "@git.zone/tsbuild": "^2.2.6",
"@git.zone/tsrun": "^1.2.49", "@git.zone/tsrun": "^1.3.3",
"@git.zone/tstest": "^1.0.90", "@git.zone/tstest": "^1.0.96",
"@push.rocks/tapbundle": "^5.0.23", "@push.rocks/tapbundle": "^5.5.6",
"@types/node": "^20.14.9" "@types/node": "^22.13.9"
}, },
"files": [ "files": [
"ts/**/*", "ts/**/*",

6502
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -34,7 +34,7 @@ The business domain includes classes for managing contacts, companies, and proje
```typescript ```typescript
import { business } from '@tsclass/tsclass'; import { business } from '@tsclass/tsclass';
const companyContact: business.IContact = { const companyContact: business.TContact = {
type: 'company', type: 'company',
name: 'Example Company', name: 'Example Company',
address: { address: {
@ -48,7 +48,7 @@ const companyContact: business.IContact = {
email: 'contact@example.com' email: 'contact@example.com'
}; };
const exampleCompany: business.ICompany = { const exampleCompany: business.TCompany = {
name: 'Example Company', name: 'Example Company',
foundedDate: { foundedDate: {
day: 1, day: 1,

View File

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

View File

@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@tsclass/tsclass', name: '@tsclass/tsclass',
version: '4.0.64', version: '6.0.1',
description: 'Provides TypeScript definitions for various business, financial, networking, content, and other common classes.' description: 'Provides TypeScript definitions for various business, financial, networking, content, and other common classes.'
} }

View File

@ -1,20 +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;
slogan?: string;
description?: string;
logoLink?: string;
foundedDate: general.IDate;
closedDate: general.IDate;
status: business.TCompanyStatus;
contact: business.IContact;
}

View File

@ -1,39 +1,60 @@
import { finance } from '../index.js'; import { finance, general } from "../index.js";
import { business } 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'; type TContactEnvelope<TYPE extends string, FIELDS> = {
type: TYPE;
export interface IContact {
// =======
// general
// =======
salutation?: TContactSalutation;
type: TContactType;
title?: TContactTitle;
relationship?: 'customer' | 'supplier' | 'partner' | 'employee' | 'other';
name: string; name: string;
surname?: string;
legalEntity?: string;
address: business.IAddress; address: business.IAddress;
description: string; description: string;
legalEntity?: string;
customerNumber?: string; customerNumber?: string;
relationship?: "customer" | "supplier" | "partner" | "employee" | "other";
email?: string; email?: string;
logoUrl?: string;
website?: string;
facebookUrl?: string;
twitterUrl?: string;
phone?: string; phone?: string;
fax?: string; fax?: string;
// ========= logoUrl?: string;
// financial website?: string;
// =========
vatId?: string; socials?: TSocialLinks[];
sepaConnection?: finance.ISepaConnection; 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;
};
}
>;
export type TCompany = TContactEnvelope<
"company",
{
registrationDetails: TRegistrationDetails;
foundedDate: general.IDate;
closedDate: general.IDate;
status: "planned" | "founding" | "active" | "liquidation" | "closed";
}
>;
export type TContact = TPerson | TCompany;

View File

@ -1,12 +1,12 @@
import * as database from '../database/index.js'; import * as database from "../database/index.js";
import { type IPerson } from './person.js'; import type { TPerson } from "./index.js";
export interface IContract { export interface IContract {
parties: { parties: {
signingOrder: number; signingOrder: number;
referencedAs: string; referencedAs: string;
person: IPerson; person: TPerson;
role: 'signer' | 'cc'; role: "signer" | "cc";
signature: { signature: {
given: boolean; given: boolean;
timestamp?: number; timestamp?: number;

View File

@ -1,8 +1,6 @@
export * from './address.js'; export * from './address.js';
export * from './company.js';
export * from './contact.js'; export * from './contact.js';
export * from './job.js'; export * from './job.js';
export * from './letter.js'; export * from './letter.js';
export * from './pdf.js'; export * from './pdf.js';
export * from './person.js';
export * from './project.js'; export * from './project.js';

View File

@ -1,18 +1,17 @@
import * as finance from '../finance/index.js'; import * as finance from "../finance/index.js";
import { type ICompany } from './company.js'; import { type TContact } from "./contact.js";
import { type IContact } from './contact.js';
export class IJob { export class IJob {
type: 'contract' | 'employment'; type: "contract" | "employment";
techTags?: string[]; techTags?: string[];
qualificationTags?: string[]; qualificationTags?: string[];
languages?: { languages?: {
name: string; name: string;
level: 'basic' | 'intermediate' | 'advanced' | 'native'; level: "basic" | "intermediate" | "advanced" | "native";
}[]; }[];
name: string; name: string;
description: string; description: string;
monthlyTotal: number; monthlyTotal: number;
currency: finance.TCurrency; currency: finance.TCurrency;
from: ICompany; from: TContact;
contact: IContact; contact: TContact;
} }

View File

@ -1,20 +1,20 @@
import * as business from './index.js'; import * as business from "./index.js";
import * as finance from '../finance/index.js'; import * as finance from "../finance/index.js";
import * as database from '../database/index.js'; import * as database from "../database/index.js";
export interface ILetter { export interface ILetter {
versionInfo: { versionInfo: {
type: 'draft' | 'final'; type: "draft" | "final";
/** /**
* should follow semVer * should follow semVer
*/ */
version: string; version: string;
}; };
incidenceId: string; incidenceId: string;
type: 'invoice' | 'notice' | 'warning' | 'verification' | 'contract'; type: "invoice" | "notice" | "warning" | "verification" | "contract";
date: number; date: number;
from: business.IContact; from: business.TContact;
to: business.IContact; to: business.TContact;
legalContact: business.IContact; legalContact: business.TContact;
logoUrl: string; logoUrl: string;
subject: string; subject: string;
accentColor?: string; accentColor?: string;
@ -27,7 +27,7 @@ export interface ILetter {
contractDate: number; contractDate: number;
}; };
timesheetData: string; timesheetData: string;
} };
pdf?: business.IPdf; pdf?: business.IPdf;
pdfAttachments: business.IPdf[]; pdfAttachments: business.IPdf[];
language: string; language: string;

View File

@ -1,12 +0,0 @@
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;
};
}

View File

@ -1,5 +1,20 @@
export interface ICommitInfo { export interface ICommitInfo {
/**
* the name of the project
*/
name: string; name: string;
/**
* the current version of the project
*/
version: string; version: string;
/**
* the description of the project
*/
description: string; description: string;
/**
* the changelog of the project
*/
changelog?: string[];
} }

View File

@ -13,5 +13,5 @@ export interface IVoucher {
date: Date; date: Date;
description: string; description: string;
expenseItems: IExpenseItem[]; expenseItems: IExpenseItem[];
contactRef: business.IContact; contactRef: business.TContact;
} }

View File

@ -1,21 +1,23 @@
import { business, finance } from '../index.js'; import { business, finance } from '../index.js';
import type { TCurrency } from './currency.js';
export type TInvoiceStatus = 'draft' | 'invoice' | 'paid' | 'refunded'; export type TInvoiceStatus = 'draft' | 'invoice' | 'paid' | 'refunded';
export interface IInvoiceItem { export interface IInvoiceItem {
position: number;
name: string; name: string;
articleNumber?: string; articleNumber?: string;
unitType: string; unitType: string;
unitQuantity: number; unitQuantity: number;
unitNetPrice: number; unitNetPrice: number;
vatPercentage: number; vatPercentage: number;
currency: 'EUR';
} }
export interface IInvoice { export interface IInvoice {
id: string; id: string;
billedBy: business.IContact; billedBy: business.TContact;
billedTo: business.IContact; billedTo: business.TContact;
type: 'creditnote' | 'debitnote';
status: TInvoiceStatus; status: TInvoiceStatus;
items: IInvoiceItem[]; items: IInvoiceItem[];
periodOfPerformance?: { periodOfPerformance?: {
@ -34,5 +36,7 @@ export interface IInvoice {
items: IInvoiceItem[]; items: IInvoiceItem[];
}; };
}; };
notes: string[];
paymentOptions?: finance.IPaymentOptionInfo; paymentOptions?: finance.IPaymentOptionInfo;
currency: TCurrency;
} }

View File

@ -1,6 +1,6 @@
export interface IReverseProxyConfig { export interface IReverseProxyConfig {
destinationIp: string; destinationIps: string[];
destinationPort: string; destinationPorts: number[];
hostName: string; hostName: string;
privateKey: string; privateKey: string;
publicKey: string; publicKey: string;

View File

@ -1,17 +1,17 @@
import { type ICompany } from "../business/company.js"; import type { TCompany } from "../business/contact.js";
export interface IProduct { export interface IProduct {
name: string; name: string;
slogan: string; slogan: string;
description: string; description: string;
os: 'web-based', os: "web-based";
category: 'Business Application', category: "Business Application";
offers: any[]; offers: any[];
features: IProductFeature[]; features: IProductFeature[];
landingPage: string; landingPage: string;
appLink: string; appLink: string;
logoLink: string; logoLink: string;
publisher?: ICompany; publisher?: TCompany;
} }
export interface IProductFeature { export interface IProductFeature {

View File

@ -1 +1,3 @@
export * from './link.js';
export * from './menuitem.js'; export * from './menuitem.js';
export * from './linkblock.js';

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

@ -0,0 +1,6 @@
import type { ILink } from './link.js';
export interface ILinkBlock {
title: string;
links: ILink[];
}