ФУНКЦИИ - МЕЖПРОЕКТНАЯ КОММУНИКАЦИЯ: мониторинг очереди Voice Tasker

This commit is contained in:
DCCONSTRUCTIONS
2026-04-28 16:31:47 +03:00
parent 3b295e33f3
commit d60c28ec04
8 changed files with 772 additions and 10 deletions
@@ -9,6 +9,7 @@ import type {
TVoiceTaskCommitResult,
TVoiceTaskPreflight,
TVoiceTaskDraft,
TVoiceTaskMonitor,
TVoiceTaskUploadResult,
TWorkspaceAIConnectionTestResult,
TWorkspaceAISettings,
@@ -45,6 +46,22 @@ export class WorkspaceAIService extends APIService {
});
}
async retrieveVoiceTaskMonitor(workspaceSlug: string): Promise<TVoiceTaskMonitor> {
return this.get(`/api/workspaces/${workspaceSlug}/voice-tasker/monitor/`)
.then((response) => response?.data)
.catch((error) => {
throw error?.response?.data;
});
}
async cleanupStaleVoiceTaskSessions(workspaceSlug: string): Promise<TVoiceTaskMonitor> {
return this.post(`/api/workspaces/${workspaceSlug}/voice-tasker/monitor/`, { action: "fail_stale" })
.then((response) => response?.data)
.catch((error) => {
throw error?.response?.data;
});
}
async retrieveVoiceTaskPreflight(workspaceSlug: string, projectId?: string | null): Promise<TVoiceTaskPreflight> {
const params = projectId ? `?project_id=${projectId}` : "";
return this.get(