@arrowsphere/api-client 2.8.0 → 3.2.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.
Files changed (36) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/build/abstractClient.d.ts +2 -0
  3. package/build/abstractClient.js +2 -0
  4. package/build/customers/customersClient.d.ts +2 -0
  5. package/build/customers/customersClient.js +5 -0
  6. package/build/customers/entities/dataInvitation.d.ts +27 -0
  7. package/build/customers/entities/dataInvitation.js +70 -0
  8. package/build/customers/entities/invitations/company/company.d.ts +13 -0
  9. package/build/customers/entities/invitations/company/company.js +40 -0
  10. package/build/customers/entities/invitations/contact/invitationContact.d.ts +25 -0
  11. package/build/customers/entities/invitations/contact/invitationContact.js +63 -0
  12. package/build/customers/index.d.ts +3 -0
  13. package/build/customers/index.js +3 -0
  14. package/build/licenses/entities/getLicense/licenseGetResult.d.ts +0 -3
  15. package/build/licenses/entities/getLicense/licenseGetResult.js +2 -9
  16. package/build/licenses/entities/getLicense/licensePriceGetResult.d.ts +3 -0
  17. package/build/licenses/entities/getLicense/licensePriceGetResult.js +9 -2
  18. package/build/orders/entities/dataListOrders.d.ts +14 -0
  19. package/build/orders/entities/dataListOrders.js +41 -0
  20. package/build/orders/entities/orders/order.d.ts +40 -0
  21. package/build/orders/entities/orders/order.js +99 -0
  22. package/build/orders/entities/orders/partner/partner.d.ts +17 -0
  23. package/build/orders/entities/orders/partner/partner.js +47 -0
  24. package/build/orders/entities/orders/products/products.d.ts +47 -0
  25. package/build/orders/entities/orders/products/products.js +97 -0
  26. package/build/orders/entities/referenceLink.d.ts +16 -0
  27. package/build/orders/entities/referenceLink.js +47 -0
  28. package/build/orders/index.d.ts +6 -0
  29. package/build/orders/index.js +19 -0
  30. package/build/orders/ordersClient.d.ts +49 -0
  31. package/build/orders/ordersClient.js +48 -0
  32. package/build/publicApiClient.d.ts +6 -0
  33. package/build/publicApiClient.js +10 -0
  34. package/build/shared/contact/contact.d.ts +10 -0
  35. package/build/shared/contact/contact.js +10 -0
  36. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,26 @@
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.2.0] - 2022-04-01
7
+
8
+ ### Changed
9
+
10
+ - Add endpoint create order
11
+ - Add endpoint list order
12
+ - Add endpoint get an order
13
+
14
+ ## [3.1.0] - 2022-03-21
15
+
16
+ ### Changed
17
+
18
+ - Add endpoint get customer invitation
19
+
20
+ ## [3.0.0] - 2022-03-08
21
+
22
+ ### Changed
23
+
24
+ - Moved the property `currency` of license from root to price object
25
+
6
26
  ## [2.8.0] - 2022-03-03
7
27
 
8
28
  ### Added
@@ -6,6 +6,8 @@ export declare enum ParameterKeys {
6
6
  API_KEY = "apiKey",
7
7
  PAGE = "page",
8
8
  PER_PAGE = "per_page",
9
+ SORT_BY = "sort_by",
10
+ ORDER_BY = "order_by",
9
11
  PER_PAGE_CAMEL = "perPage"
10
12
  }
11
13
  export declare type Parameters = Record<string, string | string[] | undefined>;
@@ -17,6 +17,8 @@ var ParameterKeys;
17
17
  ParameterKeys["API_KEY"] = "apiKey";
18
18
  ParameterKeys["PAGE"] = "page";
19
19
  ParameterKeys["PER_PAGE"] = "per_page";
20
+ ParameterKeys["SORT_BY"] = "sort_by";
21
+ ParameterKeys["ORDER_BY"] = "order_by";
20
22
  ParameterKeys["PER_PAGE_CAMEL"] = "perPage";
21
23
  })(ParameterKeys = exports.ParameterKeys || (exports.ParameterKeys = {}));
