@arrowsphere/api-client 1.0.3 → 2.0.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 (43) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/UPGRADING.md +43 -0
  3. package/build/licenses/entities/filterFindResult.d.ts +2 -2
  4. package/build/licenses/entities/findResult.d.ts +17 -9
  5. package/build/licenses/entities/findResult.js +4 -4
  6. package/build/licenses/entities/license/activeSeatsFindResult.d.ts +29 -0
  7. package/build/licenses/entities/license/activeSeatsFindResult.js +47 -0
  8. package/build/licenses/entities/license/configFindResult.d.ts +37 -0
  9. package/build/licenses/entities/license/configFindResult.js +59 -0
  10. package/build/licenses/entities/license/licenseFindResult.d.ts +266 -13
  11. package/build/licenses/entities/license/licenseFindResult.js +324 -13
  12. package/build/licenses/entities/license/priceFindResult.d.ts +54 -0
  13. package/build/licenses/entities/license/priceFindResult.js +76 -0
  14. package/build/licenses/entities/license/warningFindResult.d.ts +33 -0
  15. package/build/licenses/entities/license/warningFindResult.js +51 -0
  16. package/build/licenses/entities/offer/actionFlagsFindResult.d.ts +37 -0
  17. package/build/licenses/entities/offer/actionFlagsFindResult.js +59 -0
  18. package/build/licenses/entities/offer/offerFindResult.d.ts +63 -0
  19. package/build/licenses/entities/offer/offerFindResult.js +109 -0
  20. package/build/licenses/entities/offer/priceBandFindResult.d.ts +72 -0
  21. package/build/licenses/entities/offer/priceBandFindResult.js +131 -0
  22. package/build/licenses/entities/offer/priceband/billingFindResult.d.ts +37 -0
  23. package/build/licenses/entities/offer/priceband/billingFindResult.js +59 -0
  24. package/build/licenses/entities/offer/priceband/identifiers/arrowsphereFindResult.d.ts +25 -0
  25. package/build/licenses/entities/offer/priceband/identifiers/arrowsphereFindResult.js +43 -0
  26. package/build/licenses/entities/offer/priceband/identifiersFindResult.d.ts +25 -0
  27. package/build/licenses/entities/offer/priceband/identifiersFindResult.js +47 -0
  28. package/build/licenses/entities/offer/priceband/priceBandActionFlagsFindResult.d.ts +49 -0
  29. package/build/licenses/entities/offer/priceband/priceBandActionFlagsFindResult.js +80 -0
  30. package/build/licenses/entities/offer/priceband/priceBandPriceFindResult.d.ts +37 -0
  31. package/build/licenses/entities/offer/priceband/priceBandPriceFindResult.js +59 -0
  32. package/build/licenses/entities/offer/priceband/saleConstraintsFindResult.d.ts +29 -0
  33. package/build/licenses/entities/offer/priceband/saleConstraintsFindResult.js +47 -0
  34. package/build/licenses/index.d.ts +14 -3
  35. package/build/licenses/index.js +14 -3
  36. package/build/licenses/licensesClient.d.ts +48 -28
  37. package/build/licenses/licensesClient.js +28 -0
  38. package/build/publicApiClient.js +3 -1
  39. package/package.json +2 -2
  40. package/build/licenses/entities/license/abstractLicense.d.ts +0 -177
  41. package/build/licenses/entities/license/abstractLicense.js +0 -363
  42. package/build/licenses/entities/offer/licenseOfferFindResult.d.ts +0 -108
  43. package/build/licenses/entities/offer/licenseOfferFindResult.js +0 -232
