@vanira/sdk 0.0.27 → 0.0.29

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.
@@ -9,10 +9,10 @@ export interface ChatMessage {
9
9
  export declare class ChatService {
10
10
  static setChatUrl(url: string): void;
11
11
  static createChatProspect(prospectGroupId: string): Promise<string>;
12
- static fetchWelcomeMessage(agentId: string, prospectId: string, widgetId?: string): Promise<ChatMessage & {
12
+ static fetchWelcomeMessage(agentId: string, prospectId: string, widgetId?: string, pkKey?: string): Promise<ChatMessage & {
13
13
  chatId?: string;
14
14
  }>;
15
- static sendChatMessage(agentId: string, prospectId: string, message: string, chatId: string | null, onChunk: (text: string) => void, onWidget: (widget: any) => void, onDone: (newChatId: string | null) => void, widgetId?: string): Promise<void>;
15
+ static sendChatMessage(agentId: string, prospectId: string, message: string, chatId: string | null, onChunk: (text: string) => void, onWidget: (widget: any) => void, onDone: (newChatId: string | null) => void, widgetId?: string, pkKey?: string): Promise<void>;
16
16
  static listenForAdminReplies(inboxId: string, sender: string, onMessage: (content: string) => void): {
17
17
  close: () => void;
18
18
  };
@@ -75,7 +75,9 @@ export declare class WebRTCClient {
75
75
  */
76
76
  triggerActionInterrupt(): void;
77
77
  /**
78
- * Static helper to fetch ICE servers from Hasura
78
+ * Fetch active STUN/TURN ICE servers from the Vanira API.
79
+ * @param apiKey Your sk_live_* or pk_live_* key
80
+ * @param backendUrl Override the default backend URL (default: https://api.vanira.io)
79
81
  */
80
- static fetchIceServers(token: string, graphqlEndpoint?: string): Promise<RTCIceServer[]>;
82
+ static fetchIceServers(apiKey: string, backendUrl?: string): Promise<RTCIceServer[]>;
81
83
  }
@@ -1,5 +1,5 @@
1
1
  export interface IChatAdapter {
2
- sendMessage(text: string, agentId: string, prospectId: string, chatId: string | null, onResponse: (response: any) => void, onStream?: (text: string) => void): Promise<void>;
2
+ sendMessage(text: string, agentId: string, prospectId: string, chatId: string | null, onResponse: (response: any) => void, onStream?: (text: string) => void, onChatIdUpdate?: (newId: string) => void, widgetId?: string, pkKey?: string): Promise<void>;
3
3
  sendFile?(file: File): Promise<void>;
4
4
  likeDislike?(messageId: string, action: 'like' | 'dislike'): Promise<void>;
5
5
  }
@@ -1,7 +1,7 @@
1
1
  import { IChatAdapter } from '../abstraction/interfaces';
2
2
 
3
3
  export declare class VaniraChatAdapter implements IChatAdapter {
4
- sendMessage(text: string, agentId: string, prospectId: string, chatId: string | null, onResponse: (response: any) => void, onStream?: (text: string) => void, onChatIdUpdate?: (newId: string) => void, widgetId?: string): Promise<void>;
4
+ sendMessage(text: string, agentId: string, prospectId: string, chatId: string | null, onResponse: (response: any) => void, onStream?: (text: string) => void, onChatIdUpdate?: (newId: string) => void, widgetId?: string, pkKey?: string): Promise<void>;
5
5
  sendFile(file: File): Promise<void>;
6
6
  likeDislike(messageId: string, action: 'like' | 'dislike'): Promise<void>;
7
7
  }
@@ -18,6 +18,7 @@ export declare class VoiceOverlay {
18
18
  private connectingLabel;
19
19
  private connectedBadge;
20
20
  private errorLabel;
21
+ private giveItAMinuteLabel;
21
22
  private retryBtn;
22
23
  private timerEl;
23
24
  private transcriptionEl;