@vanira/sdk 0.0.28 → 0.0.30

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
  };
@@ -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
  }