@decido/discovery-studio 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,102 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import React$1 from 'react';
3
+ import { NodeProps } from '@xyflow/react';
4
+
5
+ interface DiscoveryStudioProps$1 {
6
+ gatewayStatus?: 'connected' | 'disconnected' | 'connecting';
7
+ activeProvider?: string;
8
+ }
9
+ declare const DiscoveryStudio: ({ gatewayStatus, activeProvider }: DiscoveryStudioProps$1) => react_jsx_runtime.JSX.Element;
10
+
11
+ interface SideExplorerProps {
12
+ selectedContact: string | null;
13
+ onSelectContact: (id: string) => void;
14
+ }
15
+ declare const SideExplorer: React$1.FC<SideExplorerProps>;
16
+
17
+ interface InspectorPanelProps {
18
+ selectedContact: string | null;
19
+ }
20
+ declare const InspectorPanel: React$1.FC<InspectorPanelProps>;
21
+
22
+ declare const AgentPanel: () => react_jsx_runtime.JSX.Element;
23
+
24
+ interface ChatTabProps {
25
+ selectedContact: string | null;
26
+ }
27
+ declare const ChatTab: React$1.FC<ChatTabProps>;
28
+
29
+ declare const FlowCanvasTab: () => react_jsx_runtime.JSX.Element;
30
+
31
+ declare const AnalyticsTab: () => react_jsx_runtime.JSX.Element;
32
+
33
+ declare const MessageNode: React$1.MemoExoticComponent<({ id, data, selected }: NodeProps) => react_jsx_runtime.JSX.Element>;
34
+
35
+ declare const BotActionNode: React$1.MemoExoticComponent<({ id, data, selected }: NodeProps) => react_jsx_runtime.JSX.Element>;
36
+
37
+ interface Conversation {
38
+ id: string;
39
+ name: string;
40
+ initials: string;
41
+ lastMessage: string;
42
+ time: string;
43
+ unread: number;
44
+ color: string;
45
+ }
46
+ interface AnalyticsData {
47
+ messagesToday: number;
48
+ responseTime: string;
49
+ conversionRate: string;
50
+ activeChats: number;
51
+ ordersViaWA: number;
52
+ escalations: number;
53
+ hourlyActivity: {
54
+ hour: string;
55
+ received: number;
56
+ sent: number;
57
+ }[];
58
+ intents: {
59
+ name: string;
60
+ count: number;
61
+ pct: number;
62
+ color: string;
63
+ }[];
64
+ }
65
+ interface FlowState {
66
+ nodes: any[];
67
+ edges: any[];
68
+ }
69
+ interface StudioState {
70
+ activeTab: 'chat' | 'flow' | 'analytics';
71
+ selectedContact: string | null;
72
+ explorerOpen: boolean;
73
+ inspectorOpen: boolean;
74
+ flow?: FlowState;
75
+ }
76
+ interface DiscoveryStudioProps {
77
+ /** JWT token for backend authentication */
78
+ apiKey?: string;
79
+ /** Base URL of the API (default: window.location.origin) */
80
+ apiBaseUrl?: string;
81
+ /** Visual theme */
82
+ theme?: 'dark' | 'light' | 'system';
83
+ /** Initially selected contact */
84
+ initialContact?: string;
85
+ /** Callback when user sends a message */
86
+ onSendMessage?: (contactId: string, message: string) => Promise<void>;
87
+ /** Callback when a flow is updated */
88
+ onFlowChange?: (nodes: any[], edges: any[]) => void;
89
+ /** Callback to save studio state */
90
+ onSave?: (state: StudioState) => Promise<void>;
91
+ /** External conversation data */
92
+ conversations?: Conversation[];
93
+ /** External analytics data */
94
+ analytics?: AnalyticsData;
95
+ /** Custom slot components */
96
+ slots?: {
97
+ headerRight?: React.ReactNode;
98
+ statusBarLeft?: React.ReactNode;
99
+ };
100
+ }
101
+
102
+ export { AgentPanel, type AnalyticsData, AnalyticsTab, BotActionNode, ChatTab, type Conversation, DiscoveryStudio, type DiscoveryStudioProps, FlowCanvasTab, type FlowState, InspectorPanel, MessageNode, SideExplorer, type StudioState };
@@ -0,0 +1,102 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import React$1 from 'react';
3
+ import { NodeProps } from '@xyflow/react';
4
+
5
+ interface DiscoveryStudioProps$1 {
6
+ gatewayStatus?: 'connected' | 'disconnected' | 'connecting';
7
+ activeProvider?: string;
8
+ }
9
+ declare const DiscoveryStudio: ({ gatewayStatus, activeProvider }: DiscoveryStudioProps$1) => react_jsx_runtime.JSX.Element;
10
+
11
+ interface SideExplorerProps {
12
+ selectedContact: string | null;
13
+ onSelectContact: (id: string) => void;
14
+ }
15
+ declare const SideExplorer: React$1.FC<SideExplorerProps>;
16
+
17
+ interface InspectorPanelProps {
18
+ selectedContact: string | null;
19
+ }
20
+ declare const InspectorPanel: React$1.FC<InspectorPanelProps>;
21
+
22
+ declare const AgentPanel: () => react_jsx_runtime.JSX.Element;
23
+
24
+ interface ChatTabProps {
25
+ selectedContact: string | null;
26
+ }
27
+ declare const ChatTab: React$1.FC<ChatTabProps>;
28
+
29
+ declare const FlowCanvasTab: () => react_jsx_runtime.JSX.Element;
30
+
31
+ declare const AnalyticsTab: () => react_jsx_runtime.JSX.Element;
32
+
33
+ declare const MessageNode: React$1.MemoExoticComponent<({ id, data, selected }: NodeProps) => react_jsx_runtime.JSX.Element>;
34
+
35
+ declare const BotActionNode: React$1.MemoExoticComponent<({ id, data, selected }: NodeProps) => react_jsx_runtime.JSX.Element>;
36
+
37
+ interface Conversation {
38
+ id: string;
39
+ name: string;
40
+ initials: string;
41
+ lastMessage: string;
42
+ time: string;
43
+ unread: number;
44
+ color: string;
45
+ }
46
+ interface AnalyticsData {
47
+ messagesToday: number;
48
+ responseTime: string;
49
+ conversionRate: string;
50
+ activeChats: number;
51
+ ordersViaWA: number;
52
+ escalations: number;
53
+ hourlyActivity: {
54
+ hour: string;
55
+ received: number;
56
+ sent: number;
57
+ }[];
58
+ intents: {
59
+ name: string;
60
+ count: number;
61
+ pct: number;
62
+ color: string;
63
+ }[];
64
+ }
65
+ interface FlowState {
66
+ nodes: any[];
67
+ edges: any[];
68
+ }
69
+ interface StudioState {
70
+ activeTab: 'chat' | 'flow' | 'analytics';
71
+ selectedContact: string | null;
72
+ explorerOpen: boolean;
73
+ inspectorOpen: boolean;
74
+ flow?: FlowState;
75
+ }
76
+ interface DiscoveryStudioProps {
77
+ /** JWT token for backend authentication */
78
+ apiKey?: string;
79
+ /** Base URL of the API (default: window.location.origin) */
80
+ apiBaseUrl?: string;
81
+ /** Visual theme */
82
+ theme?: 'dark' | 'light' | 'system';
83
+ /** Initially selected contact */
84
+ initialContact?: string;
85
+ /** Callback when user sends a message */
86
+ onSendMessage?: (contactId: string, message: string) => Promise<void>;
87
+ /** Callback when a flow is updated */
88
+ onFlowChange?: (nodes: any[], edges: any[]) => void;
89
+ /** Callback to save studio state */
90
+ onSave?: (state: StudioState) => Promise<void>;
91
+ /** External conversation data */
92
+ conversations?: Conversation[];
93
+ /** External analytics data */
94
+ analytics?: AnalyticsData;
95
+ /** Custom slot components */
96
+ slots?: {
97
+ headerRight?: React.ReactNode;
98
+ statusBarLeft?: React.ReactNode;
99
+ };
100
+ }
101
+
102
+ export { AgentPanel, type AnalyticsData, AnalyticsTab, BotActionNode, ChatTab, type Conversation, DiscoveryStudio, type DiscoveryStudioProps, FlowCanvasTab, type FlowState, InspectorPanel, MessageNode, SideExplorer, type StudioState };