Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@redhat-cloud-services/config-manager-client

Package Overview
Dependencies
Maintainers
0
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@redhat-cloud-services/config-manager-client - npm Package Compare versions

Comparing version 1.5.0 to 2.1.0

dist/common.d.ts

21

CHANGELOG.md

@@ -5,2 +5,23 @@ # Changelog

## [2.1.0](https://github.com/RedHatInsights/javascript-clients/compare/@redhat-cloud-services/config-manager-client-2.0.0...@redhat-cloud-services/config-manager-client-2.1.0) (2024-11-15)
### Features
* convert config-manager-client to new generator ([4794a76](https://github.com/RedHatInsights/javascript-clients/commit/4794a768fd0e46f1b2cc99d7d896d3f8d6774b39))
## [2.1.0](https://github.com/RedHatInsights/javascript-clients/compare/@redhat-cloud-services/config-manager-client-2.0.0...@redhat-cloud-services/config-manager-client-2.1.0) (2024-11-15)
### Features
* convert config-manager-client to new generator ([4794a76](https://github.com/RedHatInsights/javascript-clients/commit/4794a768fd0e46f1b2cc99d7d896d3f8d6774b39))
## [2.1.0](https://github.com/RedHatInsights/javascript-clients/compare/@redhat-cloud-services/config-manager-client-2.0.0...@redhat-cloud-services/config-manager-client-2.1.0) (2024-11-08)
### Features
* convert config-manager-client to new generator ([4794a76](https://github.com/RedHatInsights/javascript-clients/commit/4794a768fd0e46f1b2cc99d7d896d3f8d6774b39))
## [1.5.0](https://github.com/RedHatInsights/javascript-clients/compare/@redhat-cloud-services/config-manager-client-1.4.6...@redhat-cloud-services/config-manager-client-1.5.0) (2024-08-05)

@@ -7,0 +28,0 @@

309

dist/api.d.ts

@@ -1,303 +0,8 @@

/**
* config-manager
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { Configuration } from './configuration';
import { AxiosPromise, AxiosInstance } from 'axios';
import { RequestArgs, BaseAPI } from './base';
/**
*
* @export
* @interface InlineObject
*/
export interface InlineObject {
/**
* Remote host configuration enabled state
* @type {boolean}
* @memberof InlineObject
*/
active: boolean;
/**
* Remote configuration status for running Compliance data collection
* @type {boolean}
* @memberof InlineObject
*/
compliance: boolean;
/**
* Remote configuration status for running Insights data collection
* @type {boolean}
* @memberof InlineObject
*/
insights: boolean;
/**
* Remote configuration status for running Remediation playbooks
* @type {boolean}
* @memberof InlineObject
*/
remediations: boolean;
}
/**
*
* @export
* @interface InlineResponse200
*/
export interface InlineResponse200 {
/**
*
* @type {number}
* @memberof InlineResponse200
*/
total: number;
/**
*
* @type {number}
* @memberof InlineResponse200
*/
count: number;
/**
*
* @type {number}
* @memberof InlineResponse200
*/
limit: number;
/**
*
* @type {number}
* @memberof InlineResponse200
*/
offset: number;
/**
*
* @type {Array<Profile>}
* @memberof InlineResponse200
*/
results: Array<Profile>;
}
/**
*
* @export
* @interface Profile
*/
export interface Profile {
/**
* Profile unique identity value
* @type {string}
* @memberof Profile
*/
id?: string;
/**
* Red Hat account number
* @type {string}
* @memberof Profile
*/
account_id?: string;
/**
* Red Hat organization identity value
* @type {string}
* @memberof Profile
*/
org_id?: string;
/**
* Time of profile creation
* @type {string}
* @memberof Profile
*/
created_at?: string;
/**
* Remote host configuration enabled state
* @type {boolean}
* @memberof Profile
*/
active?: boolean;
/**
* Remote configuration status for running Compliance data collection
* @type {boolean}
* @memberof Profile
*/
compliance?: boolean;
/**
* Remote configuration status for running Insights data collection
* @type {boolean}
* @memberof Profile
*/
insights?: boolean;
/**
* Remote configuration status for running Remediation playbooks
* @type {boolean}
* @memberof Profile
*/
remediations?: boolean;
}
/**
* DefaultApi - axios parameter creator
* @export
*/
export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration) => {
/**
* Create and optionally activate a new profile.
* @summary Create a new profile
* @param {InlineObject} inlineObject
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createProfile: (inlineObject: InlineObject, options?: any) => Promise<RequestArgs>;
/**
* Constructs and returns a Ansible playbook suitable to configure a host for the requested profile.
* @summary Retrieve an Ansible playbook for the requested profile
* @param {string} profileId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPlaybook: (profileId: string, options?: any) => Promise<RequestArgs>;
/**
* Retrieve a specific profile identified by the \'id\' path parameter for the identified account. If the special value \"current\" is used for the \'id\' path parameter, the most recent profile is retrieved instead.
* @summary Get a specific profile
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getProfile: (id: string, options?: any) => Promise<RequestArgs>;
/**
* Retrieve a paginated array of profiles for the identified account. The URL query parameters \'limit\' and \'offset\' can be used to paginate the results. The default value of \'limit\' is 50. The default value of \'offset\' is 0.
* @summary Get a list of all profiles
* @param {'created_at' | 'created_at:asc' | 'created_at:desc'} [sortBy]
* @param {number} [limit]
* @param {number} [offset]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getProfiles: (sortBy?: 'created_at' | 'created_at:asc' | 'created_at:desc', limit?: number, offset?: number, options?: any) => Promise<RequestArgs>;
import { ApiConfig } from '@redhat-cloud-services/javascript-clients-shared/dist/common';
export declare const ConfigManagerClient: (BASE_PATH: string, instance?: ApiConfig) => import("packages/shared/dist/base").BaseAPI & {
createProfile: (...config: [import("./CreateProfile").CreateProfileParams] | [import("./types").CreateProfileRequest, import("axios").AxiosRequestConfig<any>]) => Promise<import("@redhat-cloud-services/javascript-clients-shared/dist/common").RequestArgs>;
getPlaybook: (...config: [import("./GetPlaybook").GetPlaybookParams] | [string, import("axios").AxiosRequestConfig<any>]) => Promise<import("@redhat-cloud-services/javascript-clients-shared/dist/common").RequestArgs>;
getProfile: (...config: [string, import("axios").AxiosRequestConfig<any>] | [import("./GetProfile").GetProfileParams]) => Promise<import("@redhat-cloud-services/javascript-clients-shared/dist/common").RequestArgs>;
getProfiles: (...config: [import("./GetProfiles").GetProfilesParams] | [import("./GetProfiles").GetProfilesSortByEnum, number, number, import("axios").AxiosRequestConfig<any>]) => Promise<import("@redhat-cloud-services/javascript-clients-shared/dist/common").RequestArgs>;
};
/**
* DefaultApi - functional programming interface
* @export
*/
export declare const DefaultApiFp: (configuration?: Configuration) => {
/**
* Create and optionally activate a new profile.
* @summary Create a new profile
* @param {InlineObject} inlineObject
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createProfile(inlineObject: InlineObject, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Profile>>;
/**
* Constructs and returns a Ansible playbook suitable to configure a host for the requested profile.
* @summary Retrieve an Ansible playbook for the requested profile
* @param {string} profileId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPlaybook(profileId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>>;
/**
* Retrieve a specific profile identified by the \'id\' path parameter for the identified account. If the special value \"current\" is used for the \'id\' path parameter, the most recent profile is retrieved instead.
* @summary Get a specific profile
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getProfile(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Profile>>;
/**
* Retrieve a paginated array of profiles for the identified account. The URL query parameters \'limit\' and \'offset\' can be used to paginate the results. The default value of \'limit\' is 50. The default value of \'offset\' is 0.
* @summary Get a list of all profiles
* @param {'created_at' | 'created_at:asc' | 'created_at:desc'} [sortBy]
* @param {number} [limit]
* @param {number} [offset]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getProfiles(sortBy?: 'created_at' | 'created_at:asc' | 'created_at:desc', limit?: number, offset?: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InlineResponse200>>;
};
/**
* DefaultApi - factory interface
* @export
*/
export declare const DefaultApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
* Create and optionally activate a new profile.
* @summary Create a new profile
* @param {InlineObject} inlineObject
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createProfile(inlineObject: InlineObject, options?: any): AxiosPromise<Profile>;
/**
* Constructs and returns a Ansible playbook suitable to configure a host for the requested profile.
* @summary Retrieve an Ansible playbook for the requested profile
* @param {string} profileId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPlaybook(profileId: string, options?: any): AxiosPromise<object>;
/**
* Retrieve a specific profile identified by the \'id\' path parameter for the identified account. If the special value \"current\" is used for the \'id\' path parameter, the most recent profile is retrieved instead.
* @summary Get a specific profile
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getProfile(id: string, options?: any): AxiosPromise<Profile>;
/**
* Retrieve a paginated array of profiles for the identified account. The URL query parameters \'limit\' and \'offset\' can be used to paginate the results. The default value of \'limit\' is 50. The default value of \'offset\' is 0.
* @summary Get a list of all profiles
* @param {'created_at' | 'created_at:asc' | 'created_at:desc'} [sortBy]
* @param {number} [limit]
* @param {number} [offset]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getProfiles(sortBy?: 'created_at' | 'created_at:asc' | 'created_at:desc', limit?: number, offset?: number, options?: any): AxiosPromise<InlineResponse200>;
};
/**
* DefaultApi - object-oriented interface
* @export
* @class DefaultApi
* @extends {BaseAPI}
*/
export declare class DefaultApi extends BaseAPI {
/**
* Create and optionally activate a new profile.
* @summary Create a new profile
* @param {InlineObject} inlineObject
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof DefaultApi
*/
createProfile(inlineObject: InlineObject, options?: any): Promise<import("axios").AxiosResponse<Profile, any>>;
/**
* Constructs and returns a Ansible playbook suitable to configure a host for the requested profile.
* @summary Retrieve an Ansible playbook for the requested profile
* @param {string} profileId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof DefaultApi
*/
getPlaybook(profileId: string, options?: any): Promise<import("axios").AxiosResponse<object, any>>;
/**
* Retrieve a specific profile identified by the \'id\' path parameter for the identified account. If the special value \"current\" is used for the \'id\' path parameter, the most recent profile is retrieved instead.
* @summary Get a specific profile
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof DefaultApi
*/
getProfile(id: string, options?: any): Promise<import("axios").AxiosResponse<Profile, any>>;
/**
* Retrieve a paginated array of profiles for the identified account. The URL query parameters \'limit\' and \'offset\' can be used to paginate the results. The default value of \'limit\' is 50. The default value of \'offset\' is 0.
* @summary Get a list of all profiles
* @param {'created_at' | 'created_at:asc' | 'created_at:desc'} [sortBy]
* @param {number} [limit]
* @param {number} [offset]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof DefaultApi
*/
getProfiles(sortBy?: 'created_at' | 'created_at:asc' | 'created_at:desc', limit?: number, offset?: number, options?: any): Promise<import("axios").AxiosResponse<InlineResponse200, any>>;
}
export default ConfigManagerClient;
"use strict";
// tslint:disable
/**
* config-manager
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.DefaultApi = exports.DefaultApiFactory = exports.DefaultApiFp = exports.DefaultApiAxiosParamCreator = void 0;
var tslib_1 = require("tslib");
var globalImportUrl = require("url");
var axios_1 = require("axios");
// Some imports not used depending on template conditions
// @ts-ignore
var base_1 = require("./base");
/**
* DefaultApi - axios parameter creator
* @export
*/
var DefaultApiAxiosParamCreator = function (configuration) {
var _this = this;
return {
/**
* Create and optionally activate a new profile.
* @summary Create a new profile
* @param {InlineObject} inlineObject
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createProfile: function (inlineObject, options) {
if (options === void 0) { options = {}; }
return tslib_1.__awaiter(_this, void 0, void 0, function () {
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions, needsSerialization;
return tslib_1.__generator(this, function (_a) {
// verify required parameter 'inlineObject' is not null or undefined
if (inlineObject === null || inlineObject === undefined) {
throw new base_1.RequiredError('inlineObject', 'Required parameter inlineObject was null or undefined when calling createProfile.');
}
localVarPath = "/profiles";
localVarUrlObj = globalImportUrl.parse(localVarPath, true);
if (configuration) {
baseOptions = configuration.baseOptions;
}
localVarRequestOptions = tslib_1.__assign(tslib_1.__assign({ method: 'POST' }, baseOptions), options);
localVarHeaderParameter = {};
localVarQueryParameter = {};
localVarHeaderParameter['Content-Type'] = 'application/json';
localVarUrlObj.query = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
needsSerialization = (typeof inlineObject !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
localVarRequestOptions.data = needsSerialization ? JSON.stringify(inlineObject !== undefined ? inlineObject : {}) : (inlineObject || "");
return [2 /*return*/, {
url: globalImportUrl.format(localVarUrlObj),
options: localVarRequestOptions,
}];
});
});
},
/**
* Constructs and returns a Ansible playbook suitable to configure a host for the requested profile.
* @summary Retrieve an Ansible playbook for the requested profile
* @param {string} profileId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPlaybook: function (profileId, options) {
if (options === void 0) { options = {}; }
return tslib_1.__awaiter(_this, void 0, void 0, function () {
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
return tslib_1.__generator(this, function (_a) {
// verify required parameter 'profileId' is not null or undefined
if (profileId === null || profileId === undefined) {
throw new base_1.RequiredError('profileId', 'Required parameter profileId was null or undefined when calling getPlaybook.');
}
localVarPath = "/playbooks";
localVarUrlObj = globalImportUrl.parse(localVarPath, true);
if (configuration) {
baseOptions = configuration.baseOptions;
}
localVarRequestOptions = tslib_1.__assign(tslib_1.__assign({ method: 'GET' }, baseOptions), options);
localVarHeaderParameter = {};
localVarQueryParameter = {};
if (profileId !== undefined) {
localVarQueryParameter['profile_id'] = profileId;
}
localVarUrlObj.query = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return [2 /*return*/, {
url: globalImportUrl.format(localVarUrlObj),
options: localVarRequestOptions,
}];
});
});
},
/**
* Retrieve a specific profile identified by the \'id\' path parameter for the identified account. If the special value \"current\" is used for the \'id\' path parameter, the most recent profile is retrieved instead.
* @summary Get a specific profile
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getProfile: function (id, options) {
if (options === void 0) { options = {}; }
return tslib_1.__awaiter(_this, void 0, void 0, function () {
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
return tslib_1.__generator(this, function (_a) {
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new base_1.RequiredError('id', 'Required parameter id was null or undefined when calling getProfile.');
}
localVarPath = "/profiles/{id}"
.replace("{".concat("id", "}"), encodeURIComponent(String(id)));
localVarUrlObj = globalImportUrl.parse(localVarPath, true);
if (configuration) {
baseOptions = configuration.baseOptions;
}
localVarRequestOptions = tslib_1.__assign(tslib_1.__assign({ method: 'GET' }, baseOptions), options);
localVarHeaderParameter = {};
localVarQueryParameter = {};
localVarUrlObj.query = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return [2 /*return*/, {
url: globalImportUrl.format(localVarUrlObj),
options: localVarRequestOptions,
}];
});
});
},
/**
* Retrieve a paginated array of profiles for the identified account. The URL query parameters \'limit\' and \'offset\' can be used to paginate the results. The default value of \'limit\' is 50. The default value of \'offset\' is 0.
* @summary Get a list of all profiles
* @param {'created_at' | 'created_at:asc' | 'created_at:desc'} [sortBy]
* @param {number} [limit]
* @param {number} [offset]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getProfiles: function (sortBy, limit, offset, options) {
if (options === void 0) { options = {}; }
return tslib_1.__awaiter(_this, void 0, void 0, function () {
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
return tslib_1.__generator(this, function (_a) {
localVarPath = "/profiles";
localVarUrlObj = globalImportUrl.parse(localVarPath, true);
if (configuration) {
baseOptions = configuration.baseOptions;
}
localVarRequestOptions = tslib_1.__assign(tslib_1.__assign({ method: 'GET' }, baseOptions), options);
localVarHeaderParameter = {};
localVarQueryParameter = {};
if (sortBy !== undefined) {
localVarQueryParameter['sort_by'] = sortBy;
}
if (limit !== undefined) {
localVarQueryParameter['limit'] = limit;
}
if (offset !== undefined) {
localVarQueryParameter['offset'] = offset;
}
localVarUrlObj.query = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return [2 /*return*/, {
url: globalImportUrl.format(localVarUrlObj),
options: localVarRequestOptions,
}];
});
});
},
};
exports.ConfigManagerClient = void 0;
var utils_1 = require("@redhat-cloud-services/javascript-clients-shared/dist/utils");
var index_1 = require("./index");
var ConfigManagerClient = function (BASE_PATH, instance) {
return (0, utils_1.APIFactory)(BASE_PATH, {
createProfile: index_1.createProfile,
getPlaybook: index_1.getPlaybook,
getProfile: index_1.getProfile,
getProfiles: index_1.getProfiles,
}, instance);
};
exports.DefaultApiAxiosParamCreator = DefaultApiAxiosParamCreator;
/**
* DefaultApi - functional programming interface
* @export
*/
var DefaultApiFp = function (configuration) {
return {
/**
* Create and optionally activate a new profile.
* @summary Create a new profile
* @param {InlineObject} inlineObject
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createProfile: function (inlineObject, options) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var localVarAxiosArgs;
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, (0, exports.DefaultApiAxiosParamCreator)(configuration).createProfile(inlineObject, options)];
case 1:
localVarAxiosArgs = _a.sent();
return [2 /*return*/, function (axios, basePath) {
if (axios === void 0) { axios = axios_1.default; }
if (basePath === void 0) { basePath = base_1.BASE_PATH; }
var axiosRequestArgs = tslib_1.__assign(tslib_1.__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
return axios.request(axiosRequestArgs);
}];
}
});
});
},
/**
* Constructs and returns a Ansible playbook suitable to configure a host for the requested profile.
* @summary Retrieve an Ansible playbook for the requested profile
* @param {string} profileId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPlaybook: function (profileId, options) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var localVarAxiosArgs;
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, (0, exports.DefaultApiAxiosParamCreator)(configuration).getPlaybook(profileId, options)];
case 1:
localVarAxiosArgs = _a.sent();
return [2 /*return*/, function (axios, basePath) {
if (axios === void 0) { axios = axios_1.default; }
if (basePath === void 0) { basePath = base_1.BASE_PATH; }
var axiosRequestArgs = tslib_1.__assign(tslib_1.__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
return axios.request(axiosRequestArgs);
}];
}
});
});
},
/**
* Retrieve a specific profile identified by the \'id\' path parameter for the identified account. If the special value \"current\" is used for the \'id\' path parameter, the most recent profile is retrieved instead.
* @summary Get a specific profile
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getProfile: function (id, options) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var localVarAxiosArgs;
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, (0, exports.DefaultApiAxiosParamCreator)(configuration).getProfile(id, options)];
case 1:
localVarAxiosArgs = _a.sent();
return [2 /*return*/, function (axios, basePath) {
if (axios === void 0) { axios = axios_1.default; }
if (basePath === void 0) { basePath = base_1.BASE_PATH; }
var axiosRequestArgs = tslib_1.__assign(tslib_1.__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
return axios.request(axiosRequestArgs);
}];
}
});
});
},
/**
* Retrieve a paginated array of profiles for the identified account. The URL query parameters \'limit\' and \'offset\' can be used to paginate the results. The default value of \'limit\' is 50. The default value of \'offset\' is 0.
* @summary Get a list of all profiles
* @param {'created_at' | 'created_at:asc' | 'created_at:desc'} [sortBy]
* @param {number} [limit]
* @param {number} [offset]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getProfiles: function (sortBy, limit, offset, options) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var localVarAxiosArgs;
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, (0, exports.DefaultApiAxiosParamCreator)(configuration).getProfiles(sortBy, limit, offset, options)];
case 1:
localVarAxiosArgs = _a.sent();
return [2 /*return*/, function (axios, basePath) {
if (axios === void 0) { axios = axios_1.default; }
if (basePath === void 0) { basePath = base_1.BASE_PATH; }
var axiosRequestArgs = tslib_1.__assign(tslib_1.__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
return axios.request(axiosRequestArgs);
}];
}
});
});
},
};
};
exports.DefaultApiFp = DefaultApiFp;
/**
* DefaultApi - factory interface
* @export
*/
var DefaultApiFactory = function (configuration, basePath, axios) {
return {
/**
* Create and optionally activate a new profile.
* @summary Create a new profile
* @param {InlineObject} inlineObject
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createProfile: function (inlineObject, options) {
return (0, exports.DefaultApiFp)(configuration).createProfile(inlineObject, options).then(function (request) { return request(axios, basePath); });
},
/**
* Constructs and returns a Ansible playbook suitable to configure a host for the requested profile.
* @summary Retrieve an Ansible playbook for the requested profile
* @param {string} profileId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPlaybook: function (profileId, options) {
return (0, exports.DefaultApiFp)(configuration).getPlaybook(profileId, options).then(function (request) { return request(axios, basePath); });
},
/**
* Retrieve a specific profile identified by the \'id\' path parameter for the identified account. If the special value \"current\" is used for the \'id\' path parameter, the most recent profile is retrieved instead.
* @summary Get a specific profile
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getProfile: function (id, options) {
return (0, exports.DefaultApiFp)(configuration).getProfile(id, options).then(function (request) { return request(axios, basePath); });
},
/**
* Retrieve a paginated array of profiles for the identified account. The URL query parameters \'limit\' and \'offset\' can be used to paginate the results. The default value of \'limit\' is 50. The default value of \'offset\' is 0.
* @summary Get a list of all profiles
* @param {'created_at' | 'created_at:asc' | 'created_at:desc'} [sortBy]
* @param {number} [limit]
* @param {number} [offset]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getProfiles: function (sortBy, limit, offset, options) {
return (0, exports.DefaultApiFp)(configuration).getProfiles(sortBy, limit, offset, options).then(function (request) { return request(axios, basePath); });
},
};
};
exports.DefaultApiFactory = DefaultApiFactory;
/**
* DefaultApi - object-oriented interface
* @export
* @class DefaultApi
* @extends {BaseAPI}
*/
var DefaultApi = /** @class */ (function (_super) {
tslib_1.__extends(DefaultApi, _super);
function DefaultApi() {
return _super !== null && _super.apply(this, arguments) || this;
}
/**
* Create and optionally activate a new profile.
* @summary Create a new profile
* @param {InlineObject} inlineObject
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof DefaultApi
*/
DefaultApi.prototype.createProfile = function (inlineObject, options) {
var _this = this;
return (0, exports.DefaultApiFp)(this.configuration).createProfile(inlineObject, options).then(function (request) { return request(_this.axios, _this.basePath); });
};
/**
* Constructs and returns a Ansible playbook suitable to configure a host for the requested profile.
* @summary Retrieve an Ansible playbook for the requested profile
* @param {string} profileId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof DefaultApi
*/
DefaultApi.prototype.getPlaybook = function (profileId, options) {
var _this = this;
return (0, exports.DefaultApiFp)(this.configuration).getPlaybook(profileId, options).then(function (request) { return request(_this.axios, _this.basePath); });
};
/**
* Retrieve a specific profile identified by the \'id\' path parameter for the identified account. If the special value \"current\" is used for the \'id\' path parameter, the most recent profile is retrieved instead.
* @summary Get a specific profile
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof DefaultApi
*/
DefaultApi.prototype.getProfile = function (id, options) {
var _this = this;
return (0, exports.DefaultApiFp)(this.configuration).getProfile(id, options).then(function (request) { return request(_this.axios, _this.basePath); });
};
/**
* Retrieve a paginated array of profiles for the identified account. The URL query parameters \'limit\' and \'offset\' can be used to paginate the results. The default value of \'limit\' is 50. The default value of \'offset\' is 0.
* @summary Get a list of all profiles
* @param {'created_at' | 'created_at:asc' | 'created_at:desc'} [sortBy]
* @param {number} [limit]
* @param {number} [offset]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof DefaultApi
*/
DefaultApi.prototype.getProfiles = function (sortBy, limit, offset, options) {
var _this = this;
return (0, exports.DefaultApiFp)(this.configuration).getProfiles(sortBy, limit, offset, options).then(function (request) { return request(_this.axios, _this.basePath); });
};
return DefaultApi;
}(base_1.BaseAPI));
exports.DefaultApi = DefaultApi;
exports.ConfigManagerClient = ConfigManagerClient;
exports.default = exports.ConfigManagerClient;
//# sourceMappingURL=api.js.map

@@ -12,4 +12,4 @@ /**

*/
import { Configuration } from "./configuration";
import { AxiosInstance } from 'axios';
import type { Configuration } from './configuration';
import type { AxiosInstance, AxiosRequestConfig } from 'axios';
export declare const BASE_PATH: string;

@@ -33,3 +33,3 @@ /**

url: string;
options: any;
options: AxiosRequestConfig;
}

@@ -55,4 +55,3 @@ /**

field: string;
name: "RequiredError";
constructor(field: string, msg?: string);
}
"use strict";
// tslint:disable
/* tslint:disable */
/* eslint-disable */
/**

@@ -17,4 +18,2 @@ * config-manager

var tslib_1 = require("tslib");
// Some imports not used depending on template conditions
// @ts-ignore
var axios_1 = require("axios");

@@ -21,0 +20,0 @@ exports.BASE_PATH = "https://raw.githubusercontent.com/api/config-manager/v2".replace(/\/+$/, "");

@@ -16,5 +16,6 @@ /**

password?: string;
accessToken?: string | ((name?: string, scopes?: string[]) => string);
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
basePath?: string;
baseOptions?: any;
formDataCtor?: new () => any;
}

@@ -48,3 +49,3 @@ export declare class Configuration {

*/
accessToken?: string | ((name?: string, scopes?: string[]) => string);
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
/**

@@ -64,3 +65,22 @@ * override base path

baseOptions?: any;
/**
* The FormData constructor that will be used to create multipart form data
* requests. You can inject this here so that execution environments that
* do not support the FormData class can still run the generated client.
*
* @type {new () => FormData}
*/
formDataCtor?: new () => any;
constructor(param?: ConfigurationParameters);
/**
* Check if the given MIME is a JSON MIME.
* JSON MIME examples:
* application/json
* application/json; charset=UTF8
* APPLICATION/JSON
* application/vnd.company+json
* @param mime - MIME (Multipurpose Internet Mail Extensions)
* @return True if the given MIME is JSON, false otherwise.
*/
isJsonMime(mime: string): boolean;
}
"use strict";
// tslint:disable
/* tslint:disable */
/* eslint-disable */
/**

@@ -25,3 +26,18 @@ * config-manager

this.baseOptions = param.baseOptions;
this.formDataCtor = param.formDataCtor;
}
/**
* Check if the given MIME is a JSON MIME.
* JSON MIME examples:
* application/json
* application/json; charset=UTF8
* APPLICATION/JSON
* application/vnd.company+json
* @param mime - MIME (Multipurpose Internet Mail Extensions)
* @return True if the given MIME is JSON, false otherwise.
*/
Configuration.prototype.isJsonMime = function (mime) {
var jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
};
return Configuration;

@@ -28,0 +44,0 @@ }());

