@elqnt/chat 1.0.21 → 2.0.0

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.
@@ -1,7 +1,5 @@
1
1
  import { ProductNameTS } from '@elqnt/types';
2
2
  import { ChatEvent } from '../models/index.js';
3
- import '@elqnt/kg';
4
- import '@elqnt/docs';
5
3
 
6
4
  type ConnectionState = "disconnected" | "connecting" | "connected" | "reconnecting";
7
5
  type TransportType = "websocket" | "sse";
@@ -1,8 +1,6 @@
1
1
  import { ChatMessage, ChatUser } from '../models/index.mjs';
2
2
  import { UseWebSocketChatBaseReturn, UseWebSocketChatBaseConfig } from './use-websocket-chat-base.mjs';
3
- import '@elqnt/kg';
4
3
  import '@elqnt/types';
5
- import '@elqnt/docs';
6
4
 
7
5
  interface UseWebSocketChatCustomerReturn extends UseWebSocketChatBaseReturn {
8
6
  title: string | undefined;
@@ -1,8 +1,6 @@
1
1
  import { ChatMessage, ChatUser } from '../models/index.js';
2
2
  import { UseWebSocketChatBaseReturn, UseWebSocketChatBaseConfig } from './use-websocket-chat-base.js';
3
- import '@elqnt/kg';
4
3
  import '@elqnt/types';
5
- import '@elqnt/docs';
6
4
 
7
5
  interface UseWebSocketChatCustomerReturn extends UseWebSocketChatBaseReturn {
8
6
  title: string | undefined;
package/dist/index.d.mts CHANGED
@@ -8,16 +8,28 @@ export { UseWebSocketChatCustomerConfig, useWebSocketChatCustomer } from './hook
8
8
  import { UseWebSocketChatAdminReturn } from './hooks/use-websocket-chat-admin.mjs';
9
9
  export { useWebSocketChatAdmin } from './hooks/use-websocket-chat-admin.mjs';
10
10
  export { ConnectionMetrics, ConnectionState, Logger, QueueConfig, RetryConfig, TransportType, UseWebSocketChatBaseConfig, UseWebSocketChatBaseReturn, WebSocketError, useWebSocketChatBase } from './hooks/use-websocket-chat-base.mjs';
11
- import '@elqnt/kg';
12
- import '@elqnt/docs';
13
11
 
14
12
  interface AdminChatInputProps {
13
+ /** User ID for sending messages */
14
+ userId?: string;
15
+ /** Organization ID for sending messages */
16
+ orgId?: string;
15
17
  onFileUpload?: (file: File) => Promise<string>;
16
18
  chatKey: string;
17
19
  }
18
20
  declare const AdminChatInput: React$1.FC<AdminChatInputProps>;
19
21
 
22
+ interface ChatHumanAgentUser {
23
+ id: string;
24
+ firstName?: string;
25
+ lastName?: string;
26
+ email: string;
27
+ }
20
28
  interface ChatHumanAgentActionsProps {
29
+ /** Current user info */
30
+ user?: ChatHumanAgentUser;
31
+ /** Organization ID */
32
+ orgId?: string;
21
33
  }
22
34
  declare const ChatHumanAgentActions: React$1.FC<ChatHumanAgentActionsProps>;
23
35
 
@@ -40,6 +52,10 @@ declare const AdminChatHeader: React$1.FC<AdminChatHeaderProps>;
40
52
  declare const ChatHeader: React$1.FC;
41
53
 
42
54
  interface ChatInputProps {
55
+ /** User ID for sending messages */
56
+ userId?: string;
57
+ /** Organization ID for sending messages */
58
+ orgId?: string;
43
59
  onFileUpload?: (file: File) => Promise<string>;
44
60
  }
45
61
  declare const ChatInput: React$1.FC<ChatInputProps>;
package/dist/index.d.ts CHANGED
@@ -8,16 +8,28 @@ export { UseWebSocketChatCustomerConfig, useWebSocketChatCustomer } from './hook
8
8
  import { UseWebSocketChatAdminReturn } from './hooks/use-websocket-chat-admin.js';
9
9
  export { useWebSocketChatAdmin } from './hooks/use-websocket-chat-admin.js';
10
10
  export { ConnectionMetrics, ConnectionState, Logger, QueueConfig, RetryConfig, TransportType, UseWebSocketChatBaseConfig, UseWebSocketChatBaseReturn, WebSocketError, useWebSocketChatBase } from './hooks/use-websocket-chat-base.js';
11
- import '@elqnt/kg';
12
- import '@elqnt/docs';
13
11
 
14
12
  interface AdminChatInputProps {
13
+ /** User ID for sending messages */
14
+ userId?: string;
15
+ /** Organization ID for sending messages */
16
+ orgId?: string;
15
17
  onFileUpload?: (file: File) => Promise<string>;
16
18
  chatKey: string;
17
19
  }
18
20
  declare const AdminChatInput: React$1.FC<AdminChatInputProps>;
19
21
 
22
+ interface ChatHumanAgentUser {
23
+ id: string;
24
+ firstName?: string;
25
+ lastName?: string;
26
+ email: string;
27
+ }
20
28
  interface ChatHumanAgentActionsProps {
29
+ /** Current user info */
30
+ user?: ChatHumanAgentUser;
31
+ /** Organization ID */
32
+ orgId?: string;
21
33
  }
22
34
  declare const ChatHumanAgentActions: React$1.FC<ChatHumanAgentActionsProps>;
23
35
 
@@ -40,6 +52,10 @@ declare const AdminChatHeader: React$1.FC<AdminChatHeaderProps>;
40
52
  declare const ChatHeader: React$1.FC;
41
53
 
42
54
  interface ChatInputProps {
55
+ /** User ID for sending messages */
56
+ userId?: string;
57
+ /** Organization ID for sending messages */
58
+ orgId?: string;
43
59
  onFileUpload?: (file: File) => Promise<string>;
44
60
  }
45
61
  declare const ChatInput: React$1.FC<ChatInputProps>;