@arrowsphere/api-client 2.2.1 → 2.6.0
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 +26 -0
- package/build/customers/customersClient.d.ts +10 -0
- package/build/customers/customersClient.js +21 -0
- package/build/customers/entities/customers/contact/contact.d.ts +28 -0
- package/build/customers/entities/customers/contact/contact.js +77 -0
- package/build/customers/entities/customers/customer.d.ts +72 -0
- package/build/customers/entities/customers/customer.js +175 -0
- package/build/customers/entities/customers/details/details.d.ts +28 -0
- package/build/customers/entities/customers/details/details.js +75 -0
- package/build/customers/entities/dataCustomers.d.ts +14 -0
- package/build/customers/entities/dataCustomers.js +41 -0
- package/build/customers/index.d.ts +5 -0
- package/build/customers/index.js +18 -0
- package/build/{licenses/entities/getResult.d.ts → getResult.d.ts} +7 -3
- package/build/{licenses/entities/getResult.js → getResult.js} +16 -5
- package/build/index.d.ts +2 -0
- package/build/index.js +2 -0
- package/build/licenses/index.d.ts +0 -1
- package/build/licenses/index.js +0 -1
- package/build/licenses/licensesClient.d.ts +16 -1
- package/build/licenses/licensesClient.js +25 -1
- package/build/pagination.d.ts +28 -0
- package/build/pagination.js +75 -0
- package/build/publicApiClient.d.ts +6 -0
- package/build/publicApiClient.js +10 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,32 @@
|
|
|
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
|
+
## [2.6.0] - 2022-02-22
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
|
|
10
|
+
- Add endpoint get customers
|
|
11
|
+
- Move file GetResult to use it with all endpoint
|
|
12
|
+
- Update GetResult class to add pagination field
|
|
13
|
+
|
|
14
|
+
## [2.5.0] - 2022-02-14
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- Add endpoint cancel license
|
|
19
|
+
|
|
20
|
+
## [2.4.0] - 2022-02-11
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
|
|
24
|
+
- Add endpoint reactivate license
|
|
25
|
+
|
|
26
|
+
## [2.3.0] - 2022-02-11
|
|
27
|
+
|
|
28
|
+
### Added
|
|
29
|
+
|
|
30
|
+
- Add endpoint suspend license
|
|
31
|
+
|
|
6
32
|
## [2.2.1] - 2022-02-10
|
|
7
33
|
|
|
8
34
|
### Added
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AbstractClient, Parameters } from '../abstractClient';
|
|
2
|
+
import { GetResult } from '../getResult';
|
|
3
|
+
import { DataCustomers } from './entities/dataCustomers';
|
|
4
|
+
export declare class CustomersClient extends AbstractClient {
|
|
5
|
+
/**
|
|
6
|
+
* The base path of the Customers API
|
|
7
|
+
*/
|
|
8
|
+
private ROOT_PATH;
|
|
9
|
+
getCustomers(parameters?: Parameters): Promise<GetResult<DataCustomers>>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CustomersClient = void 0;
|
|
4
|
+
const abstractClient_1 = require("../abstractClient");
|
|
5
|
+
const getResult_1 = require("../getResult");
|
|
6
|
+
const dataCustomers_1 = require("./entities/dataCustomers");
|
|
7
|
+
class CustomersClient extends abstractClient_1.AbstractClient {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
/**
|
|
11
|
+
* The base path of the Customers API
|
|
12
|
+
*/
|
|
13
|
+
this.ROOT_PATH = '/customers';
|
|
14
|
+
}
|
|
15
|
+
async getCustomers(parameters = {}) {
|
|
16
|
+
this.path = this.ROOT_PATH;
|
|
17
|
+
return new getResult_1.GetResult(dataCustomers_1.DataCustomers, await this.get(parameters));
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.CustomersClient = CustomersClient;
|
|
21
|
+
//# sourceMappingURL=customersClient.js.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../../../abstractEntity';
|
|
2
|
+
export declare enum ContactFields {
|
|
3
|
+
COLUMN_FIRSTNAME = "FirstName",
|
|
4
|
+
COLUMN_LASTNAME = "LastName",
|
|
5
|
+
COLUMN_EMAIL = "Email",
|
|
6
|
+
COLUMN_PHONE = "Phone",
|
|
7
|
+
COLUMN_SYNC_PARTNER_CONTACT_REF_ID = "SyncPartnerContactRefId",
|
|
8
|
+
COLUMN_CONTACT_PERSON_ID = "ContactPersonID"
|
|
9
|
+
}
|
|
10
|
+
export declare type ContactType = {
|
|
11
|
+
[ContactFields.COLUMN_FIRSTNAME]: string;
|
|
12
|
+
[ContactFields.COLUMN_LASTNAME]: string;
|
|
13
|
+
[ContactFields.COLUMN_EMAIL]: string;
|
|
14
|
+
[ContactFields.COLUMN_PHONE]: string;
|
|
15
|
+
[ContactFields.COLUMN_SYNC_PARTNER_CONTACT_REF_ID]?: number;
|
|
16
|
+
[ContactFields.COLUMN_CONTACT_PERSON_ID]: string;
|
|
17
|
+
};
|
|
18
|
+
export declare class Contact extends AbstractEntity<ContactType> {
|
|
19
|
+
#private;
|
|
20
|
+
constructor(getCustomersContactDataInput: ContactType);
|
|
21
|
+
get FirstName(): string;
|
|
22
|
+
get LastName(): string;
|
|
23
|
+
get Email(): string;
|
|
24
|
+
get Phone(): string;
|
|
25
|
+
get SyncPartnerContactRefId(): number | undefined;
|
|
26
|
+
get ContactPersonID(): string;
|
|
27
|
+
toJSON(): ContactType;
|
|
28
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
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 _firstname, _lastname, _email, _phone, _syncPartnerContactRefId, _contactPersonId;
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Contact = exports.ContactFields = void 0;
|
|
18
|
+
const abstractEntity_1 = require("../../../../abstractEntity");
|
|
19
|
+
var ContactFields;
|
|
20
|
+
(function (ContactFields) {
|
|
21
|
+
ContactFields["COLUMN_FIRSTNAME"] = "FirstName";
|
|
22
|
+
ContactFields["COLUMN_LASTNAME"] = "LastName";
|
|
23
|
+
ContactFields["COLUMN_EMAIL"] = "Email";
|
|
24
|
+
ContactFields["COLUMN_PHONE"] = "Phone";
|
|
25
|
+
ContactFields["COLUMN_SYNC_PARTNER_CONTACT_REF_ID"] = "SyncPartnerContactRefId";
|
|
26
|
+
ContactFields["COLUMN_CONTACT_PERSON_ID"] = "ContactPersonID";
|
|
27
|
+
})(ContactFields = exports.ContactFields || (exports.ContactFields = {}));
|
|
28
|
+
class Contact extends abstractEntity_1.AbstractEntity {
|
|
29
|
+
constructor(getCustomersContactDataInput) {
|
|
30
|
+
var _a;
|
|
31
|
+
super(getCustomersContactDataInput);
|
|
32
|
+
_firstname.set(this, void 0);
|
|
33
|
+
_lastname.set(this, void 0);
|
|
34
|
+
_email.set(this, void 0);
|
|
35
|
+
_phone.set(this, void 0);
|
|
36
|
+
_syncPartnerContactRefId.set(this, void 0);
|
|
37
|
+
_contactPersonId.set(this, void 0);
|
|
38
|
+
__classPrivateFieldSet(this, _firstname, getCustomersContactDataInput[ContactFields.COLUMN_FIRSTNAME]);
|
|
39
|
+
__classPrivateFieldSet(this, _lastname, getCustomersContactDataInput[ContactFields.COLUMN_LASTNAME]);
|
|
40
|
+
__classPrivateFieldSet(this, _email, getCustomersContactDataInput[ContactFields.COLUMN_EMAIL]);
|
|
41
|
+
__classPrivateFieldSet(this, _phone, getCustomersContactDataInput[ContactFields.COLUMN_PHONE]);
|
|
42
|
+
__classPrivateFieldSet(this, _syncPartnerContactRefId, (_a = getCustomersContactDataInput[ContactFields.COLUMN_SYNC_PARTNER_CONTACT_REF_ID]) !== null && _a !== void 0 ? _a : undefined);
|
|
43
|
+
__classPrivateFieldSet(this, _contactPersonId, getCustomersContactDataInput[ContactFields.COLUMN_CONTACT_PERSON_ID]);
|
|
44
|
+
}
|
|
45
|
+
get FirstName() {
|
|
46
|
+
return __classPrivateFieldGet(this, _firstname);
|
|
47
|
+
}
|
|
48
|
+
get LastName() {
|
|
49
|
+
return __classPrivateFieldGet(this, _lastname);
|
|
50
|
+
}
|
|
51
|
+
get Email() {
|
|
52
|
+
return __classPrivateFieldGet(this, _email);
|
|
53
|
+
}
|
|
54
|
+
get Phone() {
|
|
55
|
+
return __classPrivateFieldGet(this, _phone);
|
|
56
|
+
}
|
|
57
|
+
get SyncPartnerContactRefId() {
|
|
58
|
+
return __classPrivateFieldGet(this, _syncPartnerContactRefId);
|
|
59
|
+
}
|
|
60
|
+
get ContactPersonID() {
|
|
61
|
+
return __classPrivateFieldGet(this, _contactPersonId);
|
|
62
|
+
}
|
|
63
|
+
toJSON() {
|
|
64
|
+
return {
|
|
65
|
+
[ContactFields.COLUMN_FIRSTNAME]: this.FirstName,
|
|
66
|
+
[ContactFields.COLUMN_LASTNAME]: this.LastName,
|
|
67
|
+
[ContactFields.COLUMN_EMAIL]: this.Email,
|
|
68
|
+
[ContactFields.COLUMN_PHONE]: this.Phone,
|
|
69
|
+
[ContactFields.COLUMN_SYNC_PARTNER_CONTACT_REF_ID]: this
|
|
70
|
+
.SyncPartnerContactRefId,
|
|
71
|
+
[ContactFields.COLUMN_CONTACT_PERSON_ID]: this.ContactPersonID,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
exports.Contact = Contact;
|
|
76
|
+
_firstname = new WeakMap(), _lastname = new WeakMap(), _email = new WeakMap(), _phone = new WeakMap(), _syncPartnerContactRefId = new WeakMap(), _contactPersonId = new WeakMap();
|
|
77
|
+
//# sourceMappingURL=contact.js.map
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../../abstractEntity';
|
|
2
|
+
import { Contact, ContactType } from './contact/contact';
|
|
3
|
+
import { Details, DetailsType } from './details/details';
|
|
4
|
+
export declare enum CustomerFields {
|
|
5
|
+
COLUMN_REFERENCE = "Reference",
|
|
6
|
+
COLUMN_COMPANY_NAME = "CompanyName",
|
|
7
|
+
COLUMN_PARTNER_COMPANY_ID = "PartnerCompanyId",
|
|
8
|
+
COLUMN_ADDRESS_LINE_1 = "AddressLine1",
|
|
9
|
+
COLUMN_ADDRESS_LINE_2 = "AddressLine2",
|
|
10
|
+
COLUMN_ZIP = "Zip",
|
|
11
|
+
COLUMN_CITY = "City",
|
|
12
|
+
COLUMN_COUNTRY_CODE = "CountryCode",
|
|
13
|
+
COLUMN_STATE = "State",
|
|
14
|
+
COLUMN_RECEPTION_PHONE = "ReceptionPhone",
|
|
15
|
+
COLUMN_WEBSITE_URL = "WebsiteUrl",
|
|
16
|
+
COLUMN_EMAIL_CONTACT = "EmailContact",
|
|
17
|
+
COLUMN_HEADCOUNT = "Headcount",
|
|
18
|
+
COLUMN_TAX_NUMBER = "TaxNumber",
|
|
19
|
+
COLUMN_REF = "Ref",
|
|
20
|
+
COLUMN_BILLING_ID = "BillingId",
|
|
21
|
+
COLUMN_INTERNAL_REFERENCE = "InternalReference",
|
|
22
|
+
COLUMN_CONTACT = "Contact",
|
|
23
|
+
COLUMN_DETAILS = "Details",
|
|
24
|
+
COLUMN_DELETED_AT = "DeletedAt"
|
|
25
|
+
}
|
|
26
|
+
export declare type CustomerType = {
|
|
27
|
+
[CustomerFields.COLUMN_REFERENCE]: string;
|
|
28
|
+
[CustomerFields.COLUMN_COMPANY_NAME]: string;
|
|
29
|
+
[CustomerFields.COLUMN_PARTNER_COMPANY_ID]: string;
|
|
30
|
+
[CustomerFields.COLUMN_ADDRESS_LINE_1]?: string;
|
|
31
|
+
[CustomerFields.COLUMN_ADDRESS_LINE_2]?: string;
|
|
32
|
+
[CustomerFields.COLUMN_ZIP]: string;
|
|
33
|
+
[CustomerFields.COLUMN_CITY]: string;
|
|
34
|
+
[CustomerFields.COLUMN_COUNTRY_CODE]: string;
|
|
35
|
+
[CustomerFields.COLUMN_STATE]: string;
|
|
36
|
+
[CustomerFields.COLUMN_RECEPTION_PHONE]: string;
|
|
37
|
+
[CustomerFields.COLUMN_WEBSITE_URL]: string;
|
|
38
|
+
[CustomerFields.COLUMN_EMAIL_CONTACT]: string;
|
|
39
|
+
[CustomerFields.COLUMN_HEADCOUNT]: number;
|
|
40
|
+
[CustomerFields.COLUMN_TAX_NUMBER]: string;
|
|
41
|
+
[CustomerFields.COLUMN_REF]: string;
|
|
42
|
+
[CustomerFields.COLUMN_BILLING_ID]: string;
|
|
43
|
+
[CustomerFields.COLUMN_INTERNAL_REFERENCE]: string;
|
|
44
|
+
[CustomerFields.COLUMN_CONTACT]: ContactType;
|
|
45
|
+
[CustomerFields.COLUMN_DETAILS]: DetailsType;
|
|
46
|
+
[CustomerFields.COLUMN_DELETED_AT]?: string | null;
|
|
47
|
+
};
|
|
48
|
+
export declare class Customer extends AbstractEntity<CustomerType> {
|
|
49
|
+
#private;
|
|
50
|
+
constructor(getCustomersDataInput: CustomerType);
|
|
51
|
+
get Reference(): string;
|
|
52
|
+
get CompanyName(): string;
|
|
53
|
+
get PartnerCompanyId(): string;
|
|
54
|
+
get AddressLine1(): string | undefined;
|
|
55
|
+
get AddressLine2(): string | undefined;
|
|
56
|
+
get Zip(): string;
|
|
57
|
+
get City(): string;
|
|
58
|
+
get CountryCode(): string;
|
|
59
|
+
get State(): string;
|
|
60
|
+
get ReceptionPhone(): string;
|
|
61
|
+
get WebsiteUrl(): string;
|
|
62
|
+
get EmailContact(): string;
|
|
63
|
+
get Headcount(): number;
|
|
64
|
+
get TaxNumber(): string;
|
|
65
|
+
get Ref(): string;
|
|
66
|
+
get BillingId(): string;
|
|
67
|
+
get InternalReference(): string;
|
|
68
|
+
get Contact(): Contact;
|
|
69
|
+
get Details(): Details;
|
|
70
|
+
get DeletedAt(): string | null | undefined;
|
|
71
|
+
toJSON(): CustomerType;
|
|
72
|
+
}
|
|
@@ -0,0 +1,175 @@
|
|
|
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, _companyName, _partnerCompanyId, _addressLine1, _addressLine2, _zip, _city, _countryCode, _state, _receptionPhone, _websiteUrl, _emailContact, _headcount, _taxNumber, _ref, _billingId, _internalReference, _contact, _details, _deletedAt;
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Customer = exports.CustomerFields = void 0;
|
|
18
|
+
const abstractEntity_1 = require("../../../abstractEntity");
|
|
19
|
+
const contact_1 = require("./contact/contact");
|
|
20
|
+
const details_1 = require("./details/details");
|
|
21
|
+
var CustomerFields;
|
|
22
|
+
(function (CustomerFields) {
|
|
23
|
+
CustomerFields["COLUMN_REFERENCE"] = "Reference";
|
|
24
|
+
CustomerFields["COLUMN_COMPANY_NAME"] = "CompanyName";
|
|
25
|
+
CustomerFields["COLUMN_PARTNER_COMPANY_ID"] = "PartnerCompanyId";
|
|
26
|
+
CustomerFields["COLUMN_ADDRESS_LINE_1"] = "AddressLine1";
|
|
27
|
+
CustomerFields["COLUMN_ADDRESS_LINE_2"] = "AddressLine2";
|
|
28
|
+
CustomerFields["COLUMN_ZIP"] = "Zip";
|
|
29
|
+
CustomerFields["COLUMN_CITY"] = "City";
|
|
30
|
+
CustomerFields["COLUMN_COUNTRY_CODE"] = "CountryCode";
|
|
31
|
+
CustomerFields["COLUMN_STATE"] = "State";
|
|
32
|
+
CustomerFields["COLUMN_RECEPTION_PHONE"] = "ReceptionPhone";
|
|
33
|
+
CustomerFields["COLUMN_WEBSITE_URL"] = "WebsiteUrl";
|
|
34
|
+
CustomerFields["COLUMN_EMAIL_CONTACT"] = "EmailContact";
|
|
35
|
+
CustomerFields["COLUMN_HEADCOUNT"] = "Headcount";
|
|
36
|
+
CustomerFields["COLUMN_TAX_NUMBER"] = "TaxNumber";
|
|
37
|
+
CustomerFields["COLUMN_REF"] = "Ref";
|
|
38
|
+
CustomerFields["COLUMN_BILLING_ID"] = "BillingId";
|
|
39
|
+
CustomerFields["COLUMN_INTERNAL_REFERENCE"] = "InternalReference";
|
|
40
|
+
CustomerFields["COLUMN_CONTACT"] = "Contact";
|
|
41
|
+
CustomerFields["COLUMN_DETAILS"] = "Details";
|
|
42
|
+
CustomerFields["COLUMN_DELETED_AT"] = "DeletedAt";
|
|
43
|
+
})(CustomerFields = exports.CustomerFields || (exports.CustomerFields = {}));
|
|
44
|
+
class Customer extends abstractEntity_1.AbstractEntity {
|
|
45
|
+
constructor(getCustomersDataInput) {
|
|
46
|
+
super(getCustomersDataInput);
|
|
47
|
+
_reference.set(this, void 0);
|
|
48
|
+
_companyName.set(this, void 0);
|
|
49
|
+
_partnerCompanyId.set(this, void 0);
|
|
50
|
+
_addressLine1.set(this, void 0);
|
|
51
|
+
_addressLine2.set(this, void 0);
|
|
52
|
+
_zip.set(this, void 0);
|
|
53
|
+
_city.set(this, void 0);
|
|
54
|
+
_countryCode.set(this, void 0);
|
|
55
|
+
_state.set(this, void 0);
|
|
56
|
+
_receptionPhone.set(this, void 0);
|
|
57
|
+
_websiteUrl.set(this, void 0);
|
|
58
|
+
_emailContact.set(this, void 0);
|
|
59
|
+
_headcount.set(this, void 0);
|
|
60
|
+
_taxNumber.set(this, void 0);
|
|
61
|
+
_ref.set(this, void 0);
|
|
62
|
+
_billingId.set(this, void 0);
|
|
63
|
+
_internalReference.set(this, void 0);
|
|
64
|
+
_contact.set(this, void 0);
|
|
65
|
+
_details.set(this, void 0);
|
|
66
|
+
_deletedAt.set(this, void 0);
|
|
67
|
+
__classPrivateFieldSet(this, _reference, getCustomersDataInput[CustomerFields.COLUMN_REFERENCE]);
|
|
68
|
+
__classPrivateFieldSet(this, _companyName, getCustomersDataInput[CustomerFields.COLUMN_COMPANY_NAME]);
|
|
69
|
+
__classPrivateFieldSet(this, _partnerCompanyId, getCustomersDataInput[CustomerFields.COLUMN_PARTNER_COMPANY_ID]);
|
|
70
|
+
__classPrivateFieldSet(this, _addressLine1, getCustomersDataInput[CustomerFields.COLUMN_ADDRESS_LINE_1]);
|
|
71
|
+
__classPrivateFieldSet(this, _addressLine2, getCustomersDataInput[CustomerFields.COLUMN_ADDRESS_LINE_2]);
|
|
72
|
+
__classPrivateFieldSet(this, _zip, getCustomersDataInput[CustomerFields.COLUMN_ZIP]);
|
|
73
|
+
__classPrivateFieldSet(this, _city, getCustomersDataInput[CustomerFields.COLUMN_CITY]);
|
|
74
|
+
__classPrivateFieldSet(this, _countryCode, getCustomersDataInput[CustomerFields.COLUMN_COUNTRY_CODE]);
|
|
75
|
+
__classPrivateFieldSet(this, _state, getCustomersDataInput[CustomerFields.COLUMN_STATE]);
|
|
76
|
+
__classPrivateFieldSet(this, _receptionPhone, getCustomersDataInput[CustomerFields.COLUMN_RECEPTION_PHONE]);
|
|
77
|
+
__classPrivateFieldSet(this, _websiteUrl, getCustomersDataInput[CustomerFields.COLUMN_WEBSITE_URL]);
|
|
78
|
+
__classPrivateFieldSet(this, _emailContact, getCustomersDataInput[CustomerFields.COLUMN_EMAIL_CONTACT]);
|
|
79
|
+
__classPrivateFieldSet(this, _headcount, getCustomersDataInput[CustomerFields.COLUMN_HEADCOUNT]);
|
|
80
|
+
__classPrivateFieldSet(this, _taxNumber, getCustomersDataInput[CustomerFields.COLUMN_TAX_NUMBER]);
|
|
81
|
+
__classPrivateFieldSet(this, _ref, getCustomersDataInput[CustomerFields.COLUMN_REF]);
|
|
82
|
+
__classPrivateFieldSet(this, _billingId, getCustomersDataInput[CustomerFields.COLUMN_BILLING_ID]);
|
|
83
|
+
__classPrivateFieldSet(this, _internalReference, getCustomersDataInput[CustomerFields.COLUMN_INTERNAL_REFERENCE]);
|
|
84
|
+
__classPrivateFieldSet(this, _contact, new contact_1.Contact(getCustomersDataInput[CustomerFields.COLUMN_CONTACT]));
|
|
85
|
+
__classPrivateFieldSet(this, _details, new details_1.Details(getCustomersDataInput[CustomerFields.COLUMN_DETAILS]));
|
|
86
|
+
__classPrivateFieldSet(this, _deletedAt, getCustomersDataInput[CustomerFields.COLUMN_DELETED_AT]);
|
|
87
|
+
}
|
|
88
|
+
get Reference() {
|
|
89
|
+
return __classPrivateFieldGet(this, _reference);
|
|
90
|
+
}
|
|
91
|
+
get CompanyName() {
|
|
92
|
+
return __classPrivateFieldGet(this, _companyName);
|
|
93
|
+
}
|
|
94
|
+
get PartnerCompanyId() {
|
|
95
|
+
return __classPrivateFieldGet(this, _partnerCompanyId);
|
|
96
|
+
}
|
|
97
|
+
get AddressLine1() {
|
|
98
|
+
return __classPrivateFieldGet(this, _addressLine1);
|
|
99
|
+
}
|
|
100
|
+
get AddressLine2() {
|
|
101
|
+
return __classPrivateFieldGet(this, _addressLine2);
|
|
102
|
+
}
|
|
103
|
+
get Zip() {
|
|
104
|
+
return __classPrivateFieldGet(this, _zip);
|
|
105
|
+
}
|
|
106
|
+
get City() {
|
|
107
|
+
return __classPrivateFieldGet(this, _city);
|
|
108
|
+
}
|
|
109
|
+
get CountryCode() {
|
|
110
|
+
return __classPrivateFieldGet(this, _countryCode);
|
|
111
|
+
}
|
|
112
|
+
get State() {
|
|
113
|
+
return __classPrivateFieldGet(this, _state);
|
|
114
|
+
}
|
|
115
|
+
get ReceptionPhone() {
|
|
116
|
+
return __classPrivateFieldGet(this, _receptionPhone);
|
|
117
|
+
}
|
|
118
|
+
get WebsiteUrl() {
|
|
119
|
+
return __classPrivateFieldGet(this, _websiteUrl);
|
|
120
|
+
}
|
|
121
|
+
get EmailContact() {
|
|
122
|
+
return __classPrivateFieldGet(this, _emailContact);
|
|
123
|
+
}
|
|
124
|
+
get Headcount() {
|
|
125
|
+
return __classPrivateFieldGet(this, _headcount);
|
|
126
|
+
}
|
|
127
|
+
get TaxNumber() {
|
|
128
|
+
return __classPrivateFieldGet(this, _taxNumber);
|
|
129
|
+
}
|
|
130
|
+
get Ref() {
|
|
131
|
+
return __classPrivateFieldGet(this, _ref);
|
|
132
|
+
}
|
|
133
|
+
get BillingId() {
|
|
134
|
+
return __classPrivateFieldGet(this, _billingId);
|
|
135
|
+
}
|
|
136
|
+
get InternalReference() {
|
|
137
|
+
return __classPrivateFieldGet(this, _internalReference);
|
|
138
|
+
}
|
|
139
|
+
get Contact() {
|
|
140
|
+
return __classPrivateFieldGet(this, _contact);
|
|
141
|
+
}
|
|
142
|
+
get Details() {
|
|
143
|
+
return __classPrivateFieldGet(this, _details);
|
|
144
|
+
}
|
|
145
|
+
get DeletedAt() {
|
|
146
|
+
return __classPrivateFieldGet(this, _deletedAt);
|
|
147
|
+
}
|
|
148
|
+
toJSON() {
|
|
149
|
+
return {
|
|
150
|
+
[CustomerFields.COLUMN_REFERENCE]: this.Reference,
|
|
151
|
+
[CustomerFields.COLUMN_COMPANY_NAME]: this.CompanyName,
|
|
152
|
+
[CustomerFields.COLUMN_PARTNER_COMPANY_ID]: this.PartnerCompanyId,
|
|
153
|
+
[CustomerFields.COLUMN_ADDRESS_LINE_1]: this.AddressLine1,
|
|
154
|
+
[CustomerFields.COLUMN_ADDRESS_LINE_2]: this.AddressLine2,
|
|
155
|
+
[CustomerFields.COLUMN_ZIP]: this.Zip,
|
|
156
|
+
[CustomerFields.COLUMN_CITY]: this.City,
|
|
157
|
+
[CustomerFields.COLUMN_COUNTRY_CODE]: this.CountryCode,
|
|
158
|
+
[CustomerFields.COLUMN_STATE]: this.State,
|
|
159
|
+
[CustomerFields.COLUMN_RECEPTION_PHONE]: this.ReceptionPhone,
|
|
160
|
+
[CustomerFields.COLUMN_WEBSITE_URL]: this.WebsiteUrl,
|
|
161
|
+
[CustomerFields.COLUMN_EMAIL_CONTACT]: this.EmailContact,
|
|
162
|
+
[CustomerFields.COLUMN_HEADCOUNT]: this.Headcount,
|
|
163
|
+
[CustomerFields.COLUMN_TAX_NUMBER]: this.TaxNumber,
|
|
164
|
+
[CustomerFields.COLUMN_REF]: this.Ref,
|
|
165
|
+
[CustomerFields.COLUMN_BILLING_ID]: this.BillingId,
|
|
166
|
+
[CustomerFields.COLUMN_INTERNAL_REFERENCE]: this.InternalReference,
|
|
167
|
+
[CustomerFields.COLUMN_CONTACT]: this.Contact.toJSON(),
|
|
168
|
+
[CustomerFields.COLUMN_DETAILS]: this.Details.toJSON(),
|
|
169
|
+
[CustomerFields.COLUMN_DELETED_AT]: this.DeletedAt,
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
exports.Customer = Customer;
|
|
174
|
+
_reference = new WeakMap(), _companyName = new WeakMap(), _partnerCompanyId = new WeakMap(), _addressLine1 = new WeakMap(), _addressLine2 = new WeakMap(), _zip = new WeakMap(), _city = new WeakMap(), _countryCode = new WeakMap(), _state = new WeakMap(), _receptionPhone = new WeakMap(), _websiteUrl = new WeakMap(), _emailContact = new WeakMap(), _headcount = new WeakMap(), _taxNumber = new WeakMap(), _ref = new WeakMap(), _billingId = new WeakMap(), _internalReference = new WeakMap(), _contact = new WeakMap(), _details = new WeakMap(), _deletedAt = new WeakMap();
|
|
175
|
+
//# sourceMappingURL=customer.js.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../../../abstractEntity';
|
|
2
|
+
export declare enum DetailsFields {
|
|
3
|
+
COLUMN_MIGRATION = "Migration",
|
|
4
|
+
COLUMN_DOMAIN_NAME = "DomainName",
|
|
5
|
+
COLUMN_ORACLE_ONLINE_KEY = "OracleOnlineKey",
|
|
6
|
+
COLUMN_IBM_CE_ID = "IBMCeId",
|
|
7
|
+
COLUMN_MASS_360_RESELLER_ID = "Maas360ResellerId",
|
|
8
|
+
COLUMN_TENANT_ID = "TenantId"
|
|
9
|
+
}
|
|
10
|
+
export declare type DetailsType = {
|
|
11
|
+
[DetailsFields.COLUMN_MIGRATION]?: boolean;
|
|
12
|
+
[DetailsFields.COLUMN_DOMAIN_NAME]?: string;
|
|
13
|
+
[DetailsFields.COLUMN_ORACLE_ONLINE_KEY]?: string;
|
|
14
|
+
[DetailsFields.COLUMN_IBM_CE_ID]?: string;
|
|
15
|
+
[DetailsFields.COLUMN_MASS_360_RESELLER_ID]?: string;
|
|
16
|
+
[DetailsFields.COLUMN_TENANT_ID]?: string;
|
|
17
|
+
};
|
|
18
|
+
export declare class Details extends AbstractEntity<DetailsType> {
|
|
19
|
+
#private;
|
|
20
|
+
constructor(getCustomersDetailsDataInput: DetailsType);
|
|
21
|
+
get Migration(): boolean | undefined;
|
|
22
|
+
get DomainName(): string | undefined;
|
|
23
|
+
get OracleOnlineKey(): string | undefined;
|
|
24
|
+
get IBMCeId(): string | undefined;
|
|
25
|
+
get Maas360ResellerId(): string | undefined;
|
|
26
|
+
get TenantId(): string | undefined;
|
|
27
|
+
toJSON(): DetailsType;
|
|
28
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
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 _migration, _domainName, _oracleOnlineKey, _iBMCeId, _maas360ResellerId, _tenantId;
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Details = exports.DetailsFields = void 0;
|
|
18
|
+
const abstractEntity_1 = require("../../../../abstractEntity");
|
|
19
|
+
var DetailsFields;
|
|
20
|
+
(function (DetailsFields) {
|
|
21
|
+
DetailsFields["COLUMN_MIGRATION"] = "Migration";
|
|
22
|
+
DetailsFields["COLUMN_DOMAIN_NAME"] = "DomainName";
|
|
23
|
+
DetailsFields["COLUMN_ORACLE_ONLINE_KEY"] = "OracleOnlineKey";
|
|
24
|
+
DetailsFields["COLUMN_IBM_CE_ID"] = "IBMCeId";
|
|
25
|
+
DetailsFields["COLUMN_MASS_360_RESELLER_ID"] = "Maas360ResellerId";
|
|
26
|
+
DetailsFields["COLUMN_TENANT_ID"] = "TenantId";
|
|
27
|
+
})(DetailsFields = exports.DetailsFields || (exports.DetailsFields = {}));
|
|
28
|
+
class Details extends abstractEntity_1.AbstractEntity {
|
|
29
|
+
constructor(getCustomersDetailsDataInput) {
|
|
30
|
+
super(getCustomersDetailsDataInput);
|
|
31
|
+
_migration.set(this, void 0);
|
|
32
|
+
_domainName.set(this, void 0);
|
|
33
|
+
_oracleOnlineKey.set(this, void 0);
|
|
34
|
+
_iBMCeId.set(this, void 0);
|
|
35
|
+
_maas360ResellerId.set(this, void 0);
|
|
36
|
+
_tenantId.set(this, void 0);
|
|
37
|
+
__classPrivateFieldSet(this, _migration, getCustomersDetailsDataInput[DetailsFields.COLUMN_MIGRATION]);
|
|
38
|
+
__classPrivateFieldSet(this, _domainName, getCustomersDetailsDataInput[DetailsFields.COLUMN_DOMAIN_NAME]);
|
|
39
|
+
__classPrivateFieldSet(this, _oracleOnlineKey, getCustomersDetailsDataInput[DetailsFields.COLUMN_ORACLE_ONLINE_KEY]);
|
|
40
|
+
__classPrivateFieldSet(this, _iBMCeId, getCustomersDetailsDataInput[DetailsFields.COLUMN_IBM_CE_ID]);
|
|
41
|
+
__classPrivateFieldSet(this, _maas360ResellerId, getCustomersDetailsDataInput[DetailsFields.COLUMN_MASS_360_RESELLER_ID]);
|
|
42
|
+
__classPrivateFieldSet(this, _tenantId, getCustomersDetailsDataInput[DetailsFields.COLUMN_TENANT_ID]);
|
|
43
|
+
}
|
|
44
|
+
get Migration() {
|
|
45
|
+
return __classPrivateFieldGet(this, _migration);
|
|
46
|
+
}
|
|
47
|
+
get DomainName() {
|
|
48
|
+
return __classPrivateFieldGet(this, _domainName);
|
|
49
|
+
}
|
|
50
|
+
get OracleOnlineKey() {
|
|
51
|
+
return __classPrivateFieldGet(this, _oracleOnlineKey);
|
|
52
|
+
}
|
|
53
|
+
get IBMCeId() {
|
|
54
|
+
return __classPrivateFieldGet(this, _iBMCeId);
|
|
55
|
+
}
|
|
56
|
+
get Maas360ResellerId() {
|
|
57
|
+
return __classPrivateFieldGet(this, _maas360ResellerId);
|
|
58
|
+
}
|
|
59
|
+
get TenantId() {
|
|
60
|
+
return __classPrivateFieldGet(this, _tenantId);
|
|
61
|
+
}
|
|
62
|
+
toJSON() {
|
|
63
|
+
return {
|
|
64
|
+
[DetailsFields.COLUMN_MIGRATION]: this.Migration,
|
|
65
|
+
[DetailsFields.COLUMN_DOMAIN_NAME]: this.DomainName,
|
|
66
|
+
[DetailsFields.COLUMN_ORACLE_ONLINE_KEY]: this.OracleOnlineKey,
|
|
67
|
+
[DetailsFields.COLUMN_IBM_CE_ID]: this.IBMCeId,
|
|
68
|
+
[DetailsFields.COLUMN_MASS_360_RESELLER_ID]: this.Maas360ResellerId,
|
|
69
|
+
[DetailsFields.COLUMN_TENANT_ID]: this.TenantId,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
exports.Details = Details;
|
|
74
|
+
_migration = new WeakMap(), _domainName = new WeakMap(), _oracleOnlineKey = new WeakMap(), _iBMCeId = new WeakMap(), _maas360ResellerId = new WeakMap(), _tenantId = new WeakMap();
|
|
75
|
+
//# sourceMappingURL=details.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../abstractEntity';
|
|
2
|
+
import { Customer, CustomerType } from './customers/customer';
|
|
3
|
+
export declare enum DataCustomersFields {
|
|
4
|
+
COLUMN_CUSTOMERS = "customers"
|
|
5
|
+
}
|
|
6
|
+
export declare type DataCustomersType = {
|
|
7
|
+
[DataCustomersFields.COLUMN_CUSTOMERS]: Array<CustomerType>;
|
|
8
|
+
};
|
|
9
|
+
export declare class DataCustomers extends AbstractEntity<DataCustomersType> {
|
|
10
|
+
#private;
|
|
11
|
+
constructor(customersDataInput: DataCustomersType);
|
|
12
|
+
get customers(): Array<Customer>;
|
|
13
|
+
toJSON(): DataCustomersType;
|
|
14
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
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 _customers;
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.DataCustomers = exports.DataCustomersFields = void 0;
|
|
18
|
+
const abstractEntity_1 = require("../../abstractEntity");
|
|
19
|
+
const customer_1 = require("./customers/customer");
|
|
20
|
+
var DataCustomersFields;
|
|
21
|
+
(function (DataCustomersFields) {
|
|
22
|
+
DataCustomersFields["COLUMN_CUSTOMERS"] = "customers";
|
|
23
|
+
})(DataCustomersFields = exports.DataCustomersFields || (exports.DataCustomersFields = {}));
|
|
24
|
+
class DataCustomers extends abstractEntity_1.AbstractEntity {
|
|
25
|
+
constructor(customersDataInput) {
|
|
26
|
+
super(customersDataInput);
|
|
27
|
+
_customers.set(this, void 0);
|
|
28
|
+
__classPrivateFieldSet(this, _customers, customersDataInput[DataCustomersFields.COLUMN_CUSTOMERS].map((result) => new customer_1.Customer(result)));
|
|
29
|
+
}
|
|
30
|
+
get customers() {
|
|
31
|
+
return __classPrivateFieldGet(this, _customers);
|
|
32
|
+
}
|
|
33
|
+
toJSON() {
|
|
34
|
+
return {
|
|
35
|
+
[DataCustomersFields.COLUMN_CUSTOMERS]: this.customers.map((result) => result.toJSON()),
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.DataCustomers = DataCustomers;
|
|
40
|
+
_customers = new WeakMap();
|
|
41
|
+
//# sourceMappingURL=dataCustomers.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./entities/customers/contact/contact"), exports);
|
|
14
|
+
__exportStar(require("./entities/customers/details/details"), exports);
|
|
15
|
+
__exportStar(require("./entities/customers/customer"), exports);
|
|
16
|
+
__exportStar(require("./entities/dataCustomers"), exports);
|
|
17
|
+
__exportStar(require("./customersClient"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { LicenseGetData } from './
|
|
2
|
-
import { AbstractEntity } from '
|
|
1
|
+
import { LicenseGetData } from './licenses';
|
|
2
|
+
import { AbstractEntity } from './abstractEntity';
|
|
3
|
+
import { Pagination, PaginationData } from './pagination';
|
|
3
4
|
export declare enum GetResultFields {
|
|
4
5
|
COLUMN_STATUS = "status",
|
|
5
|
-
COLUMN_DATA = "data"
|
|
6
|
+
COLUMN_DATA = "data",
|
|
7
|
+
COLUMN_PAGINATION = "pagination"
|
|
6
8
|
}
|
|
7
9
|
/**
|
|
8
10
|
* @deprecated please use GetLicenseResultData for license
|
|
@@ -13,6 +15,7 @@ export declare type LicenseGet = {
|
|
|
13
15
|
export declare type GetData<Entity> = {
|
|
14
16
|
[GetResultFields.COLUMN_STATUS]: number;
|
|
15
17
|
[GetResultFields.COLUMN_DATA]: Entity;
|
|
18
|
+
[GetResultFields.COLUMN_PAGINATION]?: PaginationData;
|
|
16
19
|
};
|
|
17
20
|
/**
|
|
18
21
|
* This interface is use toJSON function in objects (data properties) you want to use
|
|
@@ -29,6 +32,7 @@ export declare class GetResult<Entity extends AbstractEntityGet<Entity>> extends
|
|
|
29
32
|
constructor(cls: new (data: Entity['entityDataInput']) => Entity, getResultDataInput: GetData<Entity['entityDataInput']>);
|
|
30
33
|
get status(): number;
|
|
31
34
|
get data(): Entity;
|
|
35
|
+
get pagination(): Pagination | undefined;
|
|
32
36
|
toJSON(): GetData<Entity['entityDataInput']>;
|
|
33
37
|
}
|
|
34
38
|
export {};
|
|
@@ -12,14 +12,16 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
12
12
|
}
|
|
13
13
|
return privateMap.get(receiver);
|
|
14
14
|
};
|
|
15
|
-
var _status, _data;
|
|
15
|
+
var _status, _data, _pagination;
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.GetResult = exports.GetResultFields = void 0;
|
|
18
|
-
const abstractEntity_1 = require("
|
|
18
|
+
const abstractEntity_1 = require("./abstractEntity");
|
|
19
|
+
const pagination_1 = require("./pagination");
|
|
19
20
|
var GetResultFields;
|
|
20
21
|
(function (GetResultFields) {
|
|
21
22
|
GetResultFields["COLUMN_STATUS"] = "status";
|
|
22
23
|
GetResultFields["COLUMN_DATA"] = "data";
|
|
24
|
+
GetResultFields["COLUMN_PAGINATION"] = "pagination";
|
|
23
25
|
})(GetResultFields = exports.GetResultFields || (exports.GetResultFields = {}));
|
|
24
26
|
/**
|
|
25
27
|
* WARNING: use this class only when the Entity in data properties is an object not an array or other type
|
|
@@ -30,8 +32,12 @@ class GetResult extends abstractEntity_1.AbstractEntity {
|
|
|
30
32
|
super(getResultDataInput);
|
|
31
33
|
_status.set(this, void 0);
|
|
32
34
|
_data.set(this, void 0);
|
|
33
|
-
|
|
34
|
-
__classPrivateFieldSet(this,
|
|
35
|
+
_pagination.set(this, void 0);
|
|
36
|
+
__classPrivateFieldSet(this, _status, getResultDataInput[GetResultFields.COLUMN_STATUS]);
|
|
37
|
+
__classPrivateFieldSet(this, _data, new cls(getResultDataInput[GetResultFields.COLUMN_DATA]));
|
|
38
|
+
__classPrivateFieldSet(this, _pagination, getResultDataInput[GetResultFields.COLUMN_PAGINATION]
|
|
39
|
+
? new pagination_1.Pagination(getResultDataInput[GetResultFields.COLUMN_PAGINATION])
|
|
40
|
+
: undefined);
|
|
35
41
|
}
|
|
36
42
|
get status() {
|
|
37
43
|
return __classPrivateFieldGet(this, _status);
|
|
@@ -39,13 +45,18 @@ class GetResult extends abstractEntity_1.AbstractEntity {
|
|
|
39
45
|
get data() {
|
|
40
46
|
return __classPrivateFieldGet(this, _data);
|
|
41
47
|
}
|
|
48
|
+
get pagination() {
|
|
49
|
+
return __classPrivateFieldGet(this, _pagination);
|
|
50
|
+
}
|
|
42
51
|
toJSON() {
|
|
52
|
+
var _a;
|
|
43
53
|
return JSON.parse(JSON.stringify({
|
|
44
54
|
[GetResultFields.COLUMN_STATUS]: this.status,
|
|
45
55
|
[GetResultFields.COLUMN_DATA]: this.data.toJSON(),
|
|
56
|
+
[GetResultFields.COLUMN_PAGINATION]: (_a = this.pagination) === null || _a === void 0 ? void 0 : _a.toJSON(),
|
|
46
57
|
}));
|
|
47
58
|
}
|
|
48
59
|
}
|
|
49
60
|
exports.GetResult = GetResult;
|
|
50
|
-
_status = new WeakMap(), _data = new WeakMap();
|
|
61
|
+
_status = new WeakMap(), _data = new WeakMap(), _pagination = new WeakMap();
|
|
51
62
|
//# sourceMappingURL=getResult.js.map
|
package/build/index.d.ts
CHANGED
package/build/index.js
CHANGED
|
@@ -16,4 +16,6 @@ __exportStar(require("./abstractClient"), exports);
|
|
|
16
16
|
__exportStar(require("./licenses/"), exports);
|
|
17
17
|
__exportStar(require("./general/"), exports);
|
|
18
18
|
__exportStar(require("./subscriptions/"), exports);
|
|
19
|
+
__exportStar(require("./customers/"), exports);
|
|
20
|
+
__exportStar(require("./getResult"), exports);
|
|
19
21
|
//# sourceMappingURL=index.js.map
|
package/build/licenses/index.js
CHANGED
|
@@ -33,5 +33,4 @@ __exportStar(require("../licenses/entities/getLicense/licensePriceGetResult"), e
|
|
|
33
33
|
__exportStar(require("../licenses/entities/getLicense/orderGetResult"), exports);
|
|
34
34
|
__exportStar(require("./entities/filterFindResult"), exports);
|
|
35
35
|
__exportStar(require("./entities/findResult"), exports);
|
|
36
|
-
__exportStar(require("./entities/getResult"), exports);
|
|
37
36
|
//# sourceMappingURL=index.js.map
|
|
@@ -11,7 +11,7 @@ import { PriceFindResultDataKeywords, PriceFindResutDataSortParameters } from '.
|
|
|
11
11
|
import { OfferFindResultDataFiltersParameters, OfferFindResultDataKeywords, OfferFindResultDataSortParameters } from './entities/offer/offerFindResult';
|
|
12
12
|
import { ActionFlagsFindResultDataKeywords, ActionFlagsFindResultDataSortParameters } from './entities/offer/actionFlagsFindResult';
|
|
13
13
|
import { PriceBandFindResultDataKeywords, PriceBandFindResultDataSortParameters } from './entities/offer/priceBandFindResult';
|
|
14
|
-
import { GetResult } from '
|
|
14
|
+
import { GetResult } from '../getResult';
|
|
15
15
|
import { LicenseGetFields } from './entities/getLicense/licenseGetResult';
|
|
16
16
|
import { GetLicenseResult } from './entities/getResult/getLicenseResult';
|
|
17
17
|
/**
|
|
@@ -205,6 +205,18 @@ export declare class LicensesClient extends AbstractClient {
|
|
|
205
205
|
* The path of the Seats endpoint
|
|
206
206
|
*/
|
|
207
207
|
private SEATS_PATH;
|
|
208
|
+
/**
|
|
209
|
+
* The path of suspend endpoint
|
|
210
|
+
*/
|
|
211
|
+
private SUSPEND_PATH;
|
|
212
|
+
/**
|
|
213
|
+
* The path of reactivate endpoint
|
|
214
|
+
*/
|
|
215
|
+
private REACTIVATE_PATH;
|
|
216
|
+
/**
|
|
217
|
+
* The path of cancel endpoint
|
|
218
|
+
*/
|
|
219
|
+
private CANCEL_PATH;
|
|
208
220
|
/**
|
|
209
221
|
* Returns the raw result from the find endpoint call
|
|
210
222
|
*
|
|
@@ -232,4 +244,7 @@ export declare class LicensesClient extends AbstractClient {
|
|
|
232
244
|
updateConfig(reference: string, config: ConfigFindResult): Promise<ConfigFindResult>;
|
|
233
245
|
getLicense(licenseReference: string, parameters?: Parameters): Promise<GetResult<GetLicenseResult>>;
|
|
234
246
|
updateSeats(licenseReference: string, putData: UpdateSeatsData, parameters?: Parameters): Promise<void>;
|
|
247
|
+
suspendLicense(licenseReference: string, parameters?: Parameters): Promise<void>;
|
|
248
|
+
reactivateLicense(licenseReference: string, parameters?: Parameters): Promise<void>;
|
|
249
|
+
cancelLicense(licenseReference: string, parameters?: Parameters): Promise<void>;
|
|
235
250
|
}
|
|
@@ -7,7 +7,7 @@ exports.LicensesClient = exports.LicenseFindParameters = void 0;
|
|
|
7
7
|
const abstractClient_1 = require("../abstractClient");
|
|
8
8
|
const findResult_1 = require("./entities/findResult");
|
|
9
9
|
const configFindResult_1 = require("./entities/license/configFindResult");
|
|
10
|
-
const getResult_1 = require("
|
|
10
|
+
const getResult_1 = require("../getResult");
|
|
11
11
|
const licenseGetResult_1 = require("./entities/getLicense/licenseGetResult");
|
|
12
12
|
const getLicenseResult_1 = require("./entities/getResult/getLicenseResult");
|
|
13
13
|
/**
|
|
@@ -127,6 +127,18 @@ class LicensesClient extends abstractClient_1.AbstractClient {
|
|
|
127
127
|
* The path of the Seats endpoint
|
|
128
128
|
*/
|
|
129
129
|
this.SEATS_PATH = '/seats';
|
|
130
|
+
/**
|
|
131
|
+
* The path of suspend endpoint
|
|
132
|
+
*/
|
|
133
|
+
this.SUSPEND_PATH = '/suspend';
|
|
134
|
+
/**
|
|
135
|
+
* The path of reactivate endpoint
|
|
136
|
+
*/
|
|
137
|
+
this.REACTIVATE_PATH = '/reactivate';
|
|
138
|
+
/**
|
|
139
|
+
* The path of cancel endpoint
|
|
140
|
+
*/
|
|
141
|
+
this.CANCEL_PATH = '/cancel';
|
|
130
142
|
}
|
|
131
143
|
/**
|
|
132
144
|
* Returns the raw result from the find endpoint call
|
|
@@ -232,6 +244,18 @@ class LicensesClient extends abstractClient_1.AbstractClient {
|
|
|
232
244
|
this.path = licenseReference + this.SEATS_PATH;
|
|
233
245
|
return this.put(putData, parameters);
|
|
234
246
|
}
|
|
247
|
+
suspendLicense(licenseReference, parameters = {}) {
|
|
248
|
+
this.path = licenseReference + this.SUSPEND_PATH;
|
|
249
|
+
return this.put(undefined, parameters);
|
|
250
|
+
}
|
|
251
|
+
reactivateLicense(licenseReference, parameters = {}) {
|
|
252
|
+
this.path = licenseReference + this.REACTIVATE_PATH;
|
|
253
|
+
return this.put(undefined, parameters);
|
|
254
|
+
}
|
|
255
|
+
cancelLicense(licenseReference, parameters = {}) {
|
|
256
|
+
this.path = licenseReference + this.CANCEL_PATH;
|
|
257
|
+
return this.put(undefined, parameters);
|
|
258
|
+
}
|
|
235
259
|
}
|
|
236
260
|
exports.LicensesClient = LicensesClient;
|
|
237
261
|
//# sourceMappingURL=licensesClient.js.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AbstractEntity } from './abstractEntity';
|
|
2
|
+
export declare enum PaginationFields {
|
|
3
|
+
COLUMN_PER_PAGE = "per_page",
|
|
4
|
+
COLUMN_CURRENT_PAGE = "current_page",
|
|
5
|
+
COLUMN_TOTAL_PAGE = "total_page",
|
|
6
|
+
COLUMN_TOTAL = "total",
|
|
7
|
+
COLUMN_NEXT = "next",
|
|
8
|
+
COLUMN_PREVIOUS = "previous"
|
|
9
|
+
}
|
|
10
|
+
export declare type PaginationData = {
|
|
11
|
+
[PaginationFields.COLUMN_PER_PAGE]: number;
|
|
12
|
+
[PaginationFields.COLUMN_CURRENT_PAGE]: number;
|
|
13
|
+
[PaginationFields.COLUMN_TOTAL_PAGE]: number;
|
|
14
|
+
[PaginationFields.COLUMN_TOTAL]: number;
|
|
15
|
+
[PaginationFields.COLUMN_NEXT]: string | null;
|
|
16
|
+
[PaginationFields.COLUMN_PREVIOUS]: string | null;
|
|
17
|
+
};
|
|
18
|
+
export declare class Pagination extends AbstractEntity<PaginationData> {
|
|
19
|
+
#private;
|
|
20
|
+
constructor(paginationDataInput: PaginationData);
|
|
21
|
+
get perPage(): number;
|
|
22
|
+
get currentPage(): number;
|
|
23
|
+
get totalPage(): number;
|
|
24
|
+
get total(): number;
|
|
25
|
+
get next(): string | null;
|
|
26
|
+
get previous(): string | null;
|
|
27
|
+
toJSON(): PaginationData;
|
|
28
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
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 _perPage, _currentPage, _totalPage, _total, _next, _previous;
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Pagination = exports.PaginationFields = void 0;
|
|
18
|
+
const abstractEntity_1 = require("./abstractEntity");
|
|
19
|
+
var PaginationFields;
|
|
20
|
+
(function (PaginationFields) {
|
|
21
|
+
PaginationFields["COLUMN_PER_PAGE"] = "per_page";
|
|
22
|
+
PaginationFields["COLUMN_CURRENT_PAGE"] = "current_page";
|
|
23
|
+
PaginationFields["COLUMN_TOTAL_PAGE"] = "total_page";
|
|
24
|
+
PaginationFields["COLUMN_TOTAL"] = "total";
|
|
25
|
+
PaginationFields["COLUMN_NEXT"] = "next";
|
|
26
|
+
PaginationFields["COLUMN_PREVIOUS"] = "previous";
|
|
27
|
+
})(PaginationFields = exports.PaginationFields || (exports.PaginationFields = {}));
|
|
28
|
+
class Pagination extends abstractEntity_1.AbstractEntity {
|
|
29
|
+
constructor(paginationDataInput) {
|
|
30
|
+
super(paginationDataInput);
|
|
31
|
+
_perPage.set(this, void 0);
|
|
32
|
+
_currentPage.set(this, void 0);
|
|
33
|
+
_totalPage.set(this, void 0);
|
|
34
|
+
_total.set(this, void 0);
|
|
35
|
+
_next.set(this, void 0);
|
|
36
|
+
_previous.set(this, void 0);
|
|
37
|
+
__classPrivateFieldSet(this, _perPage, paginationDataInput[PaginationFields.COLUMN_PER_PAGE]);
|
|
38
|
+
__classPrivateFieldSet(this, _currentPage, paginationDataInput[PaginationFields.COLUMN_CURRENT_PAGE]);
|
|
39
|
+
__classPrivateFieldSet(this, _totalPage, paginationDataInput[PaginationFields.COLUMN_TOTAL_PAGE]);
|
|
40
|
+
__classPrivateFieldSet(this, _total, paginationDataInput[PaginationFields.COLUMN_TOTAL]);
|
|
41
|
+
__classPrivateFieldSet(this, _next, paginationDataInput[PaginationFields.COLUMN_NEXT]);
|
|
42
|
+
__classPrivateFieldSet(this, _previous, paginationDataInput[PaginationFields.COLUMN_PREVIOUS]);
|
|
43
|
+
}
|
|
44
|
+
get perPage() {
|
|
45
|
+
return __classPrivateFieldGet(this, _perPage);
|
|
46
|
+
}
|
|
47
|
+
get currentPage() {
|
|
48
|
+
return __classPrivateFieldGet(this, _currentPage);
|
|
49
|
+
}
|
|
50
|
+
get totalPage() {
|
|
51
|
+
return __classPrivateFieldGet(this, _totalPage);
|
|
52
|
+
}
|
|
53
|
+
get total() {
|
|
54
|
+
return __classPrivateFieldGet(this, _total);
|
|
55
|
+
}
|
|
56
|
+
get next() {
|
|
57
|
+
return __classPrivateFieldGet(this, _next);
|
|
58
|
+
}
|
|
59
|
+
get previous() {
|
|
60
|
+
return __classPrivateFieldGet(this, _previous);
|
|
61
|
+
}
|
|
62
|
+
toJSON() {
|
|
63
|
+
return {
|
|
64
|
+
[PaginationFields.COLUMN_PER_PAGE]: this.perPage,
|
|
65
|
+
[PaginationFields.COLUMN_CURRENT_PAGE]: this.currentPage,
|
|
66
|
+
[PaginationFields.COLUMN_TOTAL_PAGE]: this.totalPage,
|
|
67
|
+
[PaginationFields.COLUMN_TOTAL]: this.total,
|
|
68
|
+
[PaginationFields.COLUMN_NEXT]: this.next,
|
|
69
|
+
[PaginationFields.COLUMN_PREVIOUS]: this.previous,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
exports.Pagination = Pagination;
|
|
74
|
+
_perPage = new WeakMap(), _currentPage = new WeakMap(), _totalPage = new WeakMap(), _total = new WeakMap(), _next = new WeakMap(), _previous = new WeakMap();
|
|
75
|
+
//# sourceMappingURL=pagination.js.map
|
|
@@ -2,11 +2,17 @@ import { AbstractClient } from './abstractClient';
|
|
|
2
2
|
import { CheckDomainClient, WhoAmIClient } from './general';
|
|
3
3
|
import { LicensesClient } from './licenses/licensesClient';
|
|
4
4
|
import { SubscriptionsClient } from './subscriptions/subscriptionsClient';
|
|
5
|
+
import { CustomersClient } from './customers/customersClient';
|
|
5
6
|
/**
|
|
6
7
|
* Public API Client class, should be the main entry point for your calls
|
|
7
8
|
*/
|
|
8
9
|
export declare class PublicApiClient extends AbstractClient {
|
|
9
10
|
constructor();
|
|
11
|
+
/**
|
|
12
|
+
* Creates a new {@link CustomersClient} instance and returns it
|
|
13
|
+
* @returns {@link CustomersClient}
|
|
14
|
+
*/
|
|
15
|
+
getCustomersClient(): CustomersClient;
|
|
10
16
|
/**
|
|
11
17
|
* Creates a new {@link WhoAmIClient} instance and returns it
|
|
12
18
|
* @returns {@link WhoAmIClient}
|
package/build/publicApiClient.js
CHANGED
|
@@ -5,6 +5,7 @@ const abstractClient_1 = require("./abstractClient");
|
|
|
5
5
|
const general_1 = require("./general");
|
|
6
6
|
const licensesClient_1 = require("./licenses/licensesClient");
|
|
7
7
|
const subscriptionsClient_1 = require("./subscriptions/subscriptionsClient");
|
|
8
|
+
const customersClient_1 = require("./customers/customersClient");
|
|
8
9
|
/**
|
|
9
10
|
* Public API Client class, should be the main entry point for your calls
|
|
10
11
|
*/
|
|
@@ -12,6 +13,15 @@ class PublicApiClient extends abstractClient_1.AbstractClient {
|
|
|
12
13
|
constructor() {
|
|
13
14
|
super();
|
|
14
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Creates a new {@link CustomersClient} instance and returns it
|
|
18
|
+
* @returns {@link CustomersClient}
|
|
19
|
+
*/
|
|
20
|
+
getCustomersClient() {
|
|
21
|
+
return new customersClient_1.CustomersClient(this.client)
|
|
22
|
+
.setUrl(this.url)
|
|
23
|
+
.setApiKey(this.apiKey);
|
|
24
|
+
}
|
|
15
25
|
/**
|
|
16
26
|
* Creates a new {@link WhoAmIClient} instance and returns it
|
|
17
27
|
* @returns {@link WhoAmIClient}
|
package/package.json
CHANGED