@redhat-cloud-services/compliance-client 0.1.1 → 0.1.3
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 +4 -0
- package/README.md +1 -1
- package/dist/AssignRule/index.d.ts +1 -1
- package/dist/AssignRules/index.d.ts +1 -1
- package/dist/AssignSystem/index.d.ts +1 -1
- package/dist/AssignSystems/index.d.ts +1 -1
- package/dist/CreatePolicy/index.d.ts +2 -2
- package/dist/CreatePolicy/index.js +1 -1
- package/dist/DeletePolicy/index.d.ts +1 -1
- package/dist/Policies/index.d.ts +4 -4
- package/dist/Policies/index.js +2 -2
- package/dist/Policy/index.d.ts +1 -1
- package/dist/PolicySystems/index.d.ts +2 -2
- package/dist/Profile/index.d.ts +1 -1
- package/dist/ProfileRule/index.d.ts +1 -1
- package/dist/ProfileRules/index.d.ts +2 -2
- package/dist/Profiles/index.d.ts +4 -4
- package/dist/Profiles/index.js +2 -2
- package/dist/Report/index.d.ts +26 -0
- package/dist/Report/index.js +52 -0
- package/dist/Report/index.js.map +1 -0
- package/dist/Reports/index.d.ts +44 -0
- package/dist/Reports/index.js +63 -0
- package/dist/Reports/index.js.map +1 -0
- package/dist/Rule/index.d.ts +1 -1
- package/dist/RuleGroup/index.d.ts +1 -1
- package/dist/RuleGroups/index.d.ts +4 -4
- package/dist/RuleGroups/index.js +2 -2
- package/dist/Rules/index.d.ts +3 -3
- package/dist/Rules/index.js +1 -1
- package/dist/SecurityGuide/index.d.ts +1 -1
- package/dist/SecurityGuideRuleTree/index.d.ts +1 -1
- package/dist/SecurityGuides/index.d.ts +4 -4
- package/dist/SecurityGuides/index.js +2 -2
- package/dist/SupportedProfiles/index.d.ts +4 -4
- package/dist/SupportedProfiles/index.js +2 -2
- package/dist/System/index.d.ts +1 -1
- package/dist/Systems/index.d.ts +4 -4
- package/dist/Systems/index.js +2 -2
- package/dist/SystemsPolicies/index.d.ts +2 -2
- package/dist/Tailoring/index.d.ts +1 -1
- package/dist/TailoringFile/index.d.ts +1 -1
- package/dist/TailoringRules/index.d.ts +2 -2
- package/dist/Tailorings/index.d.ts +4 -4
- package/dist/Tailorings/index.js +2 -2
- package/dist/UnassignRule/index.d.ts +1 -1
- package/dist/UnassignSystem/index.d.ts +1 -1
- package/dist/UpdatePolicy/index.d.ts +2 -2
- package/dist/UpdatePolicy/index.js +1 -1
- package/dist/UpdateTailoring/index.d.ts +39 -0
- package/dist/UpdateTailoring/index.js +55 -0
- package/dist/UpdateTailoring/index.js.map +1 -0
- package/dist/ValueDefinition/index.d.ts +1 -1
- package/dist/ValueDefinitions/index.d.ts +4 -4
- package/dist/ValueDefinitions/index.js +2 -2
- package/dist/api.d.ts +738 -318
- package/dist/api.js +581 -173
- package/dist/api.js.map +1 -1
- package/dist/base.d.ts +2 -2
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -12
- package/dist/configuration.js +0 -11
- package/dist/configuration.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +160 -20
- package/dist/types/index.js +4 -1
- package/dist/types/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [0.1.3](https://github.com/RedHatInsights/javascript-clients/compare/@redhat-cloud-services/compliance-client-0.1.2...@redhat-cloud-services/compliance-client-0.1.3) (2024-05-29)
|
|
6
|
+
|
|
7
|
+
## [0.1.2](https://github.com/RedHatInsights/javascript-clients/compare/@redhat-cloud-services/compliance-client-0.1.1...@redhat-cloud-services/compliance-client-0.1.2) (2024-05-28)
|
|
8
|
+
|
|
5
9
|
## [0.1.1](https://github.com/RedHatInsights/javascript-clients/compare/@redhat-cloud-services/compliance-client-0.1.0...@redhat-cloud-services/compliance-client-0.1.1) (2024-05-23)
|
|
6
10
|
|
|
7
11
|
|
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Javascript client for the compliance API
|
|
2
|
-
If you want to use [RedHatInsights/compliance](https://github.com/RedHatInsights/compliance) you shouldn't use get requests directly, but rather use this client to integrate with
|
|
2
|
+
If you want to use [RedHatInsights/compliance](https://github.com/RedHatInsights/compliance) you shouldn't use get requests directly, but rather use this client to integrate with the service.
|
|
3
3
|
|
|
4
4
|
## Install
|
|
5
5
|
NPM
|
|
@@ -3,7 +3,7 @@ import type { RequestArgs } from '@redhat-cloud-services/javascript-clients-shar
|
|
|
3
3
|
import type { Policy } from '../types';
|
|
4
4
|
export type CreatePolicyParams = {
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* For internal use only
|
|
7
7
|
* @type { any }
|
|
8
8
|
* @memberof CreatePolicyApi
|
|
9
9
|
*/
|
|
@@ -17,7 +17,7 @@ export type CreatePolicyParams = {
|
|
|
17
17
|
options?: AxiosRequestConfig;
|
|
18
18
|
};
|
|
19
19
|
/**
|
|
20
|
-
* Create a Policy with the provided
|
|
20
|
+
* Create a Policy with the provided attribute
|
|
21
21
|
* @summary Create a Policy
|
|
22
22
|
* @param {CreatePolicyParams} config with all available params.
|
|
23
23
|
* @param {*} [options] Override http request option.
|
|
@@ -8,7 +8,7 @@ var isCreatePolicyObjectParams = function (params) {
|
|
|
8
8
|
return params.length === 1 && true && true;
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
11
|
-
* Create a Policy with the provided
|
|
11
|
+
* Create a Policy with the provided attribute
|
|
12
12
|
* @summary Create a Policy
|
|
13
13
|
* @param {CreatePolicyParams} config with all available params.
|
|
14
14
|
* @param {*} [options] Override http request option.
|
package/dist/Policies/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { AxiosRequestConfig } from 'axios';
|
|
|
2
2
|
import type { RequestArgs } from '@redhat-cloud-services/javascript-clients-shared/common';
|
|
3
3
|
export type PoliciesParams = {
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* For internal use only
|
|
6
6
|
* @type { any }
|
|
7
7
|
* @memberof PoliciesApi
|
|
8
8
|
*/
|
|
@@ -26,7 +26,7 @@ export type PoliciesParams = {
|
|
|
26
26
|
*/
|
|
27
27
|
sortBy?: any;
|
|
28
28
|
/**
|
|
29
|
-
* Query string to filter items by their attributes. Compliant with <a href=\"https://github.com/wvanbergen/scoped_search/wiki/Query-language\" target=\"_blank\" title=\"github.com/wvanbergen/scoped_search\">scoped_search query language</a>. However, only `=` or `!=` (resp. `<>`) operators are supported.<br><br>Policies are searchable using attributes `title` and `
|
|
29
|
+
* Query string to filter items by their attributes. Compliant with <a href=\"https://github.com/wvanbergen/scoped_search/wiki/Query-language\" target=\"_blank\" title=\"github.com/wvanbergen/scoped_search\">scoped_search query language</a>. However, only `=` or `!=` (resp. `<>`) operators are supported.<br><br>Policies are searchable using attributes `title`, `os_major_version`, and `os_minor_version`<br><br>(e.g.: `(field_1=something AND field_2!=\"something else\") OR field_3>40`)
|
|
30
30
|
* @type { any }
|
|
31
31
|
* @memberof PoliciesApi
|
|
32
32
|
*/
|
|
@@ -34,8 +34,8 @@ export type PoliciesParams = {
|
|
|
34
34
|
options?: AxiosRequestConfig;
|
|
35
35
|
};
|
|
36
36
|
/**
|
|
37
|
-
* Lists
|
|
38
|
-
* @summary Request
|
|
37
|
+
* Lists Policie
|
|
38
|
+
* @summary Request Policie
|
|
39
39
|
* @param {PoliciesParams} config with all available params.
|
|
40
40
|
* @param {*} [options] Override http request option.
|
|
41
41
|
* @throws {RequiredError}
|
package/dist/Policies/index.js
CHANGED
|
@@ -8,8 +8,8 @@ var isPoliciesObjectParams = function (params) {
|
|
|
8
8
|
return params.length === 1 && true && true && true && true && true;
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
11
|
-
* Lists
|
|
12
|
-
* @summary Request
|
|
11
|
+
* Lists Policie
|
|
12
|
+
* @summary Request Policie
|
|
13
13
|
* @param {PoliciesParams} config with all available params.
|
|
14
14
|
* @param {*} [options] Override http request option.
|
|
15
15
|
* @throws {RequiredError}
|
package/dist/Policy/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export type PolicySystemsParams = {
|
|
|
8
8
|
*/
|
|
9
9
|
policyId: any;
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* For internal use only
|
|
12
12
|
* @type { any }
|
|
13
13
|
* @memberof PolicySystemsApi
|
|
14
14
|
*/
|
|
@@ -32,7 +32,7 @@ export type PolicySystemsParams = {
|
|
|
32
32
|
*/
|
|
33
33
|
sortBy?: any;
|
|
34
34
|
/**
|
|
35
|
-
* Query string to filter items by their attributes. Compliant with <a href=\"https://github.com/wvanbergen/scoped_search/wiki/Query-language\" target=\"_blank\" title=\"github.com/wvanbergen/scoped_search\">scoped_search query language</a>. However, only `=` or `!=` (resp. `<>`) operators are supported.<br><br>Systems are searchable using attributes `display_name`, `os_major_version`, and `
|
|
35
|
+
* Query string to filter items by their attributes. Compliant with <a href=\"https://github.com/wvanbergen/scoped_search/wiki/Query-language\" target=\"_blank\" title=\"github.com/wvanbergen/scoped_search\">scoped_search query language</a>. However, only `=` or `!=` (resp. `<>`) operators are supported.<br><br>Systems are searchable using attributes `display_name`, `os_major_version`, `os_minor_version`, and `assigned_or_scanned`<br><br>(e.g.: `(field_1=something AND field_2!=\"something else\") OR field_3>40`)
|
|
36
36
|
* @type { any }
|
|
37
37
|
* @memberof PolicySystemsApi
|
|
38
38
|
*/
|
package/dist/Profile/index.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export type ProfileRulesParams = {
|
|
|
14
14
|
*/
|
|
15
15
|
profileId: any;
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* For internal use only
|
|
18
18
|
* @type { any }
|
|
19
19
|
* @memberof ProfileRulesApi
|
|
20
20
|
*/
|
|
@@ -38,7 +38,7 @@ export type ProfileRulesParams = {
|
|
|
38
38
|
*/
|
|
39
39
|
sortBy?: any;
|
|
40
40
|
/**
|
|
41
|
-
* Query string to filter items by their attributes. Compliant with <a href=\"https://github.com/wvanbergen/scoped_search/wiki/Query-language\" target=\"_blank\" title=\"github.com/wvanbergen/scoped_search\">scoped_search query language</a>. However, only `=` or `!=` (resp. `<>`) operators are supported.<br><br>Rules are searchable using attributes `title` and `severity`<br><br>(e.g.: `(
|
|
41
|
+
* Query string to filter items by their attributes. Compliant with <a href=\"https://github.com/wvanbergen/scoped_search/wiki/Query-language\" target=\"_blank\" title=\"github.com/wvanbergen/scoped_search\">scoped_search query language</a>. However, only `=` or `!=` (resp. `<>`) operators are supported.<br><br>Rules are searchable using attributes `title` and `severity`<br><br>(e.g.: `(field_1=something AND field_2!=\"something else\") OR field_3>40`)
|
|
42
42
|
* @type { any }
|
|
43
43
|
* @memberof ProfileRulesApi
|
|
44
44
|
*/
|
package/dist/Profiles/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export type ProfilesParams = {
|
|
|
8
8
|
*/
|
|
9
9
|
securityGuideId: any;
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* For internal use only
|
|
12
12
|
* @type { any }
|
|
13
13
|
* @memberof ProfilesApi
|
|
14
14
|
*/
|
|
@@ -32,7 +32,7 @@ export type ProfilesParams = {
|
|
|
32
32
|
*/
|
|
33
33
|
sortBy?: any;
|
|
34
34
|
/**
|
|
35
|
-
* Query string to filter items by their attributes. Compliant with <a href=\"https://github.com/wvanbergen/scoped_search/wiki/Query-language\" target=\"_blank\" title=\"github.com/wvanbergen/scoped_search\">scoped_search query language</a>. However, only `=` or `!=` (resp. `<>`) operators are supported.<br><br>Profiles are searchable using attributes `title` and `ref_id`<br><br>(e.g.: `(
|
|
35
|
+
* Query string to filter items by their attributes. Compliant with <a href=\"https://github.com/wvanbergen/scoped_search/wiki/Query-language\" target=\"_blank\" title=\"github.com/wvanbergen/scoped_search\">scoped_search query language</a>. However, only `=` or `!=` (resp. `<>`) operators are supported.<br><br>Profiles are searchable using attributes `title` and `ref_id`<br><br>(e.g.: `(field_1=something AND field_2!=\"something else\") OR field_3>40`)
|
|
36
36
|
* @type { any }
|
|
37
37
|
* @memberof ProfilesApi
|
|
38
38
|
*/
|
|
@@ -40,8 +40,8 @@ export type ProfilesParams = {
|
|
|
40
40
|
options?: AxiosRequestConfig;
|
|
41
41
|
};
|
|
42
42
|
/**
|
|
43
|
-
* Lists
|
|
44
|
-
* @summary Request
|
|
43
|
+
* Lists Profile
|
|
44
|
+
* @summary Request Profile
|
|
45
45
|
* @param {ProfilesParams} config with all available params.
|
|
46
46
|
* @param {*} [options] Override http request option.
|
|
47
47
|
* @throws {RequiredError}
|
package/dist/Profiles/index.js
CHANGED
|
@@ -8,8 +8,8 @@ var isProfilesObjectParams = function (params) {
|
|
|
8
8
|
return params.length === 1 && Object.prototype.hasOwnProperty.call(params, 'securityGuideId') && true && true && true && true && true;
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
11
|
-
* Lists
|
|
12
|
-
* @summary Request
|
|
11
|
+
* Lists Profile
|
|
12
|
+
* @summary Request Profile
|
|
13
13
|
* @param {ProfilesParams} config with all available params.
|
|
14
14
|
* @param {*} [options] Override http request option.
|
|
15
15
|
* @throws {RequiredError}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { AxiosRequestConfig } from 'axios';
|
|
2
|
+
import type { RequestArgs } from '@redhat-cloud-services/javascript-clients-shared/common';
|
|
3
|
+
export type ReportParams = {
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* @type { any }
|
|
7
|
+
* @memberof ReportApi
|
|
8
|
+
*/
|
|
9
|
+
id: any;
|
|
10
|
+
/**
|
|
11
|
+
* For internal use only
|
|
12
|
+
* @type { any }
|
|
13
|
+
* @memberof ReportApi
|
|
14
|
+
*/
|
|
15
|
+
xRHIDENTITY?: any;
|
|
16
|
+
options?: AxiosRequestConfig;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Returns a Report
|
|
20
|
+
* @summary Request a Report
|
|
21
|
+
* @param {ReportParams} config with all available params.
|
|
22
|
+
* @param {*} [options] Override http request option.
|
|
23
|
+
* @throws {RequiredError}
|
|
24
|
+
*/
|
|
25
|
+
export declare const reportParamCreator: (...config: ([ReportParams] | [any, any, AxiosRequestConfig])) => Promise<RequestArgs>;
|
|
26
|
+
export default reportParamCreator;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.reportParamCreator = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
var common_1 = require("@redhat-cloud-services/javascript-clients-shared/common");
|
|
7
|
+
var isReportObjectParams = function (params) {
|
|
8
|
+
return params.length === 1 && Object.prototype.hasOwnProperty.call(params, 'id') && true;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Returns a Report
|
|
12
|
+
* @summary Request a Report
|
|
13
|
+
* @param {ReportParams} config with all available params.
|
|
14
|
+
* @param {*} [options] Override http request option.
|
|
15
|
+
* @throws {RequiredError}
|
|
16
|
+
*/
|
|
17
|
+
var reportParamCreator = function () {
|
|
18
|
+
var config = [];
|
|
19
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
20
|
+
config[_i] = arguments[_i];
|
|
21
|
+
}
|
|
22
|
+
return tslib_1.__awaiter(void 0, void 0, void 0, function () {
|
|
23
|
+
var params, id, xRHIDENTITY, _a, options, localVarPath, localVarUrlObj, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter;
|
|
24
|
+
return tslib_1.__generator(this, function (_b) {
|
|
25
|
+
params = isReportObjectParams(config) ? config[0] : ['id', 'xRHIDENTITY', 'options'].reduce(function (acc, curr, index) {
|
|
26
|
+
var _a;
|
|
27
|
+
return (tslib_1.__assign(tslib_1.__assign({}, acc), (_a = {}, _a[curr] = config[index], _a)));
|
|
28
|
+
}, {});
|
|
29
|
+
id = params.id, xRHIDENTITY = params.xRHIDENTITY, _a = params.options, options = _a === void 0 ? {} : _a;
|
|
30
|
+
localVarPath = "/reports/{id}"
|
|
31
|
+
.replace("{".concat("id", "}"), encodeURIComponent(String(id)));
|
|
32
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
33
|
+
localVarRequestOptions = tslib_1.__assign({ method: 'GET' }, options);
|
|
34
|
+
localVarHeaderParameter = {};
|
|
35
|
+
localVarQueryParameter = {};
|
|
36
|
+
if (xRHIDENTITY != null) {
|
|
37
|
+
localVarHeaderParameter['X-RH-IDENTITY'] = typeof xRHIDENTITY === 'string'
|
|
38
|
+
? xRHIDENTITY
|
|
39
|
+
: JSON.stringify(xRHIDENTITY);
|
|
40
|
+
}
|
|
41
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
42
|
+
localVarRequestOptions.headers = tslib_1.__assign(tslib_1.__assign({}, localVarHeaderParameter), options.headers);
|
|
43
|
+
return [2 /*return*/, {
|
|
44
|
+
urlObj: localVarUrlObj,
|
|
45
|
+
options: localVarRequestOptions,
|
|
46
|
+
}];
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
exports.reportParamCreator = reportParamCreator;
|
|
51
|
+
exports.default = exports.reportParamCreator;
|
|
52
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../Report/index.ts"],"names":[],"mappings":";;;;AAEA,aAAa;AACb,kFAA4T;AA0B5T,IAAM,oBAAoB,GAAG,UAAC,MAAkC;IAC9D,OAAO,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,IAAI,CAAA;AAC1F,CAAC,CAAA;AACD;;;;;;EAME;AACK,IAAM,kBAAkB,GA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,EAAE,sBAAsB;iBAClC,EAAC;;;CACL,CAAA;AA1BY,QAAA,kBAAkB,sBA0B9B;AAED,kBAAe,0BAAkB,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { AxiosRequestConfig } from 'axios';
|
|
2
|
+
import type { RequestArgs } from '@redhat-cloud-services/javascript-clients-shared/common';
|
|
3
|
+
export type ReportsParams = {
|
|
4
|
+
/**
|
|
5
|
+
* For internal use only
|
|
6
|
+
* @type { any }
|
|
7
|
+
* @memberof ReportsApi
|
|
8
|
+
*/
|
|
9
|
+
xRHIDENTITY?: any;
|
|
10
|
+
/**
|
|
11
|
+
* Number of items to return per page
|
|
12
|
+
* @type { any }
|
|
13
|
+
* @memberof ReportsApi
|
|
14
|
+
*/
|
|
15
|
+
limit?: any;
|
|
16
|
+
/**
|
|
17
|
+
* Offset of first item of paginated response
|
|
18
|
+
* @type { any }
|
|
19
|
+
* @memberof ReportsApi
|
|
20
|
+
*/
|
|
21
|
+
offset?: any;
|
|
22
|
+
/**
|
|
23
|
+
* Attribute and direction to sort the items by. Represented by an array of fields with an optional direction (`<key>:asc` or `<key>:desc`).<br><br>If no direction is selected, `<key>:asc` is used by default.
|
|
24
|
+
* @type { any }
|
|
25
|
+
* @memberof ReportsApi
|
|
26
|
+
*/
|
|
27
|
+
sortBy?: any;
|
|
28
|
+
/**
|
|
29
|
+
* Query string to filter items by their attributes. Compliant with <a href=\"https://github.com/wvanbergen/scoped_search/wiki/Query-language\" target=\"_blank\" title=\"github.com/wvanbergen/scoped_search\">scoped_search query language</a>. However, only `=` or `!=` (resp. `<>`) operators are supported.<br><br>Reports are searchable using attributes `title` and `os_major_version`<br><br>(e.g.: `(field_1=something AND field_2!=\"something else\") OR field_3>40`)
|
|
30
|
+
* @type { any }
|
|
31
|
+
* @memberof ReportsApi
|
|
32
|
+
*/
|
|
33
|
+
filter?: any;
|
|
34
|
+
options?: AxiosRequestConfig;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Lists Report
|
|
38
|
+
* @summary Request Report
|
|
39
|
+
* @param {ReportsParams} config with all available params.
|
|
40
|
+
* @param {*} [options] Override http request option.
|
|
41
|
+
* @throws {RequiredError}
|
|
42
|
+
*/
|
|
43
|
+
export declare const reportsParamCreator: (...config: ([ReportsParams] | [any, any, any, any, any, AxiosRequestConfig])) => Promise<RequestArgs>;
|
|
44
|
+
export default reportsParamCreator;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.reportsParamCreator = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
var common_1 = require("@redhat-cloud-services/javascript-clients-shared/common");
|
|
7
|
+
var isReportsObjectParams = function (params) {
|
|
8
|
+
return params.length === 1 && true && true && true && true && true;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Lists Report
|
|
12
|
+
* @summary Request Report
|
|
13
|
+
* @param {ReportsParams} config with all available params.
|
|
14
|
+
* @param {*} [options] Override http request option.
|
|
15
|
+
* @throws {RequiredError}
|
|
16
|
+
*/
|
|
17
|
+
var reportsParamCreator = function () {
|
|
18
|
+
var config = [];
|
|
19
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
20
|
+
config[_i] = arguments[_i];
|
|
21
|
+
}
|
|
22
|
+
return tslib_1.__awaiter(void 0, void 0, void 0, function () {
|
|
23
|
+
var params, xRHIDENTITY, limit, offset, sortBy, filter, _a, options, localVarPath, localVarUrlObj, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter;
|
|
24
|
+
return tslib_1.__generator(this, function (_b) {
|
|
25
|
+
params = isReportsObjectParams(config) ? config[0] : ['xRHIDENTITY', 'limit', 'offset', 'sortBy', 'filter', 'options'].reduce(function (acc, curr, index) {
|
|
26
|
+
var _a;
|
|
27
|
+
return (tslib_1.__assign(tslib_1.__assign({}, acc), (_a = {}, _a[curr] = config[index], _a)));
|
|
28
|
+
}, {});
|
|
29
|
+
xRHIDENTITY = params.xRHIDENTITY, limit = params.limit, offset = params.offset, sortBy = params.sortBy, filter = params.filter, _a = params.options, options = _a === void 0 ? {} : _a;
|
|
30
|
+
localVarPath = "/reports";
|
|
31
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
32
|
+
localVarRequestOptions = tslib_1.__assign({ method: 'GET' }, options);
|
|
33
|
+
localVarHeaderParameter = {};
|
|
34
|
+
localVarQueryParameter = {};
|
|
35
|
+
if (limit !== undefined) {
|
|
36
|
+
localVarQueryParameter['limit'] = limit;
|
|
37
|
+
}
|
|
38
|
+
if (offset !== undefined) {
|
|
39
|
+
localVarQueryParameter['offset'] = offset;
|
|
40
|
+
}
|
|
41
|
+
if (sortBy !== undefined) {
|
|
42
|
+
localVarQueryParameter['sort_by'] = sortBy;
|
|
43
|
+
}
|
|
44
|
+
if (filter !== undefined) {
|
|
45
|
+
localVarQueryParameter['filter'] = filter;
|
|
46
|
+
}
|
|
47
|
+
if (xRHIDENTITY != null) {
|
|
48
|
+
localVarHeaderParameter['X-RH-IDENTITY'] = typeof xRHIDENTITY === 'string'
|
|
49
|
+
? xRHIDENTITY
|
|
50
|
+
: JSON.stringify(xRHIDENTITY);
|
|
51
|
+
}
|
|
52
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
53
|
+
localVarRequestOptions.headers = tslib_1.__assign(tslib_1.__assign({}, localVarHeaderParameter), options.headers);
|
|
54
|
+
return [2 /*return*/, {
|
|
55
|
+
urlObj: localVarUrlObj,
|
|
56
|
+
options: localVarRequestOptions,
|
|
57
|
+
}];
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
exports.reportsParamCreator = reportsParamCreator;
|
|
62
|
+
exports.default = exports.reportsParamCreator;
|
|
63
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
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rB,sBAAsB,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC;aAC3C;YAED,IAAI,MAAM,KAAK,SAAS,EAAE;gBACtB,sBAAsB,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC;aAC7C;YAED,IAAI,MAAM,KAAK,SAAS,EAAE;gBACtB,sBAAsB,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC;aAC9C;YAED,IAAI,MAAM,KAAK,SAAS,EAAE;gBACtB,sBAAsB,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC;aAC7C;YAED,IAAI,WAAW,IAAI,IAAI,EAAE;gBACrB,uBAAuB,CAAC,eAAe,CAAC,GAAG,OAAO,WAAW,KAAK,QAAQ;oBACtE,CAAC,CAAC,WAAW;oBACb,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;aACrC;YAID,IAAA,wBAAe,EAAC,cAAc,EAAE,sBAAsB,CAAC,CAAC;YACxD,sBAAsB,CAAC,OAAO,yCAAO,uBAAuB,GAAK,OAAO,CAAC,OAAO,CAAC,CAAC;YAElF,sBAAO;oBACH,MAAM,EAAE,cAAc;oBACtB,OAAO,EAAE,sBAAsB;iBAClC,EAAC;;;CACL,CAAA;AAzCY,QAAA,mBAAmB,uBAyC/B;AAED,kBAAe,2BAAmB,CAAC"}
|
package/dist/Rule/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export type RuleGroupsParams = {
|
|
|
8
8
|
*/
|
|
9
9
|
securityGuideId: any;
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* For internal use only
|
|
12
12
|
* @type { any }
|
|
13
13
|
* @memberof RuleGroupsApi
|
|
14
14
|
*/
|
|
@@ -32,7 +32,7 @@ export type RuleGroupsParams = {
|
|
|
32
32
|
*/
|
|
33
33
|
sortBy?: any;
|
|
34
34
|
/**
|
|
35
|
-
* Query string to filter items by their attributes. Compliant with <a href=\"https://github.com/wvanbergen/scoped_search/wiki/Query-language\" target=\"_blank\" title=\"github.com/wvanbergen/scoped_search\">scoped_search query language</a>. However, only `=` or `!=` (resp. `<>`) operators are supported.<br><br>Rule Groups are searchable using attributes
|
|
35
|
+
* Query string to filter items by their attributes. Compliant with <a href=\"https://github.com/wvanbergen/scoped_search/wiki/Query-language\" target=\"_blank\" title=\"github.com/wvanbergen/scoped_search\">scoped_search query language</a>. However, only `=` or `!=` (resp. `<>`) operators are supported.<br><br>Rule Groups are searchable using attributes `title` and `ref_id`<br><br>(e.g.: `(field_1=something AND field_2!=\"something else\") OR field_3>40`)
|
|
36
36
|
* @type { any }
|
|
37
37
|
* @memberof RuleGroupsApi
|
|
38
38
|
*/
|
|
@@ -40,8 +40,8 @@ export type RuleGroupsParams = {
|
|
|
40
40
|
options?: AxiosRequestConfig;
|
|
41
41
|
};
|
|
42
42
|
/**
|
|
43
|
-
* Lists Rule
|
|
44
|
-
* @summary Request Rule
|
|
43
|
+
* Lists Rule Group
|
|
44
|
+
* @summary Request Rule Group
|
|
45
45
|
* @param {RuleGroupsParams} config with all available params.
|
|
46
46
|
* @param {*} [options] Override http request option.
|
|
47
47
|
* @throws {RequiredError}
|
package/dist/RuleGroups/index.js
CHANGED
|
@@ -8,8 +8,8 @@ var isRuleGroupsObjectParams = function (params) {
|
|
|
8
8
|
return params.length === 1 && Object.prototype.hasOwnProperty.call(params, 'securityGuideId') && true && true && true && true && true;
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
11
|
-
* Lists Rule
|
|
12
|
-
* @summary Request Rule
|
|
11
|
+
* Lists Rule Group
|
|
12
|
+
* @summary Request Rule Group
|
|
13
13
|
* @param {RuleGroupsParams} config with all available params.
|
|
14
14
|
* @param {*} [options] Override http request option.
|
|
15
15
|
* @throws {RequiredError}
|
package/dist/Rules/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export type RulesParams = {
|
|
|
8
8
|
*/
|
|
9
9
|
securityGuideId: any;
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* For internal use only
|
|
12
12
|
* @type { any }
|
|
13
13
|
* @memberof RulesApi
|
|
14
14
|
*/
|
|
@@ -32,7 +32,7 @@ export type RulesParams = {
|
|
|
32
32
|
*/
|
|
33
33
|
sortBy?: any;
|
|
34
34
|
/**
|
|
35
|
-
* Query string to filter items by their attributes. Compliant with <a href=\"https://github.com/wvanbergen/scoped_search/wiki/Query-language\" target=\"_blank\" title=\"github.com/wvanbergen/scoped_search\">scoped_search query language</a>. However, only `=` or `!=` (resp. `<>`) operators are supported.<br><br>Rules are searchable using attributes `title` and `severity`<br><br>(e.g.: `(
|
|
35
|
+
* Query string to filter items by their attributes. Compliant with <a href=\"https://github.com/wvanbergen/scoped_search/wiki/Query-language\" target=\"_blank\" title=\"github.com/wvanbergen/scoped_search\">scoped_search query language</a>. However, only `=` or `!=` (resp. `<>`) operators are supported.<br><br>Rules are searchable using attributes `title` and `severity`<br><br>(e.g.: `(field_1=something AND field_2!=\"something else\") OR field_3>40`)
|
|
36
36
|
* @type { any }
|
|
37
37
|
* @memberof RulesApi
|
|
38
38
|
*/
|
|
@@ -41,7 +41,7 @@ export type RulesParams = {
|
|
|
41
41
|
};
|
|
42
42
|
/**
|
|
43
43
|
* Lists Rules assigned
|
|
44
|
-
* @summary Request
|
|
44
|
+
* @summary Request Rule
|
|
45
45
|
* @param {RulesParams} config with all available params.
|
|
46
46
|
* @param {*} [options] Override http request option.
|
|
47
47
|
* @throws {RequiredError}
|
package/dist/Rules/index.js
CHANGED
|
@@ -9,7 +9,7 @@ var isRulesObjectParams = function (params) {
|
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
11
11
|
* Lists Rules assigned
|
|
12
|
-
* @summary Request
|
|
12
|
+
* @summary Request Rule
|
|
13
13
|
* @param {RulesParams} config with all available params.
|
|
14
14
|
* @param {*} [options] Override http request option.
|
|
15
15
|
* @throws {RequiredError}
|
|
@@ -2,7 +2,7 @@ import type { AxiosRequestConfig } from 'axios';
|
|
|
2
2
|
import type { RequestArgs } from '@redhat-cloud-services/javascript-clients-shared/common';
|
|
3
3
|
export type SecurityGuidesParams = {
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* For internal use only
|
|
6
6
|
* @type { any }
|
|
7
7
|
* @memberof SecurityGuidesApi
|
|
8
8
|
*/
|
|
@@ -26,7 +26,7 @@ export type SecurityGuidesParams = {
|
|
|
26
26
|
*/
|
|
27
27
|
sortBy?: any;
|
|
28
28
|
/**
|
|
29
|
-
* Query string to filter items by their attributes. Compliant with <a href=\"https://github.com/wvanbergen/scoped_search/wiki/Query-language\" target=\"_blank\" title=\"github.com/wvanbergen/scoped_search\">scoped_search query language</a>. However, only `=` or `!=` (resp. `<>`) operators are supported.<br><br>Security Guides are searchable using attributes `title`, `version`, `ref_id`, and `os_major_version`<br><br>(e.g.: `(
|
|
29
|
+
* Query string to filter items by their attributes. Compliant with <a href=\"https://github.com/wvanbergen/scoped_search/wiki/Query-language\" target=\"_blank\" title=\"github.com/wvanbergen/scoped_search\">scoped_search query language</a>. However, only `=` or `!=` (resp. `<>`) operators are supported.<br><br>Security Guides are searchable using attributes `title`, `version`, `ref_id`, and `os_major_version`<br><br>(e.g.: `(field_1=something AND field_2!=\"something else\") OR field_3>40`)
|
|
30
30
|
* @type { any }
|
|
31
31
|
* @memberof SecurityGuidesApi
|
|
32
32
|
*/
|
|
@@ -34,8 +34,8 @@ export type SecurityGuidesParams = {
|
|
|
34
34
|
options?: AxiosRequestConfig;
|
|
35
35
|
};
|
|
36
36
|
/**
|
|
37
|
-
* Lists Security
|
|
38
|
-
* @summary Request Security
|
|
37
|
+
* Lists Security Guide
|
|
38
|
+
* @summary Request Security Guide
|
|
39
39
|
* @param {SecurityGuidesParams} config with all available params.
|
|
40
40
|
* @param {*} [options] Override http request option.
|
|
41
41
|
* @throws {RequiredError}
|
|
@@ -8,8 +8,8 @@ var isSecurityGuidesObjectParams = function (params) {
|
|
|
8
8
|
return params.length === 1 && true && true && true && true && true;
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
11
|
-
* Lists Security
|
|
12
|
-
* @summary Request Security
|
|
11
|
+
* Lists Security Guide
|
|
12
|
+
* @summary Request Security Guide
|
|
13
13
|
* @param {SecurityGuidesParams} config with all available params.
|
|
14
14
|
* @param {*} [options] Override http request option.
|
|
15
15
|
* @throws {RequiredError}
|