@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.
Files changed (164) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/LICENSE +201 -0
  3. package/README.md +67 -0
  4. package/dist/AssignRule/index.d.ts +38 -0
  5. package/dist/AssignRule/index.js +54 -0
  6. package/dist/AssignRule/index.js.map +1 -0
  7. package/dist/AssignRules/index.d.ts +40 -0
  8. package/dist/AssignRules/index.js +56 -0
  9. package/dist/AssignRules/index.js.map +1 -0
  10. package/dist/AssignSystem/index.d.ts +32 -0
  11. package/dist/AssignSystem/index.js +53 -0
  12. package/dist/AssignSystem/index.js.map +1 -0
  13. package/dist/AssignSystems/index.d.ts +34 -0
  14. package/dist/AssignSystems/index.js +55 -0
  15. package/dist/AssignSystems/index.js.map +1 -0
  16. package/dist/CreatePolicy/index.d.ts +27 -0
  17. package/dist/CreatePolicy/index.js +53 -0
  18. package/dist/CreatePolicy/index.js.map +1 -0
  19. package/dist/DeletePolicy/index.d.ts +26 -0
  20. package/dist/DeletePolicy/index.js +52 -0
  21. package/dist/DeletePolicy/index.js.map +1 -0
  22. package/dist/Policies/index.d.ts +44 -0
  23. package/dist/Policies/index.js +63 -0
  24. package/dist/Policies/index.js.map +1 -0
  25. package/dist/Policy/index.d.ts +26 -0
  26. package/dist/Policy/index.js +52 -0
  27. package/dist/Policy/index.js.map +1 -0
  28. package/dist/PolicySystems/index.d.ts +50 -0
  29. package/dist/PolicySystems/index.js +64 -0
  30. package/dist/PolicySystems/index.js.map +1 -0
  31. package/dist/Profile/index.d.ts +32 -0
  32. package/dist/Profile/index.js +53 -0
  33. package/dist/Profile/index.js.map +1 -0
  34. package/dist/ProfileRule/index.d.ts +38 -0
  35. package/dist/ProfileRule/index.js +54 -0
  36. package/dist/ProfileRule/index.js.map +1 -0
  37. package/dist/ProfileRules/index.d.ts +56 -0
  38. package/dist/ProfileRules/index.js +65 -0
  39. package/dist/ProfileRules/index.js.map +1 -0
  40. package/dist/Profiles/index.d.ts +50 -0
  41. package/dist/Profiles/index.js +64 -0
  42. package/dist/Profiles/index.js.map +1 -0
  43. package/dist/Rule/index.d.ts +32 -0
  44. package/dist/Rule/index.js +53 -0
  45. package/dist/Rule/index.js.map +1 -0
  46. package/dist/RuleGroup/index.d.ts +32 -0
  47. package/dist/RuleGroup/index.js +53 -0
  48. package/dist/RuleGroup/index.js.map +1 -0
  49. package/dist/RuleGroups/index.d.ts +50 -0
  50. package/dist/RuleGroups/index.js +64 -0
  51. package/dist/RuleGroups/index.js.map +1 -0
  52. package/dist/Rules/index.d.ts +50 -0
  53. package/dist/Rules/index.js +64 -0
  54. package/dist/Rules/index.js.map +1 -0
  55. package/dist/SecurityGuide/index.d.ts +26 -0
  56. package/dist/SecurityGuide/index.js +52 -0
  57. package/dist/SecurityGuide/index.js.map +1 -0
  58. package/dist/SecurityGuideRuleTree/index.d.ts +26 -0
  59. package/dist/SecurityGuideRuleTree/index.js +52 -0
  60. package/dist/SecurityGuideRuleTree/index.js.map +1 -0
  61. package/dist/SecurityGuides/index.d.ts +44 -0
  62. package/dist/SecurityGuides/index.js +63 -0
  63. package/dist/SecurityGuides/index.js.map +1 -0
  64. package/dist/SupportedProfiles/index.d.ts +44 -0
  65. package/dist/SupportedProfiles/index.js +63 -0
  66. package/dist/SupportedProfiles/index.js.map +1 -0
  67. package/dist/System/index.d.ts +26 -0
  68. package/dist/System/index.js +52 -0
  69. package/dist/System/index.js.map +1 -0
  70. package/dist/Systems/index.d.ts +44 -0
  71. package/dist/Systems/index.js +63 -0
  72. package/dist/Systems/index.js.map +1 -0
  73. package/dist/SystemsPolicies/index.d.ts +50 -0
  74. package/dist/SystemsPolicies/index.js +64 -0
  75. package/dist/SystemsPolicies/index.js.map +1 -0
  76. package/dist/Tailoring/index.d.ts +32 -0
  77. package/dist/Tailoring/index.js +53 -0
  78. package/dist/Tailoring/index.js.map +1 -0
  79. package/dist/TailoringFile/index.d.ts +32 -0
  80. package/dist/TailoringFile/index.js +53 -0
  81. package/dist/TailoringFile/index.js.map +1 -0
  82. package/dist/TailoringRules/index.d.ts +56 -0
  83. package/dist/TailoringRules/index.js +65 -0
  84. package/dist/TailoringRules/index.js.map +1 -0
  85. package/dist/Tailorings/index.d.ts +50 -0
  86. package/dist/Tailorings/index.js +64 -0
  87. package/dist/Tailorings/index.js.map +1 -0
  88. package/dist/UnassignRule/index.d.ts +38 -0
  89. package/dist/UnassignRule/index.js +54 -0
  90. package/dist/UnassignRule/index.js.map +1 -0
  91. package/dist/UnassignSystem/index.d.ts +32 -0
  92. package/dist/UnassignSystem/index.js +53 -0
  93. package/dist/UnassignSystem/index.js.map +1 -0
  94. package/dist/UpdatePolicy/index.d.ts +33 -0
  95. package/dist/UpdatePolicy/index.js +54 -0
  96. package/dist/UpdatePolicy/index.js.map +1 -0
  97. package/dist/ValueDefinition/index.d.ts +32 -0
  98. package/dist/ValueDefinition/index.js +53 -0
  99. package/dist/ValueDefinition/index.js.map +1 -0
  100. package/dist/ValueDefinitions/index.d.ts +50 -0
  101. package/dist/ValueDefinitions/index.js +64 -0
  102. package/dist/ValueDefinitions/index.js.map +1 -0
  103. package/dist/api.d.ts +4310 -0
  104. package/dist/api.js +4565 -0
  105. package/dist/api.js.map +1 -0
  106. package/dist/base.d.ts +54 -0
  107. package/dist/base.js +67 -0
  108. package/dist/base.js.map +1 -0
  109. package/dist/common.d.ts +65 -0
  110. package/dist/common.js +207 -0
  111. package/dist/common.js.map +1 -0
  112. package/dist/configuration.d.ts +83 -0
  113. package/dist/configuration.js +45 -0
  114. package/dist/configuration.js.map +1 -0
  115. package/dist/index.d.ts +34 -0
  116. package/dist/index.js +106 -0
  117. package/dist/index.js.map +1 -0
  118. package/dist/types/index.d.ts +1103 -0
  119. package/dist/types/index.js +31 -0
  120. package/dist/types/index.js.map +1 -0
  121. package/doc/.nojekyll +1 -0
  122. package/doc/README.md +69 -0
  123. package/doc/interfaces/AssignRulesRequest.md +27 -0
  124. package/doc/interfaces/CreatePolicy201Response.md +27 -0
  125. package/doc/interfaces/CreatePolicy201ResponseData.md +27 -0
  126. package/doc/interfaces/Errors.md +27 -0
  127. package/doc/interfaces/Links.md +80 -0
  128. package/doc/interfaces/Metadata.md +97 -0
  129. package/doc/interfaces/Policies200Response.md +57 -0
  130. package/doc/interfaces/Policy.md +195 -0
  131. package/doc/interfaces/PolicyUpdate.md +63 -0
  132. package/doc/interfaces/Profile.md +110 -0
  133. package/doc/interfaces/Profile200Response.md +27 -0
  134. package/doc/interfaces/Profile200ResponseData.md +27 -0
  135. package/doc/interfaces/Profiles200Response.md +57 -0
  136. package/doc/interfaces/Rule.md +161 -0
  137. package/doc/interfaces/Rule200Response.md +27 -0
  138. package/doc/interfaces/Rule200ResponseData.md +27 -0
  139. package/doc/interfaces/RuleGroup.md +127 -0
  140. package/doc/interfaces/RuleGroup200Response.md +27 -0
  141. package/doc/interfaces/RuleGroup200ResponseData.md +27 -0
  142. package/doc/interfaces/RuleGroups200Response.md +57 -0
  143. package/doc/interfaces/Rules200Response.md +57 -0
  144. package/doc/interfaces/SecurityGuide.md +127 -0
  145. package/doc/interfaces/SecurityGuide200Response.md +27 -0
  146. package/doc/interfaces/SecurityGuide200ResponseData.md +27 -0
  147. package/doc/interfaces/SecurityGuides200Response.md +57 -0
  148. package/doc/interfaces/SupportedProfile.md +127 -0
  149. package/doc/interfaces/SupportedProfiles200Response.md +57 -0
  150. package/doc/interfaces/System.md +215 -0
  151. package/doc/interfaces/System200Response.md +27 -0
  152. package/doc/interfaces/System200ResponseData.md +27 -0
  153. package/doc/interfaces/Systems200Response.md +57 -0
  154. package/doc/interfaces/Tailoring.md +110 -0
  155. package/doc/interfaces/Tailoring200Response.md +27 -0
  156. package/doc/interfaces/Tailoring200ResponseData.md +27 -0
  157. package/doc/interfaces/TailoringFile.md +33 -0
  158. package/doc/interfaces/Tailorings200Response.md +57 -0
  159. package/doc/interfaces/ValueDefinition.md +127 -0
  160. package/doc/interfaces/ValueDefinition200Response.md +27 -0
  161. package/doc/interfaces/ValueDefinition200ResponseData.md +27 -0
  162. package/doc/interfaces/ValueDefinitions200Response.md +57 -0
  163. package/doc/modules.md +1306 -0
  164. 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,CAAC,MAAM,CAAC,UAAC,GAAG,EAAE,IAAI,EAAE,KAAK;;gBAAK,OAAA,uCAAM,GAAG,gBAAG,IAAI,IAAG,MAAM,CAAC,KAAK,CAAC,OAAG;YAAnC,CAAmC,EAAE,EAAE,CAAsB,CAAC;YACnN,eAAe,GAA+C,MAAM,gBAArD,EAAE,SAAS,GAAoC,MAAM,UAA1C,EAAE,EAAE,GAAgC,MAAM,GAAtC,EAAE,WAAW,GAAmB,MAAM,YAAzB,EAAE,KAAiB,MAAM,QAAX,EAAZ,OAAO,mBAAG,EAAE,KAAA,CAAY;YACvE,YAAY,GAAG,uEAAuE;iBACvF,OAAO,CAAC,WAAI,mBAAmB,MAAG,EAAE,kBAAkB,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC;iBAChF,OAAO,CAAC,WAAI,YAAY,MAAG,EAAE,kBAAkB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;iBACnE,OAAO,CAAC,WAAI,IAAI,MAAG,EAAE,kBAAkB,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;YAEpD,cAAc,GAAG,IAAI,GAAG,CAAC,YAAY,EAAE,uBAAc,CAAC,CAAC;YACvD,sBAAsB,sBAAK,MAAM,EAAE,KAAe,IAAK,OAAO,CAAC,CAAC;YAChE,uBAAuB,GAAG,EAAS,CAAC;YACpC,sBAAsB,GAAG,EAAS,CAAC;YAEzC,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;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,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M,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;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
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Ac,GAAG,IAAI,GAAG,CAAC,YAAY,EAAE,uBAAc,CAAC,CAAC;YACvD,sBAAsB,sBAAK,MAAM,EAAE,KAAe,IAAK,OAAO,CAAC,CAAC;YAChE,uBAAuB,GAAG,EAAS,CAAC;YACpC,sBAAsB,GAAG,EAAS,CAAC;YAEzC,IAAI,KAAK,KAAK,SAAS,EAAE;gBACrB,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;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,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,iBAAiB,CAAC,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,IAAI,CAAA;AAC7J,CAAC,CAAA;AACD;;;;;;EAME;AACK,IAAM,gBAAgB,GAAG;IAAO,gBAA+D;SAA/D,UAA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B,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
+ //# s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,CAAC,CAAC;YAEpD,cAAc,GAAG,IAAI,GAAG,CAAC,YAAY,EAAE,uBAAc,CAAC,CAAC;YACvD,sBAAsB,sBAAK,MAAM,EAAE,KAAe,IAAK,OAAO,CAAC,CAAC;YAChE,uBAAuB,GAAG,EAAS,CAAC;YACpC,sBAAsB,GAAG,EAAS,CAAC;YAEzC,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;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