@arrowsphere/api-client 3.4.0 → 3.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 CHANGED
@@ -3,6 +3,30 @@
3
3
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
4
4
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
5
5
 
6
+ ## [3.7.0] - 2022-06-23
7
+
8
+ ### Changed
9
+
10
+ - Adding new EndPoint of Customer orders:
11
+ - Get customer orders
12
+
13
+ ## [3.6.0] - 2022-05-17
14
+
15
+ ### Changed
16
+
17
+ - Adding 4 new EndPoints of Contact Information:
18
+ - Create Contact
19
+ - Get a Contact
20
+ - Get list of Contact
21
+ - Update a Contact
22
+
23
+ ## [3.5.0] - 2022-05-02
24
+
25
+ ### Changed
26
+
27
+ - Object LicenseGetResult:
28
+ - Add field termCode and periodicityCode
29
+
6
30
  ## [3.4.0] - 2022-04-28
7
31
 
8
32
  ### Changed
@@ -112,6 +112,7 @@ export declare abstract class AbstractClient {
112
112
  */
113
113
  protected post(payload?: Payload, parameters?: Parameters, headers?: Headers, options?: Options): Promise<AxiosResponse['data']>;
114
114
  protected put(payload?: Payload, parameters?: Parameters, headers?: Headers, options?: Options): Promise<void>;
115
+ protected patch<T>(payload?: Payload, parameters?: Parameters, headers?: Headers, options?: Options): Promise<T>;
115
116
  /**
116
117
  * Generates the full url for request
117
118
  * @param parameters - Parameters to serialize
@@ -157,6 +157,12 @@ class AbstractClient {
157
157
  });
158
158
  return this.getResponse(response);
159
159
  }
160
+ async patch(payload = {}, parameters = {}, headers = {}, options = {}) {
161
+ const response = await this.client.patch(this.generateUrl(parameters, options), payload, {
162
+ headers: this.prepareHeaders(headers),
163
+ });
164
+ return this.getResponse(response);
165
+ }
160
166
  /**
161
167
  * Generates the full url for request
162
168
  * @param parameters - Parameters to serialize
@@ -0,0 +1,37 @@
1
+ import { AbstractClient, Parameters } from '../abstractClient';
2
+ import { GetResult } from '../getResult';
3
+ import { ContactCreate } from './entities/contactCreate';
4
+ import { Contact } from './entities/contact';
5
+ import { ContactList } from './entities/contactList';
6
+ export declare enum ContactRequestFields {
7
+ COLUMN_FIRSTNAME = "firstname",
8
+ COLUMN_LASTNAME = "lastname",
9
+ COLUMN_EMAIL = "email",
10
+ COLUMN_PHONE = "phone",
11
+ COLUMN_ERP_ID = "erpId",
12
+ COLUMN_TYPE = "type",
13
+ COLUMN_ROLE = "role"
14
+ }
15
+ export declare type ContactRequestType = {
16
+ [ContactRequestFields.COLUMN_FIRSTNAME]: string;
17
+ [ContactRequestFields.COLUMN_LASTNAME]: string;
18
+ [ContactRequestFields.COLUMN_EMAIL]: string;
19
+ [ContactRequestFields.COLUMN_PHONE]: string;
20
+ [ContactRequestFields.COLUMN_ERP_ID]: string;
21
+ [ContactRequestFields.COLUMN_TYPE]: string;
22
+ [ContactRequestFields.COLUMN_ROLE]: string;
23
+ };
24
+ export declare class ContactClient extends AbstractClient {
25
+ /**
26
+ * The base path of the Customers API
27
+ */
28
+ private ROOT_PATH;
29
+ /**
30
+ * The base path of the API
31
+ */
32
+ protected basePath: string;
33
+ createContact(postData: ContactRequestType, parameters?: Parameters): Promise<GetResult<ContactCreate>>;
34
+ listContact(perPage?: number, page?: number, parameters?: Parameters): Promise<GetResult<ContactList>>;
35
+ getContact(contactReference: string, parameters?: Parameters): Promise<GetResult<Contact>>;
36
+ updateContact(contactReference: string, patchData: ContactRequestType, parameters?: Parameters): Promise<GetResult<Contact>>;
37
+ }
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ContactClient = exports.ContactRequestFields = void 0;
4
+ const abstractClient_1 = require("../abstractClient");
5
+ const getResult_1 = require("../getResult");
6
+ const contactCreate_1 = require("./entities/contactCreate");
7
+ const contact_1 = require("./entities/contact");
8
+ const contactList_1 = require("./entities/contactList");
9
+ var ContactRequestFields;
10
+ (function (ContactRequestFields) {
11
+ ContactRequestFields["COLUMN_FIRSTNAME"] = "firstname";
12
+ ContactRequestFields["COLUMN_LASTNAME"] = "lastname";
13
+ ContactRequestFields["COLUMN_EMAIL"] = "email";
14
+ ContactRequestFields["COLUMN_PHONE"] = "phone";
15
+ ContactRequestFields["COLUMN_ERP_ID"] = "erpId";
16
+ ContactRequestFields["COLUMN_TYPE"] = "type";
17
+ ContactRequestFields["COLUMN_ROLE"] = "role";
18
+ })(ContactRequestFields = exports.ContactRequestFields || (exports.ContactRequestFields = {}));
19
+ class ContactClient extends abstractClient_1.AbstractClient {
20
+ constructor() {
21
+ super(...arguments);
22
+ /**
23
+ * The base path of the Customers API
24
+ */
25
+ this.ROOT_PATH = '/contacts';
26
+ /**
27
+ * The base path of the API
28
+ */
29
+ this.basePath = this.ROOT_PATH;
30
+ }
31
+ async createContact(postData, parameters = {}) {
32
+ return new getResult_1.GetResult(contactCreate_1.ContactCreate, await this.post(postData, parameters));
33
+ }
34
+ async listContact(perPage = 25, page = 1, parameters = {}) {
35
+ this.setPerPage(perPage);
36
+ this.setPage(page);
37
+ return new getResult_1.GetResult(contactList_1.ContactList, await this.get(parameters));
38
+ }
39
+ async getContact(contactReference, parameters = {}) {
40
+ this.path = `/${contactReference}`;
41
+ return new getResult_1.GetResult(contact_1.Contact, await this.get(parameters));
42
+ }
43
+ async updateContact(contactReference, patchData, parameters = {}) {
44
+ this.path = `/${contactReference}`;
45
+ return new getResult_1.GetResult(contact_1.Contact, await this.patch(patchData, parameters));
46
+ }
47
+ }
48
+ exports.ContactClient = ContactClient;
49
+ //# sourceMappingURL=contactClient.js.map
@@ -0,0 +1,43 @@
1
+ import { AbstractEntity } from '../../abstractEntity';
2
+ export declare enum ContactFields {
3
+ COLUMN_ID = "id",
4
+ COLUMN_COMPANY_ID = "companyId",
5
+ COLUMN_RESELLER = "reseller",
6
+ COLUMN_FIRSTNAME = "firstname",
7
+ COLUMN_LASTNAME = "lastname",
8
+ COLUMN_EMAIL = "email",
9
+ COLUMN_PHONE = "phone",
10
+ COLUMN_ERP_ID = "erpId",
11
+ COLUMN_TYPE = "type",
12
+ COLUMN_ROLE = "role",
13
+ COLUMN_STATUS = "status"
14
+ }
15
+ export declare type ContactType = {
16
+ [ContactFields.COLUMN_ID]: number;
17
+ [ContactFields.COLUMN_COMPANY_ID]: number;
18
+ [ContactFields.COLUMN_RESELLER]: string;
19
+ [ContactFields.COLUMN_FIRSTNAME]: string;
20
+ [ContactFields.COLUMN_LASTNAME]: string;
21
+ [ContactFields.COLUMN_EMAIL]: string;
22
+ [ContactFields.COLUMN_PHONE]: string;
23
+ [ContactFields.COLUMN_ERP_ID]: string;
24
+ [ContactFields.COLUMN_TYPE]: string;
25
+ [ContactFields.COLUMN_ROLE]: string;
26
+ [ContactFields.COLUMN_STATUS]: string;
27
+ };
28
+ export declare class Contact extends AbstractEntity<ContactType> {
29
+ #private;
30
+ constructor(contactDataInput: ContactType);
31
+ get id(): number;
32
+ get companyId(): number;
33
+ get reseller(): string;
34
+ get firstname(): string;
35
+ get lastname(): string;
36
+ get email(): string;
37
+ get phone(): string;
38
+ get erpId(): string;
39
+ get type(): string;
40
+ get role(): string;
41
+ get status(): string;
42
+ toJSON(): ContactType;
43
+ }
@@ -0,0 +1,110 @@
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 _id, _companyId, _reseller, _firstname, _lastname, _email, _phone, _erpId, _type, _role, _status;
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_ID"] = "id";
22
+ ContactFields["COLUMN_COMPANY_ID"] = "companyId";
23
+ ContactFields["COLUMN_RESELLER"] = "reseller";
24
+ ContactFields["COLUMN_FIRSTNAME"] = "firstname";
25
+ ContactFields["COLUMN_LASTNAME"] = "lastname";
26
+ ContactFields["COLUMN_EMAIL"] = "email";
27
+ ContactFields["COLUMN_PHONE"] = "phone";
28
+ ContactFields["COLUMN_ERP_ID"] = "erpId";
29
+ ContactFields["COLUMN_TYPE"] = "type";
30
+ ContactFields["COLUMN_ROLE"] = "role";
31
+ ContactFields["COLUMN_STATUS"] = "status";
32
+ })(ContactFields = exports.ContactFields || (exports.ContactFields = {}));
33
+ class Contact extends abstractEntity_1.AbstractEntity {
34
+ constructor(contactDataInput) {
35
+ super(contactDataInput);
36
+ _id.set(this, void 0);
37
+ _companyId.set(this, void 0);
38
+ _reseller.set(this, void 0);
39
+ _firstname.set(this, void 0);
40
+ _lastname.set(this, void 0);
41
+ _email.set(this, void 0);
42
+ _phone.set(this, void 0);
43
+ _erpId.set(this, void 0);
44
+ _type.set(this, void 0);
45
+ _role.set(this, void 0);
46
+ _status.set(this, void 0);
47
+ __classPrivateFieldSet(this, _id, contactDataInput[ContactFields.COLUMN_ID]);
48
+ __classPrivateFieldSet(this, _companyId, contactDataInput[ContactFields.COLUMN_COMPANY_ID]);
49
+ __classPrivateFieldSet(this, _reseller, contactDataInput[ContactFields.COLUMN_RESELLER]);
50
+ __classPrivateFieldSet(this, _firstname, contactDataInput[ContactFields.COLUMN_FIRSTNAME]);
51
+ __classPrivateFieldSet(this, _lastname, contactDataInput[ContactFields.COLUMN_LASTNAME]);
52
+ __classPrivateFieldSet(this, _email, contactDataInput[ContactFields.COLUMN_EMAIL]);
53
+ __classPrivateFieldSet(this, _phone, contactDataInput[ContactFields.COLUMN_PHONE]);
54
+ __classPrivateFieldSet(this, _erpId, contactDataInput[ContactFields.COLUMN_ERP_ID]);
55
+ __classPrivateFieldSet(this, _type, contactDataInput[ContactFields.COLUMN_TYPE]);
56
+ __classPrivateFieldSet(this, _role, contactDataInput[ContactFields.COLUMN_ROLE]);
57
+ __classPrivateFieldSet(this, _status, contactDataInput[ContactFields.COLUMN_STATUS]);
58
+ }
59
+ get id() {
60
+ return __classPrivateFieldGet(this, _id);
61
+ }
62
+ get companyId() {
63
+ return __classPrivateFieldGet(this, _companyId);
64
+ }
65
+ get reseller() {
66
+ return __classPrivateFieldGet(this, _reseller);
67
+ }
68
+ get firstname() {
69
+ return __classPrivateFieldGet(this, _firstname);
70
+ }
71
+ get lastname() {
72
+ return __classPrivateFieldGet(this, _lastname);
73
+ }
74
+ get email() {
75
+ return __classPrivateFieldGet(this, _email);
76
+ }
77
+ get phone() {
78
+ return __classPrivateFieldGet(this, _phone);
79
+ }
80
+ get erpId() {
81
+ return __classPrivateFieldGet(this, _erpId);
82
+ }
83
+ get type() {
84
+ return __classPrivateFieldGet(this, _type);
85
+ }
86
+ get role() {
87
+ return __classPrivateFieldGet(this, _role);
88
+ }
89
+ get status() {
90
+ return __classPrivateFieldGet(this, _status);
91
+ }
92
+ toJSON() {
93
+ return {
94
+ [ContactFields.COLUMN_ID]: this.id,
95
+ [ContactFields.COLUMN_COMPANY_ID]: this.companyId,
96
+ [ContactFields.COLUMN_RESELLER]: this.reseller,
97
+ [ContactFields.COLUMN_FIRSTNAME]: this.firstname,
98
+ [ContactFields.COLUMN_LASTNAME]: this.lastname,
99
+ [ContactFields.COLUMN_EMAIL]: this.email,
100
+ [ContactFields.COLUMN_PHONE]: this.phone,
101
+ [ContactFields.COLUMN_ERP_ID]: this.erpId,
102
+ [ContactFields.COLUMN_TYPE]: this.type,
103
+ [ContactFields.COLUMN_ROLE]: this.role,
104
+ [ContactFields.COLUMN_STATUS]: this.status,
105
+ };
106
+ }
107
+ }
108
+ exports.Contact = Contact;
109
+ _id = new WeakMap(), _companyId = new WeakMap(), _reseller = new WeakMap(), _firstname = new WeakMap(), _lastname = new WeakMap(), _email = new WeakMap(), _phone = new WeakMap(), _erpId = new WeakMap(), _type = new WeakMap(), _role = new WeakMap(), _status = new WeakMap();
110
+ //# sourceMappingURL=contact.js.map
@@ -0,0 +1,13 @@
1
+ import { AbstractEntity } from '../../abstractEntity';
2
+ export declare enum ContactCreateFields {
3
+ COLUMN_ID = "id"
4
+ }
5
+ export declare type ContactCreateType = {
6
+ [ContactCreateFields.COLUMN_ID]: number;
7
+ };
8
+ export declare class ContactCreate extends AbstractEntity<ContactCreateType> {
9
+ #private;
10
+ constructor(createContactResponse: ContactCreateType);
11
+ get id(): number;
12
+ toJSON(): ContactCreateType;
13
+ }
@@ -0,0 +1,40 @@
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 _id;
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.ContactCreate = exports.ContactCreateFields = void 0;
18
+ const abstractEntity_1 = require("../../abstractEntity");
19
+ var ContactCreateFields;
20
+ (function (ContactCreateFields) {
21
+ ContactCreateFields["COLUMN_ID"] = "id";
22
+ })(ContactCreateFields = exports.ContactCreateFields || (exports.ContactCreateFields = {}));
23
+ class ContactCreate extends abstractEntity_1.AbstractEntity {
24
+ constructor(createContactResponse) {
25
+ super(createContactResponse);
26
+ _id.set(this, void 0);
27
+ __classPrivateFieldSet(this, _id, createContactResponse[ContactCreateFields.COLUMN_ID]);
28
+ }
29
+ get id() {
30
+ return __classPrivateFieldGet(this, _id);
31
+ }
32
+ toJSON() {
33
+ return {
34
+ [ContactCreateFields.COLUMN_ID]: this.id,
35
+ };
36
+ }
37
+ }
38
+ exports.ContactCreate = ContactCreate;
39
+ _id = new WeakMap();
40
+ //# sourceMappingURL=contactCreate.js.map
@@ -0,0 +1,9 @@
1
+ import { AbstractEntity } from '../../abstractEntity';
2
+ import { Contact, ContactType } from './contact';
3
+ export declare type ContactListType = Array<ContactType>;
4
+ export declare class ContactList extends AbstractEntity<ContactListType> {
5
+ #private;
6
+ constructor(contactListDataInput: Array<ContactType>);
7
+ get contactList(): Array<Contact>;
8
+ toJSON(): ContactListType;
9
+ }
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, privateMap, value) {
3
+ if (!privateMap.has(receiver)) {
4
+ throw new TypeError("attempted to set private field on non-instance");
5
+ }
6
+ privateMap.set(receiver, value);
7
+ return value;
8
+ };
9
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, privateMap) {
10
+ if (!privateMap.has(receiver)) {
11
+ throw new TypeError("attempted to get private field on non-instance");
12
+ }
13
+ return privateMap.get(receiver);
14
+ };
15
+ var _contactList;
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.ContactList = void 0;
18
+ const abstractEntity_1 = require("../../abstractEntity");
19
+ const contact_1 = require("./contact");
20
+ class ContactList extends abstractEntity_1.AbstractEntity {
21
+ constructor(contactListDataInput) {
22
+ super(contactListDataInput);
23
+ _contactList.set(this, void 0);
24
+ __classPrivateFieldSet(this, _contactList, contactListDataInput.map((contact) => new contact_1.Contact(contact)));
25
+ }
26
+ get contactList() {
27
+ return __classPrivateFieldGet(this, _contactList);
28
+ }
29
+ toJSON() {
30
+ return this.contactList.map((contact) => contact.toJSON());
31
+ }
32
+ }
33
+ exports.ContactList = ContactList;
34
+ _contactList = new WeakMap();
35
+ //# sourceMappingURL=contactList.js.map
@@ -0,0 +1,4 @@
1
+ export * from './entities/contactCreate';
2
+ export * from './entities/contactList';
3
+ export * from './entities/contact';
4
+ export * from './contactClient';
@@ -0,0 +1,17 @@
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/contactCreate"), exports);
14
+ __exportStar(require("./entities/contactList"), exports);
15
+ __exportStar(require("./entities/contact"), exports);
16
+ __exportStar(require("./contactClient"), exports);
17
+ //# sourceMappingURL=index.js.map
@@ -2,11 +2,13 @@ import { AbstractClient, Parameters } from '../abstractClient';
2
2
  import { GetResult } from '../getResult';
