@tomei/finance 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/account/account.d.ts +2 -1
- package/dist/account/account.js +1 -1
- package/dist/account/account.js.map +1 -1
- package/dist/base/base.address.d.ts +8 -0
- package/dist/base/base.address.js +15 -0
- package/dist/base/base.address.js.map +1 -0
- package/dist/base/base.object.d.ts +7 -0
- package/dist/base/base.object.js +14 -0
- package/dist/base/base.object.js.map +1 -0
- package/dist/base/base.owner.d.ts +23 -0
- package/dist/base/base.owner.js +34 -0
- package/dist/base/base.owner.js.map +1 -0
- package/dist/base/index.d.ts +4 -4
- package/dist/base/index.js +5 -3
- package/dist/base/index.js.map +1 -1
- package/dist/customer/customer.d.ts +28 -0
- package/dist/customer/customer.js +110 -0
- package/dist/customer/customer.js.map +1 -0
- package/dist/customer/customer.repository.d.ts +0 -0
- package/dist/customer/customer.repository.js +1 -0
- package/dist/customer/customer.repository.js.map +1 -0
- package/dist/customer/entities/customer.entity.d.ts +5 -0
- package/dist/customer/entities/customer.entity.js +41 -0
- package/dist/customer/entities/customer.entity.js.map +1 -0
- package/dist/customer/finance-customer.repository.d.ts +8 -0
- package/dist/customer/finance-customer.repository.js +31 -0
- package/dist/customer/finance-customer.repository.js.map +1 -0
- package/dist/customer/index.d.ts +7 -0
- package/dist/customer/index.js +10 -0
- package/dist/customer/index.js.map +1 -0
- package/dist/customer/interfaces/customer.repository.interface.d.ts +3 -0
- package/dist/customer/interfaces/customer.repository.interface.js +3 -0
- package/dist/customer/interfaces/customer.repository.interface.js.map +1 -0
- package/dist/customer/interfaces/finance-customer-attr.interface.d.ts +4 -0
- package/dist/customer/interfaces/finance-customer-attr.interface.js +3 -0
- package/dist/customer/interfaces/finance-customer-attr.interface.js.map +1 -0
- package/dist/customer/interfaces/finance-customer.repository.interface.d.ts +3 -0
- package/dist/customer/interfaces/finance-customer.repository.interface.js +3 -0
- package/dist/customer/interfaces/finance-customer.repository.interface.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/interfaces/account-system.interface.d.ts +8 -0
- package/dist/interfaces/account-system.interface.js +3 -0
- package/dist/interfaces/account-system.interface.js.map +1 -0
- package/dist/interfaces/customer.repository.interface.d.ts +3 -0
- package/dist/interfaces/customer.repository.interface.js +3 -0
- package/dist/interfaces/customer.repository.interface.js.map +1 -0
- package/dist/interfaces/finance-customer.repository.interface.d.ts +3 -0
- package/dist/interfaces/finance-customer.repository.interface.js +3 -0
- package/dist/interfaces/finance-customer.repository.interface.js.map +1 -0
- package/dist/interfaces/index.d.ts +2 -0
- package/dist/interfaces/index.js +3 -0
- package/dist/interfaces/index.js.map +1 -0
- package/dist/interfaces/systemConfig.interface.d.ts +0 -0
- package/dist/interfaces/systemConfig.interface.js +1 -0
- package/dist/interfaces/systemConfig.interface.js.map +1 -0
- package/dist/quickbook-client/client.d.ts +4 -2
- package/dist/quickbook-client/client.js +33 -0
- package/dist/quickbook-client/client.js.map +1 -1
- package/dist/quickbook-client/index.d.ts +2 -1
- package/dist/quickbook-client/interfaces/quickbook-client-create-customer-options.interface.d.ts +7 -0
- package/dist/quickbook-client/interfaces/quickbook-client-create-customer-options.interface.js +3 -0
- package/dist/quickbook-client/interfaces/quickbook-client-create-customer-options.interface.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/migrations/finance-customer-migration.js +21 -0
- package/package.json +2 -2
- package/src/account/account.ts +3 -2
- package/src/base/base.address.ts +21 -0
- package/src/base/{object/base.object.ts → base.object.ts} +0 -0
- package/src/base/{owner/base.owner.ts → base.owner.ts} +4 -0
- package/src/base/index.ts +4 -5
- package/src/customer/customer.ts +153 -0
- package/src/customer/entities/customer.entity.ts +23 -0
- package/src/customer/finance-customer.repository.ts +20 -0
- package/src/customer/index.ts +15 -0
- package/src/customer/interfaces/customer.repository.interface.ts +3 -0
- package/src/customer/interfaces/finance-customer-attr.interface.ts +4 -0
- package/src/customer/interfaces/finance-customer.repository.interface.ts +3 -0
- package/src/index.ts +2 -0
- package/src/{base → interfaces}/account-system.interface.ts +1 -0
- package/src/interfaces/index.ts +3 -0
- package/src/quickbook-client/client.ts +38 -2
- package/src/quickbook-client/index.ts +2 -1
- package/src/quickbook-client/interfaces/quickbook-client-create-customer-options.interface.ts +8 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RelatedObject, Owner } from '../base';
|
|
2
2
|
import { ICreateAccountAttr } from './interfaces/account-attr.interface';
|
|
3
3
|
import { IAccountRepository } from './interfaces/account.repository.interface';
|
|
4
|
+
import { IAccountSystem } from 'src/interfaces';
|
|
4
5
|
export declare class Account {
|
|
5
6
|
accountRepository: IAccountRepository;
|
|
6
7
|
private OwnerId;
|
package/dist/account/account.js
CHANGED
|
@@ -4,7 +4,7 @@ exports.Account = void 0;
|
|
|
4
4
|
const uniqid = require("uniqid");
|
|
5
5
|
const account_entity_1 = require("./entities/account.entity");
|
|
6
6
|
const axios_1 = require("axios");
|
|
7
|
-
const config_1 = require("
|
|
7
|
+
const config_1 = require("../config");
|
|
8
8
|
class Account {
|
|
9
9
|
constructor(accountRepository, SysCode, params) {
|
|
10
10
|
this.accountRepository = accountRepository;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account.js","sourceRoot":"","sources":["../../src/account/account.ts"],"names":[],"mappings":";;;AAGA,iCAAiC;AACjC,8DAAyD;AACzD,iCAA0B;AAC1B,
|
|
1
|
+
{"version":3,"file":"account.js","sourceRoot":"","sources":["../../src/account/account.ts"],"names":[],"mappings":";;;AAGA,iCAAiC;AACjC,8DAAyD;AACzD,iCAA0B;AAC1B,sCAAsC;AAEtC,MAAa,OAAO;IAmBlB,YACE,iBAAqC,EACrC,OAAe,EACf,MAA2B;QAE3B,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QAC3C,IAAI,CAAC,WAAW,GAAG,IAAA,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ACrB,WAAW,EAAE,MAAM;aACpB,EACD,SAAS,CACV,CAAC;YAEF,MAAM,OAAO,GAAG;gBACd,MAAM,EAAE,QAAQ;gBAChB,QAAQ,EAAE,iBAAiB;gBAC3B,WAAW,EAAE,gBAAgB,OAAO,CAAC,SAAS,oBAAoB;gBAClE,UAAU,EAAE,OAAO,6BAAY;gBAC/B,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;gBACrC,gBAAgB,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;gBACzC,aAAa,EAAE,OAAO,CAAC,WAAW;gBAClC,WAAW,EAAE,IAAI,IAAI,EAAE;gBACvB,QAAQ,EAAE,OAAO,CAAC,SAAS;aAC5B,CAAC;YAEF,MAAM,eAAK,CAAC,IAAI,CACd,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,qBAAqB,EAClD,OAAO,CACR,CAAC;YAEF,OAAO,OAAO,CAAC;SAChB;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,KAAK,CAAC;SACb;IACH,CAAC;CACF;AA9ID,0BA8IC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Address = void 0;
|
|
4
|
+
const general_1 = require("@tomei/general");
|
|
5
|
+
class Address extends general_1.AddressBase {
|
|
6
|
+
constructor(line1, city, postalCode, country) {
|
|
7
|
+
super();
|
|
8
|
+
this.Line1 = line1;
|
|
9
|
+
this.City = city;
|
|
10
|
+
this.PostalCode = postalCode;
|
|
11
|
+
this.Country = country;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.Address = Address;
|
|
15
|
+
//# sourceMappingURL=base.address.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.address.js","sourceRoot":"","sources":["../../src/base/base.address.ts"],"names":[],"mappings":";;;AAAA,4CAA6C;AAE7C,MAAa,OAAQ,SAAQ,qBAAW;IAMtC,YACE,KAAa,EACb,IAAY,EACZ,UAAkB,EAClB,OAAe;QAEf,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;CACF;AAlBD,0BAkBC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RelatedObject = void 0;
|
|
4
|
+
const general_1 = require("@tomei/general");
|
|
5
|
+
class RelatedObject extends general_1.ObjectBase {
|
|
6
|
+
constructor(id, name) {
|
|
7
|
+
super();
|
|
8
|
+
this.Id = id;
|
|
9
|
+
this.Name = name;
|
|
10
|
+
this.Type = 'RelatedObject';
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.RelatedObject = RelatedObject;
|
|
14
|
+
//# sourceMappingURL=base.object.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.object.js","sourceRoot":"","sources":["../../src/base/base.object.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAE5C,MAAa,aAAc,SAAQ,oBAAU;IAK3C,YAAY,EAAU,EAAE,IAAY;QAClC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAC9B,CAAC;CACF;AAXD,sCAWC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { PersonBase, AddressBase } from '@tomei/general';
|
|
2
|
+
export declare class Owner extends PersonBase {
|
|
3
|
+
FullName: string;
|
|
4
|
+
IDNo: string;
|
|
5
|
+
IDType: string;
|
|
6
|
+
Email: string;
|
|
7
|
+
ContactNo: string;
|
|
8
|
+
Address: AddressBase;
|
|
9
|
+
Id: string;
|
|
10
|
+
Name: string;
|
|
11
|
+
constructor(fullName: string, idNo: string, idType: string, email: string, contactNo: string, address: AddressBase, id: string, name: string);
|
|
12
|
+
getDetails(): {
|
|
13
|
+
FullName: string;
|
|
14
|
+
IDNo: string;
|
|
15
|
+
IDType: string;
|
|
16
|
+
Email: string;
|
|
17
|
+
ContactNo: string;
|
|
18
|
+
Address: AddressBase;
|
|
19
|
+
Id: string;
|
|
20
|
+
Name: string;
|
|
21
|
+
};
|
|
22
|
+
getDefaultAddress(): AddressBase;
|
|
23
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Owner = void 0;
|
|
4
|
+
const general_1 = require("@tomei/general");
|
|
5
|
+
class Owner extends general_1.PersonBase {
|
|
6
|
+
constructor(fullName, idNo, idType, email, contactNo, address, id, name) {
|
|
7
|
+
super();
|
|
8
|
+
this.FullName = fullName;
|
|
9
|
+
this.IDNo = idNo;
|
|
10
|
+
this.IDType = idType;
|
|
11
|
+
this.Email = email;
|
|
12
|
+
this.ContactNo = contactNo;
|
|
13
|
+
this.Address = address;
|
|
14
|
+
this.Id = id;
|
|
15
|
+
this.Name = name;
|
|
16
|
+
}
|
|
17
|
+
getDetails() {
|
|
18
|
+
return {
|
|
19
|
+
FullName: this.FullName,
|
|
20
|
+
IDNo: this.IDNo,
|
|
21
|
+
IDType: this.IDType,
|
|
22
|
+
Email: this.Email,
|
|
23
|
+
ContactNo: this.ContactNo,
|
|
24
|
+
Address: this.Address,
|
|
25
|
+
Id: this.Id,
|
|
26
|
+
Name: this.Name,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
getDefaultAddress() {
|
|
30
|
+
return this.Address;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.Owner = Owner;
|
|
34
|
+
//# sourceMappingURL=base.owner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.owner.js","sourceRoot":"","sources":["../../src/base/base.owner.ts"],"names":[],"mappings":";;;AAAA,4CAAyD;AAEzD,MAAa,KAAM,SAAQ,oBAAU;IAUnC,YACE,QAAgB,EAChB,IAAY,EACZ,MAAc,EACd,KAAa,EACb,SAAiB,EACjB,OAAoB,EACpB,EAAU,EACV,IAAY;QAEZ,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,UAAU;QAUR,OAAO;YACL,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC;IACJ,CAAC;IAED,iBAAiB;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;CACF;AAxDD,sBAwDC"}
|
package/dist/base/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
export {
|
|
1
|
+
import { RelatedObject } from './base.object';
|
|
2
|
+
import { Owner } from './base.owner';
|
|
3
|
+
import { Address } from './base.address';
|
|
4
|
+
export { RelatedObject, Owner, Address };
|
package/dist/base/index.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Owner = exports.RelatedObject = void 0;
|
|
4
|
-
const base_object_1 = require("
|
|
3
|
+
exports.Address = exports.Owner = exports.RelatedObject = void 0;
|
|
4
|
+
const base_object_1 = require("./base.object");
|
|
5
5
|
Object.defineProperty(exports, "RelatedObject", { enumerable: true, get: function () { return base_object_1.RelatedObject; } });
|
|
6
|
-
const base_owner_1 = require("
|
|
6
|
+
const base_owner_1 = require("./base.owner");
|
|
7
7
|
Object.defineProperty(exports, "Owner", { enumerable: true, get: function () { return base_owner_1.Owner; } });
|
|
8
|
+
const base_address_1 = require("./base.address");
|
|
9
|
+
Object.defineProperty(exports, "Address", { enumerable: true, get: function () { return base_address_1.Address; } });
|
|
8
10
|
//# sourceMappingURL=index.js.map
|
package/dist/base/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/base/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/base/index.ts"],"names":[],"mappings":";;;AAAA,+CAA8C;AAGrC,8FAHA,2BAAa,OAGA;AAFtB,6CAAqC;AAEb,sFAFf,kBAAK,OAEe;AAD7B,iDAAyC;AACV,wFADtB,sBAAO,OACsB"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AddressBase, PersonBase } from '@tomei/general';
|
|
2
|
+
import { IAccountSystem } from '../interfaces';
|
|
3
|
+
import { FinanceCustomerRepository } from './finance-customer.repository';
|
|
4
|
+
import { ICustomerRepository } from './interfaces/customer.repository.interface';
|
|
5
|
+
export declare class Customer extends PersonBase {
|
|
6
|
+
private CustomerId;
|
|
7
|
+
private AccSystemId;
|
|
8
|
+
FullName: string;
|
|
9
|
+
IDNo: string;
|
|
10
|
+
IDType: string;
|
|
11
|
+
Email: string;
|
|
12
|
+
ContactNo: string;
|
|
13
|
+
Address: AddressBase;
|
|
14
|
+
Id: string;
|
|
15
|
+
Name: string;
|
|
16
|
+
financeCustomerRepository: FinanceCustomerRepository;
|
|
17
|
+
customerRepository: ICustomerRepository<any>;
|
|
18
|
+
customerAddressRepository: any;
|
|
19
|
+
accountingSystem: IAccountSystem;
|
|
20
|
+
person: PersonBase;
|
|
21
|
+
systemCode: string;
|
|
22
|
+
constructor(financeCustomerRepository: FinanceCustomerRepository, customerRepository: ICustomerRepository<any>, customerAddressRepository: any, accountingSystem: IAccountSystem, systemCode: string, person?: PersonBase);
|
|
23
|
+
init(person: PersonBase): void;
|
|
24
|
+
getDetails(): Promise<any>;
|
|
25
|
+
getDefaultAddress(): Promise<any>;
|
|
26
|
+
getCustomerId(): Promise<any>;
|
|
27
|
+
create(): Promise<any>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Customer = void 0;
|
|
4
|
+
const general_1 = require("@tomei/general");
|
|
5
|
+
const base_address_1 = require("../base/base.address");
|
|
6
|
+
const config_1 = require("../config");
|
|
7
|
+
class Customer extends general_1.PersonBase {
|
|
8
|
+
constructor(financeCustomerRepository, customerRepository, customerAddressRepository, accountingSystem, systemCode, person) {
|
|
9
|
+
super();
|
|
10
|
+
this.financeCustomerRepository = financeCustomerRepository;
|
|
11
|
+
this.customerRepository = customerRepository;
|
|
12
|
+
this.customerAddressRepository = customerAddressRepository;
|
|
13
|
+
this.accountingSystem = accountingSystem;
|
|
14
|
+
this.systemCode = systemCode;
|
|
15
|
+
if (person) {
|
|
16
|
+
this.person = person;
|
|
17
|
+
this.init(person);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
init(person) {
|
|
21
|
+
this.FullName = person.FullName;
|
|
22
|
+
this.IDNo = person.IDNo;
|
|
23
|
+
this.IDType = person.IDType;
|
|
24
|
+
this.Email = person.Email;
|
|
25
|
+
this.ContactNo = person.ContactNo;
|
|
26
|
+
this.Address = person.Address;
|
|
27
|
+
}
|
|
28
|
+
async getDetails() {
|
|
29
|
+
if (!this.FullName ||
|
|
30
|
+
!this.IDNo ||
|
|
31
|
+
!this.IDType ||
|
|
32
|
+
!this.Email ||
|
|
33
|
+
!this.ContactNo ||
|
|
34
|
+
!this.Address) {
|
|
35
|
+
const customerData = await this.customerRepository.findOne({
|
|
36
|
+
where: { IdNo: this.IDNo },
|
|
37
|
+
});
|
|
38
|
+
if (!customerData) {
|
|
39
|
+
throw new Error('Customer must be created first.');
|
|
40
|
+
}
|
|
41
|
+
this.FullName = customerData.FullName;
|
|
42
|
+
this.IDNo = customerData.IDNo;
|
|
43
|
+
this.IDType = customerData.IDType;
|
|
44
|
+
this.Email = customerData.Email;
|
|
45
|
+
this.ContactNo = customerData.ContactNo;
|
|
46
|
+
this.Id = customerData.CustomerId;
|
|
47
|
+
this.Name = customerData.PreferredName;
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
FullName: this.FullName,
|
|
51
|
+
IDNo: this.IDNo,
|
|
52
|
+
IDType: this.IDType,
|
|
53
|
+
Email: this.Email,
|
|
54
|
+
ContactNo: this.ContactNo,
|
|
55
|
+
Address: this.Address,
|
|
56
|
+
Id: this.Id,
|
|
57
|
+
Name: this.Name,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
async getDefaultAddress() {
|
|
61
|
+
if (!this.Address.Line1 ||
|
|
62
|
+
!this.Address.City ||
|
|
63
|
+
!this.Address.PostalCode ||
|
|
64
|
+
!this.Address.Country) {
|
|
65
|
+
const addressData = await this.customerAddressRepository.findOne({
|
|
66
|
+
where: { CustomerId: this.Id, isDefaultYN: 'Y' },
|
|
67
|
+
});
|
|
68
|
+
if (!addressData) {
|
|
69
|
+
throw new Error('Address must be created first.');
|
|
70
|
+
}
|
|
71
|
+
this.Address = new base_address_1.Address(addressData.Address, addressData.City, addressData.PostCode, addressData.Country);
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
Line1: this.Address.Line1,
|
|
75
|
+
City: this.Address.City,
|
|
76
|
+
PostalCode: this.Address.PostalCode,
|
|
77
|
+
Country: this.Address.Country,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
async getCustomerId() {
|
|
81
|
+
if (!this.CustomerId) {
|
|
82
|
+
throw new Error('Finance Customer must be created first.');
|
|
83
|
+
}
|
|
84
|
+
return this.CustomerId;
|
|
85
|
+
}
|
|
86
|
+
async create() {
|
|
87
|
+
try {
|
|
88
|
+
await this.getDetails();
|
|
89
|
+
await this.getDefaultAddress();
|
|
90
|
+
const customerData = await this.accountingSystem.createCustomer({
|
|
91
|
+
FullName: this.FullName,
|
|
92
|
+
Email: this.Email,
|
|
93
|
+
ContractNo: this.ContactNo,
|
|
94
|
+
Address: this.Address,
|
|
95
|
+
});
|
|
96
|
+
this.AccSystemId =
|
|
97
|
+
(0, config_1.getConfig)().systemConfig[this.systemCode].accountingSystem;
|
|
98
|
+
this.CustomerId = customerData.Id;
|
|
99
|
+
return await this.financeCustomerRepository.create({
|
|
100
|
+
CustomerId: customerData.Id,
|
|
101
|
+
AccSystemId: this.AccSystemId,
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
catch (error) {
|
|
105
|
+
throw error;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
exports.Customer = Customer;
|
|
110
|
+
//# sourceMappingURL=customer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customer.js","sourceRoot":"","sources":["../../src/customer/customer.ts"],"names":[],"mappings":";;;AAAA,4CAAyD;AAEzD,uDAA+C;AAG/C,sCAAsC;AAEtC,MAAa,QAAS,SAAQ,oBAAU;IAmBtC,YACE,yBAAoD,EACpD,kBAA4C,E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MAAM,KAAK,CAAC;SACb;IACH,CAAC;CACF;AAjJD,4BAiJC"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=customer.repository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customer.repository.js","sourceRoot":"","sources":["../../src/customer/customer.repository.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.FinanceCustomerModel = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
15
|
+
let FinanceCustomerModel = class FinanceCustomerModel extends sequelize_typescript_1.Model {
|
|
16
|
+
};
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'CustomerId' }),
|
|
19
|
+
(0, sequelize_typescript_1.Column)({
|
|
20
|
+
primaryKey: true,
|
|
21
|
+
allowNull: false,
|
|
22
|
+
type: sequelize_typescript_1.DataType.STRING(30),
|
|
23
|
+
}),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], FinanceCustomerModel.prototype, "CustomerId", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, swagger_1.ApiProperty)({
|
|
28
|
+
type: String,
|
|
29
|
+
description: 'Account System Id eg. "EZC", "CRM"',
|
|
30
|
+
}),
|
|
31
|
+
(0, sequelize_typescript_1.Column)({
|
|
32
|
+
allowNull: false,
|
|
33
|
+
type: sequelize_typescript_1.DataType.STRING(30),
|
|
34
|
+
}),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], FinanceCustomerModel.prototype, "AccSystemId", void 0);
|
|
37
|
+
FinanceCustomerModel = __decorate([
|
|
38
|
+
(0, sequelize_typescript_1.Table)({ tableName: 'finance_Customer', createdAt: false, updatedAt: false })
|
|
39
|
+
], FinanceCustomerModel);
|
|
40
|
+
exports.FinanceCustomerModel = FinanceCustomerModel;
|
|
41
|
+
//# sourceMappingURL=customer.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customer.entity.js","sourceRoot":"","sources":["../../../src/customer/entities/customer.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,+DAAsE;AAG/D,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,4BAAK;CAkB9C,CAAA;AAjBC;IAAC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC;IACxD,IAAA,6BAAM,EAAC;QACN,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,+BAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;KAC1B,CAAC;;wDACiB;AAEnB;IAAC,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,oCAAoC;KAClD,CAAC;IACD,IAAA,6BAAM,EAAC;QACN,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,+BAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;KAC1B,CAAC;;yDACkB;AAjBT,oBAAoB;IADhC,IAAA,4BAAK,EAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;GAChE,oBAAoB,CAkBhC;AAlBY,oDAAoB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FinanceCustomerModel } from './entities/customer.entity';
|
|
2
|
+
import { IFinanceCustomerAttr } from './interfaces/finance-customer-attr.interface';
|
|
3
|
+
import { IFinanceCustomerRepository } from './interfaces/finance-customer.repository.interface';
|
|
4
|
+
export declare class FinanceCustomerRepository implements IFinanceCustomerRepository<FinanceCustomerModel> {
|
|
5
|
+
private readonly customerModel;
|
|
6
|
+
constructor(customerModel: typeof FinanceCustomerModel);
|
|
7
|
+
create(data: IFinanceCustomerAttr | any, options?: any): Promise<FinanceCustomerModel> | any;
|
|
8
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.FinanceCustomerRepository = void 0;
|
|
16
|
+
const sequelize_1 = require("@nestjs/sequelize");
|
|
17
|
+
const customer_entity_1 = require("./entities/customer.entity");
|
|
18
|
+
let FinanceCustomerRepository = class FinanceCustomerRepository {
|
|
19
|
+
constructor(customerModel) {
|
|
20
|
+
this.customerModel = customerModel;
|
|
21
|
+
}
|
|
22
|
+
create(data, options) {
|
|
23
|
+
return this.customerModel.create(data, options);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
FinanceCustomerRepository = __decorate([
|
|
27
|
+
__param(0, (0, sequelize_1.InjectModel)(customer_entity_1.FinanceCustomerModel)),
|
|
28
|
+
__metadata("design:paramtypes", [Object])
|
|
29
|
+
], FinanceCustomerRepository);
|
|
30
|
+
exports.FinanceCustomerRepository = FinanceCustomerRepository;
|
|
31
|
+
//# sourceMappingURL=finance-customer.repository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"finance-customer.repository.js","sourceRoot":"","sources":["../../src/customer/finance-customer.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,iDAAgD;AAChD,gEAAkE;AAI3D,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;IAGpC,YAEmB,aAA0C;QAA1C,kBAAa,GAAb,aAAa,CAA6B;IAC1D,CAAC;IAEJ,MAAM,CACJ,IAAgC,EAChC,OAAa;QAEb,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC;CACF,CAAA;AAdY,yBAAyB;IAIjC,WAAA,IAAA,uBAAW,EAAC,sCAAoB,CAAC,CAAA;;GAJzB,yBAAyB,CAcrC;AAdY,8DAAyB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IFinanceCustomerRepository } from './interfaces/finance-customer.repository.interface';
|
|
2
|
+
import { IFinanceCustomerAttr } from './interfaces/finance-customer-attr.interface';
|
|
3
|
+
import { FinanceCustomerModel } from './entities/customer.entity';
|
|
4
|
+
import { ICustomerRepository } from './interfaces/customer.repository.interface';
|
|
5
|
+
import { FinanceCustomerRepository } from './finance-customer.repository';
|
|
6
|
+
import { Customer } from './customer';
|
|
7
|
+
export { IFinanceCustomerRepository, IFinanceCustomerAttr, FinanceCustomerModel, ICustomerRepository, FinanceCustomerRepository, Customer, };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Customer = exports.FinanceCustomerRepository = exports.FinanceCustomerModel = void 0;
|
|
4
|
+
const customer_entity_1 = require("./entities/customer.entity");
|
|
5
|
+
Object.defineProperty(exports, "FinanceCustomerModel", { enumerable: true, get: function () { return customer_entity_1.FinanceCustomerModel; } });
|
|
6
|
+
const finance_customer_repository_1 = require("./finance-customer.repository");
|
|
7
|
+
Object.defineProperty(exports, "FinanceCustomerRepository", { enumerable: true, get: function () { return finance_customer_repository_1.FinanceCustomerRepository; } });
|
|
8
|
+
const customer_1 = require("./customer");
|
|
9
|
+
Object.defineProperty(exports, "Customer", { enumerable: true, get: function () { return customer_1.Customer; } });
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/customer/index.ts"],"names":[],"mappings":";;;AAEA,gEAAkE;AAQhE,qGARO,sCAAoB,OAQP;AANtB,+EAA0E;AAQxE,0GARO,uDAAyB,OAQP;AAP3B,yCAAsC;AAQpC,yFARO,mBAAQ,OAQP"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customer.repository.interface.js","sourceRoot":"","sources":["../../../src/customer/interfaces/customer.repository.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"finance-customer-attr.interface.js","sourceRoot":"","sources":["../../../src/customer/interfaces/finance-customer-attr.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"finance-customer.repository.interface.js","sourceRoot":"","sources":["../../../src/customer/interfaces/finance-customer.repository.interface.ts"],"names":[],"mappings":""}
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -17,8 +17,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
exports.getConfig = void 0;
|
|
18
18
|
__exportStar(require("./base"), exports);
|
|
19
19
|
__exportStar(require("./account"), exports);
|
|
20
|
+
__exportStar(require("./customer"), exports);
|
|
20
21
|
__exportStar(require("./quickbook-client"), exports);
|
|
21
22
|
__exportStar(require("./enum"), exports);
|
|
23
|
+
__exportStar(require("./interfaces"), exports);
|
|
22
24
|
var config_1 = require("./config");
|
|
23
25
|
Object.defineProperty(exports, "getConfig", { enumerable: true, get: function () { return config_1.getConfig; } });
|
|
24
26
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,4CAA0B;AAC1B,qDAAmC;AACnC,yCAAuB;AACvB,mCAAqC;AAA5B,mGAAA,SAAS,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,4CAA0B;AAC1B,6CAA2B;AAC3B,qDAAmC;AACnC,yCAAuB;AACvB,+CAA6B;AAC7B,mCAAqC;AAA5B,mGAAA,SAAS,OAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface IAccountSystem {
|
|
2
|
+
createAccount(payload: any): Promise<any>;
|
|
3
|
+
createInvoice(payload: any): Promise<any>;
|
|
4
|
+
createDebitNote(payload: any): Promise<any>;
|
|
5
|
+
createCreditNote(payload: any): Promise<any>;
|
|
6
|
+
postTransaction(payload: any): Promise<any>;
|
|
7
|
+
createCustomer(payload: any): Promise<any>;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-system.interface.js","sourceRoot":"","sources":["../../src/interfaces/account-system.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customer.repository.interface.js","sourceRoot":"","sources":["../../src/interfaces/customer.repository.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"finance-customer.repository.interface.js","sourceRoot":"","sources":["../../src/interfaces/finance-customer.repository.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":""}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=systemConfig.interface.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"systemConfig.interface.js","sourceRoot":"","sources":["../../src/interfaces/systemConfig.interface.ts"],"names":[],"mappings":""}
|