ФУНКЦИИ - МЕЖПРОЕКТНАЯ КОММУНИКАЦИЯ: мониторинг очереди Voice Tasker
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user