@redhat-cloud-services/compliance-client 0.1.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 +13 -0
- package/LICENSE +201 -0
- package/README.md +67 -0
- package/dist/AssignRule/index.d.ts +38 -0
- package/dist/AssignRule/index.js +54 -0
- package/dist/AssignRule/index.js.map +1 -0
- package/dist/AssignRules/index.d.ts +40 -0
- package/dist/AssignRules/index.js +56 -0
- package/dist/AssignRules/index.js.map +1 -0
- package/dist/AssignSystem/index.d.ts +32 -0
- package/dist/AssignSystem/index.js +53 -0
- package/dist/AssignSystem/index.js.map +1 -0
- package/dist/AssignSystems/index.d.ts +34 -0
- package/dist/AssignSystems/index.js +55 -0
- package/dist/AssignSystems/index.js.map +1 -0
- package/dist/CreatePolicy/index.d.ts +27 -0
- package/dist/CreatePolicy/index.js +53 -0
- package/dist/CreatePolicy/index.js.map +1 -0
- package/dist/DeletePolicy/index.d.ts +26 -0
- package/dist/DeletePolicy/index.js +52 -0
- package/dist/DeletePolicy/index.js.map +1 -0
- package/dist/Policies/index.d.ts +44 -0
- package/dist/Policies/index.js +63 -0
- package/dist/Policies/index.js.map +1 -0
- package/dist/Policy/index.d.ts +26 -0
- package/dist/Policy/index.js +52 -0
- package/dist/Policy/index.js.map +1 -0
- package/dist/PolicySystems/index.d.ts +50 -0
- package/dist/PolicySystems/index.js +64 -0
- package/dist/PolicySystems/index.js.map +1 -0
- package/dist/Profile/index.d.ts +32 -0
- package/dist/Profile/index.js +53 -0
- package/dist/Profile/index.js.map +1 -0
- package/dist/ProfileRule/index.d.ts +38 -0
- package/dist/ProfileRule/index.js +54 -0
- package/dist/ProfileRule/index.js.map +1 -0
- package/dist/ProfileRules/index.d.ts +56 -0
- package/dist/ProfileRules/index.js +65 -0
- package/dist/ProfileRules/index.js.map +1 -0
- package/dist/Profiles/index.d.ts +50 -0
- package/dist/Profiles/index.js +64 -0
- package/dist/Profiles/index.js.map +1 -0
- package/dist/Rule/index.d.ts +32 -0
- package/dist/Rule/index.js +53 -0
- package/dist/Rule/index.js.map +1 -0
- package/dist/RuleGroup/index.d.ts +32 -0
- package/dist/RuleGroup/index.js +53 -0
- package/dist/RuleGroup/index.js.map +1 -0
- package/dist/RuleGroups/index.d.ts +50 -0
- package/dist/RuleGroups/index.js +64 -0
- package/dist/RuleGroups/index.js.map +1 -0
- package/dist/Rules/index.d.ts +50 -0
- package/dist/Rules/index.js +64 -0
- package/dist/Rules/index.js.map +1 -0
- package/dist/SecurityGuide/index.d.ts +26 -0
- package/dist/SecurityGuide/index.js +52 -0
- package/dist/SecurityGuide/index.js.map +1 -0
- package/dist/SecurityGuideRuleTree/index.d.ts +26 -0
- package/dist/SecurityGuideRuleTree/index.js +52 -0
- package/dist/SecurityGuideRuleTree/index.js.map +1 -0
- package/dist/SecurityGuides/index.d.ts +44 -0
- package/dist/SecurityGuides/index.js +63 -0
- package/dist/SecurityGuides/index.js.map +1 -0
- package/dist/SupportedProfiles/index.d.ts +44 -0
- package/dist/SupportedProfiles/index.js +63 -0
- package/dist/SupportedProfiles/index.js.map +1 -0
- package/dist/System/index.d.ts +26 -0
- package/dist/System/index.js +52 -0
- package/dist/System/index.js.map +1 -0
- package/dist/Systems/index.d.ts +44 -0
- package/dist/Systems/index.js +63 -0
- package/dist/Systems/index.js.map +1 -0
- package/dist/SystemsPolicies/index.d.ts +50 -0
- package/dist/SystemsPolicies/index.js +64 -0
- package/dist/SystemsPolicies/index.js.map +1 -0
- package/dist/Tailoring/index.d.ts +32 -0
- package/dist/Tailoring/index.js +53 -0
- package/dist/Tailoring/index.js.map +1 -0
- package/dist/TailoringFile/index.d.ts +32 -0
- package/dist/TailoringFile/index.js +53 -0
- package/dist/TailoringFile/index.js.map +1 -0
- package/dist/TailoringRules/index.d.ts +56 -0
- package/dist/TailoringRules/index.js +65 -0
- package/dist/TailoringRules/index.js.map +1 -0
- package/dist/Tailorings/index.d.ts +50 -0
- package/dist/Tailorings/index.js +64 -0
- package/dist/Tailorings/index.js.map +1 -0
- package/dist/UnassignRule/index.d.ts +38 -0
- package/dist/UnassignRule/index.js +54 -0
- package/dist/UnassignRule/index.js.map +1 -0
- package/dist/UnassignSystem/index.d.ts +32 -0
- package/dist/UnassignSystem/index.js +53 -0
- package/dist/UnassignSystem/index.js.map +1 -0
- package/dist/UpdatePolicy/index.d.ts +33 -0
- package/dist/UpdatePolicy/index.js +54 -0
- package/dist/UpdatePolicy/index.js.map +1 -0
- package/dist/ValueDefinition/index.d.ts +32 -0
- package/dist/ValueDefinition/index.js +53 -0
- package/dist/ValueDefinition/index.js.map +1 -0
- package/dist/ValueDefinitions/index.d.ts +50 -0
- package/dist/ValueDefinitions/index.js +64 -0
- package/dist/ValueDefinitions/index.js.map +1 -0
- package/dist/api.d.ts +4310 -0
- package/dist/api.js +4565 -0
- package/dist/api.js.map +1 -0
- package/dist/base.d.ts +54 -0
- package/dist/base.js +67 -0
- package/dist/base.js.map +1 -0
- package/dist/common.d.ts +65 -0
- package/dist/common.js +207 -0
- package/dist/common.js.map +1 -0
- package/dist/configuration.d.ts +83 -0
- package/dist/configuration.js +45 -0
- package/dist/configuration.js.map +1 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.js +106 -0
- package/dist/index.js.map +1 -0
- package/dist/types/index.d.ts +1103 -0
- package/dist/types/index.js +31 -0
- package/dist/types/index.js.map +1 -0
- package/doc/.nojekyll +1 -0
- package/doc/README.md +69 -0
- package/doc/interfaces/AssignRulesRequest.md +27 -0
- package/doc/interfaces/CreatePolicy201Response.md +27 -0
- package/doc/interfaces/CreatePolicy201ResponseData.md +27 -0
- package/doc/interfaces/Errors.md +27 -0
- package/doc/interfaces/Links.md +80 -0
- package/doc/interfaces/Metadata.md +97 -0
- package/doc/interfaces/Policies200Response.md +57 -0
- package/doc/interfaces/Policy.md +195 -0
- package/doc/interfaces/PolicyUpdate.md +63 -0
- package/doc/interfaces/Profile.md +110 -0
- package/doc/interfaces/Profile200Response.md +27 -0
- package/doc/interfaces/Profile200ResponseData.md +27 -0
- package/doc/interfaces/Profiles200Response.md +57 -0
- package/doc/interfaces/Rule.md +161 -0
- package/doc/interfaces/Rule200Response.md +27 -0
- package/doc/interfaces/Rule200ResponseData.md +27 -0
- package/doc/interfaces/RuleGroup.md +127 -0
- package/doc/interfaces/RuleGroup200Response.md +27 -0
- package/doc/interfaces/RuleGroup200ResponseData.md +27 -0
- package/doc/interfaces/RuleGroups200Response.md +57 -0
- package/doc/interfaces/Rules200Response.md +57 -0
- package/doc/interfaces/SecurityGuide.md +127 -0
- package/doc/interfaces/SecurityGuide200Response.md +27 -0
- package/doc/interfaces/SecurityGuide200ResponseData.md +27 -0
- package/doc/interfaces/SecurityGuides200Response.md +57 -0
- package/doc/interfaces/SupportedProfile.md +127 -0
- package/doc/interfaces/SupportedProfiles200Response.md +57 -0
- package/doc/interfaces/System.md +215 -0
- package/doc/interfaces/System200Response.md +27 -0
- package/doc/interfaces/System200ResponseData.md +27 -0
- package/doc/interfaces/Systems200Response.md +57 -0
- package/doc/interfaces/Tailoring.md +110 -0
- package/doc/interfaces/Tailoring200Response.md +27 -0
- package/doc/interfaces/Tailoring200ResponseData.md +27 -0
- package/doc/interfaces/TailoringFile.md +33 -0
- package/doc/interfaces/Tailorings200Response.md +57 -0
- package/doc/interfaces/ValueDefinition.md +127 -0
- package/doc/interfaces/ValueDefinition200Response.md +27 -0
- package/doc/interfaces/ValueDefinition200ResponseData.md +27 -0
- package/doc/interfaces/ValueDefinitions200Response.md +57 -0
- package/doc/modules.md +1306 -0
- package/package.json +30 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { AxiosRequestConfig } from 'axios';
|
|
2
|
+
import type { RequestArgs } from '@redhat-cloud-services/javascript-clients-shared/common';
|
|
3
|
+
export type ProfileRuleParams = {
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* @type { any }
|
|
7
|
+
* @memberof ProfileRuleApi
|
|
8
|
+
*/
|
|
9
|
+
securityGuideId: any;
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
* @type { any }
|
|
13
|
+
* @memberof ProfileRuleApi
|
|
14
|
+
*/
|
|
15
|
+
profileId: any;
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @type { any }
|
|
19
|
+
* @memberof ProfileRuleApi
|
|
20
|
+
*/
|
|
21
|
+
id: any;
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type { any }
|
|
25
|
+
* @memberof ProfileRuleApi
|
|
26
|
+
*/
|
|
27
|
+
xRHIDENTITY?: any;
|
|
28
|
+
options?: AxiosRequestConfig;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Returns a Rule assigned to a Profile
|
|
32
|
+
* @summary Request a Rule assigned to a Profile
|
|
33
|
+
* @param {ProfileRuleParams} config with all available params.
|
|
34
|
+
* @param {*} [options] Override http request option.
|
|
35
|
+
* @throws {RequiredError}
|
|
36
|
+
*/
|
|
37
|
+
export declare const profileRuleParamCreator: (...config: ([ProfileRuleParams] | [any, any, any, any, AxiosRequestConfig])) => Promise<RequestArgs>;
|
|
38
|
+
export default profileRuleParamCreator;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.profileRuleParamCreator = 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 isProfileRuleObjectParams = function (params) {
|
|
8
|
+
return params.length === 1 && Object.prototype.hasOwnProperty.call(params, 'securityGuideId') && Object.prototype.hasOwnProperty.call(params, 'profileId') && Object.prototype.hasOwnProperty.call(params, 'id') && true;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Returns a Rule assigned to a Profile
|
|
12
|
+
* @summary Request a Rule assigned to a Profile
|
|
13
|
+
* @param {ProfileRuleParams} config with all available params.
|
|
14
|
+
* @param {*} [options] Override http request option.
|
|
15
|
+
* @throws {RequiredError}
|
|
16
|
+
*/
|
|
17
|
+
var profileRuleParamCreator = 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, securityGuideId, profileId, id, xRHIDENTITY, _a, options, localVarPath, localVarUrlObj, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter;
|
|
24
|
+
return tslib_1.__generator(this, function (_b) {
|
|
25
|
+
params = isProfileRuleObjectParams(config) ? config[0] : ['securityGuideId', 'profileId', '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
|
+
securityGuideId = params.securityGuideId, profileId = params.profileId, id = params.id, xRHIDENTITY = params.xRHIDENTITY, _a = params.options, options = _a === void 0 ? {} : _a;
|
|
30
|
+
localVarPath = "/security_guides/{security_guide_id}/profiles/{profile_id}/rules/{id}"
|
|
31
|
+
.replace("{".concat("security_guide_id", "}"), encodeURIComponent(String(securityGuideId)))
|
|
32
|
+
.replace("{".concat("profile_id", "}"), encodeURIComponent(String(profileId)))
|
|
33
|
+
.replace("{".concat("id", "}"), encodeURIComponent(String(id)));
|
|
34
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
35
|
+
localVarRequestOptions = tslib_1.__assign({ method: 'GET' }, options);
|
|
36
|
+
localVarHeaderParameter = {};
|
|
37
|
+
localVarQueryParameter = {};
|
|
38
|
+
if (xRHIDENTITY != null) {
|
|
39
|
+
localVarHeaderParameter['X-RH-IDENTITY'] = typeof xRHIDENTITY === 'string'
|
|
40
|
+
? xRHIDENTITY
|
|
41
|
+
: JSON.stringify(xRHIDENTITY);
|
|
42
|
+
}
|
|
43
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
44
|
+
localVarRequestOptions.headers = tslib_1.__assign(tslib_1.__assign({}, localVarHeaderParameter), options.headers);
|
|
45
|
+
return [2 /*return*/, {
|
|
46
|
+
urlObj: localVarUrlObj,
|
|
47
|
+
options: localVarRequestOptions,
|
|
48
|
+
}];
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
exports.profileRuleParamCreator = profileRuleParamCreator;
|
|
53
|
+
exports.default = exports.profileRuleParamCreator;
|
|
54
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../ProfileRule/index.ts"],"names":[],"mappings":";;;;AAEA,aAAa;AACb,kFAA4T;AAsC5T,IAAM,yBAAyB,GAAG,UAAC,MAAuC;IACxE,OAAO,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,iBAAiB,CAAC,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,WAAW,CAAC,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,IAAI,CAAA;AAC1N,CAAC,CAAA;AACD;;;;;;EAME;AACK,IAAM,uBAAuB,GAAG;IAAO,gBAA2E;SAA3E,UAA2E,EAA3E,qBAA2E,EAA3E,IAA2E;QAA3E,2BAA2E;;;;;YAC/G,MAAM,GAAG,yBAAyB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,iBAAiB,EAAE,WAAW,EAAE,IAAI,EAAE,aAAa,EAAE,SAAS,CAAC,CAA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E,cAAc;oBACtB,OAAO,EAAE,sBAAsB;iBAClC,EAAC;;;CACL,CAAA;AA5BY,QAAA,uBAAuB,2BA4BnC;AAED,kBAAe,+BAAuB,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { AxiosRequestConfig } from 'axios';
|
|
2
|
+
import type { RequestArgs } from '@redhat-cloud-services/javascript-clients-shared/common';
|
|
3
|
+
export type ProfileRulesParams = {
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* @type { any }
|
|
7
|
+
* @memberof ProfileRulesApi
|
|
8
|
+
*/
|
|
9
|
+
securityGuideId: any;
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
* @type { any }
|
|
13
|
+
* @memberof ProfileRulesApi
|
|
14
|
+
*/
|
|
15
|
+
profileId: any;
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @type { any }
|
|
19
|
+
* @memberof ProfileRulesApi
|
|
20
|
+
*/
|
|
21
|
+
xRHIDENTITY?: any;
|
|
22
|
+
/**
|
|
23
|
+
* Number of items to return per page
|
|
24
|
+
* @type { any }
|
|
25
|
+
* @memberof ProfileRulesApi
|
|
26
|
+
*/
|
|
27
|
+
limit?: any;
|
|
28
|
+
/**
|
|
29
|
+
* Offset of first item of paginated response
|
|
30
|
+
* @type { any }
|
|
31
|
+
* @memberof ProfileRulesApi
|
|
32
|
+
*/
|
|
33
|
+
offset?: any;
|
|
34
|
+
/**
|
|
35
|
+
* 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.
|
|
36
|
+
* @type { any }
|
|
37
|
+
* @memberof ProfileRulesApi
|
|
38
|
+
*/
|
|
39
|
+
sortBy?: any;
|
|
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.: `(version=0.1.47 AND os_major_verision=8)`)
|
|
42
|
+
* @type { any }
|
|
43
|
+
* @memberof ProfileRulesApi
|
|
44
|
+
*/
|
|
45
|
+
filter?: any;
|
|
46
|
+
options?: AxiosRequestConfig;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Lists Rules assigned to a Profile
|
|
50
|
+
* @summary Request Rules assigned to a Profile
|
|
51
|
+
* @param {ProfileRulesParams} config with all available params.
|
|
52
|
+
* @param {*} [options] Override http request option.
|
|
53
|
+
* @throws {RequiredError}
|
|
54
|
+
*/
|
|
55
|
+
export declare const profileRulesParamCreator: (...config: ([ProfileRulesParams] | [any, any, any, any, any, any, any, AxiosRequestConfig])) => Promise<RequestArgs>;
|
|
56
|
+
export default profileRulesParamCreator;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.profileRulesParamCreator = 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 isProfileRulesObjectParams = function (params) {
|
|
8
|
+
return params.length === 1 && Object.prototype.hasOwnProperty.call(params, 'securityGuideId') && Object.prototype.hasOwnProperty.call(params, 'profileId') && true && true && true && true && true;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Lists Rules assigned to a Profile
|
|
12
|
+
* @summary Request Rules assigned to a Profile
|
|
13
|
+
* @param {ProfileRulesParams} config with all available params.
|
|
14
|
+
* @param {*} [options] Override http request option.
|
|
15
|
+
* @throws {RequiredError}
|
|
16
|
+
*/
|
|
17
|
+
var profileRulesParamCreator = 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, securityGuideId, profileId, xRHIDENTITY, limit, offset, sortBy, filter, _a, options, localVarPath, localVarUrlObj, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter;
|
|
24
|
+
return tslib_1.__generator(this, function (_b) {
|
|
25
|
+
params = isProfileRulesObjectParams(config) ? config[0] : ['securityGuideId', 'profileId', '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
|
+
securityGuideId = params.securityGuideId, profileId = params.profileId, 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 = "/security_guides/{security_guide_id}/profiles/{profile_id}/rules"
|
|
31
|
+
.replace("{".concat("security_guide_id", "}"), encodeURIComponent(String(securityGuideId)))
|
|
32
|
+
.replace("{".concat("profile_id", "}"), encodeURIComponent(String(profileId)));
|
|
33
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
34
|
+
localVarRequestOptions = tslib_1.__assign({ method: 'GET' }, options);
|
|
35
|
+
localVarHeaderParameter = {};
|
|
36
|
+
localVarQueryParameter = {};
|
|
37
|
+
if (limit !== undefined) {
|
|
38
|
+
localVarQueryParameter['limit'] = limit;
|
|
39
|
+
}
|
|
40
|
+
if (offset !== undefined) {
|
|
41
|
+
localVarQueryParameter['offset'] = offset;
|
|
42
|
+
}
|
|
43
|
+
if (sortBy !== undefined) {
|
|
44
|
+
localVarQueryParameter['sort_by'] = sortBy;
|
|
45
|
+
}
|
|
46
|
+
if (filter !== undefined) {
|
|
47
|
+
localVarQueryParameter['filter'] = filter;
|
|
48
|
+
}
|
|
49
|
+
if (xRHIDENTITY != null) {
|
|
50
|
+
localVarHeaderParameter['X-RH-IDENTITY'] = typeof xRHIDENTITY === 'string'
|
|
51
|
+
? xRHIDENTITY
|
|
52
|
+
: JSON.stringify(xRHIDENTITY);
|
|
53
|
+
}
|
|
54
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
55
|
+
localVarRequestOptions.headers = tslib_1.__assign(tslib_1.__assign({}, localVarHeaderParameter), options.headers);
|
|
56
|
+
return [2 /*return*/, {
|
|
57
|
+
urlObj: localVarUrlObj,
|
|
58
|
+
options: localVarRequestOptions,
|
|
59
|
+
}];
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
exports.profileRulesParamCreator = profileRulesParamCreator;
|
|
64
|
+
exports.default = exports.profileRulesParamCreator;
|
|
65
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../ProfileRules/index.ts"],"names":[],"mappings":";;;;AAEA,aAAa;AACb,kFAA4T;AAwD5T,IAAM,0BAA0B,GAAG,UAAC,MAAwC;IAC1E,OAAO,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,iBAAiB,CAAC,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,WAAW,CAAC,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,CAAA;AACpM,CAAC,CAAA;AACD;;;;;;EAME;AACK,IAAM,wBAAwB,GAAG;IAAO,gBAA2F;SAA3F,UAA2F,EAA3F,qBAA2F,EAA3F,IAA2F;QAA3F,2BAA2F;;;;;YAChI,MAAM,GAAG,0BAA0B,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,C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,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;AA3CY,QAAA,wBAAwB,4BA2CpC;AAED,kBAAe,gCAAwB,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { AxiosRequestConfig } from 'axios';
|
|
2
|
+
import type { RequestArgs } from '@redhat-cloud-services/javascript-clients-shared/common';
|
|
3
|
+
export type ProfilesParams = {
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* @type { any }
|
|
7
|
+
* @memberof ProfilesApi
|
|
8
|
+
*/
|
|
9
|
+
securityGuideId: any;
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
* @type { any }
|
|
13
|
+
* @memberof ProfilesApi
|
|
14
|
+
*/
|
|
15
|
+
xRHIDENTITY?: any;
|
|
16
|
+
/**
|
|
17
|
+
* Number of items to return per page
|
|
18
|
+
* @type { any }
|
|
19
|
+
* @memberof ProfilesApi
|
|
20
|
+
*/
|
|
21
|
+
limit?: any;
|
|
22
|
+
/**
|
|
23
|
+
* Offset of first item of paginated response
|
|
24
|
+
* @type { any }
|
|
25
|
+
* @memberof ProfilesApi
|
|
26
|
+
*/
|
|
27
|
+
offset?: any;
|
|
28
|
+
/**
|
|
29
|
+
* 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.
|
|
30
|
+
* @type { any }
|
|
31
|
+
* @memberof ProfilesApi
|
|
32
|
+
*/
|
|
33
|
+
sortBy?: any;
|
|
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.: `(version=0.1.47 AND os_major_verision=8)`)
|
|
36
|
+
* @type { any }
|
|
37
|
+
* @memberof ProfilesApi
|
|
38
|
+
*/
|
|
39
|
+
filter?: any;
|
|
40
|
+
options?: AxiosRequestConfig;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Lists Profiles
|
|
44
|
+
* @summary Request Profiles
|
|
45
|
+
* @param {ProfilesParams} config with all available params.
|
|
46
|
+
* @param {*} [options] Override http request option.
|
|
47
|
+
* @throws {RequiredError}
|
|
48
|
+
*/
|
|
49
|
+
export declare const profilesParamCreator: (...config: ([ProfilesParams] | [any, any, any, any, any, any, AxiosRequestConfig])) => Promise<RequestArgs>;
|
|
50
|
+
export default profilesParamCreator;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.profilesParamCreator = 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 isProfilesObjectParams = function (params) {
|
|
8
|
+
return params.length === 1 && Object.prototype.hasOwnProperty.call(params, 'securityGuideId') && true && true && true && true && true;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Lists Profiles
|
|
12
|
+
* @summary Request Profiles
|
|
13
|
+
* @param {ProfilesParams} config with all available params.
|
|
14
|
+
* @param {*} [options] Override http request option.
|
|
15
|
+
* @throws {RequiredError}
|
|
16
|
+
*/
|
|
17
|
+
var profilesParamCreator = 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, securityGuideId, xRHIDENTITY, limit, offset, sortBy, filter, _a, options, localVarPath, localVarUrlObj, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter;
|
|
24
|
+
return tslib_1.__generator(this, function (_b) {
|
|
25
|
+
params = isProfilesObjectParams(config) ? config[0] : ['securityGuideId', '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
|
+
securityGuideId = params.securityGuideId, 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 = "/security_guides/{security_guide_id}/profiles"
|
|
31
|
+
.replace("{".concat("security_guide_id", "}"), encodeURIComponent(String(securityGuideId)));
|
|
32
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
33
|
+
localVarRequestOptions = tslib_1.__assign({ method: 'GET' }, options);
|
|
34
|
+
localVarHeaderParameter = {};
|
|
35
|
+
localVarQueryParameter = {};
|
|
36
|
+
if (limit !== undefined) {
|
|
37
|
+
localVarQueryParameter['limit'] = limit;
|
|
38
|
+
}
|
|
39
|
+
if (offset !== undefined) {
|
|
40
|
+
localVarQueryParameter['offset'] = offset;
|
|
41
|
+
}
|
|
42
|
+
if (sortBy !== undefined) {
|
|
43
|
+
localVarQueryParameter['sort_by'] = sortBy;
|
|
44
|
+
}
|
|
45
|
+
if (filter !== undefined) {
|
|
46
|
+
localVarQueryParameter['filter'] = filter;
|
|
47
|
+
}
|
|
48
|
+
if (xRHIDENTITY != null) {
|
|
49
|
+
localVarHeaderParameter['X-RH-IDENTITY'] = typeof xRHIDENTITY === 'string'
|
|
50
|
+
? xRHIDENTITY
|
|
51
|
+
: JSON.stringify(xRHIDENTITY);
|
|
52
|
+
}
|
|
53
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
54
|
+
localVarRequestOptions.headers = tslib_1.__assign(tslib_1.__assign({}, localVarHeaderParameter), options.headers);
|
|
55
|
+
return [2 /*return*/, {
|
|
56
|
+
urlObj: localVarUrlObj,
|
|
57
|
+
options: localVarRequestOptions,
|
|
58
|
+
}];
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
exports.profilesParamCreator = profilesParamCreator;
|
|
63
|
+
exports.default = exports.profilesParamCreator;
|
|
64
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../Profiles/index.ts"],"names":[],"mappings":";;;;AAEA,aAAa;AACb,kFAA4T;AAkD5T,IAAM,sBAAsB,GAAG,UAAC,MAAoC;IAClE,OAAO,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,iBAAiB,CAAC,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,CAAA;AACvI,CAAC,CAAA;AACD;;;;;;EAME;AACK,IAAM,oBAAoB,GAAG;IAAO,gBAAkF;SAAlF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AAS,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;AA1CY,QAAA,oBAAoB,wBA0ChC;AAED,kBAAe,4BAAoB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { AxiosRequestConfig } from 'axios';
|
|
2
|
+
import type { RequestArgs } from '@redhat-cloud-services/javascript-clients-shared/common';
|
|
3
|
+
export type RuleParams = {
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* @type { any }
|
|
7
|
+
* @memberof RuleApi
|
|
8
|
+
*/
|
|
9
|
+
securityGuideId: any;
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
* @type { any }
|
|
13
|
+
* @memberof RuleApi
|
|
14
|
+
*/
|
|
15
|
+
id: any;
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @type { any }
|
|
19
|
+
* @memberof RuleApi
|
|
20
|
+
*/
|
|
21
|
+
xRHIDENTITY?: any;
|
|
22
|
+
options?: AxiosRequestConfig;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Returns a Rule
|
|
26
|
+
* @summary Request a Rule
|
|
27
|
+
* @param {RuleParams} config with all available params.
|
|
28
|
+
* @param {*} [options] Override http request option.
|
|
29
|
+
* @throws {RequiredError}
|
|
30
|
+
*/
|
|
31
|
+
export declare const ruleParamCreator: (...config: ([RuleParams] | [any, any, any, AxiosRequestConfig])) => Promise<RequestArgs>;
|
|
32
|
+
export default ruleParamCreator;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ruleParamCreator = 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 isRuleObjectParams = function (params) {
|
|
8
|
+
return params.length === 1 && Object.prototype.hasOwnProperty.call(params, 'securityGuideId') && Object.prototype.hasOwnProperty.call(params, 'id') && true;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Returns a Rule
|
|
12
|
+
* @summary Request a Rule
|
|
13
|
+
* @param {RuleParams} config with all available params.
|
|
14
|
+
* @param {*} [options] Override http request option.
|
|
15
|
+
* @throws {RequiredError}
|
|
16
|
+
*/
|
|
17
|
+
var ruleParamCreator = 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, securityGuideId, id, xRHIDENTITY, _a, options, localVarPath, localVarUrlObj, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter;
|
|
24
|
+
return tslib_1.__generator(this, function (_b) {
|
|
25
|
+
params = isRuleObjectParams(config) ? config[0] : ['securityGuideId', '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
|
+
securityGuideId = params.securityGuideId, id = params.id, xRHIDENTITY = params.xRHIDENTITY, _a = params.options, options = _a === void 0 ? {} : _a;
|
|
30
|
+
localVarPath = "/security_guides/{security_guide_id}/rules/{id}"
|
|
31
|
+
.replace("{".concat("security_guide_id", "}"), encodeURIComponent(String(securityGuideId)))
|
|
32
|
+
.replace("{".concat("id", "}"), encodeURIComponent(String(id)));
|
|
33
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
34
|
+
localVarRequestOptions = tslib_1.__assign({ method: 'GET' }, options);
|
|
35
|
+
localVarHeaderParameter = {};
|
|
36
|
+
localVarQueryParameter = {};
|
|
37
|
+
if (xRHIDENTITY != null) {
|
|
38
|
+
localVarHeaderParameter['X-RH-IDENTITY'] = typeof xRHIDENTITY === 'string'
|
|
39
|
+
? xRHIDENTITY
|
|
40
|
+
: JSON.stringify(xRHIDENTITY);
|
|
41
|
+
}
|
|
42
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
43
|
+
localVarRequestOptions.headers = tslib_1.__assign(tslib_1.__assign({}, localVarHeaderParameter), options.headers);
|
|
44
|
+
return [2 /*return*/, {
|
|
45
|
+
urlObj: localVarUrlObj,
|
|
46
|
+
options: localVarRequestOptions,
|
|
47
|
+
}];
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
exports.ruleParamCreator = ruleParamCreator;
|
|
52
|
+
exports.default = exports.ruleParamCreator;
|
|
53
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../Rule/index.ts"],"names":[],"mappings":";;;;AAEA,aAAa;AACb,kFAA4T;AAgC5T,IAAM,kBAAkB,GAAG,UAAC,MAAgC;IAC1D,OAAO,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,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,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;AA3BY,QAAA,gBAAgB,oBA2B5B;AAED,kBAAe,wBAAgB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { AxiosRequestConfig } from 'axios';
|
|
2
|
+
import type { RequestArgs } from '@redhat-cloud-services/javascript-clients-shared/common';
|
|
3
|
+
export type RuleGroupParams = {
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* @type { any }
|
|
7
|
+
* @memberof RuleGroupApi
|
|
8
|
+
*/
|
|
9
|
+
securityGuideId: any;
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
* @type { any }
|
|
13
|
+
* @memberof RuleGroupApi
|
|
14
|
+
*/
|
|
15
|
+
id: any;
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @type { any }
|
|
19
|
+
* @memberof RuleGroupApi
|
|
20
|
+
*/
|
|
21
|
+
xRHIDENTITY?: any;
|
|
22
|
+
options?: AxiosRequestConfig;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Returns a Rule Group
|
|
26
|
+
* @summary Request a Rule Group
|
|
27
|
+
* @param {RuleGroupParams} config with all available params.
|
|
28
|
+
* @param {*} [options] Override http request option.
|
|
29
|
+
* @throws {RequiredError}
|
|
30
|
+
*/
|
|
31
|
+
export declare const ruleGroupParamCreator: (...config: ([RuleGroupParams] | [any, any, any, AxiosRequestConfig])) => Promise<RequestArgs>;
|
|
32
|
+
export default ruleGroupParamCreator;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ruleGroupParamCreator = 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 isRuleGroupObjectParams = function (params) {
|
|
8
|
+
return params.length === 1 && Object.prototype.hasOwnProperty.call(params, 'securityGuideId') && Object.prototype.hasOwnProperty.call(params, 'id') && true;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Returns a Rule Group
|
|
12
|
+
* @summary Request a Rule Group
|
|
13
|
+
* @param {RuleGroupParams} config with all available params.
|
|
14
|
+
* @param {*} [options] Override http request option.
|
|
15
|
+
* @throws {RequiredError}
|
|
16
|
+
*/
|
|
17
|
+
var ruleGroupParamCreator = 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, securityGuideId, id, xRHIDENTITY, _a, options, localVarPath, localVarUrlObj, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter;
|
|
24
|
+
return tslib_1.__generator(this, function (_b) {
|
|
25
|
+
params = isRuleGroupObjectParams(config) ? config[0] : ['securityGuideId', '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
|
+
securityGuideId = params.securityGuideId, id = params.id, xRHIDENTITY = params.xRHIDENTITY, _a = params.options, options = _a === void 0 ? {} : _a;
|
|
30
|
+
localVarPath = "/security_guides/{security_guide_id}/rule_groups/{id}"
|
|
31
|
+
.replace("{".concat("security_guide_id", "}"), encodeURIComponent(String(securityGuideId)))
|
|
32
|
+
.replace("{".concat("id", "}"), encodeURIComponent(String(id)));
|
|
33
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
34
|
+
localVarRequestOptions = tslib_1.__assign({ method: 'GET' }, options);
|
|
35
|
+
localVarHeaderParameter = {};
|
|
36
|
+
localVarQueryParameter = {};
|
|
37
|
+
if (xRHIDENTITY != null) {
|
|
38
|
+
localVarHeaderParameter['X-RH-IDENTITY'] = typeof xRHIDENTITY === 'string'
|
|
39
|
+
? xRHIDENTITY
|
|
40
|
+
: JSON.stringify(xRHIDENTITY);
|
|
41
|
+
}
|
|
42
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
43
|
+
localVarRequestOptions.headers = tslib_1.__assign(tslib_1.__assign({}, localVarHeaderParameter), options.headers);
|
|
44
|
+
return [2 /*return*/, {
|
|
45
|
+
urlObj: localVarUrlObj,
|
|
46
|
+
options: localVarRequestOptions,
|
|
47
|
+
}];
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
exports.ruleGroupParamCreator = ruleGroupParamCreator;
|
|
52
|
+
exports.default = exports.ruleGroupParamCreator;
|
|
53
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../RuleGroup/index.ts"],"names":[],"mappings":";;;;AAEA,aAAa;AACb,kFAA4T;AAgC5T,IAAM,uBAAuB,GAAG,UAAC,MAAqC;IACpE,OAAO,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,iBAAiB,CAAC,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IA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ACb,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;AA3BY,QAAA,qBAAqB,yBA2BjC;AAED,kBAAe,6BAAqB,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { AxiosRequestConfig } from 'axios';
|
|
2
|
+
import type { RequestArgs } from '@redhat-cloud-services/javascript-clients-shared/common';
|
|
3
|
+
export type RuleGroupsParams = {
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* @type { any }
|
|
7
|
+
* @memberof RuleGroupsApi
|
|
8
|
+
*/
|
|
9
|
+
securityGuideId: any;
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
* @type { any }
|
|
13
|
+
* @memberof RuleGroupsApi
|
|
14
|
+
*/
|
|
15
|
+
xRHIDENTITY?: any;
|
|
16
|
+
/**
|
|
17
|
+
* Number of items to return per page
|
|
18
|
+
* @type { any }
|
|
19
|
+
* @memberof RuleGroupsApi
|
|
20
|
+
*/
|
|
21
|
+
limit?: any;
|
|
22
|
+
/**
|
|
23
|
+
* Offset of first item of paginated response
|
|
24
|
+
* @type { any }
|
|
25
|
+
* @memberof RuleGroupsApi
|
|
26
|
+
*/
|
|
27
|
+
offset?: any;
|
|
28
|
+
/**
|
|
29
|
+
* 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.
|
|
30
|
+
* @type { any }
|
|
31
|
+
* @memberof RuleGroupsApi
|
|
32
|
+
*/
|
|
33
|
+
sortBy?: any;
|
|
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 <br><br>(e.g.: `(version=0.1.47 AND os_major_verision=8)`)
|
|
36
|
+
* @type { any }
|
|
37
|
+
* @memberof RuleGroupsApi
|
|
38
|
+
*/
|
|
39
|
+
filter?: any;
|
|
40
|
+
options?: AxiosRequestConfig;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Lists Rule Groups
|
|
44
|
+
* @summary Request Rule Groups
|
|
45
|
+
* @param {RuleGroupsParams} config with all available params.
|
|
46
|
+
* @param {*} [options] Override http request option.
|
|
47
|
+
* @throws {RequiredError}
|
|
48
|
+
*/
|
|
49
|
+
export declare const ruleGroupsParamCreator: (...config: ([RuleGroupsParams] | [any, any, any, any, any, any, AxiosRequestConfig])) => Promise<RequestArgs>;
|
|
50
|
+
export default ruleGroupsParamCreator;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ruleGroupsParamCreator = 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 isRuleGroupsObjectParams = function (params) {
|
|
8
|
+
return params.length === 1 && Object.prototype.hasOwnProperty.call(params, 'securityGuideId') && true && true && true && true && true;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Lists Rule Groups
|
|
12
|
+
* @summary Request Rule Groups
|
|
13
|
+
* @param {RuleGroupsParams} config with all available params.
|
|
14
|
+
* @param {*} [options] Override http request option.
|
|
15
|
+
* @throws {RequiredError}
|
|
16
|
+
*/
|
|
17
|
+
var ruleGroupsParamCreator = 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, securityGuideId, xRHIDENTITY, limit, offset, sortBy, filter, _a, options, localVarPath, localVarUrlObj, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter;
|
|
24
|
+
return tslib_1.__generator(this, function (_b) {
|
|
25
|
+
params = isRuleGroupsObjectParams(config) ? config[0] : ['securityGuideId', '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
|
+
securityGuideId = params.securityGuideId, 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 = "/security_guides/{security_guide_id}/rule_groups"
|
|
31
|
+
.replace("{".concat("security_guide_id", "}"), encodeURIComponent(String(securityGuideId)));
|
|
32
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
33
|
+
localVarRequestOptions = tslib_1.__assign({ method: 'GET' }, options);
|
|
34
|
+
localVarHeaderParameter = {};
|
|
35
|
+
localVarQueryParameter = {};
|
|
36
|
+
if (limit !== undefined) {
|
|
37
|
+
localVarQueryParameter['limit'] = limit;
|
|
38
|
+
}
|
|
39
|
+
if (offset !== undefined) {
|
|
40
|
+
localVarQueryParameter['offset'] = offset;
|
|
41
|
+
}
|
|
42
|
+
if (sortBy !== undefined) {
|
|
43
|
+
localVarQueryParameter['sort_by'] = sortBy;
|
|
44
|
+
}
|
|
45
|
+
if (filter !== undefined) {
|
|
46
|
+
localVarQueryParameter['filter'] = filter;
|
|
47
|
+
}
|
|
48
|
+
if (xRHIDENTITY != null) {
|
|
49
|
+
localVarHeaderParameter['X-RH-IDENTITY'] = typeof xRHIDENTITY === 'string'
|
|
50
|
+
? xRHIDENTITY
|
|
51
|
+
: JSON.stringify(xRHIDENTITY);
|
|
52
|
+
}
|
|
53
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
54
|
+
localVarRequestOptions.headers = tslib_1.__assign(tslib_1.__assign({}, localVarHeaderParameter), options.headers);
|
|
55
|
+
return [2 /*return*/, {
|
|
56
|
+
urlObj: localVarUrlObj,
|
|
57
|
+
options: localVarRequestOptions,
|
|
58
|
+
}];
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
exports.ruleGroupsParamCreator = ruleGroupsParamCreator;
|
|
63
|
+
exports.default = exports.ruleGroupsParamCreator;
|
|
64
|
+
//# sourceMappingURL=index.js.map
|