@@ -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 _arrowsphere;
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.IdentifiersFindResult = exports.IdentifiersFindResultFields = void 0;
18
+ const abstractEntity_1 = require("../../../../abstractEntity");
19
+ const arrowsphereFindResult_1 = require("./identifiers/arrowsphereFindResult");
20
+ var IdentifiersFindResultFields;
21
+ (function (IdentifiersFindResultFields) {
22
+ IdentifiersFindResultFields["COLUMN_ARROWSPHERE"] = "arrowsphere";
23
+ })(IdentifiersFindResultFields = exports.IdentifiersFindResultFields || (exports.IdentifiersFindResultFields = {}));
24
+ class IdentifiersFindResult extends abstractEntity_1.AbstractEntity {
25
+ constructor(data) {
26
+ super(data);
27
+ this.VALIDATION_RULES = {
28
+ [IdentifiersFindResultFields.COLUMN_ARROWSPHERE]: 'present|array',
29
+ };
30
+ _arrowsphere.set(this, void 0);
31
+ const arrowsphere = {
32
+ [arrowsphereFindResult_1.ArrowsphereFindResultFields.COLUMN_SKU]: data[IdentifiersFindResultFields.COLUMN_ARROWSPHERE][arrowsphereFindResult_1.ArrowsphereFindResultFields.COLUMN_SKU],
33
+ };
34
+ __classPrivateFieldSet(this, _arrowsphere, new arrowsphereFindResult_1.ArrowsphereFindResult(arrowsphere));
35
+ }
36
+ get arrowsphere() {
37
+ return __classPrivateFieldGet(this, _arrowsphere);
38
+ }
39
+ toJSON() {
40
+ return {
41
+ [IdentifiersFindResultFields.COLUMN_ARROWSPHERE]: this.arrowsphere.toJSON(),
42
+ };
43
+ }
44
+ }
45
+ exports.IdentifiersFindResult = IdentifiersFindResult;
46
+ _arrowsphere = new WeakMap();
47
+ //# sourceMappingURL=identifiersFindResult.js.map
@@ -0,0 +1,49 @@
1
+ import { DataKeywords, FiltersParameters, SortParameters } from '../../../licensesClient';
2
+ import { AbstractEntity } from '../../../../abstractEntity';
3
+ import { Rules } from 'validatorjs';
4
+ export declare enum PriceBandActionFlagsFindResultFields {
5
+ COLUMN_CAN_BE_CANCELLED = "canBeCancelled",
6
+ COLUMN_CAN_BE_REACTIVATED = "canBeReactivated",
7
+ COLUMN_CAN_BE_SUSPENDED = "canBeSuspended",
8
+ COLUMN_CAN_DECREASE_SEATS = "canDecreaseSeats",
9
+ COLUMN_CAN_INCREASE_SEATS = "canIncreaseSeats"
10
+ }
11
+ export declare type PriceBandActionFlagsFindResultData = {
12
+ [PriceBandActionFlagsFindResultFields.COLUMN_CAN_BE_CANCELLED]: boolean;
13
+ [PriceBandActionFlagsFindResultFields.COLUMN_CAN_BE_REACTIVATED]: boolean;
14
+ [PriceBandActionFlagsFindResultFields.COLUMN_CAN_BE_SUSPENDED]: boolean;
15
+ [PriceBandActionFlagsFindResultFields.COLUMN_CAN_DECREASE_SEATS]: boolean;
16
+ [PriceBandActionFlagsFindResultFields.COLUMN_CAN_INCREASE_SEATS]: boolean;
17
+ };
18
+ export declare type PriceBandActionFlagsFindResultDataKeywords = {
19
+ [PriceBandActionFlagsFindResultFields.COLUMN_CAN_BE_CANCELLED]?: DataKeywords;
20
+ [PriceBandActionFlagsFindResultFields.COLUMN_CAN_BE_REACTIVATED]?: DataKeywords;
21
+ [PriceBandActionFlagsFindResultFields.COLUMN_CAN_BE_SUSPENDED]?: DataKeywords;
22
+ [PriceBandActionFlagsFindResultFields.COLUMN_CAN_DECREASE_SEATS]?: DataKeywords;
23
+ [PriceBandActionFlagsFindResultFields.COLUMN_CAN_INCREASE_SEATS]?: DataKeywords;
24
+ };
25
+ export declare type PriceBandActionFlagsDataFindResultSortParameters = {
26
+ [PriceBandActionFlagsFindResultFields.COLUMN_CAN_BE_CANCELLED]?: SortParameters;
27
+ [PriceBandActionFlagsFindResultFields.COLUMN_CAN_BE_REACTIVATED]?: SortParameters;
28
+ [PriceBandActionFlagsFindResultFields.COLUMN_CAN_BE_SUSPENDED]?: SortParameters;
29
+ [PriceBandActionFlagsFindResultFields.COLUMN_CAN_DECREASE_SEATS]?: SortParameters;
30
+ [PriceBandActionFlagsFindResultFields.COLUMN_CAN_INCREASE_SEATS]?: SortParameters;
31
+ };
32
+ export declare type PriceBandActionFlagsFindResultDataFiltersParameters = {
33
+ [PriceBandActionFlagsFindResultFields.COLUMN_CAN_BE_CANCELLED]?: FiltersParameters;
34
+ [PriceBandActionFlagsFindResultFields.COLUMN_CAN_BE_REACTIVATED]?: FiltersParameters;
35
+ [PriceBandActionFlagsFindResultFields.COLUMN_CAN_BE_SUSPENDED]?: FiltersParameters;
36
+ [PriceBandActionFlagsFindResultFields.COLUMN_CAN_DECREASE_SEATS]?: FiltersParameters;
37
+ [PriceBandActionFlagsFindResultFields.COLUMN_CAN_INCREASE_SEATS]?: FiltersParameters;
38
+ };
39
+ export declare class PriceBandActionFlagsFindResult extends AbstractEntity<PriceBandActionFlagsFindResultData> {
40
+ #private;
41
+ protected VALIDATION_RULES: Rules;
42
+ constructor(data: PriceBandActionFlagsFindResultData);
43
+ get canBeCancelled(): boolean;
44
+ get canBeReactivated(): boolean;
45
+ get canBeSuspended(): boolean;
46
+ get canDecreaseSeats(): boolean;
47
+ get canIncreaseSeats(): boolean;
48
+ toJSON(): PriceBandActionFlagsFindResultData;
49
+ }
@@ -0,0 +1,80 @@
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 _canBeCancelled, _canBeReactivated, _canBeSuspended, _canDecreaseSeats, _canIncreaseSeats;
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.PriceBandActionFlagsFindResult = exports.PriceBandActionFlagsFindResultFields = void 0;
18
+ const abstractEntity_1 = require("../../../../abstractEntity");
19
+ var PriceBandActionFlagsFindResultFields;
20
+ (function (PriceBandActionFlagsFindResultFields) {
21
+ PriceBandActionFlagsFindResultFields["COLUMN_CAN_BE_CANCELLED"] = "canBeCancelled";
22
+ PriceBandActionFlagsFindResultFields["COLUMN_CAN_BE_REACTIVATED"] = "canBeReactivated";
23
+ PriceBandActionFlagsFindResultFields["COLUMN_CAN_BE_SUSPENDED"] = "canBeSuspended";
24
+ PriceBandActionFlagsFindResultFields["COLUMN_CAN_DECREASE_SEATS"] = "canDecreaseSeats";
25
+ PriceBandActionFlagsFindResultFields["COLUMN_CAN_INCREASE_SEATS"] = "canIncreaseSeats";
26
+ })(PriceBandActionFlagsFindResultFields = exports.PriceBandActionFlagsFindResultFields || (exports.PriceBandActionFlagsFindResultFields = {}));
27
+ class PriceBandActionFlagsFindResult extends abstractEntity_1.AbstractEntity {
28
+ constructor(data) {
29
+ super(data);
30
+ this.VALIDATION_RULES = {
31
+ [PriceBandActionFlagsFindResultFields.COLUMN_CAN_BE_CANCELLED]: 'required|boolean',
32
+ [PriceBandActionFlagsFindResultFields.COLUMN_CAN_BE_REACTIVATED]: 'required|boolean',
33
+ [PriceBandActionFlagsFindResultFields.COLUMN_CAN_BE_SUSPENDED]: 'required|boolean',
34
+ [PriceBandActionFlagsFindResultFields.COLUMN_CAN_DECREASE_SEATS]: 'required|boolean',
35
+ [PriceBandActionFlagsFindResultFields.COLUMN_CAN_INCREASE_SEATS]: 'required|boolean',
36
+ };
37
+ _canBeCancelled.set(this, void 0);
38
+ _canBeReactivated.set(this, void 0);
39
+ _canBeSuspended.set(this, void 0);
40
+ _canDecreaseSeats.set(this, void 0);
41
+ _canIncreaseSeats.set(this, void 0);
42
+ __classPrivateFieldSet(this, _canBeCancelled, data[PriceBandActionFlagsFindResultFields.COLUMN_CAN_BE_CANCELLED]);
43
+ __classPrivateFieldSet(this, _canBeReactivated, data[PriceBandActionFlagsFindResultFields.COLUMN_CAN_BE_REACTIVATED]);
44
+ __classPrivateFieldSet(this, _canBeSuspended, data[PriceBandActionFlagsFindResultFields.COLUMN_CAN_BE_SUSPENDED]);
45
+ __classPrivateFieldSet(this, _canDecreaseSeats, data[PriceBandActionFlagsFindResultFields.COLUMN_CAN_DECREASE_SEATS]);
46
+ __classPrivateFieldSet(this, _canIncreaseSeats, data[PriceBandActionFlagsFindResultFields.COLUMN_CAN_INCREASE_SEATS]);
47
+ }
48
+ get canBeCancelled() {
49
+ return __classPrivateFieldGet(this, _canBeCancelled);
50
+ }
51
+ get canBeReactivated() {
52
+ return __classPrivateFieldGet(this, _canBeReactivated);
53
+ }
54
+ get canBeSuspended() {
55
+ return __classPrivateFieldGet(this, _canBeSuspended);
56
+ }
57
+ get canDecreaseSeats() {
58
+ return __classPrivateFieldGet(this, _canDecreaseSeats);
59
+ }
60
+ get canIncreaseSeats() {
61
+ return __classPrivateFieldGet(this, _canIncreaseSeats);
62
+ }
63
+ toJSON() {
64
+ return {
65
+ [PriceBandActionFlagsFindResultFields.COLUMN_CAN_BE_CANCELLED]: this
66
+ .canBeCancelled,
67
+ [PriceBandActionFlagsFindResultFields.COLUMN_CAN_BE_REACTIVATED]: this
68
+ .canBeReactivated,
69
+ [PriceBandActionFlagsFindResultFields.COLUMN_CAN_BE_SUSPENDED]: this
70
+ .canBeSuspended,
71
+ [PriceBandActionFlagsFindResultFields.COLUMN_CAN_DECREASE_SEATS]: this
72
+ .canDecreaseSeats,
73
+ [PriceBandActionFlagsFindResultFields.COLUMN_CAN_INCREASE_SEATS]: this
74
+ .canIncreaseSeats,
75
+ };
76
+ }
77
+ }
78
+ exports.PriceBandActionFlagsFindResult = PriceBandActionFlagsFindResult;
79
+ _canBeCancelled = new WeakMap(), _canBeReactivated = new WeakMap(), _canBeSuspended = new WeakMap(), _canDecreaseSeats = new WeakMap(), _canIncreaseSeats = new WeakMap();
80
+ //# sourceMappingURL=priceBandActionFlagsFindResult.js.map
@@ -0,0 +1,37 @@
1
+ import { AbstractEntity } from '../../../../abstractEntity';
2
+ import { Rules } from 'validatorjs';
3
+ import { DataKeywords, FiltersParameters, SortParameters } from '../../../licensesClient';
4
+ export declare enum PriceBandPriceFindResultFields {
5
+ COLUMN_BUY = "buy",
6
+ COLUMN_SELL = "sell",
7
+ COLUMN_PUBLIC = "public"
8
+ }
9
+ export declare type PriceBandPriceFindResultData = {
10
+ [PriceBandPriceFindResultFields.COLUMN_BUY]: number;
11
+ [PriceBandPriceFindResultFields.COLUMN_SELL]: number;
12
+ [PriceBandPriceFindResultFields.COLUMN_PUBLIC]: number;
13
+ };
14
+ export declare type PriceBandPriceFindResultDataKeywords = {
15
+ [PriceBandPriceFindResultFields.COLUMN_BUY]?: DataKeywords;
16
+ [PriceBandPriceFindResultFields.COLUMN_SELL]?: DataKeywords;
17
+ [PriceBandPriceFindResultFields.COLUMN_PUBLIC]?: DataKeywords;
18
+ };
19
+ export declare type PriceBandPriceFindResultDataSortParameters = {
20
+ [PriceBandPriceFindResultFields.COLUMN_BUY]?: SortParameters;
21
+ [PriceBandPriceFindResultFields.COLUMN_SELL]?: SortParameters;
22
+ [PriceBandPriceFindResultFields.COLUMN_PUBLIC]?: SortParameters;
23
+ };
24
+ export declare type PriceBandPriceFindResultDataFiltersParameters = {
25
+ [PriceBandPriceFindResultFields.COLUMN_BUY]?: FiltersParameters;
26
+ [PriceBandPriceFindResultFields.COLUMN_SELL]?: FiltersParameters;
27
+ [PriceBandPriceFindResultFields.COLUMN_PUBLIC]?: FiltersParameters;
28
+ };
29
+ export declare class PriceBandPriceFindResult extends AbstractEntity<PriceBandPriceFindResultData> {
30
+ #private;
31
+ protected VALIDATION_RULES: Rules;
32
+ constructor(data: PriceBandPriceFindResultData);
33
+ get buy(): number;
34
+ get sell(): number;
35
+ get public(): number;
36
+ toJSON(): PriceBandPriceFindResultData;
37
+ }
@@ -0,0 +1,59 @@
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 _buy, _sell, _public;
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.PriceBandPriceFindResult = exports.PriceBandPriceFindResultFields = void 0;
18
+ const abstractEntity_1 = require("../../../../abstractEntity");
19
+ var PriceBandPriceFindResultFields;
20
+ (function (PriceBandPriceFindResultFields) {
21
+ PriceBandPriceFindResultFields["COLUMN_BUY"] = "buy";
22
+ PriceBandPriceFindResultFields["COLUMN_SELL"] = "sell";
23
+ PriceBandPriceFindResultFields["COLUMN_PUBLIC"] = "public";
24
+ })(PriceBandPriceFindResultFields = exports.PriceBandPriceFindResultFields || (exports.PriceBandPriceFindResultFields = {}));
25
+ class PriceBandPriceFindResult extends abstractEntity_1.AbstractEntity {
26
+ constructor(data) {
27
+ super(data);
28
+ this.VALIDATION_RULES = {
29
+ [PriceBandPriceFindResultFields.COLUMN_BUY]: 'required|numeric',
30
+ [PriceBandPriceFindResultFields.COLUMN_SELL]: 'required|numeric',
31
+ [PriceBandPriceFindResultFields.COLUMN_PUBLIC]: 'required|numeric',
32
+ };
33
+ _buy.set(this, void 0);
34
+ _sell.set(this, void 0);
35
+ _public.set(this, void 0);
36
+ __classPrivateFieldSet(this, _buy, data[PriceBandPriceFindResultFields.COLUMN_BUY]);
37
+ __classPrivateFieldSet(this, _sell, data[PriceBandPriceFindResultFields.COLUMN_SELL]);
38
+ __classPrivateFieldSet(this, _public, data[PriceBandPriceFindResultFields.COLUMN_PUBLIC]);
39
+ }
40
+ get buy() {
41
+ return __classPrivateFieldGet(this, _buy);
42
+ }
43
+ get sell() {
44
+ return __classPrivateFieldGet(this, _sell);
45
+ }
46
+ get public() {
47
+ return __classPrivateFieldGet(this, _public);
48
+ }
49
+ toJSON() {
50
+ return {
51
+ [PriceBandPriceFindResultFields.COLUMN_BUY]: this.buy,
52
+ [PriceBandPriceFindResultFields.COLUMN_SELL]: this.sell,
53
+ [PriceBandPriceFindResultFields.COLUMN_PUBLIC]: this.public,
54
+ };
55
+ }
56
+ }
57
+ exports.PriceBandPriceFindResult = PriceBandPriceFindResult;
58
+ _buy = new WeakMap(), _sell = new WeakMap(), _public = new WeakMap();
59
+ //# sourceMappingURL=priceBandPriceFindResult.js.map
@@ -0,0 +1,29 @@
1
+ import { DataKeywords, FiltersParameters, SortParameters } from '../../../licensesClient';
2
+ import { AbstractEntity } from '../../../../abstractEntity';
3
+ export declare enum SaleConstraintsFindResultFields {
4
+ COLUMN_MIN_QUANTITY = "minQuantity",
5
+ COLUMN_MAX_QUANTITY = "maxQuantity"
6
+ }
7
+ export declare type SaleConstraintsFindResultData = {
8
+ [SaleConstraintsFindResultFields.COLUMN_MIN_QUANTITY]: number | null;
9
+ [SaleConstraintsFindResultFields.COLUMN_MAX_QUANTITY]: number | null;
10
+ };
11
+ export declare type SaleConstraintsFindResultDataKeywords = {
12
+ [SaleConstraintsFindResultFields.COLUMN_MIN_QUANTITY]?: DataKeywords;
13
+ [SaleConstraintsFindResultFields.COLUMN_MAX_QUANTITY]?: DataKeywords;
14
+ };
15
+ export declare type SaleConstraintsFindResultDataSortParameters = {
16
+ [SaleConstraintsFindResultFields.COLUMN_MIN_QUANTITY]?: SortParameters;
17
+ [SaleConstraintsFindResultFields.COLUMN_MAX_QUANTITY]?: SortParameters;
18
+ };
19
+ export declare type SaleConstraintsFindResultDataFiltersParameters = {
20
+ [SaleConstraintsFindResultFields.COLUMN_MIN_QUANTITY]?: FiltersParameters;
21
+ [SaleConstraintsFindResultFields.COLUMN_MAX_QUANTITY]?: FiltersParameters;
22
+ };
23
+ export declare class SaleConstraintsFindResult extends AbstractEntity<SaleConstraintsFindResultData> {
24
+ #private;
25
+ constructor(data: SaleConstraintsFindResultData);
26
+ get minQuantity(): number | null;
27
+ get maxQuantity(): number | null;
28
+ toJSON(): SaleConstraintsFindResultData;
29
+ }
@@ -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 _minQuantity, _maxQuantity;
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.SaleConstraintsFindResult = exports.SaleConstraintsFindResultFields = void 0;
18
+ const abstractEntity_1 = require("../../../../abstractEntity");
19
+ var SaleConstraintsFindResultFields;
20
+ (function (SaleConstraintsFindResultFields) {
21
+ SaleConstraintsFindResultFields["COLUMN_MIN_QUANTITY"] = "minQuantity";
22
+ SaleConstraintsFindResultFields["COLUMN_MAX_QUANTITY"] = "maxQuantity";
23
+ })(SaleConstraintsFindResultFields = exports.SaleConstraintsFindResultFields || (exports.SaleConstraintsFindResultFields = {}));
24
+ class SaleConstraintsFindResult extends abstractEntity_1.AbstractEntity {
25
+ constructor(data) {
26
+ super(data);
27
+ _minQuantity.set(this, void 0);
28
+ _maxQuantity.set(this, void 0);
29
+ __classPrivateFieldSet(this, _minQuantity, data[SaleConstraintsFindResultFields.COLUMN_MIN_QUANTITY]);
30
+ __classPrivateFieldSet(this, _maxQuantity, data[SaleConstraintsFindResultFields.COLUMN_MAX_QUANTITY]);
31
+ }
32
+ get minQuantity() {
33
+ return __classPrivateFieldGet(this, _minQuantity);
34
+ }
35
+ get maxQuantity() {
36
+ return __classPrivateFieldGet(this, _maxQuantity);
37
+ }
38
+ toJSON() {
39
+ return {
40
+ [SaleConstraintsFindResultFields.COLUMN_MIN_QUANTITY]: this.minQuantity,
41
+ [SaleConstraintsFindResultFields.COLUMN_MAX_QUANTITY]: this.maxQuantity,
42
+ };
43
+ }
44
+ }
45
+ exports.SaleConstraintsFindResult = SaleConstraintsFindResult;
46
+ _minQuantity = new WeakMap(), _maxQuantity = new WeakMap();
47
+ //# sourceMappingURL=saleConstraintsFindResult.js.map
@@ -1,6 +1,17 @@
1
1
  export * from './licensesClient';
