Compare commits
28 Commits
Author | SHA1 | Date | |
---|---|---|---|
d67dc9ab44 | |||
c193fd4c59 | |||
65d87fdefb | |||
4a54935521 | |||
e10a45a4d0 | |||
074f6bfd1e | |||
6a1fafeab7 | |||
b019cf48b5 | |||
1db0a7adec | |||
1901c57a1d | |||
5723ddd059 | |||
5b67ad1c1c | |||
0044ab7b7e | |||
e40c6b60d1 | |||
af427347d9 | |||
952103c64e | |||
65ba20253c | |||
73e90165a4 | |||
bc16d5e8ea | |||
7bb964603c | |||
a8ee64eb54 | |||
f75d0f9378 | |||
e9293ec31e | |||
b04155e4f1 | |||
bc8534d382 | |||
a2a1d61671 | |||
a580ba53dd | |||
e194e2a3b6 |
@ -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
|
||||
|
8
dist/business/address.d.ts
vendored
8
dist/business/address.d.ts
vendored
@ -1,8 +0,0 @@
|
||||
export interface IAddress {
|
||||
name?: string;
|
||||
streetName: string;
|
||||
houseNumber: string;
|
||||
postalCode: string;
|
||||
city: string;
|
||||
country: string;
|
||||
}
|
3
dist/business/address.js
vendored
3
dist/business/address.js
vendored
@ -1,3 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRkcmVzcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL2J1c2luZXNzL2FkZHJlc3MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
14
dist/business/company.d.ts
vendored
14
dist/business/company.d.ts
vendored
@ -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;
|
||||
}
|
3
dist/business/company.js
vendored
3
dist/business/company.js
vendored
@ -1,3 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tcGFueS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL2J1c2luZXNzL2NvbXBhbnkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
13
dist/business/contact.d.ts
vendored
13
dist/business/contact.d.ts
vendored
@ -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;
|
||||
}
|
3
dist/business/contact.js
vendored
3
dist/business/contact.js
vendored
@ -1,3 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGFjdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL2J1c2luZXNzL2NvbnRhY3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
14
dist/business/invoice.d.ts
vendored
14
dist/business/invoice.d.ts
vendored
@ -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[];
|
||||
}
|
3
dist/business/invoice.js
vendored
3
dist/business/invoice.js
vendored
@ -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
1
dist/cloud/dns.d.ts
vendored
@ -1 +0,0 @@
|
||||
export declare type TDnsRecord = 'A' | 'AAAA' | 'CNAME' | 'TXT' | 'SRV' | 'LOC' | 'MX' | 'NS' | 'SPF';
|
3
dist/cloud/dns.js
vendored
3
dist/cloud/dns.js
vendored
@ -1,3 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZG5zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvY2xvdWQvZG5zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ==
|
19
dist/content/article.d.ts
vendored
19
dist/content/article.d.ts
vendored
@ -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[];
|
||||
}
|
3
dist/content/article.js
vendored
3
dist/content/article.js
vendored
@ -1,3 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXJ0aWNsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL2NvbnRlbnQvYXJ0aWNsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
|
20
dist/content/author.d.ts
vendored
20
dist/content/author.d.ts
vendored
@ -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[];
|
||||
}
|
3
dist/content/author.js
vendored
3
dist/content/author.js
vendored
@ -1,3 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0aG9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvY29udGVudC9hdXRob3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
5
dist/general/date.d.ts
vendored
5
dist/general/date.d.ts
vendored
@ -1,5 +0,0 @@
|
||||
export interface IDate {
|
||||
day: number;
|
||||
month: number;
|
||||
year: number;
|
||||
}
|
3
dist/general/date.js
vendored
3
dist/general/date.js
vendored
@ -1,3 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL2dlbmVyYWwvZGF0ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
|
2
dist/general/time.d.ts
vendored
2
dist/general/time.d.ts
vendored
@ -1,2 +0,0 @@
|
||||
export interface ITime {
|
||||
}
|
3
dist/general/time.js
vendored
3
dist/general/time.js
vendored
@ -1,3 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGltZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL2dlbmVyYWwvdGltZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
|
9
dist/index.d.ts
vendored
9
dist/index.d.ts
vendored
@ -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
3
dist/index.js
vendored
@ -1,3 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
|
16
package-lock.json
generated
16
package-lock.json
generated
@ -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": {
|
||||
|
@ -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",
|
||||
|
@ -0,0 +1,3 @@
|
||||
import * as tsclass from '../ts/index';
|
||||
|
||||
let contact: tsclass.IContact;
|
||||
|
@ -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;
|
||||
}
|
||||
|
8
ts/finance/checkingaccount.ts
Normal file
8
ts/finance/checkingaccount.ts
Normal 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
1
ts/finance/currency.ts
Normal file
@ -0,0 +1 @@
|
||||
export type TCurrency = 'eur' | 'usd' | 'sek';
|
14
ts/finance/expense.ts
Normal file
14
ts/finance/expense.ts
Normal 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;
|
||||
}
|
@ -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
4
ts/finance/payment.ts
Normal file
@ -0,0 +1,4 @@
|
||||
export interface IPayment {
|
||||
amount: number;
|
||||
date: Date;
|
||||
}
|
@ -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';
|
||||
|
Reference in New Issue
Block a user