diff --git a/api/schema/imageBuilder.yaml b/api/schema/imageBuilder.yaml index 2f463cdb..bf8e1f3f 100644 --- a/api/schema/imageBuilder.yaml +++ b/api/schema/imageBuilder.yaml @@ -602,8 +602,7 @@ components: example: "MyImageDescription" maxLength: 250 client_id: - type: string - example: "ui" + $ref: '#/components/schemas/ClientId' image_requests: type: array minItems: 1 @@ -771,7 +770,11 @@ components: image_name: type: string client_id: - type: string + $ref: '#/components/schemas/ClientId' + ClientId: + type: string + enum: ["api", "ui"] + default: "api" ComposeResponse: required: - id @@ -1172,6 +1175,13 @@ components: profile_id: type: string example: "xccdf_org.ssgproject.content_profile_cis" + description: "The policy reference ID" + profile_name: + type: string + description: "The policy type" + profile_description: + type: string + description: "The longform policy description" ClonesResponse: required: - meta diff --git a/src/store/imageBuilderApi.ts b/src/store/imageBuilderApi.ts index cb172465..9a1a735f 100644 --- a/src/store/imageBuilderApi.ts +++ b/src/store/imageBuilderApi.ts @@ -209,6 +209,7 @@ export type Distributions = | "fedora-38" | "fedora-39" | "fedora-40"; +export type ClientId = "api" | "ui"; export type ImageTypes = | "aws" | "azure" @@ -294,6 +295,8 @@ export type CustomRepository = { }; export type OpenScap = { profile_id: string; + profile_name?: string; + profile_description?: string; }; export type Filesystem = { mountpoint: string; @@ -317,7 +320,7 @@ export type ComposeRequest = { distribution: Distributions; image_name?: string; image_description?: string; - client_id?: string; + client_id?: ClientId; image_requests: ImageRequest[]; customizations?: Customizations; }; @@ -326,7 +329,7 @@ export type ComposesResponseItem = { request: ComposeRequest; created_at: string; image_name?: string; - client_id?: string; + client_id?: ClientId; }; export type ComposesResponse = { meta: {