diff --git a/src/store/deployApi.ts b/src/store/deployApi.ts index abcb3b50e84be4192c1c5e51a43d7f3e34545199..46d056d20a2242d9d696615137431b3da442360d 100644 --- a/src/store/deployApi.ts +++ b/src/store/deployApi.ts @@ -304,6 +304,12 @@ const injectedRtkApi = api.injectEndpoints({ url: `/api/v1/hosts/${queryArg.hostId}/info_by_host_id` }) }), + checkHostExists: build.query< + CheckHostExistsApiResponse, + CheckHostExistsApiArg + >({ + query: (queryArg) => ({ url: `/api/v1/hosts/${queryArg.hostId}/exists` }) + }), findHostAlerts: build.query< FindHostAlertsApiResponse, FindHostAlertsApiArg @@ -465,7 +471,8 @@ export type UpdateIocApiArg = { iocUpdateRequest: IocUpdateRequest; }; export type UnDeployInDbApiResponse = - /** status 200 Undeployment created */ Deployment[]; + /** status 200 Undeployment created */ + Deployment[] | /** status 204 No Content */ void; export type UnDeployInDbApiArg = { /** The id of the IOC to undeploy */ iocId: number; @@ -657,6 +664,12 @@ export type FindNetBoxHostByHostIdApiArg = { /** The host's Host ID */ hostId: string; }; +export type CheckHostExistsApiResponse = + /** status 200 Hosts exists in NetBox */ void; +export type CheckHostExistsApiArg = { + /** Host identifier */ + hostId: string; +}; export type FindHostAlertsApiResponse = /** status 200 Host alerts */ HostAlertResponse; export type FindHostAlertsApiArg = { @@ -1188,6 +1201,8 @@ export const { useLazyFindAssociatedIocsByHostIdQuery, useFindNetBoxHostByHostIdQuery, useLazyFindNetBoxHostByHostIdQuery, + useCheckHostExistsQuery, + useLazyCheckHostExistsQuery, useFindHostAlertsQuery, useLazyFindHostAlertsQuery, useFindNetBoxHostByFqdnQuery,