Compare commits

...

28 Commits

Author SHA1 Message Date
d67dc9ab44 1.0.34 2018-07-22 18:20:23 +02:00
c193fd4c59 fix(ci): add better docs 2018-07-22 18:20:22 +02:00
65d87fdefb 1.0.33 2018-07-22 18:19:47 +02:00
4a54935521 fix(core): add ICheckingAccount, IPayment, TCurrency 2018-07-22 18:19:47 +02:00
e10a45a4d0 1.0.32 2018-07-12 01:04:25 +02:00
074f6bfd1e fix(IExpense): update 2018-07-12 01:04:25 +02:00
6a1fafeab7 1.0.31 2018-07-11 21:42:05 +02:00
b019cf48b5 fix(fix IExpense): update 2018-07-11 21:42:04 +02:00
1db0a7adec 1.0.30 2018-07-11 21:27:13 +02:00
1901c57a1d fix(core): update structure 2018-07-11 21:27:13 +02:00
5723ddd059 1.0.29 2018-07-10 23:59:07 +02:00
5b67ad1c1c fix(finance): add IExpense 2018-07-10 23:59:07 +02:00
0044ab7b7e 1.0.28 2018-06-21 21:18:47 +02:00
e40c6b60d1 fix(Contact): add email and phone 2018-06-21 21:18:46 +02:00
af427347d9 1.0.27 2018-06-20 23:29:02 +02:00
952103c64e fix(Contact): update 2018-06-20 23:29:02 +02:00
65ba20253c 1.0.26 2018-06-20 23:14:39 +02:00
73e90165a4 fix(Contact): add customerNumber 2018-06-20 23:14:39 +02:00
bc16d5e8ea 1.0.25 2018-06-20 23:12:33 +02:00
7bb964603c fix(IContact): add description 2018-06-20 23:12:33 +02:00
a8ee64eb54 1.0.24 2018-06-19 23:48:38 +02:00
f75d0f9378 fix(core): update 2018-06-19 23:48:38 +02:00
e9293ec31e 1.0.23 2018-06-19 23:30:59 +02:00
b04155e4f1 fix(core): update 2018-06-19 23:30:59 +02:00
bc8534d382 1.0.22 2018-06-19 23:25:57 +02:00
a2a1d61671 fix(Contact): add surname 2018-06-19 23:25:57 +02:00
a580ba53dd 1.0.21 2018-06-09 15:28:47 +02:00
e194e2a3b6 fix(packagename): fix packagename 2018-06-09 15:28:47 +02:00
31 changed files with 73 additions and 153 deletions

View File

@ -117,8 +117,9 @@ pages:
image: hosttoday/ht-docker-node:npmci
stage: metadata
script:
- npmci command npm install -g npmpage
- npmci command npmpage
- npmci command npm install -g typedoc typescript
- npmci npm install
- npmci command typedoc --module "commonjs" --target "ES2016" --out public/ ts/
tags:
- docker
- notpriv
@ -128,3 +129,14 @@ pages:
expire_in: 1 week
paths:
- public
allow_failure: true
windowsCompatibility:
image: stefanscherer/node-windows:10-build-tools
stage: metadata
script:
- npm install & npm test
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- windows
allow_failure: true

View File

@ -1,8 +0,0 @@
export interface IAddress {
name?: string;
streetName: string;
houseNumber: string;
postalCode: string;
city: string;
country: string;
}

View File

@ -1,3 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRkcmVzcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL2J1c2luZXNzL2FkZHJlc3MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9

View File

@ -1,14 +0,0 @@
import { IDate } from '../index';
/**
* describes a company's lifecycle state
*/
export declare type TCompanyStatus = 'planed' | 'founding' | 'active' | 'liquidation' | 'closed';
/**
* describes a company
*/
export interface ICompany {
name: string;
foundedDate: IDate;
closedDate: IDate;
status: TCompanyStatus;
}

View File

@ -1,3 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tcGFueS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL2J1c2luZXNzL2NvbXBhbnkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9

View File

@ -1,13 +0,0 @@
import { IAddress } from '../index';
export declare type TContactSalutation = 'Mr' | 'Ms' | 'Mrs';
export declare type TContactType = 'person' | 'company';
export declare type TContactTitle = 'Doctor' | 'Professor';
export interface IContact {
salutation?: TContactSalutation;
type: TContactType;
title: TContactTitle;
name: string;
address: IAddress;
vatId?: string;
accountNumber?: string;
}

View File

@ -1,3 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGFjdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL2J1c2luZXNzL2NvbnRhY3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9

View File

@ -1,14 +0,0 @@
import { IContact } from '../index';
export declare type TInvoiceStatus = 'draft' | 'invoice' | 'paid' | 'refunded';
export interface IInvoiceItem {
name: string;
unitType: string;
quantity: number;
vatPercentage: number;
}
export interface IInvoice {
billedBy: IContact;
billedTo: IContact;
status: TInvoiceStatus;
items: IInvoiceItem[];
}

View File

@ -1,3 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW52b2ljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL2J1c2luZXNzL2ludm9pY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9

1
dist/cloud/dns.d.ts vendored
View File

@ -1 +0,0 @@
export declare type TDnsRecord = 'A' | 'AAAA' | 'CNAME' | 'TXT' | 'SRV' | 'LOC' | 'MX' | 'NS' | 'SPF';

