@arrowsphere/api-client 3.60.0-rc.zss.2 → 3.60.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 +5 -0
- package/build/licenses/entities/event/licenseEvent.d.ts +3 -2
- package/build/licenses/entities/event/licensesEventQueries.d.ts +92 -0
- package/build/licenses/entities/event/licensesEventQueries.js +61 -0
- package/build/licenses/entities/event/licensesEventSchemas.d.ts +8 -0
- package/build/licenses/entities/event/licensesEventSchemas.js +4 -0
- package/build/licenses/entities/license/licenseFindResult.d.ts +0 -7
- package/build/licenses/entities/license/licenseFindResult.js +4 -15
- package/build/licenses/index.d.ts +3 -0
- package/build/licenses/index.js +3 -0
- package/build/licenses/licensesClient.d.ts +16 -11
- package/build/licenses/licensesClient.js +33 -77
- package/build/licenses/licensesEventClient.d.ts +10 -0
- package/build/licenses/licensesEventClient.js +29 -0
- package/build/publicGraphQLClient.d.ts +2 -0
- package/build/publicGraphQLClient.js +6 -0
- package/package.json +1 -1
- package/build/licenses/entities/license/securityFindResult.d.ts +0 -23
- package/build/licenses/entities/license/securityFindResult.js +0 -39
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,11 @@
|
|
|
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.60.0] - 2023-12-31
|
|
7
|
+
|
|
8
|
+
### Changed
|
|
9
|
+
- add licenses get events
|
|
10
|
+
|
|
6
11
|
## [3.59.1] - 2023-10-26
|
|
7
12
|
|
|
8
13
|
### Changed
|
|
@@ -35,11 +35,11 @@ export interface LicenseEventPriceband {
|
|
|
35
35
|
export interface LicenseEventOffer {
|
|
36
36
|
arrowsphereSku: string;
|
|
37
37
|
name: string;
|
|
38
|
-
isManualProvisioning
|
|
38
|
+
isManualProvisioning?: boolean | null;
|
|
39
39
|
}
|
|
40
40
|
export interface LicenseEventQuantity {
|
|
41
41
|
current: number;
|
|
42
|
-
requested: number;
|
|
42
|
+
requested: number | null;
|
|
43
43
|
}
|
|
44
44
|
export interface LicenseEventUser {
|
|
45
45
|
name: string;
|
|
@@ -47,6 +47,7 @@ export interface LicenseEventUser {
|
|
|
47
47
|
}
|
|
48
48
|
export interface LicenseEventDetails {
|
|
49
49
|
message: string;
|
|
50
|
+
source: string | null;
|
|
50
51
|
}
|
|
51
52
|
export interface LicenseEvent {
|
|
52
53
|
id: number;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { LicenseEvent } from './licenseEvent';
|
|
2
|
+
import { LicensesEventPageSchema, LicensesEventInputSchema } from './licensesEventSchemas';
|
|
3
|
+
export declare enum LicensesEventSortDirection {
|
|
4
|
+
asc = "asc",
|
|
5
|
+
desc = "desc"
|
|
6
|
+
}
|
|
7
|
+
export declare enum LicensesEventInputPaginationField {
|
|
8
|
+
PAGE = "page",
|
|
9
|
+
PER_PAGE = "perPage"
|
|
10
|
+
}
|
|
11
|
+
export declare type LicensesEventInputPaginationType = {
|
|
12
|
+
[LicensesEventInputPaginationField.PAGE]?: number;
|
|
13
|
+
[LicensesEventInputPaginationField.PER_PAGE]?: number;
|
|
14
|
+
};
|
|
15
|
+
export declare enum LicensesEventGetEventsQueryField {
|
|
16
|
+
ARGS = "__args",
|
|
17
|
+
EVENTS = "events",
|
|
18
|
+
PAGINATE = "paginate"
|
|
19
|
+
}
|
|
20
|
+
export declare enum LicensesEventGetEventsResponseField {
|
|
21
|
+
DATA = "__args",
|
|
22
|
+
EVENTS = "events",
|
|
23
|
+
PAGINATION = "pagination"
|
|
24
|
+
}
|
|
25
|
+
export declare enum LicensesEventDataField {
|
|
26
|
+
EVENT = "event"
|
|
27
|
+
}
|
|
28
|
+
export declare enum LicensesEventPaginationField {
|
|
29
|
+
CURRENT_PAGE = "currentPage",
|
|
30
|
+
PER_PAGE = "perPage",
|
|
31
|
+
TOTAL = "total",
|
|
32
|
+
TOTAL_PAGE = "totalPage"
|
|
33
|
+
}
|
|
34
|
+
export declare type LicensesEventPageType = {
|
|
35
|
+
[LicensesEventPaginationField.CURRENT_PAGE]?: number;
|
|
36
|
+
[LicensesEventPaginationField.PER_PAGE]?: number;
|
|
37
|
+
[LicensesEventPaginationField.TOTAL]?: number;
|
|
38
|
+
[LicensesEventPaginationField.TOTAL_PAGE]?: number;
|
|
39
|
+
};
|
|
40
|
+
export declare enum LicensesEventInputSortField {
|
|
41
|
+
ORDER = "order",
|
|
42
|
+
NAME = "name"
|
|
43
|
+
}
|
|
44
|
+
export declare type LicensesEventInputSortType = {
|
|
45
|
+
[LicensesEventInputSortField.ORDER]?: LicensesEventSortDirection;
|
|
46
|
+
[LicensesEventInputSortField.NAME]?: string;
|
|
47
|
+
};
|
|
48
|
+
export declare enum LicensesEventQueryArgumentField {
|
|
49
|
+
SEARCH_BODY = "searchBody",
|
|
50
|
+
PAGINATE = "paginate"
|
|
51
|
+
}
|
|
52
|
+
export declare enum LicensesEventInputFiltersField {
|
|
53
|
+
NAMES = "names",
|
|
54
|
+
VALUES = "values"
|
|
55
|
+
}
|
|
56
|
+
export declare type LicensesEventInputFiltersType = {
|
|
57
|
+
[LicensesEventInputFiltersField.NAMES]?: string;
|
|
58
|
+
[LicensesEventInputFiltersField.VALUES]?: string | string[];
|
|
59
|
+
};
|
|
60
|
+
export declare enum LicensesEvenInputSearchBodyField {
|
|
61
|
+
FILTERS = "filters",
|
|
62
|
+
SORT = "sort"
|
|
63
|
+
}
|
|
64
|
+
export declare type LicensesEventInputSearchBodyType = {
|
|
65
|
+
[LicensesEvenInputSearchBodyField.FILTERS]?: LicensesEventInputFiltersType[];
|
|
66
|
+
[LicensesEvenInputSearchBodyField.SORT]?: LicensesEventInputSortType[];
|
|
67
|
+
};
|
|
68
|
+
export declare type LicensesEventQueryArgumentsType = {
|
|
69
|
+
[LicensesEventQueryArgumentField.SEARCH_BODY]?: LicensesEventInputSearchBodyType;
|
|
70
|
+
[LicensesEventQueryArgumentField.PAGINATE]?: LicensesEventInputPaginationType;
|
|
71
|
+
};
|
|
72
|
+
export declare enum LicensesEventQueries {
|
|
73
|
+
GET_EVENTS = "getEvents"
|
|
74
|
+
}
|
|
75
|
+
export declare type LicensesEventGetEventsQueryType = {
|
|
76
|
+
[LicensesEventQueries.GET_EVENTS]: {
|
|
77
|
+
[LicensesEventGetEventsQueryField.ARGS]?: LicensesEventQueryArgumentsType;
|
|
78
|
+
[LicensesEventGetEventsResponseField.EVENTS]: LicensesEventInputSchema;
|
|
79
|
+
[LicensesEventGetEventsResponseField.PAGINATION]?: LicensesEventPageSchema;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
export declare type LicensesEventGetEventsResponseType = {
|
|
83
|
+
[LicensesEventGetEventsResponseField.DATA]: {
|
|
84
|
+
[LicensesEventQueries.GET_EVENTS]?: {
|
|
85
|
+
[LicensesEventGetEventsQueryField.EVENTS]?: LicensesEventGetEventsResponseDataType[];
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
[LicensesEventGetEventsResponseField.PAGINATION]?: LicensesEventPageType;
|
|
89
|
+
};
|
|
90
|
+
export declare type LicensesEventGetEventsResponseDataType = {
|
|
91
|
+
[LicensesEventDataField.EVENT]?: LicenseEvent;
|
|
92
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LicensesEventQueries = exports.LicensesEvenInputSearchBodyField = exports.LicensesEventInputFiltersField = exports.LicensesEventQueryArgumentField = exports.LicensesEventInputSortField = exports.LicensesEventPaginationField = exports.LicensesEventDataField = exports.LicensesEventGetEventsResponseField = exports.LicensesEventGetEventsQueryField = exports.LicensesEventInputPaginationField = exports.LicensesEventSortDirection = void 0;
|
|
4
|
+
var LicensesEventSortDirection;
|
|
5
|
+
(function (LicensesEventSortDirection) {
|
|
6
|
+
LicensesEventSortDirection["asc"] = "asc";
|
|
7
|
+
LicensesEventSortDirection["desc"] = "desc";
|
|
8
|
+
})(LicensesEventSortDirection = exports.LicensesEventSortDirection || (exports.LicensesEventSortDirection = {}));
|
|
9
|
+
var LicensesEventInputPaginationField;
|
|
10
|
+
(function (LicensesEventInputPaginationField) {
|
|
11
|
+
LicensesEventInputPaginationField["PAGE"] = "page";
|
|
12
|
+
LicensesEventInputPaginationField["PER_PAGE"] = "perPage";
|
|
13
|
+
})(LicensesEventInputPaginationField = exports.LicensesEventInputPaginationField || (exports.LicensesEventInputPaginationField = {}));
|
|
14
|
+
var LicensesEventGetEventsQueryField;
|
|
15
|
+
(function (LicensesEventGetEventsQueryField) {
|
|
16
|
+
LicensesEventGetEventsQueryField["ARGS"] = "__args";
|
|
17
|
+
LicensesEventGetEventsQueryField["EVENTS"] = "events";
|
|
18
|
+
LicensesEventGetEventsQueryField["PAGINATE"] = "paginate";
|
|
19
|
+
})(LicensesEventGetEventsQueryField = exports.LicensesEventGetEventsQueryField || (exports.LicensesEventGetEventsQueryField = {}));
|
|
20
|
+
var LicensesEventGetEventsResponseField;
|
|
21
|
+
(function (LicensesEventGetEventsResponseField) {
|
|
22
|
+
LicensesEventGetEventsResponseField["DATA"] = "__args";
|
|
23
|
+
LicensesEventGetEventsResponseField["EVENTS"] = "events";
|
|
24
|
+
LicensesEventGetEventsResponseField["PAGINATION"] = "pagination";
|
|
25
|
+
})(LicensesEventGetEventsResponseField = exports.LicensesEventGetEventsResponseField || (exports.LicensesEventGetEventsResponseField = {}));
|
|
26
|
+
var LicensesEventDataField;
|
|
27
|
+
(function (LicensesEventDataField) {
|
|
28
|
+
LicensesEventDataField["EVENT"] = "event";
|
|
29
|
+
})(LicensesEventDataField = exports.LicensesEventDataField || (exports.LicensesEventDataField = {}));
|
|
30
|
+
var LicensesEventPaginationField;
|
|
31
|
+
(function (LicensesEventPaginationField) {
|
|
32
|
+
LicensesEventPaginationField["CURRENT_PAGE"] = "currentPage";
|
|
33
|
+
LicensesEventPaginationField["PER_PAGE"] = "perPage";
|
|
34
|
+
LicensesEventPaginationField["TOTAL"] = "total";
|
|
35
|
+
LicensesEventPaginationField["TOTAL_PAGE"] = "totalPage";
|
|
36
|
+
})(LicensesEventPaginationField = exports.LicensesEventPaginationField || (exports.LicensesEventPaginationField = {}));
|
|
37
|
+
var LicensesEventInputSortField;
|
|
38
|
+
(function (LicensesEventInputSortField) {
|
|
39
|
+
LicensesEventInputSortField["ORDER"] = "order";
|
|
40
|
+
LicensesEventInputSortField["NAME"] = "name";
|
|
41
|
+
})(LicensesEventInputSortField = exports.LicensesEventInputSortField || (exports.LicensesEventInputSortField = {}));
|
|
42
|
+
var LicensesEventQueryArgumentField;
|
|
43
|
+
(function (LicensesEventQueryArgumentField) {
|
|
44
|
+
LicensesEventQueryArgumentField["SEARCH_BODY"] = "searchBody";
|
|
45
|
+
LicensesEventQueryArgumentField["PAGINATE"] = "paginate";
|
|
46
|
+
})(LicensesEventQueryArgumentField = exports.LicensesEventQueryArgumentField || (exports.LicensesEventQueryArgumentField = {}));
|
|
47
|
+
var LicensesEventInputFiltersField;
|
|
48
|
+
(function (LicensesEventInputFiltersField) {
|
|
49
|
+
LicensesEventInputFiltersField["NAMES"] = "names";
|
|
50
|
+
LicensesEventInputFiltersField["VALUES"] = "values";
|
|
51
|
+
})(LicensesEventInputFiltersField = exports.LicensesEventInputFiltersField || (exports.LicensesEventInputFiltersField = {}));
|
|
52
|
+
var LicensesEvenInputSearchBodyField;
|
|
53
|
+
(function (LicensesEvenInputSearchBodyField) {
|
|
54
|
+
LicensesEvenInputSearchBodyField["FILTERS"] = "filters";
|
|
55
|
+
LicensesEvenInputSearchBodyField["SORT"] = "sort";
|
|
56
|
+
})(LicensesEvenInputSearchBodyField = exports.LicensesEvenInputSearchBodyField || (exports.LicensesEvenInputSearchBodyField = {}));
|
|
57
|
+
var LicensesEventQueries;
|
|
58
|
+
(function (LicensesEventQueries) {
|
|
59
|
+
LicensesEventQueries["GET_EVENTS"] = "getEvents";
|
|
60
|
+
})(LicensesEventQueries = exports.LicensesEventQueries || (exports.LicensesEventQueries = {}));
|
|
61
|
+
//# sourceMappingURL=licensesEventQueries.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Schema } from 'type-fest';
|
|
2
|
+
import { LicenseEvent } from './licenseEvent';
|
|
3
|
+
import { LicensesEventDataField, LicensesEventPageType } from './licensesEventQueries';
|
|
4
|
+
export declare type LicensesEventSchema = Schema<LicenseEvent, boolean>;
|
|
5
|
+
export declare type LicensesEventPageSchema = Schema<LicensesEventPageType, boolean>;
|
|
6
|
+
export declare type LicensesEventInputSchema = {
|
|
7
|
+
[LicensesEventDataField.EVENT]?: LicensesEventSchema;
|
|
8
|
+
};
|
|
@@ -5,7 +5,6 @@ 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';
|
|
9
8
|
/**
|
|
10
9
|
* Highlight response object.
|
|
11
10
|
*/
|
|
@@ -42,7 +41,6 @@ export declare enum LicenseFindResultFields {
|
|
|
42
41
|
COLUMN_RESELLER_NAME = "reseller_name",
|
|
43
42
|
COLUMN_RESELLER_REF = "reseller_ref",
|
|
44
43
|
COLUMN_SEAT = "seat",
|
|
45
|
-
COLUMN_SECURITY = "security",
|
|
46
44
|
COLUMN_SERVICE_REF = "service_ref",
|
|
47
45
|
COLUMN_SKU = "sku",
|
|
48
46
|
COLUMN_START_DATE = "start_date",
|
|
@@ -89,7 +87,6 @@ export declare type LicenseFindResultData = {
|
|
|
89
87
|
[LicenseFindResultFields.COLUMN_RESELLER_NAME]: string;
|
|
90
88
|
[LicenseFindResultFields.COLUMN_RESELLER_REF]: string;
|
|
91
89
|
[LicenseFindResultFields.COLUMN_SEAT]: number;
|
|
92
|
-
[LicenseFindResultFields.COLUMN_SECURITY]: SecurityFindResultData | null;
|
|
93
90
|
[LicenseFindResultFields.COLUMN_SERVICE_REF]: string;
|
|
94
91
|
[LicenseFindResultFields.COLUMN_SKU]: string;
|
|
95
92
|
[LicenseFindResultFields.COLUMN_START_DATE]: string;
|
|
@@ -133,7 +130,6 @@ export declare type LicenceFindDataKeywords = {
|
|
|
133
130
|
[LicenseFindResultFields.COLUMN_RESELLER_NAME]?: DataKeywords;
|
|
134
131
|
[LicenseFindResultFields.COLUMN_RESELLER_REF]?: DataKeywords;
|
|
135
132
|
[LicenseFindResultFields.COLUMN_SEAT]?: DataKeywords;
|
|
136
|
-
[LicenseFindResultFields.COLUMN_SECURITY]?: SecurityFindResultDataKeywords | undefined;
|
|
137
133
|
[LicenseFindResultFields.COLUMN_SERVICE_REF]?: DataKeywords;
|
|
138
134
|
[LicenseFindResultFields.COLUMN_SKU]?: DataKeywords;
|
|
139
135
|
[LicenseFindResultFields.COLUMN_START_DATE]?: DataKeywords;
|
|
@@ -176,7 +172,6 @@ export declare type LicenceFindDataSortParameters = {
|
|
|
176
172
|
[LicenseFindResultFields.COLUMN_RESELLER_NAME]?: SortParameters;
|
|
177
173
|
[LicenseFindResultFields.COLUMN_RESELLER_REF]?: SortParameters;
|
|
178
174
|
[LicenseFindResultFields.COLUMN_SEAT]?: SortParameters;
|
|
179
|
-
[LicenseFindResultFields.COLUMN_SECURITY]?: SecurityFindResultDataSortParameters | undefined;
|
|
180
175
|
[LicenseFindResultFields.COLUMN_SERVICE_REF]?: SortParameters;
|
|
181
176
|
[LicenseFindResultFields.COLUMN_SKU]?: SortParameters;
|
|
182
177
|
[LicenseFindResultFields.COLUMN_START_DATE]?: SortParameters;
|
|
@@ -219,7 +214,6 @@ export declare type LicenceFindDataFiltersParameters = {
|
|
|
219
214
|
[LicenseFindResultFields.COLUMN_RESELLER_NAME]?: FiltersParameters;
|
|
220
215
|
[LicenseFindResultFields.COLUMN_RESELLER_REF]?: FiltersParameters;
|
|
221
216
|
[LicenseFindResultFields.COLUMN_SEAT]?: FiltersParameters;
|
|
222
|
-
[LicenseFindResultFields.COLUMN_SECURITY]?: SecurityFindResultDataFiltersParameters | undefined;
|
|
223
217
|
[LicenseFindResultFields.COLUMN_SERVICE_REF]?: FiltersParameters;
|
|
224
218
|
[LicenseFindResultFields.COLUMN_SKU]?: FiltersParameters;
|
|
225
219
|
[LicenseFindResultFields.COLUMN_START_DATE]?: FiltersParameters;
|
|
@@ -270,7 +264,6 @@ export declare class LicenseFindResult extends AbstractEntity<LicenseFindResultD
|
|
|
270
264
|
get resellerName(): string;
|
|
271
265
|
get resellerRef(): string;
|
|
272
266
|
get seat(): number;
|
|
273
|
-
get security(): SecurityFindResult;
|
|
274
267
|
get serviceRef(): string;
|
|
275
268
|
get sku(): string;
|
|
276
269
|
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,
|
|
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;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.LicenseFindResult = exports.LicenseFindResultFields = void 0;
|
|
16
16
|
const activeSeatsFindResult_1 = require("./activeSeatsFindResult");
|
|
@@ -18,7 +18,6 @@ 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");
|
|
22
21
|
/**
|
|
23
22
|
* Fields that can be present in License response and request data.
|
|
24
23
|
*/
|
|
@@ -50,7 +49,6 @@ var LicenseFindResultFields;
|
|
|
50
49
|
LicenseFindResultFields["COLUMN_RESELLER_NAME"] = "reseller_name";
|
|
51
50
|
LicenseFindResultFields["COLUMN_RESELLER_REF"] = "reseller_ref";
|
|
52
51
|
LicenseFindResultFields["COLUMN_SEAT"] = "seat";
|
|
53
|
-
LicenseFindResultFields["COLUMN_SECURITY"] = "security";
|
|
54
52
|
LicenseFindResultFields["COLUMN_SERVICE_REF"] = "service_ref";
|
|
55
53
|
LicenseFindResultFields["COLUMN_SKU"] = "sku";
|
|
56
54
|
LicenseFindResultFields["COLUMN_START_DATE"] = "start_date";
|
|
@@ -74,7 +72,7 @@ class LicenseFindResult extends abstractEntity_1.AbstractEntity {
|
|
|
74
72
|
* @param data - License find result data from the response.
|
|
75
73
|
*/
|
|
76
74
|
constructor(data) {
|
|
77
|
-
var _a, _b, _c
|
|
75
|
+
var _a, _b, _c;
|
|
78
76
|
super(data);
|
|
79
77
|
this.VALIDATION_RULES = {
|
|
80
78
|
[LicenseFindResultFields.COLUMN_ACCEPT_EULA]: 'present|boolean',
|
|
@@ -122,7 +120,6 @@ class LicenseFindResult extends abstractEntity_1.AbstractEntity {
|
|
|
122
120
|
_LicenseFindResult_resellerName.set(this, void 0);
|
|
123
121
|
_LicenseFindResult_resellerRef.set(this, void 0);
|
|
124
122
|
_LicenseFindResult_seat.set(this, void 0);
|
|
125
|
-
_LicenseFindResult_security.set(this, void 0);
|
|
126
123
|
_LicenseFindResult_serviceRef.set(this, void 0);
|
|
127
124
|
_LicenseFindResult_sku.set(this, void 0);
|
|
128
125
|
_LicenseFindResult_startDate.set(this, void 0);
|
|
@@ -175,10 +172,6 @@ class LicenseFindResult extends abstractEntity_1.AbstractEntity {
|
|
|
175
172
|
__classPrivateFieldSet(this, _LicenseFindResult_resellerName, data[LicenseFindResultFields.COLUMN_RESELLER_NAME], "f");
|
|
176
173
|
__classPrivateFieldSet(this, _LicenseFindResult_resellerRef, data[LicenseFindResultFields.COLUMN_RESELLER_REF], "f");
|
|
177
174
|
__classPrivateFieldSet(this, _LicenseFindResult_seat, data[LicenseFindResultFields.COLUMN_SEAT], "f");
|
|
178
|
-
const security = {
|
|
179
|
-
[securityFindResult_1.SecurityFindResultFields.COLUMN_ACTIVE_FRAUD_EVENTS]: (_d = (_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]) !== null && _d !== void 0 ? _d : null,
|
|
180
|
-
};
|
|
181
|
-
__classPrivateFieldSet(this, _LicenseFindResult_security, new securityFindResult_1.SecurityFindResult(security), "f");
|
|
182
175
|
__classPrivateFieldSet(this, _LicenseFindResult_serviceRef, data[LicenseFindResultFields.COLUMN_SERVICE_REF], "f");
|
|
183
176
|
__classPrivateFieldSet(this, _LicenseFindResult_sku, data[LicenseFindResultFields.COLUMN_SKU], "f");
|
|
184
177
|
__classPrivateFieldSet(this, _LicenseFindResult_startDate, data[LicenseFindResultFields.COLUMN_START_DATE], "f");
|
|
@@ -193,7 +186,7 @@ class LicenseFindResult extends abstractEntity_1.AbstractEntity {
|
|
|
193
186
|
__classPrivateFieldSet(this, _LicenseFindResult_vendorCode, data[LicenseFindResultFields.COLUMN_VENDOR_CODE], "f");
|
|
194
187
|
__classPrivateFieldSet(this, _LicenseFindResult_vendorName, data[LicenseFindResultFields.COLUMN_VENDOR_NAME], "f");
|
|
195
188
|
__classPrivateFieldSet(this, _LicenseFindResult_vendorSubscriptionId, data[LicenseFindResultFields.COLUMN_VENDOR_SUBSCRIPTION_ID], "f");
|
|
196
|
-
__classPrivateFieldSet(this, _LicenseFindResult_highlight, (
|
|
189
|
+
__classPrivateFieldSet(this, _LicenseFindResult_highlight, (_c = data[LicenseFindResultFields.COLUMN_HIGHLIGHT]) !== null && _c !== void 0 ? _c : {}, "f");
|
|
197
190
|
}
|
|
198
191
|
get id() {
|
|
199
192
|
return __classPrivateFieldGet(this, _LicenseFindResult_id, "f");
|
|
@@ -273,9 +266,6 @@ class LicenseFindResult extends abstractEntity_1.AbstractEntity {
|
|
|
273
266
|
get seat() {
|
|
274
267
|
return __classPrivateFieldGet(this, _LicenseFindResult_seat, "f");
|
|
275
268
|
}
|
|
276
|
-
get security() {
|
|
277
|
-
return __classPrivateFieldGet(this, _LicenseFindResult_security, "f");
|
|
278
|
-
}
|
|
279
269
|
get serviceRef() {
|
|
280
270
|
return __classPrivateFieldGet(this, _LicenseFindResult_serviceRef, "f");
|
|
281
271
|
}
|
|
@@ -354,7 +344,6 @@ class LicenseFindResult extends abstractEntity_1.AbstractEntity {
|
|
|
354
344
|
[LicenseFindResultFields.COLUMN_RESELLER_NAME]: this.resellerName,
|
|
355
345
|
[LicenseFindResultFields.COLUMN_RESELLER_REF]: this.resellerRef,
|
|
356
346
|
[LicenseFindResultFields.COLUMN_SEAT]: this.seat,
|
|
357
|
-
[LicenseFindResultFields.COLUMN_SECURITY]: this.security.toJSON(),
|
|
358
347
|
[LicenseFindResultFields.COLUMN_SERVICE_REF]: this.serviceRef,
|
|
359
348
|
[LicenseFindResultFields.COLUMN_SKU]: this.sku,
|
|
360
349
|
[LicenseFindResultFields.COLUMN_START_DATE]: this.startDate,
|
|
@@ -375,5 +364,5 @@ class LicenseFindResult extends abstractEntity_1.AbstractEntity {
|
|
|
375
364
|
}
|
|
376
365
|
}
|
|
377
366
|
exports.LicenseFindResult = LicenseFindResult;
|
|
378
|
-
_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(),
|
|
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();
|
|
379
368
|
//# sourceMappingURL=licenseFindResult.js.map
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export * from './entities/event/licenseEvent';
|
|
2
2
|
export * from './entities/event/licenseEventGraphQL';
|
|
3
|
+
export * from './entities/event/licensesEventQueries';
|
|
4
|
+
export * from './entities/event/licensesEventSchemas';
|
|
3
5
|
export * from './entities/filterFindResult';
|
|
4
6
|
export * from './entities/findResult';
|
|
5
7
|
export * from './entities/getLicense/actionMessagesGetResult';
|
|
@@ -26,3 +28,4 @@ export * from './entities/offer/priceband/priceBandPriceFindResult';
|
|
|
26
28
|
export * from './entities/offer/priceband/saleConstraintsFindResult';
|
|
27
29
|
export * from './entities/offer/priceband/identifiers/arrowsphereFindResult';
|
|
28
30
|
export * from './licensesClient';
|
|
31
|
+
export * from './licensesEventClient';
|
package/build/licenses/index.js
CHANGED
|
@@ -16,6 +16,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./entities/event/licenseEvent"), exports);
|
|
18
18
|
__exportStar(require("./entities/event/licenseEventGraphQL"), exports);
|
|
19
|
+
__exportStar(require("./entities/event/licensesEventQueries"), exports);
|
|
20
|
+
__exportStar(require("./entities/event/licensesEventSchemas"), exports);
|
|
19
21
|
__exportStar(require("./entities/filterFindResult"), exports);
|
|
20
22
|
__exportStar(require("./entities/findResult"), exports);
|
|
21
23
|
__exportStar(require("./entities/getLicense/actionMessagesGetResult"), exports);
|
|
@@ -42,4 +44,5 @@ __exportStar(require("./entities/offer/priceband/priceBandPriceFindResult"), exp
|
|
|
42
44
|
__exportStar(require("./entities/offer/priceband/saleConstraintsFindResult"), exports);
|
|
43
45
|
__exportStar(require("./entities/offer/priceband/identifiers/arrowsphereFindResult"), exports);
|
|
44
46
|
__exportStar(require("./licensesClient"), exports);
|
|
47
|
+
__exportStar(require("./licensesEventClient"), exports);
|
|
45
48
|
//# sourceMappingURL=index.js.map
|
|
@@ -11,7 +11,6 @@ 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';
|
|
15
14
|
import { GetResult } from '../getResult';
|
|
16
15
|
import { LicenseGetFields } from './entities/getLicense/licenseGetResult';
|
|
17
16
|
import { GetLicenseResult } from './entities/getResult/getLicenseResult';
|
|
@@ -113,12 +112,6 @@ export declare enum LicenseFindParameters {
|
|
|
113
112
|
*/
|
|
114
113
|
FILTERS_LTE = "lte"
|
|
115
114
|
}
|
|
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>;
|
|
122
115
|
/**
|
|
123
116
|
* List of keywords to search with.
|
|
124
117
|
*/
|
|
@@ -134,14 +127,21 @@ export declare type LicenseKeywordsParameters = {
|
|
|
134
127
|
offer?: OfferFindResultDataKeywords;
|
|
135
128
|
};
|
|
136
129
|
export declare type LicenseRawKeywordsParametersLicence = {
|
|
137
|
-
[field: string]: DataKeywords | ActiveSeatsFindResultDataKeywords | ConfigFindResultDataKeywords | WarningFindResultDataKeywords | PriceFindResultDataKeywords |
|
|
130
|
+
[field: string]: DataKeywords | ActiveSeatsFindResultDataKeywords | ConfigFindResultDataKeywords | WarningFindResultDataKeywords | PriceFindResultDataKeywords | undefined;
|
|
138
131
|
};
|
|
139
132
|
export declare type LicenseRawKeywordsParametersOffer = {
|
|
140
133
|
[field: string]: DataKeywords | ActionFlagsFindResultDataKeywords | PriceBandFindResultDataKeywords | undefined;
|
|
141
134
|
};
|
|
142
135
|
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 |
|
|
144
|
+
[field: string]: SortParameters | ActiveSeatsFindResultDataSortParameters | ConfigFindResultDataSortParameters | WarningFindResultDataSortParameters | PriceFindResutDataSortParameters | undefined;
|
|
145
145
|
};
|
|
146
146
|
export declare type LicenseRawSortParametersOffer = {
|
|
147
147
|
[field: string]: SortParameters | ActionFlagsFindResultDataSortParameters | PriceBandFindResultDataSortParameters | undefined;
|
|
@@ -153,6 +153,13 @@ 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
|
+
};
|
|
156
163
|
export declare type LicenseRawFiltersParameters = {
|
|
157
164
|
[field: string]: unknown;
|
|
158
165
|
};
|
|
@@ -271,6 +278,4 @@ export declare class LicensesClient extends AbstractRestfulClient {
|
|
|
271
278
|
getHistory(licenseReference: string, parameters?: Parameters): Promise<GetResult<LicenceHistoryResult>>;
|
|
272
279
|
cancelAutoRenew(licenseReference: string, payload?: PutCancelAutoRenew, parameters?: Parameters): Promise<void>;
|
|
273
280
|
reactivateAutoRenew(licenseReference: string, payload?: PutReactivateAutoRenew, parameters?: Parameters): Promise<void>;
|
|
274
|
-
private createFilters;
|
|
275
|
-
private createKeywords;
|
|
276
281
|
}
|
|
@@ -181,6 +181,7 @@ 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;
|
|
184
185
|
this.setPerPage(perPage);
|
|
185
186
|
this.setPage(page);
|
|
186
187
|
const rawLicensePayload = {
|
|
@@ -190,29 +191,53 @@ class LicensesClient extends abstractRestfulClient_1.AbstractRestfulClient {
|
|
|
190
191
|
if (postData.keywords) {
|
|
191
192
|
// Flatten with prefix for each type of keyword (license and offer)
|
|
192
193
|
rawLicensePayload.keywords = {
|
|
193
|
-
...
|
|
194
|
-
|
|
194
|
+
...Object.entries((_a = postData.keywords.license) !== null && _a !== void 0 ? _a : {}).reduce((acc, [keyword, value]) => {
|
|
195
|
+
acc[`license.${keyword}`] = value;
|
|
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
|
+
}, {}),
|
|
195
202
|
};
|
|
196
203
|
}
|
|
197
204
|
if (postData.filters) {
|
|
198
205
|
// Flatten with prefix for each type of filter (license and offer)
|
|
199
206
|
rawLicensePayload.filters = {
|
|
200
|
-
...
|
|
201
|
-
|
|
207
|
+
...Object.entries((_c = postData.filters.license) !== null && _c !== void 0 ? _c : {}).reduce((acc, [filter, value]) => {
|
|
208
|
+
acc[`license.${filter}`] = value;
|
|
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
|
+
}, {}),
|
|
202
215
|
};
|
|
203
216
|
}
|
|
204
217
|
if (postData.exclusionFilters) {
|
|
205
218
|
// Flatten with prefix for each type of filter (license and offer)
|
|
206
219
|
rawLicensePayload.exclusionFilters = {
|
|
207
|
-
...
|
|
208
|
-
|
|
220
|
+
...Object.entries((_e = postData.exclusionFilters.license) !== null && _e !== void 0 ? _e : {}).reduce((acc, [filter, value]) => {
|
|
221
|
+
acc[`license.${filter}`] = value;
|
|
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
|
+
}, {}),
|
|
209
228
|
};
|
|
210
229
|
}
|
|
211
230
|
if (postData.sort) {
|
|
212
231
|
// Flatten with prefix for each type of sort keys (license and offer)
|
|
213
232
|
rawLicensePayload.sort = {
|
|
214
|
-
...
|
|
215
|
-
|
|
233
|
+
...Object.entries((_g = postData.sort.license) !== null && _g !== void 0 ? _g : {}).reduce((acc, [sort, value]) => {
|
|
234
|
+
acc[`license.${sort}`] = value;
|
|
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
|
+
}, {}),
|
|
216
241
|
};
|
|
217
242
|
}
|
|
218
243
|
const response = await this.findRaw(rawLicensePayload, parameters);
|
|
@@ -277,75 +302,6 @@ class LicensesClient extends abstractRestfulClient_1.AbstractRestfulClient {
|
|
|
277
302
|
this.path = `/${licenseReference}${this.REACTIVATE_AUTO_RENEW_PATH}`;
|
|
278
303
|
return await this.put(payload, parameters);
|
|
279
304
|
}
|
|
280
|
-
createFilters(parameters, keyParent) {
|
|
281
|
-
let appropriateParameters;
|
|
282
|
-
if (typeof parameters === 'object') {
|
|
283
|
-
appropriateParameters =
|
|
284
|
-
keyParent === 'license' ? parameters.license : parameters.offer;
|
|
285
|
-
}
|
|
286
|
-
else {
|
|
287
|
-
appropriateParameters = parameters;
|
|
288
|
-
}
|
|
289
|
-
return Object.entries(typeof appropriateParameters === 'object'
|
|
290
|
-
? appropriateParameters
|
|
291
|
-
: {}).reduce((acc, [key, value]) => {
|
|
292
|
-
if (typeof value === 'object' && !Array.isArray(value)) {
|
|
293
|
-
const subAcc = Object.entries(value).reduce((generatedArr, [i, val]) => {
|
|
294
|
-
let recursiveArr;
|
|
295
|
-
const newKey = keyParent + '.' + key + '.' + i;
|
|
296
|
-
if (typeof val !== 'object') {
|
|
297
|
-
generatedArr[`${newKey}`] = val;
|
|
298
|
-
return generatedArr;
|
|
299
|
-
}
|
|
300
|
-
else {
|
|
301
|
-
recursiveArr = this.createFilters(val, newKey);
|
|
302
|
-
}
|
|
303
|
-
return Object.assign(generatedArr, recursiveArr);
|
|
304
|
-
}, {});
|
|
305
|
-
Object.assign(acc, subAcc);
|
|
306
|
-
}
|
|
307
|
-
else {
|
|
308
|
-
acc[`${keyParent}.${key}`] = value;
|
|
309
|
-
}
|
|
310
|
-
return acc;
|
|
311
|
-
}, {});
|
|
312
|
-
}
|
|
313
|
-
createKeywords(parameters, keyParent) {
|
|
314
|
-
let appropriateParameters;
|
|
315
|
-
if (typeof parameters === 'object') {
|
|
316
|
-
appropriateParameters =
|
|
317
|
-
keyParent === 'license' ? parameters.license : parameters.offer;
|
|
318
|
-
}
|
|
319
|
-
else {
|
|
320
|
-
appropriateParameters = parameters;
|
|
321
|
-
}
|
|
322
|
-
return Object.entries(appropriateParameters !== null && appropriateParameters !== void 0
|
|
323
|
-
? appropriateParameters
|
|
324
|
-
: {}).reduce((acc, [key, value]) => {
|
|
325
|
-
if (typeof value === 'object' &&
|
|
326
|
-
!Array.isArray(value) &&
|
|
327
|
-
!Object.prototype.hasOwnProperty.call(value, 'operator')) {
|
|
328
|
-
const subAcc = Object.entries(value).reduce((generatedArr, [i, val]) => {
|
|
329
|
-
let recursiveArr;
|
|
330
|
-
const newKey = keyParent + '.' + key + '.' + i;
|
|
331
|
-
if (typeof val !== 'object' ||
|
|
332
|
-
Object.prototype.hasOwnProperty.call(val, 'operator')) {
|
|
333
|
-
generatedArr[`${newKey}`] = val;
|
|
334
|
-
return generatedArr;
|
|
335
|
-
}
|
|
336
|
-
else {
|
|
337
|
-
recursiveArr = this.createKeywords(val, newKey);
|
|
338
|
-
}
|
|
339
|
-
return Object.assign(generatedArr, recursiveArr);
|
|
340
|
-
}, {});
|
|
341
|
-
Object.assign(acc, subAcc);
|
|
342
|
-
}
|
|
343
|
-
else {
|
|
344
|
-
acc[`${keyParent}.${key}`] = value;
|
|
345
|
-
}
|
|
346
|
-
return acc;
|
|
347
|
-
}, {});
|
|
348
|
-
}
|
|
349
305
|
}
|
|
350
306
|
exports.LicensesClient = LicensesClient;
|
|
351
307
|
//# sourceMappingURL=licensesClient.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AbstractGraphQLClient } from '../abstractGraphQLClient';
|
|
2
|
+
import { LicensesEventGetEventsQueryType, LicensesEventGetEventsResponseType } from './entities/event/licensesEventQueries';
|
|
3
|
+
export declare class LicensesEventClient extends AbstractGraphQLClient {
|
|
4
|
+
/**
|
|
5
|
+
* The Path of graphql catalog API
|
|
6
|
+
*/
|
|
7
|
+
private GRAPHQL;
|
|
8
|
+
find<GraphQLResponseTypes>(request: string): Promise<GraphQLResponseTypes | null>;
|
|
9
|
+
getEvents(query: LicensesEventGetEventsQueryType): Promise<LicensesEventGetEventsResponseType | null>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LicensesEventClient = void 0;
|
|
4
|
+
const abstractGraphQLClient_1 = require("../abstractGraphQLClient");
|
|
5
|
+
class LicensesEventClient extends abstractGraphQLClient_1.AbstractGraphQLClient {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
/**
|
|
9
|
+
* The Path of graphql catalog API
|
|
10
|
+
*/
|
|
11
|
+
this.GRAPHQL = '/licenses/event/graphql';
|
|
12
|
+
}
|
|
13
|
+
async find(request) {
|
|
14
|
+
this.path = this.GRAPHQL;
|
|
15
|
+
try {
|
|
16
|
+
return await this.post(request);
|
|
17
|
+
}
|
|
18
|
+
catch (error) {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
async getEvents(query) {
|
|
23
|
+
const queryStr = this.stringifyQuery(query);
|
|
24
|
+
const result = await this.find(queryStr);
|
|
25
|
+
return result;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.LicensesEventClient = LicensesEventClient;
|
|
29
|
+
//# sourceMappingURL=licensesEventClient.js.map
|
|
@@ -3,10 +3,12 @@ import { AbstractGraphQLClient } from './abstractGraphQLClient';
|
|
|
3
3
|
import { SecurityScoreGraphQLClient } from './securityScore';
|
|
4
4
|
import { GraphqlApiClient } from './graphqlApi';
|
|
5
5
|
import { WellArchitectedGraphQLClient } from './wellArchitected';
|
|
6
|
+
import { LicensesEventClient } from './licenses/licensesEventClient';
|
|
6
7
|
export declare class PublicGraphQLClient extends AbstractGraphQLClient {
|
|
7
8
|
getCatalogGraphQLClient(): CatalogGraphQLClient;
|
|
8
9
|
getSecurityScoreGraphQLClient(): SecurityScoreGraphQLClient;
|
|
9
10
|
getWellArchitectedGraphQLClient(): WellArchitectedGraphQLClient;
|
|
10
11
|
getGraphqlApiClient(): GraphqlApiClient;
|
|
12
|
+
getLicensesEventClient(): LicensesEventClient;
|
|
11
13
|
private applyConfig;
|
|
12
14
|
}
|
|
@@ -6,6 +6,7 @@ const abstractGraphQLClient_1 = require("./abstractGraphQLClient");
|
|
|
6
6
|
const securityScore_1 = require("./securityScore");
|
|
7
7
|
const graphqlApi_1 = require("./graphqlApi");
|
|
8
8
|
const wellArchitected_1 = require("./wellArchitected");
|
|
9
|
+
const licensesEventClient_1 = require("./licenses/licensesEventClient");
|
|
9
10
|
class PublicGraphQLClient extends abstractGraphQLClient_1.AbstractGraphQLClient {
|
|
10
11
|
getCatalogGraphQLClient() {
|
|
11
12
|
const client = new catalogGraphQLClient_1.CatalogGraphQLClient();
|
|
@@ -27,6 +28,11 @@ class PublicGraphQLClient extends abstractGraphQLClient_1.AbstractGraphQLClient
|
|
|
27
28
|
this.applyConfig(client);
|
|
28
29
|
return client;
|
|
29
30
|
}
|
|
31
|
+
getLicensesEventClient() {
|
|
32
|
+
const client = new licensesEventClient_1.LicensesEventClient();
|
|
33
|
+
this.applyConfig(client);
|
|
34
|
+
return client;
|
|
35
|
+
}
|
|
30
36
|
applyConfig(client) {
|
|
31
37
|
return client
|
|
32
38
|
.setUrl(this.url)
|
package/package.json
CHANGED
|
@@ -1,23 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
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
|