mirror of
https://github.com/GlueOps/autoglue.git
synced 2026-02-13 12:50:05 +01:00
28 lines
878 B
TypeScript
28 lines
878 B
TypeScript
import { withRefresh } from "@/api/with-refresh.ts"
|
|
import type { DtoCreateTaintRequest, DtoUpdateTaintRequest } from "@/sdk"
|
|
import { makeTaintsApi } from "@/sdkClient.ts"
|
|
|
|
const taints = makeTaintsApi()
|
|
export const taintsApi = {
|
|
listTaints: () =>
|
|
withRefresh(async () => {
|
|
return await taints.listTaints()
|
|
}),
|
|
createTaint: (body: DtoCreateTaintRequest) =>
|
|
withRefresh(async () => {
|
|
return await taints.createTaint({ dtoCreateTaintRequest: body })
|
|
}),
|
|
getTaint: (id: string) =>
|
|
withRefresh(async () => {
|
|
return await taints.getTaint({ id })
|
|
}),
|
|
deleteTaint: (id: string) =>
|
|
withRefresh(async () => {
|
|
await taints.deleteTaint({ id })
|
|
}),
|
|
updateTaint: (id: string, body: DtoUpdateTaintRequest) =>
|
|
withRefresh(async () => {
|
|
return await taints.updateTaint({ id, dtoUpdateTaintRequest: body })
|
|
}),
|
|
}
|