refactor: Remove cache and metrics endpoints, and clean up voice design CRUD operations

This commit is contained in:
2026-02-04 19:41:08 +08:00
parent dc5fd643e7
commit 4f535b20e5
10 changed files with 4 additions and 275 deletions

View File

@@ -399,13 +399,6 @@ export const voiceDesignApi = {
return response.data
},
get: async (id: number): Promise<VoiceDesign> => {
const response = await apiClient.get<VoiceDesign>(
API_ENDPOINTS.VOICE_DESIGNS.GET(id)
)
return response.data
},
create: async (data: VoiceDesignCreate): Promise<VoiceDesign> => {
const response = await apiClient.post<VoiceDesign>(
API_ENDPOINTS.VOICE_DESIGNS.CREATE,
@@ -414,18 +407,6 @@ export const voiceDesignApi = {
return response.data
},
update: async (id: number, name: string): Promise<VoiceDesign> => {
const response = await apiClient.patch<VoiceDesign>(
API_ENDPOINTS.VOICE_DESIGNS.UPDATE(id),
{ name }
)
return response.data
},
delete: async (id: number): Promise<void> => {
await apiClient.delete(API_ENDPOINTS.VOICE_DESIGNS.DELETE(id))
},
prepareClone: async (id: number): Promise<{ message: string; cache_id: number; ref_text: string }> => {
const response = await apiClient.post<{ message: string; cache_id: number; ref_text: string }>(
API_ENDPOINTS.VOICE_DESIGNS.PREPARE_CLONE(id)