@arrowsphere/api-client 2.4.0 → 2.7.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 +21 -0
- package/build/abstractClient.js +2 -2
- 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/exception/entityValidationException.d.ts +3 -1
- package/build/exception/entityValidationException.js +3 -1
- package/build/exception/notFoundException.d.ts +3 -1
- package/build/exception/notFoundException.js +3 -1
- package/build/exception/publicApiClientException.d.ts +3 -1
- package/build/exception/publicApiClientException.js +3 -1
- 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/entities/getLicense/licenseGetResult.d.ts +12 -0
- package/build/licenses/entities/getLicense/licenseGetResult.js +30 -2
- package/build/licenses/index.d.ts +0 -1
- package/build/licenses/index.js +0 -1
- package/build/licenses/licensesClient.d.ts +14 -1
- package/build/licenses/licensesClient.js +17 -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,27 @@
|
|
|
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.7.0] - 2022-03-03
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
|
|
10
|
+
- Update object license for getLicense endpoint
|
|
11
|
+
- Add endpoint update license friendlyName
|
|
12
|
+
|
|
13
|
+
## [2.6.0] - 2022-02-22
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- Add endpoint get customers
|
|
18
|
+
- Move file GetResult to use it with all endpoint
|
|
19
|
+
- Update GetResult class to add pagination field
|
|
20
|
+
|
|
21
|
+
## [2.5.0] - 2022-02-14
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
|
|
25
|
+
- Add endpoint cancel license
|
|
26
|
+
|
|
6
27
|
## [2.4.0] - 2022-02-11
|
|
7
28
|
|
|
8
29
|
### Added
|
package/build/abstractClient.js
CHANGED
|
@@ -121,10 +121,10 @@ class AbstractClient {
|
|
|
121
121
|
getResponse(response) {
|
|
122
122
|
const statusCode = response.status;
|
|
123
123
|
if (statusCode === 404) {
|
|
124
|
-
throw new exception_1.NotFoundException(`Resource not found on URL ${this.getUrl()}
|
|
124
|
+
throw new exception_1.NotFoundException(`Resource not found on URL ${this.getUrl()}`, response.data.error, statusCode);
|
|
125
125
|
}
|
|
126
126
|
if (statusCode >= 400 && statusCode <= 599) {
|
|
127
|
-
throw new exception_1.PublicApiClientException(`Error: status code: ${statusCode}. URL: ${this.getUrl()}
|
|
127
|
+
throw new exception_1.PublicApiClientException(`Error: status code: ${statusCode}. URL: ${this.getUrl()}`, response.data.error, statusCode);
|
|
128
128
|
}
|
|
129
129
|
return response.data;
|
|
130
130
|
}
|
|
@@ -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
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.EntityValidationException = void 0;
|
|
4
4
|
class EntityValidationException extends Error {
|
|
5
|
-
constructor(message) {
|
|
5
|
+
constructor(message, httpError = '', httpCode = 0) {
|
|
6
6
|
super(message);
|
|
7
|
+
this.httpCode = httpCode;
|
|
8
|
+
this.httpError = httpError;
|
|
7
9
|
}
|
|
8
10
|
}
|
|
9
11
|
exports.EntityValidationException = EntityValidationException;
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NotFoundException = void 0;
|
|
4
4
|
class NotFoundException extends Error {
|
|
5
|
-
constructor(message) {
|
|
5
|
+
constructor(message, httpError = '', httpCode = 0) {
|
|
6
6
|
super(message);
|
|
7
|
+
this.httpCode = httpCode;
|
|
8
|
+
this.httpError = httpError;
|
|
7
9
|
}
|
|
8
10
|
}
|
|
9
11
|
exports.NotFoundException = NotFoundException;
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PublicApiClientException = void 0;
|
|
4
4
|
class PublicApiClientException extends Error {
|
|
5
|
-
constructor(message) {
|
|
5
|
+
constructor(message, httpError = '', httpCode = 0) {
|
|
6
6
|
super(message);
|
|
7
|
+
this.httpCode = httpCode;
|
|
8
|
+
this.httpError = httpError;
|
|
7
9
|
}
|
|
8
10
|
}
|
|
9
11
|
exports.PublicApiClientException = PublicApiClientException;
|
|
@@ -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
|
|
@@ -10,6 +10,10 @@ export declare enum LicenseGetFields {
|
|
|
10
10
|
COLUMN_FRIENDLY_NAME = "friendlyName",
|
|
11
11
|
COLUMN_CUSTOMER_REF = "customer_ref",
|
|
12
12
|
COLUMN_STATE = "state",
|
|
13
|
+
COLUMN_STATUS_CODE = "statusCode",
|
|
14
|
+
COLUMN_IS_TRIAL = "isTrial",
|
|
15
|
+
COLUMN_IS_ADDON = "isAddon",
|
|
16
|
+
COLUMN_CURRENCY = "currency",
|
|
13
17
|
COLUMN_SERVICE_REF = "service_ref",
|
|
14
18
|
COLUMN_SKU = "sku",
|
|
15
19
|
COLUMN_NAME = "name",
|
|
@@ -38,6 +42,10 @@ export declare type LicenseGetData = {
|
|
|
38
42
|
[LicenseGetFields.COLUMN_FRIENDLY_NAME]: string | null;
|
|
39
43
|
[LicenseGetFields.COLUMN_CUSTOMER_REF]: string;
|
|
40
44
|
[LicenseGetFields.COLUMN_STATE]: string;
|
|
45
|
+
[LicenseGetFields.COLUMN_STATUS_CODE]: number;
|
|
46
|
+
[LicenseGetFields.COLUMN_IS_TRIAL]: boolean;
|
|
47
|
+
[LicenseGetFields.COLUMN_IS_ADDON]: boolean;
|
|
48
|
+
[LicenseGetFields.COLUMN_CURRENCY]: string;
|
|
41
49
|
[LicenseGetFields.COLUMN_SERVICE_REF]: string;
|
|
42
50
|
[LicenseGetFields.COLUMN_SKU]: string;
|
|
43
51
|
[LicenseGetFields.COLUMN_NAME]: string;
|
|
@@ -68,6 +76,10 @@ export declare class LicenseGetResult extends AbstractEntity<LicenseGetData> {
|
|
|
68
76
|
get friendlyName(): string | null;
|
|
69
77
|
get customerRef(): string;
|
|
70
78
|
get state(): string;
|
|
79
|
+
get statusCode(): number;
|
|
80
|
+
get isTrial(): boolean;
|
|
81
|
+
get isAddon(): boolean;
|
|
82
|
+
get currency(): string;
|
|
71
83
|
get serviceRef(): string;
|
|
72
84
|
get sku(): string;
|
|
73
85
|
get name(): string;
|
|
@@ -12,7 +12,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
12
12
|
}
|
|
13
13
|
return privateMap.get(receiver);
|
|
14
14
|
};
|
|
15
|
-
var _license_id, _parent_license_id, _friendlyName, _customer_ref, _state, _service_ref, _sku, _name, _seats, _activeSeats, _activation_datetime, _expiry_datetime, _autoRenew, _message, _actions, _actionMessages, _order_reference, _order, _vendor_license_id, _periodicity, _term, _category, _program, _associatedSubscriptionProgram, _price, _arrowSubCategories;
|
|
15
|
+
var _license_id, _parent_license_id, _friendlyName, _customer_ref, _state, _statusCode, _isTrial, _isAddon, _currency, _service_ref, _sku, _name, _seats, _activeSeats, _activation_datetime, _expiry_datetime, _autoRenew, _message, _actions, _actionMessages, _order_reference, _order, _vendor_license_id, _periodicity, _term, _category, _program, _associatedSubscriptionProgram, _price, _arrowSubCategories;
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.LicenseGetResult = exports.LicenseGetFields = void 0;
|
|
18
18
|
const actionsGetResult_1 = require("./actionsGetResult");
|
|
@@ -28,6 +28,10 @@ var LicenseGetFields;
|
|
|
28
28
|
LicenseGetFields["COLUMN_FRIENDLY_NAME"] = "friendlyName";
|
|
29
29
|
LicenseGetFields["COLUMN_CUSTOMER_REF"] = "customer_ref";
|
|
30
30
|
LicenseGetFields["COLUMN_STATE"] = "state";
|
|
31
|
+
LicenseGetFields["COLUMN_STATUS_CODE"] = "statusCode";
|
|
32
|
+
LicenseGetFields["COLUMN_IS_TRIAL"] = "isTrial";
|
|
33
|
+
LicenseGetFields["COLUMN_IS_ADDON"] = "isAddon";
|
|
34
|
+
LicenseGetFields["COLUMN_CURRENCY"] = "currency";
|
|
31
35
|
LicenseGetFields["COLUMN_SERVICE_REF"] = "service_ref";
|
|
32
36
|
LicenseGetFields["COLUMN_SKU"] = "sku";
|
|
33
37
|
LicenseGetFields["COLUMN_NAME"] = "name";
|
|
@@ -59,6 +63,10 @@ class LicenseGetResult extends abstractEntity_1.AbstractEntity {
|
|
|
59
63
|
_friendlyName.set(this, void 0);
|
|
60
64
|
_customer_ref.set(this, void 0);
|
|
61
65
|
_state.set(this, void 0);
|
|
66
|
+
_statusCode.set(this, void 0);
|
|
67
|
+
_isTrial.set(this, void 0);
|
|
68
|
+
_isAddon.set(this, void 0);
|
|
69
|
+
_currency.set(this, void 0);
|
|
62
70
|
_service_ref.set(this, void 0);
|
|
63
71
|
_sku.set(this, void 0);
|
|
64
72
|
_name.set(this, void 0);
|
|
@@ -85,6 +93,10 @@ class LicenseGetResult extends abstractEntity_1.AbstractEntity {
|
|
|
85
93
|
__classPrivateFieldSet(this, _friendlyName, licenseGetDataInput[LicenseGetFields.COLUMN_FRIENDLY_NAME]);
|
|
86
94
|
__classPrivateFieldSet(this, _customer_ref, licenseGetDataInput[LicenseGetFields.COLUMN_CUSTOMER_REF]);
|
|
87
95
|
__classPrivateFieldSet(this, _state, licenseGetDataInput[LicenseGetFields.COLUMN_STATE]);
|
|
96
|
+
__classPrivateFieldSet(this, _statusCode, licenseGetDataInput[LicenseGetFields.COLUMN_STATUS_CODE]);
|
|
97
|
+
__classPrivateFieldSet(this, _isTrial, licenseGetDataInput[LicenseGetFields.COLUMN_IS_TRIAL]);
|
|
98
|
+
__classPrivateFieldSet(this, _isAddon, licenseGetDataInput[LicenseGetFields.COLUMN_IS_ADDON]);
|
|
99
|
+
__classPrivateFieldSet(this, _currency, licenseGetDataInput[LicenseGetFields.COLUMN_CURRENCY]);
|
|
88
100
|
__classPrivateFieldSet(this, _service_ref, licenseGetDataInput[LicenseGetFields.COLUMN_SERVICE_REF]);
|
|
89
101
|
__classPrivateFieldSet(this, _sku, licenseGetDataInput[LicenseGetFields.COLUMN_SKU]);
|
|
90
102
|
__classPrivateFieldSet(this, _name, licenseGetDataInput[LicenseGetFields.COLUMN_NAME]);
|
|
@@ -124,6 +136,18 @@ class LicenseGetResult extends abstractEntity_1.AbstractEntity {
|
|
|
124
136
|
get state() {
|
|
125
137
|
return __classPrivateFieldGet(this, _state);
|
|
126
138
|
}
|
|
139
|
+
get statusCode() {
|
|
140
|
+
return __classPrivateFieldGet(this, _statusCode);
|
|
141
|
+
}
|
|
142
|
+
get isTrial() {
|
|
143
|
+
return __classPrivateFieldGet(this, _isTrial);
|
|
144
|
+
}
|
|
145
|
+
get isAddon() {
|
|
146
|
+
return __classPrivateFieldGet(this, _isAddon);
|
|
147
|
+
}
|
|
148
|
+
get currency() {
|
|
149
|
+
return __classPrivateFieldGet(this, _currency);
|
|
150
|
+
}
|
|
127
151
|
get serviceRef() {
|
|
128
152
|
return __classPrivateFieldGet(this, _service_ref);
|
|
129
153
|
}
|
|
@@ -195,6 +219,10 @@ class LicenseGetResult extends abstractEntity_1.AbstractEntity {
|
|
|
195
219
|
[LicenseGetFields.COLUMN_FRIENDLY_NAME]: this.friendlyName,
|
|
196
220
|
[LicenseGetFields.COLUMN_CUSTOMER_REF]: this.customerRef,
|
|
197
221
|
[LicenseGetFields.COLUMN_STATE]: this.state,
|
|
222
|
+
[LicenseGetFields.COLUMN_STATUS_CODE]: this.statusCode,
|
|
223
|
+
[LicenseGetFields.COLUMN_IS_TRIAL]: this.isTrial,
|
|
224
|
+
[LicenseGetFields.COLUMN_IS_ADDON]: this.isAddon,
|
|
225
|
+
[LicenseGetFields.COLUMN_CURRENCY]: this.currency,
|
|
198
226
|
[LicenseGetFields.COLUMN_SERVICE_REF]: this.serviceRef,
|
|
199
227
|
[LicenseGetFields.COLUMN_SKU]: this.sku,
|
|
200
228
|
[LicenseGetFields.COLUMN_NAME]: this.name,
|
|
@@ -221,5 +249,5 @@ class LicenseGetResult extends abstractEntity_1.AbstractEntity {
|
|
|
221
249
|
}
|
|
222
250
|
}
|
|
223
251
|
exports.LicenseGetResult = LicenseGetResult;
|
|
224
|
-
_license_id = new WeakMap(), _parent_license_id = new WeakMap(), _friendlyName = new WeakMap(), _customer_ref = new WeakMap(), _state = new WeakMap(), _service_ref = new WeakMap(), _sku = new WeakMap(), _name = new WeakMap(), _seats = new WeakMap(), _activeSeats = new WeakMap(), _activation_datetime = new WeakMap(), _expiry_datetime = new WeakMap(), _autoRenew = new WeakMap(), _message = new WeakMap(), _actions = new WeakMap(), _actionMessages = new WeakMap(), _order_reference = new WeakMap(), _order = new WeakMap(), _vendor_license_id = new WeakMap(), _periodicity = new WeakMap(), _term = new WeakMap(), _category = new WeakMap(), _program = new WeakMap(), _associatedSubscriptionProgram = new WeakMap(), _price = new WeakMap(), _arrowSubCategories = new WeakMap();
|
|
252
|
+
_license_id = new WeakMap(), _parent_license_id = new WeakMap(), _friendlyName = new WeakMap(), _customer_ref = new WeakMap(), _state = new WeakMap(), _statusCode = new WeakMap(), _isTrial = new WeakMap(), _isAddon = new WeakMap(), _currency = new WeakMap(), _service_ref = new WeakMap(), _sku = new WeakMap(), _name = new WeakMap(), _seats = new WeakMap(), _activeSeats = new WeakMap(), _activation_datetime = new WeakMap(), _expiry_datetime = new WeakMap(), _autoRenew = new WeakMap(), _message = new WeakMap(), _actions = new WeakMap(), _actionMessages = new WeakMap(), _order_reference = new WeakMap(), _order = new WeakMap(), _vendor_license_id = new WeakMap(), _periodicity = new WeakMap(), _term = new WeakMap(), _category = new WeakMap(), _program = new WeakMap(), _associatedSubscriptionProgram = new WeakMap(), _price = new WeakMap(), _arrowSubCategories = new WeakMap();
|
|
225
253
|
//# sourceMappingURL=licenseGetResult.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
|
/**
|
|
@@ -184,6 +184,9 @@ export declare type LicenseFindRawPayload = {
|
|
|
184
184
|
export declare type UpdateSeatsData = {
|
|
185
185
|
[LicenseGetFields.COLUMN_SEATS]: number;
|
|
186
186
|
};
|
|
187
|
+
export declare type PutFriendlyName = {
|
|
188
|
+
[LicenseGetFields.COLUMN_FRIENDLY_NAME]: string;
|
|
189
|
+
};
|
|
187
190
|
export declare class LicensesClient extends AbstractClient {
|
|
188
191
|
/**
|
|
189
192
|
* The base path of the Licenses API
|
|
@@ -213,6 +216,14 @@ export declare class LicensesClient extends AbstractClient {
|
|
|
213
216
|
* The path of reactivate endpoint
|
|
214
217
|
*/
|
|
215
218
|
private REACTIVATE_PATH;
|
|
219
|
+
/**
|
|
220
|
+
* The path of cancel endpoint
|
|
221
|
+
*/
|
|
222
|
+
private CANCEL_PATH;
|
|
223
|
+
/**
|
|
224
|
+
* The path of update friendlyName endpoint
|
|
225
|
+
*/
|
|
226
|
+
private UPDATE_FRIENDLYNAME;
|
|
216
227
|
/**
|
|
217
228
|
* Returns the raw result from the find endpoint call
|
|
218
229
|
*
|
|
@@ -242,4 +253,6 @@ export declare class LicensesClient extends AbstractClient {
|
|
|
242
253
|
updateSeats(licenseReference: string, putData: UpdateSeatsData, parameters?: Parameters): Promise<void>;
|
|
243
254
|
suspendLicense(licenseReference: string, parameters?: Parameters): Promise<void>;
|
|
244
255
|
reactivateLicense(licenseReference: string, parameters?: Parameters): Promise<void>;
|
|
256
|
+
cancelLicense(licenseReference: string, parameters?: Parameters): Promise<void>;
|
|
257
|
+
updateFriendlyName(licenseReference: string, putData: PutFriendlyName, parameters?: Parameters): Promise<void>;
|
|
245
258
|
}
|
|
@@ -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
|
/**
|
|
@@ -135,6 +135,14 @@ class LicensesClient extends abstractClient_1.AbstractClient {
|
|
|
135
135
|
* The path of reactivate endpoint
|
|
136
136
|
*/
|
|
137
137
|
this.REACTIVATE_PATH = '/reactivate';
|
|
138
|
+
/**
|
|
139
|
+
* The path of cancel endpoint
|
|
140
|
+
*/
|
|
141
|
+
this.CANCEL_PATH = '/cancel';
|
|
142
|
+
/**
|
|
143
|
+
* The path of update friendlyName endpoint
|
|
144
|
+
*/
|
|
145
|
+
this.UPDATE_FRIENDLYNAME = '/friendlyName';
|
|
138
146
|
}
|
|
139
147
|
/**
|
|
140
148
|
* Returns the raw result from the find endpoint call
|
|
@@ -248,6 +256,14 @@ class LicensesClient extends abstractClient_1.AbstractClient {
|
|
|
248
256
|
this.path = licenseReference + this.REACTIVATE_PATH;
|
|
249
257
|
return this.put(undefined, parameters);
|
|
250
258
|
}
|
|
259
|
+
cancelLicense(licenseReference, parameters = {}) {
|
|
260
|
+
this.path = licenseReference + this.CANCEL_PATH;
|
|
261
|
+
return this.put(undefined, parameters);
|
|
262
|
+
}
|
|
263
|
+
async updateFriendlyName(licenseReference, putData, parameters = {}) {
|
|
264
|
+
this.path = licenseReference + this.UPDATE_FRIENDLYNAME;
|
|
265
|
+
return await this.put(putData, parameters);
|
|
266
|
+
}
|
|
251
267
|
}
|
|
252
268
|
exports.LicensesClient = LicensesClient;
|
|
253
269
|
//# 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