@arrowsphere/api-client 3.20.0-rc.2 → 3.20.0-rc.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/CHANGELOG.md +0 -6
- package/build/contact/contactClient.d.ts +1 -6
- package/build/contact/contactClient.js +0 -1
- package/build/contact/entities/contact.d.ts +0 -3
- package/build/contact/entities/contact.js +2 -9
- package/build/customers/customersClient.d.ts +29 -0
- package/build/customers/customersClient.js +32 -0
- package/build/customers/entities/customers/customerContact/customerContact.d.ts +52 -0
- package/build/customers/entities/customers/customerContact/customerContact.js +111 -0
- package/build/customers/entities/customers/customerContact/customerContactList.d.ts +9 -0
- package/build/customers/entities/customers/customerContact/customerContactList.js +35 -0
- package/build/customers/entities/invitations/contact/invitationContact.d.ts +2 -6
- package/build/customers/entities/invitations/contact/invitationContact.js +2 -9
- package/build/customers/index.d.ts +2 -0
- package/build/customers/index.js +2 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,12 +3,6 @@
|
|
|
3
3
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
4
4
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
5
5
|
|
|
6
|
-
## [3.20.0] - 2023-01-30
|
|
7
|
-
|
|
8
|
-
### Changed
|
|
9
|
-
|
|
10
|
-
- Add id on invitation contact
|
|
11
|
-
|
|
12
6
|
## [3.19.0] - 2023-01-23
|
|
13
7
|
|
|
14
8
|
### Changed
|
|
@@ -4,7 +4,6 @@ import { ContactCreate } from './entities/contactCreate';
|
|
|
4
4
|
import { Contact } from './entities/contact';
|
|
5
5
|
import { ContactList } from './entities/contactList';
|
|
6
6
|
export declare enum ContactRequestFields {
|
|
7
|
-
COLUMN_USERNAME = "username",
|
|
8
7
|
COLUMN_FIRSTNAME = "firstname",
|
|
9
8
|
COLUMN_LASTNAME = "lastname",
|
|
10
9
|
COLUMN_EMAIL = "email",
|
|
@@ -14,7 +13,6 @@ export declare enum ContactRequestFields {
|
|
|
14
13
|
COLUMN_ROLE = "role"
|
|
15
14
|
}
|
|
16
15
|
export declare type ContactRequestType = {
|
|
17
|
-
[ContactRequestFields.COLUMN_USERNAME]?: string;
|
|
18
16
|
[ContactRequestFields.COLUMN_FIRSTNAME]: string;
|
|
19
17
|
[ContactRequestFields.COLUMN_LASTNAME]: string;
|
|
20
18
|
[ContactRequestFields.COLUMN_EMAIL]: string;
|
|
@@ -23,9 +21,6 @@ export declare type ContactRequestType = {
|
|
|
23
21
|
[ContactRequestFields.COLUMN_TYPE]: string;
|
|
24
22
|
[ContactRequestFields.COLUMN_ROLE]: string;
|
|
25
23
|
};
|
|
26
|
-
export declare type ContactUpdateRequestType = {
|
|
27
|
-
[Property in keyof ContactRequestType]?: ContactRequestType[Property];
|
|
28
|
-
};
|
|
29
24
|
export declare class ContactClient extends AbstractClient {
|
|
30
25
|
/**
|
|
31
26
|
* The base path of the API
|
|
@@ -34,5 +29,5 @@ export declare class ContactClient extends AbstractClient {
|
|
|
34
29
|
createContact(postData: ContactRequestType, parameters?: Parameters): Promise<GetResult<ContactCreate>>;
|
|
35
30
|
listContact(perPage?: number, page?: number, parameters?: Parameters): Promise<GetResult<ContactList>>;
|
|
36
31
|
getContact(contactReference: string, parameters?: Parameters): Promise<GetResult<Contact>>;
|
|
37
|
-
updateContact(contactReference: string, patchData:
|
|
32
|
+
updateContact(contactReference: string, patchData: ContactRequestType, parameters?: Parameters): Promise<GetResult<Contact>>;
|
|
38
33
|
}
|
|
@@ -8,7 +8,6 @@ const contact_1 = require("./entities/contact");
|
|
|
8
8
|
const contactList_1 = require("./entities/contactList");
|
|
9
9
|
var ContactRequestFields;
|
|
10
10
|
(function (ContactRequestFields) {
|
|
11
|
-
ContactRequestFields["COLUMN_USERNAME"] = "username";
|
|
12
11
|
ContactRequestFields["COLUMN_FIRSTNAME"] = "firstname";
|
|
13
12
|
ContactRequestFields["COLUMN_LASTNAME"] = "lastname";
|
|
14
13
|
ContactRequestFields["COLUMN_EMAIL"] = "email";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { AbstractEntity } from '../../abstractEntity';
|
|
2
2
|
export declare enum ContactFields {
|
|
3
|
-
COLUMN_USERNAME = "username",
|
|
4
3
|
COLUMN_ID = "id",
|
|
5
4
|
COLUMN_COMPANY_ID = "companyId",
|
|
6
5
|
COLUMN_RESELLER = "reseller",
|
|
@@ -14,7 +13,6 @@ export declare enum ContactFields {
|
|
|
14
13
|
COLUMN_STATUS = "status"
|
|
15
14
|
}
|
|
16
15
|
export declare type ContactType = {
|
|
17
|
-
[ContactFields.COLUMN_USERNAME]: string | null;
|
|
18
16
|
[ContactFields.COLUMN_ID]: number;
|
|
19
17
|
[ContactFields.COLUMN_COMPANY_ID]: number;
|
|
20
18
|
[ContactFields.COLUMN_RESELLER]: string;
|
|
@@ -30,7 +28,6 @@ export declare type ContactType = {
|
|
|
30
28
|
export declare class Contact extends AbstractEntity<ContactType> {
|
|
31
29
|
#private;
|
|
32
30
|
constructor(contactDataInput: ContactType);
|
|
33
|
-
get username(): string | null;
|
|
34
31
|
get id(): number;
|
|
35
32
|
get companyId(): number;
|
|
36
33
|
get reseller(): string;
|
|
@@ -12,13 +12,12 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
12
12
|
}
|
|
13
13
|
return privateMap.get(receiver);
|
|
14
14
|
};
|
|
15
|
-
var
|
|
15
|
+
var _id, _companyId, _reseller, _firstname, _lastname, _email, _phone, _erpId, _type, _role, _status;
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.Contact = exports.ContactFields = void 0;
|
|
18
18
|
const abstractEntity_1 = require("../../abstractEntity");
|
|
19
19
|
var ContactFields;
|
|
20
20
|
(function (ContactFields) {
|
|
21
|
-
ContactFields["COLUMN_USERNAME"] = "username";
|
|
22
21
|
ContactFields["COLUMN_ID"] = "id";
|
|
23
22
|
ContactFields["COLUMN_COMPANY_ID"] = "companyId";
|
|
24
23
|
ContactFields["COLUMN_RESELLER"] = "reseller";
|
|
@@ -34,7 +33,6 @@ var ContactFields;
|
|
|
34
33
|
class Contact extends abstractEntity_1.AbstractEntity {
|
|
35
34
|
constructor(contactDataInput) {
|
|
36
35
|
super(contactDataInput);
|
|
37
|
-
_username.set(this, void 0);
|
|
38
36
|
_id.set(this, void 0);
|
|
39
37
|
_companyId.set(this, void 0);
|
|
40
38
|
_reseller.set(this, void 0);
|
|
@@ -46,7 +44,6 @@ class Contact extends abstractEntity_1.AbstractEntity {
|
|
|
46
44
|
_type.set(this, void 0);
|
|
47
45
|
_role.set(this, void 0);
|
|
48
46
|
_status.set(this, void 0);
|
|
49
|
-
__classPrivateFieldSet(this, _username, contactDataInput[ContactFields.COLUMN_USERNAME]);
|
|
50
47
|
__classPrivateFieldSet(this, _id, contactDataInput[ContactFields.COLUMN_ID]);
|
|
51
48
|
__classPrivateFieldSet(this, _companyId, contactDataInput[ContactFields.COLUMN_COMPANY_ID]);
|
|
52
49
|
__classPrivateFieldSet(this, _reseller, contactDataInput[ContactFields.COLUMN_RESELLER]);
|
|
@@ -59,9 +56,6 @@ class Contact extends abstractEntity_1.AbstractEntity {
|
|
|
59
56
|
__classPrivateFieldSet(this, _role, contactDataInput[ContactFields.COLUMN_ROLE]);
|
|
60
57
|
__classPrivateFieldSet(this, _status, contactDataInput[ContactFields.COLUMN_STATUS]);
|
|
61
58
|
}
|
|
62
|
-
get username() {
|
|
63
|
-
return __classPrivateFieldGet(this, _username);
|
|
64
|
-
}
|
|
65
59
|
get id() {
|
|
66
60
|
return __classPrivateFieldGet(this, _id);
|
|
67
61
|
}
|
|
@@ -97,7 +91,6 @@ class Contact extends abstractEntity_1.AbstractEntity {
|
|
|
97
91
|
}
|
|
98
92
|
toJSON() {
|
|
99
93
|
return {
|
|
100
|
-
[ContactFields.COLUMN_USERNAME]: this.username,
|
|
101
94
|
[ContactFields.COLUMN_ID]: this.id,
|
|
102
95
|
[ContactFields.COLUMN_COMPANY_ID]: this.companyId,
|
|
103
96
|
[ContactFields.COLUMN_RESELLER]: this.reseller,
|
|
@@ -113,5 +106,5 @@ class Contact extends abstractEntity_1.AbstractEntity {
|
|
|
113
106
|
}
|
|
114
107
|
}
|
|
115
108
|
exports.Contact = Contact;
|
|
116
|
-
|
|
109
|
+
_id = new WeakMap(), _companyId = new WeakMap(), _reseller = new WeakMap(), _firstname = new WeakMap(), _lastname = new WeakMap(), _email = new WeakMap(), _phone = new WeakMap(), _erpId = new WeakMap(), _type = new WeakMap(), _role = new WeakMap(), _status = new WeakMap();
|
|
117
110
|
//# sourceMappingURL=contact.js.map
|
|
@@ -3,6 +3,29 @@ import { GetResult } from '../getResult';
|
|
|
3
3
|
import { DataCustomers } from './entities/dataCustomers';
|
|
4
4
|
import { DataInvitation } from './entities/dataInvitation';
|
|
5
5
|
import { DataListOrders } from '../orders';
|
|
6
|
+
import { CustomerContactList } from './entities/customers/customerContact/customerContactList';
|
|
7
|
+
import { CustomerContact, CustomerContactRoleType, CustomerContactTypeType } from './entities/customers/customerContact/customerContact';
|
|
8
|
+
declare enum CustomerContactPayloadFields {
|
|
9
|
+
COLUMN_FIRST_NAME = "firstName",
|
|
10
|
+
COLUMN_LAST_NAME = "lastName",
|
|
11
|
+
COLUMN_EMAIL = "email",
|
|
12
|
+
COLUMN_PHONE = "phone",
|
|
13
|
+
COLUMN_USERNAME = "username",
|
|
14
|
+
COLUMN_TYPE = "type",
|
|
15
|
+
COLUMN_ROLE = "role"
|
|
16
|
+
}
|
|
17
|
+
declare type PostCustomerContactPayload = {
|
|
18
|
+
[CustomerContactPayloadFields.COLUMN_FIRST_NAME]: string;
|
|
19
|
+
[CustomerContactPayloadFields.COLUMN_LAST_NAME]: string;
|
|
20
|
+
[CustomerContactPayloadFields.COLUMN_EMAIL]: string;
|
|
21
|
+
[CustomerContactPayloadFields.COLUMN_USERNAME]: string;
|
|
22
|
+
[CustomerContactPayloadFields.COLUMN_PHONE]: string;
|
|
23
|
+
[CustomerContactPayloadFields.COLUMN_TYPE]: CustomerContactTypeType;
|
|
24
|
+
[CustomerContactPayloadFields.COLUMN_ROLE]: CustomerContactRoleType;
|
|
25
|
+
};
|
|
26
|
+
declare type PatchCustomerContactPayload = {
|
|
27
|
+
[Property in keyof PostCustomerContactPayload]?: PostCustomerContactPayload[Property];
|
|
28
|
+
};
|
|
6
29
|
export declare class CustomersClient extends AbstractClient {
|
|
7
30
|
/**
|
|
8
31
|
* The base path of the API
|
|
@@ -11,4 +34,10 @@ export declare class CustomersClient extends AbstractClient {
|
|
|
11
34
|
getCustomers(parameters?: Parameters): Promise<GetResult<DataCustomers>>;
|
|
12
35
|
getCustomerOrders(customerRef: string, perPage?: number, page?: number, parameters?: Parameters): Promise<GetResult<DataListOrders>>;
|
|
13
36
|
getCustomerInvitation(codeInvitation: string, parameters?: Parameters): Promise<GetResult<DataInvitation>>;
|
|
37
|
+
getCustomerContactList(customerReference: string, parameters?: Parameters): Promise<GetResult<CustomerContactList>>;
|
|
38
|
+
postCustomerContact(customerReference: string, payload: PostCustomerContactPayload, parameters?: Parameters): Promise<GetResult<CustomerContact>>;
|
|
39
|
+
getCustomerContact(customerReference: string, contactReference: string, parameters?: Parameters): Promise<GetResult<CustomerContact>>;
|
|
40
|
+
deleteCustomerContact(customerReference: string, contactReference: string, parameters?: Parameters): Promise<void>;
|
|
41
|
+
patchCustomerContact(customerReference: string, contactReference: string, payload: PatchCustomerContactPayload, parameters?: Parameters): Promise<GetResult<CustomerContact>>;
|
|
14
42
|
}
|
|
43
|
+
export {};
|
|
@@ -6,6 +6,18 @@ const getResult_1 = require("../getResult");
|
|
|
6
6
|
const dataCustomers_1 = require("./entities/dataCustomers");
|
|
7
7
|
const dataInvitation_1 = require("./entities/dataInvitation");
|
|
8
8
|
const orders_1 = require("../orders");
|
|
9
|
+
const customerContactList_1 = require("./entities/customers/customerContact/customerContactList");
|
|
10
|
+
const customerContact_1 = require("./entities/customers/customerContact/customerContact");
|
|
11
|
+
var CustomerContactPayloadFields;
|
|
12
|
+
(function (CustomerContactPayloadFields) {
|
|
13
|
+
CustomerContactPayloadFields["COLUMN_FIRST_NAME"] = "firstName";
|
|
14
|
+
CustomerContactPayloadFields["COLUMN_LAST_NAME"] = "lastName";
|
|
15
|
+
CustomerContactPayloadFields["COLUMN_EMAIL"] = "email";
|
|
16
|
+
CustomerContactPayloadFields["COLUMN_PHONE"] = "phone";
|
|
17
|
+
CustomerContactPayloadFields["COLUMN_USERNAME"] = "username";
|
|
18
|
+
CustomerContactPayloadFields["COLUMN_TYPE"] = "type";
|
|
19
|
+
CustomerContactPayloadFields["COLUMN_ROLE"] = "role";
|
|
20
|
+
})(CustomerContactPayloadFields || (CustomerContactPayloadFields = {}));
|
|
9
21
|
class CustomersClient extends abstractClient_1.AbstractClient {
|
|
10
22
|
constructor() {
|
|
11
23
|
super(...arguments);
|
|
@@ -27,6 +39,26 @@ class CustomersClient extends abstractClient_1.AbstractClient {
|
|
|
27
39
|
this.path = `/invitations/${codeInvitation}`;
|
|
28
40
|
return new getResult_1.GetResult(dataInvitation_1.DataInvitation, await this.get(parameters));
|
|
29
41
|
}
|
|
42
|
+
async getCustomerContactList(customerReference, parameters = {}) {
|
|
43
|
+
this.path = `/${customerReference}/contacts`;
|
|
44
|
+
return new getResult_1.GetResult(customerContactList_1.CustomerContactList, await this.get(parameters));
|
|
45
|
+
}
|
|
46
|
+
async postCustomerContact(customerReference, payload, parameters = {}) {
|
|
47
|
+
this.path = `/${customerReference}/contacts`;
|
|
48
|
+
return new getResult_1.GetResult(customerContact_1.CustomerContact, await this.post(payload, parameters));
|
|
49
|
+
}
|
|
50
|
+
async getCustomerContact(customerReference, contactReference, parameters = {}) {
|
|
51
|
+
this.path = `/${customerReference}/contacts/${contactReference}`;
|
|
52
|
+
return new getResult_1.GetResult(customerContact_1.CustomerContact, await this.get(parameters));
|
|
53
|
+
}
|
|
54
|
+
async deleteCustomerContact(customerReference, contactReference, parameters = {}) {
|
|
55
|
+
this.path = `/${customerReference}/contacts/${contactReference}`;
|
|
56
|
+
return await this.delete(parameters);
|
|
57
|
+
}
|
|
58
|
+
async patchCustomerContact(customerReference, contactReference, payload, parameters = {}) {
|
|
59
|
+
this.path = `/${customerReference}/contacts/${contactReference}`;
|
|
60
|
+
return new getResult_1.GetResult(customerContact_1.CustomerContact, await this.patch(payload, parameters));
|
|
61
|
+
}
|
|
30
62
|
}
|
|
31
63
|
exports.CustomersClient = CustomersClient;
|
|
32
64
|
//# sourceMappingURL=customersClient.js.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../../../abstractEntity';
|
|
2
|
+
export declare type CustomerContactRoleType = CustomerContactRoleEnum | string;
|
|
3
|
+
export declare enum CustomerContactRoleEnum {
|
|
4
|
+
PRIMARY = "primary",
|
|
5
|
+
MICROSOFT_CUSTOMER_AGREEMENT = "MicrosoftCustomerAgreement"
|
|
6
|
+
}
|
|
7
|
+
export declare type CustomerContactTypeType = CustomerContactTypeEnum | string;
|
|
8
|
+
export declare enum CustomerContactTypeEnum {
|
|
9
|
+
TECHNICAL = "Technical",
|
|
10
|
+
FIELD_SALES = "Field Sales",
|
|
11
|
+
MARKETING = "Marketing",
|
|
12
|
+
OPERATIONS = "Operations",
|
|
13
|
+
MANAGEMENT = "Management",
|
|
14
|
+
INSIDE_SALES = "Inside Sales",
|
|
15
|
+
OTHER = "Other"
|
|
16
|
+
}
|
|
17
|
+
export declare enum CustomerContactFields {
|
|
18
|
+
COLUMN_REFERENCE = "reference",
|
|
19
|
+
COLUMN_FIRST_NAME = "firstName",
|
|
20
|
+
COLUMN_LAST_NAME = "lastName",
|
|
21
|
+
COLUMN_EMAIL = "email",
|
|
22
|
+
COLUMN_PHONE = "phone",
|
|
23
|
+
COLUMN_USERNAME = "username",
|
|
24
|
+
COLUMN_TYPE = "type",
|
|
25
|
+
COLUMN_ROLE = "role",
|
|
26
|
+
COLUMN_IS_ACTIVE = "isActive"
|
|
27
|
+
}
|
|
28
|
+
export declare type CustomerContactType = {
|
|
29
|
+
[CustomerContactFields.COLUMN_REFERENCE]: string;
|
|
30
|
+
[CustomerContactFields.COLUMN_FIRST_NAME]: string;
|
|
31
|
+
[CustomerContactFields.COLUMN_LAST_NAME]: string;
|
|
32
|
+
[CustomerContactFields.COLUMN_EMAIL]: string;
|
|
33
|
+
[CustomerContactFields.COLUMN_PHONE]: string;
|
|
34
|
+
[CustomerContactFields.COLUMN_USERNAME]?: string;
|
|
35
|
+
[CustomerContactFields.COLUMN_TYPE]: string;
|
|
36
|
+
[CustomerContactFields.COLUMN_ROLE]: string;
|
|
37
|
+
[CustomerContactFields.COLUMN_IS_ACTIVE]: boolean;
|
|
38
|
+
};
|
|
39
|
+
export declare class CustomerContact extends AbstractEntity<CustomerContactType> {
|
|
40
|
+
#private;
|
|
41
|
+
constructor(getCustomerContactDataInput: CustomerContactType);
|
|
42
|
+
get reference(): string;
|
|
43
|
+
get firstName(): string;
|
|
44
|
+
get lastName(): string;
|
|
45
|
+
get email(): string;
|
|
46
|
+
get phone(): string;
|
|
47
|
+
get username(): string | undefined;
|
|
48
|
+
get type(): string;
|
|
49
|
+
get role(): string;
|
|
50
|
+
get isActive(): boolean;
|
|
51
|
+
toJSON(): CustomerContactType;
|
|
52
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, privateMap, value) {
|
|
3
|
+
if (!privateMap.has(receiver)) {
|
|
4
|
+
throw new TypeError("attempted to set private field on non-instance");
|
|
5
|
+
}
|
|
6
|
+
privateMap.set(receiver, value);
|
|
7
|
+
return value;
|
|
8
|
+
};
|
|
9
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, privateMap) {
|
|
10
|
+
if (!privateMap.has(receiver)) {
|
|
11
|
+
throw new TypeError("attempted to get private field on non-instance");
|
|
12
|
+
}
|
|
13
|
+
return privateMap.get(receiver);
|
|
14
|
+
};
|
|
15
|
+
var _reference, _firstName, _lastName, _email, _phone, _username, _type, _role, _isActive;
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.CustomerContact = exports.CustomerContactFields = exports.CustomerContactTypeEnum = exports.CustomerContactRoleEnum = void 0;
|
|
18
|
+
const abstractEntity_1 = require("../../../../abstractEntity");
|
|
19
|
+
var CustomerContactRoleEnum;
|
|
20
|
+
(function (CustomerContactRoleEnum) {
|
|
21
|
+
CustomerContactRoleEnum["PRIMARY"] = "primary";
|
|
22
|
+
CustomerContactRoleEnum["MICROSOFT_CUSTOMER_AGREEMENT"] = "MicrosoftCustomerAgreement";
|
|
23
|
+
})(CustomerContactRoleEnum = exports.CustomerContactRoleEnum || (exports.CustomerContactRoleEnum = {}));
|
|
24
|
+
var CustomerContactTypeEnum;
|
|
25
|
+
(function (CustomerContactTypeEnum) {
|
|
26
|
+
CustomerContactTypeEnum["TECHNICAL"] = "Technical";
|
|
27
|
+
CustomerContactTypeEnum["FIELD_SALES"] = "Field Sales";
|
|
28
|
+
CustomerContactTypeEnum["MARKETING"] = "Marketing";
|
|
29
|
+
CustomerContactTypeEnum["OPERATIONS"] = "Operations";
|
|
30
|
+
CustomerContactTypeEnum["MANAGEMENT"] = "Management";
|
|
31
|
+
CustomerContactTypeEnum["INSIDE_SALES"] = "Inside Sales";
|
|
32
|
+
CustomerContactTypeEnum["OTHER"] = "Other";
|
|
33
|
+
})(CustomerContactTypeEnum = exports.CustomerContactTypeEnum || (exports.CustomerContactTypeEnum = {}));
|
|
34
|
+
var CustomerContactFields;
|
|
35
|
+
(function (CustomerContactFields) {
|
|
36
|
+
CustomerContactFields["COLUMN_REFERENCE"] = "reference";
|
|
37
|
+
CustomerContactFields["COLUMN_FIRST_NAME"] = "firstName";
|
|
38
|
+
CustomerContactFields["COLUMN_LAST_NAME"] = "lastName";
|
|
39
|
+
CustomerContactFields["COLUMN_EMAIL"] = "email";
|
|
40
|
+
CustomerContactFields["COLUMN_PHONE"] = "phone";
|
|
41
|
+
CustomerContactFields["COLUMN_USERNAME"] = "username";
|
|
42
|
+
CustomerContactFields["COLUMN_TYPE"] = "type";
|
|
43
|
+
CustomerContactFields["COLUMN_ROLE"] = "role";
|
|
44
|
+
CustomerContactFields["COLUMN_IS_ACTIVE"] = "isActive";
|
|
45
|
+
})(CustomerContactFields = exports.CustomerContactFields || (exports.CustomerContactFields = {}));
|
|
46
|
+
class CustomerContact extends abstractEntity_1.AbstractEntity {
|
|
47
|
+
constructor(getCustomerContactDataInput) {
|
|
48
|
+
super(getCustomerContactDataInput);
|
|
49
|
+
_reference.set(this, void 0);
|
|
50
|
+
_firstName.set(this, void 0);
|
|
51
|
+
_lastName.set(this, void 0);
|
|
52
|
+
_email.set(this, void 0);
|
|
53
|
+
_phone.set(this, void 0);
|
|
54
|
+
_username.set(this, void 0);
|
|
55
|
+
_type.set(this, void 0);
|
|
56
|
+
_role.set(this, void 0);
|
|
57
|
+
_isActive.set(this, void 0);
|
|
58
|
+
__classPrivateFieldSet(this, _reference, getCustomerContactDataInput[CustomerContactFields.COLUMN_REFERENCE]);
|
|
59
|
+
__classPrivateFieldSet(this, _firstName, getCustomerContactDataInput[CustomerContactFields.COLUMN_FIRST_NAME]);
|
|
60
|
+
__classPrivateFieldSet(this, _lastName, getCustomerContactDataInput[CustomerContactFields.COLUMN_LAST_NAME]);
|
|
61
|
+
__classPrivateFieldSet(this, _email, getCustomerContactDataInput[CustomerContactFields.COLUMN_EMAIL]);
|
|
62
|
+
__classPrivateFieldSet(this, _phone, getCustomerContactDataInput[CustomerContactFields.COLUMN_PHONE]);
|
|
63
|
+
__classPrivateFieldSet(this, _username, getCustomerContactDataInput[CustomerContactFields.COLUMN_USERNAME]);
|
|
64
|
+
__classPrivateFieldSet(this, _type, getCustomerContactDataInput[CustomerContactFields.COLUMN_TYPE]);
|
|
65
|
+
__classPrivateFieldSet(this, _role, getCustomerContactDataInput[CustomerContactFields.COLUMN_ROLE]);
|
|
66
|
+
__classPrivateFieldSet(this, _isActive, getCustomerContactDataInput[CustomerContactFields.COLUMN_IS_ACTIVE]);
|
|
67
|
+
}
|
|
68
|
+
get reference() {
|
|
69
|
+
return __classPrivateFieldGet(this, _reference);
|
|
70
|
+
}
|
|
71
|
+
get firstName() {
|
|
72
|
+
return __classPrivateFieldGet(this, _firstName);
|
|
73
|
+
}
|
|
74
|
+
get lastName() {
|
|
75
|
+
return __classPrivateFieldGet(this, _lastName);
|
|
76
|
+
}
|
|
77
|
+
get email() {
|
|
78
|
+
return __classPrivateFieldGet(this, _email);
|
|
79
|
+
}
|
|
80
|
+
get phone() {
|
|
81
|
+
return __classPrivateFieldGet(this, _phone);
|
|
82
|
+
}
|
|
83
|
+
get username() {
|
|
84
|
+
return __classPrivateFieldGet(this, _username);
|
|
85
|
+
}
|
|
86
|
+
get type() {
|
|
87
|
+
return __classPrivateFieldGet(this, _type);
|
|
88
|
+
}
|
|
89
|
+
get role() {
|
|
90
|
+
return __classPrivateFieldGet(this, _role);
|
|
91
|
+
}
|
|
92
|
+
get isActive() {
|
|
93
|
+
return __classPrivateFieldGet(this, _isActive);
|
|
94
|
+
}
|
|
95
|
+
toJSON() {
|
|
96
|
+
return {
|
|
97
|
+
[CustomerContactFields.COLUMN_REFERENCE]: this.reference,
|
|
98
|
+
[CustomerContactFields.COLUMN_FIRST_NAME]: this.firstName,
|
|
99
|
+
[CustomerContactFields.COLUMN_LAST_NAME]: this.lastName,
|
|
100
|
+
[CustomerContactFields.COLUMN_EMAIL]: this.email,
|
|
101
|
+
[CustomerContactFields.COLUMN_PHONE]: this.phone,
|
|
102
|
+
[CustomerContactFields.COLUMN_USERNAME]: this.username,
|
|
103
|
+
[CustomerContactFields.COLUMN_TYPE]: this.type,
|
|
104
|
+
[CustomerContactFields.COLUMN_ROLE]: this.role,
|
|
105
|
+
[CustomerContactFields.COLUMN_IS_ACTIVE]: this.isActive,
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
exports.CustomerContact = CustomerContact;
|
|
110
|
+
_reference = new WeakMap(), _firstName = new WeakMap(), _lastName = new WeakMap(), _email = new WeakMap(), _phone = new WeakMap(), _username = new WeakMap(), _type = new WeakMap(), _role = new WeakMap(), _isActive = new WeakMap();
|
|
111
|
+
//# sourceMappingURL=customerContact.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../../../abstractEntity';
|
|
2
|
+
import { CustomerContact, CustomerContactType } from './customerContact';
|
|
3
|
+
export declare type CustomerContactsType = Array<CustomerContactType>;
|
|
4
|
+
export declare class CustomerContactList extends AbstractEntity<CustomerContactsType> {
|
|
5
|
+
#private;
|
|
6
|
+
constructor(customerContactsDataInput: CustomerContactsType);
|
|
7
|
+
get customerContactList(): Array<CustomerContact>;
|
|
8
|
+
toJSON(): CustomerContactsType;
|
|
9
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, privateMap, value) {
|
|
3
|
+
if (!privateMap.has(receiver)) {
|
|
4
|
+
throw new TypeError("attempted to set private field on non-instance");
|
|
5
|
+
}
|
|
6
|
+
privateMap.set(receiver, value);
|
|
7
|
+
return value;
|
|
8
|
+
};
|
|
9
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, privateMap) {
|
|
10
|
+
if (!privateMap.has(receiver)) {
|
|
11
|
+
throw new TypeError("attempted to get private field on non-instance");
|
|
12
|
+
}
|
|
13
|
+
return privateMap.get(receiver);
|
|
14
|
+
};
|
|
15
|
+
var _customerContactList;
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.CustomerContactList = void 0;
|
|
18
|
+
const abstractEntity_1 = require("../../../../abstractEntity");
|
|
19
|
+
const customerContact_1 = require("./customerContact");
|
|
20
|
+
class CustomerContactList extends abstractEntity_1.AbstractEntity {
|
|
21
|
+
constructor(customerContactsDataInput) {
|
|
22
|
+
super(customerContactsDataInput);
|
|
23
|
+
_customerContactList.set(this, void 0);
|
|
24
|
+
__classPrivateFieldSet(this, _customerContactList, customerContactsDataInput.map((customerContact) => new customerContact_1.CustomerContact(customerContact)));
|
|
25
|
+
}
|
|
26
|
+
get customerContactList() {
|
|
27
|
+
return __classPrivateFieldGet(this, _customerContactList);
|
|
28
|
+
}
|
|
29
|
+
toJSON() {
|
|
30
|
+
return this.customerContactList.map((customerContact) => customerContact.toJSON());
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.CustomerContactList = CustomerContactList;
|
|
34
|
+
_customerContactList = new WeakMap();
|
|
35
|
+
//# sourceMappingURL=customerContactList.js.map
|
|
@@ -1,26 +1,22 @@
|
|
|
1
1
|
import { AbstractEntity } from '../../../../abstractEntity';
|
|
2
2
|
import { SharedContactFields, SharedContactInterface } from '../../../../shared/contact/contact';
|
|
3
3
|
declare enum InvitationContactEnum {
|
|
4
|
-
COLUMN_ID = "id",
|
|
5
4
|
COLUMN_USERNAME = "username"
|
|
6
5
|
}
|
|
7
6
|
export declare const InvitationContactFields: {
|
|
8
7
|
COLUMN_FIRSTNAME: SharedContactFields.COLUMN_FIRSTNAME;
|
|
9
8
|
COLUMN_LASTNAME: SharedContactFields.COLUMN_LASTNAME;
|
|
10
9
|
COLUMN_EMAIL: SharedContactFields.COLUMN_EMAIL;
|
|
11
|
-
COLUMN_ID: InvitationContactEnum.COLUMN_ID;
|
|
12
10
|
COLUMN_USERNAME: InvitationContactEnum.COLUMN_USERNAME;
|
|
13
11
|
};
|
|
14
12
|
interface InvitationContactInterface {
|
|
15
|
-
[InvitationContactFields.
|
|
16
|
-
[InvitationContactFields.COLUMN_USERNAME]: string | null;
|
|
13
|
+
[InvitationContactFields.COLUMN_USERNAME]: string;
|
|
17
14
|
}
|
|
18
15
|
export declare type InvitationContactType = InvitationContactInterface & SharedContactInterface;
|
|
19
16
|
export declare class InvitationContact extends AbstractEntity<InvitationContactType> {
|
|
20
17
|
#private;
|
|
21
18
|
constructor(getCustomersContactDataInput: InvitationContactType);
|
|
22
|
-
get
|
|
23
|
-
get username(): string | null;
|
|
19
|
+
get username(): string;
|
|
24
20
|
get firstName(): string;
|
|
25
21
|
get lastName(): string;
|
|
26
22
|
get email(): string;
|
|
@@ -12,14 +12,13 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
12
12
|
}
|
|
13
13
|
return privateMap.get(receiver);
|
|
14
14
|
};
|
|
15
|
-
var
|
|
15
|
+
var _username, _firstname, _lastname, _email;
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.InvitationContact = exports.InvitationContactFields = void 0;
|
|
18
18
|
const abstractEntity_1 = require("../../../../abstractEntity");
|
|
19
19
|
const contact_1 = require("../../../../shared/contact/contact");
|
|
20
20
|
var InvitationContactEnum;
|
|
21
21
|
(function (InvitationContactEnum) {
|
|
22
|
-
InvitationContactEnum["COLUMN_ID"] = "id";
|
|
23
22
|
InvitationContactEnum["COLUMN_USERNAME"] = "username";
|
|
24
23
|
})(InvitationContactEnum || (InvitationContactEnum = {}));
|
|
25
24
|
exports.InvitationContactFields = {
|
|
@@ -29,20 +28,15 @@ exports.InvitationContactFields = {
|
|
|
29
28
|
class InvitationContact extends abstractEntity_1.AbstractEntity {
|
|
30
29
|
constructor(getCustomersContactDataInput) {
|
|
31
30
|
super(getCustomersContactDataInput);
|
|
32
|
-
_id.set(this, void 0);
|
|
33
31
|
_username.set(this, void 0);
|
|
34
32
|
_firstname.set(this, void 0);
|
|
35
33
|
_lastname.set(this, void 0);
|
|
36
34
|
_email.set(this, void 0);
|
|
37
|
-
__classPrivateFieldSet(this, _id, getCustomersContactDataInput[exports.InvitationContactFields.COLUMN_ID]);
|
|
38
35
|
__classPrivateFieldSet(this, _firstname, getCustomersContactDataInput[contact_1.SharedContactFields.COLUMN_FIRSTNAME]);
|
|
39
36
|
__classPrivateFieldSet(this, _username, getCustomersContactDataInput[exports.InvitationContactFields.COLUMN_USERNAME]);
|
|
40
37
|
__classPrivateFieldSet(this, _lastname, getCustomersContactDataInput[contact_1.SharedContactFields.COLUMN_LASTNAME]);
|
|
41
38
|
__classPrivateFieldSet(this, _email, getCustomersContactDataInput[contact_1.SharedContactFields.COLUMN_EMAIL]);
|
|
42
39
|
}
|
|
43
|
-
get id() {
|
|
44
|
-
return __classPrivateFieldGet(this, _id);
|
|
45
|
-
}
|
|
46
40
|
get username() {
|
|
47
41
|
return __classPrivateFieldGet(this, _username);
|
|
48
42
|
}
|
|
@@ -57,7 +51,6 @@ class InvitationContact extends abstractEntity_1.AbstractEntity {
|
|
|
57
51
|
}
|
|
58
52
|
toJSON() {
|
|
59
53
|
return {
|
|
60
|
-
[exports.InvitationContactFields.COLUMN_ID]: this.id,
|
|
61
54
|
[exports.InvitationContactFields.COLUMN_USERNAME]: this.username,
|
|
62
55
|
[contact_1.SharedContactFields.COLUMN_FIRSTNAME]: this.firstName,
|
|
63
56
|
[contact_1.SharedContactFields.COLUMN_LASTNAME]: this.lastName,
|
|
@@ -66,5 +59,5 @@ class InvitationContact extends abstractEntity_1.AbstractEntity {
|
|
|
66
59
|
}
|
|
67
60
|
}
|
|
68
61
|
exports.InvitationContact = InvitationContact;
|
|
69
|
-
|
|
62
|
+
_username = new WeakMap(), _firstname = new WeakMap(), _lastname = new WeakMap(), _email = new WeakMap();
|
|
70
63
|
//# sourceMappingURL=invitationContact.js.map
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export * from './customersClient';
|
|
2
2
|
export * from './entities/customers/contact/contact';
|
|
3
|
+
export * from './entities/customers/customerContact/customerContact';
|
|
4
|
+
export * from './entities/customers/customerContact/customerContactList';
|
|
3
5
|
export * from './entities/customers/customer';
|
|
4
6
|
export * from './entities/customers/details/details';
|
|
5
7
|
export * from './entities/dataCustomers';
|
package/build/customers/index.js
CHANGED
|
@@ -12,6 +12,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
__exportStar(require("./customersClient"), exports);
|
|
14
14
|
__exportStar(require("./entities/customers/contact/contact"), exports);
|
|
15
|
+
__exportStar(require("./entities/customers/customerContact/customerContact"), exports);
|
|
16
|
+
__exportStar(require("./entities/customers/customerContact/customerContactList"), exports);
|
|
15
17
|
__exportStar(require("./entities/customers/customer"), exports);
|
|
16
18
|
__exportStar(require("./entities/customers/details/details"), exports);
|
|
17
19
|
__exportStar(require("./entities/dataCustomers"), exports);
|
package/package.json
CHANGED