@arrowsphere/api-client 3.64.0 → 3.65.1-rc.bdj.1
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 +7 -0
- package/build/licenses/entities/getLicense/licenseGetResult.d.ts +5 -1
- package/build/licenses/entities/getLicense/licenseGetResult.js +15 -5
- package/build/licenses/entities/license/licenseFindResult.d.ts +7 -0
- package/build/licenses/entities/license/licenseFindResult.js +14 -4
- package/build/licenses/entities/license/securityFindResult.d.ts +23 -0
- package/build/licenses/entities/license/securityFindResult.js +39 -0
- package/build/licenses/index.d.ts +1 -0
- package/build/licenses/index.js +1 -0
- package/build/licenses/licensesClient.d.ts +11 -16
- package/build/licenses/licensesClient.js +76 -33
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,13 @@
|
|
|
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.65.0] - 2023-11-15
|
|
7
|
+
|
|
8
|
+
### Changed
|
|
9
|
+
- Handle several stages of filters for license
|
|
10
|
+
- Add security property to License
|
|
11
|
+
|
|
12
|
+
|
|
6
13
|
## [3.64.0] - 2023-11-14
|
|
7
14
|
|
|
8
15
|
### Changed
|
|
@@ -4,6 +4,7 @@ import { OrderGetData, OrderGetResult } from './orderGetResult';
|
|
|
4
4
|
import { LicensePriceGetData, LicensePriceGetResult } from './licensePriceGetResult';
|
|
5
5
|
import { AbstractEntity } from '../../../abstractEntity';
|
|
6
6
|
import { ActiveSeatsFindResult, ActiveSeatsFindResultData } from '../license/activeSeatsFindResult';
|
|
7
|
+
import { SecurityFindResult, SecurityFindResultData } from '../license/securityFindResult';
|
|
7
8
|
export declare enum LicenseGetFields {
|
|
8
9
|
COLUMN_LICENSE_ID = "license_id",
|
|
9
10
|
COLUMN_PARENT_LICENSE_ID = "parent_license_id",
|
|
@@ -35,7 +36,8 @@ export declare enum LicenseGetFields {
|
|
|
35
36
|
COLUMN_PROGRAM = "program",
|
|
36
37
|
COLUMN_ASSOCIATED_SUBSCRIPTION_PROGRAM = "associatedSubscriptionProgram",
|
|
37
38
|
COLUMN_PRICE = "price",
|
|
38
|
-
COLUMN_ARROW_SUB_CATEGORIES = "arrowSubCategories"
|
|
39
|
+
COLUMN_ARROW_SUB_CATEGORIES = "arrowSubCategories",
|
|
40
|
+
COLUMN_SECURITY = "security"
|
|
39
41
|
}
|
|
40
42
|
export declare type LicenseGetData = {
|
|
41
43
|
[LicenseGetFields.COLUMN_LICENSE_ID]: string;
|
|
@@ -51,6 +53,7 @@ export declare type LicenseGetData = {
|
|
|
51
53
|
[LicenseGetFields.COLUMN_NAME]: string;
|
|
52
54
|
[LicenseGetFields.COLUMN_SEATS]: number;
|
|
53
55
|
[LicenseGetFields.COLUMN_ACTIVE_SEATS]: ActiveSeatsFindResultData;
|
|
56
|
+
[LicenseGetFields.COLUMN_SECURITY]?: SecurityFindResultData;
|
|
54
57
|
[LicenseGetFields.COLUMN_ACTIVATION_DATETIME]: string | null;
|
|
55
58
|
[LicenseGetFields.COLUMN_EXPIRY_DATETIME]: string | null;
|
|
56
59
|
[LicenseGetFields.COLUMN_AUTO_RENEW]?: boolean;
|
|
@@ -86,6 +89,7 @@ export declare class LicenseGetResult extends AbstractEntity<LicenseGetData> {
|
|
|
86
89
|
get name(): string;
|
|
87
90
|
get seats(): number;
|
|
88
91
|
get activeSeats(): ActiveSeatsFindResult;
|
|
92
|
+
get security(): SecurityFindResult | undefined;
|
|
89
93
|
get activationDatetime(): string | null;
|
|
90
94
|
get expiryDatetime(): string | null;
|
|
91
95
|
get autoRenew(): boolean | undefined;
|
|
@@ -10,7 +10,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
10
10
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
11
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
12
|
};
|
|
13
|
-
var _LicenseGetResult_license_id, _LicenseGetResult_parent_license_id, _LicenseGetResult_friendlyName, _LicenseGetResult_customer_ref, _LicenseGetResult_state, _LicenseGetResult_statusCode, _LicenseGetResult_isTrial, _LicenseGetResult_isAddon, _LicenseGetResult_service_ref, _LicenseGetResult_sku, _LicenseGetResult_name, _LicenseGetResult_seats, _LicenseGetResult_activeSeats, _LicenseGetResult_activation_datetime, _LicenseGetResult_expiry_datetime, _LicenseGetResult_autoRenew, _LicenseGetResult_message, _LicenseGetResult_actions, _LicenseGetResult_actionMessages, _LicenseGetResult_order_reference, _LicenseGetResult_order, _LicenseGetResult_vendor_license_id, _LicenseGetResult_periodicity, _LicenseGetResult_periodicityCode, _LicenseGetResult_term, _LicenseGetResult_termCode, _LicenseGetResult_category, _LicenseGetResult_program, _LicenseGetResult_associatedSubscriptionProgram, _LicenseGetResult_price, _LicenseGetResult_arrowSubCategories;
|
|
13
|
+
var _LicenseGetResult_license_id, _LicenseGetResult_parent_license_id, _LicenseGetResult_friendlyName, _LicenseGetResult_customer_ref, _LicenseGetResult_state, _LicenseGetResult_statusCode, _LicenseGetResult_isTrial, _LicenseGetResult_isAddon, _LicenseGetResult_service_ref, _LicenseGetResult_sku, _LicenseGetResult_name, _LicenseGetResult_seats, _LicenseGetResult_activeSeats, _LicenseGetResult_security, _LicenseGetResult_activation_datetime, _LicenseGetResult_expiry_datetime, _LicenseGetResult_autoRenew, _LicenseGetResult_message, _LicenseGetResult_actions, _LicenseGetResult_actionMessages, _LicenseGetResult_order_reference, _LicenseGetResult_order, _LicenseGetResult_vendor_license_id, _LicenseGetResult_periodicity, _LicenseGetResult_periodicityCode, _LicenseGetResult_term, _LicenseGetResult_termCode, _LicenseGetResult_category, _LicenseGetResult_program, _LicenseGetResult_associatedSubscriptionProgram, _LicenseGetResult_price, _LicenseGetResult_arrowSubCategories;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.LicenseGetResult = exports.LicenseGetFields = void 0;
|
|
16
16
|
const actionsGetResult_1 = require("./actionsGetResult");
|
|
@@ -19,6 +19,7 @@ const orderGetResult_1 = require("./orderGetResult");
|
|
|
19
19
|
const licensePriceGetResult_1 = require("./licensePriceGetResult");
|
|
20
20
|
const abstractEntity_1 = require("../../../abstractEntity");
|
|
21
21
|
const activeSeatsFindResult_1 = require("../license/activeSeatsFindResult");
|
|
22
|
+
const securityFindResult_1 = require("../license/securityFindResult");
|
|
22
23
|
var LicenseGetFields;
|
|
23
24
|
(function (LicenseGetFields) {
|
|
24
25
|
LicenseGetFields["COLUMN_LICENSE_ID"] = "license_id";
|
|
@@ -52,6 +53,7 @@ var LicenseGetFields;
|
|
|
52
53
|
LicenseGetFields["COLUMN_ASSOCIATED_SUBSCRIPTION_PROGRAM"] = "associatedSubscriptionProgram";
|
|
53
54
|
LicenseGetFields["COLUMN_PRICE"] = "price";
|
|
54
55
|
LicenseGetFields["COLUMN_ARROW_SUB_CATEGORIES"] = "arrowSubCategories";
|
|
56
|
+
LicenseGetFields["COLUMN_SECURITY"] = "security";
|
|
55
57
|
})(LicenseGetFields = exports.LicenseGetFields || (exports.LicenseGetFields = {}));
|
|
56
58
|
class LicenseGetResult extends abstractEntity_1.AbstractEntity {
|
|
57
59
|
constructor(licenseGetDataInput) {
|
|
@@ -70,6 +72,7 @@ class LicenseGetResult extends abstractEntity_1.AbstractEntity {
|
|
|
70
72
|
_LicenseGetResult_name.set(this, void 0);
|
|
71
73
|
_LicenseGetResult_seats.set(this, void 0);
|
|
72
74
|
_LicenseGetResult_activeSeats.set(this, void 0);
|
|
75
|
+
_LicenseGetResult_security.set(this, void 0);
|
|
73
76
|
_LicenseGetResult_activation_datetime.set(this, void 0);
|
|
74
77
|
_LicenseGetResult_expiry_datetime.set(this, void 0);
|
|
75
78
|
_LicenseGetResult_autoRenew.set(this, void 0);
|
|
@@ -101,6 +104,9 @@ class LicenseGetResult extends abstractEntity_1.AbstractEntity {
|
|
|
101
104
|
__classPrivateFieldSet(this, _LicenseGetResult_name, licenseGetDataInput[LicenseGetFields.COLUMN_NAME], "f");
|
|
102
105
|
__classPrivateFieldSet(this, _LicenseGetResult_seats, licenseGetDataInput[LicenseGetFields.COLUMN_SEATS], "f");
|
|
103
106
|
__classPrivateFieldSet(this, _LicenseGetResult_activeSeats, new activeSeatsFindResult_1.ActiveSeatsFindResult(licenseGetDataInput[LicenseGetFields.COLUMN_ACTIVE_SEATS]), "f");
|
|
107
|
+
__classPrivateFieldSet(this, _LicenseGetResult_security, licenseGetDataInput[LicenseGetFields.COLUMN_SECURITY]
|
|
108
|
+
? new securityFindResult_1.SecurityFindResult(licenseGetDataInput[LicenseGetFields.COLUMN_SECURITY])
|
|
109
|
+
: undefined, "f");
|
|
104
110
|
__classPrivateFieldSet(this, _LicenseGetResult_activation_datetime, licenseGetDataInput[LicenseGetFields.COLUMN_ACTIVATION_DATETIME], "f");
|
|
105
111
|
__classPrivateFieldSet(this, _LicenseGetResult_expiry_datetime, licenseGetDataInput[LicenseGetFields.COLUMN_EXPIRY_DATETIME], "f");
|
|
106
112
|
__classPrivateFieldSet(this, _LicenseGetResult_autoRenew, licenseGetDataInput[LicenseGetFields.COLUMN_AUTO_RENEW], "f");
|
|
@@ -161,6 +167,9 @@ class LicenseGetResult extends abstractEntity_1.AbstractEntity {
|
|
|
161
167
|
get activeSeats() {
|
|
162
168
|
return __classPrivateFieldGet(this, _LicenseGetResult_activeSeats, "f");
|
|
163
169
|
}
|
|
170
|
+
get security() {
|
|
171
|
+
return __classPrivateFieldGet(this, _LicenseGetResult_security, "f");
|
|
172
|
+
}
|
|
164
173
|
get activationDatetime() {
|
|
165
174
|
return __classPrivateFieldGet(this, _LicenseGetResult_activation_datetime, "f");
|
|
166
175
|
}
|
|
@@ -216,7 +225,7 @@ class LicenseGetResult extends abstractEntity_1.AbstractEntity {
|
|
|
216
225
|
return __classPrivateFieldGet(this, _LicenseGetResult_arrowSubCategories, "f");
|
|
217
226
|
}
|
|
218
227
|
toJSON() {
|
|
219
|
-
var _a, _b;
|
|
228
|
+
var _a, _b, _c;
|
|
220
229
|
return {
|
|
221
230
|
[LicenseGetFields.COLUMN_LICENSE_ID]: this.id,
|
|
222
231
|
[LicenseGetFields.COLUMN_PARENT_LICENSE_ID]: this.parentLicenseId,
|
|
@@ -231,12 +240,13 @@ class LicenseGetResult extends abstractEntity_1.AbstractEntity {
|
|
|
231
240
|
[LicenseGetFields.COLUMN_NAME]: this.name,
|
|
232
241
|
[LicenseGetFields.COLUMN_SEATS]: this.seats,
|
|
233
242
|
[LicenseGetFields.COLUMN_ACTIVE_SEATS]: this.activeSeats.toJSON(),
|
|
243
|
+
[LicenseGetFields.COLUMN_SECURITY]: (_a = this.security) === null || _a === void 0 ? void 0 : _a.toJSON(),
|
|
234
244
|
[LicenseGetFields.COLUMN_ACTIVATION_DATETIME]: this.activationDatetime,
|
|
235
245
|
[LicenseGetFields.COLUMN_EXPIRY_DATETIME]: this.expiryDatetime,
|
|
236
246
|
[LicenseGetFields.COLUMN_AUTO_RENEW]: this.autoRenew,
|
|
237
247
|
[LicenseGetFields.COLUMN_MESSAGE]: this.message,
|
|
238
|
-
[LicenseGetFields.COLUMN_ACTIONS]: (
|
|
239
|
-
[LicenseGetFields.COLUMN_ACTION_MESSAGES]: (
|
|
248
|
+
[LicenseGetFields.COLUMN_ACTIONS]: (_b = this.actions) === null || _b === void 0 ? void 0 : _b.toJSON(),
|
|
249
|
+
[LicenseGetFields.COLUMN_ACTION_MESSAGES]: (_c = this.actionMessages) === null || _c === void 0 ? void 0 : _c.map((result) => result.toJSON()),
|
|
240
250
|
[LicenseGetFields.COLUMN_ORDER_REFERENCE]: this.orderReference,
|
|
241
251
|
[LicenseGetFields.COLUMN_ORDER]: this.order.toJSON(),
|
|
242
252
|
[LicenseGetFields.COLUMN_VENDOR_LICENSE_ID]: this.vendorLicenseId,
|
|
@@ -254,5 +264,5 @@ class LicenseGetResult extends abstractEntity_1.AbstractEntity {
|
|
|
254
264
|
}
|
|
255
265
|
}
|
|
256
266
|
exports.LicenseGetResult = LicenseGetResult;
|
|
257
|
-
_LicenseGetResult_license_id = new WeakMap(), _LicenseGetResult_parent_license_id = new WeakMap(), _LicenseGetResult_friendlyName = new WeakMap(), _LicenseGetResult_customer_ref = new WeakMap(), _LicenseGetResult_state = new WeakMap(), _LicenseGetResult_statusCode = new WeakMap(), _LicenseGetResult_isTrial = new WeakMap(), _LicenseGetResult_isAddon = new WeakMap(), _LicenseGetResult_service_ref = new WeakMap(), _LicenseGetResult_sku = new WeakMap(), _LicenseGetResult_name = new WeakMap(), _LicenseGetResult_seats = new WeakMap(), _LicenseGetResult_activeSeats = new WeakMap(), _LicenseGetResult_activation_datetime = new WeakMap(), _LicenseGetResult_expiry_datetime = new WeakMap(), _LicenseGetResult_autoRenew = new WeakMap(), _LicenseGetResult_message = new WeakMap(), _LicenseGetResult_actions = new WeakMap(), _LicenseGetResult_actionMessages = new WeakMap(), _LicenseGetResult_order_reference = new WeakMap(), _LicenseGetResult_order = new WeakMap(), _LicenseGetResult_vendor_license_id = new WeakMap(), _LicenseGetResult_periodicity = new WeakMap(), _LicenseGetResult_periodicityCode = new WeakMap(), _LicenseGetResult_term = new WeakMap(), _LicenseGetResult_termCode = new WeakMap(), _LicenseGetResult_category = new WeakMap(), _LicenseGetResult_program = new WeakMap(), _LicenseGetResult_associatedSubscriptionProgram = new WeakMap(), _LicenseGetResult_price = new WeakMap(), _LicenseGetResult_arrowSubCategories = new WeakMap();
|
|
267
|
+
_LicenseGetResult_license_id = new WeakMap(), _LicenseGetResult_parent_license_id = new WeakMap(), _LicenseGetResult_friendlyName = new WeakMap(), _LicenseGetResult_customer_ref = new WeakMap(), _LicenseGetResult_state = new WeakMap(), _LicenseGetResult_statusCode = new WeakMap(), _LicenseGetResult_isTrial = new WeakMap(), _LicenseGetResult_isAddon = new WeakMap(), _LicenseGetResult_service_ref = new WeakMap(), _LicenseGetResult_sku = new WeakMap(), _LicenseGetResult_name = new WeakMap(), _LicenseGetResult_seats = new WeakMap(), _LicenseGetResult_activeSeats = new WeakMap(), _LicenseGetResult_security = new WeakMap(), _LicenseGetResult_activation_datetime = new WeakMap(), _LicenseGetResult_expiry_datetime = new WeakMap(), _LicenseGetResult_autoRenew = new WeakMap(), _LicenseGetResult_message = new WeakMap(), _LicenseGetResult_actions = new WeakMap(), _LicenseGetResult_actionMessages = new WeakMap(), _LicenseGetResult_order_reference = new WeakMap(), _LicenseGetResult_order = new WeakMap(), _LicenseGetResult_vendor_license_id = new WeakMap(), _LicenseGetResult_periodicity = new WeakMap(), _LicenseGetResult_periodicityCode = new WeakMap(), _LicenseGetResult_term = new WeakMap(), _LicenseGetResult_termCode = new WeakMap(), _LicenseGetResult_category = new WeakMap(), _LicenseGetResult_program = new WeakMap(), _LicenseGetResult_associatedSubscriptionProgram = new WeakMap(), _LicenseGetResult_price = new WeakMap(), _LicenseGetResult_arrowSubCategories = new WeakMap();
|
|
258
268
|
//# sourceMappingURL=licenseGetResult.js.map
|
|
@@ -5,6 +5,7 @@ import { ConfigFindResult, ConfigFindResultData, ConfigFindResultDataFiltersPara
|
|
|
5
5
|
import { DataKeywords, FiltersParameters, SortParameters } from '../../licensesClient';
|
|
6
6
|
import { WarningFindResult, WarningFindResultData, WarningFindResultDataFiltersParameters, WarningFindResultDataKeywords, WarningFindResultDataSortParameters } from './warningFindResult';
|
|
7
7
|
import { PriceFindResult, PriceFindResultData, PriceFindResultDataFiltersParameters, PriceFindResultDataKeywords, PriceFindResutDataSortParameters } from './priceFindResult';
|
|
8
|
+
import { SecurityFindResult, SecurityFindResultData, SecurityFindResultDataFiltersParameters, SecurityFindResultDataKeywords, SecurityFindResultDataSortParameters } from './securityFindResult';
|
|
8
9
|
/**
|
|
9
10
|
* Highlight response object.
|
|
10
11
|
*/
|
|
@@ -41,6 +42,7 @@ export declare enum LicenseFindResultFields {
|
|
|
41
42
|
COLUMN_RESELLER_NAME = "reseller_name",
|
|
42
43
|
COLUMN_RESELLER_REF = "reseller_ref",
|
|
43
44
|
COLUMN_SEAT = "seat",
|
|
45
|
+
COLUMN_SECURITY = "security",
|
|
44
46
|
COLUMN_SERVICE_REF = "service_ref",
|
|
45
47
|
COLUMN_SKU = "sku",
|
|
46
48
|
COLUMN_START_DATE = "start_date",
|
|
@@ -87,6 +89,7 @@ export declare type LicenseFindResultData = {
|
|
|
87
89
|
[LicenseFindResultFields.COLUMN_RESELLER_NAME]: string;
|
|
88
90
|
[LicenseFindResultFields.COLUMN_RESELLER_REF]: string;
|
|
89
91
|
[LicenseFindResultFields.COLUMN_SEAT]: number;
|
|
92
|
+
[LicenseFindResultFields.COLUMN_SECURITY]: SecurityFindResultData | null;
|
|
90
93
|
[LicenseFindResultFields.COLUMN_SERVICE_REF]: string;
|
|
91
94
|
[LicenseFindResultFields.COLUMN_SKU]: string;
|
|
92
95
|
[LicenseFindResultFields.COLUMN_START_DATE]: string;
|
|
@@ -130,6 +133,7 @@ export declare type LicenceFindDataKeywords = {
|
|
|
130
133
|
[LicenseFindResultFields.COLUMN_RESELLER_NAME]?: DataKeywords;
|
|
131
134
|
[LicenseFindResultFields.COLUMN_RESELLER_REF]?: DataKeywords;
|
|
132
135
|
[LicenseFindResultFields.COLUMN_SEAT]?: DataKeywords;
|
|
136
|
+
[LicenseFindResultFields.COLUMN_SECURITY]?: SecurityFindResultDataKeywords;
|
|
133
137
|
[LicenseFindResultFields.COLUMN_SERVICE_REF]?: DataKeywords;
|
|
134
138
|
[LicenseFindResultFields.COLUMN_SKU]?: DataKeywords;
|
|
135
139
|
[LicenseFindResultFields.COLUMN_START_DATE]?: DataKeywords;
|
|
@@ -172,6 +176,7 @@ export declare type LicenceFindDataSortParameters = {
|
|
|
172
176
|
[LicenseFindResultFields.COLUMN_RESELLER_NAME]?: SortParameters;
|
|
173
177
|
[LicenseFindResultFields.COLUMN_RESELLER_REF]?: SortParameters;
|
|
174
178
|
[LicenseFindResultFields.COLUMN_SEAT]?: SortParameters;
|
|
179
|
+
[LicenseFindResultFields.COLUMN_SECURITY]?: SecurityFindResultDataSortParameters;
|
|
175
180
|
[LicenseFindResultFields.COLUMN_SERVICE_REF]?: SortParameters;
|
|
176
181
|
[LicenseFindResultFields.COLUMN_SKU]?: SortParameters;
|
|
177
182
|
[LicenseFindResultFields.COLUMN_START_DATE]?: SortParameters;
|
|
@@ -214,6 +219,7 @@ export declare type LicenceFindDataFiltersParameters = {
|
|
|
214
219
|
[LicenseFindResultFields.COLUMN_RESELLER_NAME]?: FiltersParameters;
|
|
215
220
|
[LicenseFindResultFields.COLUMN_RESELLER_REF]?: FiltersParameters;
|
|
216
221
|
[LicenseFindResultFields.COLUMN_SEAT]?: FiltersParameters;
|
|
222
|
+
[LicenseFindResultFields.COLUMN_SECURITY]?: SecurityFindResultDataFiltersParameters;
|
|
217
223
|
[LicenseFindResultFields.COLUMN_SERVICE_REF]?: FiltersParameters;
|
|
218
224
|
[LicenseFindResultFields.COLUMN_SKU]?: FiltersParameters;
|
|
219
225
|
[LicenseFindResultFields.COLUMN_START_DATE]?: FiltersParameters;
|
|
@@ -264,6 +270,7 @@ export declare class LicenseFindResult extends AbstractEntity<LicenseFindResultD
|
|
|
264
270
|
get resellerName(): string;
|
|
265
271
|
get resellerRef(): string;
|
|
266
272
|
get seat(): number;
|
|
273
|
+
get security(): SecurityFindResult;
|
|
267
274
|
get serviceRef(): string;
|
|
268
275
|
get sku(): string;
|
|
269
276
|
get startDate(): string;
|
|
@@ -10,7 +10,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
10
10
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
11
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
12
|
};
|
|
13
|
-
var _LicenseFindResult_acceptEula, _LicenseFindResult_activeSeats, _LicenseFindResult_autoRenew, _LicenseFindResult_baseSeat, _LicenseFindResult_category, _LicenseFindResult_classification, _LicenseFindResult_configs, _LicenseFindResult_warnings, _LicenseFindResult_customerName, _LicenseFindResult_customerRef, _LicenseFindResult_endDate, _LicenseFindResult_friendlyName, _LicenseFindResult_id, _LicenseFindResult_enabled, _LicenseFindResult_lastUpdate, _LicenseFindResult_marketplace, _LicenseFindResult_message, _LicenseFindResult_offer, _LicenseFindResult_parentLineId, _LicenseFindResult_parentOrderRef, _LicenseFindResult_partnerRef, _LicenseFindResult_periodicity, _LicenseFindResult_price, _LicenseFindResult_resellerName, _LicenseFindResult_resellerRef, _LicenseFindResult_seat, _LicenseFindResult_serviceRef, _LicenseFindResult_sku, _LicenseFindResult_startDate, _LicenseFindResult_statusCode, _LicenseFindResult_statusLabel, _LicenseFindResult_subscriptionId, _LicenseFindResult_subsidiaryName, _LicenseFindResult_term, _LicenseFindResult_trial, _LicenseFindResult_type, _LicenseFindResult_uom, _LicenseFindResult_vendorCode, _LicenseFindResult_vendorName, _LicenseFindResult_vendorSubscriptionId, _LicenseFindResult_highlight;
|
|
13
|
+
var _LicenseFindResult_acceptEula, _LicenseFindResult_activeSeats, _LicenseFindResult_autoRenew, _LicenseFindResult_baseSeat, _LicenseFindResult_category, _LicenseFindResult_classification, _LicenseFindResult_configs, _LicenseFindResult_warnings, _LicenseFindResult_customerName, _LicenseFindResult_customerRef, _LicenseFindResult_endDate, _LicenseFindResult_friendlyName, _LicenseFindResult_id, _LicenseFindResult_enabled, _LicenseFindResult_lastUpdate, _LicenseFindResult_marketplace, _LicenseFindResult_message, _LicenseFindResult_offer, _LicenseFindResult_parentLineId, _LicenseFindResult_parentOrderRef, _LicenseFindResult_partnerRef, _LicenseFindResult_periodicity, _LicenseFindResult_price, _LicenseFindResult_resellerName, _LicenseFindResult_resellerRef, _LicenseFindResult_seat, _LicenseFindResult_security, _LicenseFindResult_serviceRef, _LicenseFindResult_sku, _LicenseFindResult_startDate, _LicenseFindResult_statusCode, _LicenseFindResult_statusLabel, _LicenseFindResult_subscriptionId, _LicenseFindResult_subsidiaryName, _LicenseFindResult_term, _LicenseFindResult_trial, _LicenseFindResult_type, _LicenseFindResult_uom, _LicenseFindResult_vendorCode, _LicenseFindResult_vendorName, _LicenseFindResult_vendorSubscriptionId, _LicenseFindResult_highlight;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.LicenseFindResult = exports.LicenseFindResultFields = void 0;
|
|
16
16
|
const activeSeatsFindResult_1 = require("./activeSeatsFindResult");
|
|
@@ -18,6 +18,7 @@ const abstractEntity_1 = require("../../../abstractEntity");
|
|
|
18
18
|
const configFindResult_1 = require("./configFindResult");
|
|
19
19
|
const warningFindResult_1 = require("./warningFindResult");
|
|
20
20
|
const priceFindResult_1 = require("./priceFindResult");
|
|
21
|
+
const securityFindResult_1 = require("./securityFindResult");
|
|
21
22
|
/**
|
|
22
23
|
* Fields that can be present in License response and request data.
|
|
23
24
|
*/
|
|
@@ -49,6 +50,7 @@ var LicenseFindResultFields;
|
|
|
49
50
|
LicenseFindResultFields["COLUMN_RESELLER_NAME"] = "reseller_name";
|
|
50
51
|
LicenseFindResultFields["COLUMN_RESELLER_REF"] = "reseller_ref";
|
|
51
52
|
LicenseFindResultFields["COLUMN_SEAT"] = "seat";
|
|
53
|
+
LicenseFindResultFields["COLUMN_SECURITY"] = "security";
|
|
52
54
|
LicenseFindResultFields["COLUMN_SERVICE_REF"] = "service_ref";
|
|
53
55
|
LicenseFindResultFields["COLUMN_SKU"] = "sku";
|
|
54
56
|
LicenseFindResultFields["COLUMN_START_DATE"] = "start_date";
|
|
@@ -72,7 +74,7 @@ class LicenseFindResult extends abstractEntity_1.AbstractEntity {
|
|
|
72
74
|
* @param data - License find result data from the response.
|
|
73
75
|
*/
|
|
74
76
|
constructor(data) {
|
|
75
|
-
var _a, _b, _c;
|
|
77
|
+
var _a, _b, _c, _d;
|
|
76
78
|
super(data);
|
|
77
79
|
this.VALIDATION_RULES = {
|
|
78
80
|
[LicenseFindResultFields.COLUMN_ACCEPT_EULA]: 'present|boolean',
|
|
@@ -120,6 +122,7 @@ class LicenseFindResult extends abstractEntity_1.AbstractEntity {
|
|
|
120
122
|
_LicenseFindResult_resellerName.set(this, void 0);
|
|
121
123
|
_LicenseFindResult_resellerRef.set(this, void 0);
|
|
122
124
|
_LicenseFindResult_seat.set(this, void 0);
|
|
125
|
+
_LicenseFindResult_security.set(this, void 0);
|
|
123
126
|
_LicenseFindResult_serviceRef.set(this, void 0);
|
|
124
127
|
_LicenseFindResult_sku.set(this, void 0);
|
|
125
128
|
_LicenseFindResult_startDate.set(this, void 0);
|
|
@@ -172,6 +175,9 @@ class LicenseFindResult extends abstractEntity_1.AbstractEntity {
|
|
|
172
175
|
__classPrivateFieldSet(this, _LicenseFindResult_resellerName, data[LicenseFindResultFields.COLUMN_RESELLER_NAME], "f");
|
|
173
176
|
__classPrivateFieldSet(this, _LicenseFindResult_resellerRef, data[LicenseFindResultFields.COLUMN_RESELLER_REF], "f");
|
|
174
177
|
__classPrivateFieldSet(this, _LicenseFindResult_seat, data[LicenseFindResultFields.COLUMN_SEAT], "f");
|
|
178
|
+
__classPrivateFieldSet(this, _LicenseFindResult_security, new securityFindResult_1.SecurityFindResult({
|
|
179
|
+
[securityFindResult_1.SecurityFindResultFields.COLUMN_ACTIVE_FRAUD_EVENTS]: (_c = data === null || data === void 0 ? void 0 : data[LicenseFindResultFields.COLUMN_SECURITY]) === null || _c === void 0 ? void 0 : _c[securityFindResult_1.SecurityFindResultFields.COLUMN_ACTIVE_FRAUD_EVENTS],
|
|
180
|
+
}), "f");
|
|
175
181
|
__classPrivateFieldSet(this, _LicenseFindResult_serviceRef, data[LicenseFindResultFields.COLUMN_SERVICE_REF], "f");
|
|
176
182
|
__classPrivateFieldSet(this, _LicenseFindResult_sku, data[LicenseFindResultFields.COLUMN_SKU], "f");
|
|
177
183
|
__classPrivateFieldSet(this, _LicenseFindResult_startDate, data[LicenseFindResultFields.COLUMN_START_DATE], "f");
|
|
@@ -186,7 +192,7 @@ class LicenseFindResult extends abstractEntity_1.AbstractEntity {
|
|
|
186
192
|
__classPrivateFieldSet(this, _LicenseFindResult_vendorCode, data[LicenseFindResultFields.COLUMN_VENDOR_CODE], "f");
|
|
187
193
|
__classPrivateFieldSet(this, _LicenseFindResult_vendorName, data[LicenseFindResultFields.COLUMN_VENDOR_NAME], "f");
|
|
188
194
|
__classPrivateFieldSet(this, _LicenseFindResult_vendorSubscriptionId, data[LicenseFindResultFields.COLUMN_VENDOR_SUBSCRIPTION_ID], "f");
|
|
189
|
-
__classPrivateFieldSet(this, _LicenseFindResult_highlight, (
|
|
195
|
+
__classPrivateFieldSet(this, _LicenseFindResult_highlight, (_d = data[LicenseFindResultFields.COLUMN_HIGHLIGHT]) !== null && _d !== void 0 ? _d : {}, "f");
|
|
190
196
|
}
|
|
191
197
|
get id() {
|
|
192
198
|
return __classPrivateFieldGet(this, _LicenseFindResult_id, "f");
|
|
@@ -266,6 +272,9 @@ class LicenseFindResult extends abstractEntity_1.AbstractEntity {
|
|
|
266
272
|
get seat() {
|
|
267
273
|
return __classPrivateFieldGet(this, _LicenseFindResult_seat, "f");
|
|
268
274
|
}
|
|
275
|
+
get security() {
|
|
276
|
+
return __classPrivateFieldGet(this, _LicenseFindResult_security, "f");
|
|
277
|
+
}
|
|
269
278
|
get serviceRef() {
|
|
270
279
|
return __classPrivateFieldGet(this, _LicenseFindResult_serviceRef, "f");
|
|
271
280
|
}
|
|
@@ -344,6 +353,7 @@ class LicenseFindResult extends abstractEntity_1.AbstractEntity {
|
|
|
344
353
|
[LicenseFindResultFields.COLUMN_RESELLER_NAME]: this.resellerName,
|
|
345
354
|
[LicenseFindResultFields.COLUMN_RESELLER_REF]: this.resellerRef,
|
|
346
355
|
[LicenseFindResultFields.COLUMN_SEAT]: this.seat,
|
|
356
|
+
[LicenseFindResultFields.COLUMN_SECURITY]: this.security.toJSON(),
|
|
347
357
|
[LicenseFindResultFields.COLUMN_SERVICE_REF]: this.serviceRef,
|
|
348
358
|
[LicenseFindResultFields.COLUMN_SKU]: this.sku,
|
|
349
359
|
[LicenseFindResultFields.COLUMN_START_DATE]: this.startDate,
|
|
@@ -364,5 +374,5 @@ class LicenseFindResult extends abstractEntity_1.AbstractEntity {
|
|
|
364
374
|
}
|
|
365
375
|
}
|
|
366
376
|
exports.LicenseFindResult = LicenseFindResult;
|
|
367
|
-
_LicenseFindResult_acceptEula = new WeakMap(), _LicenseFindResult_activeSeats = new WeakMap(), _LicenseFindResult_autoRenew = new WeakMap(), _LicenseFindResult_baseSeat = new WeakMap(), _LicenseFindResult_category = new WeakMap(), _LicenseFindResult_classification = new WeakMap(), _LicenseFindResult_configs = new WeakMap(), _LicenseFindResult_warnings = new WeakMap(), _LicenseFindResult_customerName = new WeakMap(), _LicenseFindResult_customerRef = new WeakMap(), _LicenseFindResult_endDate = new WeakMap(), _LicenseFindResult_friendlyName = new WeakMap(), _LicenseFindResult_id = new WeakMap(), _LicenseFindResult_enabled = new WeakMap(), _LicenseFindResult_lastUpdate = new WeakMap(), _LicenseFindResult_marketplace = new WeakMap(), _LicenseFindResult_message = new WeakMap(), _LicenseFindResult_offer = new WeakMap(), _LicenseFindResult_parentLineId = new WeakMap(), _LicenseFindResult_parentOrderRef = new WeakMap(), _LicenseFindResult_partnerRef = new WeakMap(), _LicenseFindResult_periodicity = new WeakMap(), _LicenseFindResult_price = new WeakMap(), _LicenseFindResult_resellerName = new WeakMap(), _LicenseFindResult_resellerRef = new WeakMap(), _LicenseFindResult_seat = new WeakMap(), _LicenseFindResult_serviceRef = new WeakMap(), _LicenseFindResult_sku = new WeakMap(), _LicenseFindResult_startDate = new WeakMap(), _LicenseFindResult_statusCode = new WeakMap(), _LicenseFindResult_statusLabel = new WeakMap(), _LicenseFindResult_subscriptionId = new WeakMap(), _LicenseFindResult_subsidiaryName = new WeakMap(), _LicenseFindResult_term = new WeakMap(), _LicenseFindResult_trial = new WeakMap(), _LicenseFindResult_type = new WeakMap(), _LicenseFindResult_uom = new WeakMap(), _LicenseFindResult_vendorCode = new WeakMap(), _LicenseFindResult_vendorName = new WeakMap(), _LicenseFindResult_vendorSubscriptionId = new WeakMap(), _LicenseFindResult_highlight = new WeakMap();
|
|
377
|
+
_LicenseFindResult_acceptEula = new WeakMap(), _LicenseFindResult_activeSeats = new WeakMap(), _LicenseFindResult_autoRenew = new WeakMap(), _LicenseFindResult_baseSeat = new WeakMap(), _LicenseFindResult_category = new WeakMap(), _LicenseFindResult_classification = new WeakMap(), _LicenseFindResult_configs = new WeakMap(), _LicenseFindResult_warnings = new WeakMap(), _LicenseFindResult_customerName = new WeakMap(), _LicenseFindResult_customerRef = new WeakMap(), _LicenseFindResult_endDate = new WeakMap(), _LicenseFindResult_friendlyName = new WeakMap(), _LicenseFindResult_id = new WeakMap(), _LicenseFindResult_enabled = new WeakMap(), _LicenseFindResult_lastUpdate = new WeakMap(), _LicenseFindResult_marketplace = new WeakMap(), _LicenseFindResult_message = new WeakMap(), _LicenseFindResult_offer = new WeakMap(), _LicenseFindResult_parentLineId = new WeakMap(), _LicenseFindResult_parentOrderRef = new WeakMap(), _LicenseFindResult_partnerRef = new WeakMap(), _LicenseFindResult_periodicity = new WeakMap(), _LicenseFindResult_price = new WeakMap(), _LicenseFindResult_resellerName = new WeakMap(), _LicenseFindResult_resellerRef = new WeakMap(), _LicenseFindResult_seat = new WeakMap(), _LicenseFindResult_security = new WeakMap(), _LicenseFindResult_serviceRef = new WeakMap(), _LicenseFindResult_sku = new WeakMap(), _LicenseFindResult_startDate = new WeakMap(), _LicenseFindResult_statusCode = new WeakMap(), _LicenseFindResult_statusLabel = new WeakMap(), _LicenseFindResult_subscriptionId = new WeakMap(), _LicenseFindResult_subsidiaryName = new WeakMap(), _LicenseFindResult_term = new WeakMap(), _LicenseFindResult_trial = new WeakMap(), _LicenseFindResult_type = new WeakMap(), _LicenseFindResult_uom = new WeakMap(), _LicenseFindResult_vendorCode = new WeakMap(), _LicenseFindResult_vendorName = new WeakMap(), _LicenseFindResult_vendorSubscriptionId = new WeakMap(), _LicenseFindResult_highlight = new WeakMap();
|
|
368
378
|
//# sourceMappingURL=licenseFindResult.js.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../../abstractEntity';
|
|
2
|
+
import { DataKeywords, FiltersParameters, SortParameters } from '../../licensesClient';
|
|
3
|
+
export declare enum SecurityFindResultFields {
|
|
4
|
+
COLUMN_ACTIVE_FRAUD_EVENTS = "activeFraudEvents"
|
|
5
|
+
}
|
|
6
|
+
export declare type SecurityFindResultData = {
|
|
7
|
+
[SecurityFindResultFields.COLUMN_ACTIVE_FRAUD_EVENTS]?: number | null;
|
|
8
|
+
};
|
|
9
|
+
export declare type SecurityFindResultDataKeywords = {
|
|
10
|
+
[SecurityFindResultFields.COLUMN_ACTIVE_FRAUD_EVENTS]?: DataKeywords;
|
|
11
|
+
};
|
|
12
|
+
export declare type SecurityFindResultDataSortParameters = {
|
|
13
|
+
[SecurityFindResultFields.COLUMN_ACTIVE_FRAUD_EVENTS]?: SortParameters;
|
|
14
|
+
};
|
|
15
|
+
export declare type SecurityFindResultDataFiltersParameters = {
|
|
16
|
+
[SecurityFindResultFields.COLUMN_ACTIVE_FRAUD_EVENTS]?: FiltersParameters;
|
|
17
|
+
};
|
|
18
|
+
export declare class SecurityFindResult extends AbstractEntity<SecurityFindResultData> {
|
|
19
|
+
#private;
|
|
20
|
+
constructor(data: SecurityFindResultData);
|
|
21
|
+
get activeFraudEvents(): number | null | undefined;
|
|
22
|
+
toJSON(): SecurityFindResultData;
|
|
23
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
3
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
4
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
5
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
6
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
7
|
+
};
|
|
8
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
9
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
10
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
|
+
};
|
|
13
|
+
var _SecurityFindResult_activeFraudEvents;
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.SecurityFindResult = exports.SecurityFindResultFields = void 0;
|
|
16
|
+
const abstractEntity_1 = require("../../../abstractEntity");
|
|
17
|
+
var SecurityFindResultFields;
|
|
18
|
+
(function (SecurityFindResultFields) {
|
|
19
|
+
SecurityFindResultFields["COLUMN_ACTIVE_FRAUD_EVENTS"] = "activeFraudEvents";
|
|
20
|
+
})(SecurityFindResultFields = exports.SecurityFindResultFields || (exports.SecurityFindResultFields = {}));
|
|
21
|
+
class SecurityFindResult extends abstractEntity_1.AbstractEntity {
|
|
22
|
+
constructor(data) {
|
|
23
|
+
super(data);
|
|
24
|
+
_SecurityFindResult_activeFraudEvents.set(this, void 0);
|
|
25
|
+
__classPrivateFieldSet(this, _SecurityFindResult_activeFraudEvents, data[SecurityFindResultFields.COLUMN_ACTIVE_FRAUD_EVENTS], "f");
|
|
26
|
+
}
|
|
27
|
+
get activeFraudEvents() {
|
|
28
|
+
return __classPrivateFieldGet(this, _SecurityFindResult_activeFraudEvents, "f");
|
|
29
|
+
}
|
|
30
|
+
toJSON() {
|
|
31
|
+
return {
|
|
32
|
+
[SecurityFindResultFields.COLUMN_ACTIVE_FRAUD_EVENTS]: this
|
|
33
|
+
.activeFraudEvents,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.SecurityFindResult = SecurityFindResult;
|
|
38
|
+
_SecurityFindResult_activeFraudEvents = new WeakMap();
|
|
39
|
+
//# sourceMappingURL=securityFindResult.js.map
|
|
@@ -30,4 +30,5 @@ export * from './entities/offer/priceband/saleConstraintsFindResult';
|
|
|
30
30
|
export * from './entities/offer/priceband/identifiers/arrowsphereFindResult';
|
|
31
31
|
export * from './licenseRequestClient';
|
|
32
32
|
export * from './licensesClient';
|
|
33
|
+
export * from './entities/license/securityFindResult';
|
|
33
34
|
export * from './licensesEventClient';
|
package/build/licenses/index.js
CHANGED
|
@@ -46,5 +46,6 @@ __exportStar(require("./entities/offer/priceband/saleConstraintsFindResult"), ex
|
|
|
46
46
|
__exportStar(require("./entities/offer/priceband/identifiers/arrowsphereFindResult"), exports);
|
|
47
47
|
__exportStar(require("./licenseRequestClient"), exports);
|
|
48
48
|
__exportStar(require("./licensesClient"), exports);
|
|
49
|
+
__exportStar(require("./entities/license/securityFindResult"), exports);
|
|
49
50
|
__exportStar(require("./licensesEventClient"), exports);
|
|
50
51
|
//# sourceMappingURL=index.js.map
|
|
@@ -11,6 +11,7 @@ import { PriceFindResultDataKeywords, PriceFindResutDataSortParameters } from '.
|
|
|
11
11
|
import { OfferFindResultDataFiltersParameters, OfferFindResultDataKeywords, OfferFindResultDataSortParameters } from './entities/offer/offerFindResult';
|
|
12
12
|
import { ActionFlagsFindResultDataKeywords, ActionFlagsFindResultDataSortParameters } from './entities/offer/actionFlagsFindResult';
|
|
13
13
|
import { PriceBandFindResultDataKeywords, PriceBandFindResultDataSortParameters } from './entities/offer/priceBandFindResult';
|
|
14
|
+
import { SecurityFindResultDataKeywords, SecurityFindResultDataSortParameters } from './entities/license/securityFindResult';
|
|
14
15
|
import { GetResult } from '../getResult';
|
|
15
16
|
import { LicenseGetFields } from './entities/getLicense/licenseGetResult';
|
|
16
17
|
import { GetLicenseResult } from './entities/getResult/getLicenseResult';
|
|
@@ -112,6 +113,12 @@ export declare enum LicenseFindParameters {
|
|
|
112
113
|
*/
|
|
113
114
|
FILTERS_LTE = "lte"
|
|
114
115
|
}
|
|
116
|
+
export declare type BaseParameters<LicenseType, OfferType> = {
|
|
117
|
+
license?: LicenseType;
|
|
118
|
+
offer?: OfferType;
|
|
119
|
+
};
|
|
120
|
+
export declare type LicenseSortParameters = BaseParameters<LicenceFindDataSortParameters, OfferFindResultDataSortParameters>;
|
|
121
|
+
export declare type LicenseFiltersParameters = BaseParameters<LicenceFindDataFiltersParameters, OfferFindResultDataFiltersParameters>;
|
|
115
122
|
/**
|
|
116
123
|
* List of keywords to search with.
|
|
117
124
|
*/
|
|
@@ -127,21 +134,14 @@ export declare type LicenseKeywordsParameters = {
|
|
|
127
134
|
offer?: OfferFindResultDataKeywords;
|
|
128
135
|
};
|
|
129
136
|
export declare type LicenseRawKeywordsParametersLicence = {
|
|
130
|
-
[field: string]: DataKeywords | ActiveSeatsFindResultDataKeywords | ConfigFindResultDataKeywords | WarningFindResultDataKeywords | PriceFindResultDataKeywords | undefined;
|
|
137
|
+
[field: string]: DataKeywords | ActiveSeatsFindResultDataKeywords | ConfigFindResultDataKeywords | WarningFindResultDataKeywords | PriceFindResultDataKeywords | SecurityFindResultDataKeywords | undefined;
|
|
131
138
|
};
|
|
132
139
|
export declare type LicenseRawKeywordsParametersOffer = {
|
|
133
140
|
[field: string]: DataKeywords | ActionFlagsFindResultDataKeywords | PriceBandFindResultDataKeywords | undefined;
|
|
134
141
|
};
|
|
135
142
|
export declare type SortParameters = LicenseFindParameters.SORT_ASCENDING | LicenseFindParameters.SORT_DESCENDING;
|
|
136
|
-
/**
|
|
137
|
-
* Sort parameters to pass to the request
|
|
138
|
-
*/
|
|
139
|
-
export declare type LicenseSortParameters = {
|
|
140
|
-
license?: LicenceFindDataSortParameters;
|
|
141
|
-
offer?: OfferFindResultDataSortParameters;
|
|
142
|
-
};
|
|
143
143
|
export declare type LicenseRawSortParametersLicense = {
|
|
144
|
-
[field: string]: SortParameters | ActiveSeatsFindResultDataSortParameters | ConfigFindResultDataSortParameters | WarningFindResultDataSortParameters | PriceFindResutDataSortParameters | undefined;
|
|
144
|
+
[field: string]: SortParameters | ActiveSeatsFindResultDataSortParameters | ConfigFindResultDataSortParameters | WarningFindResultDataSortParameters | PriceFindResutDataSortParameters | SecurityFindResultDataSortParameters | undefined;
|
|
145
145
|
};
|
|
146
146
|
export declare type LicenseRawSortParametersOffer = {
|
|
147
147
|
[field: string]: SortParameters | ActionFlagsFindResultDataSortParameters | PriceBandFindResultDataSortParameters | undefined;
|
|
@@ -153,13 +153,6 @@ export declare type FiltersCompareValue = {
|
|
|
153
153
|
[LicenseFindParameters.FILTERS_LTE]?: string | number;
|
|
154
154
|
};
|
|
155
155
|
export declare type FiltersParameters = string | string[] | number | number[] | boolean | FiltersCompareValue;
|
|
156
|
-
/**
|
|
157
|
-
* Filter parameters to pass to the request.
|
|
158
|
-
*/
|
|
159
|
-
export declare type LicenseFiltersParameters = {
|
|
160
|
-
license?: LicenceFindDataFiltersParameters;
|
|
161
|
-
offer?: OfferFindResultDataFiltersParameters;
|
|
162
|
-
};
|
|
163
156
|
export declare type LicenseRawFiltersParameters = {
|
|
164
157
|
[field: string]: unknown;
|
|
165
158
|
};
|
|
@@ -278,4 +271,6 @@ export declare class LicensesClient extends AbstractRestfulClient {
|
|
|
278
271
|
getHistory(licenseReference: string, parameters?: Parameters): Promise<GetResult<LicenceHistoryResult>>;
|
|
279
272
|
cancelAutoRenew(licenseReference: string, payload?: PutCancelAutoRenew, parameters?: Parameters): Promise<void>;
|
|
280
273
|
reactivateAutoRenew(licenseReference: string, payload?: PutReactivateAutoRenew, parameters?: Parameters): Promise<void>;
|
|
274
|
+
private createFilters;
|
|
275
|
+
private createKeywords;
|
|
281
276
|
}
|
|
@@ -181,7 +181,6 @@ class LicensesClient extends abstractRestfulClient_1.AbstractRestfulClient {
|
|
|
181
181
|
*
|
|
182
182
|
*/
|
|
183
183
|
async find(postData = {}, perPage = 100, page = 1, parameters = {}) {
|
|
184
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
185
184
|
this.setPerPage(perPage);
|
|
186
185
|
this.setPage(page);
|
|
187
186
|
const rawLicensePayload = {
|
|
@@ -191,53 +190,29 @@ class LicensesClient extends abstractRestfulClient_1.AbstractRestfulClient {
|
|
|
191
190
|
if (postData.keywords) {
|
|
192
191
|
// Flatten with prefix for each type of keyword (license and offer)
|
|
193
192
|
rawLicensePayload.keywords = {
|
|
194
|
-
...
|
|
195
|
-
|
|
196
|
-
return acc;
|
|
197
|
-
}, {}),
|
|
198
|
-
...Object.entries((_b = postData.keywords.offer) !== null && _b !== void 0 ? _b : {}).reduce((acc, [keyword, value]) => {
|
|
199
|
-
acc[`offer.${keyword}`] = value;
|
|
200
|
-
return acc;
|
|
201
|
-
}, {}),
|
|
193
|
+
...this.createKeywords(postData.keywords, 'license'),
|
|
194
|
+
...this.createKeywords(postData.keywords, 'offer'),
|
|
202
195
|
};
|
|
203
196
|
}
|
|
204
197
|
if (postData.filters) {
|
|
205
198
|
// Flatten with prefix for each type of filter (license and offer)
|
|
206
199
|
rawLicensePayload.filters = {
|
|
207
|
-
...
|
|
208
|
-
|
|
209
|
-
return acc;
|
|
210
|
-
}, {}),
|
|
211
|
-
...Object.entries((_d = postData.filters.offer) !== null && _d !== void 0 ? _d : {}).reduce((acc, [filter, value]) => {
|
|
212
|
-
acc[`offer.${filter}`] = value;
|
|
213
|
-
return acc;
|
|
214
|
-
}, {}),
|
|
200
|
+
...this.createFilters(postData.filters, 'license'),
|
|
201
|
+
...this.createFilters(postData.filters, 'offer'),
|
|
215
202
|
};
|
|
216
203
|
}
|
|
217
204
|
if (postData.exclusionFilters) {
|
|
218
205
|
// Flatten with prefix for each type of filter (license and offer)
|
|
219
206
|
rawLicensePayload.exclusionFilters = {
|
|
220
|
-
...
|
|
221
|
-
|
|
222
|
-
return acc;
|
|
223
|
-
}, {}),
|
|
224
|
-
...Object.entries((_f = postData.exclusionFilters.offer) !== null && _f !== void 0 ? _f : {}).reduce((acc, [filter, value]) => {
|
|
225
|
-
acc[`offer.${filter}`] = value;
|
|
226
|
-
return acc;
|
|
227
|
-
}, {}),
|
|
207
|
+
...this.createFilters(postData.exclusionFilters, 'license'),
|
|
208
|
+
...this.createFilters(postData.exclusionFilters, 'offer'),
|
|
228
209
|
};
|
|
229
210
|
}
|
|
230
211
|
if (postData.sort) {
|
|
231
212
|
// Flatten with prefix for each type of sort keys (license and offer)
|
|
232
213
|
rawLicensePayload.sort = {
|
|
233
|
-
...
|
|
234
|
-
|
|
235
|
-
return acc;
|
|
236
|
-
}, {}),
|
|
237
|
-
...Object.entries((_h = postData.sort.offer) !== null && _h !== void 0 ? _h : {}).reduce((acc, [sort, value]) => {
|
|
238
|
-
acc[`offer.${sort}`] = value;
|
|
239
|
-
return acc;
|
|
240
|
-
}, {}),
|
|
214
|
+
...this.createFilters(postData.sort, 'license'),
|
|
215
|
+
...this.createFilters(postData.sort, 'offer'),
|
|
241
216
|
};
|
|
242
217
|
}
|
|
243
218
|
const response = await this.findRaw(rawLicensePayload, parameters);
|
|
@@ -302,6 +277,74 @@ class LicensesClient extends abstractRestfulClient_1.AbstractRestfulClient {
|
|
|
302
277
|
this.path = `/${licenseReference}${this.REACTIVATE_AUTO_RENEW_PATH}`;
|
|
303
278
|
return await this.put(payload, parameters);
|
|
304
279
|
}
|
|
280
|
+
createFilters(parameters, keyParent) {
|
|
281
|
+
let appropriateParameters;
|
|
282
|
+
if (typeof parameters === 'object') {
|
|
283
|
+
appropriateParameters = parameters[keyParent];
|
|
284
|
+
}
|
|
285
|
+
else {
|
|
286
|
+
appropriateParameters = parameters;
|
|
287
|
+
}
|
|
288
|
+
return Object.entries(typeof appropriateParameters === 'object'
|
|
289
|
+
? appropriateParameters
|
|
290
|
+
: {}).reduce((acc, [key, value]) => {
|
|
291
|
+
if (typeof value === 'object' && !Array.isArray(value)) {
|
|
292
|
+
const subAcc = Object.entries(value).reduce((generatedArr, [i, val]) => {
|
|
293
|
+
let recursiveArr;
|
|
294
|
+
const newKey = keyParent + '.' + key + '.' + i;
|
|
295
|
+
if (typeof val !== 'object') {
|
|
296
|
+
generatedArr[`${newKey}`] = val;
|
|
297
|
+
return generatedArr;
|
|
298
|
+
}
|
|
299
|
+
else {
|
|
300
|
+
recursiveArr = this.createFilters(val, newKey);
|
|
301
|
+
}
|
|
302
|
+
return Object.assign(generatedArr, recursiveArr);
|
|
303
|
+
}, {});
|
|
304
|
+
Object.assign(acc, subAcc);
|
|
305
|
+
}
|
|
306
|
+
else {
|
|
307
|
+
acc[`${keyParent}.${key}`] = value;
|
|
308
|
+
}
|
|
309
|
+
return acc;
|
|
310
|
+
}, {});
|
|
311
|
+
}
|
|
312
|
+
createKeywords(parameters, keyParent) {
|
|
313
|
+
let appropriateParameters;
|
|
314
|
+
if (typeof parameters === 'object') {
|
|
315
|
+
appropriateParameters =
|
|
316
|
+
keyParent === 'license' ? parameters.license : parameters.offer;
|
|
317
|
+
}
|
|
318
|
+
else {
|
|
319
|
+
appropriateParameters = parameters;
|
|
320
|
+
}
|
|
321
|
+
return Object.entries(appropriateParameters !== null && appropriateParameters !== undefined
|
|
322
|
+
? appropriateParameters
|
|
323
|
+
: {}).reduce((acc, [key, value]) => {
|
|
324
|
+
if (typeof value === 'object' &&
|
|
325
|
+
!Array.isArray(value) &&
|
|
326
|
+
!Object.prototype.hasOwnProperty.call(value, 'operator')) {
|
|
327
|
+
const subAcc = Object.entries(value).reduce((generatedArr, [i, val]) => {
|
|
328
|
+
let recursiveArr;
|
|
329
|
+
const newKey = keyParent + '.' + key + '.' + i;
|
|
330
|
+
if (typeof val !== 'object' ||
|
|
331
|
+
Object.prototype.hasOwnProperty.call(val, 'operator')) {
|
|
332
|
+
generatedArr[`${newKey}`] = val;
|
|
333
|
+
return generatedArr;
|
|
334
|
+
}
|
|
335
|
+
else {
|
|
336
|
+
recursiveArr = this.createKeywords(val, newKey);
|
|
337
|
+
}
|
|
338
|
+
return Object.assign(generatedArr, recursiveArr);
|
|
339
|
+
}, {});
|
|
340
|
+
Object.assign(acc, subAcc);
|
|
341
|
+
}
|
|
342
|
+
else {
|
|
343
|
+
acc[`${keyParent}.${key}`] = value;
|
|
344
|
+
}
|
|
345
|
+
return acc;
|
|
346
|
+
}, {});
|
|
347
|
+
}
|
|
305
348
|
}
|
|
306
349
|
exports.LicensesClient = LicensesClient;
|
|
307
350
|
//# sourceMappingURL=licensesClient.js.map
|
package/package.json
CHANGED