@voxket-ai/voxket-live 1.0.17
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/LICENSE +21 -0
- package/README.md +54 -0
- package/dist/App.d.ts +21 -0
- package/dist/components/alert-toast.d.ts +7 -0
- package/dist/components/livekit/agent-control-bar/agent-control-bar.d.ts +18 -0
- package/dist/components/livekit/agent-control-bar/hooks/use-agent-control-bar.d.ts +28 -0
- package/dist/components/livekit/agent-control-bar/hooks/use-publish-permissions.d.ts +7 -0
- package/dist/components/livekit/agent-tile.d.ts +8 -0
- package/dist/components/livekit/avatar-tile.d.ts +7 -0
- package/dist/components/livekit/chat/chat-entry.d.ts +9 -0
- package/dist/components/livekit/chat/chat-input.d.ts +6 -0
- package/dist/components/livekit/chat/chat-message-view.d.ts +8 -0
- package/dist/components/livekit/chat/hooks/utils.d.ts +9 -0
- package/dist/components/livekit/device-select.d.ts +14 -0
- package/dist/components/livekit/media-tiles.d.ts +8 -0
- package/dist/components/livekit/track-toggle.d.ts +8 -0
- package/dist/components/livekit/video-tile.d.ts +3 -0
- package/dist/components/session-view.d.ts +14 -0
- package/dist/components/ui/alert.d.ts +9 -0
- package/dist/components/ui/button.d.ts +10 -0
- package/dist/components/ui/select.d.ts +15 -0
- package/dist/components/ui/sonner.d.ts +3 -0
- package/dist/components/ui/toggle.d.ts +9 -0
- package/dist/components/welcome.d.ts +14 -0
- package/dist/components/widget.d.ts +24 -0
- package/dist/hooks/useChatAndTranscription.d.ts +5 -0
- package/dist/hooks/useConnectionDetails.d.ts +22 -0
- package/dist/hooks/useDebug.d.ts +4 -0
- package/dist/index.cjs +188 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +36620 -0
- package/dist/lib/types.d.ts +32 -0
- package/dist/lib/utils.d.ts +7 -0
- package/dist/main.d.ts +1 -0
- package/dist/styles.d.ts +10 -0
- package/dist/vite.svg +1 -0
- package/package.json +86 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Shashank Sanket
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# React + TypeScript + Vite
|
|
2
|
+
|
|
3
|
+
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
|
|
4
|
+
|
|
5
|
+
Currently, two official plugins are available:
|
|
6
|
+
|
|
7
|
+
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh
|
|
8
|
+
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
|
|
9
|
+
|
|
10
|
+
## Expanding the ESLint configuration
|
|
11
|
+
|
|
12
|
+
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
|
|
13
|
+
|
|
14
|
+
```js
|
|
15
|
+
export default tseslint.config({
|
|
16
|
+
extends: [
|
|
17
|
+
// Remove ...tseslint.configs.recommended and replace with this
|
|
18
|
+
...tseslint.configs.recommendedTypeChecked,
|
|
19
|
+
// Alternatively, use this for stricter rules
|
|
20
|
+
...tseslint.configs.strictTypeChecked,
|
|
21
|
+
// Optionally, add this for stylistic rules
|
|
22
|
+
...tseslint.configs.stylisticTypeChecked,
|
|
23
|
+
],
|
|
24
|
+
languageOptions: {
|
|
25
|
+
// other options...
|
|
26
|
+
parserOptions: {
|
|
27
|
+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
28
|
+
tsconfigRootDir: import.meta.dirname,
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
})
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
|
|
35
|
+
|
|
36
|
+
```js
|
|
37
|
+
// eslint.config.js
|
|
38
|
+
import reactX from 'eslint-plugin-react-x'
|
|
39
|
+
import reactDom from 'eslint-plugin-react-dom'
|
|
40
|
+
|
|
41
|
+
export default tseslint.config({
|
|
42
|
+
plugins: {
|
|
43
|
+
// Add the react-x and react-dom plugins
|
|
44
|
+
'react-x': reactX,
|
|
45
|
+
'react-dom': reactDom,
|
|
46
|
+
},
|
|
47
|
+
rules: {
|
|
48
|
+
// other rules...
|
|
49
|
+
// Enable its recommended typescript rules
|
|
50
|
+
...reactX.configs['recommended-typescript'].rules,
|
|
51
|
+
...reactDom.configs.recommended.rules,
|
|
52
|
+
},
|
|
53
|
+
})
|
|
54
|
+
```
|
package/dist/App.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { defaultWidgetStyles } from './styles';
|
|
2
|
+
declare function App({ agentId, participantName, baseUrl, appSecret, appId, className, styles, prompts, statusMessage, welcomeTitle, welcomeSubTitle }: {
|
|
3
|
+
agentId: string;
|
|
4
|
+
participantName: string;
|
|
5
|
+
baseUrl: string;
|
|
6
|
+
appSecret: string;
|
|
7
|
+
appId: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
styles?: typeof defaultWidgetStyles;
|
|
10
|
+
prompts?: string[];
|
|
11
|
+
statusMessage?: string;
|
|
12
|
+
welcomeTitle?: string;
|
|
13
|
+
welcomeSubTitle?: string;
|
|
14
|
+
width?: string;
|
|
15
|
+
height?: string;
|
|
16
|
+
loadingText?: string;
|
|
17
|
+
suportsChatInput?: boolean;
|
|
18
|
+
suportsVideoInput?: boolean;
|
|
19
|
+
suportsScreenShare?: boolean;
|
|
20
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export default App;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Track } from 'livekit-client';
|
|
2
|
+
import { AppConfig } from '../../../lib/types';
|
|
3
|
+
import { UseAgentControlBarProps } from './hooks/use-agent-control-bar';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
export interface AgentControlBarProps extends React.HTMLAttributes<HTMLDivElement>, UseAgentControlBarProps {
|
|
6
|
+
capabilities: Pick<AppConfig, 'suportsChatInput' | 'suportsVideoInput' | 'suportsScreenShare'>;
|
|
7
|
+
onChatOpenChange?: (open: boolean) => void;
|
|
8
|
+
onSendMessage?: (message: string) => Promise<void>;
|
|
9
|
+
onDisconnect?: () => void;
|
|
10
|
+
onDeviceError?: (error: {
|
|
11
|
+
source: Track.Source;
|
|
12
|
+
error: Error;
|
|
13
|
+
}) => void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* A control bar specifically designed for voice assistant interfaces
|
|
17
|
+
*/
|
|
18
|
+
export declare function AgentControlBar({ controls, saveUserChoices, capabilities, className, onSendMessage, onChatOpenChange, onDisconnect, onDeviceError, ...props }: AgentControlBarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Track } from 'livekit-client';
|
|
2
|
+
import { TrackReferenceOrPlaceholder, useTrackToggle } from '@livekit/components-react';
|
|
3
|
+
export interface ControlBarControls {
|
|
4
|
+
microphone?: boolean;
|
|
5
|
+
screenShare?: boolean;
|
|
6
|
+
chat?: boolean;
|
|
7
|
+
camera?: boolean;
|
|
8
|
+
leave?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface UseAgentControlBarProps {
|
|
11
|
+
controls?: ControlBarControls;
|
|
12
|
+
saveUserChoices?: boolean;
|
|
13
|
+
onDeviceError?: (error: {
|
|
14
|
+
source: Track.Source;
|
|
15
|
+
error: Error;
|
|
16
|
+
}) => void;
|
|
17
|
+
}
|
|
18
|
+
export interface UseAgentControlBarReturn {
|
|
19
|
+
micTrackRef: TrackReferenceOrPlaceholder;
|
|
20
|
+
visibleControls: ControlBarControls;
|
|
21
|
+
microphoneToggle: ReturnType<typeof useTrackToggle<Track.Source.Microphone>>;
|
|
22
|
+
cameraToggle: ReturnType<typeof useTrackToggle<Track.Source.Camera>>;
|
|
23
|
+
screenShareToggle: ReturnType<typeof useTrackToggle<Track.Source.ScreenShare>>;
|
|
24
|
+
handleDisconnect: () => void;
|
|
25
|
+
handleAudioDeviceChange: (deviceId: string) => void;
|
|
26
|
+
handleVideoDeviceChange: (deviceId: string) => void;
|
|
27
|
+
}
|
|
28
|
+
export declare function useAgentControlBar(props?: UseAgentControlBarProps): UseAgentControlBarReturn;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AgentState, TrackReference } from '@livekit/components-react';
|
|
2
|
+
interface AgentAudioTileProps {
|
|
3
|
+
state: AgentState;
|
|
4
|
+
audioTrack: TrackReference;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const AgentTile: ({ state, audioTrack, className, ref, }: React.ComponentProps<"div"> & AgentAudioTileProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TrackReference } from '@livekit/components-react';
|
|
2
|
+
interface AgentAudioTileProps {
|
|
3
|
+
videoTrack: TrackReference;
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const AvatarTile: ({ videoTrack, className, ref, }: React.ComponentProps<"div"> & AgentAudioTileProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MessageFormatter, ReceivedChatMessage } from '@livekit/components-react';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export interface ChatEntryProps extends React.HTMLAttributes<HTMLLIElement> {
|
|
4
|
+
entry: ReceivedChatMessage;
|
|
5
|
+
hideTimestamp?: boolean;
|
|
6
|
+
messageFormatter?: MessageFormatter;
|
|
7
|
+
participantName?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const ChatEntry: ({ entry, messageFormatter, className, participantName, ...props }: ChatEntryProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
interface ChatInputProps extends React.HTMLAttributes<HTMLFormElement> {
|
|
2
|
+
onSend?: (message: string) => void;
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare function ChatInput({ onSend, className, disabled, ...props }: ChatInputProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
export declare function useAutoScroll(scrollContentContainerRef: RefObject<Element | null>): void;
|
|
3
|
+
interface ChatProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const ChatMessageView: ({ className, children, ...props }: ChatProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MessageFormatter, ReceivedChatMessage } from '@livekit/components-react';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export declare const useChatMessage: (entry: ReceivedChatMessage, messageFormatter?: MessageFormatter) => {
|
|
4
|
+
message: React.ReactNode;
|
|
5
|
+
hasBeenEdited: boolean;
|
|
6
|
+
time: Date;
|
|
7
|
+
locale: string;
|
|
8
|
+
name: string | undefined;
|
|
9
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { LocalAudioTrack, LocalVideoTrack } from 'livekit-client';
|
|
2
|
+
import { SelectTrigger } from '../../components/ui/select';
|
|
3
|
+
type DeviceSelectProps = React.ComponentProps<typeof SelectTrigger> & {
|
|
4
|
+
kind: MediaDeviceKind;
|
|
5
|
+
track?: LocalAudioTrack | LocalVideoTrack | undefined;
|
|
6
|
+
requestPermissions?: boolean;
|
|
7
|
+
onError?: (error: Error) => void;
|
|
8
|
+
initialSelection?: string;
|
|
9
|
+
onActiveDeviceChange?: (deviceId: string) => void;
|
|
10
|
+
onDeviceListChange?: (devices: MediaDeviceInfo[]) => void;
|
|
11
|
+
variant?: 'default' | 'small';
|
|
12
|
+
};
|
|
13
|
+
export declare function DeviceSelect({ kind, track, requestPermissions, onError, ...props }: DeviceSelectProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Track } from 'livekit-client';
|
|
2
|
+
import { TrackReference } from '@livekit/components-react';
|
|
3
|
+
export declare function useLocalTrackRef(source: Track.Source): TrackReference | undefined;
|
|
4
|
+
interface MediaTilesProps {
|
|
5
|
+
chatOpen: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function MediaTiles({ chatOpen }: MediaTilesProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { useTrackToggle } from '@livekit/components-react';
|
|
2
|
+
import { Toggle } from '../../components/ui/toggle';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
export type TrackToggleProps = React.ComponentProps<typeof Toggle> & {
|
|
5
|
+
source: Parameters<typeof useTrackToggle>[0]['source'];
|
|
6
|
+
pending?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare function TrackToggle({ source, pressed, pending, className, ...props }: TrackToggleProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface SessionViewProps {
|
|
3
|
+
disabled: boolean;
|
|
4
|
+
capabilities: {
|
|
5
|
+
suportsChatInput: boolean;
|
|
6
|
+
suportsVideoInput: boolean;
|
|
7
|
+
suportsScreenShare: boolean;
|
|
8
|
+
};
|
|
9
|
+
sessionStarted: boolean;
|
|
10
|
+
participantName: string;
|
|
11
|
+
loadingText?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const SessionView: ({ disabled, capabilities, sessionStarted, ref, participantName, loadingText, }: React.ComponentProps<"div"> & SessionViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const alertVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "destructive" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
6
|
+
declare function Alert({ className, variant, ...props }: React.ComponentProps<'div'> & VariantProps<typeof alertVariants>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function AlertTitle({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function AlertDescription({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { Alert, AlertTitle, AlertDescription };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const buttonVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "destructive" | "link" | "outline" | "primary" | "secondary" | "ghost" | null | undefined;
|
|
5
|
+
size?: "default" | "icon" | "sm" | "lg" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
7
|
+
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
3
|
+
declare function Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function SelectTrigger({ className, size, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
|
|
7
|
+
size?: 'sm' | 'default';
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function SelectContent({ className, children, position, ...props }: React.ComponentProps<typeof SelectPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function SelectItem({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function SelectSeparator({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function SelectScrollDownButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
4
|
+
declare const toggleVariants: (props?: ({
|
|
5
|
+
variant?: "default" | "outline" | "primary" | "secondary" | null | undefined;
|
|
6
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
7
|
+
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
8
|
+
declare function Toggle({ className, variant, size, ...props }: React.ComponentProps<typeof TogglePrimitive.Root> & VariantProps<typeof toggleVariants>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { Toggle, toggleVariants };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface WelcomeProps {
|
|
2
|
+
disabled: boolean;
|
|
3
|
+
onStartCall: () => void;
|
|
4
|
+
agentId: string;
|
|
5
|
+
participantName: string;
|
|
6
|
+
onAgentIdChange: (value: string) => void;
|
|
7
|
+
onParticipantNameChange: (value: string) => void;
|
|
8
|
+
prompts?: string[];
|
|
9
|
+
statusMessage?: string;
|
|
10
|
+
title?: string;
|
|
11
|
+
subTitle?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const Welcome: ({ disabled, onStartCall, prompts, statusMessage, title, subTitle, }: WelcomeProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface WidgetProps {
|
|
2
|
+
agentId: string;
|
|
3
|
+
participantName?: string;
|
|
4
|
+
baseUrl: string;
|
|
5
|
+
appSecret: string;
|
|
6
|
+
appId: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
prompts?: string[];
|
|
9
|
+
statusMessage?: string;
|
|
10
|
+
welcomeTitle?: string;
|
|
11
|
+
welcomeSubTitle?: string;
|
|
12
|
+
width?: string;
|
|
13
|
+
height?: string;
|
|
14
|
+
loadingText?: string;
|
|
15
|
+
suportsChatInput?: boolean;
|
|
16
|
+
suportsVideoInput?: boolean;
|
|
17
|
+
suportsScreenShare?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export default function Widget(props: WidgetProps & {
|
|
20
|
+
prompts?: string[];
|
|
21
|
+
statusMessage?: string;
|
|
22
|
+
welcomeTitle?: string;
|
|
23
|
+
welcomeSubTitle?: string;
|
|
24
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
interface ConnectionDetails {
|
|
2
|
+
serverUrl: string;
|
|
3
|
+
participantToken: string;
|
|
4
|
+
}
|
|
5
|
+
interface UseConnectionDetailsResult {
|
|
6
|
+
connectionDetails: ConnectionDetails | null;
|
|
7
|
+
loading: boolean;
|
|
8
|
+
error: string | null;
|
|
9
|
+
fetchConnectionDetails: () => void;
|
|
10
|
+
}
|
|
11
|
+
interface UseConnectionDetailsArgs {
|
|
12
|
+
appId: string;
|
|
13
|
+
appSecret: string;
|
|
14
|
+
agentId: string;
|
|
15
|
+
participantName: string;
|
|
16
|
+
participantMetadata: Record<string, any>;
|
|
17
|
+
baseUrl: string;
|
|
18
|
+
}
|
|
19
|
+
export declare function useConnectionDetails({ appId, appSecret, agentId, participantName, participantMetadata, baseUrl }: UseConnectionDetailsArgs): UseConnectionDetailsResult & {
|
|
20
|
+
resetConnectionDetails: () => void;
|
|
21
|
+
};
|
|
22
|
+
export {};
|