@redhat-cloud-services/compliance-client 0.2.3 → 1.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 (39) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +7 -8
  3. package/dist/CreateTailoring/index.d.ts +33 -0
  4. package/dist/CreateTailoring/index.js +54 -0
  5. package/dist/CreateTailoring/index.js.map +1 -0
  6. package/dist/PolicySystems/index.d.ts +1 -1
  7. package/dist/PolicySystemsOS/index.d.ts +1 -1
  8. package/dist/ProfileTree/index.d.ts +32 -0
  9. package/dist/ProfileTree/index.js +53 -0
  10. package/dist/ProfileTree/index.js.map +1 -0
  11. package/dist/ReportRuleResults/index.d.ts +1 -1
  12. package/dist/ReportSystems/index.d.ts +1 -1
  13. package/dist/ReportSystemsOS/index.d.ts +1 -1
  14. package/dist/ReportTestResults/index.d.ts +7 -1
  15. package/dist/ReportTestResults/index.js +7 -4
  16. package/dist/ReportTestResults/index.js.map +1 -1
  17. package/dist/ReportTestResultsSG/index.d.ts +27 -0
  18. package/dist/ReportTestResultsSG/index.js +53 -0
  19. package/dist/ReportTestResultsSG/index.js.map +1 -0
  20. package/dist/Reports/index.d.ts +1 -1
  21. package/dist/ReportsOS/index.d.ts +1 -1
  22. package/dist/SecurityGuides/index.d.ts +1 -1
  23. package/dist/SecurityGuidesOS/index.d.ts +1 -1
  24. package/dist/SupportedProfiles/index.d.ts +1 -1
  25. package/dist/SystemReports/index.d.ts +1 -1
  26. package/dist/Systems/index.d.ts +1 -1
  27. package/dist/SystemsOS/index.d.ts +1 -1
  28. package/dist/TailoringRuleTree/index.d.ts +32 -0
  29. package/dist/TailoringRuleTree/index.js +53 -0
  30. package/dist/TailoringRuleTree/index.js.map +1 -0
  31. package/dist/api.d.ts +58 -5235
  32. package/dist/api.js +63 -7315
  33. package/dist/api.js.map +1 -1
  34. package/dist/index.d.ts +4 -1
  35. package/dist/index.js +14 -3
  36. package/dist/index.js.map +1 -1
  37. package/dist/types/index.d.ts +44 -19
  38. package/dist/types/index.js.map +1 -1
  39. package/package.json +1 -1
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.tailoringRuleTreeParamCreator = void 0;
4
+ var tslib_1 = require("tslib");
5
+ // @ts-ignore
6
+ var common_1 = require("@redhat-cloud-services/javascript-clients-shared/dist/common");
7
+ var isTailoringRuleTreeObjectParams = function (params) {
8
+ return params.length === 1 && Object.prototype.hasOwnProperty.call(params, 'policyId') && Object.prototype.hasOwnProperty.call(params, 'tailoringId') && true;
9
+ };
10
+ /**
11
+ * Returns the Rule Tree of a Tailoring
12
+ * @summary Request the Rule Tree of a Tailoring
13
+ * @param {TailoringRuleTreeParams} config with all available params.
14
+ * @param {*} [options] Override http request option.
15
+ * @throws {RequiredError}
16
+ */
17
+ var tailoringRuleTreeParamCreator = 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, policyId, tailoringId, xRHIDENTITY, _a, options, localVarPath, localVarUrlObj, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter;
24
+ return tslib_1.__generator(this, function (_b) {
25
+ params = isTailoringRuleTreeObjectParams(config) ? config[0] : ['policyId', 'tailoringId', '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
+ policyId = params.policyId, tailoringId = params.tailoringId, xRHIDENTITY = params.xRHIDENTITY, _a = params.options, options = _a === void 0 ? {} : _a;
30
+ localVarPath = "/policies/{policy_id}/tailorings/{tailoring_id}/rule_tree"
31
+ .replace("{".concat("policy_id", "}"), encodeURIComponent(String(policyId)))
32
+ .replace("{".concat("tailoring_id", "}"), encodeURIComponent(String(tailoringId)));
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.tailoringRuleTreeParamCreator = tailoringRuleTreeParamCreator;
52
+ exports.default = exports.tailoringRuleTreeParamCreator;
53
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../TailoringRuleTree/index.ts"],"names":[],"mappings":";;;;AAEA,aAAa;AACb,uFAAiU;AAgCjU,IAAM,+BAA+B,GAAG,UAAC,MAA6C;IACpF,OAAO,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,aAAa,CAAC,IAAI,IAAI,CAAA;AAC/J,CAAC,CAAA;AACD;;;;;;EAME;AACK,IAAM,6BAA6B,GAAG;IAAO,gBAA4E;SAA5E,UAA4E,EAA5E,qBAA4E,EAA5E,IAA4E;QAA5E,2BAA4E;;;;;YACtH,MAAM,GAAG,+BAA+B,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,EAAE,aAAa,EAA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