feat : add frontend deploy types and service

This commit is contained in:
2026-04-06 15:24:17 +02:00
parent 73849b3ef8
commit aa42a0ee35
2 changed files with 22 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
import type { TagListResponse, DeployResult } from './dto/deploy'
export function getAvailableTags(slug: string): Promise<TagListResponse> {
return useApi().get<TagListResponse>(`/applications/${slug}/tags`, undefined, {
toast: false,
})
}
export function deploy(envId: number, tag: string): Promise<DeployResult> {
return useApi().post<DeployResult>(`/environments/${envId}/deploy`, { tag }, {
toast: false,
})
}

View File

@@ -0,0 +1,9 @@
type TagListResponse = {
tags: string[]
}
type DeployResult = {
success: boolean
output: string
tag: string
}