@arrowsphere/api-client 1.0.0 → 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.
- package/CHANGELOG.md +69 -1
- package/UPGRADING.md +43 -0
- package/build/licenses/entities/filterFindResult.d.ts +2 -2
- package/build/licenses/entities/findResult.d.ts +18 -10
- package/build/licenses/entities/findResult.js +4 -4
- package/build/licenses/entities/license/activeSeatsFindResult.d.ts +29 -0
- package/build/licenses/entities/license/activeSeatsFindResult.js +47 -0
- package/build/licenses/entities/license/configFindResult.d.ts +37 -0
- package/build/licenses/entities/license/configFindResult.js +59 -0
- package/build/licenses/entities/license/licenseFindResult.d.ts +266 -13
- package/build/licenses/entities/license/licenseFindResult.js +324 -13
- package/build/licenses/entities/license/priceFindResult.d.ts +54 -0
- package/build/licenses/entities/license/priceFindResult.js +76 -0
- package/build/licenses/entities/license/warningFindResult.d.ts +33 -0
- package/build/licenses/entities/license/warningFindResult.js +51 -0
- package/build/licenses/entities/offer/actionFlagsFindResult.d.ts +37 -0
- package/build/licenses/entities/offer/actionFlagsFindResult.js +59 -0
- package/build/licenses/entities/offer/offerFindResult.d.ts +63 -0
- package/build/licenses/entities/offer/offerFindResult.js +109 -0
- package/build/licenses/entities/offer/priceBandFindResult.d.ts +72 -0
- package/build/licenses/entities/offer/priceBandFindResult.js +131 -0
- package/build/licenses/entities/offer/priceband/billingFindResult.d.ts +37 -0
- package/build/licenses/entities/offer/priceband/billingFindResult.js +59 -0
- package/build/licenses/entities/offer/priceband/identifiers/arrowsphereFindResult.d.ts +25 -0
- package/build/licenses/entities/offer/priceband/identifiers/arrowsphereFindResult.js +43 -0
- package/build/licenses/entities/offer/priceband/identifiersFindResult.d.ts +25 -0
- package/build/licenses/entities/offer/priceband/identifiersFindResult.js +47 -0
- package/build/licenses/entities/offer/priceband/priceBandActionFlagsFindResult.d.ts +49 -0
- package/build/licenses/entities/offer/priceband/priceBandActionFlagsFindResult.js +80 -0
- package/build/licenses/entities/offer/priceband/priceBandPriceFindResult.d.ts +37 -0
- package/build/licenses/entities/offer/priceband/priceBandPriceFindResult.js +59 -0
- package/build/licenses/entities/offer/priceband/saleConstraintsFindResult.d.ts +29 -0
- package/build/licenses/entities/offer/priceband/saleConstraintsFindResult.js +47 -0
- package/build/licenses/index.d.ts +14 -3
- package/build/licenses/index.js +14 -3
- package/build/licenses/licensesClient.d.ts +59 -7
- package/build/licenses/licensesClient.js +74 -2
- package/build/publicApiClient.js +3 -1
- package/package.json +2 -2
- package/build/licenses/entities/license/abstractLicense.d.ts +0 -177
- package/build/licenses/entities/license/abstractLicense.js +0 -363
- package/build/licenses/entities/offer/licenseOfferFindResult.d.ts +0 -108
- 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/
|
|
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';
|
package/build/licenses/index.js
CHANGED
|
@@ -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/
|
|
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,8 +2,15 @@
|
|
|
2
2
|
* Class LicensesClient
|
|
3
3
|
*/
|
|
4
4
|
import { AbstractClient, Parameters } from '../abstractClient';
|
|
5
|
-
import { FindData, FindResult } from './entities/findResult';
|
|
6
|
-
import {
|
|
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';
|
|
7
14
|
/**
|
|
8
15
|
* Parameters passable to the request for refining search.
|
|
9
16
|
*/
|
|
@@ -60,7 +67,7 @@ export declare enum LicenseFindParameters {
|
|
|
60
67
|
/**
|
|
61
68
|
* List of keywords to search with.
|
|
62
69
|
*/
|
|
63
|
-
export declare type
|
|
70
|
+
export declare type DataKeywords = {
|
|
64
71
|
[LicenseFindParameters.KEYWORDS_OPERATOR]: LicenseFindParameters.OPERATOR_AND | LicenseFindParameters.OPERATOR_OR | LicenseFindParameters.OPERATOR_BETWEEN;
|
|
65
72
|
[LicenseFindParameters.KEYWORDS_VALUES]: string[];
|
|
66
73
|
};
|
|
@@ -68,19 +75,43 @@ export declare type LicenseDataKeywords = {
|
|
|
68
75
|
* Keywords parameters to pass to the request
|
|
69
76
|
*/
|
|
70
77
|
export declare type LicenseKeywordsParameters = {
|
|
71
|
-
|
|
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;
|
|
86
|
+
};
|
|
87
|
+
export declare type SortParameters = {
|
|
88
|
+
[LicenseFindParameters.DATA_SORT]: LicenseFindParameters.SORT_ASCENDING | LicenseFindParameters.SORT_DESCENDING;
|
|
72
89
|
};
|
|
73
90
|
/**
|
|
74
91
|
* Sort parameters to pass to the request
|
|
75
92
|
*/
|
|
76
93
|
export declare type LicenseSortParameters = {
|
|
77
|
-
|
|
94
|
+
license?: LicenceFindDataSortParameters;
|
|
95
|
+
offer?: OfferFindResultDataSortParameters;
|
|
96
|
+
};
|
|
97
|
+
export declare type LicenseRawSortParametersLicense = {
|
|
98
|
+
[field: string]: SortParameters | ActiveSeatsFindResultDataSortParameters | ConfigFindResultDataSortParameters | WarningFindResultDataSortParameters | PriceFindResutDataSortParameters | undefined;
|
|
99
|
+
};
|
|
100
|
+
export declare type LicenseRawSortParametersOffer = {
|
|
101
|
+
[field: string]: SortParameters | ActionFlagsFindResultDataSortParameters | PriceBandFindResultDataSortParameters | undefined;
|
|
102
|
+
};
|
|
103
|
+
export declare type FiltersParameters = {
|
|
104
|
+
[LicenseFindParameters.DATA_FILTERS]: unknown;
|
|
78
105
|
};
|
|
79
106
|
/**
|
|
80
107
|
* Filter parameters to pass to the request.
|
|
81
108
|
*/
|
|
82
109
|
export declare type LicenseFiltersParameters = {
|
|
83
|
-
|
|
110
|
+
license?: LicenceFindDataFiltersParameters;
|
|
111
|
+
offer?: OfferFindResultDataFiltersParameters;
|
|
112
|
+
};
|
|
113
|
+
export declare type LicenseRawFiltersParameters = {
|
|
114
|
+
[field: string]: unknown;
|
|
84
115
|
};
|
|
85
116
|
/**
|
|
86
117
|
* Payload to pass the find request. Contains keyword(s), sort options, column filters and highlight option.
|
|
@@ -92,6 +123,19 @@ export declare type LicenseFindPayload = {
|
|
|
92
123
|
[LicenseFindParameters.DATA_SORT]?: LicenseSortParameters;
|
|
93
124
|
[LicenseFindParameters.DATA_HIGHLIGHT]?: boolean;
|
|
94
125
|
};
|
|
126
|
+
export declare type LicenseFindRawPayload = {
|
|
127
|
+
[LicenseFindParameters.DATA_KEYWORD]?: string;
|
|
128
|
+
[LicenseFindParameters.DATA_KEYWORDS]?: {
|
|
129
|
+
license?: LicenseRawKeywordsParametersLicence;
|
|
130
|
+
offer?: LicenseRawKeywordsParametersOffer;
|
|
131
|
+
};
|
|
132
|
+
[LicenseFindParameters.DATA_FILTERS]?: LicenseRawFiltersParameters;
|
|
133
|
+
[LicenseFindParameters.DATA_SORT]?: {
|
|
134
|
+
license?: LicenseRawSortParametersLicense;
|
|
135
|
+
offer?: LicenseRawSortParametersOffer;
|
|
136
|
+
};
|
|
137
|
+
[LicenseFindParameters.DATA_HIGHLIGHT]?: boolean;
|
|
138
|
+
};
|
|
95
139
|
export declare class LicensesClient extends AbstractClient {
|
|
96
140
|
/**
|
|
97
141
|
* The base path of the Licenses API
|
|
@@ -105,6 +149,10 @@ export declare class LicensesClient extends AbstractClient {
|
|
|
105
149
|
* The path of the Find endpoint
|
|
106
150
|
*/
|
|
107
151
|
private FIND_PATH;
|
|
152
|
+
/**
|
|
153
|
+
* The path of the Configs endpoint
|
|
154
|
+
*/
|
|
155
|
+
private CONFIGS_PATH;
|
|
108
156
|
/**
|
|
109
157
|
* Returns the raw result from the find endpoint call
|
|
110
158
|
*
|
|
@@ -113,7 +161,7 @@ export declare class LicensesClient extends AbstractClient {
|
|
|
113
161
|
*
|
|
114
162
|
* @returns Promise\<{@link FindData}\>
|
|
115
163
|
*/
|
|
116
|
-
findRaw(postData?:
|
|
164
|
+
findRaw(postData?: LicenseFindRawPayload, parameters?: Parameters): Promise<FindData>;
|
|
117
165
|
/**
|
|
118
166
|
* Searches for licenses and returns a FindResult to manipulate the results.
|
|
119
167
|
*
|
|
@@ -126,4 +174,8 @@ export declare class LicensesClient extends AbstractClient {
|
|
|
126
174
|
*
|
|
127
175
|
*/
|
|
128
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>;
|
|
129
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
|
|
@@ -100,10 +105,77 @@ class LicensesClient extends abstractClient_1.AbstractClient {
|
|
|
100
105
|
*
|
|
101
106
|
*/
|
|
102
107
|
async find(postData = {}, perPage = 100, page = 1, parameters = {}) {
|
|
108
|
+
var _a, _b, _c, _d, _e, _f;
|
|
103
109
|
this.setPerPage(perPage);
|
|
104
110
|
this.setPage(page);
|
|
105
|
-
const
|
|
106
|
-
|
|
111
|
+
const rawLicensePayload = {
|
|
112
|
+
keyword: postData.keyword,
|
|
113
|
+
highlight: postData.highlight,
|
|
114
|
+
};
|
|
115
|
+
if (postData.keywords) {
|
|
116
|
+
// Flatten with prefix for each type of keyword (license and offer)
|
|
117
|
+
rawLicensePayload.keywords = {
|
|
118
|
+
...Object.entries((_a = postData.keywords.license) !== null && _a !== void 0 ? _a : {}).reduce((acc, [keyword, value]) => {
|
|
119
|
+
acc[`license.${keyword}`] = value;
|
|
120
|
+
return acc;
|
|
121
|
+
}, {}),
|
|
122
|
+
...Object.entries((_b = postData.keywords.offer) !== null && _b !== void 0 ? _b : {}).reduce((acc, [keyword, value]) => {
|
|
123
|
+
acc[`offer.${keyword}`] = value;
|
|
124
|
+
return acc;
|
|
125
|
+
}, {}),
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
if (postData.filters) {
|
|
129
|
+
// Flatten with prefix for each type of filter (license and offer)
|
|
130
|
+
rawLicensePayload.filters = {
|
|
131
|
+
...Object.entries((_c = postData.filters.license) !== null && _c !== void 0 ? _c : {}).reduce((acc, [filter, value]) => {
|
|
132
|
+
acc[`license.${filter}`] = value;
|
|
133
|
+
return acc;
|
|
134
|
+
}, {}),
|
|
135
|
+
...Object.entries((_d = postData.filters.offer) !== null && _d !== void 0 ? _d : {}).reduce((acc, [filter, value]) => {
|
|
136
|
+
acc[`offer.${filter}`] = value;
|
|
137
|
+
return acc;
|
|
138
|
+
}, {}),
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
if (postData.sort) {
|
|
142
|
+
// Flatten with prefix for each type of sort keys (license and offer)
|
|
143
|
+
rawLicensePayload.sort = {
|
|
144
|
+
...Object.entries((_e = postData.sort.license) !== null && _e !== void 0 ? _e : {}).reduce((acc, [sort, value]) => {
|
|
145
|
+
acc[`license.${sort}`] = value;
|
|
146
|
+
return acc;
|
|
147
|
+
}, {}),
|
|
148
|
+
...Object.entries((_f = postData.sort.offer) !== null && _f !== void 0 ? _f : {}).reduce((acc, [sort, value]) => {
|
|
149
|
+
acc[`offer.${sort}`] = value;
|
|
150
|
+
return acc;
|
|
151
|
+
}, {}),
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
const response = await this.findRaw(rawLicensePayload, parameters);
|
|
155
|
+
return new findResult_1.FindResult(response, this, rawLicensePayload, parameters);
|
|
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);
|
|
107
179
|
}
|
|
108
180
|
}
|
|
109
181
|
exports.LicensesClient = LicensesClient;
|
package/build/publicApiClient.js
CHANGED
|
@@ -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)
|
|
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": "
|
|
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
|
-
"
|
|
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",
|