Advisor: Expose endpoint to register checktypes (#113750)

This commit is contained in:
Andres Martinez Gotor
2025-11-17 12:48:53 +01:00
committed by GitHub
parent aa26cc4254
commit 151d9ec1cc
8 changed files with 286 additions and 44 deletions
@@ -304,6 +304,9 @@ const injectedRtkApi = api
}),
invalidatesTags: ['CheckType'],
}),
createRegister: build.mutation<CreateRegisterApiResponse, CreateRegisterApiArg>({
query: () => ({ url: `/register`, method: 'POST' }),
}),
}),
overrideExisting: false,
});
@@ -714,6 +717,8 @@ export type UpdateCheckTypeStatusApiArg = {
force?: boolean;
patch: Patch;
};
export type CreateRegisterApiResponse = /** status 200 OK */ CreateRegister;
export type CreateRegisterApiArg = void;
export type ApiResource = {
/** categories is a list of the grouped resources this resource belongs to (e.g. 'all') */
categories?: string[];
@@ -1016,6 +1021,13 @@ export type CheckTypeList = {
kind?: string;
metadata: ListMeta;
};
export type CreateRegister = {
/** APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */
apiVersion: string;
/** Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */
kind: string;
message: string;
};
export const {
useGetApiResourcesQuery,
useLazyGetApiResourcesQuery,
@@ -1045,4 +1057,5 @@ export const {
useLazyGetCheckTypeStatusQuery,
useReplaceCheckTypeStatusMutation,
useUpdateCheckTypeStatusMutation,
useCreateRegisterMutation,
} = injectedRtkApi;