@ethora/chat-component 24.10.17 → 24.10.19

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.
@@ -25,8 +25,7 @@ export declare const createMessage: (data: {
25
25
  declare const onRealtimeMessage: (stanza: Element) => Promise<any>;
26
26
  declare const onMessageHistory: (stanza: any) => Promise<void>;
27
27
  declare const handleComposing: (stanza: Element, currentUser: string) => Promise<void>;
28
- declare const getListOfRooms: (xmpp: any) => void;
29
28
  declare const onPresenceInRoom: (stanza: Element | any) => void;
30
29
  declare const onGetLastMessageArchive: (stanza: Element, xmpp: any) => Promise<void>;
31
30
  declare const onGetChatRooms: (stanza: Element, xmpp: any) => void;
32
- export { getListOfRooms, onRealtimeMessage, onMessageHistory, onPresenceInRoom, onGetLastMessageArchive, handleComposing, onGetChatRooms, };
31
+ export { onRealtimeMessage, onMessageHistory, onPresenceInRoom, onGetLastMessageArchive, handleComposing, onGetChatRooms, };
@@ -10,11 +10,12 @@ export declare class XmppClient {
10
10
  username: string;
11
11
  onclose: () => void;
12
12
  onmessage: (data: any) => void;
13
+ status: string;
13
14
  password: string;
14
15
  resource: string;
15
16
  checkOnline(): boolean;
16
17
  constructor(username: string, password: string);
17
- initPresence(): Promise<unknown>;
18
+ joinBySendingPresence(chatJID: string): Promise<unknown>;
18
19
  unsubscribe: (address: string) => void;
19
20
  getRooms: () => Promise<unknown>;
20
21
  leaveTheRoom: (roomJID: string) => void;
@@ -5,7 +5,7 @@ interface RoomMessagesState {
5
5
  rooms: {
6
6
  [jid: string]: IRoom;
7
7
  };
8
- currentRoom: IRoom;
8
+ activeRoomJID: string;
9
9
  isLoading: boolean;
10
10
  }
11
11
  export declare const roomsStore: import('@reduxjs/toolkit').Slice<RoomMessagesState, {
@@ -31,7 +31,7 @@ export declare const roomsStore: import('@reduxjs/toolkit').Slice<RoomMessagesSt
31
31
  composing: boolean;
32
32
  }>): void;
33
33
  setIsLoading: (state: import('immer').WritableDraft<RoomMessagesState>, action: PayloadAction<{
34
- chatJID: string;
34
+ chatJID?: string;
35
35
  loading: boolean;
36
36
  }>) => void;
37
37
  setLastViewedTimestamp: (state: import('immer').WritableDraft<RoomMessagesState>, action: PayloadAction<{
@@ -43,7 +43,7 @@ export declare const roomsStore: import('@reduxjs/toolkit').Slice<RoomMessagesSt
43
43
  chatJID?: string;
44
44
  }>) => void;
45
45
  setCurrentRoom: (state: import('immer').WritableDraft<RoomMessagesState>, action: PayloadAction<{
46
- room: IRoom;
46
+ roomJID: string;
47
47
  }>) => void;
48
48
  }, "roomMessages", "roomMessages", import('@reduxjs/toolkit').SliceSelectors<RoomMessagesState>>;
49
49
  export declare const addRoom: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<{
@@ -62,7 +62,7 @@ export declare const addRoom: import('@reduxjs/toolkit').ActionCreatorWithOption
62
62
  chatJID: string;
63
63
  composing: boolean;
64
64
  }, "roomMessages/setComposing">, setIsLoading: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<{
65
- chatJID: string;
65
+ chatJID?: string;
66
66
  loading: boolean;
67
67
  }, "roomMessages/setIsLoading">, setLastViewedTimestamp: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<{
68
68
  chatJID: string;
@@ -71,7 +71,7 @@ export declare const addRoom: import('@reduxjs/toolkit').ActionCreatorWithOption
71
71
  value: boolean;
72
72
  chatJID?: string;
73
73
  }, "roomMessages/setRoomNoMessages">, setCurrentRoom: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<{
74
- room: IRoom;
74
+ roomJID: string;
75
75
  }, "roomMessages/setCurrentRoom">;
76
76
  declare const _default: import('redux').Reducer<RoomMessagesState>;
77
77
  export default _default;
@@ -39,6 +39,7 @@ export interface IRoom {
39
39
  lastViewedTimestamp?: number;
40
40
  unreadMessages?: number;
41
41
  noMessages?: boolean;
42
+ roomBg: string;
42
43
  }
43
44
  export interface UserType extends IMessage {
44
45
  id: any;
@@ -95,19 +96,22 @@ export interface IConfig {
95
96
  primary: string;
96
97
  secondary: string;
97
98
  };
98
- googleLogin?: boolean;
99
+ googleLogin?: {
100
+ enabled: boolean;
101
+ firebaseConfig: {
102
+ apiKey: string;
103
+ authDomain: string;
104
+ projectId: string;
105
+ storageBucket: string;
106
+ messagingSenderId: string;
107
+ appId: string;
108
+ };
109
+ };
99
110
  jwtLogin?: {
100
111
  token: string;
101
112
  enabled: boolean;
102
113
  };
103
- firebaseConfig?: {
104
- apiKey: string;
105
- authDomain: string;
106
- projectId: string;
107
- storageBucket: string;
108
- messagingSenderId: string;
109
- appId: string;
110
- };
114
+ defaultLogin?: boolean;
111
115
  }
112
116
  export interface StorageUser {
113
117
  appId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ethora/chat-component",
3
- "version": "24.10.17",
3
+ "version": "24.10.19",
4
4
  "type": "module",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/main.d.ts",
@@ -51,7 +51,7 @@
51
51
  "lib": "lib"
52
52
  },
53
53
  "author": "Ethora",
54
- "license": "ISC",
54
+ "license": "AGPL",
55
55
  "keywords": [
56
56
  "chat",
57
57
  "messaging",