mirror of
https://github.com/GlueOps/autoglue.git
synced 2026-02-13 21:00:06 +01:00
feat: adding taints, labels and annotations to terraform provider and ui all implementing the SDK
This commit is contained in:
27
ui/src/api/annotations.ts
Normal file
27
ui/src/api/annotations.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { withRefresh } from "@/api/with-refresh.ts"
|
||||
import type { DtoCreateAnnotationRequest, DtoUpdateAnnotationRequest } from "@/sdk"
|
||||
import { makeAnnotationsApi } from "@/sdkClient.ts"
|
||||
|
||||
const annotations = makeAnnotationsApi()
|
||||
export const annotationsApi = {
|
||||
listAnnotations: () =>
|
||||
withRefresh(async () => {
|
||||
return await annotations.listAnnotations()
|
||||
}),
|
||||
createAnnotation: (body: DtoCreateAnnotationRequest) =>
|
||||
withRefresh(async () => {
|
||||
return await annotations.createAnnotation({ body })
|
||||
}),
|
||||
getAnnotation: (id: string) =>
|
||||
withRefresh(async () => {
|
||||
return await annotations.getAnnotation({ id })
|
||||
}),
|
||||
deleteAnnotation: (id: string) =>
|
||||
withRefresh(async () => {
|
||||
await annotations.deleteAnnotation({ id })
|
||||
}),
|
||||
updateAnnotation: (id: string, body: DtoUpdateAnnotationRequest) =>
|
||||
withRefresh(async () => {
|
||||
return await annotations.updateAnnotation({ id, body })
|
||||
}),
|
||||
}
|
||||
Reference in New Issue
Block a user