diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..de53720 --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +src/rh-api/gen/ diff --git a/eslint.config.mjs b/eslint.config.mjs index 8fac9f2..00a4353 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -55,6 +55,7 @@ export default [ '**/coverage/', 'extensions/*.ts', 'scripts/**', + 'src/rh-api/gen/*', ], }, js.configs.recommended, diff --git a/package.json b/package.json index 9192135..86ad34b 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,8 @@ } }, "scripts": { - "build": "vite build", + "generate:subscription-v1": "npx openapi-typescript src/rh-api/subscription-schema-v1.json -o src/rh-api/gen/subscription-v1.d.ts", + "build": "pnpm generate:subscription-v1 && vite build", "test": "vitest run --coverage --passWithNoTests", "test:watch": "vitest watch --coverage --passWithNoTests", "format:check": "prettier --check \"src/**/*.ts\"", @@ -86,6 +87,7 @@ "@crc-org/macadam.js": "0.0.1-202504301306-5ade487", "@podman-desktop/api": "1.18.0", "compare-versions": "^6.1.1", + "openapi-fetch": "^0.13.5", "semver": "^7.7.1", "ssh2": "^1.16.0" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 283e7d8..8676339 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -17,6 +17,9 @@ importers: compare-versions: specifier: ^6.1.1 version: 6.1.1 + openapi-fetch: + specifier: ^0.13.5 + version: 0.13.5 semver: specifier: ^7.7.1 version: 7.7.1 @@ -1948,6 +1951,12 @@ packages: once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + openapi-fetch@0.13.5: + resolution: {integrity: sha512-AQK8T9GSKFREFlN1DBXTYsLjs7YV2tZcJ7zUWxbjMoQmj8dDSFRrzhLCbHPZWA1TMV3vACqfCxLEZcwf2wxV6Q==} + + openapi-typescript-helpers@0.0.15: + resolution: {integrity: sha512-opyTPaunsklCBpTK8JGef6mfPhLSnyy5a0IN9vKtx3+4aExf+KxEqYwIy3hqkedXIB97u357uLMJsOnm3GVjsw==} + optionator@0.9.4: resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} engines: {node: '>= 0.8.0'} @@ -4671,6 +4680,12 @@ snapshots: dependencies: wrappy: 1.0.2 + openapi-fetch@0.13.5: + dependencies: + openapi-typescript-helpers: 0.0.15 + + openapi-typescript-helpers@0.0.15: {} + optionator@0.9.4: dependencies: deep-is: 0.1.4 diff --git a/src/authentication.ts b/src/authentication.ts new file mode 100644 index 0000000..7715372 --- /dev/null +++ b/src/authentication.ts @@ -0,0 +1,38 @@ +/********************************************************************** + * Copyright (C) 2025 Red Hat, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ***********************************************************************/ + +import * as extensionApi from '@podman-desktop/api'; + +import { SubscriptionManagerClientV1 } from './rh-api/rh-api-sm'; + +export async function initAuthentication(): Promise { + const currentSession = await extensionApi.authentication.getSession( + 'redhat.authentication-provider', + ['api.iam.registry_service_accounts', 'api.console'], + { createIfNone: true }, + ); + + if (!currentSession) { + throw new Error('unable to connect to Red Hat SSO, please configure the RH authentication'); + } else { + return new SubscriptionManagerClientV1({ + BASE: 'https://api.access.redhat.com/management/v1/', + TOKEN: currentSession.accessToken, + }); + } +} diff --git a/src/rh-api/gen/subscription-v1.d.ts b/src/rh-api/gen/subscription-v1.d.ts new file mode 100644 index 0000000..4517660 --- /dev/null +++ b/src/rh-api/gen/subscription-v1.d.ts @@ -0,0 +1,5142 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + '/allocations': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all allocations for a user + * @description The default and max number of results in a response are 100. + */ + get: operations['listAllocations']; + put?: never; + /** + * Create Satellite + * @description Create Satellite by name and version(optional). + * Customers can use any version listed in the `/v1/allocations/versions` endpoint (use attribute `value`). + * If no version is specified, it will take the latest available version for Satellite. + */ + post: operations['createSatellite']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/allocations/versions': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Satellite versions + * @description Returns list of Satellite version 6.0 and above + */ + get: operations['listVersionsAllocation']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/allocations/{uuid}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get an allocation by UUID + * @description System, RHUI, Hypervisor are unsupported allocation types + */ + get: operations['showAllocation']; + /** + * Update an allocation + * @description Allows to update simpleContentAccess for Satellite of version 6.3 and above + * Possible value for simpleContentAccess are: + * + * - enabled + * - disabled + */ + put: operations['updateAllocation']; + post?: never; + /** + * Remove allocation profile + * @description The default success response will be 204 + * + * System, RHUI, Hypervisor are unsupported allocation types + */ + delete: operations['removeAllocation']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/allocations/{uuid}/entitlements': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Attach entitlement to allocation + * @description The default success response will be 200. + * + * System, RHUI, Hypervisor are unsupported allocation types. + * SAM 1.3 or higher, and Satellite 5.6 versions are supported. + */ + post: operations['attachEntitlementAllocation']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/allocations/{uuid}/entitlements/{EntitlementID}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** + * Update attached entitlement to allocation + * @description The default success response will be 200. + * System, RHUI, Hypervisor are unsupported allocation types + */ + put: operations['updateEntitlementAllocation']; + post?: never; + /** + * Remove entitlement from the allocation + * @description The default success response will be 204. + */ + delete: operations['removeAllocationEntitlement']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/allocations/{uuid}/export': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Trigger allocation manifest export + * @description Starts job to generate export for an allocation. To check the status of the export job visit the href in the response. + * + * System, RHUI, Hypervisor are unsupported allocation types. SAM 1.2 or lower and Satellite 5.9 or lower versions are unsupported. + */ + get: operations['exportAllocation']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/allocations/{uuid}/export/{ExportID}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Download allocation manifest + * @description Success response contains a zip file. The link is one-time download and expires after one try. Trigger export job to get another download link. + * + * Content-Type: application/zip + */ + get: operations['getExportAllocation']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/allocations/{uuid}/exportJob/{ExportJobID}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Check status of allocation manifest export + * @description Returns export download link in response. + */ + get: operations['exportJobAllocation']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/allocations/{uuid}/pools': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all pools for an allocation + * @description System, RHUI, Hypervisor are unsupported allocation types. SAM 1.3 or higher, and Satellite 5.6 versions are supported. + */ + get: operations['listAllocationPools']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/allocations/{uuid}/{EntitlementID}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + /** + * Remove entitlement from the allocation + * @deprecated + * @description The default success response will be 204. + */ + delete: operations['removeAllocationEntitlementDeprecated']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/cloud_access_providers/accounts': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + /** + * Remove a provider account by source id + * @description Removes a currently-enabled provider account, including removing access to Gold Images, where applicable using the sourceID provided. You can find a list of currently-enabled provider accounts and provider short names from the `/v1/cloud_access_providers/enabled` endpoint. + * + */ + delete: operations['RemoveProviderAccountBySourceID']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/cloud_access_providers/enabled': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all enabled cloud access providers for a user + * @description Returns the full list of all enabled Red Hat products and Cloud Access provider accounts/subscriptions associated with the user’s Red Hat account. + * - For Products that are expired `nextRenewal` field would be omitted and `totalQuantity` would be `0`. + * - Product objects can have `totalQuantity` field as `-1` indicating `Unlimited` quantity available. + * - The `nextRenewalDate` field of a Product has the format `YYYY-MM-DD`. + * - The `goldImageStatus` details are available for an account when the Provider is a certified Gold Image Provider and the account has been requested for gold image access. The `status` field of a goldImageStatus object could be `"Requested"`, `"Granted"` or `"Failed"`. + * - The `imageGroups` field is available for a product when the Provider is a certified Gold Image Provider, and the product has a gold image group available for it. + * + */ + get: operations['listEnabledCloudAccessProviders']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/cloud_access_providers/{ProviderShortName}/accounts': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Add accounts for a provider + * @description Add up to `100` new provider accounts, with optional nicknames, to a currently-enabled provider for Red Hat Cloud Access. You can find a list of currently-enabled provider accounts and provider short names from the `/v1/cloud_access_providers/enabled` endpoint. + * + */ + post: operations['AddProviderAccounts']; + /** + * Remove a provider account + * @description Removes a currently-enabled provider account, including removing access to Gold Images, where applicable. You can find a list of currently-enabled provider accounts and provider short names from the `/v1/cloud_access_providers/enabled` endpoint. + * + */ + delete: operations['RemoveProviderAccount']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/cloud_access_providers/{ProviderShortName}/accounts/{AccountID}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** + * Update provider account + * @description Updates the nickname for a currently-enabled provider account. You can find a list of currently-enabled provider accounts and provider short names from the `/v1/cloud_access_providers/enabled` endpoint. + * + */ + put: operations['UpdateProviderAccount']; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/cloud_access_providers/{ProviderShortName}/accounts/{AccountID}/verification': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** + * Verify a provider account + * @description Verifies a cloud provider account for use with RHSM Auto Registration, which allows for cloud instances to automatically register with RHSM upon provisioning. + * + * Auto Registration is currently only available for the following cloud providers: + * - AWS + * - AWS GovCloud + * - ACS China + * - Microsoft Azure + * - Google Cloud Provider + * + * + * This endpoint accepts a cloud instance "identity" document and "signature" from the cloud provider's metadata service. Use the following links for more info on how to obtain these: + * - For AWS: [EC2 Instance Identity Document](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-identity-documents.html) and [Signature](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/verify-rsa2048.html) + * - For Azure: [Azure Instance Metadata](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/instance-metadata-service) and [Signature](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/instance-metadata-service?tabs=linux#attested-data) + * - For GCP: [Compute Engine Instance Identity JWT token](https://cloud.google.com/compute/docs/instances/verifying-instance-identity#request_signature). Note: Please use "https://subscription.rhsm.redhat.com:443/subscription" as value for "audience" query parameter and "full" as value for "format" query parameter while generating the token + * + * + * An HTTP 400 response will be returned if the cloud provider does not support automatic registration, the signature of the document cannot be verified, the cloud provider account has already been verified for a different Red Hat account, or if the account in the instance metadata does not match the provided account ID. + * + * An HTTP 204 response will be returned if the account has been successfully verified. Attempts to verify an account that is already verified will return an HTTP 204 response with no changes being made. + * + */ + put: operations['VerifyProviderAccount']; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/cloud_access_providers/{ProviderShortName}/goldimage': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Enable Gold image access + * @description Requests access to Red Hat Gold Images, where available, for currently-enabled products and provider accounts. Customers can request Red Hat Gold Images for account IDs and product image groups listed in the `/v1/cloud_access_providers/enabled` endpoint using the provider short name listed in the same response. After the request has been accepted for processing, gold image status for accounts can be checked in the `/v1/cloud_access_providers/enabled` endpoint response. + * + */ + post: operations['EnableGoldImages']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/errata': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all errata for a user's systems + * @description The default and max results in a response are 1000. + */ + get: operations['listErrata']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/errata/cset/{ContentSet}/arch/{Arch}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get all the errata for the specified content set and arch + * @description Limit is the number of results in a response. The default limit is 50 and max limit is 100. + */ + get: operations['listErrataByContentSetArch']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/errata/{AdvisoryID}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get the details of an advisory + * @description This will get the details of an advisory specified by its advisoryID. + */ + get: operations['showErratum']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/errata/{AdvisoryID}/images': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all updated container images for an advisory + * @description This will list all updated container images that address the advisory specified + */ + get: operations['listErratumImages']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/errata/{AdvisoryID}/packages': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all packages for an advisory + * @description The default and max results in a response are 50. + */ + get: operations['listErratumPackages']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/errata/{AdvisoryID}/systems': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all systems for an advisory + * @description The default and max results in a response are 1000. + */ + get: operations['listErratumSystems']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/images/cset/{ContentSet}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List available images in a content set + * @description List all the available images in a given content set. The content set parameter is expected to be + * properly formatted (for example rhel-8-for-x86_64-baseos-isos). And the user requesting the endpoint + * is expected to have Download permission (UGC). If the user is entitled to an image, a "downloadHref" attribute is added in the image response object which links to image download API. The list is paginated by default to 25 results in a response and goes to maximum 100 results in a response. Use pagination by setting offset and limit url parameters (valid integer values). + * + */ + get: operations['listImagesByContentSet']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/images/rhel/{Version}/{Arch}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List RHEL image downloads by version and architecture. + * @description List all the available images for the given version and architecture. The Version parameter is expected to be a valid RHEL version. Example: 8.1, 8.2 etc. + * The Arch parameter should be one of the valid RHEL architectures. Example: x86_64, aarch64 etc. + * The user requesting the endpoint is expected to have Download permission (UGC). + * If the user is entitled to an image, a "downloadHref" attribute is added in the image response object which links to image download API. + * + */ + get: operations['listImageDownloadsByVersionArch']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/images/{checksum}/download': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Download an image by its SHA256 checksum + * @description Find an image by its SHA256 checksum and generate a download link with a short-lived expiration. It is expected for users to obtain a new download link every time an image is downloaded and to not store the link for more than several minutes. If the user has "Download Software and Updates" permissions and a valid subscription for the image, they will receive a HTTP 307 redirect to the location on the Red Hat CDN. Clients can either follow the HTTP redirect or find the download URL in the response body. + * + */ + get: operations['downloadImage']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/organization': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get details of the user's organization + * @description Show Simple Content Access details of user's organization + */ + get: operations['checkOrgSCACapability']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/packages/cset/{ContentSet}/arch/{Arch}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get all the packages for the specified content set and arch. + * @description The default and max results in a response are 50 and 100 respectively. + */ + get: operations['listPackagesByContentSetArch']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/packages/{Checksum}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get the details of a package + * @description This will get the details of a package specified by its checksum. + */ + get: operations['showPackage']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/packages/{checksum}/download': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Download a package by its SHA256 checksum + * @description Find a package by its SHA256 checksum and generate a download link with a short-lived expiration. It is expected for users to obtain a new download link every time a package is downloaded and to not store the link for more than several minutes. If the user has "Download Software and Updates" permissions and a valid subscription for the package, they will receive an HTTP 307 redirect to the location on the Red Hat CDN. Clients can either follow the HTTP redirect or find the download URL in the response body. + * + */ + get: operations['downloadPackage']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/subscriptions': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all subscriptions for a user + * @description The default and max results in a response are 50. + */ + get: operations['listSubscriptions']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/subscriptions/{SubscriptionNumber}/contentSets': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all content sets for a subscription + * @description The default and max results in a response are 1000. + */ + get: operations['listSubContentSets']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/subscriptions/{SubscriptionNumber}/systems': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all systems consuming a subscription + * @description The default and max results in a response are 100. + */ + get: operations['listSubSystems']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/systems': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all systems for a user + * @description The default and max number of results in a response are 100. + */ + get: operations['listSystems']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/systems/{SystemUUID}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get a system specified by UUID. + * @description Sam & Satellite systems are unsupported system types. + */ + get: operations['showSystem']; + put?: never; + post?: never; + /** + * Remove system profile + * @description The default success response will be 204 + */ + delete: operations['removeSystem']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/systems/{SystemUUID}/entitlements': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Attach entitlement to system + * @description The default success response will be 200. + * + * Sam & Satellite systems are unsupported system types. + */ + post: operations['attachEntitlement']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/systems/{SystemUUID}/errata': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all applicable errata for a system + * @description The default and max number of results in a response are 100. + */ + get: operations['listSystemErrata']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/systems/{SystemUUID}/packages': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all packages for a system + * @description The default and max number of results in a response are 1000. + */ + get: operations['listSystemPackages']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/systems/{SystemUUID}/pools': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List all pools for a system + * @description The default and max number of results in a response are 50. + */ + get: operations['listSystemPools']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/systems/{SystemUUID}/{EntitlementID}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + /** + * Remove entitlement from the system + * @description The default success response will be 204. + */ + delete: operations['removeSystemEntitlement']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; +} +export type webhooks = Record; +export interface components { + schemas: { + /** @description APIPageParam details the pagination parameters in APIResponse */ + APIPageParam: { + count?: number; + limit?: number; + offset?: number; + }; + /** @description An account to be added */ + AddProviderAccount: { + id?: string; + nickname?: string; + }; + /** Allocation is an entity that consumes entitlements. Also referred as a Distributor. */ + Allocation: { + entitlementQuantity?: number; + name?: string; + simpleContentAccess?: string; + type?: string; + url?: string; + uuid?: string; + version?: string; + }; + /** @description details of a subscription allocation */ + AllocationDetails: { + createdBy?: string; + createdDate?: components['schemas']['Date']; + entitlementsAttached?: components['schemas']['EntitlementsAttachedResponse']; + entitlementsAttachedQuantity?: number; + lastModified?: components['schemas']['Date']; + name?: string; + simpleContentAccess?: string; + type?: string; + uuid?: string; + version?: string; + }; + /** @description details of a subscription allocation */ + AllocationSummary: { + contentAccessMode?: string; + createdBy?: string; + createdDate?: components['schemas']['Date']; + entitlementsAttachedQuantity?: number; + lastModified?: components['schemas']['Date']; + name?: string; + type?: string; + uuid?: string; + version?: string; + }; + /** @description List of satellite version */ + AllocationVersion: { + description?: string; + value?: string; + }; + /** System is an entity that consumes entitlements. Also referred as a Consumer. */ + AttachEntitlement: { + autoAttachSetting?: boolean; + complianceStatus?: string; + createdBy?: string; + createdDate?: components['schemas']['Date']; + entitlementStatus?: string; + entitlementsAttached?: components['schemas']['EntitlementsAttachedResponse']; + entitlementsAttachedCount?: number; + errataApplicabilityCounts?: components['schemas']['ErrataApplicabilityCounts']; + factsCount?: number; + hostname?: string; + installedProductsCount?: number; + lastCheckin?: components['schemas']['Date']; + name?: string; + serviceLevelPreference?: string; + type?: string; + uuid?: string; + }; + /** ContentSet represent a contentset for the listContentSets API Response. */ + ContentSet: { + arch?: string; + enabled?: boolean; + label?: string; + name?: string; + type?: string; + }; + /** + * @description Date represents the date format used for API returns + * @example 2006-01-02T15:04:05.000Z + */ + Date: string; + /** DetailResponse is the user-friendly response from the service. */ + DetailResponse: { + contractNumber?: string; + endDate?: components['schemas']['Date']; + pools?: components['schemas']['Pool'][]; + quantity?: string; + sku?: string; + startDate?: components['schemas']['Date']; + status?: string; + subscriptionName?: string; + subscriptionNumber?: string; + }; + DownloadLink: { + /** + * @description time at which the download link expires (in UTC) + * @example 2006-01-02T15:04:05.000Z + */ + expiration?: string; + /** + * @description filename of the file on the download link + * @example filename-1.2.3-1.x86_64.rpm + */ + filename?: string; + /** + * @description URL to obtain the image + * @example https://access.cdn.redhat.com/content/origin/files/sha256/64/643e706cf7db9e93e706637af92d80eb58377dd0c64ac1e9ce6a72700aa04c2a/rhel-8.1-x86_64-boot.iso?_auth_=1582920605_7e8153e1bdc2f46636653e2efb17bc65 + */ + href?: string; + }; + /** @description Enabled Cloud Access Provider details including products and accounts. */ + EnabledCloudAccessProvider: { + accounts?: components['schemas']['EnabledProviderAccount'][]; + name?: string; + products?: components['schemas']['EnabledProduct'][]; + shortName?: string; + }; + /** @description Enabled Product represents a cloud access provider product */ + EnabledProduct: { + enabledQuantity?: number; + imageGroups?: string[]; + name?: string; + nextRenewal?: components['schemas']['ShortDate']; + sku?: string; + totalQuantity?: number; + }; + /** @description Enabled Provider Account represents a cloud access provider account */ + EnabledProviderAccount: { + dateAdded: components['schemas']['Date']; + goldImageStatus?: components['schemas']['GoldImageStatus'][]; + id: string; + nickname: string; + /** @description Source ID of linked account (only for accounts created via Sources on cloud.redhat.com) */ + sourceId?: string; + /** @description verification status for RHSM Auto Registration (only displayed for supported cloud providers) */ + verified?: boolean; + }; + /** @description EntitlementsAttachedResponse wraps data obtained for EntitlementsAttached and sends metadata about it using helpers.OptionalResult */ + EntitlementsAttachedResponse: { + reason?: string; + valid?: boolean; + value?: components['schemas']['EntitlementsAttachedResponseValue'][]; + }; + /** @description EntitlementsAttachedResponseValue represents the Value field in the EntitlementsAttachedResponse */ + EntitlementsAttachedResponseValue: { + contractNumber?: string; + endDate?: components['schemas']['Date']; + entitlementQuantity?: number; + id?: string; + sku?: string; + startDate?: components['schemas']['Date']; + subscriptionName?: string; + }; + /** @description Applicable errata details */ + ErrataApplicabilityCounts: { + reason?: string; + valid?: boolean; + value?: components['schemas']['ErrataCount']; + }; + /** @description ErrataCount is the errata information for a System */ + ErrataCount: { + bugfixCount?: number; + enhancementCount?: number; + securityCount?: number; + }; + ErratumDetails: { + affectedProducts?: string[]; + bugzillas?: components['schemas']['Reference'][]; + copyrightYear?: string; + cves?: string; + description?: string; + id?: string; + issued?: components['schemas']['Date']; + lastUpdated?: components['schemas']['Date']; + references?: components['schemas']['Reference'][]; + severity?: string; + solution?: string; + summary?: string; + synopsis?: string; + type?: string; + typeSeverity?: string; + }; + /** @description an erratum listed for a system */ + ErratumForSystem: { + href?: string; + id?: string; + published?: components['schemas']['Date']; + severity?: string; + synopsis?: string; + type?: string; + }; + /** @description ErratumInContentSet contains information on an erratum listed in a content set */ + ErratumInContentSet: { + advisoryId?: string; + href?: string; + publishDate?: components['schemas']['Date']; + severity?: string; + synopsis?: string; + type?: string; + }; + /** @description ErrorDetails details the Error in ErrorResponse */ + ErrorDetails: { + code?: number; + message?: string; + }; + /** @description facts give additional details about the system */ + Facts: { + key?: string; + value?: string; + }; + /** @description Gold Image Status Details of a cloud access provider account for an image provider. */ + GoldImageStatus: { + /** + * @description Description of the provider image group + * @example Red Hat Enterprise Linux + */ + description?: string; + /** + * @description Name of the requested provider image group + * @example RHEL + */ + name?: string; + /** + * @description Status of Gold Image Request + * @example Requested + */ + status?: string; + }; + /** @description Image Details for provided version and architecture. */ + ImageForVersionArch: { + arch?: string; + checksum?: string; + datePublished?: components['schemas']['Date']; + downloadHref?: string; + filename?: string; + imageName?: string; + }; + /** @description Image Details in a content set image listing. */ + ImageInContentSet: { + arch?: string; + checksum?: string; + datePublished?: components['schemas']['Date']; + downloadHref?: string; + filename?: string; + imageName?: string; + }; + /** @description details of installed products on the system */ + InstalledProducts: { + arch?: string; + productID?: string; + productName?: string; + status?: string; + version?: string; + }; + /** @description ListResponse is the actual collection of subscription details that gets + * rendered */ + ListResponse: components['schemas']['DetailResponse'][]; + /** @description MyErratum contains erratum information that affects at least one system */ + MyErratum: { + advisoryId?: string; + affectedSystemCount?: number; + details?: string; + publishDate?: components['schemas']['Date']; + synopsis?: string; + systems?: string; + type?: string; + }; + /** Organization Simple Content Access details. */ + OrgSimpleContentAccess: { + id?: string; + simpleContentAccess?: string; + simpleContentAccessCapable?: boolean; + systemPurposeAttributes?: components['schemas']['SystemPurposeAttributes']; + }; + /** @description PackageDetail wraps an errata package and adds a RefURL */ + PackageDetail: { + arch?: string; + checksum?: string; + contentSets?: string[]; + details_url?: string; + epoch?: number; + filename?: string; + name?: string; + release?: string; + repoTags?: string[]; + summary?: string; + version?: string; + }; + /** @description package installed on a system */ + PackageForSystem: { + advisories?: { + advisory?: string; + url?: string; + }[]; + arch?: string; + epoch?: number; + errataCount?: number; + name?: string; + release?: string; + version?: string; + }; + /** @description Pool represents pool information that matter for the detail list */ + Pool: { + consumed?: number; + id?: string; + quantity?: number; + type?: string; + }; + /** @description PoolDetail is an entry in the system/allocation pools listing */ + PoolDetail: { + contractNumber?: string; + endDate?: components['schemas']['Date']; + entitlementsAvailable?: number; + id?: string; + serviceLevel?: string; + sku?: string; + startDate?: components['schemas']['Date']; + subscriptionName?: string; + subscriptionNumber?: string; + }; + /** @description Reference contains a reference to an external item */ + Reference: { + href?: string; + id?: string; + title?: string; + type?: string; + }; + /** + * @description ShortDate represents the short date format used for API returns where time precision is not needed + * @example 2006-01-02T00:00:00.000Z + */ + ShortDate: string; + /** System is an entity that consumes entitlements. Also referred as a Consumer. */ + ShowSystem: { + autoAttachSetting?: boolean; + complianceStatus?: string; + createdBy?: string; + createdDate?: components['schemas']['Date']; + entitlementStatus?: string; + entitlementsAttached?: components['schemas']['EntitlementsAttachedResponse']; + entitlementsAttachedCount?: number; + errataApplicabilityCounts?: components['schemas']['ErrataApplicabilityCounts']; + facts?: components['schemas']['Facts']; + factsCount?: number; + hostname?: string; + installedProducts?: components['schemas']['InstalledProducts']; + installedProductsCount?: number; + lastCheckin?: components['schemas']['Date']; + name?: string; + serviceLevelPreference?: string; + type?: string; + uuid?: string; + }; + /** @description SubSystem represents a single entity in the list subscription's systems API */ + SubSystem: { + complianceStatus?: string; + details?: string; + lastCheckin?: components['schemas']['Date']; + systemName?: string; + totalEntitlementQuantity?: number; + type?: string; + uuid?: string; + }; + /** System is an entity that consumes entitlements. Also referred as a Consumer. */ + System: { + entitlementCount?: number; + entitlementStatus?: string; + errataCounts?: components['schemas']['ErrataCount']; + hostname?: string; + href?: string; + lastCheckin?: components['schemas']['Date']; + name?: string; + type?: string; + username?: string; + uuid?: string; + }; + /** @description System purpose settings available to an organization */ + SystemPurposeAttributes: { + roles?: string[]; + serviceLevel?: string[]; + usage?: string[]; + }; + contentSetArchMock: { + body?: components['schemas']['ErratumInContentSet'][]; + pagination?: components['schemas']['APIPageParam']; + }; + exportJobResponse: { + exportID?: string; + href?: string; + }; + exportResponse: { + exportJobID?: string; + href?: string; + }; + myErrataListMock: { + body?: components['schemas']['MyErratum'][]; + pagination?: components['schemas']['APIPageParam']; + }; + ongoingExportJobResponse: { + message?: string; + }; + pkgContentSetArch: { + arch?: string; + buildDate?: components['schemas']['Date']; + buildHost?: string; + checksum?: string; + contentSets?: string[]; + description?: string; + downloadHref?: string; + epoch?: string; + group?: string; + href?: string; + license?: string; + name?: string; + release?: string; + size?: number; + summary?: string; + version?: string; + }; + pkgDetails: { + arch?: string; + buildDate?: components['schemas']['Date']; + buildHost?: string; + checksum?: string; + contentSets?: string[]; + description?: string; + epoch?: string; + group?: string; + href?: string; + license?: string; + name?: string; + release?: string; + size?: number; + summary?: string; + version?: string; + }; + pkgListMock: { + body?: components['schemas']['PackageDetail'][]; + pagination?: components['schemas']['APIPageParam']; + }; + poolsListMock: { + body?: components['schemas']['PoolDetail'][]; + pagination?: components['schemas']['APIPageParam']; + }; + /** @description systemList is a System Slice */ + systemList: components['schemas']['System'][]; + systemListMock: { + body?: components['schemas']['System'][]; + pagination?: components['schemas']['APIPageParam']; + }; + updatedImage: { + architecture?: string; + digest?: string; + imagePlusDigest?: string; + name?: string; + }; + updatedImagesList: { + body?: components['schemas']['updatedImage'][]; + }; + }; + responses: { + /** @description Accepted: The request has been accepted for processing, but the processing has not been completed. */ + Accepted: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description BadRequest error */ + BadRequest: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + Forbidden: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description GatewayTimeout error */ + GatewayTimeout: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + InternalServerError: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description No Content */ + NoContent: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description NotAcceptable error */ + NotAcceptable: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + NotFound: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + Unauthorized: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + parameters: never; + requestBodies: never; + headers: never; + pathItems: never; +} +export type $defs = Record; +export interface operations { + listAllocations: { + parameters: { + query?: { + /** @description max number of results you want */ + limit?: number; + /** @description index from which you want next items */ + offset?: number; + type?: 'SAM' | 'Satellite'; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description list of allocations */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + body?: components['schemas']['Allocation'][]; + pagination?: components['schemas']['APIPageParam']; + }; + }; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + createSatellite: { + parameters: { + query: { + /** @description must be less than 100 characters and use only numbers, letters, underscores, hyphens, and periods */ + Name: string; + version?: string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + body?: components['schemas']['AllocationSummary']; + }; + }; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + listVersionsAllocation: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description list of Satellite version */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + body?: components['schemas']['AllocationVersion'][]; + }; + }; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + showAllocation: { + parameters: { + query?: { + /** @description Show more details about a allocation */ + include?: 'entitlements'; + }; + header?: never; + path: { + uuid: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description ShowAllocation200 is the success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + body?: components['schemas']['AllocationDetails']; + }; + }; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + updateAllocation: { + parameters: { + query?: never; + header?: never; + path: { + uuid: string; + }; + cookie?: never; + }; + requestBody?: { + content: { + 'application/json': { + simpleContentAccess: string; + }; + }; + }; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + removeAllocation: { + parameters: { + query: { + /** @description Deleting a subscription allocation can have significant impacts on your hosts and activation keys. + * We require a force parameter to make sure the delete operation is intentional. */ + force: true; + }; + header?: never; + path: { + uuid: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successfully removed */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description GatewayTimeout error */ + 504: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + attachEntitlementAllocation: { + parameters: { + query: { + pool: string; + /** @description quantity you want to attach */ + quantity?: number; + }; + header?: never; + path: { + uuid: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description AttachEntitlement200 is the success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + body?: components['schemas']['AllocationDetails']; + }; + }; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + updateEntitlementAllocation: { + parameters: { + query?: { + /** @description maxItem: quantity must be less than or equal to the maximum number of allowed entitlements in the entitlement pool + * minItem: 1 */ + quantity?: number; + }; + header?: never; + path: { + uuid: string; + EntitlementID: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + body?: components['schemas']['AllocationDetails']; + }; + }; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + removeAllocationEntitlement: { + parameters: { + query?: never; + header?: never; + path: { + uuid: string; + /** @description Remove an entitlement from an allocation */ + EntitlementID: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successfully removed */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + exportAllocation: { + parameters: { + query?: never; + header?: never; + path: { + uuid: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description ExportAllocation200 is the success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + body?: components['schemas']['exportResponse']; + }; + }; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + getExportAllocation: { + parameters: { + query?: never; + header?: never; + path: { + uuid: string; + ExportID: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description GetExportAllocation200 is the success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/zip': number[]; + }; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/zip': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/zip': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/zip': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/zip': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/zip': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + exportJobAllocation: { + parameters: { + query?: never; + header?: never; + path: { + uuid: string; + ExportJobID: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description ExportJobAllocation200 is the success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + body?: components['schemas']['exportJobResponse']; + }; + }; + }; + /** @description AcceptedExportJob202 is a response for accepted and in progress job */ + 202: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + body?: components['schemas']['ongoingExportJobResponse']; + }; + }; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotAcceptable error */ + 406: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + listAllocationPools: { + parameters: { + query?: { + /** @description max number of results you want */ + limit?: number; + /** @description index from which you want next items */ + offset?: number; + /** @description include future dated pools for satellite 6.3 or higher */ + future?: true; + }; + header?: never; + path: { + uuid: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description ListAllocationPools200 is the success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['poolsListMock']; + }; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + removeAllocationEntitlementDeprecated: { + parameters: { + query?: never; + header?: never; + path: { + uuid: string; + /** @description Remove an entitlement from an allocation */ + EntitlementID: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successfully removed */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + RemoveProviderAccountBySourceID: { + parameters: { + query?: { + /** @description source id with which we have to delete the provider account */ + sourceID?: string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + listEnabledCloudAccessProviders: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description A JSON response object listing cloud access providers and their accounts and products. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + body?: components['schemas']['EnabledCloudAccessProvider'][]; + }; + }; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + AddProviderAccounts: { + parameters: { + query?: never; + header?: never; + path: { + ProviderShortName: string; + }; + cookie?: never; + }; + requestBody?: { + content: { + 'application/json': components['schemas']['AddProviderAccount'][]; + }; + }; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + RemoveProviderAccount: { + parameters: { + query?: never; + header?: never; + path: { + ProviderShortName: string; + }; + cookie?: never; + }; + requestBody?: { + content: { + 'application/json': { + id: string; + }; + }; + }; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + UpdateProviderAccount: { + parameters: { + query?: never; + header?: never; + path: { + ProviderShortName: string; + AccountID: string; + }; + cookie?: never; + }; + requestBody?: { + content: { + 'application/json': { + nickname: string; + }; + }; + }; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + VerifyProviderAccount: { + parameters: { + query?: never; + header?: never; + path: { + ProviderShortName: 'AWS' | 'AGOV' | 'ACN' | 'MSAZ' | 'GCE'; + AccountID: string; + }; + cookie?: never; + }; + requestBody?: { + content: { + 'application/json': { + /** @description base64-encoded cloud instance metadata. For GCE, please use the instance identity token (JWT) as it is. */ + identity: string; + /** @description base64-encoded cloud instance metadata signature. For GCE, please omit this field. */ + signature: string; + }; + }; + }; + responses: { + /** @description No Content */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + EnableGoldImages: { + parameters: { + query?: never; + header?: never; + path: { + ProviderShortName: string; + }; + cookie?: never; + }; + requestBody?: { + content: { + 'application/json': { + accounts: string[]; + images: string[]; + }; + }; + }; + responses: { + /** @description Accepted: The request has been accepted for processing, but the processing has not been completed. */ + 202: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + listErrata: { + parameters: { + query?: { + /** @description max number of results you want */ + limit?: number; + /** @description index from which you want next items */ + offset?: number; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description ListErrata200 is the success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['myErrataListMock']; + }; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + listErrataByContentSetArch: { + parameters: { + query?: { + /** @description max number of results you want */ + limit?: number; + /** @description index from which you want next items */ + offset?: number; + }; + header?: never; + path: { + ContentSet: string; + Arch: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description ListErrataByContentSetArch200 is the success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['contentSetArchMock']; + }; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + showErratum: { + parameters: { + query?: never; + header?: never; + path: { + /** @description unique identifier for a Red Hat advisory */ + AdvisoryID: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description ShowErratum200 is the success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + body?: components['schemas']['ErratumDetails']; + }; + }; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + listErratumImages: { + parameters: { + query?: never; + header?: never; + path: { + /** @description unique identifier for a Red Hat advisory */ + AdvisoryID: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description ListErratumImages200 is the success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['updatedImagesList']; + }; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + listErratumPackages: { + parameters: { + query?: { + /** @description max number of results you want */ + limit?: number; + /** @description index from which you want next items */ + offset?: number; + }; + header?: never; + path: { + /** @description unique identifier for a Red Hat advisory */ + AdvisoryID: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description ListErratumPackages200 is the success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['pkgListMock']; + }; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + listErratumSystems: { + parameters: { + query?: { + /** @description max number of results you want */ + limit?: number; + /** @description index from which you want next items */ + offset?: number; + }; + header?: never; + path: { + /** @description unique identifier for a Red Hat advisory */ + AdvisoryID: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description ListErratumSystems200 is the success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['systemListMock']; + }; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + listImagesByContentSet: { + parameters: { + query?: { + /** @description maximum number of list items in a page */ + limit?: number; + /** @description index from which you want next items */ + offset?: number; + }; + header?: never; + path: { + ContentSet: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description A JSON response object containing image listing. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + body?: components['schemas']['ImageInContentSet'][]; + pagination?: components['schemas']['APIPageParam']; + }; + }; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + listImageDownloadsByVersionArch: { + parameters: { + query?: never; + header?: never; + path: { + Version: string; + Arch: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description A JSON response object containing image downloads list. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + body?: components['schemas']['ImageInContentSet'][]; + }; + }; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + downloadImage: { + parameters: { + query?: never; + header?: never; + path: { + checksum: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description redirect to download image on the Red Hat CDN */ + 307: { + headers: { + /** @description URL to obtain the image */ + Location?: string; + [name: string]: unknown; + }; + content: { + 'application/json': { + body?: components['schemas']['DownloadLink']; + }; + }; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + checkOrgSCACapability: { + parameters: { + query?: { + /** @description Request for system purpose attributes in response */ + include?: string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Organization details */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + body?: components['schemas']['OrgSimpleContentAccess']; + }; + }; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + listPackagesByContentSetArch: { + parameters: { + query?: { + /** @description max number of results you want */ + limit?: number; + /** @description index from which you want next items */ + offset?: number; + filter?: 'latest'[]; + }; + header?: never; + path: { + ContentSet: string; + Arch: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description ListPackagesByContentSetArch200 is the success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + body?: components['schemas']['pkgContentSetArch'][]; + pagination?: components['schemas']['APIPageParam']; + }; + }; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + showPackage: { + parameters: { + query?: never; + header?: never; + path: { + Checksum: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description ShowPackage200 is the success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + body?: components['schemas']['pkgDetails']; + }; + }; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + downloadPackage: { + parameters: { + query?: never; + header?: never; + path: { + checksum: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description redirect to download package on the Red Hat CDN */ + 307: { + headers: { + /** @description URL to obtain the package */ + Location?: string; + [name: string]: unknown; + }; + content: { + 'application/json': { + body?: components['schemas']['DownloadLink']; + }; + }; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + listSubscriptions: { + parameters: { + query?: { + /** @description max number of results you want */ + limit?: number; + /** @description index from which you want next items */ + offset?: number; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description ListSubscriptions200 is the success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + body?: components['schemas']['ListResponse']; + pagination?: components['schemas']['APIPageParam']; + }; + }; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + listSubContentSets: { + parameters: { + query?: { + /** @description max number of results you want */ + limit?: number; + /** @description index from which you want next items */ + offset?: number; + }; + header?: never; + path: { + SubscriptionNumber: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description ListSubContentSets200 is the success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + body?: components['schemas']['ContentSet'][]; + pagination?: components['schemas']['APIPageParam']; + }; + }; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + listSubSystems: { + parameters: { + query?: { + /** @description max number of results you want */ + limit?: number; + /** @description index from which you want next items */ + offset?: number; + }; + header?: never; + path: { + SubscriptionNumber: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description ListSubSystems200 is the success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + body?: components['schemas']['SubSystem'][]; + pagination?: components['schemas']['APIPageParam']; + }; + }; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + listSystems: { + parameters: { + query?: { + /** @description max number of results you want */ + limit?: number; + /** @description index from which you want next items */ + offset?: number; + /** @description Filter Systems by System Name */ + filter?: string; + /** @description Filter Systems by a valid User Name, where User Name is the system owner and wildcard characters are not allowed */ + username?: string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description ListSystems200 is the success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + body?: components['schemas']['systemList']; + pagination?: components['schemas']['APIPageParam']; + }; + }; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + showSystem: { + parameters: { + query?: { + /** @description Show more details about a system */ + include?: ('facts' | 'entitlements' | 'installedProducts')[]; + }; + header?: never; + path: { + SystemUUID: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description ShowSystem200 is the success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + body?: components['schemas']['ShowSystem']; + }; + }; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + removeSystem: { + parameters: { + query?: never; + header?: never; + path: { + SystemUUID: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successfully removed */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description GatewayTimeout error */ + 504: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + attachEntitlement: { + parameters: { + query: { + pool: string; + /** @description quantity you want to attach */ + quantity?: number; + }; + header?: never; + path: { + SystemUUID: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description AttachedEntitlement200 is the success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + body?: components['schemas']['AttachEntitlement']; + }; + }; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + listSystemErrata: { + parameters: { + query?: { + /** @description max number of results you want */ + limit?: number; + /** @description index from which you want next items */ + offset?: number; + }; + header?: never; + path: { + SystemUUID: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description list of advisories */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + body?: components['schemas']['ErratumForSystem'][]; + pagination?: components['schemas']['APIPageParam']; + }; + }; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + listSystemPackages: { + parameters: { + query?: { + /** @description max number of results you want */ + limit?: number; + /** @description index from which you want next items */ + offset?: number; + /** @description Show errata details for packages */ + errata_detail?: true | false; + /** @description Show upgradable packages only. Also accepts 'upgradable' as valid query. */ + upgradeable?: true | false; + /** @description Filter packages */ + filter?: string; + }; + header?: never; + path: { + SystemUUID: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description list of packages */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + body?: components['schemas']['PackageForSystem'][]; + pagination?: components['schemas']['APIPageParam']; + }; + }; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + listSystemPools: { + parameters: { + query?: { + /** @description max number of results you want */ + limit?: number; + /** @description index from which you want next items */ + offset?: number; + }; + header?: never; + path: { + SystemUUID: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description ListSystemPools200 is the success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['poolsListMock']; + }; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; + removeSystemEntitlement: { + parameters: { + query?: never; + header?: never; + path: { + SystemUUID: string; + /** @description Remove an entitlement from a system */ + EntitlementID: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successfully removed */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description BadRequest error */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Unauthorized error */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description Forbidden error */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description NotFound error */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + /** @description InternalServerError error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + error?: components['schemas']['ErrorDetails']; + }; + }; + }; + }; + }; +} diff --git a/src/rh-api/rh-api-sm.ts b/src/rh-api/rh-api-sm.ts new file mode 100644 index 0000000..916d675 --- /dev/null +++ b/src/rh-api/rh-api-sm.ts @@ -0,0 +1,61 @@ +/********************************************************************** + * Copyright (C) 2024-2025 Red Hat, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ***********************************************************************/ +/* eslint-disable @typescript-eslint/explicit-function-return-type */ + +import type { Client } from 'openapi-fetch'; +import createClient from 'openapi-fetch'; + +import type { paths } from './gen/subscription-v1'; + +export const REGISTRY_REDHAT_IO = 'registry.redhat.io'; + +class ClientHolder { + protected client: Client; + constructor(client: Client, token?: string) { + this.client = client; + if (token) { + this.client.use({ + onRequest({ request }) { + request.headers.set('Authorization', `Bearer ${token}`); + return request; + }, + }); + } + } +} + +export class Images extends ClientHolder { + downloadImageUsingSha(checksum: string) { + return this.client.GET('/images/{checksum}/download', { + params: { + path: { + checksum, + }, + }, + parseAs: 'stream', + }); + } +} + +export class SubscriptionManagerClientV1 extends ClientHolder { + images: Images; + constructor(options: { BASE: string; TOKEN: string }) { + super(createClient({ baseUrl: options.BASE }), options.TOKEN); + this.images = new Images(this.client); + } +} diff --git a/src/rh-api/subscription-schema-v1.json b/src/rh-api/subscription-schema-v1.json new file mode 100644 index 0000000..9cf50ae --- /dev/null +++ b/src/rh-api/subscription-schema-v1.json @@ -0,0 +1,7013 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "RHSM-API", + "description": "API for Red Hat Subscription Management", + "contact": { + "url": "https://access.redhat.com/support/cases/" + }, + "version": "1.434.0" + }, + "servers": [ + { + "url": "https://api.access.redhat.com/management/v1" + } + ], + "security": [ + { + "Bearer": [] + } + ], + "tags": [ + { + "name": "allocation" + }, + { + "name": "cloudaccess" + }, + { + "name": "errata" + }, + { + "name": "images" + }, + { + "name": "packages" + }, + { + "name": "subscription" + }, + { + "name": "system" + } + ], + "paths": { + "/allocations": { + "get": { + "tags": [ + "allocation" + ], + "summary": "List all allocations for a user", + "description": "The default and max number of results in a response are 100.", + "operationId": "listAllocations", + "parameters": [ + { + "name": "limit", + "in": "query", + "description": "max number of results you want", + "schema": { + "type": "integer" + } + }, + { + "name": "offset", + "in": "query", + "description": "index from which you want next items", + "schema": { + "type": "integer" + } + }, + { + "name": "type", + "in": "query", + "schema": { + "type": "string", + "enum": [ + "SAM", + "Satellite" + ] + } + } + ], + "responses": { + "200": { + "description": "list of allocations", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Allocation" + } + }, + "pagination": { + "$ref": "#/components/schemas/APIPageParam" + } + } + } + } + } + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "allocation" + ], + "summary": "Create Satellite", + "description": "Create Satellite by name and version(optional).\nCustomers can use any version listed in the `/v1/allocations/versions` endpoint (use attribute `value`).\nIf no version is specified, it will take the latest available version for Satellite.", + "operationId": "createSatellite", + "parameters": [ + { + "name": "Name", + "in": "query", + "description": "must be less than 100 characters and use only numbers, letters, underscores, hyphens, and periods", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "$ref": "#/components/schemas/AllocationSummary" + } + } + } + } + } + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + } + } + }, + "/allocations/versions": { + "get": { + "tags": [ + "allocation" + ], + "summary": "List Satellite versions", + "description": "Returns list of Satellite version 6.0 and above", + "operationId": "listVersionsAllocation", + "responses": { + "200": { + "description": "list of Satellite version", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AllocationVersion" + } + } + } + } + } + } + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + } + } + }, + "/allocations/{uuid}": { + "get": { + "tags": [ + "allocation" + ], + "summary": "Get an allocation by UUID", + "description": "System, RHUI, Hypervisor are unsupported allocation types", + "operationId": "showAllocation", + "parameters": [ + { + "name": "uuid", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "include", + "in": "query", + "description": "Show more details about a allocation", + "schema": { + "type": "string", + "enum": [ + "entitlements" + ] + } + } + ], + "responses": { + "200": { + "description": "ShowAllocation200 is the success response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "$ref": "#/components/schemas/AllocationDetails" + } + } + } + } + } + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "allocation" + ], + "summary": "Update an allocation", + "description": "Allows to update simpleContentAccess for Satellite of version 6.3 and above\nPossible value for simpleContentAccess are:\n\n- enabled\n- disabled", + "operationId": "updateAllocation", + "parameters": [ + { + "name": "uuid", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "required": [ + "simpleContentAccess" + ], + "type": "object", + "properties": { + "simpleContentAccess": { + "type": "string" + } + } + } + } + }, + "required": false + }, + "responses": { + "204": { + "description": "No Content", + "content": {} + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + }, + "x-codegen-request-body-name": "allocation" + }, + "delete": { + "tags": [ + "allocation" + ], + "summary": "Remove allocation profile", + "description": "The default success response will be 204\n\nSystem, RHUI, Hypervisor are unsupported allocation types", + "operationId": "removeAllocation", + "parameters": [ + { + "name": "uuid", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "force", + "in": "query", + "description": "Deleting a subscription allocation can have significant impacts on your hosts and activation keys.\nWe require a force parameter to make sure the delete operation is intentional.", + "required": true, + "schema": { + "type": "boolean", + "enum": [ + true + ] + } + } + ], + "responses": { + "204": { + "description": "Successfully removed", + "content": {} + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "504": { + "description": "GatewayTimeout error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + } + } + }, + "/allocations/{uuid}/entitlements": { + "post": { + "tags": [ + "allocation" + ], + "summary": "Attach entitlement to allocation", + "description": "The default success response will be 200.\n\nSystem, RHUI, Hypervisor are unsupported allocation types.\nSAM 1.3 or higher, and Satellite 5.6 versions are supported.", + "operationId": "attachEntitlementAllocation", + "parameters": [ + { + "name": "pool", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "quantity", + "in": "query", + "description": "quantity you want to attach", + "schema": { + "type": "integer" + } + }, + { + "name": "uuid", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "AttachEntitlement200 is the success response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "$ref": "#/components/schemas/AllocationDetails" + } + } + } + } + } + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + } + } + }, + "/allocations/{uuid}/entitlements/{EntitlementID}": { + "put": { + "tags": [ + "allocation" + ], + "summary": "Update attached entitlement to allocation", + "description": "The default success response will be 200.\nSystem, RHUI, Hypervisor are unsupported allocation types", + "operationId": "updateEntitlementAllocation", + "parameters": [ + { + "name": "uuid", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "EntitlementID", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "quantity", + "in": "query", + "description": "maxItem: quantity must be less than or equal to the maximum number of allowed entitlements in the entitlement pool\nminItem: 1", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Success response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "$ref": "#/components/schemas/AllocationDetails" + } + } + } + } + } + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "allocation" + ], + "summary": "Remove entitlement from the allocation", + "description": "The default success response will be 204.", + "operationId": "removeAllocationEntitlement", + "parameters": [ + { + "name": "uuid", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "EntitlementID", + "in": "path", + "description": "Remove an entitlement from an allocation", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Successfully removed", + "content": {} + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + } + } + }, + "/allocations/{uuid}/export": { + "get": { + "tags": [ + "allocation" + ], + "summary": "Trigger allocation manifest export", + "description": "Starts job to generate export for an allocation. To check the status of the export job visit the href in the response.\n\nSystem, RHUI, Hypervisor are unsupported allocation types. SAM 1.2 or lower and Satellite 5.9 or lower versions are unsupported.", + "operationId": "exportAllocation", + "parameters": [ + { + "name": "uuid", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "ExportAllocation200 is the success response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "$ref": "#/components/schemas/exportResponse" + } + } + } + } + } + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + } + } + }, + "/allocations/{uuid}/export/{ExportID}": { + "get": { + "tags": [ + "allocation" + ], + "summary": "Download allocation manifest", + "description": "Success response contains a zip file. The link is one-time download and expires after one try. Trigger export job to get another download link.\n\nContent-Type: application/zip", + "operationId": "getExportAllocation", + "parameters": [ + { + "name": "uuid", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "ExportID", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "GetExportAllocation200 is the success response", + "content": { + "application/zip": { + "schema": { + "type": "array", + "items": { + "type": "integer" + } + } + } + } + }, + "400": { + "description": "BadRequest error", + "content": { + "application/zip": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/zip": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/zip": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/zip": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/zip": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + } + } + }, + "/allocations/{uuid}/exportJob/{ExportJobID}": { + "get": { + "tags": [ + "allocation" + ], + "summary": "Check status of allocation manifest export", + "description": "Returns export download link in response.", + "operationId": "exportJobAllocation", + "parameters": [ + { + "name": "uuid", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "ExportJobID", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "ExportJobAllocation200 is the success response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "$ref": "#/components/schemas/exportJobResponse" + } + } + } + } + } + }, + "202": { + "description": "AcceptedExportJob202 is a response for accepted and in progress job", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "$ref": "#/components/schemas/ongoingExportJobResponse" + } + } + } + } + } + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "406": { + "description": "NotAcceptable error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + } + } + }, + "/allocations/{uuid}/pools": { + "get": { + "tags": [ + "allocation" + ], + "summary": "List all pools for an allocation", + "description": "System, RHUI, Hypervisor are unsupported allocation types. SAM 1.3 or higher, and Satellite 5.6 versions are supported.", + "operationId": "listAllocationPools", + "parameters": [ + { + "name": "limit", + "in": "query", + "description": "max number of results you want", + "schema": { + "type": "integer" + } + }, + { + "name": "offset", + "in": "query", + "description": "index from which you want next items", + "schema": { + "type": "integer" + } + }, + { + "name": "future", + "in": "query", + "description": "include future dated pools for satellite 6.3 or higher", + "schema": { + "type": "boolean", + "enum": [ + true + ] + } + }, + { + "name": "uuid", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "ListAllocationPools200 is the success response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/poolsListMock" + } + } + } + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + } + } + }, + "/allocations/{uuid}/{EntitlementID}": { + "delete": { + "tags": [ + "allocation" + ], + "summary": "Remove entitlement from the allocation", + "description": "The default success response will be 204.", + "operationId": "removeAllocationEntitlementDeprecated", + "parameters": [ + { + "name": "uuid", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "EntitlementID", + "in": "path", + "description": "Remove an entitlement from an allocation", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Successfully removed", + "content": {} + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + }, + "deprecated": true + } + }, + "/cloud_access_providers/accounts": { + "delete": { + "tags": [ + "cloudaccess" + ], + "summary": "Remove a provider account by source id", + "description": "Removes a currently-enabled provider account, including removing access to Gold Images, where applicable using the sourceID provided. You can find a list of currently-enabled provider accounts and provider short names from the `/v1/cloud_access_providers/enabled` endpoint.\n", + "operationId": "RemoveProviderAccountBySourceID", + "parameters": [ + { + "name": "sourceID", + "in": "query", + "description": "source id with which we have to delete the provider account", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content", + "content": {} + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + } + } + }, + "/cloud_access_providers/enabled": { + "get": { + "tags": [ + "cloudaccess" + ], + "summary": "List all enabled cloud access providers for a user", + "description": "Returns the full list of all enabled Red Hat products and Cloud Access provider accounts/subscriptions associated with the user’s Red Hat account.\n- For Products that are expired `nextRenewal` field would be omitted and `totalQuantity` would be `0`.\n- Product objects can have `totalQuantity` field as `-1` indicating `Unlimited` quantity available.\n- The `nextRenewalDate` field of a Product has the format `YYYY-MM-DD`.\n- The `goldImageStatus` details are available for an account when the Provider is a certified Gold Image Provider and the account has been requested for gold image access. The `status` field of a goldImageStatus object could be `\"Requested\"`, `\"Granted\"` or `\"Failed\"`.\n- The `imageGroups` field is available for a product when the Provider is a certified Gold Image Provider, and the product has a gold image group available for it.\n", + "operationId": "listEnabledCloudAccessProviders", + "responses": { + "200": { + "description": "A JSON response object listing cloud access providers and their accounts and products.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnabledCloudAccessProvider" + } + } + } + } + } + } + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + } + } + }, + "/cloud_access_providers/{ProviderShortName}/accounts": { + "post": { + "tags": [ + "cloudaccess" + ], + "summary": "Add accounts for a provider", + "description": "Add up to `100` new provider accounts, with optional nicknames, to a currently-enabled provider for Red Hat Cloud Access. You can find a list of currently-enabled provider accounts and provider short names from the `/v1/cloud_access_providers/enabled` endpoint.\n", + "operationId": "AddProviderAccounts", + "parameters": [ + { + "name": "ProviderShortName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AddProviderAccount" + } + } + } + }, + "required": false + }, + "responses": { + "204": { + "description": "No Content", + "content": {} + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + }, + "x-codegen-request-body-name": "account" + }, + "delete": { + "tags": [ + "cloudaccess" + ], + "summary": "Remove a provider account", + "description": "Removes a currently-enabled provider account, including removing access to Gold Images, where applicable. You can find a list of currently-enabled provider accounts and provider short names from the `/v1/cloud_access_providers/enabled` endpoint.\n", + "operationId": "RemoveProviderAccount", + "parameters": [ + { + "name": "ProviderShortName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "type": "string" + } + } + } + } + }, + "required": false + }, + "responses": { + "204": { + "description": "No Content", + "content": {} + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + }, + "x-codegen-request-body-name": "account" + } + }, + "/cloud_access_providers/{ProviderShortName}/accounts/{AccountID}": { + "put": { + "tags": [ + "cloudaccess" + ], + "summary": "Update provider account", + "description": "Updates the nickname for a currently-enabled provider account. You can find a list of currently-enabled provider accounts and provider short names from the `/v1/cloud_access_providers/enabled` endpoint.\n", + "operationId": "UpdateProviderAccount", + "parameters": [ + { + "name": "ProviderShortName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "AccountID", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "required": [ + "nickname" + ], + "type": "object", + "properties": { + "nickname": { + "type": "string" + } + } + } + } + }, + "required": false + }, + "responses": { + "204": { + "description": "No Content", + "content": {} + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + }, + "x-codegen-request-body-name": "account" + } + }, + "/cloud_access_providers/{ProviderShortName}/accounts/{AccountID}/verification": { + "put": { + "tags": [ + "cloudaccess" + ], + "summary": "Verify a provider account", + "description": "Verifies a cloud provider account for use with RHSM Auto Registration, which allows for cloud instances to automatically register with RHSM upon provisioning.\n\nAuto Registration is currently only available for the following cloud providers:\n - AWS\n - AWS GovCloud\n - ACS China\n - Microsoft Azure\n - Google Cloud Provider\n\n\nThis endpoint accepts a cloud instance \"identity\" document and \"signature\" from the cloud provider's metadata service. Use the following links for more info on how to obtain these:\n - For AWS: [EC2 Instance Identity Document](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-identity-documents.html) and [Signature](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/verify-rsa2048.html)\n - For Azure: [Azure Instance Metadata](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/instance-metadata-service) and [Signature](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/instance-metadata-service?tabs=linux#attested-data)\n - For GCP: [Compute Engine Instance Identity JWT token](https://cloud.google.com/compute/docs/instances/verifying-instance-identity#request_signature). Note: Please use \"https://subscription.rhsm.redhat.com:443/subscription\" as value for \"audience\" query parameter and \"full\" as value for \"format\" query parameter while generating the token\n\n\nAn HTTP 400 response will be returned if the cloud provider does not support automatic registration, the signature of the document cannot be verified, the cloud provider account has already been verified for a different Red Hat account, or if the account in the instance metadata does not match the provided account ID.\n\nAn HTTP 204 response will be returned if the account has been successfully verified. Attempts to verify an account that is already verified will return an HTTP 204 response with no changes being made.\n", + "operationId": "VerifyProviderAccount", + "parameters": [ + { + "name": "ProviderShortName", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "AWS", + "AGOV", + "ACN", + "MSAZ", + "GCE" + ] + } + }, + { + "name": "AccountID", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "required": [ + "identity", + "signature" + ], + "type": "object", + "properties": { + "identity": { + "type": "string", + "description": "base64-encoded cloud instance metadata. For GCE, please use the instance identity token (JWT) as it is." + }, + "signature": { + "type": "string", + "description": "base64-encoded cloud instance metadata signature. For GCE, please omit this field." + } + } + } + } + }, + "required": false + }, + "responses": { + "204": { + "description": "No Content", + "content": {} + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + }, + "x-codegen-request-body-name": "account" + } + }, + "/cloud_access_providers/{ProviderShortName}/goldimage": { + "post": { + "tags": [ + "cloudaccess" + ], + "summary": "Enable Gold image access", + "description": "Requests access to Red Hat Gold Images, where available, for currently-enabled products and provider accounts. Customers can request Red Hat Gold Images for account IDs and product image groups listed in the `/v1/cloud_access_providers/enabled` endpoint using the provider short name listed in the same response. After the request has been accepted for processing, gold image status for accounts can be checked in the `/v1/cloud_access_providers/enabled` endpoint response.\n", + "operationId": "EnableGoldImages", + "parameters": [ + { + "name": "ProviderShortName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "required": [ + "accounts", + "images" + ], + "type": "object", + "properties": { + "accounts": { + "type": "array", + "items": { + "type": "string" + } + }, + "images": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, + "required": false + }, + "responses": { + "202": { + "description": "Accepted: The request has been accepted for processing, but the processing has not been completed.", + "content": {} + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + }, + "x-codegen-request-body-name": "goldImages" + } + }, + "/errata": { + "get": { + "tags": [ + "errata" + ], + "summary": "List all errata for a user's systems", + "description": "The default and max results in a response are 1000.", + "operationId": "listErrata", + "parameters": [ + { + "name": "limit", + "in": "query", + "description": "max number of results you want", + "schema": { + "type": "integer" + } + }, + { + "name": "offset", + "in": "query", + "description": "index from which you want next items", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "ListErrata200 is the success response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/myErrataListMock" + } + } + } + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + } + } + }, + "/errata/cset/{ContentSet}/arch/{Arch}": { + "get": { + "tags": [ + "errata" + ], + "summary": "Get all the errata for the specified content set and arch", + "description": "Limit is the number of results in a response. The default limit is 50 and max limit is 100.", + "operationId": "listErrataByContentSetArch", + "parameters": [ + { + "name": "ContentSet", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "Arch", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "max number of results you want", + "schema": { + "type": "integer" + } + }, + { + "name": "offset", + "in": "query", + "description": "index from which you want next items", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "ListErrataByContentSetArch200 is the success response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/contentSetArchMock" + } + } + } + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + } + } + }, + "/errata/{AdvisoryID}": { + "get": { + "tags": [ + "errata" + ], + "summary": "Get the details of an advisory", + "description": "This will get the details of an advisory specified by its advisoryID.", + "operationId": "showErratum", + "parameters": [ + { + "name": "AdvisoryID", + "in": "path", + "description": "unique identifier for a Red Hat advisory", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "ShowErratum200 is the success response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "$ref": "#/components/schemas/ErratumDetails" + } + } + } + } + } + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + } + } + }, + "/errata/{AdvisoryID}/images": { + "get": { + "tags": [ + "errata" + ], + "summary": "List all updated container images for an advisory", + "description": "This will list all updated container images that address the advisory specified", + "operationId": "listErratumImages", + "parameters": [ + { + "name": "AdvisoryID", + "in": "path", + "description": "unique identifier for a Red Hat advisory", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "ListErratumImages200 is the success response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/updatedImagesList" + } + } + } + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + } + } + }, + "/errata/{AdvisoryID}/packages": { + "get": { + "tags": [ + "errata" + ], + "summary": "List all packages for an advisory", + "description": "The default and max results in a response are 50.", + "operationId": "listErratumPackages", + "parameters": [ + { + "name": "AdvisoryID", + "in": "path", + "description": "unique identifier for a Red Hat advisory", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "max number of results you want", + "schema": { + "type": "integer" + } + }, + { + "name": "offset", + "in": "query", + "description": "index from which you want next items", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "ListErratumPackages200 is the success response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pkgListMock" + } + } + } + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + } + } + }, + "/errata/{AdvisoryID}/systems": { + "get": { + "tags": [ + "errata" + ], + "summary": "List all systems for an advisory", + "description": "The default and max results in a response are 1000.", + "operationId": "listErratumSystems", + "parameters": [ + { + "name": "AdvisoryID", + "in": "path", + "description": "unique identifier for a Red Hat advisory", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "max number of results you want", + "schema": { + "type": "integer" + } + }, + { + "name": "offset", + "in": "query", + "description": "index from which you want next items", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "ListErratumSystems200 is the success response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/systemListMock" + } + } + } + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + } + } + }, + "/images/cset/{ContentSet}": { + "get": { + "tags": [ + "images" + ], + "summary": "List available images in a content set", + "description": "List all the available images in a given content set. The content set parameter is expected to be\n properly formatted (for example rhel-8-for-x86_64-baseos-isos). And the user requesting the endpoint\nis expected to have Download permission (UGC). If the user is entitled to an image, a \"downloadHref\" attribute is added in the image response object which links to image download API. The list is paginated by default to 25 results in a response and goes to maximum 100 results in a response. Use pagination by setting offset and limit url parameters (valid integer values).\n", + "operationId": "listImagesByContentSet", + "parameters": [ + { + "name": "ContentSet", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "maximum number of list items in a page", + "schema": { + "type": "integer" + } + }, + { + "name": "offset", + "in": "query", + "description": "index from which you want next items", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "A JSON response object containing image listing.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageInContentSet" + } + }, + "pagination": { + "$ref": "#/components/schemas/APIPageParam" + } + } + } + } + } + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + } + } + }, + "/images/rhel/{Version}/{Arch}": { + "get": { + "tags": [ + "images" + ], + "summary": "List RHEL image downloads by version and architecture.", + "description": "List all the available images for the given version and architecture. The Version parameter is expected to be a valid RHEL version. Example: 8.1, 8.2 etc.\nThe Arch parameter should be one of the valid RHEL architectures. Example: x86_64, aarch64 etc.\nThe user requesting the endpoint is expected to have Download permission (UGC).\nIf the user is entitled to an image, a \"downloadHref\" attribute is added in the image response object which links to image download API.\n", + "operationId": "listImageDownloadsByVersionArch", + "parameters": [ + { + "name": "Version", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "Arch", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "A JSON response object containing image downloads list.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageInContentSet" + } + } + } + } + } + } + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + } + } + }, + "/images/{checksum}/download": { + "get": { + "tags": [ + "images" + ], + "summary": "Download an image by its SHA256 checksum", + "description": "Find an image by its SHA256 checksum and generate a download link with a short-lived expiration. It is expected for users to obtain a new download link every time an image is downloaded and to not store the link for more than several minutes. If the user has \"Download Software and Updates\" permissions and a valid subscription for the image, they will receive a HTTP 307 redirect to the location on the Red Hat CDN. Clients can either follow the HTTP redirect or find the download URL in the response body.\n", + "operationId": "downloadImage", + "parameters": [ + { + "name": "checksum", + "in": "path", + "required": true, + "schema": { + "pattern": "^[a-f0-9]{64}$", + "type": "string" + } + } + ], + "responses": { + "307": { + "description": "redirect to download image on the Red Hat CDN", + "headers": { + "Location": { + "description": "URL to obtain the image", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "$ref": "#/components/schemas/DownloadLink" + } + } + } + } + } + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + } + } + }, + "/organization": { + "get": { + "tags": [ + "organization" + ], + "summary": "Get details of the user's organization", + "description": "Show Simple Content Access details of user's organization", + "operationId": "checkOrgSCACapability", + "parameters": [ + { + "name": "include", + "in": "query", + "description": "Request for system purpose attributes in response", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Organization details", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "$ref": "#/components/schemas/OrgSimpleContentAccess" + } + } + } + } + } + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + } + } + }, + "/packages/cset/{ContentSet}/arch/{Arch}": { + "get": { + "tags": [ + "packages" + ], + "summary": "Get all the packages for the specified content set and arch.", + "description": "The default and max results in a response are 50 and 100 respectively.", + "operationId": "listPackagesByContentSetArch", + "parameters": [ + { + "name": "ContentSet", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "Arch", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "max number of results you want", + "schema": { + "type": "integer" + } + }, + { + "name": "offset", + "in": "query", + "description": "index from which you want next items", + "schema": { + "type": "integer" + } + }, + { + "name": "filter", + "in": "query", + "style": "form", + "explode": false, + "schema": { + "minItems": 1, + "type": "array", + "items": { + "type": "string", + "enum": [ + "latest" + ] + } + } + } + ], + "responses": { + "200": { + "description": "ListPackagesByContentSetArch200 is the success response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "type": "array", + "items": { + "$ref": "#/components/schemas/pkgContentSetArch" + } + }, + "pagination": { + "$ref": "#/components/schemas/APIPageParam" + } + } + } + } + } + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + } + } + }, + "/packages/{Checksum}": { + "get": { + "tags": [ + "packages" + ], + "summary": "Get the details of a package", + "description": "This will get the details of a package specified by its checksum.", + "operationId": "showPackage", + "parameters": [ + { + "name": "Checksum", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "ShowPackage200 is the success response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "$ref": "#/components/schemas/pkgDetails" + } + } + } + } + } + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + } + } + }, + "/packages/{checksum}/download": { + "get": { + "tags": [ + "packages" + ], + "summary": "Download a package by its SHA256 checksum", + "description": "Find a package by its SHA256 checksum and generate a download link with a short-lived expiration. It is expected for users to obtain a new download link every time a package is downloaded and to not store the link for more than several minutes. If the user has \"Download Software and Updates\" permissions and a valid subscription for the package, they will receive an HTTP 307 redirect to the location on the Red Hat CDN. Clients can either follow the HTTP redirect or find the download URL in the response body.\n", + "operationId": "downloadPackage", + "parameters": [ + { + "name": "checksum", + "in": "path", + "required": true, + "schema": { + "pattern": "^[a-f0-9]{64}$", + "type": "string" + } + } + ], + "responses": { + "307": { + "description": "redirect to download package on the Red Hat CDN", + "headers": { + "Location": { + "description": "URL to obtain the package", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "$ref": "#/components/schemas/DownloadLink" + } + } + } + } + } + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + } + } + }, + "/subscriptions": { + "get": { + "tags": [ + "subscription" + ], + "summary": "List all subscriptions for a user", + "description": "The default and max results in a response are 50.", + "operationId": "listSubscriptions", + "parameters": [ + { + "name": "limit", + "in": "query", + "description": "max number of results you want", + "schema": { + "type": "integer" + } + }, + { + "name": "offset", + "in": "query", + "description": "index from which you want next items", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "ListSubscriptions200 is the success response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "$ref": "#/components/schemas/ListResponse" + }, + "pagination": { + "$ref": "#/components/schemas/APIPageParam" + } + } + } + } + } + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + } + } + }, + "/subscriptions/{SubscriptionNumber}/contentSets": { + "get": { + "tags": [ + "subscription" + ], + "summary": "List all content sets for a subscription", + "description": "The default and max results in a response are 1000.", + "operationId": "listSubContentSets", + "parameters": [ + { + "name": "limit", + "in": "query", + "description": "max number of results you want", + "schema": { + "type": "integer" + } + }, + { + "name": "offset", + "in": "query", + "description": "index from which you want next items", + "schema": { + "type": "integer" + } + }, + { + "name": "SubscriptionNumber", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "ListSubContentSets200 is the success response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ContentSet" + } + }, + "pagination": { + "$ref": "#/components/schemas/APIPageParam" + } + } + } + } + } + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + } + } + }, + "/subscriptions/{SubscriptionNumber}/systems": { + "get": { + "tags": [ + "subscription" + ], + "summary": "List all systems consuming a subscription", + "description": "The default and max results in a response are 100.", + "operationId": "listSubSystems", + "parameters": [ + { + "name": "limit", + "in": "query", + "description": "max number of results you want", + "schema": { + "type": "integer" + } + }, + { + "name": "offset", + "in": "query", + "description": "index from which you want next items", + "schema": { + "type": "integer" + } + }, + { + "name": "SubscriptionNumber", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "ListSubSystems200 is the success response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SubSystem" + } + }, + "pagination": { + "$ref": "#/components/schemas/APIPageParam" + } + } + } + } + } + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + } + } + }, + "/systems": { + "get": { + "tags": [ + "system" + ], + "summary": "List all systems for a user", + "description": "The default and max number of results in a response are 100.", + "operationId": "listSystems", + "parameters": [ + { + "name": "limit", + "in": "query", + "description": "max number of results you want", + "schema": { + "type": "integer" + } + }, + { + "name": "offset", + "in": "query", + "description": "index from which you want next items", + "schema": { + "type": "integer" + } + }, + { + "name": "filter", + "in": "query", + "description": "Filter Systems by System Name", + "schema": { + "type": "string" + } + }, + { + "name": "username", + "in": "query", + "description": "Filter Systems by a valid User Name, where User Name is the system owner and wildcard characters are not allowed", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "ListSystems200 is the success response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "$ref": "#/components/schemas/systemList" + }, + "pagination": { + "$ref": "#/components/schemas/APIPageParam" + } + } + } + } + } + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + } + } + }, + "/systems/{SystemUUID}": { + "get": { + "tags": [ + "system" + ], + "summary": "Get a system specified by UUID.", + "description": "Sam & Satellite systems are unsupported system types.", + "operationId": "showSystem", + "parameters": [ + { + "name": "SystemUUID", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "include", + "in": "query", + "description": "Show more details about a system", + "style": "form", + "explode": false, + "schema": { + "maxItems": 3, + "minItems": 1, + "type": "array", + "items": { + "type": "string", + "enum": [ + "facts", + "entitlements", + "installedProducts" + ] + } + } + } + ], + "responses": { + "200": { + "description": "ShowSystem200 is the success response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "$ref": "#/components/schemas/ShowSystem" + } + } + } + } + } + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "system" + ], + "summary": "Remove system profile", + "description": "The default success response will be 204", + "operationId": "removeSystem", + "parameters": [ + { + "name": "SystemUUID", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Successfully removed", + "content": {} + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "504": { + "description": "GatewayTimeout error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + } + } + }, + "/systems/{SystemUUID}/entitlements": { + "post": { + "tags": [ + "system" + ], + "summary": "Attach entitlement to system", + "description": "The default success response will be 200.\n\nSam & Satellite systems are unsupported system types.", + "operationId": "attachEntitlement", + "parameters": [ + { + "name": "SystemUUID", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pool", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "quantity", + "in": "query", + "description": "quantity you want to attach", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "AttachedEntitlement200 is the success response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "$ref": "#/components/schemas/AttachEntitlement" + } + } + } + } + } + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + } + } + }, + "/systems/{SystemUUID}/errata": { + "get": { + "tags": [ + "system" + ], + "summary": "List all applicable errata for a system", + "description": "The default and max number of results in a response are 100.", + "operationId": "listSystemErrata", + "parameters": [ + { + "name": "SystemUUID", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "max number of results you want", + "schema": { + "type": "integer" + } + }, + { + "name": "offset", + "in": "query", + "description": "index from which you want next items", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "list of advisories", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ErratumForSystem" + } + }, + "pagination": { + "$ref": "#/components/schemas/APIPageParam" + } + } + } + } + } + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + } + } + }, + "/systems/{SystemUUID}/packages": { + "get": { + "tags": [ + "system" + ], + "summary": "List all packages for a system", + "description": "The default and max number of results in a response are 1000.", + "operationId": "listSystemPackages", + "parameters": [ + { + "name": "SystemUUID", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "max number of results you want", + "schema": { + "type": "integer" + } + }, + { + "name": "offset", + "in": "query", + "description": "index from which you want next items", + "schema": { + "type": "integer" + } + }, + { + "name": "errata_detail", + "in": "query", + "description": "Show errata details for packages", + "schema": { + "type": "boolean", + "enum": [ + true, + false + ] + } + }, + { + "name": "upgradeable", + "in": "query", + "description": "Show upgradable packages only. Also accepts 'upgradable' as valid query.", + "schema": { + "type": "boolean", + "enum": [ + true, + false + ] + } + }, + { + "name": "filter", + "in": "query", + "description": "Filter packages", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "list of packages", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PackageForSystem" + } + }, + "pagination": { + "$ref": "#/components/schemas/APIPageParam" + } + } + } + } + } + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + } + } + }, + "/systems/{SystemUUID}/pools": { + "get": { + "tags": [ + "system" + ], + "summary": "List all pools for a system", + "description": "The default and max number of results in a response are 50.", + "operationId": "listSystemPools", + "parameters": [ + { + "name": "SystemUUID", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "max number of results you want", + "schema": { + "type": "integer" + } + }, + { + "name": "offset", + "in": "query", + "description": "index from which you want next items", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "ListSystemPools200 is the success response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/poolsListMock" + } + } + } + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + } + } + }, + "/systems/{SystemUUID}/{EntitlementID}": { + "delete": { + "tags": [ + "system" + ], + "summary": "Remove entitlement from the system", + "description": "The default success response will be 204.", + "operationId": "removeSystemEntitlement", + "parameters": [ + { + "name": "SystemUUID", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "EntitlementID", + "in": "path", + "description": "Remove an entitlement from a system", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Successfully removed", + "content": {} + }, + "400": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "404": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "500": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "APIPageParam": { + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "limit": { + "type": "integer" + }, + "offset": { + "type": "integer" + } + }, + "description": "APIPageParam details the pagination parameters in APIResponse" + }, + "AddProviderAccount": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "nickname": { + "type": "string" + } + }, + "description": "An account to be added" + }, + "Allocation": { + "title": "Allocation is an entity that consumes entitlements. Also referred as a Distributor.", + "type": "object", + "properties": { + "entitlementQuantity": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "simpleContentAccess": { + "type": "string" + }, + "type": { + "type": "string" + }, + "url": { + "type": "string" + }, + "uuid": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "AllocationDetails": { + "type": "object", + "properties": { + "createdBy": { + "type": "string" + }, + "createdDate": { + "$ref": "#/components/schemas/Date" + }, + "entitlementsAttached": { + "$ref": "#/components/schemas/EntitlementsAttachedResponse" + }, + "entitlementsAttachedQuantity": { + "type": "integer" + }, + "lastModified": { + "$ref": "#/components/schemas/Date" + }, + "name": { + "type": "string" + }, + "simpleContentAccess": { + "type": "string" + }, + "type": { + "type": "string" + }, + "uuid": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "description": "details of a subscription allocation" + }, + "AllocationSummary": { + "type": "object", + "properties": { + "contentAccessMode": { + "type": "string" + }, + "createdBy": { + "type": "string" + }, + "createdDate": { + "$ref": "#/components/schemas/Date" + }, + "entitlementsAttachedQuantity": { + "type": "integer" + }, + "lastModified": { + "$ref": "#/components/schemas/Date" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "uuid": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "description": "details of a subscription allocation" + }, + "AllocationVersion": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "description": "List of satellite version" + }, + "AttachEntitlement": { + "title": "System is an entity that consumes entitlements. Also referred as a Consumer.", + "type": "object", + "properties": { + "autoAttachSetting": { + "type": "boolean" + }, + "complianceStatus": { + "type": "string" + }, + "createdBy": { + "type": "string" + }, + "createdDate": { + "$ref": "#/components/schemas/Date" + }, + "entitlementStatus": { + "type": "string" + }, + "entitlementsAttached": { + "$ref": "#/components/schemas/EntitlementsAttachedResponse" + }, + "entitlementsAttachedCount": { + "type": "integer" + }, + "errataApplicabilityCounts": { + "$ref": "#/components/schemas/ErrataApplicabilityCounts" + }, + "factsCount": { + "type": "integer" + }, + "hostname": { + "type": "string" + }, + "installedProductsCount": { + "type": "integer" + }, + "lastCheckin": { + "$ref": "#/components/schemas/Date" + }, + "name": { + "type": "string" + }, + "serviceLevelPreference": { + "type": "string" + }, + "type": { + "type": "string" + }, + "uuid": { + "type": "string" + } + } + }, + "ContentSet": { + "title": "ContentSet represent a contentset for the listContentSets API Response.", + "type": "object", + "properties": { + "arch": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "label": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "Date": { + "type": "string", + "description": "Date represents the date format used for API returns", + "example": "2006-01-02T15:04:05.000Z" + }, + "DetailResponse": { + "title": "DetailResponse is the user-friendly response from the service.", + "type": "object", + "properties": { + "contractNumber": { + "type": "string" + }, + "endDate": { + "$ref": "#/components/schemas/Date" + }, + "pools": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pool" + } + }, + "quantity": { + "type": "string" + }, + "sku": { + "type": "string" + }, + "startDate": { + "$ref": "#/components/schemas/Date" + }, + "status": { + "type": "string" + }, + "subscriptionName": { + "type": "string" + }, + "subscriptionNumber": { + "type": "string" + } + } + }, + "DownloadLink": { + "type": "object", + "properties": { + "expiration": { + "type": "string", + "description": "time at which the download link expires (in UTC)", + "example": "2006-01-02T15:04:05.000Z" + }, + "filename": { + "type": "string", + "description": "filename of the file on the download link", + "example": "filename-1.2.3-1.x86_64.rpm" + }, + "href": { + "type": "string", + "description": "URL to obtain the image", + "example": "https://access.cdn.redhat.com/content/origin/files/sha256/64/643e706cf7db9e93e706637af92d80eb58377dd0c64ac1e9ce6a72700aa04c2a/rhel-8.1-x86_64-boot.iso?_auth_=1582920605_7e8153e1bdc2f46636653e2efb17bc65" + } + } + }, + "EnabledCloudAccessProvider": { + "type": "object", + "properties": { + "accounts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnabledProviderAccount" + } + }, + "name": { + "type": "string" + }, + "products": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnabledProduct" + } + }, + "shortName": { + "type": "string" + } + }, + "description": "Enabled Cloud Access Provider details including products and accounts." + }, + "EnabledProduct": { + "type": "object", + "properties": { + "enabledQuantity": { + "type": "integer" + }, + "imageGroups": { + "type": "array", + "items": { + "type": "string" + } + }, + "name": { + "type": "string" + }, + "nextRenewal": { + "$ref": "#/components/schemas/ShortDate" + }, + "sku": { + "type": "string" + }, + "totalQuantity": { + "type": "integer" + } + }, + "description": "Enabled Product represents a cloud access provider product" + }, + "EnabledProviderAccount": { + "required": [ + "dateAdded", + "id", + "nickname" + ], + "type": "object", + "properties": { + "dateAdded": { + "$ref": "#/components/schemas/Date" + }, + "goldImageStatus": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GoldImageStatus" + } + }, + "id": { + "type": "string" + }, + "nickname": { + "type": "string" + }, + "sourceId": { + "type": "string", + "description": "Source ID of linked account (only for accounts created via Sources on cloud.redhat.com)" + }, + "verified": { + "type": "boolean", + "description": "verification status for RHSM Auto Registration (only displayed for supported cloud providers)" + } + }, + "description": "Enabled Provider Account represents a cloud access provider account" + }, + "EntitlementsAttachedResponse": { + "type": "object", + "properties": { + "reason": { + "type": "string" + }, + "valid": { + "type": "boolean" + }, + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntitlementsAttachedResponseValue" + } + } + }, + "description": "EntitlementsAttachedResponse wraps data obtained for EntitlementsAttached and sends metadata about it using helpers.OptionalResult" + }, + "EntitlementsAttachedResponseValue": { + "type": "object", + "properties": { + "contractNumber": { + "type": "string" + }, + "endDate": { + "$ref": "#/components/schemas/Date" + }, + "entitlementQuantity": { + "type": "integer" + }, + "id": { + "type": "string" + }, + "sku": { + "type": "string" + }, + "startDate": { + "$ref": "#/components/schemas/Date" + }, + "subscriptionName": { + "type": "string" + } + }, + "description": "EntitlementsAttachedResponseValue represents the Value field in the EntitlementsAttachedResponse" + }, + "ErrataApplicabilityCounts": { + "type": "object", + "properties": { + "reason": { + "type": "string" + }, + "valid": { + "type": "boolean" + }, + "value": { + "$ref": "#/components/schemas/ErrataCount" + } + }, + "description": "Applicable errata details" + }, + "ErrataCount": { + "type": "object", + "properties": { + "bugfixCount": { + "type": "integer" + }, + "enhancementCount": { + "type": "integer" + }, + "securityCount": { + "type": "integer" + } + }, + "description": "ErrataCount is the errata information for a System" + }, + "ErratumDetails": { + "type": "object", + "properties": { + "affectedProducts": { + "type": "array", + "items": { + "type": "string" + } + }, + "bugzillas": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Reference" + } + }, + "copyrightYear": { + "type": "string" + }, + "cves": { + "type": "string" + }, + "description": { + "type": "string" + }, + "id": { + "type": "string" + }, + "issued": { + "$ref": "#/components/schemas/Date" + }, + "lastUpdated": { + "$ref": "#/components/schemas/Date" + }, + "references": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Reference" + } + }, + "severity": { + "type": "string" + }, + "solution": { + "type": "string" + }, + "summary": { + "type": "string" + }, + "synopsis": { + "type": "string" + }, + "type": { + "type": "string" + }, + "typeSeverity": { + "type": "string" + } + } + }, + "ErratumForSystem": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "id": { + "type": "string" + }, + "published": { + "$ref": "#/components/schemas/Date" + }, + "severity": { + "type": "string" + }, + "synopsis": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "description": "an erratum listed for a system" + }, + "ErratumInContentSet": { + "type": "object", + "properties": { + "advisoryId": { + "type": "string" + }, + "href": { + "type": "string" + }, + "publishDate": { + "$ref": "#/components/schemas/Date" + }, + "severity": { + "type": "string" + }, + "synopsis": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "description": "ErratumInContentSet contains information on an erratum listed in a content set" + }, + "ErrorDetails": { + "type": "object", + "properties": { + "code": { + "type": "integer" + }, + "message": { + "type": "string" + } + }, + "description": "ErrorDetails details the Error in ErrorResponse" + }, + "Facts": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "description": "facts give additional details about the system" + }, + "GoldImageStatus": { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "Description of the provider image group", + "example": "Red Hat Enterprise Linux" + }, + "name": { + "type": "string", + "description": "Name of the requested provider image group", + "example": "RHEL" + }, + "status": { + "type": "string", + "description": "Status of Gold Image Request", + "example": "Requested" + } + }, + "description": "Gold Image Status Details of a cloud access provider account for an image provider." + }, + "ImageForVersionArch": { + "type": "object", + "properties": { + "arch": { + "type": "string" + }, + "checksum": { + "type": "string" + }, + "datePublished": { + "$ref": "#/components/schemas/Date" + }, + "downloadHref": { + "type": "string" + }, + "filename": { + "type": "string" + }, + "imageName": { + "type": "string" + } + }, + "description": "Image Details for provided version and architecture." + }, + "ImageInContentSet": { + "type": "object", + "properties": { + "arch": { + "type": "string" + }, + "checksum": { + "type": "string" + }, + "datePublished": { + "$ref": "#/components/schemas/Date" + }, + "downloadHref": { + "type": "string" + }, + "filename": { + "type": "string" + }, + "imageName": { + "type": "string" + } + }, + "description": "Image Details in a content set image listing." + }, + "InstalledProducts": { + "type": "object", + "properties": { + "arch": { + "type": "string" + }, + "productID": { + "type": "string" + }, + "productName": { + "type": "string" + }, + "status": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "description": "details of installed products on the system" + }, + "ListResponse": { + "type": "array", + "description": "ListResponse is the actual collection of subscription details that gets\nrendered", + "items": { + "$ref": "#/components/schemas/DetailResponse" + } + }, + "MyErratum": { + "type": "object", + "properties": { + "advisoryId": { + "type": "string" + }, + "affectedSystemCount": { + "type": "integer" + }, + "details": { + "type": "string" + }, + "publishDate": { + "$ref": "#/components/schemas/Date" + }, + "synopsis": { + "type": "string" + }, + "systems": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "description": "MyErratum contains erratum information that affects at least one system" + }, + "OrgSimpleContentAccess": { + "title": "Organization Simple Content Access details.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "simpleContentAccess": { + "type": "string" + }, + "simpleContentAccessCapable": { + "type": "boolean" + }, + "systemPurposeAttributes": { + "$ref": "#/components/schemas/SystemPurposeAttributes" + } + } + }, + "PackageDetail": { + "type": "object", + "properties": { + "arch": { + "type": "string" + }, + "checksum": { + "type": "string" + }, + "contentSets": { + "type": "array", + "items": { + "type": "string" + } + }, + "details_url": { + "type": "string" + }, + "epoch": { + "type": "integer" + }, + "filename": { + "type": "string" + }, + "name": { + "type": "string" + }, + "release": { + "type": "string" + }, + "repoTags": { + "type": "array", + "items": { + "type": "string" + } + }, + "summary": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "description": "PackageDetail wraps an errata package and adds a RefURL" + }, + "PackageForSystem": { + "type": "object", + "properties": { + "advisories": { + "type": "array", + "items": { + "type": "object", + "properties": { + "advisory": { + "type": "string" + }, + "url": { + "type": "string" + } + } + } + }, + "arch": { + "type": "string" + }, + "epoch": { + "type": "integer" + }, + "errataCount": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "release": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "description": "package installed on a system" + }, + "Pool": { + "type": "object", + "properties": { + "consumed": { + "type": "integer" + }, + "id": { + "type": "string" + }, + "quantity": { + "type": "integer" + }, + "type": { + "type": "string" + } + }, + "description": "Pool represents pool information that matter for the detail list" + }, + "PoolDetail": { + "type": "object", + "properties": { + "contractNumber": { + "type": "string" + }, + "endDate": { + "$ref": "#/components/schemas/Date" + }, + "entitlementsAvailable": { + "type": "integer" + }, + "id": { + "type": "string" + }, + "serviceLevel": { + "type": "string" + }, + "sku": { + "type": "string" + }, + "startDate": { + "$ref": "#/components/schemas/Date" + }, + "subscriptionName": { + "type": "string" + }, + "subscriptionNumber": { + "type": "string" + } + }, + "description": "PoolDetail is an entry in the system/allocation pools listing" + }, + "Reference": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "description": "Reference contains a reference to an external item" + }, + "ShortDate": { + "type": "string", + "description": "ShortDate represents the short date format used for API returns where time precision is not needed", + "example": "2006-01-02T00:00:00.000Z" + }, + "ShowSystem": { + "title": "System is an entity that consumes entitlements. Also referred as a Consumer.", + "type": "object", + "properties": { + "autoAttachSetting": { + "type": "boolean" + }, + "complianceStatus": { + "type": "string" + }, + "createdBy": { + "type": "string" + }, + "createdDate": { + "$ref": "#/components/schemas/Date" + }, + "entitlementStatus": { + "type": "string" + }, + "entitlementsAttached": { + "$ref": "#/components/schemas/EntitlementsAttachedResponse" + }, + "entitlementsAttachedCount": { + "type": "integer" + }, + "errataApplicabilityCounts": { + "$ref": "#/components/schemas/ErrataApplicabilityCounts" + }, + "facts": { + "$ref": "#/components/schemas/Facts" + }, + "factsCount": { + "type": "integer" + }, + "hostname": { + "type": "string" + }, + "installedProducts": { + "$ref": "#/components/schemas/InstalledProducts" + }, + "installedProductsCount": { + "type": "integer" + }, + "lastCheckin": { + "$ref": "#/components/schemas/Date" + }, + "name": { + "type": "string" + }, + "serviceLevelPreference": { + "type": "string" + }, + "type": { + "type": "string" + }, + "uuid": { + "type": "string" + } + } + }, + "SubSystem": { + "type": "object", + "properties": { + "complianceStatus": { + "type": "string" + }, + "details": { + "type": "string" + }, + "lastCheckin": { + "$ref": "#/components/schemas/Date" + }, + "systemName": { + "type": "string" + }, + "totalEntitlementQuantity": { + "type": "integer" + }, + "type": { + "type": "string" + }, + "uuid": { + "type": "string" + } + }, + "description": "SubSystem represents a single entity in the list subscription's systems API" + }, + "System": { + "title": "System is an entity that consumes entitlements. Also referred as a Consumer.", + "type": "object", + "properties": { + "entitlementCount": { + "type": "integer" + }, + "entitlementStatus": { + "type": "string" + }, + "errataCounts": { + "$ref": "#/components/schemas/ErrataCount" + }, + "hostname": { + "type": "string" + }, + "href": { + "type": "string" + }, + "lastCheckin": { + "$ref": "#/components/schemas/Date" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "username": { + "type": "string" + }, + "uuid": { + "type": "string" + } + } + }, + "SystemPurposeAttributes": { + "type": "object", + "properties": { + "roles": { + "type": "array", + "items": { + "type": "string" + } + }, + "serviceLevel": { + "type": "array", + "items": { + "type": "string" + } + }, + "usage": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "description": "System purpose settings available to an organization" + }, + "contentSetArchMock": { + "type": "object", + "properties": { + "body": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ErratumInContentSet" + } + }, + "pagination": { + "$ref": "#/components/schemas/APIPageParam" + } + } + }, + "exportJobResponse": { + "type": "object", + "properties": { + "exportID": { + "type": "string" + }, + "href": { + "type": "string" + } + } + }, + "exportResponse": { + "type": "object", + "properties": { + "exportJobID": { + "type": "string" + }, + "href": { + "type": "string" + } + } + }, + "myErrataListMock": { + "type": "object", + "properties": { + "body": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MyErratum" + } + }, + "pagination": { + "$ref": "#/components/schemas/APIPageParam" + } + } + }, + "ongoingExportJobResponse": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + }, + "pkgContentSetArch": { + "type": "object", + "properties": { + "arch": { + "type": "string" + }, + "buildDate": { + "$ref": "#/components/schemas/Date" + }, + "buildHost": { + "type": "string" + }, + "checksum": { + "type": "string" + }, + "contentSets": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": { + "type": "string" + }, + "downloadHref": { + "type": "string" + }, + "epoch": { + "type": "string" + }, + "group": { + "type": "string" + }, + "href": { + "type": "string" + }, + "license": { + "type": "string" + }, + "name": { + "type": "string" + }, + "release": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "summary": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "pkgDetails": { + "type": "object", + "properties": { + "arch": { + "type": "string" + }, + "buildDate": { + "$ref": "#/components/schemas/Date" + }, + "buildHost": { + "type": "string" + }, + "checksum": { + "type": "string" + }, + "contentSets": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": { + "type": "string" + }, + "epoch": { + "type": "string" + }, + "group": { + "type": "string" + }, + "href": { + "type": "string" + }, + "license": { + "type": "string" + }, + "name": { + "type": "string" + }, + "release": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "summary": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "pkgListMock": { + "type": "object", + "properties": { + "body": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PackageDetail" + } + }, + "pagination": { + "$ref": "#/components/schemas/APIPageParam" + } + } + }, + "poolsListMock": { + "type": "object", + "properties": { + "body": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PoolDetail" + } + }, + "pagination": { + "$ref": "#/components/schemas/APIPageParam" + } + } + }, + "systemList": { + "type": "array", + "description": "systemList is a System Slice", + "items": { + "$ref": "#/components/schemas/System" + } + }, + "systemListMock": { + "type": "object", + "properties": { + "body": { + "type": "array", + "items": { + "$ref": "#/components/schemas/System" + } + }, + "pagination": { + "$ref": "#/components/schemas/APIPageParam" + } + } + }, + "updatedImage": { + "type": "object", + "properties": { + "architecture": { + "type": "string" + }, + "digest": { + "type": "string" + }, + "imagePlusDigest": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "updatedImagesList": { + "type": "object", + "properties": { + "body": { + "type": "array", + "items": { + "$ref": "#/components/schemas/updatedImage" + } + } + } + } + }, + "responses": { + "Accepted": { + "description": "Accepted: The request has been accepted for processing, but the processing has not been completed.", + "content": {} + }, + "BadRequest": { + "description": "BadRequest error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "Forbidden": { + "description": "Forbidden error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "GatewayTimeout": { + "description": "GatewayTimeout error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "InternalServerError": { + "description": "InternalServerError error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "NoContent": { + "description": "No Content", + "content": {} + }, + "NotAcceptable": { + "description": "NotAcceptable error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "NotFound": { + "description": "NotFound error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + }, + "Unauthorized": { + "description": "Unauthorized error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ErrorDetails" + } + } + } + } + } + } + }, + "securitySchemes": { + "Bearer": { + "type": "apiKey", + "description": "Bearer token for authorized user", + "name": "Authorization", + "in": "header" + } + } + }, + "x-original-swagger-version": "2.0" +} diff --git a/src/utils.ts b/src/utils.ts index 85b4f1f..fd1a7b1 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -16,6 +16,10 @@ * SPDX-License-Identifier: Apache-2.0 ***********************************************************************/ +import * as fs from 'node:fs'; + +import type { SubscriptionManagerClientV1 } from './rh-api/rh-api-sm'; + export function getErrorMessage(err: unknown): string { if (err && typeof err === 'object' && 'message' in err) { return String(err.message); @@ -32,3 +36,19 @@ export function verifyContainerProivder(containerProvider: string): 'wsl' | 'hyp return undefined; } } + +export async function pullImageFromRedHatRegistry( + rhsmClientV1: SubscriptionManagerClientV1, + imageSha: string, + pathToSave: string, +): Promise { + const redirectToImage = await rhsmClientV1.images.downloadImageUsingSha(imageSha); + + const output = fs.createWriteStream(pathToSave); + const stream = new WritableStream({ + write(chunk): void { + output.write(chunk); + }, + }); + await redirectToImage?.data?.pipeTo(stream); +}