2
- export * from './entities/license/abstractLicense';
2
+ export * from './entities/license/activeSeatsFindResult';
3
+ export * from './entities/license/configFindResult';
4
+ export * from './entities/license/licenseFindResult';
5
+ export * from './entities/license/priceFindResult';
6
+ export * from './entities/license/warningFindResult';
7
+ export * from './entities/offer/priceband/identifiers/arrowsphereFindResult';
8
+ export * from './entities/offer/priceband/billingFindResult';
9
+ export * from './entities/offer/priceband/identifiersFindResult';
10
+ export * from './entities/offer/priceband/priceBandActionFlagsFindResult';
11
+ export * from './entities/offer/priceband/priceBandPriceFindResult';
12
+ export * from './entities/offer/priceband/saleConstraintsFindResult';
13
+ export * from './entities/offer/actionFlagsFindResult';
14
+ export * from './entities/offer/offerFindResult';
15
+ export * from './entities/offer/priceBandFindResult';
3
16
  export * from './entities/filterFindResult';
4
17
  export * from './entities/findResult';
5
- export * from './entities/license/licenseFindResult';
6
- export * from './entities/offer/licenseOfferFindResult';
@@ -11,9 +11,20 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  __exportStar(require("./licensesClient"), exports);
14
- __exportStar(require("./entities/license/abstractLicense"), exports);
14
+ __exportStar(require("./entities/license/activeSeatsFindResult"), exports);
15
+ __exportStar(require("./entities/license/configFindResult"), exports);
16
+ __exportStar(require("./entities/license/licenseFindResult"), exports);
17
+ __exportStar(require("./entities/license/priceFindResult"), exports);
18
+ __exportStar(require("./entities/license/warningFindResult"), exports);
19
+ __exportStar(require("./entities/offer/priceband/identifiers/arrowsphereFindResult"), exports);
20
+ __exportStar(require("./entities/offer/priceband/billingFindResult"), exports);
21
+ __exportStar(require("./entities/offer/priceband/identifiersFindResult"), exports);
22
+ __exportStar(require("./entities/offer/priceband/priceBandActionFlagsFindResult"), exports);
23
+ __exportStar(require("./entities/offer/priceband/priceBandPriceFindResult"), exports);
24
+ __exportStar(require("./entities/offer/priceband/saleConstraintsFindResult"), exports);
25
+ __exportStar(require("./entities/offer/actionFlagsFindResult"), exports);
26
+ __exportStar(require("./entities/offer/offerFindResult"), exports);
27
+ __exportStar(require("./entities/offer/priceBandFindResult"), exports);
15
28
  __exportStar(require("./entities/filterFindResult"), exports);
