This commit adds types for the APIs that we currently query using RTK Query. The OpenAPI schema were converted to Typescript types using the openapi-typescript package: https://www.npmjs.com/package/openapi-typescript In the future, we would like to add a script to a /tools directory that will automatically generate the types from the schema. That isn't possible now because the OpenAPI schema on consoledot require authorization to acccess, but exposing them without auth is on the roadmap and once that is complete we will add a script to automate the process of generating these types.
14 lines
1.1 KiB
TypeScript
14 lines
1.1 KiB
TypeScript
import { components as imageBuilderComponents } from './imageBuilderSchema';
|
|
import { components as provisioningComponents } from './provisioningSchema';
|
|
import { components as rhsmComponents } from './rhsmSchema';
|
|
import { components as contentSourcesComponents } from './contentSourcesSchema';
|
|
|
|
export type ActivationKeys = rhsmComponents["schemas"]["ActivationKeys"];
|
|
export type Architectures = imageBuilderComponents["schemas"]["Architectures"];
|
|
export type ClonesResponse = imageBuilderComponents["schemas"]["ClonesResponse"];
|
|
export type ComposeStatus = imageBuilderComponents["schemas"]["ComposeStatus"];
|
|
export type ComposesResponse = imageBuilderComponents["schemas"]["ComposesResponse"];
|
|
export type UploadStatus = imageBuilderComponents["schemas"]["UploadStatus"];
|
|
export type SourceResponse = provisioningComponents["schemas"]["v1.SourceResponse"];
|
|
export type SourceUploadInfoResponse = provisioningComponents["schemas"]["v1.SourceUploadInfoResponse"]
|
|
export type RepositoryCollectionResponse = contentSourcesComponents["schemas"]["api.RepositoryCollectionResponse"]
|