feat: Implement prepare-and-create endpoint for voice design creation and update related API and frontend logic

This commit is contained in:
2026-03-06 14:23:15 +08:00
parent 5e1e3e0668
commit ad90e5f96c
5 changed files with 119 additions and 16 deletions

View File

@@ -432,6 +432,14 @@ export const voiceDesignApi = {
return response.data
},
prepareAndCreate: async (data: VoiceDesignCreate): Promise<VoiceDesign> => {
const response = await apiClient.post<VoiceDesign>(
API_ENDPOINTS.VOICE_DESIGNS.PREPARE_AND_CREATE,
data
)
return response.data
},
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)