diff --git a/src/App.tsx b/src/App.tsx index d012e32..016a8fe 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -38,7 +38,7 @@ import { SettingsPage } from './pages/Settings'; import { GDPRPage } from './pages/GDPR'; import StorePage from './pages/Store'; import { FeatureViewPage } from './pages/FeatureView'; -import { AccessManagementHub, AdminMandatesPage, AdminUsersPage, AdminUserMandatesPage, AdminFeatureAccessPage, AdminInvitationsPage, AdminMandateRolesPage, AdminFeatureRolesPage, AdminFeatureInstanceUsersPage, AdminMandateRolePermissionsPage, AdminUserAccessOverviewPage, AdminLogsPage, AdminLanguagesPage } from './pages/admin'; +import { AccessManagementHub, AdminMandatesPage, AdminUsersPage, AdminUserMandatesPage, AdminFeatureAccessPage, AdminInvitationsPage, AdminMandateRolesPage, AdminFeatureRolesPage, AdminFeatureInstanceUsersPage, AdminMandateRolePermissionsPage, AdminUserAccessOverviewPage, AdminLogsPage } from './pages/admin'; import { AdminMandateWizardPage, AdminInvitationWizardPage } from './pages/admin/wizards'; import { PromptsPage, FilesPage, ConnectionsPage } from './pages/basedata'; import { BillingDataView, BillingAdmin, BillingMandateView, AdminSubscriptionsPage } from './pages/billing'; @@ -155,6 +155,8 @@ function App() { } /> } /> } /> + } /> + } /> {/* Automation Feature Views */} } /> @@ -203,7 +205,7 @@ function App() { } /> } /> - } /> + } /> } /> diff --git a/src/api/trusteeApi.ts b/src/api/trusteeApi.ts index cc8920b..f467f87 100644 --- a/src/api/trusteeApi.ts +++ b/src/api/trusteeApi.ts @@ -751,6 +751,41 @@ export async function deletePositionDocument( }); } +// ============================================================================ +// QUICK ACTIONS API +// ============================================================================ + +export interface QuickActionResponse { + actions: Array<{ + id: string; + label: string; + description: string; + icon: string; + color: string; + category: string; + actionType: 'agentPrompt' | 'workflow' | 'link'; + config: Record; + sortOrder: number; + }>; + categories: Array<{ + id: string; + label: string; + sortOrder: number; + }>; +} + +export async function fetchQuickActions( + request: ApiRequestFunction, + instanceId: string, + language: string = 'de' +): Promise { + return await request({ + url: `${_getTrusteeBaseUrl(instanceId)}/quick-actions`, + method: 'get', + params: { language } + }); +} + // ============================================================================ // ACCOUNTING API // ============================================================================ diff --git a/src/api/workflowApi.ts b/src/api/workflowApi.ts index 4aa550f..894ce14 100644 --- a/src/api/workflowApi.ts +++ b/src/api/workflowApi.ts @@ -86,6 +86,8 @@ export interface Automation2GraphNode { id: string; type: string; parameters?: Record; + inputPorts?: Array<{ name: string; schema: string; accepts?: string[] }>; + outputPorts?: Array<{ name: string; schema: string }>; } export interface Automation2Connection { diff --git a/src/components/FlowEditor/editor/FlowCanvas.tsx b/src/components/FlowEditor/editor/FlowCanvas.tsx index 16e963e..469706f 100644 --- a/src/components/FlowEditor/editor/FlowCanvas.tsx +++ b/src/components/FlowEditor/editor/FlowCanvas.tsx @@ -21,6 +21,8 @@ export interface CanvasNode { inputs: number; outputs: number; parameters?: Record; + inputPorts?: Array<{ name: string; schema: string; accepts?: string[] }>; + outputPorts?: Array<{ name: string; schema: string }>; } export interface CanvasConnection { diff --git a/src/components/FlowEditor/index.ts b/src/components/FlowEditor/index.ts index 91f9e52..2605f3e 100644 --- a/src/components/FlowEditor/index.ts +++ b/src/components/FlowEditor/index.ts @@ -9,4 +9,4 @@ export { CanvasHeader } from './editor/CanvasHeader'; export * from './nodes/shared/utils'; export * from './nodes/shared/constants'; export * from './nodes/shared/graphUtils'; -export { getAcceptStringFromConfig } from './nodes/configs/UploadNodeConfig'; +export { getAcceptStringFromConfig } from './nodes/shared/utils'; diff --git a/src/components/FlowEditor/nodes/configs/AiNodeConfig.tsx b/src/components/FlowEditor/nodes/configs/AiNodeConfig.tsx deleted file mode 100644 index 22407b7..0000000 --- a/src/components/FlowEditor/nodes/configs/AiNodeConfig.tsx +++ /dev/null @@ -1,90 +0,0 @@ -/** - * AI node config - prompt, query, document options per node type. - * Prompt/query fields support static value or node reference (Data Picker). - */ - -import React from 'react'; -import type { NodeConfigRendererProps } from './types'; -import { DynamicValueField } from '../shared/DynamicValueField'; - -const AI_FIELD_CONFIG: Record = { - 'ai.prompt': [{ label: 'Prompt', key: 'prompt', type: 'textarea' }], - 'ai.webResearch': [{ label: 'Query', key: 'query', type: 'dynamic' }], - 'ai.summarizeDocument': [ - { label: 'Summary length', key: 'summaryLength', type: 'select', options: ['short', 'medium', 'long'] }, - ], - 'ai.translateDocument': [{ label: 'Target language', key: 'targetLanguage', type: 'input' }], - 'ai.convertDocument': [ - { label: 'Target format', key: 'targetFormat', type: 'select', options: ['pdf', 'docx', 'txt', 'md'] }, - ], - 'ai.generateDocument': [{ label: 'Prompt', key: 'prompt', type: 'dynamic' }], - 'ai.generateCode': [ - { label: 'Prompt', key: 'prompt', type: 'dynamic' }, - { label: 'Language', key: 'language', type: 'select', options: ['python', 'javascript', 'typescript', 'sql'] }, - ], -}; - -export const AiNodeConfig: React.FC = ({ params, updateParam, nodeType = 'ai.prompt' }) => { - const fields = AI_FIELD_CONFIG[nodeType] ?? AI_FIELD_CONFIG['ai.prompt']; - - return ( - <> - {fields.map((f) => { - if (f.type === 'dynamic') { - return ( - - ); - } - if (f.type === 'textarea') { - return ( -
- -