api: update image-builder-crc api
Includes fetching tailored customizations for compliance policies.
This commit is contained in:
parent
ae40150996
commit
a69a09fa4f
3 changed files with 45 additions and 0 deletions
|
|
@ -161,6 +161,14 @@ const injectedRtkApi = api.injectEndpoints({
|
|||
url: `/oscap/${queryArg.distribution}/${queryArg.profile}/customizations`,
|
||||
}),
|
||||
}),
|
||||
getOscapCustomizationsForPolicy: build.query<
|
||||
GetOscapCustomizationsForPolicyApiResponse,
|
||||
GetOscapCustomizationsForPolicyApiArg
|
||||
>({
|
||||
query: (queryArg) => ({
|
||||
url: `/oscap/${queryArg.policy}/${queryArg.distribution}/policy_customizations`,
|
||||
}),
|
||||
}),
|
||||
recommendPackage: build.mutation<
|
||||
RecommendPackageApiResponse,
|
||||
RecommendPackageApiArg
|
||||
|
|
@ -339,6 +347,13 @@ export type GetOscapCustomizationsApiArg = {
|
|||
/** Name of the profile to retrieve customizations from */
|
||||
profile: DistributionProfileItem;
|
||||
};
|
||||
export type GetOscapCustomizationsForPolicyApiResponse =
|
||||
/** status 200 A customizations array updated with the needed elements.
|
||||
*/ Customizations;
|
||||
export type GetOscapCustomizationsForPolicyApiArg = {
|
||||
policy: string;
|
||||
distribution: Distributions;
|
||||
};
|
||||
export type RecommendPackageApiResponse =
|
||||
/** status 200 Return the recommended packages. */ RecommendationsResponse;
|
||||
export type RecommendPackageApiArg = {
|
||||
|
|
@ -1002,6 +1017,8 @@ export const {
|
|||
useLazyGetOscapProfilesQuery,
|
||||
useGetOscapCustomizationsQuery,
|
||||
useLazyGetOscapCustomizationsQuery,
|
||||
useGetOscapCustomizationsForPolicyQuery,
|
||||
useLazyGetOscapCustomizationsForPolicyQuery,
|
||||
useRecommendPackageMutation,
|
||||
useFixupBlueprintMutation,
|
||||
} = injectedRtkApi;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue