@elqnt/chat 2.0.8 → 3.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.
- package/README.md +386 -0
- package/dist/api/index.d.mts +250 -8
- package/dist/api/index.d.ts +250 -8
- package/dist/api/index.js +115 -0
- package/dist/api/index.js.map +1 -1
- package/dist/api/index.mjs +109 -0
- package/dist/api/index.mjs.map +1 -1
- package/dist/hooks/index.d.mts +78 -0
- package/dist/hooks/index.d.ts +78 -0
- package/dist/hooks/index.js +709 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/index.mjs +683 -0
- package/dist/hooks/index.mjs.map +1 -0
- package/dist/index.d.mts +4 -109
- package/dist/index.d.ts +4 -109
- package/dist/index.js +699 -2039
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +690 -2016
- package/dist/index.mjs.map +1 -1
- package/dist/models/index.d.mts +76 -6
- package/dist/models/index.d.ts +76 -6
- package/dist/models/index.js +21 -0
- package/dist/models/index.js.map +1 -1
- package/dist/models/index.mjs +14 -0
- package/dist/models/index.mjs.map +1 -1
- package/dist/transport/index.d.mts +243 -0
- package/dist/transport/index.d.ts +243 -0
- package/dist/transport/index.js +875 -0
- package/dist/transport/index.js.map +1 -0
- package/dist/transport/index.mjs +843 -0
- package/dist/transport/index.mjs.map +1 -0
- package/dist/types-BB5nRdZs.d.mts +222 -0
- package/dist/types-CNvuxtcv.d.ts +222 -0
- package/package.json +20 -38
- package/dist/hooks/use-websocket-chat-admin.d.mts +0 -17
- package/dist/hooks/use-websocket-chat-admin.d.ts +0 -17
- package/dist/hooks/use-websocket-chat-admin.js +0 -1196
- package/dist/hooks/use-websocket-chat-admin.js.map +0 -1
- package/dist/hooks/use-websocket-chat-admin.mjs +0 -1172
- package/dist/hooks/use-websocket-chat-admin.mjs.map +0 -1
- package/dist/hooks/use-websocket-chat-base.d.mts +0 -81
- package/dist/hooks/use-websocket-chat-base.d.ts +0 -81
- package/dist/hooks/use-websocket-chat-base.js +0 -1025
- package/dist/hooks/use-websocket-chat-base.js.map +0 -1
- package/dist/hooks/use-websocket-chat-base.mjs +0 -1001
- package/dist/hooks/use-websocket-chat-base.mjs.map +0 -1
- package/dist/hooks/use-websocket-chat-customer.d.mts +0 -24
- package/dist/hooks/use-websocket-chat-customer.d.ts +0 -24
- package/dist/hooks/use-websocket-chat-customer.js +0 -1092
- package/dist/hooks/use-websocket-chat-customer.js.map +0 -1
- package/dist/hooks/use-websocket-chat-customer.mjs +0 -1068
- package/dist/hooks/use-websocket-chat-customer.mjs.map +0 -1
package/package.json
CHANGED
|
@@ -1,40 +1,35 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elqnt/chat",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"description": "Platform-agnostic chat SDK for React and React Native",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
10
11
|
"import": "./dist/index.mjs",
|
|
11
|
-
"require": "./dist/index.js"
|
|
12
|
-
"types": "./dist/index.d.ts"
|
|
12
|
+
"require": "./dist/index.js"
|
|
13
13
|
},
|
|
14
|
-
"./hooks
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
14
|
+
"./hooks": {
|
|
15
|
+
"types": "./dist/hooks/index.d.ts",
|
|
16
|
+
"import": "./dist/hooks/index.mjs",
|
|
17
|
+
"require": "./dist/hooks/index.js"
|
|
18
18
|
},
|
|
19
|
-
"./
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
},
|
|
24
|
-
"./hooks/use-websocket-chat-customer": {
|
|
25
|
-
"import": "./dist/hooks/use-websocket-chat-customer.mjs",
|
|
26
|
-
"require": "./dist/hooks/use-websocket-chat-customer.js",
|
|
27
|
-
"types": "./dist/hooks/use-websocket-chat-customer.d.ts"
|
|
19
|
+
"./api": {
|
|
20
|
+
"types": "./dist/api/index.d.ts",
|
|
21
|
+
"import": "./dist/api/index.mjs",
|
|
22
|
+
"require": "./dist/api/index.js"
|
|
28
23
|
},
|
|
29
24
|
"./models": {
|
|
25
|
+
"types": "./dist/models/index.d.ts",
|
|
30
26
|
"import": "./dist/models/index.mjs",
|
|
31
|
-
"require": "./dist/models/index.js"
|
|
32
|
-
"types": "./dist/models/index.d.ts"
|
|
27
|
+
"require": "./dist/models/index.js"
|
|
33
28
|
},
|
|
34
|
-
"./
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
29
|
+
"./transport": {
|
|
30
|
+
"types": "./dist/transport/index.d.ts",
|
|
31
|
+
"import": "./dist/transport/index.mjs",
|
|
32
|
+
"require": "./dist/transport/index.js"
|
|
38
33
|
}
|
|
39
34
|
},
|
|
40
35
|
"files": [
|
|
@@ -46,28 +41,15 @@
|
|
|
46
41
|
"directory": "packages/chat"
|
|
47
42
|
},
|
|
48
43
|
"dependencies": {
|
|
49
|
-
"date-fns": "^4.1.0",
|
|
50
|
-
"ksuid": "^3.0.0",
|
|
51
|
-
"lucide-react": "^0.483.0",
|
|
52
44
|
"@elqnt/api-client": "1.0.3",
|
|
53
|
-
"@elqnt/
|
|
54
|
-
"@elqnt/types": "2.0.9",
|
|
55
|
-
"@elqnt/kg": "2.1.1"
|
|
45
|
+
"@elqnt/types": "2.0.9"
|
|
56
46
|
},
|
|
57
47
|
"peerDependencies": {
|
|
58
|
-
"
|
|
59
|
-
"react": "^18.0.0 || ^19.0.0",
|
|
60
|
-
"react-markdown": "^9.0.0 || ^10.0.0",
|
|
61
|
-
"react-redux": "^9.0.0",
|
|
62
|
-
"remark-gfm": "^4.0.0 || ^5.0.0"
|
|
48
|
+
"react": "^18.0.0 || ^19.0.0"
|
|
63
49
|
},
|
|
64
50
|
"devDependencies": {
|
|
65
|
-
"@reduxjs/toolkit": "^2.3.0",
|
|
66
51
|
"@types/react": "^19.0.0",
|
|
67
52
|
"react": "^19.0.0",
|
|
68
|
-
"react-markdown": "^9.0.0",
|
|
69
|
-
"react-redux": "^9.1.2",
|
|
70
|
-
"remark-gfm": "^4.0.0",
|
|
71
53
|
"tsup": "^8.0.0",
|
|
72
54
|
"typescript": "^5.0.0"
|
|
73
55
|
},
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Chat, ChatUser } from '../models/index.mjs';
|
|
2
|
-
import { UseWebSocketChatBaseReturn, UseWebSocketChatBaseConfig } from './use-websocket-chat-base.mjs';
|
|
3
|
-
import '@elqnt/kg';
|
|
4
|
-
import '@elqnt/types';
|
|
5
|
-
import '@elqnt/docs';
|
|
6
|
-
|
|
7
|
-
interface UseWebSocketChatAdminReturn extends UseWebSocketChatBaseReturn {
|
|
8
|
-
chats: Map<string, Chat>;
|
|
9
|
-
selectedChat: Chat | undefined;
|
|
10
|
-
selectChat: (chatId: string) => void;
|
|
11
|
-
addUserToChat: (orgId: string, chatKey: string, user: ChatUser) => void;
|
|
12
|
-
removeUserFromChat: (orgId: string, chatKey: string, userId: string) => void;
|
|
13
|
-
blockUser: (orgId: string, chatKey: string, userId: string) => void;
|
|
14
|
-
}
|
|
15
|
-
declare const useWebSocketChatAdmin: ({ serverBaseUrl, orgId, product, }: Omit<UseWebSocketChatBaseConfig, "clientType" | "onMessage">) => UseWebSocketChatAdminReturn;
|
|
16
|
-
|
|
17
|
-
export { type UseWebSocketChatAdminReturn, useWebSocketChatAdmin };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Chat, ChatUser } from '../models/index.js';
|
|
2
|
-
import { UseWebSocketChatBaseReturn, UseWebSocketChatBaseConfig } from './use-websocket-chat-base.js';
|
|
3
|
-
import '@elqnt/kg';
|
|
4
|
-
import '@elqnt/types';
|
|
5
|
-
import '@elqnt/docs';
|
|
6
|
-
|
|
7
|
-
interface UseWebSocketChatAdminReturn extends UseWebSocketChatBaseReturn {
|
|
8
|
-
chats: Map<string, Chat>;
|
|
9
|
-
selectedChat: Chat | undefined;
|
|
10
|
-
selectChat: (chatId: string) => void;
|
|
11
|
-
addUserToChat: (orgId: string, chatKey: string, user: ChatUser) => void;
|
|
12
|
-
removeUserFromChat: (orgId: string, chatKey: string, userId: string) => void;
|
|
13
|
-
blockUser: (orgId: string, chatKey: string, userId: string) => void;
|
|
14
|
-
}
|
|
15
|
-
declare const useWebSocketChatAdmin: ({ serverBaseUrl, orgId, product, }: Omit<UseWebSocketChatBaseConfig, "clientType" | "onMessage">) => UseWebSocketChatAdminReturn;
|
|
16
|
-
|
|
17
|
-
export { type UseWebSocketChatAdminReturn, useWebSocketChatAdmin };
|