-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.d.ts
More file actions
37 lines (34 loc) · 1.1 KB
/
index.d.ts
File metadata and controls
37 lines (34 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
declare module '@chatterboxio/bot' {
export interface ChatterBoxConfig {
authorizationToken: string;
apiBaseUrl?: string;
wsBaseUrl?: string;
}
export interface SendBotOptions {
platform: string;
meeting_id: string;
meeting_password?: string;
bot_name?: string;
webhook_url?: string;
model?: string;
language?: string;
noTranscriptTimeoutSeconds?: number;
noParticipantsLeftTimeoutSeconds?: number;
}
export interface TemporaryTokenResponse {
token: string;
expiresIn: number;
}
export function ChatterBox(config: ChatterBoxConfig): {
sendBot: (options: SendBotOptions) => Promise<{ id: string }>;
getTemporaryToken: (expiresIn?: number) => Promise<TemporaryTokenResponse>;
connectSocket: (
sessionId: string,
callbacks: {
onMeetingStarted?: (data: any) => void;
onMeetingFinished?: (data: any) => void;
onTranscriptReceived?: (data: any) => void;
}
) => any;
};
}