22
24
  class AbstractClient {
@@ -1,10 +1,12 @@
1
1
  import { AbstractClient, Parameters } from '../abstractClient';
2
2
  import { GetResult } from '../getResult';
3
3
  import { DataCustomers } from './entities/dataCustomers';
4
+ import { DataInvitation } from './entities/dataInvitation';
4
5
  export declare class CustomersClient extends AbstractClient {
5
6
  /**
6
7
  * The base path of the Customers API
7
8
  */
8
9
  private ROOT_PATH;
9
10
  getCustomers(parameters?: Parameters): Promise<GetResult<DataCustomers>>;
11
+ getCustomerInvitation(codeInvitation: string, parameters?: Parameters): Promise<GetResult<DataInvitation>>;
10
12
  }
@@ -4,6 +4,7 @@ exports.CustomersClient = void 0;
4
4
  const abstractClient_1 = require("../abstractClient");
5
5
  const getResult_1 = require("../getResult");
6
6
  const dataCustomers_1 = require("./entities/dataCustomers");
7
+ const dataInvitation_1 = require("./entities/dataInvitation");
7
8
  class CustomersClient extends abstractClient_1.AbstractClient {
8
9
  constructor() {
9
10
  super(...arguments);
@@ -16,6 +17,10 @@ class CustomersClient extends abstractClient_1.AbstractClient {
16
17
  this.path = this.ROOT_PATH;
17
18
  return new getResult_1.GetResult(dataCustomers_1.DataCustomers, await this.get(parameters));
18
19
  }
20
+ async getCustomerInvitation(codeInvitation, parameters = {}) {
21
+ this.path = `${this.ROOT_PATH}/invitations/${codeInvitation}`;
22
+ return new getResult_1.GetResult(dataInvitation_1.DataInvitation, await this.get(parameters));
23
+ }
19
24
  }
20
25
  exports.CustomersClient = CustomersClient;
21
26
  //# sourceMappingURL=customersClient.js.map
@@ -0,0 +1,27 @@
1
+ import { AbstractEntity } from '../../abstractEntity';
2
+ import { Company, CompanyType } from './invitations/company/company';
3
+ import { InvitationContact, InvitationContactType } from './invitations/contact/invitationContact';
4
+ export declare enum DataInvitationFields {
5
+ COLUMN_CODE = "code",
6
+ COLUMN_CREATED_AT = "createdAt",
7
+ COLUMN_UPDATED_AT = "updatedAt",
8
+ COLUMN_COMPANY = "company",
9
+ COLUMN_CONTACT = "contact"
10
+ }
11
+ export declare type DataInvitationType = {
12
+ [DataInvitationFields.COLUMN_CODE]: string;
13
+ [DataInvitationFields.COLUMN_CREATED_AT]: string;
14
+ [DataInvitationFields.COLUMN_UPDATED_AT]: string;
15
+ [DataInvitationFields.COLUMN_COMPANY]: CompanyType;
16
+ [DataInvitationFields.COLUMN_CONTACT]: InvitationContactType;
17
+ };
18
+ export declare class DataInvitation extends AbstractEntity<DataInvitationType> {
19
+ #private;
20
+ constructor(getCustomerInvitationDataInput: DataInvitationType);
21
+ get code(): string;
22
+ get createdAt(): string;
23
+ get updatedAt(): string;
24
+ get company(): Company;
25
+ get contact(): InvitationContact;
26
+ toJSON(): DataInvitationType;
27
+ }
@@ -0,0 +1,70 @@
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 _code, _createdAt, _updatedAt, _company, _contact;
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.DataInvitation = exports.DataInvitationFields = void 0;
18
+ const abstractEntity_1 = require("../../abstractEntity");
19
+ const company_1 = require("./invitations/company/company");
20
+ const invitationContact_1 = require("./invitations/contact/invitationContact");
21
+ var DataInvitationFields;
22
+ (function (DataInvitationFields) {
23
+ DataInvitationFields["COLUMN_CODE"] = "code";
24
+ DataInvitationFields["COLUMN_CREATED_AT"] = "createdAt";
25
+ DataInvitationFields["COLUMN_UPDATED_AT"] = "updatedAt";
26
+ DataInvitationFields["COLUMN_COMPANY"] = "company";
27
+ DataInvitationFields["COLUMN_CONTACT"] = "contact";
28
+ })(DataInvitationFields = exports.DataInvitationFields || (exports.DataInvitationFields = {}));
29
+ class DataInvitation extends abstractEntity_1.AbstractEntity {
30
+ constructor(getCustomerInvitationDataInput) {
31
+ super(getCustomerInvitationDataInput);
32
+ _code.set(this, void 0);
33
+ _createdAt.set(this, void 0);
34
+ _updatedAt.set(this, void 0);
35
+ _company.set(this, void 0);
36
+ _contact.set(this, void 0);
37
+ __classPrivateFieldSet(this, _code, getCustomerInvitationDataInput[DataInvitationFields.COLUMN_CODE]);
38
+ __classPrivateFieldSet(this, _createdAt, getCustomerInvitationDataInput[DataInvitationFields.COLUMN_CREATED_AT]);
39
+ __classPrivateFieldSet(this, _updatedAt, getCustomerInvitationDataInput[DataInvitationFields.COLUMN_UPDATED_AT]);
40
+ __classPrivateFieldSet(this, _company, new company_1.Company(getCustomerInvitationDataInput[DataInvitationFields.COLUMN_COMPANY]));
41
+ __classPrivateFieldSet(this, _contact, new invitationContact_1.InvitationContact(getCustomerInvitationDataInput[DataInvitationFields.COLUMN_CONTACT]));
42
+ }
43
+ get code() {
44
+ return __classPrivateFieldGet(this, _code);
45
+ }
46
+ get createdAt() {
47
+ return __classPrivateFieldGet(this, _createdAt);
48
+ }
49
+ get updatedAt() {
50
+ return __classPrivateFieldGet(this, _updatedAt);
51
+ }
52
+ get company() {
53
+ return __classPrivateFieldGet(this, _company);
54
+ }
55
+ get contact() {
56
+ return __classPrivateFieldGet(this, _contact);
57
+ }
58
+ toJSON() {
59
+ return {
60
+ [DataInvitationFields.COLUMN_CODE]: this.code,
61
+ [DataInvitationFields.COLUMN_CREATED_AT]: this.createdAt,
62
+ [DataInvitationFields.COLUMN_UPDATED_AT]: this.updatedAt,
63
+ [DataInvitationFields.COLUMN_COMPANY]: this.company.toJSON(),
64
+ [DataInvitationFields.COLUMN_CONTACT]: this.contact.toJSON(),
65
+ };
66
+ }
67
+ }
68
+ exports.DataInvitation = DataInvitation;
69
+ _code = new WeakMap(), _createdAt = new WeakMap(), _updatedAt = new WeakMap(), _company = new WeakMap(), _contact = new WeakMap();
70
+ //# sourceMappingURL=dataInvitation.js.map
@@ -0,0 +1,13 @@
1
+ import { AbstractEntity } from '../../../../abstractEntity';
2
+ export declare enum CompanyFields {
3
+ COLUMN_REFERENCE = "reference"
4
+ }
5
+ export declare type CompanyType = {
6
+ [CompanyFields.COLUMN_REFERENCE]: string;
7
+ };
8
+ export declare class Company extends AbstractEntity<CompanyType> {
9
+ #private;
10
+ constructor(getCustomersCompanyDataInput: CompanyType);
11
+ get reference(): string;
12
+ toJSON(): CompanyType;
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 _reference;
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.Company = exports.CompanyFields = void 0;
18
+ const abstractEntity_1 = require("../../../../abstractEntity");
19
+ var CompanyFields;
20
+ (function (CompanyFields) {
21
+ CompanyFields["COLUMN_REFERENCE"] = "reference";
22
+ })(CompanyFields = exports.CompanyFields || (exports.CompanyFields = {}));
23
+ class Company extends abstractEntity_1.AbstractEntity {
24
+ constructor(getCustomersCompanyDataInput) {
25
+ super(getCustomersCompanyDataInput);
26
+ _reference.set(this, void 0);
27
+ __classPrivateFieldSet(this, _reference, getCustomersCompanyDataInput[CompanyFields.COLUMN_REFERENCE]);
28
+ }
29
+ get reference() {
30
+ return __classPrivateFieldGet(this, _reference);
31
+ }
32
+ toJSON() {
33
+ return {
34
+ [CompanyFields.COLUMN_REFERENCE]: this.reference,
35
+ };
36
+ }
37
+ }
38
+ exports.Company = Company;
39
+ _reference = new WeakMap();
40
+ //# sourceMappingURL=company.js.map
@@ -0,0 +1,25 @@
1
+ import { AbstractEntity } from '../../../../abstractEntity';
2
+ import { SharedContactFields, SharedContactInterface } from '../../../../shared/contact/contact';
3
+ declare enum InvitationContactEnum {
4
+ COLUMN_USERNAME = "username"
5
+ }
6
+ export declare const InvitationContactFields: {
7
+ COLUMN_FIRSTNAME: SharedContactFields.COLUMN_FIRSTNAME;
8
+ COLUMN_LASTNAME: SharedContactFields.COLUMN_LASTNAME;
9
+ COLUMN_EMAIL: SharedContactFields.COLUMN_EMAIL;
10
+ COLUMN_USERNAME: InvitationContactEnum.COLUMN_USERNAME;
11
+ };
12
+ interface InvitationContactInterface {
13
+ [InvitationContactFields.COLUMN_USERNAME]: string;
14
+ }
15
+ export declare type InvitationContactType = InvitationContactInterface & SharedContactInterface;
16
+ export declare class InvitationContact extends AbstractEntity<InvitationContactType> {
17
+ #private;
18
+ constructor(getCustomersContactDataInput: InvitationContactType);
19
+ get username(): string;
20
+ get firstName(): string;
21
+ get lastName(): string;
22
+ get email(): string;
23
+ toJSON(): InvitationContactType;
24
+ }
25
+ export {};
@@ -0,0 +1,63 @@
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 _username, _firstname, _lastname, _email;
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.InvitationContact = exports.InvitationContactFields = void 0;
18
+ const abstractEntity_1 = require("../../../../abstractEntity");
19
+ const contact_1 = require("../../../../shared/contact/contact");
20
+ var InvitationContactEnum;
21
+ (function (InvitationContactEnum) {
22
+ InvitationContactEnum["COLUMN_USERNAME"] = "username";
23
+ })(InvitationContactEnum || (InvitationContactEnum = {}));
24
+ exports.InvitationContactFields = {
25
+ ...InvitationContactEnum,
26
+ ...contact_1.SharedContactFields,
27
+ };
28
+ class InvitationContact extends abstractEntity_1.AbstractEntity {
29
+ constructor(getCustomersContactDataInput) {
30
+ super(getCustomersContactDataInput);
31
+ _username.set(this, void 0);
32
+ _firstname.set(this, void 0);
33
+ _lastname.set(this, void 0);
34
+ _email.set(this, void 0);
35
+ __classPrivateFieldSet(this, _firstname, getCustomersContactDataInput[contact_1.SharedContactFields.COLUMN_FIRSTNAME]);
36
+ __classPrivateFieldSet(this, _username, getCustomersContactDataInput[exports.InvitationContactFields.COLUMN_USERNAME]);
37
+ __classPrivateFieldSet(this, _lastname, getCustomersContactDataInput[contact_1.SharedContactFields.COLUMN_LASTNAME]);
38
+ __classPrivateFieldSet(this, _email, getCustomersContactDataInput[contact_1.SharedContactFields.COLUMN_EMAIL]);
39
+ }
40
+ get username() {
41
+ return __classPrivateFieldGet(this, _username);
42
+ }
43
+ get firstName() {
44
+ return __classPrivateFieldGet(this, _firstname);
45
+ }
46
+ get lastName() {
47
+ return __classPrivateFieldGet(this, _lastname);
48
+ }
49
+ get email() {
50
+ return __classPrivateFieldGet(this, _email);
51
+ }
52
+ toJSON() {
53
+ return {
54
+ [exports.InvitationContactFields.COLUMN_USERNAME]: this.username,
55
+ [contact_1.SharedContactFields.COLUMN_FIRSTNAME]: this.firstName,
56
+ [contact_1.SharedContactFields.COLUMN_LASTNAME]: this.lastName,
57
+ [contact_1.SharedContactFields.COLUMN_EMAIL]: this.email,
58
+ };
59
+ }
60
+ }
61
+ exports.InvitationContact = InvitationContact;
62
+ _username = new WeakMap(), _firstname = new WeakMap(), _lastname = new WeakMap(), _email = new WeakMap();
63
+ //# sourceMappingURL=invitationContact.js.map
@@ -1,5 +1,8 @@
1
1
  export * from './entities/customers/contact/contact';
2
+ export * from './entities/invitations/contact/invitationContact';
2
3
  export * from './entities/customers/details/details';
4
+ export * from './entities/invitations/company/company';
3
5
  export * from './entities/customers/customer';
4
6
  export * from './entities/dataCustomers';
7
+ export * from './entities/dataInvitation';
5
8
  export * from './customersClient';
@@ -11,8 +11,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  __exportStar(require("./entities/customers/contact/contact"), exports);
14
+ __exportStar(require("./entities/invitations/contact/invitationContact"), exports);
14
15
  __exportStar(require("./entities/customers/details/details"), exports);
16
+ __exportStar(require("./entities/invitations/company/company"), exports);
15
17
  __exportStar(require("./entities/customers/customer"), exports);
16
18
  __exportStar(require("./entities/dataCustomers"), exports);
19
+ __exportStar(require("./entities/dataInvitation"), exports);
17
20
  __exportStar(require("./customersClient"), exports);
18
21
  //# sourceMappingURL=index.js.map
@@ -13,7 +13,6 @@ export declare enum LicenseGetFields {
13
13
  COLUMN_STATUS_CODE = "statusCode",
14
14
  COLUMN_IS_TRIAL = "isTrial",
15
15
  COLUMN_IS_ADDON = "isAddon",
16
- COLUMN_CURRENCY = "currency",
17
16
  COLUMN_SERVICE_REF = "service_ref",
18
17
  COLUMN_SKU = "sku",
19
18
  COLUMN_NAME = "name",
@@ -45,7 +44,6 @@ export declare type LicenseGetData = {
45
44
  [LicenseGetFields.COLUMN_STATUS_CODE]: number;
46
45
  [LicenseGetFields.COLUMN_IS_TRIAL]: boolean;
47
46
  [LicenseGetFields.COLUMN_IS_ADDON]: boolean;
48
- [LicenseGetFields.COLUMN_CURRENCY]: string;
49
47
  [LicenseGetFields.COLUMN_SERVICE_REF]: string;
50
48
  [LicenseGetFields.COLUMN_SKU]: string;
51
49
  [LicenseGetFields.COLUMN_NAME]: string;
@@ -79,7 +77,6 @@ export declare class LicenseGetResult extends AbstractEntity<LicenseGetData> {
79
77
  get statusCode(): number;
80
78
  get isTrial(): boolean;
81
79
  get isAddon(): boolean;
82
- get currency(): string;
83
80
  get serviceRef(): string;
84
81
  get sku(): string;
85
82
  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, _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;
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;
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.LicenseGetResult = exports.LicenseGetFields = void 0;
18
18
  const actionsGetResult_1 = require("./actionsGetResult");
@@ -31,7 +31,6 @@ var LicenseGetFields;
31
31
  LicenseGetFields["COLUMN_STATUS_CODE"] = "statusCode";
32
32
  LicenseGetFields["COLUMN_IS_TRIAL"] = "isTrial";
33
33
  LicenseGetFields["COLUMN_IS_ADDON"] = "isAddon";
34
- LicenseGetFields["COLUMN_CURRENCY"] = "currency";
35
34
  LicenseGetFields["COLUMN_SERVICE_REF"] = "service_ref";
36
35
  LicenseGetFields["COLUMN_SKU"] = "sku";
37
36
  LicenseGetFields["COLUMN_NAME"] = "name";
@@ -66,7 +65,6 @@ class LicenseGetResult extends abstractEntity_1.AbstractEntity {
66
65
  _statusCode.set(this, void 0);
67
66
  _isTrial.set(this, void 0);
68
67
  _isAddon.set(this, void 0);
69
- _currency.set(this, void 0);
70
68
  _service_ref.set(this, void 0);
71
69
  _sku.set(this, void 0);
72
70
  _name.set(this, void 0);
@@ -96,7 +94,6 @@ class LicenseGetResult extends abstractEntity_1.AbstractEntity {
96
94
  __classPrivateFieldSet(this, _statusCode, licenseGetDataInput[LicenseGetFields.COLUMN_STATUS_CODE]);
97
95
  __classPrivateFieldSet(this, _isTrial, licenseGetDataInput[LicenseGetFields.COLUMN_IS_TRIAL]);
98
96
  __classPrivateFieldSet(this, _isAddon, licenseGetDataInput[LicenseGetFields.COLUMN_IS_ADDON]);
99
- __classPrivateFieldSet(this, _currency, licenseGetDataInput[LicenseGetFields.COLUMN_CURRENCY]);
100
97
  __classPrivateFieldSet(this, _service_ref, licenseGetDataInput[LicenseGetFields.COLUMN_SERVICE_REF]);
101
98
  __classPrivateFieldSet(this, _sku, licenseGetDataInput[LicenseGetFields.COLUMN_SKU]);
102
99
  __classPrivateFieldSet(this, _name, licenseGetDataInput[LicenseGetFields.COLUMN_NAME]);
@@ -145,9 +142,6 @@ class LicenseGetResult extends abstractEntity_1.AbstractEntity {
145
142
  get isAddon() {
146
143
  return __classPrivateFieldGet(this, _isAddon);
147
144
  }
148
- get currency() {
149
- return __classPrivateFieldGet(this, _currency);
150
- }
151
145
  get serviceRef() {
152
146
  return __classPrivateFieldGet(this, _service_ref);
153
147
  }
@@ -222,7 +216,6 @@ class LicenseGetResult extends abstractEntity_1.AbstractEntity {
222
216
  [LicenseGetFields.COLUMN_STATUS_CODE]: this.statusCode,
223
217
  [LicenseGetFields.COLUMN_IS_TRIAL]: this.isTrial,
224
218
  [LicenseGetFields.COLUMN_IS_ADDON]: this.isAddon,
225
- [LicenseGetFields.COLUMN_CURRENCY]: this.currency,
226
219
  [LicenseGetFields.COLUMN_SERVICE_REF]: this.serviceRef,
227
220
  [LicenseGetFields.COLUMN_SKU]: this.sku,
228
221
  [LicenseGetFields.COLUMN_NAME]: this.name,
@@ -249,5 +242,5 @@ class LicenseGetResult extends abstractEntity_1.AbstractEntity {
249
242
  }
250
243
  }
251
244
  exports.LicenseGetResult = LicenseGetResult;
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();
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();
253
246
  //# sourceMappingURL=licenseGetResult.js.map
@@ -1,16 +1,19 @@
1
1
  import { BuySellData, BuySellFindResult } from './buySellFindResult';
2
2
  import { AbstractEntity } from '../../../abstractEntity';
3
3
  export declare enum LicensePriceGetFields {
4
+ COLUMN_CURRENCY = "currency",
4
5
  COLUMN_UNIT = "unit",
5
6
  COLUMN_TOTAL = "total"
6
7
  }
7
8
  export declare type LicensePriceGetData = {
9
+ [LicensePriceGetFields.COLUMN_CURRENCY]: string;
8
10
  [LicensePriceGetFields.COLUMN_UNIT]: BuySellData;
9
11
  [LicensePriceGetFields.COLUMN_TOTAL]: BuySellData;
10
12
  };
11
13
  export declare class LicensePriceGetResult extends AbstractEntity<LicensePriceGetData> {
12
14
  #private;
13
15
  constructor(data: LicensePriceGetData);
16
+ get currency(): string;
14
17
  get unit(): BuySellFindResult;
15
18
  get total(): BuySellFindResult;
16
19
  toJSON(): LicensePriceGetData;
@@ -12,24 +12,30 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
12
12
  }
13
13
  return privateMap.get(receiver);
14
14
  };
15
- var _unit, _total;
15
+ var _currency, _unit, _total;
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.LicensePriceGetResult = exports.LicensePriceGetFields = void 0;
18
18
  const buySellFindResult_1 = require("./buySellFindResult");
19
19
  const abstractEntity_1 = require("../../../abstractEntity");
20
20
  var LicensePriceGetFields;
21
21
  (function (LicensePriceGetFields) {
22
+ LicensePriceGetFields["COLUMN_CURRENCY"] = "currency";
22
23
  LicensePriceGetFields["COLUMN_UNIT"] = "unit";
23
24
  LicensePriceGetFields["COLUMN_TOTAL"] = "total";
24
25
  })(LicensePriceGetFields = exports.LicensePriceGetFields || (exports.LicensePriceGetFields = {}));
25
26
  class LicensePriceGetResult extends abstractEntity_1.AbstractEntity {
26
27
  constructor(data) {
27
28
  super(data);
29
+ _currency.set(this, void 0);
28
30
  _unit.set(this, void 0);
29
31
  _total.set(this, void 0);
32
+ __classPrivateFieldSet(this, _currency, data[LicensePriceGetFields.COLUMN_CURRENCY]);
30
33
  __classPrivateFieldSet(this, _unit, new buySellFindResult_1.BuySellFindResult(data[LicensePriceGetFields.COLUMN_UNIT]));
31
34
  __classPrivateFieldSet(this, _total, new buySellFindResult_1.BuySellFindResult(data[LicensePriceGetFields.COLUMN_TOTAL]));
32
35
  }
36
+ get currency() {
37
+ return __classPrivateFieldGet(this, _currency);
38
+ }
33
39
  get unit() {
34
40
  return __classPrivateFieldGet(this, _unit);
35
41
  }
@@ -38,11 +44,12 @@ class LicensePriceGetResult extends abstractEntity_1.AbstractEntity {
38
44
  }
39
45
  toJSON() {
40
46
  return {
47
+ [LicensePriceGetFields.COLUMN_CURRENCY]: __classPrivateFieldGet(this, _currency),
41
48
  [LicensePriceGetFields.COLUMN_UNIT]: this.unit.toJSON(),
42
49
  [LicensePriceGetFields.COLUMN_TOTAL]: this.total.toJSON(),
43
50
  };
44
51
  }
45
52
  }
46
53
  exports.LicensePriceGetResult = LicensePriceGetResult;
47
- _unit = new WeakMap(), _total = new WeakMap();
54
+ _currency = new WeakMap(), _unit = new WeakMap(), _total = new WeakMap();
48
55
  //# sourceMappingURL=licensePriceGetResult.js.map
@@ -0,0 +1,14 @@
1
+ import { AbstractEntity } from '../../abstractEntity';
2
+ import { Order, OrderType } from './orders/order';
3
+ export declare enum DataListOrdersFields {
4
+ COLUMN_ORDERS = "orders"
5
+ }
6
+ export declare type DataListOrdersType = {
7
+ [DataListOrdersFields.COLUMN_ORDERS]: Array<OrderType>;
8
+ };
9
+ export declare class DataListOrders extends AbstractEntity<DataListOrdersType> {
10
+ #private;
11
+ constructor(listOrderDataInput: DataListOrdersType);
12
+ get orders(): Array<Order>;
13
+ toJSON(): DataListOrdersType;
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 _orders;
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.DataListOrders = exports.DataListOrdersFields = void 0;
18
+ const abstractEntity_1 = require("../../abstractEntity");
19
+ const order_1 = require("./orders/order");
20
+ var DataListOrdersFields;
21
+ (function (DataListOrdersFields) {
22
+ DataListOrdersFields["COLUMN_ORDERS"] = "orders";
23
+ })(DataListOrdersFields = exports.DataListOrdersFields || (exports.DataListOrdersFields = {}));
24
+ class DataListOrders extends abstractEntity_1.AbstractEntity {
25
+ constructor(listOrderDataInput) {
26
+ super(listOrderDataInput);
27
+ _orders.set(this, void 0);
28
+ __classPrivateFieldSet(this, _orders, listOrderDataInput[DataListOrdersFields.COLUMN_ORDERS].map((order) => new order_1.Order(order)));
29
+ }
30
+ get orders() {
31
+ return __classPrivateFieldGet(this, _orders);
32
+ }
33
+ toJSON() {
34
+ return {
35
+ [DataListOrdersFields.COLUMN_ORDERS]: this.orders.map((order) => order.toJSON()),
36
+ };
37
+ }
38
+ }
39
+ exports.DataListOrders = DataListOrders;
40
+ _orders = new WeakMap();
41
+ //# sourceMappingURL=dataListOrders.js.map
@@ -0,0 +1,40 @@
1
+ import { AbstractEntity } from '../../../abstractEntity';
2
+ import { OrderProduct, OrderProductsType } from './products/products';
3
+ import { OrderPartner, OrderPartnerType } from './partner/partner';
4
+ import { ReferenceLink, ReferenceLinkType } from '../referenceLink';
5
+ export declare enum OrderFields {
6
+ COLUMN_REFERENCE = "reference",
7
+ COLUMN_STATUS = "status",
8
+ COLUMN_DATESTATUS = "dateStatus",
9
+ COLUMN_DATECREATION = "dateCreation",
10
+ COLUMN_ORDER_REFERENCE = "order_reference",
11
+ COLUMN_PARTNER = "partner",
12
+ COLUMN_CUSTOMER = "customer",
13
+ COLUMN_PONUMBER = "ponumber",
14
+ COLUMN_PRODUCTS = "products"
15
+ }
16
+ export declare type OrderType = {
17
+ [OrderFields.COLUMN_REFERENCE]: string;
18
+ [OrderFields.COLUMN_STATUS]: string;
19
+ [OrderFields.COLUMN_DATESTATUS]: string;
20
+ [OrderFields.COLUMN_DATECREATION]: string;
21
+ [OrderFields.COLUMN_ORDER_REFERENCE]: string;
22
+ [OrderFields.COLUMN_PARTNER]: OrderPartnerType;
23
+ [OrderFields.COLUMN_CUSTOMER]: ReferenceLinkType;
24
+ [OrderFields.COLUMN_PONUMBER]: string;
25
+ [OrderFields.COLUMN_PRODUCTS]: Array<OrderProductsType>;
26
+ };
27
+ export declare class Order extends AbstractEntity<OrderType> {
28
+ #private;
29
+ constructor(getOrderDataInput: OrderType);
30
+ get reference(): string;
31
+ get status(): string;
32
+ get dateStatus(): string;
33
+ get dateCreation(): string;
34
+ get order_reference(): string;
35
+ get partner(): OrderPartner;
36
+ get customer(): ReferenceLink;
37
+ get ponumber(): string;
38
+ get products(): Array<OrderProduct>;
39
+ toJSON(): OrderType;
40
+ }
@@ -0,0 +1,99 @@
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, _status, _dateStatus, _dateCreation, _order_reference, _partner, _customer, _ponumber, _products;
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.Order = exports.OrderFields = void 0;
18
+ const abstractEntity_1 = require("../../../abstractEntity");
19
+ const products_1 = require("./products/products");
20
+ const partner_1 = require("./partner/partner");
21
+ const referenceLink_1 = require("../referenceLink");
22
+ var OrderFields;
23
+ (function (OrderFields) {
24
+ OrderFields["COLUMN_REFERENCE"] = "reference";
25
+ OrderFields["COLUMN_STATUS"] = "status";
26
+ OrderFields["COLUMN_DATESTATUS"] = "dateStatus";
27
+ OrderFields["COLUMN_DATECREATION"] = "dateCreation";
28
+ OrderFields["COLUMN_ORDER_REFERENCE"] = "order_reference";
29
+ OrderFields["COLUMN_PARTNER"] = "partner";
30
+ OrderFields["COLUMN_CUSTOMER"] = "customer";
31
+ OrderFields["COLUMN_PONUMBER"] = "ponumber";
32
+ OrderFields["COLUMN_PRODUCTS"] = "products";
33
+ })(OrderFields = exports.OrderFields || (exports.OrderFields = {}));
34
+ class Order extends abstractEntity_1.AbstractEntity {
35
+ constructor(getOrderDataInput) {
36
+ super(getOrderDataInput);
37
+ _reference.set(this, void 0);
38
+ _status.set(this, void 0);
39
+ _dateStatus.set(this, void 0);
40
+ _dateCreation.set(this, void 0);
41
+ _order_reference.set(this, void 0);
42
+ _partner.set(this, void 0);
43
+ _customer.set(this, void 0);
44
+ _ponumber.set(this, void 0);
45
+ _products.set(this, void 0);
46
+ __classPrivateFieldSet(this, _reference, getOrderDataInput[OrderFields.COLUMN_REFERENCE]);
47
+ __classPrivateFieldSet(this, _status, getOrderDataInput[OrderFields.COLUMN_STATUS]);
48
+ __classPrivateFieldSet(this, _dateStatus, getOrderDataInput[OrderFields.COLUMN_DATESTATUS]);
49
+ __classPrivateFieldSet(this, _dateCreation, getOrderDataInput[OrderFields.COLUMN_DATECREATION]);
50
+ __classPrivateFieldSet(this, _order_reference, getOrderDataInput[OrderFields.COLUMN_ORDER_REFERENCE]);
51
+ __classPrivateFieldSet(this, _partner, new partner_1.OrderPartner(getOrderDataInput[OrderFields.COLUMN_PARTNER]));
52
+ __classPrivateFieldSet(this, _customer, new referenceLink_1.ReferenceLink(getOrderDataInput[OrderFields.COLUMN_CUSTOMER]));
53
+ __classPrivateFieldSet(this, _ponumber, getOrderDataInput[OrderFields.COLUMN_PONUMBER]);
54
+ __classPrivateFieldSet(this, _products, getOrderDataInput[OrderFields.COLUMN_PRODUCTS].map((order) => new products_1.OrderProduct(order)));
55
+ }
56
+ get reference() {
57
+ return __classPrivateFieldGet(this, _reference);
58
+ }
59
+ get status() {
60
+ return __classPrivateFieldGet(this, _status);
61
+ }
62
+ get dateStatus() {
63
+ return __classPrivateFieldGet(this, _dateStatus);
64
+ }
65
+ get dateCreation() {
66
+ return __classPrivateFieldGet(this, _dateCreation);
67
+ }
68
+ get order_reference() {
69
+ return __classPrivateFieldGet(this, _order_reference);
70
+ }
71
+ get partner() {
72
+ return __classPrivateFieldGet(this, _partner);
73
+ }
74
+ get customer() {
75
+ return __classPrivateFieldGet(this, _customer);
76
+ }
77
+ get ponumber() {
78
+ return __classPrivateFieldGet(this, _ponumber);
79
+ }
80
+ get products() {
81
+ return __classPrivateFieldGet(this, _products);
82
+ }
83
+ toJSON() {
84
+ return {
85
+ [OrderFields.COLUMN_REFERENCE]: this.reference,
86
+ [OrderFields.COLUMN_STATUS]: this.status,
87
+ [OrderFields.COLUMN_DATESTATUS]: this.dateStatus,
88
+ [OrderFields.COLUMN_DATECREATION]: this.dateCreation,
89
+ [OrderFields.COLUMN_ORDER_REFERENCE]: this.order_reference,
90
+ [OrderFields.COLUMN_PARTNER]: this.partner.toJSON(),
91
+ [OrderFields.COLUMN_CUSTOMER]: this.customer.toJSON(),
92
+ [OrderFields.COLUMN_PONUMBER]: this.ponumber,
93
+ [OrderFields.COLUMN_PRODUCTS]: this.products.map((order) => order.toJSON()),
94
+ };
95
+ }
96
+ }
97
+ exports.Order = Order;
98
+ _reference = new WeakMap(), _status = new WeakMap(), _dateStatus = new WeakMap(), _dateCreation = new WeakMap(), _order_reference = new WeakMap(), _partner = new WeakMap(), _customer = new WeakMap(), _ponumber = new WeakMap(), _products = new WeakMap();
99
+ //# sourceMappingURL=order.js.map
@@ -0,0 +1,17 @@
1
+ import { AbstractEntity } from '../../../../abstractEntity';
2
+ import { SharedContactInterface } from '../../../../shared/contact/contact';
3
+ export declare enum OrderPartnerFields {
4
+ COLUMN_COMPANYNAME = "companyName",
5
+ COLUMN_CONTACT = "contact"
6
+ }
7
+ export declare type OrderPartnerType = {
8
+ [OrderPartnerFields.COLUMN_COMPANYNAME]: string;
9
+ [OrderPartnerFields.COLUMN_CONTACT]: SharedContactInterface;
10
+ };
11
+ export declare class OrderPartner extends AbstractEntity<OrderPartnerType> {
12
+ #private;
13
+ constructor(getOrderPartnerDataInput: OrderPartnerType);
14
+ get companyName(): string;
15
+ get contact(): SharedContactInterface;
16
+ toJSON(): OrderPartnerType;
17
+ }
@@ -0,0 +1,47 @@
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 _companyName, _contact;
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.OrderPartner = exports.OrderPartnerFields = void 0;
18
+ const abstractEntity_1 = require("../../../../abstractEntity");
19
+ var OrderPartnerFields;
20
+ (function (OrderPartnerFields) {
21
+ OrderPartnerFields["COLUMN_COMPANYNAME"] = "companyName";
22
+ OrderPartnerFields["COLUMN_CONTACT"] = "contact";
23
+ })(OrderPartnerFields = exports.OrderPartnerFields || (exports.OrderPartnerFields = {}));
24
+ class OrderPartner extends abstractEntity_1.AbstractEntity {
25
+ constructor(getOrderPartnerDataInput) {
26
+ super(getOrderPartnerDataInput);
27
+ _companyName.set(this, void 0);
28
+ _contact.set(this, void 0);
29
+ __classPrivateFieldSet(this, _companyName, getOrderPartnerDataInput[OrderPartnerFields.COLUMN_COMPANYNAME]);
30
+ __classPrivateFieldSet(this, _contact, getOrderPartnerDataInput[OrderPartnerFields.COLUMN_CONTACT]);
31
+ }
32
+ get companyName() {
33
+ return __classPrivateFieldGet(this, _companyName);
34
+ }
35
+ get contact() {
36
+ return __classPrivateFieldGet(this, _contact);
37
+ }
38
+ toJSON() {
39
+ return {
40
+ [OrderPartnerFields.COLUMN_COMPANYNAME]: this.companyName,
41
+ [OrderPartnerFields.COLUMN_CONTACT]: this.contact,
42
+ };
43
+ }
44
+ }
45
+ exports.OrderPartner = OrderPartner;
46
+ _companyName = new WeakMap(), _contact = new WeakMap();
47
+ //# sourceMappingURL=partner.js.map
@@ -0,0 +1,47 @@
1
+ import { AbstractEntity } from '../../../../abstractEntity';
2
+ import { ReferenceLink, ReferenceLinkType } from '../../referenceLink';
3
+ export declare enum ProductPricesFields {
4
+ COLUMN_BUY = "buy",
5
+ COLUMN_SELL = "sell",
6
+ COLUMN_CURRENCY = "currency",
7
+ COLUMN_PERIODICITY = "periodicity"
8
+ }
9
+ export declare type ProductPricesType = {
10
+ [ProductPricesFields.COLUMN_BUY]: number;
11
+ [ProductPricesFields.COLUMN_SELL]: number;
12
+ [ProductPricesFields.COLUMN_CURRENCY]: string;
13
+ [ProductPricesFields.COLUMN_PERIODICITY]: string;
14
+ };
15
+ export declare enum OrderProductsFields {
16
+ COLUMN_SKU = "sku",
17
+ COLUMN_QUANTITY = "quantity",
18
+ COLUMN_STATUS = "status",
19
+ COLUMN_DATESTATUS = "dateStatus",
20
+ COLUMN_DETAILEDSTATUS = "detailedStatus",
21
+ COLUMN_PRICES = "prices",
22
+ COLUMN_SUBSCRIPTION = "subscription",
23
+ COLUMN_LICENSE = "license"
24
+ }
25
+ export declare type OrderProductsType = {
26
+ [OrderProductsFields.COLUMN_SKU]: string;
27
+ [OrderProductsFields.COLUMN_QUANTITY]: number;
28
+ [OrderProductsFields.COLUMN_STATUS]: string;
29
+ [OrderProductsFields.COLUMN_DATESTATUS]: string;
30
+ [OrderProductsFields.COLUMN_DETAILEDSTATUS]: string;
31
+ [OrderProductsFields.COLUMN_PRICES]: ProductPricesType;
32
+ [OrderProductsFields.COLUMN_SUBSCRIPTION]: ReferenceLinkType;
33
+ [OrderProductsFields.COLUMN_LICENSE]: ReferenceLinkType;
34
+ };
35
+ export declare class OrderProduct extends AbstractEntity<OrderProductsType> {
36
+ #private;
37
+ constructor(getOrderProducts: OrderProductsType);
38
+ get sku(): string;
39
+ get quantity(): number;
40
+ get status(): string;
41
+ get dateStatus(): string;
42
+ get detailedStatus(): string;
43
+ get prices(): ProductPricesType;
44
+ get subscription(): ReferenceLink;
45
+ get license(): ReferenceLink;
46
+ toJSON(): OrderProductsType;
47
+ }
@@ -0,0 +1,97 @@
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 _sku, _quantity, _status, _dateStatus, _detailedStatus, _prices, _subscription, _license;
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.OrderProduct = exports.OrderProductsFields = exports.ProductPricesFields = void 0;
18
+ const abstractEntity_1 = require("../../../../abstractEntity");
19
+ const referenceLink_1 = require("../../referenceLink");
20
+ var ProductPricesFields;
21
+ (function (ProductPricesFields) {
22
+ ProductPricesFields["COLUMN_BUY"] = "buy";
23
+ ProductPricesFields["COLUMN_SELL"] = "sell";
24
+ ProductPricesFields["COLUMN_CURRENCY"] = "currency";
25
+ ProductPricesFields["COLUMN_PERIODICITY"] = "periodicity";
26
+ })(ProductPricesFields = exports.ProductPricesFields || (exports.ProductPricesFields = {}));
27
+ var OrderProductsFields;
28
+ (function (OrderProductsFields) {
29
+ OrderProductsFields["COLUMN_SKU"] = "sku";
30
+ OrderProductsFields["COLUMN_QUANTITY"] = "quantity";
31
+ OrderProductsFields["COLUMN_STATUS"] = "status";
32
+ OrderProductsFields["COLUMN_DATESTATUS"] = "dateStatus";
33
+ OrderProductsFields["COLUMN_DETAILEDSTATUS"] = "detailedStatus";
34
+ OrderProductsFields["COLUMN_PRICES"] = "prices";
35
+ OrderProductsFields["COLUMN_SUBSCRIPTION"] = "subscription";
36
+ OrderProductsFields["COLUMN_LICENSE"] = "license";
37
+ })(OrderProductsFields = exports.OrderProductsFields || (exports.OrderProductsFields = {}));
38
+ class OrderProduct extends abstractEntity_1.AbstractEntity {
39
+ constructor(getOrderProducts) {
40
+ super(getOrderProducts);
41
+ _sku.set(this, void 0);
42
+ _quantity.set(this, void 0);
43
+ _status.set(this, void 0);
44
+ _dateStatus.set(this, void 0);
45
+ _detailedStatus.set(this, void 0);
46
+ _prices.set(this, void 0);
47
+ _subscription.set(this, void 0);
48
+ _license.set(this, void 0);
49
+ __classPrivateFieldSet(this, _sku, getOrderProducts[OrderProductsFields.COLUMN_SKU]);
50
+ __classPrivateFieldSet(this, _quantity, getOrderProducts[OrderProductsFields.COLUMN_QUANTITY]);
51
+ __classPrivateFieldSet(this, _status, getOrderProducts[OrderProductsFields.COLUMN_STATUS]);
52
+ __classPrivateFieldSet(this, _dateStatus, getOrderProducts[OrderProductsFields.COLUMN_DATESTATUS]);
53
+ __classPrivateFieldSet(this, _detailedStatus, getOrderProducts[OrderProductsFields.COLUMN_DETAILEDSTATUS]);
54
+ __classPrivateFieldSet(this, _prices, getOrderProducts[OrderProductsFields.COLUMN_PRICES]);
55
+ __classPrivateFieldSet(this, _subscription, new referenceLink_1.ReferenceLink(getOrderProducts[OrderProductsFields.COLUMN_SUBSCRIPTION]));
56
+ __classPrivateFieldSet(this, _license, new referenceLink_1.ReferenceLink(getOrderProducts[OrderProductsFields.COLUMN_LICENSE]));
57
+ }
58
+ get sku() {
59
+ return __classPrivateFieldGet(this, _sku);
60
+ }
61
+ get quantity() {
62
+ return __classPrivateFieldGet(this, _quantity);
63
+ }
64
+ get status() {
65
+ return __classPrivateFieldGet(this, _status);
66
+ }
67
+ get dateStatus() {
68
+ return __classPrivateFieldGet(this, _dateStatus);
69
+ }
70
+ get detailedStatus() {
71
+ return __classPrivateFieldGet(this, _detailedStatus);
72
+ }
73
+ get prices() {
74
+ return __classPrivateFieldGet(this, _prices);
75
+ }
76
+ get subscription() {
77
+ return __classPrivateFieldGet(this, _subscription);
78
+ }
79
+ get license() {
80
+ return __classPrivateFieldGet(this, _license);
81
+ }
82
+ toJSON() {
83
+ return {
84
+ [OrderProductsFields.COLUMN_SKU]: this.sku,
85
+ [OrderProductsFields.COLUMN_QUANTITY]: this.quantity,
86
+ [OrderProductsFields.COLUMN_STATUS]: this.status,
87
+ [OrderProductsFields.COLUMN_DATESTATUS]: this.dateStatus,
88
+ [OrderProductsFields.COLUMN_DETAILEDSTATUS]: this.detailedStatus,
89
+ [OrderProductsFields.COLUMN_PRICES]: this.prices,
90
+ [OrderProductsFields.COLUMN_SUBSCRIPTION]: this.subscription.toJSON(),
91
+ [OrderProductsFields.COLUMN_LICENSE]: this.license.toJSON(),
92
+ };
93
+ }
94
+ }
95
+ exports.OrderProduct = OrderProduct;
96
+ _sku = new WeakMap(), _quantity = new WeakMap(), _status = new WeakMap(), _dateStatus = new WeakMap(), _detailedStatus = new WeakMap(), _prices = new WeakMap(), _subscription = new WeakMap(), _license = new WeakMap();
97
+ //# sourceMappingURL=products.js.map
@@ -0,0 +1,16 @@
1
+ import { AbstractEntity } from '../../abstractEntity';
2
+ export declare enum ReferenceLinkFields {
3
+ COLUMN_REFERENCE = "reference",
4
+ COLUMN_LINK = "link"
5
+ }
6
+ export declare type ReferenceLinkType = {
7
+ [ReferenceLinkFields.COLUMN_REFERENCE]: string;
8
+ [ReferenceLinkFields.COLUMN_LINK]: string;
9
+ };
10
+ export declare class ReferenceLink extends AbstractEntity<ReferenceLinkType> {
11
+ #private;
12
+ constructor(referenceLinkInput: ReferenceLinkType);
13
+ get reference(): string;
14
+ get link(): string;
15
+ toJSON(): ReferenceLinkType;
16
+ }
@@ -0,0 +1,47 @@
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, _link;
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.ReferenceLink = exports.ReferenceLinkFields = void 0;
18
+ const abstractEntity_1 = require("../../abstractEntity");
19
+ var ReferenceLinkFields;
20
+ (function (ReferenceLinkFields) {
21
+ ReferenceLinkFields["COLUMN_REFERENCE"] = "reference";
22
+ ReferenceLinkFields["COLUMN_LINK"] = "link";
23
+ })(ReferenceLinkFields = exports.ReferenceLinkFields || (exports.ReferenceLinkFields = {}));
24
+ class ReferenceLink extends abstractEntity_1.AbstractEntity {
25
+ constructor(referenceLinkInput) {
26
+ super(referenceLinkInput);
27
+ _reference.set(this, void 0);
28
+ _link.set(this, void 0);
29
+ __classPrivateFieldSet(this, _reference, referenceLinkInput[ReferenceLinkFields.COLUMN_REFERENCE]);
30
+ __classPrivateFieldSet(this, _link, referenceLinkInput[ReferenceLinkFields.COLUMN_LINK]);
31
+ }
32
+ get reference() {
33
+ return __classPrivateFieldGet(this, _reference);
34
+ }
35
+ get link() {
36
+ return __classPrivateFieldGet(this, _link);
37
+ }
38
+ toJSON() {
39
+ return {
40
+ [ReferenceLinkFields.COLUMN_REFERENCE]: this.reference,
41
+ [ReferenceLinkFields.COLUMN_LINK]: this.link,
42
+ };
43
+ }
44
+ }
45
+ exports.ReferenceLink = ReferenceLink;
46
+ _reference = new WeakMap(), _link = new WeakMap();
47
+ //# sourceMappingURL=referenceLink.js.map
@@ -0,0 +1,6 @@
1
+ export * from './entities/orders/products/products';
2
+ export * from './entities/orders/partner/partner';
3
+ export * from './entities/orders/order';
4
+ export * from './entities/dataListOrders';
5
+ export * from './entities/referenceLink';
6
+ export * from './ordersClient';
@@ -0,0 +1,19 @@
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/orders/products/products"), exports);
14
+ __exportStar(require("./entities/orders/partner/partner"), exports);
15
+ __exportStar(require("./entities/orders/order"), exports);
16
+ __exportStar(require("./entities/dataListOrders"), exports);
17
+ __exportStar(require("./entities/referenceLink"), exports);
18
+ __exportStar(require("./ordersClient"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,49 @@
1
+ import { AbstractClient, Parameters } from '../abstractClient';
2
+ import { GetResult } from '../getResult';
3
+ import { DataListOrders } from './entities/dataListOrders';
4
+ import { ReferenceLink } from './entities/referenceLink';
5
+ export declare enum CreateOrderInputFields {
6
+ COLUMN_CUSTOMER = "customer",
7
+ COLUMN_REFERENCE = "reference",
8
+ COLUMN_PO_NUMBER = "ponumber",
9
+ COLUMN_PRODUCTS = "products",
10
+ COLUMN_SKU = "sku",
11
+ COLUMN_QUANTITY = "quantity",
12
+ COLUMN_SUBSCRIPTION = "subscription",
13
+ COLUMN_PARENT_LICENSE_ID = "parentLicenseId",
14
+ COLUMN_PARENT_SKU = "parentSku",
15
+ COLUMN_PERIODICITY = "periodicity",
16
+ COLUMN_TERM = "term"
17
+ }
18
+ export declare type CreateOrderInputType = {
19
+ [CreateOrderInputFields.COLUMN_CUSTOMER]: {
20
+ [CreateOrderInputFields.COLUMN_REFERENCE]: string;
21
+ [CreateOrderInputFields.COLUMN_PO_NUMBER]?: string;
22
+ };
23
+ [CreateOrderInputFields.COLUMN_PRODUCTS]: Array<{
24
+ [CreateOrderInputFields.COLUMN_SKU]: string;
25
+ [CreateOrderInputFields.COLUMN_QUANTITY]: number;
26
+ [CreateOrderInputFields.COLUMN_SUBSCRIPTION]: {
27
+ [CreateOrderInputFields.COLUMN_REFERENCE]: string;
28
+ };
29
+ [CreateOrderInputFields.COLUMN_PARENT_LICENSE_ID]?: string;
30
+ [CreateOrderInputFields.COLUMN_PARENT_SKU]?: string;
31
+ [CreateOrderInputFields.COLUMN_PERIODICITY]?: string;
32
+ [CreateOrderInputFields.COLUMN_TERM]?: string;
33
+ }>;
34
+ };
35
+ export declare class OrdersClient extends AbstractClient {
36
+ /**
37
+ * The base path of the Orders API
38
+ *
39
+ * TODO: Actually we use php endpoint and we need to add "/index.php/api" before "/orders" remove "/index.php/api" when endpoint is available in nodejs
40
+ */
41
+ private ROOT_PATH;
42
+ /**
43
+ * The base path of the API
44
+ */
45
+ protected basePath: string;
46
+ create(postData: CreateOrderInputType, parameters?: Parameters): Promise<GetResult<ReferenceLink>>;
47
+ getListOrders(parameters?: Parameters): Promise<GetResult<DataListOrders>>;
48
+ getOrder(orderReference: string): Promise<GetResult<DataListOrders>>;
49
+ }
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OrdersClient = exports.CreateOrderInputFields = void 0;
4
+ const abstractClient_1 = require("../abstractClient");
5
+ const getResult_1 = require("../getResult");
6
+ const dataListOrders_1 = require("./entities/dataListOrders");
7
+ const referenceLink_1 = require("./entities/referenceLink");
8
+ var CreateOrderInputFields;
9
+ (function (CreateOrderInputFields) {
10
+ CreateOrderInputFields["COLUMN_CUSTOMER"] = "customer";
11
+ CreateOrderInputFields["COLUMN_REFERENCE"] = "reference";
12
+ CreateOrderInputFields["COLUMN_PO_NUMBER"] = "ponumber";
13
+ CreateOrderInputFields["COLUMN_PRODUCTS"] = "products";
14
+ CreateOrderInputFields["COLUMN_SKU"] = "sku";
15
+ CreateOrderInputFields["COLUMN_QUANTITY"] = "quantity";
16
+ CreateOrderInputFields["COLUMN_SUBSCRIPTION"] = "subscription";
17
+ CreateOrderInputFields["COLUMN_PARENT_LICENSE_ID"] = "parentLicenseId";
18
+ CreateOrderInputFields["COLUMN_PARENT_SKU"] = "parentSku";
19
+ CreateOrderInputFields["COLUMN_PERIODICITY"] = "periodicity";
20
+ CreateOrderInputFields["COLUMN_TERM"] = "term";
21
+ })(CreateOrderInputFields = exports.CreateOrderInputFields || (exports.CreateOrderInputFields = {}));
22
+ class OrdersClient extends abstractClient_1.AbstractClient {
23
+ constructor() {
24
+ super(...arguments);
25
+ /**
26
+ * The base path of the Orders API
27
+ *
28
+ * TODO: Actually we use php endpoint and we need to add "/index.php/api" before "/orders" remove "/index.php/api" when endpoint is available in nodejs
29
+ */
30
+ this.ROOT_PATH = '/index.php/api/orders';
31
+ /**
32
+ * The base path of the API
33
+ */
34
+ this.basePath = this.ROOT_PATH;
35
+ }
36
+ async create(postData, parameters = {}) {
37
+ return new getResult_1.GetResult(referenceLink_1.ReferenceLink, await this.post(postData, parameters));
38
+ }
39
+ async getListOrders(parameters = {}) {
40
+ return new getResult_1.GetResult(dataListOrders_1.DataListOrders, await this.get(parameters));
41
+ }
42
+ async getOrder(orderReference) {
43
+ this.path = `${this.ROOT_PATH}/${orderReference}`;
44
+ return new getResult_1.GetResult(dataListOrders_1.DataListOrders, await this.get());
45
+ }
46
+ }
47
+ exports.OrdersClient = OrdersClient;
48
+ //# sourceMappingURL=ordersClient.js.map
@@ -3,6 +3,7 @@ import { CheckDomainClient, WhoAmIClient } from './general';
3
3
  import { LicensesClient } from './licenses/licensesClient';
4
4
  import { SubscriptionsClient } from './subscriptions/subscriptionsClient';
5
5
  import { CustomersClient } from './customers/customersClient';
6
+ import { OrdersClient } from './orders';
6
7
  /**
7
8
  * Public API Client class, should be the main entry point for your calls
8
9
  */
@@ -33,5 +34,10 @@ export declare class PublicApiClient extends AbstractClient {
33
34
  * @returns {@link SubscriptionsClient}
34
35
  */
35
36
  getSubscriptionsClient(): SubscriptionsClient;
37
+ /**
38
+ * Creates a new {@link OrdersClient} instance and returns it
39
+ * @returns {@link OrdersClient}
40
+ */
41
+ getOrdersClient(): OrdersClient;
36
42
  }
37
43
  export default PublicApiClient;
@@ -6,6 +6,7 @@ const general_1 = require("./general");
6
6
  const licensesClient_1 = require("./licenses/licensesClient");
7
7
  const subscriptionsClient_1 = require("./subscriptions/subscriptionsClient");
8
8
  const customersClient_1 = require("./customers/customersClient");
9
+ const orders_1 = require("./orders");
9
10
  /**
10
11
  * Public API Client class, should be the main entry point for your calls
11
12
  */
@@ -58,6 +59,15 @@ class PublicApiClient extends abstractClient_1.AbstractClient {
58
59
  .setUrl(this.url)
59
60
  .setApiKey(this.apiKey);
60
61
  }
62
+ /**
63
+ * Creates a new {@link OrdersClient} instance and returns it
64
+ * @returns {@link OrdersClient}
65
+ */
66
+ getOrdersClient() {
67
+ return new orders_1.OrdersClient(this.client)
68
+ .setUrl(this.url)
69
+ .setApiKey(this.apiKey);
70
+ }
61
71
  }
62
72
  exports.PublicApiClient = PublicApiClient;
63
73
  exports.default = PublicApiClient;
@@ -0,0 +1,10 @@
1
+ export declare enum SharedContactFields {
2
+ COLUMN_FIRSTNAME = "firstName",
3
+ COLUMN_LASTNAME = "lastName",
4
+ COLUMN_EMAIL = "email"
5
+ }
6
+ export interface SharedContactInterface {
7
+ [SharedContactFields.COLUMN_FIRSTNAME]: string;
8
+ [SharedContactFields.COLUMN_LASTNAME]: string;
9
+ [SharedContactFields.COLUMN_EMAIL]: string;
10
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SharedContactFields = void 0;
4
+ var SharedContactFields;
5
+ (function (SharedContactFields) {
6
+ SharedContactFields["COLUMN_FIRSTNAME"] = "firstName";
7
+ SharedContactFields["COLUMN_LASTNAME"] = "lastName";
8
+ SharedContactFields["COLUMN_EMAIL"] = "email";
9
+ })(SharedContactFields = exports.SharedContactFields || (exports.SharedContactFields = {}));
10
+ //# sourceMappingURL=contact.js.map
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": "2.8.0",
7
+ "version": "3.2.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",