mirror of
https://github.com/GlueOps/autoglue.git
synced 2026-02-12 20:30:05 +01:00
28 lines
832 B
TypeScript
28 lines
832 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({ 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, body })
|
|
}),
|
|
}
|