3
3
  import { DataCustomers } from './entities/dataCustomers';
4
4
  import { DataInvitation } from './entities/dataInvitation';
5
+ import { DataListOrders } from '../orders';
5
6
  export declare class CustomersClient extends AbstractClient {
6
7
  /**
7
- * The base path of the Customers API
8
+ * The base path of the API
8
9
  */
9
- private ROOT_PATH;
10
+ protected basePath: string;
10
11
  getCustomers(parameters?: Parameters): Promise<GetResult<DataCustomers>>;
12
+ getCustomerOrders(customerRef: string, perPage?: number, page?: number, parameters?: Parameters): Promise<GetResult<DataListOrders>>;
11
13
  getCustomerInvitation(codeInvitation: string, parameters?: Parameters): Promise<GetResult<DataInvitation>>;
12
14
  }
@@ -5,20 +5,26 @@ const abstractClient_1 = require("../abstractClient");
5
5
  const getResult_1 = require("../getResult");
6
6
  const dataCustomers_1 = require("./entities/dataCustomers");
7
7
  const dataInvitation_1 = require("./entities/dataInvitation");
8
+ const orders_1 = require("../orders");
8
9
  class CustomersClient extends abstractClient_1.AbstractClient {
9
10
  constructor() {
10
11
  super(...arguments);
11
12
  /**
12
- * The base path of the Customers API
13
+ * The base path of the API
13
14
  */
14
- this.ROOT_PATH = '/customers';
15
+ this.basePath = '/customers';
15
16
  }
16
17
  async getCustomers(parameters = {}) {
17
- this.path = this.ROOT_PATH;
18
18
  return new getResult_1.GetResult(dataCustomers_1.DataCustomers, await this.get(parameters));
19
19
  }
20
+ async getCustomerOrders(customerRef, perPage = 25, page = 1, parameters = {}) {
21
+ this.setPerPage(perPage);
22
+ this.setPage(page);
23
+ this.path = `/${customerRef}/orders`;
24
+ return new getResult_1.GetResult(orders_1.DataListOrders, await this.get(parameters));
25
+ }
20
26
  async getCustomerInvitation(codeInvitation, parameters = {}) {
21
- this.path = `${this.ROOT_PATH}/invitations/${codeInvitation}`;
27
+ this.path = `/invitations/${codeInvitation}`;
22
28
  return new getResult_1.GetResult(dataInvitation_1.DataInvitation, await this.get(parameters));
23
29
  }
24
30
  }
