@apteva/apteva-kit 0.1.131 → 0.1.133
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.
- package/dist/index.d.mts +36 -1
- package/dist/index.d.ts +36 -1
- package/dist/index.js +293 -62
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +513 -282
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -259,6 +259,14 @@ declare const WIDGET_DEFINITIONS: {
|
|
|
259
259
|
};
|
|
260
260
|
type WidgetType = keyof typeof WIDGET_DEFINITIONS;
|
|
261
261
|
|
|
262
|
+
interface VoiceTranscriptEntry {
|
|
263
|
+
id: string;
|
|
264
|
+
role: 'user' | 'assistant' | 'system';
|
|
265
|
+
content: string;
|
|
266
|
+
partial: boolean;
|
|
267
|
+
timestamp: Date;
|
|
268
|
+
}
|
|
269
|
+
|
|
262
270
|
interface SuggestedPrompt {
|
|
263
271
|
text: string;
|
|
264
272
|
icon?: React.ReactNode;
|
|
@@ -402,6 +410,31 @@ interface ThreadsProps {
|
|
|
402
410
|
groupBy?: 'date' | 'agent' | 'none';
|
|
403
411
|
className?: string;
|
|
404
412
|
}
|
|
413
|
+
interface CallProps {
|
|
414
|
+
agentId?: string;
|
|
415
|
+
agentName?: string;
|
|
416
|
+
agentAvatarUrl?: string;
|
|
417
|
+
apiUrl: string;
|
|
418
|
+
apiKey?: string;
|
|
419
|
+
voiceProvider?: string;
|
|
420
|
+
voiceId?: string;
|
|
421
|
+
mediaMode?: 'voice' | 'video';
|
|
422
|
+
autoStart?: boolean;
|
|
423
|
+
showTranscript?: boolean;
|
|
424
|
+
maxTranscriptEntries?: number;
|
|
425
|
+
onCallStart?: () => void;
|
|
426
|
+
onCallEnd?: (summary: CallSummary) => void;
|
|
427
|
+
onTranscript?: (entry: VoiceTranscriptEntry) => void;
|
|
428
|
+
onError?: (error: Error) => void;
|
|
429
|
+
onMuteChange?: (muted: boolean) => void;
|
|
430
|
+
variant?: 'default' | 'compact' | 'fullscreen';
|
|
431
|
+
theme?: 'light' | 'dark' | 'auto';
|
|
432
|
+
className?: string;
|
|
433
|
+
}
|
|
434
|
+
interface CallSummary {
|
|
435
|
+
duration: number;
|
|
436
|
+
transcripts: VoiceTranscriptEntry[];
|
|
437
|
+
}
|
|
405
438
|
interface AptevaKitControl {
|
|
406
439
|
setThreadId: (threadId: string | null) => Promise<void>;
|
|
407
440
|
createThread: (metadata?: object) => Promise<string>;
|
|
@@ -431,6 +464,8 @@ interface ChatHandle {
|
|
|
431
464
|
}
|
|
432
465
|
declare const Chat: react.ForwardRefExoticComponent<ChatProps & react.RefAttributes<ChatHandle>>;
|
|
433
466
|
|
|
467
|
+
declare function Call({ agentName, agentAvatarUrl, apiUrl, apiKey, voiceProvider, voiceId, mediaMode, autoStart, showTranscript, maxTranscriptEntries, onCallStart, onCallEnd, onTranscript, onError, onMuteChange, variant, theme, className, }: CallProps): react_jsx_runtime.JSX.Element;
|
|
468
|
+
|
|
434
469
|
declare function Command({ agentId, command: initialCommand, context, autoExecute, allowInput, placeholder, submitButtonText, variant, useMock, planMode, onPlanModeChange, enableFileUpload, onStart, onProgress, onChunk, onComplete, onError, onFileUpload, onAction, loadingText, showProgress, enableStreaming, resultRenderer, className, }: CommandProps): react_jsx_runtime.JSX.Element;
|
|
435
470
|
|
|
436
471
|
declare function Prompt({ agentId, placeholder, initialValue, useMock, submitOn, debounceMs, minLength, maxLength, onSubmit, onResult, onChange, variant, showSuggestions, className, }: PromptProps): react_jsx_runtime.JSX.Element;
|
|
@@ -810,4 +845,4 @@ interface ApiMessage {
|
|
|
810
845
|
*/
|
|
811
846
|
declare function convertApiMessages(apiMessages: ApiMessage[]): Message[];
|
|
812
847
|
|
|
813
|
-
export { type Action, type ActionEvent, type ApiContentBlock, type ApiMessage, AptevaClient, type AptevaClientConfig, type AptevaKitControl, AutoInterface, type AutoInterfaceProps, Button, type ButtonGroupWidget, type ButtonWidget, Card, type CardWidget, type ChartWidget, Chat, type ChatHandle, type ChatMessage, type ChatProps, type ChatRequest, type ChatResponse, type ColumnsLayoutProps, Command, type CommandProps, type CommandResult, type FlowStep, type FlowWidget, type FormField, type FormWidget, type GalleryWidget, type ImageWidget, type InterfaceNode, InterfaceRenderer, InterfaceSkeleton, type InterfaceSpec, type InterfaceUpdate, Kpi, type KpiWidget, LayoutRenderer, type LayoutType, List, type ListItem, type ListWidget, LiveView, type LiveViewWidget, type MapWidget, type Message, type PageLayoutProps, PersistentWidgetPanel, Prompt, type PromptProps, type RowLayoutProps, type SendMessageParams, type SidebarLayoutProps, Spacer, type SpacerWidget, type StackLayoutProps, Stream, type StreamChunk, type StreamProps, type SuggestedPrompt, type TableColumn, type TableWidget, type TabsLayoutProps, TextBlock, type TextBlockWidget, type Thread, Threads, type ThreadsProps, type UseAptevaKitReturn, type Widget, Widgets, type WidgetsProps, applyUpdate, applyUpdates, aptevaClient, cn, containsInterface, convertApiMessages, findNode, generateCompactInterfaceContext, generateInterfaceContext, getThemeScript, mockMessages, mockThreads, mockWidgets, parseInterfaceFromText, parseUpdatesFromText, stripInterface, useInterfaceAI, useInterfaceState };
|
|
848
|
+
export { type Action, type ActionEvent, type ApiContentBlock, type ApiMessage, AptevaClient, type AptevaClientConfig, type AptevaKitControl, AutoInterface, type AutoInterfaceProps, Button, type ButtonGroupWidget, type ButtonWidget, Call, type CallProps, type CallSummary, Card, type CardWidget, type ChartWidget, Chat, type ChatHandle, type ChatMessage, type ChatProps, type ChatRequest, type ChatResponse, type ColumnsLayoutProps, Command, type CommandProps, type CommandResult, type FlowStep, type FlowWidget, type FormField, type FormWidget, type GalleryWidget, type ImageWidget, type InterfaceNode, InterfaceRenderer, InterfaceSkeleton, type InterfaceSpec, type InterfaceUpdate, Kpi, type KpiWidget, LayoutRenderer, type LayoutType, List, type ListItem, type ListWidget, LiveView, type LiveViewWidget, type MapWidget, type Message, type PageLayoutProps, PersistentWidgetPanel, Prompt, type PromptProps, type RowLayoutProps, type SendMessageParams, type SidebarLayoutProps, Spacer, type SpacerWidget, type StackLayoutProps, Stream, type StreamChunk, type StreamProps, type SuggestedPrompt, type TableColumn, type TableWidget, type TabsLayoutProps, TextBlock, type TextBlockWidget, type Thread, Threads, type ThreadsProps, type UseAptevaKitReturn, type Widget, Widgets, type WidgetsProps, applyUpdate, applyUpdates, aptevaClient, cn, containsInterface, convertApiMessages, findNode, generateCompactInterfaceContext, generateInterfaceContext, getThemeScript, mockMessages, mockThreads, mockWidgets, parseInterfaceFromText, parseUpdatesFromText, stripInterface, useInterfaceAI, useInterfaceState };
|
package/dist/index.d.ts
CHANGED
|
@@ -259,6 +259,14 @@ declare const WIDGET_DEFINITIONS: {
|
|
|
259
259
|
};
|
|
260
260
|
type WidgetType = keyof typeof WIDGET_DEFINITIONS;
|
|
261
261
|
|
|
262
|
+
interface VoiceTranscriptEntry {
|
|
263
|
+
id: string;
|
|
264
|
+
role: 'user' | 'assistant' | 'system';
|
|
265
|
+
content: string;
|
|
266
|
+
partial: boolean;
|
|
267
|
+
timestamp: Date;
|
|
268
|
+
}
|
|
269
|
+
|
|
262
270
|
interface SuggestedPrompt {
|
|
263
271
|
text: string;
|
|
264
272
|
icon?: React.ReactNode;
|
|
@@ -402,6 +410,31 @@ interface ThreadsProps {
|
|
|
402
410
|
groupBy?: 'date' | 'agent' | 'none';
|
|
403
411
|
className?: string;
|
|
404
412
|
}
|
|
413
|
+
interface CallProps {
|
|
414
|
+
agentId?: string;
|
|
415
|
+
agentName?: string;
|
|
416
|
+
agentAvatarUrl?: string;
|
|
417
|
+
apiUrl: string;
|
|
418
|
+
apiKey?: string;
|
|
419
|
+
voiceProvider?: string;
|
|
420
|
+
voiceId?: string;
|
|
421
|
+
mediaMode?: 'voice' | 'video';
|
|
422
|
+
autoStart?: boolean;
|
|
423
|
+
showTranscript?: boolean;
|
|
424
|
+
maxTranscriptEntries?: number;
|
|
425
|
+
onCallStart?: () => void;
|
|
426
|
+
onCallEnd?: (summary: CallSummary) => void;
|
|
427
|
+
onTranscript?: (entry: VoiceTranscriptEntry) => void;
|
|
428
|
+
onError?: (error: Error) => void;
|
|
429
|
+
onMuteChange?: (muted: boolean) => void;
|
|
430
|
+
variant?: 'default' | 'compact' | 'fullscreen';
|
|
431
|
+
theme?: 'light' | 'dark' | 'auto';
|
|
432
|
+
className?: string;
|
|
433
|
+
}
|
|
434
|
+
interface CallSummary {
|
|
435
|
+
duration: number;
|
|
436
|
+
transcripts: VoiceTranscriptEntry[];
|
|
437
|
+
}
|
|
405
438
|
interface AptevaKitControl {
|
|
406
439
|
setThreadId: (threadId: string | null) => Promise<void>;
|
|
407
440
|
createThread: (metadata?: object) => Promise<string>;
|
|
@@ -431,6 +464,8 @@ interface ChatHandle {
|
|
|
431
464
|
}
|
|
432
465
|
declare const Chat: react.ForwardRefExoticComponent<ChatProps & react.RefAttributes<ChatHandle>>;
|
|
433
466
|
|
|
467
|
+
declare function Call({ agentName, agentAvatarUrl, apiUrl, apiKey, voiceProvider, voiceId, mediaMode, autoStart, showTranscript, maxTranscriptEntries, onCallStart, onCallEnd, onTranscript, onError, onMuteChange, variant, theme, className, }: CallProps): react_jsx_runtime.JSX.Element;
|
|
468
|
+
|
|
434
469
|
declare function Command({ agentId, command: initialCommand, context, autoExecute, allowInput, placeholder, submitButtonText, variant, useMock, planMode, onPlanModeChange, enableFileUpload, onStart, onProgress, onChunk, onComplete, onError, onFileUpload, onAction, loadingText, showProgress, enableStreaming, resultRenderer, className, }: CommandProps): react_jsx_runtime.JSX.Element;
|
|
435
470
|
|
|
436
471
|
declare function Prompt({ agentId, placeholder, initialValue, useMock, submitOn, debounceMs, minLength, maxLength, onSubmit, onResult, onChange, variant, showSuggestions, className, }: PromptProps): react_jsx_runtime.JSX.Element;
|
|
@@ -810,4 +845,4 @@ interface ApiMessage {
|
|
|
810
845
|
*/
|
|
811
846
|
declare function convertApiMessages(apiMessages: ApiMessage[]): Message[];
|
|
812
847
|
|
|
813
|
-
export { type Action, type ActionEvent, type ApiContentBlock, type ApiMessage, AptevaClient, type AptevaClientConfig, type AptevaKitControl, AutoInterface, type AutoInterfaceProps, Button, type ButtonGroupWidget, type ButtonWidget, Card, type CardWidget, type ChartWidget, Chat, type ChatHandle, type ChatMessage, type ChatProps, type ChatRequest, type ChatResponse, type ColumnsLayoutProps, Command, type CommandProps, type CommandResult, type FlowStep, type FlowWidget, type FormField, type FormWidget, type GalleryWidget, type ImageWidget, type InterfaceNode, InterfaceRenderer, InterfaceSkeleton, type InterfaceSpec, type InterfaceUpdate, Kpi, type KpiWidget, LayoutRenderer, type LayoutType, List, type ListItem, type ListWidget, LiveView, type LiveViewWidget, type MapWidget, type Message, type PageLayoutProps, PersistentWidgetPanel, Prompt, type PromptProps, type RowLayoutProps, type SendMessageParams, type SidebarLayoutProps, Spacer, type SpacerWidget, type StackLayoutProps, Stream, type StreamChunk, type StreamProps, type SuggestedPrompt, type TableColumn, type TableWidget, type TabsLayoutProps, TextBlock, type TextBlockWidget, type Thread, Threads, type ThreadsProps, type UseAptevaKitReturn, type Widget, Widgets, type WidgetsProps, applyUpdate, applyUpdates, aptevaClient, cn, containsInterface, convertApiMessages, findNode, generateCompactInterfaceContext, generateInterfaceContext, getThemeScript, mockMessages, mockThreads, mockWidgets, parseInterfaceFromText, parseUpdatesFromText, stripInterface, useInterfaceAI, useInterfaceState };
|
|
848
|
+
export { type Action, type ActionEvent, type ApiContentBlock, type ApiMessage, AptevaClient, type AptevaClientConfig, type AptevaKitControl, AutoInterface, type AutoInterfaceProps, Button, type ButtonGroupWidget, type ButtonWidget, Call, type CallProps, type CallSummary, Card, type CardWidget, type ChartWidget, Chat, type ChatHandle, type ChatMessage, type ChatProps, type ChatRequest, type ChatResponse, type ColumnsLayoutProps, Command, type CommandProps, type CommandResult, type FlowStep, type FlowWidget, type FormField, type FormWidget, type GalleryWidget, type ImageWidget, type InterfaceNode, InterfaceRenderer, InterfaceSkeleton, type InterfaceSpec, type InterfaceUpdate, Kpi, type KpiWidget, LayoutRenderer, type LayoutType, List, type ListItem, type ListWidget, LiveView, type LiveViewWidget, type MapWidget, type Message, type PageLayoutProps, PersistentWidgetPanel, Prompt, type PromptProps, type RowLayoutProps, type SendMessageParams, type SidebarLayoutProps, Spacer, type SpacerWidget, type StackLayoutProps, Stream, type StreamChunk, type StreamProps, type SuggestedPrompt, type TableColumn, type TableWidget, type TabsLayoutProps, TextBlock, type TextBlockWidget, type Thread, Threads, type ThreadsProps, type UseAptevaKitReturn, type Widget, Widgets, type WidgetsProps, applyUpdate, applyUpdates, aptevaClient, cn, containsInterface, convertApiMessages, findNode, generateCompactInterfaceContext, generateInterfaceContext, getThemeScript, mockMessages, mockThreads, mockWidgets, parseInterfaceFromText, parseUpdatesFromText, stripInterface, useInterfaceAI, useInterfaceState };
|