3
dist/cloud/dns.js vendored
View File

@ -1,3 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZG5zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvY2xvdWQvZG5zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ==

View File

@ -1,19 +0,0 @@
import { IAuthor } from '../index';
export interface IArticle {
/**
* the title of an article
*/
title: string;
/**
* the Author of an article
*/
author: IAuthor;
/**
* the content of an article
*/
content: string;
/**
* the tags of an article
*/
tags: string[];
}

View File

@ -1,3 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXJ0aWNsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL2NvbnRlbnQvYXJ0aWNsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=

View File

@ -1,20 +0,0 @@
import { IDate } from '../index';
import { IArticle } from '../index';
export interface IAuthor {
/**
* the first name of an author
*/
firstName: string;
/**
* the surname of an author
*/
surName: string;
/**
* the birthday of an author
*/
birthday: IDate;
/**
* articles of an author
*/
articles: IArticle[];
}

View File

@ -1,3 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0aG9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvY29udGVudC9hdXRob3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9

View File

@ -1,5 +0,0 @@
export interface IDate {
day: number;
month: number;
year: number;
}

View File

@ -1,3 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL2dlbmVyYWwvZGF0ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=

View File

@ -1,2 +0,0 @@
export interface ITime {
}

View File

@ -1,3 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGltZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL2dlbmVyYWwvdGltZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=

9
dist/index.d.ts vendored
View File

@ -1,9 +0,0 @@
export * from './business/address';
export * from './business/company';
export * from './business/contact';
export * from './business/invoice';
export * from './cloud/dns';
export * from './content/article';
export * from './content/author';
export * from './general/date';
export * from './general/time';

3
dist/index.js vendored
View File

@ -1,3 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=

16
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "tsclass",
"version": "1.0.20",
"name": "@tsclass/tsclass",
"version": "1.0.34",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -78,9 +78,9 @@
}
},
"ts-node": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-6.1.0.tgz",
"integrity": "sha512-mw11Bq08RZgrU/bzcVw/Ti9wNyefpOanXgWsHg008wyVHjvFhWxNatVVrciOAu8BcWSECoNOSunRzUokKH8Mmw==",
"version": "6.1.1",
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-6.1.1.tgz",
"integrity": "sha512-79FnymLGDBd/nXoiak1L6w6fd9Zz9Ge/x8/Aglaeh31KkqRLDzbfT1vBGlO5dqc76WzufTlW4IYl7e01CVUF5A==",
"dev": true,
"requires": {
"arrify": "^1.0.0",
@ -93,9 +93,9 @@
}
},
"typescript": {
"version": "2.9.1",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.1.tgz",
"integrity": "sha512-h6pM2f/GDchCFlldnriOhs1QHuwbnmj6/v7499eMHqPeW4V2G0elua2eIc2nu8v2NdHV0Gm+tzX83Hr6nUFjQA==",
"version": "2.9.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz",
"integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==",
"dev": true
},
"yn": {

View File

@ -1,13 +1,13 @@
{
"name": "tsclass",
"version": "1.0.20",
"name": "@tsclass/tsclass",
"version": "1.0.34",
"private": false,
"description": "common classes for TypeScript",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"scripts": {
"test": "(npmts --notest)",
"build": "echo \"Not needed for now\""
"test": "tsrun test/test.ts",
"build": "npmts --notest"
},
"repository": {
"type": "git",

View File

@ -0,0 +1,3 @@
import * as tsclass from '../ts/index';
let contact: tsclass.IContact;

View File

@ -12,13 +12,20 @@ export interface IContact {
// =======
salutation?: TContactSalutation;
type: TContactType;
title: TContactTitle;
title?: TContactTitle;
name: string;
surname?: string;
legalEntity?: string;
address: IAddress;
description: string;
customerNumber?: string;
email?: string;
phone?: string;
// =========
// financial
// =========
vatId?: string;
accountNumber?: string;
bankAccountNumber?: string;
}

View File

@ -0,0 +1,8 @@
import { TCurrency } from './currency';
import { IPayment } from './payment';
export interface ICheckingAccount {
name: string;
currency: TCurrency;
payment: IPayment[];
}

1
ts/finance/currency.ts Normal file
View File

@ -0,0 +1 @@
export type TCurrency = 'eur' | 'usd' | 'sek';

14
ts/finance/expense.ts Normal file
View File

@ -0,0 +1,14 @@
import { IInvoice } from './invoice';
import { IContact } from '../business/contact';
export interface IExpenseItem {
amount: number;
taxPercentage: number;
}
export interface IExpense {
voucherFile?: any;
expenseItems: IExpenseItem[];
contactRef: string;
accountRef: string;
}

View File

@ -1,4 +1,4 @@
import { IContact } from '../index';
import { IContact } from '..';
export type TInvoiceStatus = 'draft' | 'invoice' | 'paid' | 'refunded';

4
ts/finance/payment.ts Normal file
View File

@ -0,0 +1,4 @@
export interface IPayment {
amount: number;
date: Date;
}

View File

@ -2,7 +2,13 @@
export * from './business/address';
export * from './business/company';
export * from './business/contact';
export * from './business/invoice';
// Finance
export * from './finance/checkingaccount';
export * from './finance/currency';
export * from './finance/expense';
export * from './finance/invoice';
export * from './finance/payment';
// Cloud
export * from './cloud/dns';