16
29
  __exportStar(require("./entities/findResult"), exports);
17
- __exportStar(require("./entities/license/licenseFindResult"), exports);
18
- __exportStar(require("./entities/offer/licenseOfferFindResult"), exports);
19
30
  //# sourceMappingURL=index.js.map
@@ -2,9 +2,15 @@
2
2
  * Class LicensesClient
3
3
  */
4
4
  import { AbstractClient, Parameters } from '../abstractClient';
5
- import { FindData, FindResult } from './entities/findResult';
6
- import { LicenseFields } from './entities/license/abstractLicense';
7
- import { LicenseOfferFields } from './entities/offer/licenseOfferFindResult';
5
+ import { FindConfig, FindData, FindResult } from './entities/findResult';
6
+ import { ConfigFindResult, ConfigFindResultData, ConfigFindResultDataKeywords, ConfigFindResultDataSortParameters } from './entities/license/configFindResult';
7
+ import { LicenceFindDataFiltersParameters, LicenceFindDataKeywords, LicenceFindDataSortParameters } from './entities/license/licenseFindResult';
8
+ import { ActiveSeatsFindResultDataKeywords, ActiveSeatsFindResultDataSortParameters } from './entities/license/activeSeatsFindResult';
9
+ import { WarningFindResultDataKeywords, WarningFindResultDataSortParameters } from './entities/license/warningFindResult';
10
+ import { PriceFindResultDataKeywords, PriceFindResutDataSortParameters } from './entities/license/priceFindResult';
11
+ import { OfferFindResultDataFiltersParameters, OfferFindResultDataKeywords, OfferFindResultDataSortParameters } from './entities/offer/offerFindResult';
12
+ import { ActionFlagsFindResultDataKeywords, ActionFlagsFindResultDataSortParameters } from './entities/offer/actionFlagsFindResult';
13
+ import { PriceBandFindResultDataKeywords, PriceBandFindResultDataSortParameters } from './entities/offer/priceBandFindResult';
8
14
  /**
9
15
  * Parameters passable to the request for refining search.
10
16
  */