@@ -1,13 +0,4 @@

/**
* config-manager
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export * from "./api";
export * from "./configuration";
export { default as createProfile } from './CreateProfile';
export { default as getPlaybook } from './GetPlaybook';
export { default as getProfile } from './GetProfile';
export { default as getProfiles } from './GetProfiles';
"use strict";
// tslint:disable
/**
* config-manager
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
// This is a sample supporting file mustache template.
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
tslib_1.__exportStar(require("./api"), exports);
tslib_1.__exportStar(require("./configuration"), exports);
exports.getProfiles = exports.getProfile = exports.getPlaybook = exports.createProfile = void 0;
var CreateProfile_1 = require("./CreateProfile");
Object.defineProperty(exports, "createProfile", { enumerable: true, get: function () { return CreateProfile_1.default; } });
// end of operations block
var GetPlaybook_1 = require("./GetPlaybook");
Object.defineProperty(exports, "getPlaybook", { enumerable: true, get: function () { return GetPlaybook_1.default; } });
// end of operations block
var GetProfile_1 = require("./GetProfile");
Object.defineProperty(exports, "getProfile", { enumerable: true, get: function () { return GetProfile_1.default; } });
// end of operations block
var GetProfiles_1 = require("./GetProfiles");
Object.defineProperty(exports, "getProfiles", { enumerable: true, get: function () { return GetProfiles_1.default; } });
// end of operations block
//# sourceMappingURL=index.js.map
{
"name": "@redhat-cloud-services/config-manager-client",
"version": "1.5.0",
"version": "2.1.0",
"description": "",

@@ -24,5 +24,6 @@ "main": "./dist/index.js",

"dependencies": {
"axios": "^0.27.2",
"@redhat-cloud-services/javascript-clients-shared": "^1.2.2",
"axios": "^1.7.2",
"tslib": "^2.6.2"
}
}

@@ -21,9 +21,8 @@ # Javascript client for Config Manager API

// api.js
import axios from 'axios';
import { Configuration } from '@redhat-cloud-services/config-manager-client';
const instance = axios.create();
import APIFactory from '@redhat-cloud-services/config-manager-client/utils';
import createEndpoint from '@redhat-cloud-services/config-manager-client/CreateProfile';
// BASE_PATH should be set in your constants file
const configApi = new Configuration(undefined, BASE_PATH, instance);
export configApi;
const configManagerApi = APIFactory(BASE_PATH, undefined, { CreateProfile });
export configManagerApi;
```

@@ -35,3 +34,3 @@

import axios from 'axios';
import { Configuration } from '@redhat-cloud-services/host-inventory-client';
import { configManagerApi } from '@redhat-cloud-services/config-manager-client';
const instance = axios.create();

@@ -55,4 +54,4 @@

// BASE_PATH should be set in your constants file
const configApi = new Configuration(undefined, BASE_PATH, instance);
export configApi;
const configManagerApi = APIFactory(BASE_PATH, instance, { CreateProfile });
export configManagerApi;
```

@@ -59,0 +58,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc