@eloquentai/chat-sdk 0.30.24 → 0.31.0-dev

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.
@@ -7,6 +7,7 @@ export interface ChatData {
7
7
  messages: Message[];
8
8
  lastActivity?: number;
9
9
  isChatClosed?: boolean;
10
+ chatToken?: string | null;
10
11
  }
11
12
  /**
12
13
  * Hook to manage persistence of chat data, including conversation ID, user ID, last activity time, and messages.
@@ -16,7 +17,7 @@ export declare function usePersistence({ appId }: {
16
17
  appId: string;
17
18
  }): {
18
19
  isChatExpired: () => boolean;
19
- saveChatData: (conversationId: string, userId: string, messages: Message[], deviceId: string) => void;
20
+ saveChatData: (conversationId: string, userId: string, messages: Message[], deviceId: string, chatToken?: string | null) => void;
20
21
  clearChatData: () => void;
21
22
  getSavedChatData: () => ChatData;
22
23
  updateLastActivity: () => void;
@@ -16,6 +16,7 @@ export type UseRealtimeSocketOptions = {
16
16
  onRatingRequest?: () => void;
17
17
  onBreadcrumb?: () => void;
18
18
  fetchHistory: (chatId: string) => Promise<MessageResponse[]>;
19
+ getChatToken: () => string | null;
19
20
  backupPollingInterval?: number;
20
21
  };
21
22
  export type UseRealtimeSocketReturn = {
@@ -23,4 +24,4 @@ export type UseRealtimeSocketReturn = {
23
24
  disconnect: () => void;
24
25
  clearProcessedIds: () => void;
25
26
  };
26
- export declare function useRealtimeSocket({ chatSettings, chatId, messages, onMessage, onCognition, onCognitionComplete, onError, onChatClosed, onAgentCapturedUrl, onAgentTopic, onAgentSummary, onRatingRequest, onBreadcrumb, fetchHistory, backupPollingInterval, }: UseRealtimeSocketOptions): UseRealtimeSocketReturn;
27
+ export declare function useRealtimeSocket({ chatSettings, chatId, messages, onMessage, onCognition, onCognitionComplete, onError, onChatClosed, onAgentCapturedUrl, onAgentTopic, onAgentSummary, onRatingRequest, onBreadcrumb, fetchHistory, getChatToken, backupPollingInterval, }: UseRealtimeSocketOptions): UseRealtimeSocketReturn;
@@ -1,6 +1,6 @@
1
1
  import * as Oe from "react";
2
2
  import { version as Zu } from "react";
3
- import { g as Rp } from "./index-7er7goSm.js";
3
+ import { g as Rp } from "./index-DN5mGzHe.js";
4
4
  try {
5
5
  let e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "e912b1ab-8839-4e6c-90b8-c20d1854ba0f", e._sentryDebugIdIdentifier = "sentry-dbid-e912b1ab-8839-4e6c-90b8-c20d1854ba0f");
@@ -18790,4 +18790,4 @@ export {
18790
18790
  iR as wrapUseRoutesV7,
18791
18791
  ik as zodErrorsIntegration
18792
18792
  };
18793
- //# sourceMappingURL=index-ruZLsx1O.js.map
18793
+ //# sourceMappingURL=index-BuC_nOuO.js.map