@eloquentai/chat-sdk 0.24.0 → 0.25.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.
@@ -36,7 +36,8 @@ export interface UseChatReturn {
36
36
  * @param options The hook parameters
37
37
  * @returns The chat hook return type
38
38
  */
39
- export declare function useChat({ environment, appId, userId: initialUserId, userName: initialUserName, chatProps, isMobile: propIsMobile, initialOpen: propInitialOpen, proactiveMessageHideDelay, }: Readonly<Partial<UseChatProps> & {
39
+ export declare function useChat({ environment, apiUrl, appId, userId: initialUserId, userName: initialUserName, chatProps, isMobile: propIsMobile, initialOpen: propInitialOpen, proactiveMessageHideDelay, }: Readonly<Partial<UseChatProps> & {
40
40
  environment: "test" | "live";
41
+ apiUrl?: string;
41
42
  appId: string;
42
43
  }>): UseChatReturn;
@@ -2,6 +2,7 @@ import { Message } from '../../type';
2
2
  import { BootResponse, EloquentAiApiClient } from '../../lib/eloquent-ai-api-client';
3
3
  export interface UseSdkInitializationProps {
4
4
  environment: "test" | "live";
5
+ apiUrl?: string;
5
6
  appId: string;
6
7
  initialUserId?: string;
7
8
  initialUserName?: string;
@@ -23,4 +24,4 @@ export interface UseSdkInitializationReturn {
23
24
  * Hook to handle SDK initialization for the EloquentAI Chat SDK
24
25
  * Handles API client initialization, saved conversation restoration, and SDK boot
25
26
  */
26
- export declare function useSdkInitialization({ appId, initialUserId, initialUserName, }: UseSdkInitializationProps): UseSdkInitializationReturn;
27
+ export declare function useSdkInitialization({ apiUrl: apiUrlOverride, appId, initialUserId, initialUserName, }: UseSdkInitializationProps): UseSdkInitializationReturn;
@@ -1,4 +1,5 @@
1
1
  export declare enum ERROR_CODES {
2
+ NETWORK_ERROR = 0,
2
3
  MAINTENANCE_MODE = 5031,
3
4
  TECHNICAL_DIFFICULTIES = 5001
4
5
  }
@@ -5,8 +5,10 @@ export interface SdkError {
5
5
  }
6
6
  interface ErrorContextType {
7
7
  error: SdkError | null;
8
+ hideSdk: boolean;
8
9
  publishApiError: (error: ServerError) => void;
9
10
  publishError: (error: SdkError) => void;
11
+ publishNetworkError: () => void;
10
12
  clearError: () => void;
11
13
  }
12
14
  export declare const ErrorContext: import('react').Context<ErrorContextType>;