ФУНКЦИИ - МЕЖПРОЕКТНАЯ КОММУНИКАЦИЯ: preflight и запись audio для Voice Tasker

This commit is contained in:
DCCONSTRUCTIONS
2026-04-24 17:21:34 +03:00
parent 237c7964cd
commit 3c19c3175f
9 changed files with 542 additions and 3 deletions
+24
View File
@@ -65,3 +65,27 @@ export type TWorkspaceAIConnectionTestResult = {
code?: string;
error?: string;
};
export type TVoiceTaskPreflightReason = "not_configured" | "disabled" | "missing_api_key" | "role_denied" | null;
export type TVoiceTaskPreflight = {
available: boolean;
reason: TVoiceTaskPreflightReason;
max_audio_duration_seconds: number;
accepted_mime_types: string[];
access_mode: TWorkspaceAIAccessMode;
};
export type TVoiceTaskUploadResult = {
ok: boolean;
status?: "uploaded";
pipeline_status?: "pending_openai_pipeline";
audio?: {
content_type: string;
duration_seconds: number;
size: number;
};
client_context?: Record<string, unknown>;
code?: string;
error?: string;
};