АРХ - МЕЖПРОЕКТНАЯ КОММУНИКАЦИЯ: каркас Voice Tasker settings

This commit is contained in:
DCCONSTRUCTIONS
2026-04-24 16:47:16 +03:00
parent b3c6b37399
commit 237c7964cd
20 changed files with 2009 additions and 3 deletions
@@ -56,6 +56,13 @@ export const WORKSPACE_SETTINGS: Record<TWorkspaceSettingsTabs, TWorkspaceSettin
access: [EUserWorkspaceRoles.ADMIN],
highlight: (pathname: string, baseUrl: string) => pathname === `${baseUrl}/settings/webhooks/`,
},
"ai-voice-tasker": {
key: "ai-voice-tasker",
i18n_label: "workspace_settings.settings.ai_voice_tasker.title",
href: `/settings/ai-voice-tasker`,
access: [EUserWorkspaceRoles.ADMIN],
highlight: (pathname: string, baseUrl: string) => pathname === `${baseUrl}/settings/ai-voice-tasker/`,
},
};
export const WORKSPACE_SETTINGS_ACCESS = Object.fromEntries(
@@ -69,6 +76,6 @@ export const GROUPED_WORKSPACE_SETTINGS: Record<WORKSPACE_SETTINGS_CATEGORY, TWo
WORKSPACE_SETTINGS["billing-and-plans"],
WORKSPACE_SETTINGS["export"],
],
[WORKSPACE_SETTINGS_CATEGORY.FEATURES]: [],
[WORKSPACE_SETTINGS_CATEGORY.FEATURES]: [WORKSPACE_SETTINGS["ai-voice-tasker"]],
[WORKSPACE_SETTINGS_CATEGORY.DEVELOPER]: [WORKSPACE_SETTINGS["webhooks"]],
};
@@ -1783,6 +1783,9 @@ export default {
},
},
},
ai_voice_tasker: {
title: "AI / Voice Tasker",
},
api_tokens: {
title: "Personal Access Tokens",
add_token: "Add personal access token",
@@ -1945,6 +1945,9 @@ export default {
},
},
},
ai_voice_tasker: {
title: "AI / Voice Tasker",
},
api_tokens: {
title: "API-токены",
add_token: "Добавить токен",
+51
View File
@@ -14,3 +14,54 @@ export interface IGptResponse {
project_detail: IProjectLite;
workspace_detail: IWorkspaceLite;
}
export type TWorkspaceAIProvider = "openai";
export type TWorkspaceAIAccessMode = "all_workspace_members" | "admins_only";
export type TWorkspaceAICredentialStatus = {
provider: TWorkspaceAIProvider;
has_key: boolean;
key_last4: string;
updated_at: string | null;
};
export type TWorkspaceAISettings = {
id: string;
workspace_id: string;
voice_tasker_enabled: boolean;
provider: TWorkspaceAIProvider;
transcription_model: string;
structuring_model: string;
default_project_id: string | null;
access_mode: TWorkspaceAIAccessMode;
max_audio_duration_seconds: number;
per_user_hourly_limit: number;
workspace_hourly_limit: number;
credential: TWorkspaceAICredentialStatus;
created_at: string;
updated_at: string;
};
export type TWorkspaceAISettingsPayload = Partial<
Pick<
TWorkspaceAISettings,
| "voice_tasker_enabled"
| "transcription_model"
| "structuring_model"
| "default_project_id"
| "access_mode"
| "max_audio_duration_seconds"
| "per_user_hourly_limit"
| "workspace_hourly_limit"
>
> & {
openai_api_key?: string;
};
export type TWorkspaceAIConnectionTestResult = {
ok: boolean;
provider?: TWorkspaceAIProvider;
model?: string;
code?: string;
error?: string;
};
+7 -1
View File
@@ -10,7 +10,13 @@ import type { EUserWorkspaceRoles } from "./workspace";
export type TProfileSettingsTabs = "general" | "preferences" | "activity" | "notifications" | "security" | "api-tokens";
export type TWorkspaceSettingsTabs = "general" | "members" | "billing-and-plans" | "export" | "webhooks";
export type TWorkspaceSettingsTabs =
| "general"
| "members"
| "billing-and-plans"
| "export"
| "webhooks"
| "ai-voice-tasker";
export type TWorkspaceSettingsItem = {
key: TWorkspaceSettingsTabs;
i18n_label: string;