package/build/index.d.ts CHANGED
@@ -1,9 +1,11 @@
1
+ import * as ContactInformation from './contact';
1
2
  export * from './publicApiClient';
2
3
  export * from './publicGraphQLClient';
3
4
  export * from './abstractEntity';
4
5
  export * from './abstractClient';
5
6
  export * from './abstractGraphQLClient';
6
7
  export * from './catalog/';
8
+ export { ContactInformation };
7
9
  export * from './customers/';
8
10
  export * from './general/';
9
11
  export * from './licenses/';
package/build/index.js CHANGED
@@ -6,10 +6,25 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
6
6
  if (k2 === undefined) k2 = k;
7
7
  o[k2] = m[k];
8
8
  }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
9
21
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
22
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
23
  };
12
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.ContactInformation = void 0;
26
+ const ContactInformation = __importStar(require("./contact"));
27
+ exports.ContactInformation = ContactInformation;
13
28
  __exportStar(require("./publicApiClient"), exports);
14
29
  __exportStar(require("./publicGraphQLClient"), exports);
15
30
  __exportStar(require("./abstractEntity"), exports);
@@ -28,7 +28,9 @@ export declare enum LicenseGetFields {
28
28
  COLUMN_ORDER = "order",
29
29
  COLUMN_VENDOR_LICENSE_ID = "vendor_license_id",
30
30
  COLUMN_PERIODICITY = "periodicity",
31
+ COLUMN_PERIODICITY_CODE = "periodicityCode",
31
32
  COLUMN_TERM = "term",
33
+ COLUMN_TERM_CODE = "termCode",
32
34
  COLUMN_CATEGORY = "category",
33
35
  COLUMN_PROGRAM = "program",
34
36
  COLUMN_ASSOCIATED_SUBSCRIPTION_PROGRAM = "associatedSubscriptionProgram",
@@ -59,7 +61,9 @@ export declare type LicenseGetData = {
59
61
  [LicenseGetFields.COLUMN_ORDER]: OrderGetData;
60
62
  [LicenseGetFields.COLUMN_VENDOR_LICENSE_ID]: string | null;
61
63
  [LicenseGetFields.COLUMN_PERIODICITY]: string;
64
+ [LicenseGetFields.COLUMN_PERIODICITY_CODE]: number;
62
65
  [LicenseGetFields.COLUMN_TERM]: string;
66
+ [LicenseGetFields.COLUMN_TERM_CODE]: number;
63
67
  [LicenseGetFields.COLUMN_CATEGORY]: string;
64
68
  [LicenseGetFields.COLUMN_PROGRAM]: string;
65
69
  [LicenseGetFields.COLUMN_ASSOCIATED_SUBSCRIPTION_PROGRAM]: string;
@@ -92,7 +96,9 @@ export declare class LicenseGetResult extends AbstractEntity<LicenseGetData> {
92
96
  get order(): OrderGetResult;
93
97
  get vendorLicenseId(): string | null;
94
98
  get periodicity(): string;
99
+ get periodicityCode(): number;
95
100
  get term(): string;
101
+ get termCode(): number;
96
102
  get category(): string;
97
103
  get program(): string;
98
104
  get associatedSubscriptionProgram(): 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, _statusCode, _isTrial, _isAddon, _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, _service_ref, _sku, _name, _seats, _activeSeats, _activation_datetime, _expiry_datetime, _autoRenew, _message, _actions, _actionMessages, _order_reference, _order, _vendor_license_id, _periodicity, _periodicityCode, _term, _termCode, _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");
@@ -46,7 +46,9 @@ var LicenseGetFields;
46
46
  LicenseGetFields["COLUMN_ORDER"] = "order";
47
47
  LicenseGetFields["COLUMN_VENDOR_LICENSE_ID"] = "vendor_license_id";
48
48
  LicenseGetFields["COLUMN_PERIODICITY"] = "periodicity";
49
+ LicenseGetFields["COLUMN_PERIODICITY_CODE"] = "periodicityCode";
49
50
  LicenseGetFields["COLUMN_TERM"] = "term";
51
+ LicenseGetFields["COLUMN_TERM_CODE"] = "termCode";
50
52
  LicenseGetFields["COLUMN_CATEGORY"] = "category";
51
53
  LicenseGetFields["COLUMN_PROGRAM"] = "program";
52
54
  LicenseGetFields["COLUMN_ASSOCIATED_SUBSCRIPTION_PROGRAM"] = "associatedSubscriptionProgram";
@@ -80,7 +82,9 @@ class LicenseGetResult extends abstractEntity_1.AbstractEntity {
80
82
  _order.set(this, void 0);
81
83
  _vendor_license_id.set(this, void 0);
82
84
  _periodicity.set(this, void 0);
85
+ _periodicityCode.set(this, void 0);
83
86
  _term.set(this, void 0);
87
+ _termCode.set(this, void 0);
84
88
  _category.set(this, void 0);
85
89
  _program.set(this, void 0);
86
90
  _associatedSubscriptionProgram.set(this, void 0);
@@ -111,7 +115,9 @@ class LicenseGetResult extends abstractEntity_1.AbstractEntity {
111
115
  __classPrivateFieldSet(this, _order, new orderGetResult_1.OrderGetResult(licenseGetDataInput[LicenseGetFields.COLUMN_ORDER]));
112
116
  __classPrivateFieldSet(this, _vendor_license_id, licenseGetDataInput[LicenseGetFields.COLUMN_VENDOR_LICENSE_ID]);
113
117
  __classPrivateFieldSet(this, _periodicity, licenseGetDataInput[LicenseGetFields.COLUMN_PERIODICITY]);
118
+ __classPrivateFieldSet(this, _periodicityCode, licenseGetDataInput[LicenseGetFields.COLUMN_PERIODICITY_CODE]);
114
119
  __classPrivateFieldSet(this, _term, licenseGetDataInput[LicenseGetFields.COLUMN_TERM]);
120
+ __classPrivateFieldSet(this, _termCode, licenseGetDataInput[LicenseGetFields.COLUMN_TERM_CODE]);
115
121
  __classPrivateFieldSet(this, _category, licenseGetDataInput[LicenseGetFields.COLUMN_CATEGORY]);
116
122
  __classPrivateFieldSet(this, _program, licenseGetDataInput[LicenseGetFields.COLUMN_PROGRAM]);
117
123
  __classPrivateFieldSet(this, _associatedSubscriptionProgram, licenseGetDataInput[LicenseGetFields.COLUMN_ASSOCIATED_SUBSCRIPTION_PROGRAM]);
@@ -187,9 +193,15 @@ class LicenseGetResult extends abstractEntity_1.AbstractEntity {
187
193
  get periodicity() {
188
194
  return __classPrivateFieldGet(this, _periodicity);
189
195
  }
196
+ get periodicityCode() {
197
+ return __classPrivateFieldGet(this, _periodicityCode);
198
+ }
190
199
  get term() {
191
200
  return __classPrivateFieldGet(this, _term);
192
201
  }
202
+ get termCode() {
203
+ return __classPrivateFieldGet(this, _termCode);
204
+ }
193
205
  get category() {
194
206
  return __classPrivateFieldGet(this, _category);
195
207
  }
@@ -231,7 +243,9 @@ class LicenseGetResult extends abstractEntity_1.AbstractEntity {
231
243
  [LicenseGetFields.COLUMN_ORDER]: this.order.toJSON(),
232
244
  [LicenseGetFields.COLUMN_VENDOR_LICENSE_ID]: this.vendorLicenseId,
233
245
  [LicenseGetFields.COLUMN_PERIODICITY]: this.periodicity,
246
+ [LicenseGetFields.COLUMN_PERIODICITY_CODE]: this.periodicityCode,
234
247
  [LicenseGetFields.COLUMN_TERM]: this.term,
248
+ [LicenseGetFields.COLUMN_TERM_CODE]: this.termCode,
235
249
  [LicenseGetFields.COLUMN_CATEGORY]: this.category,
236
250
  [LicenseGetFields.COLUMN_PROGRAM]: this.program,
237
251
  [LicenseGetFields.COLUMN_ASSOCIATED_SUBSCRIPTION_PROGRAM]: this
@@ -242,5 +256,5 @@ class LicenseGetResult extends abstractEntity_1.AbstractEntity {
242
256
  }
243
257
  }
244
258
  exports.LicenseGetResult = LicenseGetResult;
245
- _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(), _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();
259
+ _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(), _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(), _periodicityCode = new WeakMap(), _term = new WeakMap(), _termCode = new WeakMap(), _category = new WeakMap(), _program = new WeakMap(), _associatedSubscriptionProgram = new WeakMap(), _price = new WeakMap(), _arrowSubCategories = new WeakMap();
246
260
  //# sourceMappingURL=licenseGetResult.js.map
@@ -4,6 +4,7 @@ import { LicensesClient } from './licenses/licensesClient';
4
4
  import { SubscriptionsClient } from './subscriptions/subscriptionsClient';
5
5
  import { CustomersClient } from './customers/customersClient';
6
6
  import { OrdersClient } from './orders';
7
+ import { ContactClient } from './contact/contactClient';
7
8
  /**
8
9
  * Public API Client class, should be the main entry point for your calls
9
10
  */
@@ -39,5 +40,10 @@ export declare class PublicApiClient extends AbstractClient {
39
40
  * @returns {@link OrdersClient}
40
41
  */
41
42
  getOrdersClient(): OrdersClient;
43
+ /**
44
+ * Creates a new {@link ContactClient} instance and returns it
45
+ * @returns {@link ContactClient}
46
+ */
47
+ getContactClient(): ContactClient;
42
48
  }
43
49
  export default PublicApiClient;
@@ -7,6 +7,7 @@ const licensesClient_1 = require("./licenses/licensesClient");
7
7
  const subscriptionsClient_1 = require("./subscriptions/subscriptionsClient");
8
8
  const customersClient_1 = require("./customers/customersClient");
9
9
  const orders_1 = require("./orders");
10
+ const contactClient_1 = require("./contact/contactClient");
10
11
  /**
11
12
  * Public API Client class, should be the main entry point for your calls
12
13
  */
@@ -68,6 +69,15 @@ class PublicApiClient extends abstractClient_1.AbstractClient {
68
69
  .setUrl(this.url)
69
70
  .setApiKey(this.apiKey);
70
71
  }
72
+ /**
73
+ * Creates a new {@link ContactClient} instance and returns it
74
+ * @returns {@link ContactClient}
75
+ */
76
+ getContactClient() {
77
+ return new contactClient_1.ContactClient(this.client)
78
+ .setUrl(this.url)
79
+ .setApiKey(this.apiKey);
80
+ }
71
81
  }
72
82
  exports.PublicApiClient = PublicApiClient;
73
83
  exports.default = PublicApiClient;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "https://github.com/ArrowSphere/nodejs-api-client.git"
6
6
  },
7
- "version": "3.4.0",
7
+ "version": "3.7.0",
8
8
  "description": "Node.js client for ArrowSphere's public API",
9
9
  "main": "build/index.js",
10
10
  "types": "build/index.d.ts",