@ethora/chat-component 25.2.14 → 25.3.1

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.
@@ -0,0 +1,6 @@
1
+ import { ApiRoom, PostRoom } from '../../types/types';
2
+
3
+ export declare function getRooms(): Promise<{
4
+ items: ApiRoom[];
5
+ }>;
6
+ export declare function postRoom(data: PostRoom): Promise<any>;
@@ -1,5 +1,6 @@
1
1
  import { PayloadAction } from '@reduxjs/toolkit';
2
2
  import { AddRoomMessageAction, EditAction, IMessage, IRoom, ReactionAction } from '../types/types';
3
+ import { default as XmppClient } from '../networking/xmppClient';
3
4
 
4
5
  interface RoomMessagesState {
5
6
  rooms: {
@@ -69,6 +70,10 @@ export declare const roomsStore: import('@reduxjs/toolkit').Slice<RoomMessagesSt
69
70
  setCloseActiveMessage: (state: import('immer').WritableDraft<RoomMessagesState>, action: PayloadAction<{
70
71
  chatJID: string;
71
72
  }>) => void;
73
+ addRoomViaApi: (state: import('immer').WritableDraft<RoomMessagesState>, action: PayloadAction<{
74
+ room: IRoom;
75
+ xmpp: XmppClient;
76
+ }>) => void;
72
77
  }, "roomMessages", "roomMessages", import('@reduxjs/toolkit').SliceSelectors<RoomMessagesState>>;
73
78
  export declare const getLastMessageTimestamp: (state: RoomMessagesState, jid: string) => string | null;
74
79
  export declare const addRoom: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<{
@@ -111,6 +116,9 @@ export declare const addRoom: import('@reduxjs/toolkit').ActionCreatorWithOption
111
116
  }, "roomMessages/deleteRoom">, updateRoom: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<{
112
117
  jid: string;
113
118
  updates: Partial<IRoom>;
114
- }, "roomMessages/updateRoom">;
119
+ }, "roomMessages/updateRoom">, addRoomViaApi: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<{
120
+ room: IRoom;
121
+ xmpp: XmppClient;
122
+ }, "roomMessages/addRoomViaApi">;
115
123
  declare const _default: import('redux').Reducer<RoomMessagesState>;
116
124
  export default _default;
@@ -72,6 +72,28 @@ export interface IRoom {
72
72
  };
73
73
  historyComplete?: boolean;
74
74
  }
75
+ export interface ApiRoom {
76
+ name: string;
77
+ type: 'public' | 'group';
78
+ title?: string;
79
+ description?: string;
80
+ picture?: string;
81
+ members?: string[];
82
+ createdBy?: string;
83
+ appId?: any;
84
+ _id?: string;
85
+ isAppChat?: boolean;
86
+ createdAt?: string;
87
+ updatedAt?: string;
88
+ __v?: string;
89
+ }
90
+ export interface PostRoom {
91
+ title: string;
92
+ uuid?: string;
93
+ type: 'public' | 'group';
94
+ description?: string;
95
+ picture?: string;
96
+ }
75
97
  export interface IRoomCompressed extends Pick<IRoom, 'jid'> {
76
98
  }
77
99
  export interface RoomMember {
@@ -107,7 +129,6 @@ export interface User {
107
129
  firstName: string;
108
130
  lastName: string;
109
131
  email?: string;
110
- username?: string;
111
132
  profileImage?: string;
112
133
  emails?: [
113
134
  {
@@ -118,6 +139,7 @@ export interface User {
118
139
  }
119
140
  ];
120
141
  appId: string;
142
+ username: string;
121
143
  xmppPassword: string;
122
144
  langSource?: Iso639_1Codes;
123
145
  homeScreen?: string;
@@ -211,6 +233,8 @@ export interface IConfig {
211
233
  disableUserCount?: boolean;
212
234
  clearStoreBeforeInit?: boolean;
213
235
  disableSentLogic?: boolean;
236
+ initBeforeLoad?: boolean;
237
+ newArch?: boolean;
214
238
  }
215
239
  type PartialRoomWithMandatoryKeys = Partial<IRoom> & Pick<IRoom, 'jid' | 'title'>;
216
240
  export interface xmppSettingsInterface {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ethora/chat-component",
3
- "version": "25.02.14",
3
+ "version": "25.03.01",
4
4
  "type": "module",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/main.d.ts",