@@ -61,7 +67,7 @@ export declare enum LicenseFindParameters {
61
67
  /**
62
68
  * List of keywords to search with.
63
69
  */
64
- export declare type LicenseDataKeywords = {
70
+ export declare type DataKeywords = {
65
71
  [LicenseFindParameters.KEYWORDS_OPERATOR]: LicenseFindParameters.OPERATOR_AND | LicenseFindParameters.OPERATOR_OR | LicenseFindParameters.OPERATOR_BETWEEN;
66
72
  [LicenseFindParameters.KEYWORDS_VALUES]: string[];
67
73
  };
@@ -69,40 +75,40 @@ export declare type LicenseDataKeywords = {
69
75
  * Keywords parameters to pass to the request
70
76
  */
71
77
  export declare type LicenseKeywordsParameters = {
72
- license?: {
73
- [field in LicenseFields]?: LicenseDataKeywords;
74
- };
75
- offer?: {
76
- [field in LicenseOfferFields]?: LicenseDataKeywords;
77
- };
78
+ license?: LicenceFindDataKeywords;
79
+ offer?: OfferFindResultDataKeywords;
80
+ };
81
+ export declare type LicenseRawKeywordsParametersLicence = {
82
+ [field: string]: DataKeywords | ActiveSeatsFindResultDataKeywords | ConfigFindResultDataKeywords | WarningFindResultDataKeywords | PriceFindResultDataKeywords | undefined;
83
+ };
84
+ export declare type LicenseRawKeywordsParametersOffer = {
85
+ [field: string]: DataKeywords | ActionFlagsFindResultDataKeywords | PriceBandFindResultDataKeywords | undefined;
78
86
  };
79
- export declare type LicenseRawKeywordsParameters = {
80
- [field: string]: LicenseDataKeywords | undefined;
87
+ export declare type SortParameters = {
88
+ [LicenseFindParameters.DATA_SORT]: LicenseFindParameters.SORT_ASCENDING | LicenseFindParameters.SORT_DESCENDING;
81
89
  };
82
90
  /**
83
91
  * Sort parameters to pass to the request
84
92
  */
85
93
  export declare type LicenseSortParameters = {
86
- license?: {
87
- [field in LicenseFields]?: LicenseFindParameters.SORT_ASCENDING | LicenseFindParameters.SORT_DESCENDING;
88
- };
89
- offer?: {
90
- [field in LicenseOfferFields]?: LicenseFindParameters.SORT_ASCENDING | LicenseFindParameters.SORT_DESCENDING;
91
- };
94
+ license?: LicenceFindDataSortParameters;
95
+ offer?: OfferFindResultDataSortParameters;
96
+ };
97
+ export declare type LicenseRawSortParametersLicense = {
98
+ [field: string]: SortParameters | ActiveSeatsFindResultDataSortParameters | ConfigFindResultDataSortParameters | WarningFindResultDataSortParameters | PriceFindResutDataSortParameters | undefined;
92
99
  };
93
- export declare type LicenseRawSortParameters = {
94
- [field: string]: string | undefined;
100
+ export declare type LicenseRawSortParametersOffer = {
101
+ [field: string]: SortParameters | ActionFlagsFindResultDataSortParameters | PriceBandFindResultDataSortParameters | undefined;
102
+ };
103
+ export declare type FiltersParameters = {
104
+ [LicenseFindParameters.DATA_FILTERS]: unknown;
95
105
  };
96
106
  /**
97
107
  * Filter parameters to pass to the request.
98
108
  */
99
109
  export declare type LicenseFiltersParameters = {
100
- license?: {
101
- [field in LicenseFields]?: unknown;
102
- };
103
- offer?: {
104
- [field in LicenseOfferFields]?: unknown;
105
- };
110
+ license?: LicenceFindDataFiltersParameters;
111
+ offer?: OfferFindResultDataFiltersParameters;
106
112
  };
107
113
  export declare type LicenseRawFiltersParameters = {
108
114
  [field: string]: unknown;
@@ -119,9 +125,15 @@ export declare type LicenseFindPayload = {
119
125
  };
120
126
  export declare type LicenseFindRawPayload = {
121
127
  [LicenseFindParameters.DATA_KEYWORD]?: string;
122
- [LicenseFindParameters.DATA_KEYWORDS]?: LicenseRawKeywordsParameters;
128
+ [LicenseFindParameters.DATA_KEYWORDS]?: {
129
+ license?: LicenseRawKeywordsParametersLicence;
130
+ offer?: LicenseRawKeywordsParametersOffer;
131
+ };
123
132
  [LicenseFindParameters.DATA_FILTERS]?: LicenseRawFiltersParameters;
124
- [LicenseFindParameters.DATA_SORT]?: LicenseRawSortParameters;
133
+ [LicenseFindParameters.DATA_SORT]?: {
134
+ license?: LicenseRawSortParametersLicense;
135
+ offer?: LicenseRawSortParametersOffer;
136
+ };
125
137
  [LicenseFindParameters.DATA_HIGHLIGHT]?: boolean;
126
138
  };
127
139
  export declare class LicensesClient extends AbstractClient {
@@ -137,6 +149,10 @@ export declare class LicensesClient extends AbstractClient {
137
149
  * The path of the Find endpoint
138
150
  */
139
151
  private FIND_PATH;
152
+ /**
153
+ * The path of the Configs endpoint
154
+ */
155
+ private CONFIGS_PATH;
140
156
  /**
141
157
  * Returns the raw result from the find endpoint call
142
158
  *
@@ -158,4 +174,8 @@ export declare class LicensesClient extends AbstractClient {
158
174
  *
159
175
  */
160
176
  find(postData?: LicenseFindPayload, perPage?: number, page?: number, parameters?: Parameters): Promise<FindResult>;
177
+ getConfigsRaw(reference: string): Promise<FindConfig>;
178
+ getConfigs(reference: string): AsyncGenerator<ConfigFindResultData>;
179
+ updateConfigRaw(reference: string, config: ConfigFindResult): Promise<ConfigFindResultData>;
180
+ updateConfig(reference: string, config: ConfigFindResult): Promise<ConfigFindResult>;
161
181
  }
@@ -6,6 +6,7 @@ exports.LicensesClient = exports.LicenseFindParameters = void 0;
6
6
  */
7
7
  const abstractClient_1 = require("../abstractClient");
8
8
  const findResult_1 = require("./entities/findResult");
9
+ const configFindResult_1 = require("./entities/license/configFindResult");
9
10
  /**
10
11
  * Parameters passable to the request for refining search.
11
12
  */
@@ -75,6 +76,10 @@ class LicensesClient extends abstractClient_1.AbstractClient {
75
76
  * The path of the Find endpoint
76
77
  */
77
78
  this.FIND_PATH = 'v2/find';
79
+ /**
80
+ * The path of the Configs endpoint
81
+ */
82
+ this.CONFIGS_PATH = '/configs';
78
83
  }
79
84
  /**
80
85
  * Returns the raw result from the find endpoint call
@@ -149,6 +154,29 @@ class LicensesClient extends abstractClient_1.AbstractClient {
149
154
  const response = await this.findRaw(rawLicensePayload, parameters);
150
155
  return new findResult_1.FindResult(response, this, rawLicensePayload, parameters);
151
156
  }
157
+ getConfigsRaw(reference) {
158
+ this.path = reference + this.CONFIGS_PATH;
159
+ return this.get();
160
+ }
161
+ async *getConfigs(reference) {
162
+ const rawResponse = await this.getConfigsRaw(reference);
163
+ for (const response of rawResponse.data) {
164
+ yield new configFindResult_1.ConfigFindResult(response).toJSON();
165
+ }
166
+ }
167
+ async updateConfigRaw(reference, config) {
168
+ this.path = reference + this.CONFIGS_PATH;
169
+ const postData = {
170
+ [configFindResult_1.ConfigFindResultFields.COLUMN_NAME]: config.name,
171
+ [configFindResult_1.ConfigFindResultFields.COLUMN_SCOPE]: config.scope,
172
+ [configFindResult_1.ConfigFindResultFields.COLUMN_STATE]: config.state,
173
+ };
174
+ return await this.post(postData);
175
+ }
176
+ async updateConfig(reference, config) {
177
+ const rawResponse = await this.updateConfigRaw(reference, config);
178
+ return new configFindResult_1.ConfigFindResult(rawResponse);
179
+ }
152
180
  }
153
181
  exports.LicensesClient = LicensesClient;
154
182
  //# sourceMappingURL=licensesClient.js.map
@@ -17,7 +17,9 @@ class PublicApiClient extends abstractClient_1.AbstractClient {
17
17
  * @returns {@link WhoAmIClient}
18
18
  */
19
19
  getWhoamiClient() {
20
- return new general_1.WhoAmIClient(this.client).setUrl(this.url).setApiKey(this.apiKey);
20
+ return new general_1.WhoAmIClient(this.client)
21
+ .setUrl(this.url)
22
+ .setApiKey(this.apiKey);
21
23
  }
22
24
  /**
23
25
  * Creates a new {@link LicensesClient} instance and returns it
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": "1.0.3",
7
+ "version": "2.0.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",
@@ -14,7 +14,7 @@
14
14
  "doc": "typedoc ./src/index.ts ./src/**/index.ts",
15
15
  "lint": "eslint ./{src,tests}/**/*.ts && prettier --list-different ./{src,tests}/**/*.ts",
16
16
  "lint:fix": "eslint ./{src,tests}/**/*.ts --fix && prettier --write ./{src,tests}/**/*.ts",
17
- "prepublishOnly": "npm run clean && npm run build",
17
+ "prepare": "npm run clean && npm run build",
18
18
  "test": "mocha -r ts-node/register \"tests/**/*.ts\"",
19
19
  "test:watch": "mocha --watch -r ts-node/register \"tests/**/*.ts\"",
20
20
  "test:coverage": "nyc --check-coverage npm run test",