ФУНКЦИИ - МЕЖПРОЕКТНАЯ КОММУНИКАЦИЯ: 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
+36 -1
View File
@@ -390,12 +390,47 @@ Backend:
Использовать workspace slug, как в существующих API routes Plane:
```http
GET /api/workspaces/:workspaceSlug/voice-task/preflight
POST /api/workspaces/:workspaceSlug/voice-task/parse
POST /api/workspaces/:workspaceSlug/voice-task/commit
POST /api/workspaces/:workspaceSlug/voice-task/resolve-command
```
### 7.1. Parse
### 7.1. Preflight
```http
GET /api/workspaces/:workspaceSlug/voice-task/preflight
```
Назначение:
- проверить, доступен ли Voice Tasker текущему пользователю;
- не раскрывать OpenAI key;
- вернуть max audio duration и допустимые mime types;
- дать frontend причину недоступности для disabled tooltip.
Response:
```json
{
"available": true,
"reason": null,
"max_audio_duration_seconds": 120,
"accepted_mime_types": ["audio/webm", "audio/mp4", "audio/mpeg", "audio/wav"],
"access_mode": "all_workspace_members"
}
```
`reason` если недоступно:
```txt
not_configured
disabled
missing_api_key
role_denied
```
### 7.2. Parse
```http
POST /api/workspaces/:workspaceSlug/voice-task/parse