From f7d5736eeb88ef2fd9f38facc66486d1761fd5ae Mon Sep 17 00:00:00 2001 From: Olha Tomylko Date: Tue, 17 Feb 2026 16:11:42 +0100 Subject: [PATCH] build(config-manager)!: restructure to generate into src directory Align config-manager package with notifications/integrations build pattern: generate TypeScript into src/, add clean-generate and clean-build targets, update tsconfig to target ES2021 for ESM. Regenerated from current OpenAPI spec with no API changes. BREAKING CHANGE: API endpoints changed: - GetPlaybook endpoint removed (no replacement) - GetProfiles (list) endpoint replaced with GetProfile (singular) - CreateProfile endpoint added --- .../config-manager/.openapi-generator/FILES | 9 - .../config-manager/.openapi-generator/VERSION | 1 - packages/config-manager/GetPlaybook/index.ts | 61 ----- packages/config-manager/GetProfiles/index.ts | 91 ------- packages/config-manager/custom.d.ts | 1 - packages/config-manager/doc/.nojekyll | 1 - packages/config-manager/doc/README.md | 69 ----- .../doc/classes/Configuration.md | 146 ----------- .../config-manager/doc/classes/DefaultApi.md | 236 ------------------ .../doc/interfaces/ConfigurationParameters.md | 83 ------ .../doc/interfaces/InlineObject.md | 80 ------ .../doc/interfaces/InlineResponse200.md | 87 ------- .../config-manager/doc/interfaces/Profile.md | 148 ----------- packages/config-manager/doc/modules.md | 118 --------- packages/config-manager/jest.config.ts | 1 + packages/config-manager/openapitools.json | 4 +- packages/config-manager/package.json | 26 +- packages/config-manager/project.json | 12 +- packages/config-manager/src/.gitignore | 4 + packages/config-manager/src/.npmignore | 6 + .../{ => src}/.openapi-generator-ignore | 0 .../src/.openapi-generator/FILES | 14 ++ .../src/.openapi-generator/VERSION | 1 + .../{ => src}/CreateProfile/index.ts | 0 .../{ => src}/GetProfile/index.ts | 0 packages/config-manager/{ => src}/api.ts | 3 +- .../src/docs/CreateProfileApi.md | 63 +++++ .../src/docs/CreateProfileRequest.md | 26 ++ .../config-manager/src/docs/GetProfileApi.md | 62 +++++ packages/config-manager/src/docs/Profile.md | 34 +++ packages/config-manager/{ => src}/index.ts | 2 - .../config-manager/{ => src}/types/index.ts | 0 packages/config-manager/tsconfig.cjs.json | 17 +- packages/config-manager/tsconfig.esm.json | 25 +- 34 files changed, 272 insertions(+), 1159 deletions(-) delete mode 100644 packages/config-manager/.openapi-generator/FILES delete mode 100644 packages/config-manager/.openapi-generator/VERSION delete mode 100644 packages/config-manager/GetPlaybook/index.ts delete mode 100644 packages/config-manager/GetProfiles/index.ts delete mode 100644 packages/config-manager/custom.d.ts delete mode 100644 packages/config-manager/doc/.nojekyll delete mode 100644 packages/config-manager/doc/README.md delete mode 100644 packages/config-manager/doc/classes/Configuration.md delete mode 100644 packages/config-manager/doc/classes/DefaultApi.md delete mode 100644 packages/config-manager/doc/interfaces/ConfigurationParameters.md delete mode 100644 packages/config-manager/doc/interfaces/InlineObject.md delete mode 100644 packages/config-manager/doc/interfaces/InlineResponse200.md delete mode 100644 packages/config-manager/doc/interfaces/Profile.md delete mode 100644 packages/config-manager/doc/modules.md create mode 100644 packages/config-manager/src/.gitignore create mode 100644 packages/config-manager/src/.npmignore rename packages/config-manager/{ => src}/.openapi-generator-ignore (100%) create mode 100644 packages/config-manager/src/.openapi-generator/FILES create mode 100644 packages/config-manager/src/.openapi-generator/VERSION rename packages/config-manager/{ => src}/CreateProfile/index.ts (100%) rename packages/config-manager/{ => src}/GetProfile/index.ts (100%) rename packages/config-manager/{ => src}/api.ts (96%) create mode 100644 packages/config-manager/src/docs/CreateProfileApi.md create mode 100644 packages/config-manager/src/docs/CreateProfileRequest.md create mode 100644 packages/config-manager/src/docs/GetProfileApi.md create mode 100644 packages/config-manager/src/docs/Profile.md rename packages/config-manager/{ => src}/index.ts (79%) rename packages/config-manager/{ => src}/types/index.ts (100%) diff --git a/packages/config-manager/.openapi-generator/FILES b/packages/config-manager/.openapi-generator/FILES deleted file mode 100644 index b2a88b58e..000000000 --- a/packages/config-manager/.openapi-generator/FILES +++ /dev/null @@ -1,9 +0,0 @@ -.gitignore -.npmignore -CreateProfile/index.ts -GetProfile/index.ts -api.ts -git_push.sh -index.ts -index.ts -types/index.ts diff --git a/packages/config-manager/.openapi-generator/VERSION b/packages/config-manager/.openapi-generator/VERSION deleted file mode 100644 index 412252180..000000000 --- a/packages/config-manager/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.0.0 \ No newline at end of file diff --git a/packages/config-manager/GetPlaybook/index.ts b/packages/config-manager/GetPlaybook/index.ts deleted file mode 100644 index fbd512eeb..000000000 --- a/packages/config-manager/GetPlaybook/index.ts +++ /dev/null @@ -1,61 +0,0 @@ -// @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig, Method } from 'axios'; -// @ts-ignore -import { COLLECTION_FORMATS, RequiredError, AuthTypeEnum, DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '@redhat-cloud-services/javascript-clients-shared/dist/common'; -import type { RequestArgs } from '@redhat-cloud-services/javascript-clients-shared/dist/common'; -// @ts-ignore -import { BaseAPI } from '@redhat-cloud-services/javascript-clients-shared/dist/base'; -import { Configuration } from '@redhat-cloud-services/javascript-clients-shared/dist/configuration'; - -// @ts-ignore -import type { } from '../types'; - - -export type GetPlaybookParams = { - /** - * - * @type { string } - * @memberof GetPlaybookApi - */ - profileId: string, - options?: AxiosRequestConfig -} - -export type GetPlaybookReturnType = AxiosPromise; - -const isGetPlaybookObjectParams = (params: [GetPlaybookParams] | unknown[]): params is [GetPlaybookParams] => { - return params.length === 1 && Object.prototype.hasOwnProperty.call(params, 'profileId') -} -/** -* 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 {GetPlaybookParams} config with all available params. -* @param {*} [options] Override http request option. -* @throws {RequiredError} -*/ -export const getPlaybookParamCreator = async (...config: ([GetPlaybookParams] | [string, AxiosRequestConfig])): Promise => { - const params = isGetPlaybookObjectParams(config) ? config[0] : ['profileId', 'options'].reduce((acc, curr, index) => ({ ...acc, [curr]: config[index] }), {}) as GetPlaybookParams; - const { profileId, options = {} } = params; - const localVarPath = `/playbooks`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - const localVarRequestOptions = { method: 'GET' as Method, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - if (profileId !== undefined) { - localVarQueryParameter['profile_id'] = profileId; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - - return { - urlObj: localVarUrlObj, - options: localVarRequestOptions, - }; -} - -export default getPlaybookParamCreator; diff --git a/packages/config-manager/GetProfiles/index.ts b/packages/config-manager/GetProfiles/index.ts deleted file mode 100644 index c71785d8e..000000000 --- a/packages/config-manager/GetProfiles/index.ts +++ /dev/null @@ -1,91 +0,0 @@ -// @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig, Method } from 'axios'; -// @ts-ignore -import { COLLECTION_FORMATS, RequiredError, AuthTypeEnum, DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '@redhat-cloud-services/javascript-clients-shared/dist/common'; -import type { RequestArgs } from '@redhat-cloud-services/javascript-clients-shared/dist/common'; -// @ts-ignore -import { BaseAPI } from '@redhat-cloud-services/javascript-clients-shared/dist/base'; -import { Configuration } from '@redhat-cloud-services/javascript-clients-shared/dist/configuration'; - -// @ts-ignore -import type { GetProfiles200Response } from '../types'; - - -export type GetProfilesParams = { - /** - * - * @type { GetProfilesSortByEnum } - * @memberof GetProfilesApi - */ - sortBy?: GetProfilesSortByEnum, - /** - * - * @type { number } - * @memberof GetProfilesApi - */ - limit?: number, - /** - * - * @type { number } - * @memberof GetProfilesApi - */ - offset?: number, - options?: AxiosRequestConfig -} -/** - * @export - * @enum {string} - */ -export const GetProfilesSortByEnum = { - At: 'created_at', - Atasc: 'created_at:asc', - Atdesc: 'created_at:desc' -} as const; -export type GetProfilesSortByEnum = typeof GetProfilesSortByEnum[keyof typeof GetProfilesSortByEnum]; - -export type GetProfilesReturnType = AxiosPromise; - -const isGetProfilesObjectParams = (params: [GetProfilesParams] | unknown[]): params is [GetProfilesParams] => { - return params.length === 1 && true && true && true -} -/** -* 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 {GetProfilesParams} config with all available params. -* @param {*} [options] Override http request option. -* @throws {RequiredError} -*/ -export const getProfilesParamCreator = async (...config: ([GetProfilesParams] | [GetProfilesSortByEnum, number, number, AxiosRequestConfig])): Promise => { - const params = isGetProfilesObjectParams(config) ? config[0] : ['sortBy', 'limit', 'offset', 'options'].reduce((acc, curr, index) => ({ ...acc, [curr]: config[index] }), {}) as GetProfilesParams; - const { sortBy, limit, offset, options = {} } = params; - const localVarPath = `/profiles`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - const localVarRequestOptions = { method: 'GET' as Method, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - if (sortBy !== undefined) { - localVarQueryParameter['sort_by'] = sortBy; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (offset !== undefined) { - localVarQueryParameter['offset'] = offset; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - localVarRequestOptions.headers = {...localVarHeaderParameter, ...options.headers}; - - return { - urlObj: localVarUrlObj, - options: localVarRequestOptions, - }; -} - -export default getProfilesParamCreator; diff --git a/packages/config-manager/custom.d.ts b/packages/config-manager/custom.d.ts deleted file mode 100644 index 32534cb16..000000000 --- a/packages/config-manager/custom.d.ts +++ /dev/null @@ -1 +0,0 @@ -declare module 'url'; \ No newline at end of file diff --git a/packages/config-manager/doc/.nojekyll b/packages/config-manager/doc/.nojekyll deleted file mode 100644 index e2ac6616a..000000000 --- a/packages/config-manager/doc/.nojekyll +++ /dev/null @@ -1 +0,0 @@ -TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false. \ No newline at end of file diff --git a/packages/config-manager/doc/README.md b/packages/config-manager/doc/README.md deleted file mode 100644 index befdc87c3..000000000 --- a/packages/config-manager/doc/README.md +++ /dev/null @@ -1,69 +0,0 @@ -@redhat-cloud-services/config-manager-client / [Exports](modules.md) - -# Javascript client for Config Manager API -If you want to use [RedHatInsights/config-manager](https://github.com/RedHatInsights/config-manager) you shouldn't use get requests directly, but rather use this client to integrate with this service. - -## Install -NPM -```bash -npm install --save @redhat-cloud-services/config-manager-client -``` - -Or Yarn -```bash -yarn add @redhat-cloud-services/config-manager-client -``` - -### Usage -This client is using typescript and axios. Types are distributed with this package, so no need to define or install them separately. - -To correctly bootstrap this API you should use this config (no need to define it multiple times, just one config and reimport it anywhere you want to use it). -```JS -// api.js -import axios from 'axios'; -import { Configuration } from '@redhat-cloud-services/config-manager-client'; -const instance = axios.create(); - -// BASE_PATH should be set in your constants file -const configApi = new Configuration(undefined, BASE_PATH, instance); -export configApi; -``` - -If you want to add some interceptors you can use axios build in interceptors -```JS -// api.js -import axios from 'axios'; -import { Configuration } from '@redhat-cloud-services/host-inventory-client'; -const instance = axios.create(); - -// Request interceptor -instance.interceptors.request.use((request) => { - // some logic to do with request -}); - -// Response interceptor -instance.interceptors.response.use((response) => { - // some logic to do with request -}); - -// Error interceptor -instance.interceptors.response.use(null, (error) => { - // some logic to do with error -}); - -// BASE_PATH should be set in your constants file -const configApi = new Configuration(undefined, BASE_PATH, instance); -export configApi; -``` - -## Building - -Run `nx build @redhat-cloud-services/config-manager-client` to build the library. - -## Running unit tests - -Run `nx test @redhat-cloud-services/config-manager-client` to execute the unit tests via [Jest](https://jestjs.io). - -## API documentation - -* [README](doc/README.md) diff --git a/packages/config-manager/doc/classes/Configuration.md b/packages/config-manager/doc/classes/Configuration.md deleted file mode 100644 index abba5b004..000000000 --- a/packages/config-manager/doc/classes/Configuration.md +++ /dev/null @@ -1,146 +0,0 @@ -[@redhat-cloud-services/config-manager-client](../README.md) / [Exports](../modules.md) / Configuration - -# Class: Configuration - -## Table of contents - -### Constructors - -- [constructor](Configuration.md#constructor) - -### Properties - -- [accessToken](Configuration.md#accesstoken) -- [apiKey](Configuration.md#apikey) -- [baseOptions](Configuration.md#baseoptions) -- [basePath](Configuration.md#basepath) -- [password](Configuration.md#password) -- [username](Configuration.md#username) - -## Constructors - -### constructor - -• **new Configuration**(`param?`): [`Configuration`](Configuration.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `param` | [`ConfigurationParameters`](../interfaces/ConfigurationParameters.md) | - -#### Returns - -[`Configuration`](Configuration.md) - -#### Defined in - -[configuration.ts:67](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/config-manager/configuration.ts#L67) - -## Properties - -### accessToken - -• `Optional` **accessToken**: `string` \| (`name?`: `string`, `scopes?`: `string`[]) => `string` - -parameter for oauth2 security - -**`Param`** - -security name - -**`Param`** - -oauth2 scope - -**`Memberof`** - -Configuration - -#### Defined in - -[configuration.ts:51](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/config-manager/configuration.ts#L51) - -___ - -### apiKey - -• `Optional` **apiKey**: `string` \| `Promise`\<`string`\> \| (`name`: `string`) => `string` \| (`name`: `string`) => `Promise`\<`string`\> - -parameter for apiKey security - -**`Param`** - -security name - -**`Memberof`** - -Configuration - -#### Defined in - -[configuration.ts:30](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/config-manager/configuration.ts#L30) - -___ - -### baseOptions - -• `Optional` **baseOptions**: `any` - -base options for axios calls - -**`Memberof`** - -Configuration - -#### Defined in - -[configuration.ts:65](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/config-manager/configuration.ts#L65) - -___ - -### basePath - -• `Optional` **basePath**: `string` - -override base path - -**`Memberof`** - -Configuration - -#### Defined in - -[configuration.ts:58](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/config-manager/configuration.ts#L58) - -___ - -### password - -• `Optional` **password**: `string` - -parameter for basic security - -**`Memberof`** - -Configuration - -#### Defined in - -[configuration.ts:44](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/config-manager/configuration.ts#L44) - -___ - -### username - -• `Optional` **username**: `string` - -parameter for basic security - -**`Memberof`** - -Configuration - -#### Defined in - -[configuration.ts:37](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/config-manager/configuration.ts#L37) diff --git a/packages/config-manager/doc/classes/DefaultApi.md b/packages/config-manager/doc/classes/DefaultApi.md deleted file mode 100644 index ac114cf9d..000000000 --- a/packages/config-manager/doc/classes/DefaultApi.md +++ /dev/null @@ -1,236 +0,0 @@ -[@redhat-cloud-services/config-manager-client](../README.md) / [Exports](../modules.md) / DefaultApi - -# Class: DefaultApi - -DefaultApi - object-oriented interface - -**`Export`** - -DefaultApi - -## Hierarchy - -- `BaseAPI` - - ↳ **`DefaultApi`** - -## Table of contents - -### Constructors - -- [constructor](DefaultApi.md#constructor) - -### Properties - -- [axios](DefaultApi.md#axios) -- [basePath](DefaultApi.md#basepath) -- [configuration](DefaultApi.md#configuration) - -### Methods - -- [createProfile](DefaultApi.md#createprofile) -- [getPlaybook](DefaultApi.md#getplaybook) -- [getProfile](DefaultApi.md#getprofile) -- [getProfiles](DefaultApi.md#getprofiles) - -## Constructors - -### constructor - -• **new DefaultApi**(`configuration?`, `basePath?`, `axios?`): [`DefaultApi`](DefaultApi.md) - -#### Parameters - -| Name | Type | Default value | -| :------ | :------ | :------ | -| `configuration?` | [`Configuration`](Configuration.md) | `undefined` | -| `basePath` | `string` | `BASE_PATH` | -| `axios` | `AxiosInstance` | `globalAxios` | - -#### Returns - -[`DefaultApi`](DefaultApi.md) - -#### Inherited from - -BaseAPI.constructor - -#### Defined in - -[base.ts:51](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/config-manager/base.ts#L51) - -## Properties - -### axios - -• `Protected` **axios**: `AxiosInstance` = `globalAxios` - -#### Inherited from - -BaseAPI.axios - -#### Defined in - -[base.ts:51](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/config-manager/base.ts#L51) - -___ - -### basePath - -• `Protected` **basePath**: `string` = `BASE_PATH` - -#### Inherited from - -BaseAPI.basePath - -#### Defined in - -[base.ts:51](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/config-manager/base.ts#L51) - -___ - -### configuration - -• `Protected` **configuration**: `undefined` \| [`Configuration`](Configuration.md) - -#### Inherited from - -BaseAPI.configuration - -#### Defined in - -[base.ts:49](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/config-manager/base.ts#L49) - -## Methods - -### createProfile - -▸ **createProfile**(`inlineObject`, `options?`): `Promise`\<`AxiosResponse`\<[`Profile`](../interfaces/Profile.md), `any`\>\> - -Create and optionally activate a new profile. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `inlineObject` | [`InlineObject`](../interfaces/InlineObject.md) | | -| `options?` | `any` | Override http request option. | - -#### Returns - -`Promise`\<`AxiosResponse`\<[`Profile`](../interfaces/Profile.md), `any`\>\> - -**`Summary`** - -Create a new profile - -**`Throws`** - -**`Memberof`** - -DefaultApi - -#### Defined in - -[api.ts:447](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/config-manager/api.ts#L447) - -___ - -### getPlaybook - -▸ **getPlaybook**(`profileId`, `options?`): `Promise`\<`AxiosResponse`\<`object`, `any`\>\> - -Constructs and returns a Ansible playbook suitable to configure a host for the requested profile. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `profileId` | `string` | | -| `options?` | `any` | Override http request option. | - -#### Returns - -`Promise`\<`AxiosResponse`\<`object`, `any`\>\> - -**`Summary`** - -Retrieve an Ansible playbook for the requested profile - -**`Throws`** - -**`Memberof`** - -DefaultApi - -#### Defined in - -[api.ts:459](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/config-manager/api.ts#L459) - -___ - -### getProfile - -▸ **getProfile**(`id`, `options?`): `Promise`\<`AxiosResponse`\<[`Profile`](../interfaces/Profile.md), `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. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | | -| `options?` | `any` | Override http request option. | - -#### Returns - -`Promise`\<`AxiosResponse`\<[`Profile`](../interfaces/Profile.md), `any`\>\> - -**`Summary`** - -Get a specific profile - -**`Throws`** - -**`Memberof`** - -DefaultApi - -#### Defined in - -[api.ts:471](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/config-manager/api.ts#L471) - -___ - -### getProfiles - -▸ **getProfiles**(`sortBy?`, `limit?`, `offset?`, `options?`): `Promise`\<`AxiosResponse`\<[`InlineResponse200`](../interfaces/InlineResponse200.md), `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. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `sortBy?` | ``"created_at"`` \| ``"created_at:asc"`` \| ``"created_at:desc"`` | | -| `limit?` | `number` | | -| `offset?` | `number` | | -| `options?` | `any` | Override http request option. | - -#### Returns - -`Promise`\<`AxiosResponse`\<[`InlineResponse200`](../interfaces/InlineResponse200.md), `any`\>\> - -**`Summary`** - -Get a list of all profiles - -**`Throws`** - -**`Memberof`** - -DefaultApi - -#### Defined in - -[api.ts:485](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/config-manager/api.ts#L485) diff --git a/packages/config-manager/doc/interfaces/ConfigurationParameters.md b/packages/config-manager/doc/interfaces/ConfigurationParameters.md deleted file mode 100644 index a4f672833..000000000 --- a/packages/config-manager/doc/interfaces/ConfigurationParameters.md +++ /dev/null @@ -1,83 +0,0 @@ -[@redhat-cloud-services/config-manager-client](../README.md) / [Exports](../modules.md) / ConfigurationParameters - -# Interface: ConfigurationParameters - -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. - -## Table of contents - -### Properties - -- [accessToken](ConfigurationParameters.md#accesstoken) -- [apiKey](ConfigurationParameters.md#apikey) -- [baseOptions](ConfigurationParameters.md#baseoptions) -- [basePath](ConfigurationParameters.md#basepath) -- [password](ConfigurationParameters.md#password) -- [username](ConfigurationParameters.md#username) - -## Properties - -### accessToken - -• `Optional` **accessToken**: `string` \| (`name?`: `string`, `scopes?`: `string`[]) => `string` - -#### Defined in - -[configuration.ts:19](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/config-manager/configuration.ts#L19) - -___ - -### apiKey - -• `Optional` **apiKey**: `string` \| `Promise`\<`string`\> \| (`name`: `string`) => `string` \| (`name`: `string`) => `Promise`\<`string`\> - -#### Defined in - -[configuration.ts:16](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/config-manager/configuration.ts#L16) - -___ - -### baseOptions - -• `Optional` **baseOptions**: `any` - -#### Defined in - -[configuration.ts:21](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/config-manager/configuration.ts#L21) - -___ - -### basePath - -• `Optional` **basePath**: `string` - -#### Defined in - -[configuration.ts:20](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/config-manager/configuration.ts#L20) - -___ - -### password - -• `Optional` **password**: `string` - -#### Defined in - -[configuration.ts:18](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/config-manager/configuration.ts#L18) - -___ - -### username - -• `Optional` **username**: `string` - -#### Defined in - -[configuration.ts:17](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/config-manager/configuration.ts#L17) diff --git a/packages/config-manager/doc/interfaces/InlineObject.md b/packages/config-manager/doc/interfaces/InlineObject.md deleted file mode 100644 index 82f5e3c06..000000000 --- a/packages/config-manager/doc/interfaces/InlineObject.md +++ /dev/null @@ -1,80 +0,0 @@ -[@redhat-cloud-services/config-manager-client](../README.md) / [Exports](../modules.md) / InlineObject - -# Interface: InlineObject - -**`Export`** - -InlineObject - -## Table of contents - -### Properties - -- [active](InlineObject.md#active) -- [compliance](InlineObject.md#compliance) -- [insights](InlineObject.md#insights) -- [remediations](InlineObject.md#remediations) - -## Properties - -### active - -• **active**: `boolean` - -Remote host configuration enabled state - -**`Memberof`** - -InlineObject - -#### Defined in - -[api.ts:33](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/config-manager/api.ts#L33) - -___ - -### compliance - -• **compliance**: `boolean` - -Remote configuration status for running Compliance data collection - -**`Memberof`** - -InlineObject - -#### Defined in - -[api.ts:39](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/config-manager/api.ts#L39) - -___ - -### insights - -• **insights**: `boolean` - -Remote configuration status for running Insights data collection - -**`Memberof`** - -InlineObject - -#### Defined in - -[api.ts:45](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/config-manager/api.ts#L45) - -___ - -### remediations - -• **remediations**: `boolean` - -Remote configuration status for running Remediation playbooks - -**`Memberof`** - -InlineObject - -#### Defined in - -[api.ts:51](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/config-manager/api.ts#L51) diff --git a/packages/config-manager/doc/interfaces/InlineResponse200.md b/packages/config-manager/doc/interfaces/InlineResponse200.md deleted file mode 100644 index e3d36abaf..000000000 --- a/packages/config-manager/doc/interfaces/InlineResponse200.md +++ /dev/null @@ -1,87 +0,0 @@ -[@redhat-cloud-services/config-manager-client](../README.md) / [Exports](../modules.md) / InlineResponse200 - -# Interface: InlineResponse200 - -**`Export`** - -InlineResponse200 - -## Table of contents - -### Properties - -- [count](InlineResponse200.md#count) -- [limit](InlineResponse200.md#limit) -- [offset](InlineResponse200.md#offset) -- [results](InlineResponse200.md#results) -- [total](InlineResponse200.md#total) - -## Properties - -### count - -• **count**: `number` - -**`Memberof`** - -InlineResponse200 - -#### Defined in - -[api.ts:70](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/config-manager/api.ts#L70) - -___ - -### limit - -• **limit**: `number` - -**`Memberof`** - -InlineResponse200 - -#### Defined in - -[api.ts:76](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/config-manager/api.ts#L76) - -___ - -### offset - -• **offset**: `number` - -**`Memberof`** - -InlineResponse200 - -#### Defined in - -[api.ts:82](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/config-manager/api.ts#L82) - -___ - -### results - -• **results**: [`Profile`](Profile.md)[] - -**`Memberof`** - -InlineResponse200 - -#### Defined in - -[api.ts:88](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/config-manager/api.ts#L88) - -___ - -### total - -• **total**: `number` - -**`Memberof`** - -InlineResponse200 - -#### Defined in - -[api.ts:64](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/config-manager/api.ts#L64) diff --git a/packages/config-manager/doc/interfaces/Profile.md b/packages/config-manager/doc/interfaces/Profile.md deleted file mode 100644 index eb083d2c8..000000000 --- a/packages/config-manager/doc/interfaces/Profile.md +++ /dev/null @@ -1,148 +0,0 @@ -[@redhat-cloud-services/config-manager-client](../README.md) / [Exports](../modules.md) / Profile - -# Interface: Profile - -**`Export`** - -Profile - -## Table of contents - -### Properties - -- [account\_id](Profile.md#account_id) -- [active](Profile.md#active) -- [compliance](Profile.md#compliance) -- [created\_at](Profile.md#created_at) -- [id](Profile.md#id) -- [insights](Profile.md#insights) -- [org\_id](Profile.md#org_id) -- [remediations](Profile.md#remediations) - -## Properties - -### account\_id - -• `Optional` **account\_id**: `string` - -Red Hat account number - -**`Memberof`** - -Profile - -#### Defined in - -[api.ts:107](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/config-manager/api.ts#L107) - -___ - -### active - -• `Optional` **active**: `boolean` - -Remote host configuration enabled state - -**`Memberof`** - -Profile - -#### Defined in - -[api.ts:125](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/config-manager/api.ts#L125) - -___ - -### compliance - -• `Optional` **compliance**: `boolean` - -Remote configuration status for running Compliance data collection - -**`Memberof`** - -Profile - -#### Defined in - -[api.ts:131](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/config-manager/api.ts#L131) - -___ - -### created\_at - -• `Optional` **created\_at**: `string` - -Time of profile creation - -**`Memberof`** - -Profile - -#### Defined in - -[api.ts:119](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/config-manager/api.ts#L119) - -___ - -### id - -• `Optional` **id**: `string` - -Profile unique identity value - -**`Memberof`** - -Profile - -#### Defined in - -[api.ts:101](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/config-manager/api.ts#L101) - -___ - -### insights - -• `Optional` **insights**: `boolean` - -Remote configuration status for running Insights data collection - -**`Memberof`** - -Profile - -#### Defined in - -[api.ts:137](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/config-manager/api.ts#L137) - -___ - -### org\_id - -• `Optional` **org\_id**: `string` - -Red Hat organization identity value - -**`Memberof`** - -Profile - -#### Defined in - -[api.ts:113](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/config-manager/api.ts#L113) - -___ - -### remediations - -• `Optional` **remediations**: `boolean` - -Remote configuration status for running Remediation playbooks - -**`Memberof`** - -Profile - -#### Defined in - -[api.ts:143](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/config-manager/api.ts#L143) diff --git a/packages/config-manager/doc/modules.md b/packages/config-manager/doc/modules.md deleted file mode 100644 index 3493df9f8..000000000 --- a/packages/config-manager/doc/modules.md +++ /dev/null @@ -1,118 +0,0 @@ -[@redhat-cloud-services/config-manager-client](README.md) / Exports - -# @redhat-cloud-services/config-manager-client - -## Table of contents - -### Classes - -- [Configuration](classes/Configuration.md) -- [DefaultApi](classes/DefaultApi.md) - -### Interfaces - -- [ConfigurationParameters](interfaces/ConfigurationParameters.md) -- [InlineObject](interfaces/InlineObject.md) -- [InlineResponse200](interfaces/InlineResponse200.md) -- [Profile](interfaces/Profile.md) - -### Functions - -- [DefaultApiAxiosParamCreator](modules.md#defaultapiaxiosparamcreator) -- [DefaultApiFactory](modules.md#defaultapifactory) -- [DefaultApiFp](modules.md#defaultapifp) - -## Functions - -### DefaultApiAxiosParamCreator - -▸ **DefaultApiAxiosParamCreator**(`configuration?`): `Object` - -DefaultApi - axios parameter creator - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `configuration?` | [`Configuration`](classes/Configuration.md) | - -#### Returns - -`Object` - -| Name | Type | Description | -| :------ | :------ | :------ | -| `createProfile` | (`inlineObject`: [`InlineObject`](interfaces/InlineObject.md), `options?`: `any`) => `Promise`\<`RequestArgs`\> | - | -| `getPlaybook` | (`profileId`: `string`, `options?`: `any`) => `Promise`\<`RequestArgs`\> | - | -| `getProfile` | (`id`: `string`, `options?`: `any`) => `Promise`\<`RequestArgs`\> | - | -| `getProfiles` | (`sortBy?`: ``"created_at"`` \| ``"created_at:asc"`` \| ``"created_at:desc"``, `limit?`: `number`, `offset?`: `number`, `options?`: `any`) => `Promise`\<`RequestArgs`\> | - | - -**`Export`** - -#### Defined in - -[api.ts:150](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/config-manager/api.ts#L150) - -___ - -### DefaultApiFactory - -▸ **DefaultApiFactory**(`configuration?`, `basePath?`, `axios?`): `Object` - -DefaultApi - factory interface - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `configuration?` | [`Configuration`](classes/Configuration.md) | -| `basePath?` | `string` | -| `axios?` | `AxiosInstance` | - -#### Returns - -`Object` - -| Name | Type | -| :------ | :------ | -| `createProfile` | (`inlineObject`: [`InlineObject`](interfaces/InlineObject.md), `options?`: `any`) => `AxiosPromise`\<[`Profile`](interfaces/Profile.md)\> | -| `getPlaybook` | (`profileId`: `string`, `options?`: `any`) => `AxiosPromise`\<`object`\> | -| `getProfile` | (`id`: `string`, `options?`: `any`) => `AxiosPromise`\<[`Profile`](interfaces/Profile.md)\> | -| `getProfiles` | (`sortBy?`: ``"created_at"`` \| ``"created_at:asc"`` \| ``"created_at:desc"``, `limit?`: `number`, `offset?`: `number`, `options?`: `any`) => `AxiosPromise`\<[`InlineResponse200`](interfaces/InlineResponse200.md)\> | - -**`Export`** - -#### Defined in - -[api.ts:385](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/config-manager/api.ts#L385) - -___ - -### DefaultApiFp - -▸ **DefaultApiFp**(`configuration?`): `Object` - -DefaultApi - functional programming interface - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `configuration?` | [`Configuration`](classes/Configuration.md) | - -#### Returns - -`Object` - -| Name | Type | -| :------ | :------ | -| `createProfile` | (`inlineObject`: [`InlineObject`](interfaces/InlineObject.md), `options?`: `any`) => `Promise`\<(`axios?`: `AxiosInstance`, `basePath?`: `string`) => `AxiosPromise`\<[`Profile`](interfaces/Profile.md)\>\> | -| `getPlaybook` | (`profileId`: `string`, `options?`: `any`) => `Promise`\<(`axios?`: `AxiosInstance`, `basePath?`: `string`) => `AxiosPromise`\<`object`\>\> | -| `getProfile` | (`id`: `string`, `options?`: `any`) => `Promise`\<(`axios?`: `AxiosInstance`, `basePath?`: `string`) => `AxiosPromise`\<[`Profile`](interfaces/Profile.md)\>\> | -| `getProfiles` | (`sortBy?`: ``"created_at"`` \| ``"created_at:asc"`` \| ``"created_at:desc"``, `limit?`: `number`, `offset?`: `number`, `options?`: `any`) => `Promise`\<(`axios?`: `AxiosInstance`, `basePath?`: `string`) => `AxiosPromise`\<[`InlineResponse200`](interfaces/InlineResponse200.md)\>\> | - -**`Export`** - -#### Defined in - -[api.ts:318](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/config-manager/api.ts#L318) diff --git a/packages/config-manager/jest.config.ts b/packages/config-manager/jest.config.ts index dfdc9d710..2ae4dc817 100644 --- a/packages/config-manager/jest.config.ts +++ b/packages/config-manager/jest.config.ts @@ -7,4 +7,5 @@ export default { }, moduleFileExtensions: ['ts', 'js', 'html'], coverageDirectory: '../../coverage/packages/config-manager', + testPathIgnorePatterns: ['/node_modules/','/tests/integration/'], }; diff --git a/packages/config-manager/openapitools.json b/packages/config-manager/openapitools.json index 06ac15078..c12143302 100644 --- a/packages/config-manager/openapitools.json +++ b/packages/config-manager/openapitools.json @@ -1,7 +1,7 @@ { - "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", + "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", "spaces": 2, "generator-cli": { - "version": "7.0.0" + "version": "7.20.0" } } diff --git a/packages/config-manager/package.json b/packages/config-manager/package.json index 48dd71eb3..b992e26ff 100644 --- a/packages/config-manager/package.json +++ b/packages/config-manager/package.json @@ -2,32 +2,32 @@ "name": "@redhat-cloud-services/config-manager-client", "version": "4.0.7", "description": "", - "main": "./dist/index.js", - "typings": "./dist/index.d.ts", + "main": "./index.js", + "typings": "./index.d.ts", "exports": { ".": { - "types": "./dist/index.d.ts", - "import": "./dist/esm/index.js", - "default": "./dist/index.js" + "types": "./index.d.ts", + "import": "./esm/index.js", + "default": "./index.js" }, "./api": { - "types": "./dist/api.d.ts", - "import": "./dist/esm/api.js", - "default": "./dist/api.js" + "types": "./api.d.ts", + "import": "./esm/api.js", + "default": "./api.js" }, "./*": { - "types": "./dist/*/index.d.ts", - "import": "./dist/esm/*/index.js", - "default": "./dist/*/index.js" + "types": "./*/index.d.ts", + "import": "./esm/*/index.js", + "default": "./*/index.js" } }, "typesVersions": { "*": { "api": [ - "./dist/api.d.ts" + "./api.d.ts" ], "*": [ - "./dist/*/index.d.ts" + "./*/index.d.ts" ] } }, diff --git a/packages/config-manager/project.json b/packages/config-manager/project.json index 87926e0ed..f300d5a4e 100644 --- a/packages/config-manager/project.json +++ b/packages/config-manager/project.json @@ -4,20 +4,30 @@ "sourceRoot": "packages/config-manager", "projectType": "library", "targets": { + "clean-generate": { + "command": "rm -rf packages/config-manager/src" + }, "generate": { + "dependsOn": ["clean-generate"], "executor": "@redhat-cloud-services/build-utils:client-generator", "options": { + "outputPath": "packages/config-manager/src", "specs": { "default": "https://raw.githubusercontent.com/RedHatInsights/config-manager/master/internal/http/v2/openapi.json" }, "clientName": "ConfigManagerClient" } }, + "clean-build": { + "command": "rm -rf packages/config-manager/dist" + }, "build": { + "dependsOn": ["clean-build", "^build"], "executor": "@redhat-cloud-services/build-utils:builder", "options": { + "inputPath": "packages/config-manager/src", "outputPath": "packages/config-manager/dist", - "main": "packages/config-manager/index.ts", + "main": "packages/config-manager/src/index.ts", "esmTsConfig": "packages/config-manager/tsconfig.esm.json", "cjsTsConfig": "packages/config-manager/tsconfig.cjs.json" } diff --git a/packages/config-manager/src/.gitignore b/packages/config-manager/src/.gitignore new file mode 100644 index 000000000..149b57654 --- /dev/null +++ b/packages/config-manager/src/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/packages/config-manager/src/.npmignore b/packages/config-manager/src/.npmignore new file mode 100644 index 000000000..6b112e4e7 --- /dev/null +++ b/packages/config-manager/src/.npmignore @@ -0,0 +1,6 @@ +.openapi-generator +node_modules +.openapi-generator-ignore +package-lock.json +*.ts +!*.d.ts diff --git a/packages/config-manager/.openapi-generator-ignore b/packages/config-manager/src/.openapi-generator-ignore similarity index 100% rename from packages/config-manager/.openapi-generator-ignore rename to packages/config-manager/src/.openapi-generator-ignore diff --git a/packages/config-manager/src/.openapi-generator/FILES b/packages/config-manager/src/.openapi-generator/FILES new file mode 100644 index 000000000..8981b206c --- /dev/null +++ b/packages/config-manager/src/.openapi-generator/FILES @@ -0,0 +1,14 @@ +.gitignore +.npmignore +.openapi-generator-ignore +CreateProfile/index.ts +GetProfile/index.ts +api.ts +docs/CreateProfileApi.md +docs/CreateProfileRequest.md +docs/GetProfileApi.md +docs/Profile.md +git_push.sh +index.ts +index.ts +types/index.ts diff --git a/packages/config-manager/src/.openapi-generator/VERSION b/packages/config-manager/src/.openapi-generator/VERSION new file mode 100644 index 000000000..2540a3a5b --- /dev/null +++ b/packages/config-manager/src/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.20.0 diff --git a/packages/config-manager/CreateProfile/index.ts b/packages/config-manager/src/CreateProfile/index.ts similarity index 100% rename from packages/config-manager/CreateProfile/index.ts rename to packages/config-manager/src/CreateProfile/index.ts diff --git a/packages/config-manager/GetProfile/index.ts b/packages/config-manager/src/GetProfile/index.ts similarity index 100% rename from packages/config-manager/GetProfile/index.ts rename to packages/config-manager/src/GetProfile/index.ts diff --git a/packages/config-manager/api.ts b/packages/config-manager/src/api.ts similarity index 96% rename from packages/config-manager/api.ts rename to packages/config-manager/src/api.ts index 14220d9f7..9f986865c 100644 --- a/packages/config-manager/api.ts +++ b/packages/config-manager/src/api.ts @@ -10,8 +10,7 @@ import { const endpointList = { createProfile, - getProfile, - + getProfile, }; diff --git a/packages/config-manager/src/docs/CreateProfileApi.md b/packages/config-manager/src/docs/CreateProfileApi.md new file mode 100644 index 000000000..5eb1755dc --- /dev/null +++ b/packages/config-manager/src/docs/CreateProfileApi.md @@ -0,0 +1,63 @@ +# CreateProfileApi + +All URIs are relative to *https://raw.githubusercontent.com/api/config-manager/v2* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**createProfile**](#createprofile) | **POST** /profiles | Create a new profile| + +# **createProfile** +> Profile createProfile(createProfileRequest) + +Create and optionally activate a new profile. + +### Example + +```typescript +import { + CreateProfileApi, + Configuration, + CreateProfileRequest +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new CreateProfileApi(configuration); + +let createProfileRequest: CreateProfileRequest; // + +const { status, data } = await apiInstance.createProfile( + createProfileRequest +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **createProfileRequest** | **CreateProfileRequest**| | | + + +### Return type + +**Profile** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**201** | Created | - | +|**304** | Not Modified | - | +|**400** | Bad Request | - | +|**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/packages/config-manager/src/docs/CreateProfileRequest.md b/packages/config-manager/src/docs/CreateProfileRequest.md new file mode 100644 index 000000000..c8b31cc1b --- /dev/null +++ b/packages/config-manager/src/docs/CreateProfileRequest.md @@ -0,0 +1,26 @@ +# CreateProfileRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active** | **boolean** | Remote host configuration enabled state | [default to undefined] +**compliance** | **boolean** | Remote configuration status for running Compliance data collection | [default to undefined] +**insights** | **boolean** | Remote configuration status for running Insights data collection | [default to undefined] +**remediations** | **boolean** | Remote configuration status for running Remediation playbooks | [default to undefined] + +## Example + +```typescript +import { CreateProfileRequest } from './api'; + +const instance: CreateProfileRequest = { + active, + compliance, + insights, + remediations, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/packages/config-manager/src/docs/GetProfileApi.md b/packages/config-manager/src/docs/GetProfileApi.md new file mode 100644 index 000000000..f59e86cf1 --- /dev/null +++ b/packages/config-manager/src/docs/GetProfileApi.md @@ -0,0 +1,62 @@ +# GetProfileApi + +All URIs are relative to *https://raw.githubusercontent.com/api/config-manager/v2* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**getProfile**](#getprofile) | **GET** /profiles/{id} | Get a specific profile| + +# **getProfile** +> Profile getProfile() + +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. + +### Example + +```typescript +import { + GetProfileApi, + Configuration +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new GetProfileApi(configuration); + +let id: string; // (default to undefined) + +const { status, data } = await apiInstance.getProfile( + id +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **id** | [**string**] | | defaults to undefined| + + +### Return type + +**Profile** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | OK | - | +|**400** | Bad Request | - | +|**404** | Not Found | - | +|**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/packages/config-manager/src/docs/Profile.md b/packages/config-manager/src/docs/Profile.md new file mode 100644 index 000000000..ec1c9b86c --- /dev/null +++ b/packages/config-manager/src/docs/Profile.md @@ -0,0 +1,34 @@ +# Profile + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Profile unique identity value | [optional] [default to undefined] +**account_id** | **string** | Red Hat account number | [optional] [default to undefined] +**org_id** | **string** | Red Hat organization identity value | [optional] [default to undefined] +**created_at** | **string** | Time of profile creation | [optional] [default to undefined] +**active** | **boolean** | Remote host configuration enabled state | [optional] [default to undefined] +**compliance** | **boolean** | Remote configuration status for running Compliance data collection | [optional] [default to undefined] +**insights** | **boolean** | Remote configuration status for running Insights data collection | [optional] [default to undefined] +**remediations** | **boolean** | Remote configuration status for running Remediation playbooks | [optional] [default to undefined] + +## Example + +```typescript +import { Profile } from './api'; + +const instance: Profile = { + id, + account_id, + org_id, + created_at, + active, + compliance, + insights, + remediations, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/packages/config-manager/index.ts b/packages/config-manager/src/index.ts similarity index 79% rename from packages/config-manager/index.ts rename to packages/config-manager/src/index.ts index f67109c6b..c8f298bba 100644 --- a/packages/config-manager/index.ts +++ b/packages/config-manager/src/index.ts @@ -4,5 +4,3 @@ export { default as getProfile, type GetProfileReturnType } from './GetProfile' export * from './types' - -// Trigger release - updated to regenerate clients diff --git a/packages/config-manager/types/index.ts b/packages/config-manager/src/types/index.ts similarity index 100% rename from packages/config-manager/types/index.ts rename to packages/config-manager/src/types/index.ts diff --git a/packages/config-manager/tsconfig.cjs.json b/packages/config-manager/tsconfig.cjs.json index d29a1ef4a..34a67d692 100644 --- a/packages/config-manager/tsconfig.cjs.json +++ b/packages/config-manager/tsconfig.cjs.json @@ -1,6 +1,21 @@ { "extends": "./tsconfig.esm.json", "compilerOptions": { - "module": "CommonJS", + "declaration": true, + "target": "es5", + "module": "commonjs", + "noImplicitAny": true, + "outDir": ".", + "rootDir": ".", + "lib": [ + "es2017", + "dom" + ] }, + "exclude": [ + "dist", + "node_modules", + "*.d.ts", + "jest.config.ts" + ] } diff --git a/packages/config-manager/tsconfig.esm.json b/packages/config-manager/tsconfig.esm.json index 28ffe1d28..d3bf25a51 100644 --- a/packages/config-manager/tsconfig.esm.json +++ b/packages/config-manager/tsconfig.esm.json @@ -1,13 +1,24 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "outDir": "../../dist/out-tsc", + "target": "es2021", + "module": "esnext", + "moduleResolution": "node", "declaration": true, - "types": ["node"], - "module": "ES2015", - "target": "ES5", - "rootDir": "./", + "declarationMap": true, + "noImplicitAny": true, + "outDir": "esm", + "rootDir": ".", + "lib": [ + "es2017", + "dom" + ] }, - "include": ["*.ts", "**/*.ts"], - "exclude": ["jest.config.ts", "dist"] + "include": ["src/**/*.ts"], + "exclude": [ + "dist", + "node_modules", + "*.d.ts", + "jest.config.ts" + ] }