Compare commits
13 Commits
Author | SHA1 | Date | |
---|---|---|---|
dead451ab0 | |||
d7855494a7 | |||
0a12915c7e | |||
9a942cafa5 | |||
0292b4fef4 | |||
2d9d2a5a47 | |||
079e315b23 | |||
caf3e4766f | |||
50b5630aed | |||
a8776be6b8 | |||
4e173d4dd4 | |||
edcbdea31f | |||
6072974bda |
29
changelog.md
29
changelog.md
@ -1,5 +1,34 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 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)
|
## 2025-03-11 - 5.0.0 - BREAKING CHANGE(network)
|
||||||
Update reverse proxy configuration to support multiple destination IPs and ports
|
Update reverse proxy configuration to support multiple destination IPs and ports
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@tsclass/tsclass",
|
"name": "@tsclass/tsclass",
|
||||||
"version": "5.0.0",
|
"version": "6.1.2",
|
||||||
"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",
|
||||||
|
@ -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,
|
||||||
|
@ -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();
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@tsclass/tsclass',
|
name: '@tsclass/tsclass',
|
||||||
version: '5.0.0',
|
version: '6.1.2',
|
||||||
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.'
|
||||||
}
|
}
|
||||||
|
@ -5,4 +5,22 @@ export interface IAddress {
|
|||||||
postalCode: string;
|
postalCode: string;
|
||||||
city: string;
|
city: string;
|
||||||
country: 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;
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* allows storage of electronic means to reach this address
|
||||||
|
* can be phone, email
|
||||||
|
*/
|
||||||
|
eAddress?: {
|
||||||
|
email?: string;
|
||||||
|
phone?: string;
|
||||||
|
peppolId?: string;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -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;
|
|
||||||
}
|
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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';
|
||||||
|
@ -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;
|
||||||
}
|
}
|
@ -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;
|
||||||
|
@ -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;
|
|
||||||
};
|
|
||||||
}
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -15,8 +15,12 @@ export interface IInvoiceItem {
|
|||||||
|
|
||||||
export interface IInvoice {
|
export interface IInvoice {
|
||||||
id: string;
|
id: string;
|
||||||
billedBy: business.IContact;
|
billedBy: business.TContact;
|
||||||
billedTo: business.IContact;
|
billedTo: business.TContact;
|
||||||
|
/**
|
||||||
|
* buyer reference is an optional field, that helps the buyer to identify the invoice
|
||||||
|
*/
|
||||||
|
buyerReference?: string;
|
||||||
type: 'creditnote' | 'debitnote';
|
type: 'creditnote' | 'debitnote';
|
||||||
status: TInvoiceStatus;
|
status: TInvoiceStatus;
|
||||||
items: IInvoiceItem[];
|
items: IInvoiceItem[];
|
||||||
|
@ -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 {
|
||||||
|
Reference in New Issue
Block a user