@ethora/chat-component 24.11.24 → 24.11.26
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/dist/components/MainComponents/ProfileImagePlaceholder.d.ts +1 -1
- package/dist/components/OperationalModal/OperationalModal.d.ts +9 -0
- package/dist/components/RoomComponents/ChatRoomItem.d.ts +12 -0
- package/dist/components/styled/StyledInputComponents/Composing.d.ts +1 -1
- package/dist/helpers/constants/PLATFORM_CONSTANTS.d.ts +1 -0
- package/dist/main.js +8927 -8141
- package/dist/main.js.map +1 -1
- package/dist/networking/api-requests/user.api.d.ts +5 -1
- package/dist/networking/stanzaHandlers.d.ts +3 -2
- package/dist/networking/xmpp/createRoom.xmpp.d.ts +1 -1
- package/dist/networking/xmpp/getHistory.xmpp.d.ts +1 -1
- package/dist/networking/xmpp/getLastMessageArchive.xmpp.d.ts +1 -1
- package/dist/networking/xmppClient.d.ts +3 -2
- package/dist/roomStore/Middleware/unreadMidlleware.d.ts +3 -0
- package/dist/roomStore/roomsSlice.d.ts +2 -0
- package/dist/types/types.d.ts +14 -7
- package/package.json +4 -1
- package/dist/helpers/mockData.d.ts +0 -3
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import { User } from '../../types/types';
|
|
2
|
+
|
|
1
3
|
export declare function getDocuments(walletAddress: string): Promise<import('axios').AxiosResponse<any, any>>;
|
|
2
4
|
export declare function getExportMyData(): Promise<import('axios').AxiosResponse<any, any>>;
|
|
3
5
|
export declare function deleteMe(): Promise<import('axios').AxiosResponse<any, any>>;
|
|
4
6
|
export declare function updateMe(data: any): Promise<import('axios').AxiosResponse<any, any>>;
|
|
5
|
-
export declare function updateProfile(fd: FormData): Promise<
|
|
7
|
+
export declare function updateProfile(fd: FormData): Promise<{
|
|
8
|
+
user: User;
|
|
9
|
+
}>;
|
|
@@ -36,9 +36,10 @@ declare const onRealtimeMessage: (stanza: Element) => Promise<any>;
|
|
|
36
36
|
declare const onMessageHistory: (stanza: any) => Promise<void>;
|
|
37
37
|
declare const handleComposing: (stanza: Element, currentUser: string) => Promise<void>;
|
|
38
38
|
declare const onPresenceInRoom: (stanza: Element | any) => void;
|
|
39
|
+
declare const onChatInvite: (stanza: Element, client: any) => Promise<void>;
|
|
39
40
|
declare const onGetMembers: (stanza: Element) => void;
|
|
40
41
|
declare const onGetRoomInfo: (stanza: Element) => void;
|
|
41
|
-
declare const onGetLastMessageArchive: (stanza: Element, xmpp: any) =>
|
|
42
|
+
declare const onGetLastMessageArchive: (stanza: Element, xmpp: any) => void;
|
|
42
43
|
declare const onNewRoomCreated: (stanza: Element, xmpp: any) => void;
|
|
43
44
|
declare const onGetChatRooms: (stanza: Element, xmpp: any) => void;
|
|
44
|
-
export { onRealtimeMessage, onMessageHistory, onPresenceInRoom, onGetLastMessageArchive, handleComposing, onGetChatRooms, onNewRoomCreated, onGetMembers, onGetRoomInfo, };
|
|
45
|
+
export { onRealtimeMessage, onMessageHistory, onPresenceInRoom, onGetLastMessageArchive, handleComposing, onGetChatRooms, onNewRoomCreated, onGetMembers, onGetRoomInfo, onChatInvite, };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Client } from '@xmpp/client';
|
|
2
2
|
|
|
3
|
-
export declare const getHistory: (client: Client, chatJID: string, max: number, before?: number) => Promise<unknown>;
|
|
3
|
+
export declare const getHistory: (client: Client, chatJID: string, max: number, before?: number, otherId?: string) => Promise<unknown>;
|
|
@@ -26,10 +26,11 @@ export declare class XmppClient {
|
|
|
26
26
|
close(): void;
|
|
27
27
|
unsubscribe(address: string): void;
|
|
28
28
|
getRooms: () => Promise<unknown>;
|
|
29
|
-
createRoomStanza(title: string, description: string): Promise<string>;
|
|
29
|
+
createRoomStanza(title: string, description: string, to?: string): Promise<string>;
|
|
30
|
+
inviteRoomRequest(to: string, roomJid: string): Promise<void>;
|
|
30
31
|
leaveTheRoomStanza: (roomJID: string) => void;
|
|
31
32
|
presenceInRoomStanza: (roomJID: string) => void;
|
|
32
|
-
getHistoryStanza: (chatJID: string, max: number, before?: number) => Promise<void>;
|
|
33
|
+
getHistoryStanza: (chatJID: string, max: number, before?: number, id?: string) => Promise<void>;
|
|
33
34
|
getLastMessageArchiveStanza(roomJID: string): void;
|
|
34
35
|
setRoomImageStanza: (roomJid: string, roomThumbnail: string, type: string, roomBackground?: string) => void;
|
|
35
36
|
getRoomInfoStanza: (roomJID: string) => void;
|
|
@@ -36,6 +36,7 @@ export declare const roomsStore: import('@reduxjs/toolkit').Slice<RoomMessagesSt
|
|
|
36
36
|
setComposing(state: import('immer').WritableDraft<RoomMessagesState>, action: PayloadAction<{
|
|
37
37
|
chatJID: string;
|
|
38
38
|
composing: boolean;
|
|
39
|
+
composingList?: string[];
|
|
39
40
|
}>): void;
|
|
40
41
|
setIsLoading: (state: import('immer').WritableDraft<RoomMessagesState>, action: PayloadAction<{
|
|
41
42
|
chatJID?: string;
|
|
@@ -73,6 +74,7 @@ export declare const addRoom: import('@reduxjs/toolkit').ActionCreatorWithOption
|
|
|
73
74
|
}, "roomMessages/deleteRoomMessage">, setComposing: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<{
|
|
74
75
|
chatJID: string;
|
|
75
76
|
composing: boolean;
|
|
77
|
+
composingList?: string[];
|
|
76
78
|
}, "roomMessages/setComposing">, setIsLoading: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<{
|
|
77
79
|
chatJID?: string;
|
|
78
80
|
loading: boolean;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { MODAL_TYPES } from '../helpers/constants/MODAL_TYPES';
|
|
2
2
|
|
|
3
|
-
export interface IUser {
|
|
3
|
+
export interface IUser extends Partial<User> {
|
|
4
4
|
id: string;
|
|
5
5
|
name: string | null;
|
|
6
|
-
avatar?: string | null;
|
|
7
|
-
xmmpPass?: string | null;
|
|
8
6
|
userJID?: string | null;
|
|
9
7
|
token: string;
|
|
10
8
|
refreshToken: string;
|
|
@@ -78,9 +76,9 @@ export interface User {
|
|
|
78
76
|
_id: string;
|
|
79
77
|
firstName: string;
|
|
80
78
|
lastName: string;
|
|
81
|
-
email
|
|
82
|
-
username
|
|
83
|
-
profileImage
|
|
79
|
+
email?: string;
|
|
80
|
+
username?: string;
|
|
81
|
+
profileImage?: string;
|
|
84
82
|
emails?: [
|
|
85
83
|
{
|
|
86
84
|
loginType: string;
|
|
@@ -104,6 +102,7 @@ export interface User {
|
|
|
104
102
|
isProfileOpen?: boolean;
|
|
105
103
|
isAssetsOpen?: boolean;
|
|
106
104
|
isAgreeWithTerms?: boolean;
|
|
105
|
+
isSuperAdmin?: any;
|
|
107
106
|
}
|
|
108
107
|
export interface XmppState {
|
|
109
108
|
client: any;
|
|
@@ -134,7 +133,7 @@ export interface IConfig {
|
|
|
134
133
|
};
|
|
135
134
|
userLogin?: {
|
|
136
135
|
enabled: boolean;
|
|
137
|
-
user: User;
|
|
136
|
+
user: User | null;
|
|
138
137
|
};
|
|
139
138
|
disableRooms?: boolean;
|
|
140
139
|
defaultLogin?: boolean;
|
|
@@ -144,6 +143,13 @@ export interface IConfig {
|
|
|
144
143
|
roomListStyles?: React.CSSProperties;
|
|
145
144
|
chatRoomStyles?: React.CSSProperties;
|
|
146
145
|
setRoomJidInPath?: boolean;
|
|
146
|
+
disableRoomMenu?: boolean;
|
|
147
|
+
defaultRooms?: string[] | ConfigRoom[];
|
|
148
|
+
}
|
|
149
|
+
interface ConfigRoom {
|
|
150
|
+
jid: string;
|
|
151
|
+
pinned: boolean;
|
|
152
|
+
_id: string;
|
|
147
153
|
}
|
|
148
154
|
export interface StorageUser {
|
|
149
155
|
appId: string;
|
|
@@ -169,3 +175,4 @@ export interface MessageProps {
|
|
|
169
175
|
export interface MediaMessageType {
|
|
170
176
|
}
|
|
171
177
|
export type ModalType = (typeof MODAL_TYPES)[keyof typeof MODAL_TYPES];
|
|
178
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ethora/chat-component",
|
|
3
|
-
"version": "24.11.
|
|
3
|
+
"version": "24.11.26",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/main.js",
|
|
6
6
|
"types": "dist/main.d.ts",
|
|
@@ -23,10 +23,13 @@
|
|
|
23
23
|
"@xmpp/client": "^0.13.1",
|
|
24
24
|
"axios": "^1.7.2",
|
|
25
25
|
"firebase": "^10.13.2",
|
|
26
|
+
"i": "^0.3.7",
|
|
26
27
|
"js-sha256": "^0.11.0",
|
|
27
28
|
"ltx": "^3.0.0",
|
|
29
|
+
"npm": "^10.9.1",
|
|
28
30
|
"react": "^18.3.1",
|
|
29
31
|
"react-dom": "^18.3.1",
|
|
32
|
+
"react-qr-code": "^2.0.15",
|
|
30
33
|
"react-redux": "^9.1.0",
|
|
31
34
|
"redux": "^5.0.1",
|
|
32
35
|
"redux-saga": "^1.3.0",
|