@cometchat/chat-sdk-javascript 4.0.0-beta2 → 4.0.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.
Files changed (141) hide show
  1. package/{dist/index.d.ts → CometChat.d.ts} +111 -0
  2. package/CometChat.js +1 -0
  3. package/{dist/javascript-chat-sdk/LICENSE.md → LICENSE.md} +1 -1
  4. package/{dist/javascript-chat-sdk/README.md → README.md} +2 -2
  5. package/package.json +31 -42
  6. package/dist/.DS_Store +0 -0
  7. package/dist/CometChat.js +0 -1
  8. package/dist/javascript-chat-sdk/.git/COMMIT_EDITMSG +0 -1
  9. package/dist/javascript-chat-sdk/.git/FETCH_HEAD +0 -4
  10. package/dist/javascript-chat-sdk/.git/HEAD +0 -1
  11. package/dist/javascript-chat-sdk/.git/ORIG_HEAD +0 -1
  12. package/dist/javascript-chat-sdk/.git/config +0 -19
  13. package/dist/javascript-chat-sdk/.git/description +0 -1
  14. package/dist/javascript-chat-sdk/.git/hooks/applypatch-msg.sample +0 -15
  15. package/dist/javascript-chat-sdk/.git/hooks/commit-msg.sample +0 -24
  16. package/dist/javascript-chat-sdk/.git/hooks/fsmonitor-watchman.sample +0 -174
  17. package/dist/javascript-chat-sdk/.git/hooks/post-update.sample +0 -8
  18. package/dist/javascript-chat-sdk/.git/hooks/pre-applypatch.sample +0 -14
  19. package/dist/javascript-chat-sdk/.git/hooks/pre-commit.sample +0 -49
  20. package/dist/javascript-chat-sdk/.git/hooks/pre-merge-commit.sample +0 -13
  21. package/dist/javascript-chat-sdk/.git/hooks/pre-push.sample +0 -53
  22. package/dist/javascript-chat-sdk/.git/hooks/pre-rebase.sample +0 -169
  23. package/dist/javascript-chat-sdk/.git/hooks/pre-receive.sample +0 -24
  24. package/dist/javascript-chat-sdk/.git/hooks/prepare-commit-msg.sample +0 -42
  25. package/dist/javascript-chat-sdk/.git/hooks/push-to-checkout.sample +0 -78
  26. package/dist/javascript-chat-sdk/.git/hooks/update.sample +0 -128
  27. package/dist/javascript-chat-sdk/.git/index +0 -0
  28. package/dist/javascript-chat-sdk/.git/info/exclude +0 -6
  29. package/dist/javascript-chat-sdk/.git/logs/HEAD +0 -13
  30. package/dist/javascript-chat-sdk/.git/logs/refs/heads/master +0 -1
  31. package/dist/javascript-chat-sdk/.git/logs/refs/heads/master-v3 +0 -3
  32. package/dist/javascript-chat-sdk/.git/logs/refs/heads/master-v4 +0 -4
  33. package/dist/javascript-chat-sdk/.git/logs/refs/remotes/origin/HEAD +0 -1
  34. package/dist/javascript-chat-sdk/.git/logs/refs/remotes/origin/master-v3 +0 -2
  35. package/dist/javascript-chat-sdk/.git/logs/refs/remotes/origin/master-v4 +0 -2
  36. package/dist/javascript-chat-sdk/.git/logs/refs/stash +0 -1
  37. package/dist/javascript-chat-sdk/.git/objects/09/b9e17d9a0acd55c3644f4cfa19b1c40a139018 +0 -0
  38. package/dist/javascript-chat-sdk/.git/objects/0f/2d8999b370e8ddb236f767aa565b2aa72a6b21 +0 -0
  39. package/dist/javascript-chat-sdk/.git/objects/15/7f5161e31be14c74df7907c9c5046fbbea4461 +0 -0
  40. package/dist/javascript-chat-sdk/.git/objects/17/89200f3f5621f9df6d08d1071c59557ce5a29d +0 -0
  41. package/dist/javascript-chat-sdk/.git/objects/26/1de108a0253f54cf37e8a072f7f5f0098c7e89 +0 -4
  42. package/dist/javascript-chat-sdk/.git/objects/43/7ffc94a259dcd818cca308ab60a2780714092d +0 -1
  43. package/dist/javascript-chat-sdk/.git/objects/4e/6ab6a981ea6dccdb60b6438d7ca142aef269fc +0 -0
  44. package/dist/javascript-chat-sdk/.git/objects/5e/04a3d79cebcc2b02c14ea807f839ea73d44461 +0 -0
  45. package/dist/javascript-chat-sdk/.git/objects/65/bbff4d1cccc12285ea1c59a6f2082552f0d034 +0 -0
  46. package/dist/javascript-chat-sdk/.git/objects/6a/a6ef178cb2e3775bb149aba99ace8399525da6 +0 -0
  47. package/dist/javascript-chat-sdk/.git/objects/6b/e1ffe406de9ebb698ea891315b2b1459160029 +0 -0
  48. package/dist/javascript-chat-sdk/.git/objects/6b/efb8e9de892be7ecee5d39c30c0aa17d43d727 +0 -2
  49. package/dist/javascript-chat-sdk/.git/objects/6e/f136ca41bbb5684639947fa121b7eebb795592 +0 -0
  50. package/dist/javascript-chat-sdk/.git/objects/87/96f6311621c3ee4fc8d37eeec64a6c94e3e6ca +0 -0
  51. package/dist/javascript-chat-sdk/.git/objects/8b/2d226d44814b7265b68ab7953a87cd44d77965 +0 -0
  52. package/dist/javascript-chat-sdk/.git/objects/9c/bc4afb06153fd276e240e709984bf1099386ba +0 -0
  53. package/dist/javascript-chat-sdk/.git/objects/a9/6c6710dfb57871b6eccda3a94d83990ba94d9f +0 -0
  54. package/dist/javascript-chat-sdk/.git/objects/ad/1b70a4bb12b3fe2e6306d2b0922582036f4e42 +0 -0
  55. package/dist/javascript-chat-sdk/.git/objects/c1/655387f263ec50dbef8042099eead57dfe00c2 +0 -0
  56. package/dist/javascript-chat-sdk/.git/objects/e0/ad85d968302e5447402ed4d0bc8ace931b9167 +0 -0
  57. package/dist/javascript-chat-sdk/.git/objects/e8/0b03094191c92690d5bb92b4271058f188efd1 +0 -1
  58. package/dist/javascript-chat-sdk/.git/objects/f0/cc86624ec0504ed24dcd6a7b2cdee917b73395 +0 -2
  59. package/dist/javascript-chat-sdk/.git/objects/f9/95e0e3dc98868eb6404f8cdd84632ae140e1ff +0 -2
  60. package/dist/javascript-chat-sdk/.git/objects/fb/d9b82e03d33337a8d2606fc9e2f1652ffda3de +0 -0
  61. package/dist/javascript-chat-sdk/.git/objects/pack/pack-efd6261f29a0c404693064c4a255aada38ddab72.idx +0 -0
  62. package/dist/javascript-chat-sdk/.git/objects/pack/pack-efd6261f29a0c404693064c4a255aada38ddab72.pack +0 -0
  63. package/dist/javascript-chat-sdk/.git/packed-refs +0 -107
  64. package/dist/javascript-chat-sdk/.git/refs/heads/master +0 -1
  65. package/dist/javascript-chat-sdk/.git/refs/heads/master-v3 +0 -1
  66. package/dist/javascript-chat-sdk/.git/refs/heads/master-v4 +0 -1
  67. package/dist/javascript-chat-sdk/.git/refs/remotes/origin/HEAD +0 -1
  68. package/dist/javascript-chat-sdk/.git/refs/remotes/origin/master-v3 +0 -1
  69. package/dist/javascript-chat-sdk/.git/refs/remotes/origin/master-v4 +0 -1
  70. package/dist/javascript-chat-sdk/.git/refs/stash +0 -1
  71. package/dist/javascript-chat-sdk/.gitignore +0 -2
  72. package/dist/javascript-chat-sdk/CometChat.d.ts +0 -4732
  73. package/dist/javascript-chat-sdk/CometChat.js +0 -1
  74. package/dist/javascript-chat-sdk/package.json +0 -36
  75. package/dist/package.json +0 -36
  76. package/dist/type/index.d.ts +0 -10
  77. package/dist/type/lib/BannedMembersRequest.d.ts +0 -60
  78. package/dist/type/lib/BlockedUsersRequest.d.ts +0 -67
  79. package/dist/type/lib/CallSettings.d.ts +0 -429
  80. package/dist/type/lib/CometChat.d.ts +0 -1955
  81. package/dist/type/lib/CometChatErrorConstants.d.ts +0 -124
  82. package/dist/type/lib/CometChatHelper.d.ts +0 -26
  83. package/dist/type/lib/Constants.d.ts +0 -953
  84. package/dist/type/lib/ConversationRequest.d.ts +0 -89
  85. package/dist/type/lib/GroupMembersRequest.d.ts +0 -61
  86. package/dist/type/lib/GroupsRequest.d.ts +0 -78
  87. package/dist/type/lib/Helper.d.ts +0 -46
  88. package/dist/type/lib/ListenerHandlers.d.ts +0 -101
  89. package/dist/type/lib/MessagesRequest.d.ts +0 -188
  90. package/dist/type/lib/UsersRequest.d.ts +0 -142
  91. package/dist/type/lib/WebSockets/WSConnectionHelper.d.ts +0 -41
  92. package/dist/type/lib/WebSockets/WSConstants.d.ts +0 -71
  93. package/dist/type/lib/WebSockets/WSHelper.d.ts +0 -3
  94. package/dist/type/lib/controllers/CallController.d.ts +0 -151
  95. package/dist/type/lib/controllers/ConversationController.d.ts +0 -14
  96. package/dist/type/lib/controllers/GroupMemberController.d.ts +0 -10
  97. package/dist/type/lib/controllers/GroupsController.d.ts +0 -9
  98. package/dist/type/lib/controllers/MessageController.d.ts +0 -18
  99. package/dist/type/lib/controllers/PresenceController.d.ts +0 -0
  100. package/dist/type/lib/controllers/TypingNotificationController.d.ts +0 -14
  101. package/dist/type/lib/controllers/UserAuthController.d.ts +0 -10
  102. package/dist/type/lib/controllers/UsersController.d.ts +0 -9
  103. package/dist/type/lib/localStore/KeyStore.d.ts +0 -45
  104. package/dist/type/lib/localStore/MessageListenerEventMaping.d.ts +0 -56
  105. package/dist/type/lib/localStore/MessagesStore.d.ts +0 -72
  106. package/dist/type/lib/localStore/UserStore.d.ts +0 -72
  107. package/dist/type/lib/localStore/store.d.ts +0 -61
  108. package/dist/type/lib/models/Action.d.ts +0 -159
  109. package/dist/type/lib/models/AppSettings.d.ts +0 -135
  110. package/dist/type/lib/models/BaseMessage.d.ts +0 -259
  111. package/dist/type/lib/models/CCExtension.d.ts +0 -15
  112. package/dist/type/lib/models/Call.d.ts +0 -159
  113. package/dist/type/lib/models/CometChatAuthEvent.d.ts +0 -25
  114. package/dist/type/lib/models/CometChatEvent.d.ts +0 -25
  115. package/dist/type/lib/models/CometChatMessageEvent.d.ts +0 -9
  116. package/dist/type/lib/models/CometChatPingEvent.d.ts +0 -6
  117. package/dist/type/lib/models/CometChatPresenceEvent.d.ts +0 -15
  118. package/dist/type/lib/models/CometChatReceiptEvent.d.ts +0 -14
  119. package/dist/type/lib/models/CometChatTransientEvent.d.ts +0 -11
  120. package/dist/type/lib/models/CometChatTypingEvent.d.ts +0 -14
  121. package/dist/type/lib/models/ConversationModel.d.ts +0 -73
  122. package/dist/type/lib/models/CustomError.d.ts +0 -13
  123. package/dist/type/lib/models/CustomMessage.d.ts +0 -71
  124. package/dist/type/lib/models/ErrorModel.d.ts +0 -12
  125. package/dist/type/lib/models/Group.d.ts +0 -190
  126. package/dist/type/lib/models/GroupMember.d.ts +0 -43
  127. package/dist/type/lib/models/Listner.d.ts +0 -258
  128. package/dist/type/lib/models/MediaDevice.d.ts +0 -36
  129. package/dist/type/lib/models/MediaMessage.d.ts +0 -115
  130. package/dist/type/lib/models/MessageReceipt.d.ts +0 -99
  131. package/dist/type/lib/models/RTCUser.d.ts +0 -18
  132. package/dist/type/lib/models/TextMessage.d.ts +0 -84
  133. package/dist/type/lib/models/TransientMessage.d.ts +0 -48
  134. package/dist/type/lib/models/TypingNotification.d.ts +0 -52
  135. package/dist/type/lib/models/UserModel.d.ts +0 -175
  136. package/dist/type/lib/models/UserPresence.d.ts +0 -0
  137. package/dist/type/lib/models/attachment.d.ts +0 -74
  138. package/dist/type/lib/rest-api/EndPointUtils.d.ts +0 -9
  139. package/dist/type/lib/rest-api/EndpointFactory.d.ts +0 -28
  140. package/dist/type/lib/rest-api/HttpHelper.d.ts +0 -10
  141. package/readme.md +0 -189
@@ -1,1955 +0,0 @@
1
- import { CometChatException } from './models/CustomError';
2
- import { User, Me } from "./models/UserModel";
3
- import { MediaMessage } from "./models/MediaMessage";
4
- import { BaseMessage } from "./models/BaseMessage";
5
- import { TextMessage } from "./models/TextMessage";
6
- import { GroupType, GroupMemberScope, MessageCategory } from "./Constants";
7
- import { Group } from "./models/Group";
8
- import { MessageListener, UserListener, OngoingCallListener, CallListener, GroupListener, LoginListener, ConnectionListener } from "./models/Listner";
9
- import { Call } from './models/Call';
10
- import { CallController } from './controllers/CallController';
11
- import { Action } from './models/Action';
12
- import { GroupsRequest, GroupsRequestBuilder } from "./GroupsRequest";
13
- import { GroupMembersRequestBuilder, GroupMembersRequest } from "./GroupMembersRequest";
14
- import { BannedMembersRequestBuilder, BannedMembersRequest } from "./BannedMembersRequest";
15
- import { UsersRequest, UsersRequestBuilder } from "./UsersRequest";
16
- import { ConversationsRequest, ConversationsRequestBuilder } from "./ConversationRequest";
17
- import { MessagesRequest, MessagesRequestBuilder } from './MessagesRequest';
18
- import { TypingIndicator } from './models/TypingNotification';
19
- import { CustomMessage } from './models/CustomMessage';
20
- import { GroupMember } from './models/GroupMember';
21
- import { BlockedUsersRequest, BlockedUsersRequestBuilder } from './BlockedUsersRequest';
22
- import { AppSettings, AppSettingsBuilder } from './models/AppSettings';
23
- import { CometChatHelper } from './CometChatHelper';
24
- import { Conversation } from "./models/ConversationModel";
25
- import { Attachment } from "./models/attachment";
26
- import { CallSettings, CallSettingsBuilder, MainVideoContainerSetting, VirtualBackground, VirtualBackgroundBuilder } from "./CallSettings";
27
- import { CCExtension } from "./models/CCExtension";
28
- import { MediaDevice } from "./models/MediaDevice";
29
- import { TransientMessage } from "./models/TransientMessage";
30
- export declare class CometChat {
31
- static GroupType: typeof GroupType;
32
- static GroupMemberScope: typeof GroupMemberScope;
33
- static ResponseConstants: {
34
- RESPONSE_KEYS: {
35
- KEY_DATA: string;
36
- KEY_META: string;
37
- KEY_CURSOR: string;
38
- KEY_ACTION: string;
39
- KEY_MESSAGE: string;
40
- KEY_ERROR: string;
41
- KEY_ERROR_DETAILS: string;
42
- KEY_ERROR_CODE: string;
43
- KEY_ERROR_MESSAGE: string;
44
- KEY_AUTH_TOKEN: string;
45
- KEY_WS_CHANNEL: string;
46
- KEY_IDENTITY: string;
47
- KEY_SERVICE: string;
48
- KEY_ENTITIES: string;
49
- KEY_ENTITITY: string;
50
- KEY_ENTITYTYPE: string;
51
- KEY_ATTACHMENTS: string;
52
- CODE_REQUEST_OK: number;
53
- CODE_BAD_REQUEST: number;
54
- UNREAD_UNDELIVERED_KEYS: {
55
- ENTITY: string;
56
- ENTITY_TYPE: string;
57
- ENTITY_Id: string;
58
- COUNT: string;
59
- };
60
- GROUP_MEMBERS_RESPONSE: {
61
- SUCCESS: string;
62
- ERROR: string;
63
- MESSAGE: string;
64
- };
65
- KEY_ENTITY_TYPE: {
66
- USER: string;
67
- GROUP: string;
68
- };
69
- };
70
- };
71
- static CallConstants: {
72
- CALL_MODE: {
73
- DEFAULT: string;
74
- SPOTLIGHT: string;
75
- SINGLE: string;
76
- TILE: string;
77
- GRID: string;
78
- };
79
- CALL_TYPE: {
80
- AUDIO: string;
81
- VIDEO: string;
82
- };
83
- RECEIVER_TYPE_GROUP: string;
84
- RECEIVER_TYPE_USER: string;
85
- CALL_KEYS: {
86
- CALL_DATA: string;
87
- CALL_ID: string;
88
- CALL_SESSION_ID: string;
89
- CALL_RECEIVER: string;
90
- CALL_SENDER: string;
91
- CALL_RECEIVER_TYPE: string;
92
- CALL_STATUS: string;
93
- CALL_TYPE: string;
94
- CALL_INITIATED_AT: string;
95
- CALL_JOINED_AT: string;
96
- CALL_LEFT_AT: string;
97
- CALL_METADATA: string;
98
- CALL_ENTITIES: string;
99
- CALL_ENTITY_TYPE: string;
100
- CALL_ENTITY: string;
101
- CALL_ENTITY_USER: string;
102
- CALL_ENTITY_GROUP: string;
103
- };
104
- CALL_STATUS: {
105
- INITIATED: string;
106
- ONGOING: string;
107
- UNANSWERED: string;
108
- REJECTED: string;
109
- BUSY: string;
110
- CANCELLED: string;
111
- ENDED: string;
112
- };
113
- AUDIO_INPUT_DEVICES: string;
114
- AUDIO_OUTPUT_DEVICES: string;
115
- VIDEO_INPUT_DEVICES: string;
116
- POST_MESSAGES: {
117
- TYPES: {
118
- ACTION_MESSAGE: string;
119
- HANGUP: string;
120
- COMETCHAT_RTC_SETTINGS: string;
121
- };
122
- ACTIONS: {
123
- USER_JOINED: string;
124
- USER_LEFT: string;
125
- USER_LIST_CHANGED: string;
126
- INITIAL_DEVICE_LIST: string;
127
- DEVICE_CHANGE: string;
128
- LOAD: string;
129
- CHANGE_AUDIO_INPUT: string;
130
- CHANGE_AUDIO_OUTPUT: string;
131
- CHANGE_VIDEO_INPUT: string;
132
- MUTE_AUDIO: string;
133
- UNMUTE_AUDIO: string;
134
- PAUSE_VIDEO: string;
135
- UNPAUSE_VIDEO: string;
136
- SWITCH_MODE: string;
137
- START_SCREENSHARE: string;
138
- STOP_SCREENSHARE: string;
139
- END_CALL: string;
140
- START_RECORDING: string;
141
- STOP_RECORDING: string;
142
- RECORDING_TOGGLED: string;
143
- USER_MUTED: string;
144
- SCREEN_SHARE_STARTED: string;
145
- SCREEN_SHARE_STOPPED: string;
146
- SWITCH_TO_VIDEO_CALL: string;
147
- SWITCHED_TO_VIDEO_CALL: string;
148
- OPEN_VIRTUAL_BACKGROUND: string;
149
- SET_BACKGROUND_BLUR: string;
150
- SET_BACKGROUND_IMAGE: string;
151
- };
152
- };
153
- MEDIA_DEVICE: {
154
- ID: string;
155
- NAME: string;
156
- ACTIVE: string;
157
- };
158
- ZOOM_BUTTON_DEFAULT_PARAMS: {
159
- position: string;
160
- visible: boolean;
161
- };
162
- NAME_LABEL_DEFAULT_PARAMS: {
163
- position: string;
164
- visible: boolean;
165
- color: string;
166
- };
167
- NETWORK_LABEL_DEFAULT_PARAMS: {
168
- position: string;
169
- visible: boolean;
170
- };
171
- MAIN_VIDEO_CONTAINER_SETTINGS: {
172
- KEYS: {
173
- POSITION: string;
174
- VISIBILITY: string;
175
- COLOR: string;
176
- };
177
- };
178
- };
179
- static ActionConstatnts: {
180
- ACTION_SUBJECTS: {
181
- ACTION_ON: string;
182
- ACTION_BY: string;
183
- ACTION_FOR: string;
184
- };
185
- ACTION_ENTITY_TYPE: {
186
- GROUP_USER: string;
187
- USER: string;
188
- GROUP: string;
189
- MESSAGE: string;
190
- };
191
- ACTION_KEYS: {
192
- ACTION_CREATED: string;
193
- ACTION_UPDATED: string;
194
- ACTION_DELETED: string;
195
- ENTITIES: string;
196
- ENTITY: string;
197
- ENTITY_TYPE: string;
198
- TYPE_MEMBER_JOINED: string;
199
- TYPE_MEMBER_LEFT: string;
200
- TYPE_MEMBER_KICKED: string;
201
- TYPE_MEMBER_BANNED: string;
202
- TYPE_MEMBER_UNBANNED: string;
203
- TYPE_MEMBER_INVITED: string;
204
- TYPE_MEMBER_ADDED: string;
205
- ACTION_SCOPE_CHANGED: string;
206
- ACTION_TYPE_USER: string;
207
- ACTION_TYPE_GROUP: string;
208
- ACTION_TYPE_GROUP_MEMBER: string;
209
- TYPE_MESSAGE_EDITED: string;
210
- TYPE_MESSAGE_DELETED: string;
211
- ACTION_TYPE_CALL: string;
212
- EXTRAS: string;
213
- SCOPE: string;
214
- NEW: string;
215
- OLD: string;
216
- };
217
- ActionMessages: {
218
- ACTION_GROUP_JOINED_MESSAGE: string;
219
- ACTION_GROUP_LEFT_MESSAGE: string;
220
- ACTION_MEMBER_KICKED_MESSAGE: string;
221
- ACTION_MEMBER_BANNED_MESSAGE: string;
222
- ACTION_MEMBER_UNBANNED_MESSAGE: string;
223
- ACTION_MEMBER_INVITED_MESSAGE: string;
224
- ACTION_MESSAGE_EDITED_MESSAGE: string;
225
- ACTION_MESSAGE_DELETED_MESSAGE: string;
226
- ACTION_MEMBER_SCOPE_CHANGED: string;
227
- ACTION_MEMBER_ADDED_TO_GROUP: string;
228
- };
229
- ACTION_TYPE: {
230
- TYPE_MEMBER_JOINED: string;
231
- TYPE_MEMBER_LEFT: string;
232
- TYPE_MEMBER_KICKED: string;
233
- TYPE_MEMBER_BANNED: string;
234
- TYPE_MEMBER_UNBANNED: string;
235
- TYPE_MEMBER_INVITED: string;
236
- TYPE_MEMBER_SCOPE_CHANGED: string;
237
- TYPE_MESSAGE: string;
238
- TYPE_MESSAGE_EDITED: string;
239
- TYPE_MESSAGE_DELETED: string;
240
- TYPE_MEMBER_ADDED: string;
241
- };
242
- ACTIONS: {
243
- MEMBER_ADDED: string;
244
- MEMBER_JOINED: string;
245
- MEMBER_LEFT: string;
246
- MEMBER_KICKED: string;
247
- MEMBER_BANNED: string;
248
- MEMBER_UNBANNED: string;
249
- MEMBER_INVITED: string;
250
- MEMBER_SCOPE_CHANGED: string;
251
- MESSAGE_EDITED: string;
252
- MESSSAGE_DELETED: string;
253
- TYPE_USER: string;
254
- TYPE_GROUP: string;
255
- TYPE_GROUP_MEMBER: string;
256
- };
257
- };
258
- static CALL_ERROR: {
259
- CALL_ALREADY_INITIATED: {
260
- code: string;
261
- name: string;
262
- message: string;
263
- details: {};
264
- };
265
- ERROR_IN_CALLING: {
266
- code: string;
267
- name: string;
268
- message: string;
269
- details: {};
270
- };
271
- CANNOT_ACCEPT_CALL: {
272
- code: string;
273
- name: string;
274
- message: string;
275
- details: {};
276
- };
277
- NOT_INITIALIZED: {
278
- code: string;
279
- name: string;
280
- message: string;
281
- details: {};
282
- };
283
- NOT_LOGGED_IN: {
284
- code: string;
285
- name: string;
286
- message: string;
287
- details: {};
288
- };
289
- SESSION_ID_REQUIRED: {
290
- code: string;
291
- name: string;
292
- message: string;
293
- details: {};
294
- };
295
- CALL_SETTINGS_REQUIRED: {
296
- code: string;
297
- name: string;
298
- message: string;
299
- details: {};
300
- };
301
- JWT_NOT_FOUND: {
302
- code: string;
303
- name: string;
304
- message: string;
305
- details: {};
306
- };
307
- };
308
- static MessageConstatnts: {
309
- TYPE: {
310
- TEXT: string;
311
- MEDIA: string;
312
- IMAGE: string;
313
- VIDEO: string;
314
- AUDIO: string;
315
- FILE: string;
316
- CUSTOM: string;
317
- };
318
- CATEGORY: {
319
- MESSAGE: string;
320
- ACTION: string;
321
- CALL: string;
322
- CUSTOM: string;
323
- };
324
- RECEIVER_TYPE: {
325
- USER: string;
326
- GROUP: string;
327
- };
328
- KEYS: {
329
- ATTATCHMENT: string;
330
- ATTATCHMENTS: string;
331
- ACTION: string;
332
- TYPE: string;
333
- DATA: string;
334
- ID: string;
335
- MUID: string;
336
- SENDER: string;
337
- RECEIVER: string;
338
- RECEIVER_ID: string;
339
- CATEGORY: string;
340
- RECEIVER_TYPE: string;
341
- SENT_AT: string;
342
- STATUS: string;
343
- TEXT: string;
344
- URL: string;
345
- METADATA: string;
346
- RECEIPTS: string;
347
- MY_RECEIPTS: string;
348
- CUSTOM_DATA: string;
349
- CUSTOM_SUB_TYPE: string;
350
- RESOURCE: string;
351
- };
352
- KNOWN_MEDIA_TYPE: {
353
- IMAGE: any[];
354
- VIDEO: any[];
355
- AUDIO: any[];
356
- FILE: any[];
357
- };
358
- PAGINATION: {
359
- AFFIX: {
360
- APPEND: string;
361
- PREPEND: string;
362
- };
363
- CURSOR_FILEDS: {
364
- ID: string;
365
- SENT_AT: string;
366
- };
367
- CURSOR_AFFIX_DEFAULT: string;
368
- CURSOR_FIELD_DEFAULT: string;
369
- KEYS: {
370
- PER_PAGE: string;
371
- CURSOR_AFFIX: string;
372
- AFFIX: string;
373
- CURSOR_FIELD: string;
374
- CURSOR_VALUE: string;
375
- UID: string;
376
- SENT_AT: string;
377
- ID: string;
378
- CURRENT_PAGE: string;
379
- UNREAD: string;
380
- HIDE_MESSAGES_FROM_BLOCKED_USER: string;
381
- SEARCH_KEY: string;
382
- ONLY_UPDATES: string;
383
- UPDATED_AT: string;
384
- CATEGORY: string;
385
- CATEGORIES: string;
386
- TYPE: string;
387
- TYPES: string;
388
- HIDE_REPLIES: string;
389
- HIDE_DELETED_MESSAGES: string;
390
- WITH_TAGS: string;
391
- TAGS: string;
392
- };
393
- };
394
- };
395
- static APP_SETTINGS: {
396
- APP_SETTINGS: string;
397
- KEYS: {
398
- CHAT_HOST: string;
399
- CHAT_USE_SSL: string;
400
- GROUP_SERVICE: string;
401
- CALL_SERVICE: string;
402
- CHAT_WS_PORT: string;
403
- CHAT_WSS_PORT: string;
404
- CHAT_HTTP_BIND_PORT: string;
405
- CHAT_HTTPS_BIND_PORT: string;
406
- ADMIN_API_HOST: string;
407
- CLIENT_API_HOST: string;
408
- WEBRTC_HOST: string;
409
- WEBRTC_USE_SSL: string;
410
- WEBRTC_WS_PORT: string;
411
- WEBRTC_WSS_PORT: string;
412
- WEBRTC_HTTP_BIND_PORT: string;
413
- WEBRTC_HTTPS_BIND_PORT: string;
414
- EXTENSION_LIST: string;
415
- EXTENSION_KEYS: {
416
- ID: string;
417
- NAME: string;
418
- };
419
- JID_HOST_OVERRIDE: string;
420
- CHAT_HOST_OVERRIDE: string;
421
- CHAT_HOST_APP_SPECIFIC: string;
422
- MODE: string;
423
- CONNECTION_TYPE: string;
424
- DEFAULT_MODE: string;
425
- LIMITED_TRANSIENT: string;
426
- NO_TRANSIENT: string;
427
- POLLING_ENABLED: string;
428
- POLLING_INTERVAL: string;
429
- ANALYTICS_PING_DISABLED: string;
430
- ANALYTICS_HOST: string;
431
- ANALYTICS_VERSION: string;
432
- ANALYTICS_USE_SSL: string;
433
- SETTINGS_HASH: string;
434
- SETTINGS_HASH_RECEIVED_AT: string;
435
- DENY_FALLBACK_TO_POLLING: string;
436
- APP_VERSION: string;
437
- MAIN_DOMAIN: string;
438
- CHAT_API_VERSION: string;
439
- WS_API_VERSION: string;
440
- REGION: string;
441
- EXTENSION_DOMAIN: string;
442
- WEBRTC_API_SUBDOMAIN: string;
443
- WEBRTC_WEB_FRONTEND_HOST: string;
444
- WEBRTC_WEB_FRONTEND_VERSION: string;
445
- };
446
- };
447
- static GroupConstants: {
448
- KEYS: {
449
- NAME: string;
450
- GUID: string;
451
- TYPE: string;
452
- PASSWORD: string;
453
- ICON: string;
454
- DESCRIPTION: string;
455
- OWNER: string;
456
- METADATA: string;
457
- CREATED_AT: string;
458
- UPDATED_AT: string;
459
- HAS_JOINED: string;
460
- WS_CHANNEL: string;
461
- TAGS: string;
462
- };
463
- };
464
- static TYPING_NOTIFICATION: {
465
- RECEIVER_ID: string;
466
- RECEIVER_TYPE: string;
467
- META: string;
468
- KEYS: {
469
- TYPING_NOTIFICATION: string;
470
- TIMESTAMP: string;
471
- };
472
- ACTIONS: {
473
- STARTED: string;
474
- ENDED: string;
475
- };
476
- };
477
- static PresenceConstatnts: {
478
- STATUS: {
479
- ONLINE: string;
480
- AVAILABLE: string;
481
- OFFLINE: string;
482
- JOINED: string;
483
- LEFT: string;
484
- };
485
- };
486
- static APPINFO: {
487
- platform: string;
488
- sdkVersion: string;
489
- apiVersion: string;
490
- sdkVersionWithUnderScore: string;
491
- };
492
- static UserConstants: {
493
- UID: string;
494
- NAME: string;
495
- AUTH_TOKEN: string;
496
- AVATAR: string;
497
- LAST_ACTIVE_AT: string;
498
- LINK: string;
499
- META_DATA: string;
500
- ROLE: string;
501
- STATUS: string;
502
- STATUS_MESSAGE: string;
503
- USER_NAME: string;
504
- TAGS: string;
505
- SORT_BY: {
506
- NAME: string;
507
- STATUS: string;
508
- };
509
- SORT_ORDER: {
510
- ASCENDING: string;
511
- DESCENDING: string;
512
- };
513
- };
514
- static GENERAL_ERROR: {
515
- MUST_BE_A_STRING: {
516
- code: string;
517
- name: string;
518
- message: string;
519
- details: {};
520
- };
521
- MUST_BE_A_NUMBER: {
522
- code: string;
523
- name: string;
524
- message: string;
525
- details: {};
526
- };
527
- MUST_BE_A_OBJECT: {
528
- code: string;
529
- name: string;
530
- message: string;
531
- details: {};
532
- };
533
- MUST_BE_AN_ARRAY: {
534
- code: string;
535
- name: string;
536
- message: string;
537
- details: {};
538
- };
539
- MUST_BE_A_BOOLEAN: {
540
- code: string;
541
- name: string;
542
- message: string;
543
- details: {};
544
- };
545
- MUST_BE_A_BLOB: {
546
- code: string;
547
- name: string;
548
- message: string;
549
- details: {};
550
- };
551
- INVALID: {
552
- code: string;
553
- name: string;
554
- message: string;
555
- details: {};
556
- };
557
- METHOD_COMPULSORY: {
558
- code: string;
559
- name: string;
560
- message: string;
561
- details: {};
562
- };
563
- LIMIT_EXCEEDED: {
564
- code: string;
565
- name: string;
566
- message: string;
567
- details: {};
568
- };
569
- MUST_BE_A_POSITIVE_NUMBER: {
570
- code: string;
571
- name: string;
572
- message: string;
573
- details: {};
574
- };
575
- INVALID_MEDIA_FILE: {
576
- code: string;
577
- name: string;
578
- message: string;
579
- details: {};
580
- };
581
- EMPTY_STRING: {
582
- code: string;
583
- name: string;
584
- message: string;
585
- details: {};
586
- };
587
- MISSING_KEY: {
588
- code: string;
589
- name: string;
590
- message: string;
591
- details: {};
592
- };
593
- EMPTY_ARRAY: {
594
- code: string;
595
- name: string;
596
- message: string;
597
- details: {};
598
- };
599
- INVALID_SEARCH_KEYWORD: {
600
- code: string;
601
- name: string;
602
- message: string;
603
- details: {};
604
- };
605
- INVALID_GROUP_PROPERTY: {
606
- code: string;
607
- name: string;
608
- message: string;
609
- details: {};
610
- };
611
- INVALID_USER_PROPERTY: {
612
- code: string;
613
- name: string;
614
- message: string;
615
- details: {};
616
- };
617
- PARAMETER_MUST_BE_A_NUMBER: {
618
- code: string;
619
- name: string;
620
- message: string;
621
- details: {};
622
- };
623
- PARAMETER_MUST_BE_AN_ARRAY: {
624
- code: string;
625
- name: string;
626
- message: string;
627
- details: {};
628
- };
629
- PARAMETER_MUST_BE_A_BOOLEAN: {
630
- code: string;
631
- name: string;
632
- message: string;
633
- details: {};
634
- };
635
- PARAMETER_MUST_BE_A_POSITIVE_NUMBER: {
636
- code: string;
637
- name: string;
638
- message: string;
639
- details: {};
640
- };
641
- PARAMETER_MUST_BE_A_STRING: {
642
- code: string;
643
- name: string;
644
- message: string;
645
- details: {};
646
- };
647
- PARAMETER_COMPULSORY: {
648
- code: string;
649
- name: string;
650
- message: string;
651
- details: {};
652
- };
653
- PASSWORD_COMPULSORY: {
654
- code: string;
655
- name: string;
656
- message: string;
657
- details: {};
658
- };
659
- INVALID_ARRAY: {
660
- code: string;
661
- name: string;
662
- message: string;
663
- details: {};
664
- };
665
- };
666
- static ConversationErrors: {
667
- INVALID_CONVERSATION_TYPE: {
668
- code: string;
669
- name: string;
670
- message: string;
671
- details: string;
672
- };
673
- CONVERSATION_NOT_FOUND: {
674
- code: string;
675
- name: string;
676
- message: string;
677
- details: string;
678
- };
679
- };
680
- static LOCAL_STORE: {
681
- COMMON_STORE: string;
682
- MESSAGE_LISTENERS_LIST: string;
683
- USERS_STORE: string;
684
- MESSAGES_STORE: string;
685
- KEYS_STORE: string;
686
- STORE_STRING: string;
687
- KEY_STRING: string;
688
- KEY_USER: string;
689
- KEY_APP_SETTINGS: string;
690
- KEY_APP_ID: string;
691
- KEY_DEVICE_ID: string;
692
- KEY_MESSAGE_LISTENER_LIST: string;
693
- };
694
- static SDKHeader: {
695
- platform: string;
696
- sdkVersion: string;
697
- sdk: string;
698
- };
699
- static Errors: {
700
- ERROR_IO_EXCEPTION: string;
701
- ERROR_JSON_EXCEPTION: string;
702
- ERROR_PASSWORD_MISSING: string;
703
- ERROR_LIMIT_EXCEEDED: string;
704
- ERROR_USER_NOT_LOGGED_IN: string;
705
- ERROR_INVALID_GUID: string;
706
- ERROR_PASSWORD_MISSING_MESSAGE: string;
707
- ERROR_LIMIT_EXCEEDED_MESSAGE: string;
708
- ERROR_USER_NOT_LOGGED_IN_MESSAGE: string;
709
- ERROR_INVALID_GUID_MESSAGE: string;
710
- ERROR_DEFAULT_MESSAGE: string;
711
- ERR_SETTINGS_HASH_OUTDATED: string;
712
- ERR_NO_AUTH: string;
713
- };
714
- static SESSION_STORE: {
715
- SESSION_ID: string;
716
- };
717
- static ExtensionErrors: {
718
- INVALID_EXTENSION: {
719
- code: string;
720
- name: string;
721
- message: string;
722
- details: {};
723
- };
724
- EXTENSION_NOT_FOUND: {
725
- code: string;
726
- name: string;
727
- message: string;
728
- details: {};
729
- };
730
- };
731
- static FeatureRestrictionErrors: {
732
- INVALID_FEATURE: {
733
- code: string;
734
- name: string;
735
- message: string;
736
- details: {};
737
- };
738
- FEATURE_NOT_FOUND: {
739
- code: string;
740
- name: string;
741
- message: string;
742
- details: {};
743
- };
744
- };
745
- static WS: {
746
- CONVERSATION: {
747
- TYPE: {
748
- CHAT: string;
749
- GROUP_CHAT: string;
750
- };
751
- };
752
- };
753
- static JWT_API: {
754
- KEYS: {
755
- PASSTHROUGH: string;
756
- EXPAND: string;
757
- };
758
- };
759
- static PROSODY_API: {
760
- DOMAIN_PREFIX: string;
761
- PATH: {
762
- ROOM: string;
763
- ROOM_SIZE: string;
764
- SESSIONS: string;
765
- };
766
- RESPONSE: {
767
- PARTICIPANTS: string;
768
- };
769
- QUERY_PARAMETERS: {
770
- DOMAIN: string;
771
- ROOM: string;
772
- };
773
- };
774
- static ProsodyApiErrors: {
775
- INVALID_SESSIONID: {
776
- code: string;
777
- name: string;
778
- message: string;
779
- details: string;
780
- };
781
- INVALID_TYPE: {
782
- code: string;
783
- name: string;
784
- message: string;
785
- details: string;
786
- };
787
- };
788
- static ONLINE_MEMBER_COUNT_API: {
789
- ENDPOINTS: {
790
- GET_ONLINE_MEMBER_COUNT: string;
791
- };
792
- RESPONSE: {
793
- ONLINE_USERS_COUNT: string;
794
- GROUPS: string;
795
- };
796
- ERRORS: {
797
- INVALID_GROUPLIST: {
798
- code: string;
799
- name: string;
800
- message: string;
801
- details: string;
802
- };
803
- };
804
- };
805
- static ReceiptErrors: {
806
- MISSING_PARAMETERS: {
807
- code: string;
808
- name: string;
809
- message: string;
810
- details: {};
811
- };
812
- INVALID_PARAMETER: {
813
- code: string;
814
- name: string;
815
- message: string;
816
- details: {};
817
- };
818
- NO_WEBSOCKET_CONNECTION: {
819
- code: string;
820
- name: string;
821
- message: string;
822
- details: {};
823
- };
824
- RECEIPTS_TEMPORARILY_BLOCKED: {
825
- code: string;
826
- name: string;
827
- message: string;
828
- details: {};
829
- };
830
- UNKNOWN_ERROR_OCCURRED: {
831
- code: string;
832
- name: string;
833
- message: string;
834
- details: {};
835
- };
836
- };
837
- static ANALYTICS: {
838
- analyticsHost: string;
839
- analyticsVersion: string;
840
- };
841
- static API_ERROR_CODES: {
842
- AUTH_ERR_AUTH_TOKEN_NOT_FOUND: string;
843
- };
844
- static ATTACHMENTS_CONSTANTS: {
845
- KEYS: {
846
- EXTENSION: string;
847
- MIME_TYPE: string;
848
- NAME: string;
849
- SIZE: string;
850
- URL: string;
851
- };
852
- };
853
- static BlockedUsersConstants: {
854
- REQUEST_KEYS: {
855
- DIRECTIONS: {
856
- BOTH: string;
857
- HAS_BLOCKED_ME: string;
858
- BLOCKED_BY_ME: string;
859
- };
860
- };
861
- };
862
- static CALLING_COMPONENT_VERSION: number;
863
- static COMMON_UTILITY_CONSTANTS: {
864
- TYPE_CONSTANTS: {
865
- BOOLEAN: string;
866
- STRING: string;
867
- OBJECT: string;
868
- NUMBER: string;
869
- };
870
- };
871
- static DEFAULT_VALUES: {
872
- ZERO: number;
873
- MSGS_LIMIT: number;
874
- MSGS_MAX_LIMIT: number;
875
- USERS_LIMIT: number;
876
- USERS_MAX_LIMIT: number;
877
- GROUPS_LIMIT: number;
878
- GROUPS_MAX_LIMIT: number;
879
- CONVERSATION_MAX_LIMIT: number;
880
- CALL_TIMEOUT: number;
881
- DEFAULT_MSG_ID: number;
882
- DEFAULT_MAX_TYPING_INDICATOR_LIMIT: number;
883
- REGION_DEFAULT: string;
884
- REGION_DEFAULT_EU: string;
885
- REGION_DEFAULT_US: string;
886
- REGION_DEFAULT_IN: string;
887
- REGION_DEFAULT_PRIVATE: string;
888
- };
889
- static DELIVERY_RECEIPTS: {
890
- RECEIVER_ID: string;
891
- RECEIVER_TYPE: string;
892
- RECIPIENT: string;
893
- MESSAGE_ID: string;
894
- RECEIVED: string;
895
- DELIVERED_AT: string;
896
- ID: string;
897
- TIME: string;
898
- DELIVERED_TO_ME_AT: string;
899
- };
900
- static GroupErrors: {
901
- NOT_A_GROUP: CometChatException;
902
- INVALID_SCOPE: CometChatException;
903
- INVALID_GROUP_TYPE: CometChatException;
904
- };
905
- static GroupMemersConstans: {
906
- KEYS: {
907
- SCOPE: string;
908
- UID: string;
909
- GUID: string;
910
- USER: string;
911
- NAME: string;
912
- };
913
- };
914
- static MessageCategory: typeof MessageCategory;
915
- static MessageErrors: {
916
- INVALID_RECEIVER_TYPE: {
917
- code: string;
918
- name: string;
919
- message: string;
920
- details: string;
921
- };
922
- };
923
- static PARAMETER_ERROR: {
924
- PARAMETER_REQUIRED: {
925
- code: string;
926
- name: string;
927
- message: string;
928
- details: {};
929
- };
930
- };
931
- static READ_RECEIPTS: {
932
- RECEIVER_ID: string;
933
- RECEIVER_TYPE: string;
934
- RECIPIENT: string;
935
- MESSAGE_ID: string;
936
- READ: string;
937
- READ_AT: string;
938
- ID: string;
939
- TIME: string;
940
- READ_BY_ME_AT: string;
941
- };
942
- static UserErrors: {
943
- INVALID_STATUS: CometChatException;
944
- INVALID_DIRECTION: CometChatException;
945
- USER_NOT_LOGGED_IN: CometChatException;
946
- };
947
- static constants: {
948
- DEFAULT_STORE: string;
949
- MSG_VER_PRE: string;
950
- MSG_VER_POST: string;
951
- };
952
- private static initialzed;
953
- static CometChatException: typeof CometChatException;
954
- static TextMessage: typeof TextMessage;
955
- static MediaMessage: typeof MediaMessage;
956
- static CustomMessage: typeof CustomMessage;
957
- static BaseMessage: typeof BaseMessage;
958
- static Action: typeof Action;
959
- static Call: typeof Call;
960
- static TypingIndicator: typeof TypingIndicator;
961
- static TransientMessage: typeof TransientMessage;
962
- static Group: typeof Group;
963
- static User: typeof User;
964
- static GroupMember: typeof GroupMember;
965
- static Conversation: typeof Conversation;
966
- static USER_STATUS: {
967
- ONLINE: string;
968
- OFFLINE: string;
969
- };
970
- static MessagesRequest: typeof MessagesRequest;
971
- static MessagesRequestBuilder: typeof MessagesRequestBuilder;
972
- static UsersRequest: typeof UsersRequest;
973
- static UsersRequestBuilder: typeof UsersRequestBuilder;
974
- static ConversationsRequest: typeof ConversationsRequest;
975
- static ConversationsRequestBuilder: typeof ConversationsRequestBuilder;
976
- static BlockedUsersRequest: typeof BlockedUsersRequest;
977
- static BlockedUsersRequestBuilder: typeof BlockedUsersRequestBuilder;
978
- static GroupsRequest: typeof GroupsRequest;
979
- static GroupsRequestBuilder: typeof GroupsRequestBuilder;
980
- static GroupMembersRequest: typeof GroupMembersRequest;
981
- static GroupMembersRequestBuilder: typeof GroupMembersRequestBuilder;
982
- static BannedMembersRequest: typeof BannedMembersRequest;
983
- static BannedMembersRequestBuilder: typeof BannedMembersRequestBuilder;
984
- static CallSettings: typeof CallSettings;
985
- static CallSettingsBuilder: typeof CallSettingsBuilder;
986
- static MainVideoContainerSetting: typeof MainVideoContainerSetting;
987
- static VirtualBackground: typeof VirtualBackground;
988
- static VirtualBackgroundBuilder: typeof VirtualBackgroundBuilder;
989
- static AppSettings: typeof AppSettings;
990
- static AppSettingsBuilder: typeof AppSettingsBuilder;
991
- static MessageListener: typeof MessageListener;
992
- static UserListener: typeof UserListener;
993
- static GroupListener: typeof GroupListener;
994
- static OngoingCallListener: typeof OngoingCallListener;
995
- static CallListener: typeof CallListener;
996
- static ConnectionListener: typeof ConnectionListener;
997
- static LoginListener: typeof LoginListener;
998
- static CallController: typeof CallController;
999
- static CometChatHelper: typeof CometChatHelper;
1000
- static Attachment: typeof Attachment;
1001
- static MediaDevice: typeof MediaDevice;
1002
- static MESSAGE_TYPE: {
1003
- TEXT: string;
1004
- MEDIA: string;
1005
- IMAGE: string;
1006
- VIDEO: string;
1007
- AUDIO: string;
1008
- FILE: string;
1009
- CUSTOM: string;
1010
- };
1011
- static CATEGORY_MESSAGE: string;
1012
- static CATEGORY_ACTION: string;
1013
- static CATEGORY_CALL: string;
1014
- static CATEGORY_CUSTOM: string;
1015
- static ACTION_TYPE: {
1016
- MEMBER_ADDED: string;
1017
- MEMBER_JOINED: string;
1018
- MEMBER_LEFT: string;
1019
- MEMBER_KICKED: string;
1020
- MEMBER_BANNED: string;
1021
- MEMBER_UNBANNED: string;
1022
- MEMBER_INVITED: string;
1023
- MEMBER_SCOPE_CHANGED: string;
1024
- MESSAGE_EDITED: string;
1025
- MESSSAGE_DELETED: string;
1026
- TYPE_USER: string;
1027
- TYPE_GROUP: string;
1028
- TYPE_GROUP_MEMBER: string;
1029
- };
1030
- static CALL_TYPE: {
1031
- AUDIO: string;
1032
- VIDEO: string;
1033
- };
1034
- static SORT_BY: {
1035
- NAME: string;
1036
- STATUS: string;
1037
- };
1038
- static SORT_ORDER: {
1039
- ASCENDING: string;
1040
- DESCENDING: string;
1041
- };
1042
- static CALL_MODE: {
1043
- DEFAULT: string;
1044
- SPOTLIGHT: string;
1045
- SINGLE: string;
1046
- TILE: string;
1047
- GRID: string;
1048
- };
1049
- static RECEIVER_TYPE: {
1050
- USER: string;
1051
- GROUP: string;
1052
- };
1053
- static CONNECTION_STATUS: {
1054
- CONNECTED: string;
1055
- CONNECTING: string;
1056
- DISCONNECTED: string;
1057
- FEATURE_THROTTLED: string;
1058
- };
1059
- static CALL_STATUS: {
1060
- INITIATED: string;
1061
- ONGOING: string;
1062
- UNANSWERED: string;
1063
- REJECTED: string;
1064
- BUSY: string;
1065
- CANCELLED: string;
1066
- ENDED: string;
1067
- };
1068
- static GROUP_MEMBER_SCOPE: {
1069
- ADMIN: string;
1070
- MODERATOR: string;
1071
- PARTICIPANT: string;
1072
- };
1073
- static GROUP_TYPE: {
1074
- PUBLIC: string;
1075
- PRIVATE: string;
1076
- PROTECTED: string;
1077
- PASSWORD: string;
1078
- };
1079
- /** @internal */ static MESSAGE_REQUEST: {
1080
- ID: string;
1081
- SENT_AT: string;
1082
- };
1083
- /** @internal */ static user?: Me | any;
1084
- private static appId;
1085
- private static apiKey?;
1086
- private static authToken?;
1087
- private static cometChat;
1088
- private static keyStore;
1089
- private static localStorage;
1090
- /** @internal */ static appSettings: AppSettings;
1091
- private static WSReconnectionInProgress;
1092
- private static WSReconnectionTimer;
1093
- private static WSReconnectionTimerInterval;
1094
- private static currentConnectionStatus;
1095
- /** @internal */ static resource: string;
1096
- /** @internal */ static platform: string;
1097
- /** @internal */ static language: string;
1098
- private static mode;
1099
- private static sessionId;
1100
- private static isConnectingFromInit;
1101
- private static loginInProgress;
1102
- private static internalRestart;
1103
- private static settingsInterval;
1104
- private static isAnalyticsPingStarted;
1105
- private static analyticsPingTimer;
1106
- private static isLoggedOut;
1107
- private static isAnalyticsDisabled;
1108
- private static jwt;
1109
- private static settingsHash;
1110
- private static settingsHashReceivedAt;
1111
- private static disconnectedByUser;
1112
- private static shouldConnectToWS;
1113
- /**
1114
- * Creates an instance of CometChat.
1115
- * @param {string} appId
1116
- * @memberof CometChat
1117
- */
1118
- private constructor();
1119
- /**
1120
- * Setter method for CometChat authToken.
1121
- * @internal
1122
- * @param {string} authToken
1123
- * @memberof CometChat
1124
- */
1125
- static setAuthToken(authToken: string): void;
1126
- /**
1127
- *Getter method for CometChat authToken.
1128
- * @internal
1129
- * @returns
1130
- * @memberof CometChat
1131
- */
1132
- getAuthToken(): string;
1133
- /**
1134
- * Getter for appId
1135
- * @internal
1136
- * @returns {string}
1137
- */
1138
- static getAppId(): string;
1139
- /**
1140
- *Getter for apiKey.
1141
- * @internal
1142
- * @returns
1143
- * @memberof CometChat
1144
- */
1145
- getApiKey(): string;
1146
- /**
1147
- *Getter method for CometChat mode.
1148
- * @internal
1149
- * @returns
1150
- * @memberof CometChat
1151
- */
1152
- static getMode(): string;
1153
- /**
1154
- *Setter method for CometChat mode.
1155
- * @internal
1156
- * @returns
1157
- * @memberof CometChat
1158
- */
1159
- static setMode(mode: string): void;
1160
- /**
1161
- * Getter for sessionId.
1162
- * @internal
1163
- * @returns
1164
- * @memberof CometChat
1165
- */
1166
- static getSessionId(): string;
1167
- /**
1168
- * Storage event when a key is added/updated in localstorage.
1169
- * @internal
1170
- * @memberof CometChat
1171
- */
1172
- static onStorageEvent(storageEvent: any): void;
1173
- /**
1174
- * This method triggers before a page unloads.
1175
- * @internal
1176
- * @memberof CometChat
1177
- */
1178
- static beforeUnload(unloadEvent: any): void;
1179
- /**
1180
- * This method checks if Analytics Ping has started.
1181
- * @internal
1182
- * @returns {boolean}
1183
- */
1184
- static didAnalyticsPingStart(): boolean;
1185
- /**
1186
- * This method gets data from session storage.
1187
- * @internal
1188
- * @returns {string | null}
1189
- * @memberof CometChat
1190
- */
1191
- static getDataFromSessionStorage(key: any): string;
1192
- /**
1193
- * This method adds data in the session storage.
1194
- * @internal
1195
- * @memberof CometChat
1196
- */
1197
- static addDataToSessionStorage(key: any, value: any): void;
1198
- /**
1199
- * This method removes data from the session storage.
1200
- * @internal
1201
- * @memberof CometChat
1202
- */
1203
- static removeDataFromSessionStorage(key: any): void;
1204
- /**--------------------------------*
1205
- * Core apis
1206
- * --------------------------------**/
1207
- /**
1208
- * Initialize the CometChat app with appId & Object of AppSettings Class.
1209
- * @param {string} appId
1210
- * @param {AppSettings} appSettings
1211
- * @returns {CometChat}
1212
- * @memberof CometChat
1213
- */
1214
- static init(appId: any, appSettings: AppSettings): Promise<boolean>;
1215
- /**
1216
- * Function to check whether CometChat class initialized before.
1217
- * @returns {boolean}
1218
- * @memberof CometChat
1219
- */
1220
- static isInitialized(): boolean;
1221
- /**
1222
- * Returns the singleton object of CometChat class. If CometChat object is not created yet? it will create and returns it.
1223
- *
1224
- * @internal
1225
- * @param {string} appId - An optional argument needed for first time initialization.
1226
- * @returns {CometChat}
1227
- */
1228
- static getInstance(appId?: string): CometChat;
1229
- /**
1230
- * Function to register the FCM token for Push Notification.
1231
- * @param {string} token
1232
- * @param {JSON Object} Settings
1233
- * @returns {Promise<string>}
1234
- * @memberof CometChat
1235
- */
1236
- static registerTokenForPushNotification(token: string, settings?: {}): Promise<string>;
1237
- /**
1238
- * Function which publishes events to the Login Listener.
1239
- * @internal
1240
- * @param {User | CometChatException} data
1241
- * @param {string} status
1242
- * @memberof CometChat
1243
- */
1244
- private static pushToLoginListener;
1245
- /**
1246
- * Login funtion will authenticate user provided as an argument. There are two ways to login:
1247
- * 1. using UID and authKey (unsecure way)
1248
- * 2. using authToken (secure way)
1249
- * @param {...string[]} args
1250
- * @returns {User | CometChatException}
1251
- * @memberof CometChat
1252
- */
1253
- static login(...args: any): Promise<User>;
1254
- /**-------------------------------------------------------------------*
1255
- * Message related functions provided by CometChat class *
1256
- *--------------------------------------------------------------------**/
1257
- /**
1258
- * Function to send message.
1259
- * @param {TextMessage | MediaMessage | CustomMessage | any} message
1260
- * @returns {Message | any}
1261
- * @memberof CometChat
1262
- */
1263
- static sendMessage(message: TextMessage | MediaMessage | CustomMessage | any): Promise<TextMessage | MediaMessage | CustomMessage | BaseMessage>;
1264
- /**
1265
- * Function to send a message to user.
1266
- * @internal
1267
- * @param {*} message Object
1268
- * @returns
1269
- * @memberof CometChat
1270
- */
1271
- static sendDirectMessage(message: Object): Promise<TextMessage | BaseMessage | MediaMessage | CustomMessage>;
1272
- /**
1273
- * Function to send a message to group.
1274
- * @internal
1275
- * @param {*} message
1276
- * @returns
1277
- * @memberof CometChat
1278
- */
1279
- static sendGroupMessage(message: any): Promise<TextMessage | BaseMessage | MediaMessage | CustomMessage>;
1280
- /**
1281
- * Function to send a media message.
1282
- * @param {MediaMessage} message
1283
- * @returns {Message | any}
1284
- * @memberof CometChat
1285
- */
1286
- static sendMediaMessage(message: Object): Promise<TextMessage | BaseMessage | MediaMessage | CustomMessage>;
1287
- /**
1288
- *
1289
- * Function to send a custom message.
1290
- * @param {CustomMessage} message
1291
- * @returns {Message | any}
1292
- * @memberof CometChat
1293
- */
1294
- static sendCustomMessage(message: CustomMessage): Promise<TextMessage | BaseMessage | MediaMessage | CustomMessage>;
1295
- /**
1296
- *
1297
- * Function to get the last delivered message id from local storage.
1298
- * @returns {any}
1299
- * @memberof CometChat
1300
- */
1301
- static getLastDeliveredMessageId(): Promise<any>;
1302
- /**
1303
- * Function to send start typing notification to the provided uid/ guid.
1304
- * @param {TypingIndicator | any} typingNotification
1305
- * @memberof CometChat
1306
- */
1307
- static startTyping(typingNotification: TypingIndicator | any): void;
1308
- /**
1309
- * Function to send stop typing notification to the provided uid/ guid.
1310
- * @param {TypingIndicator | any} typingNotification
1311
- * @memberof CometChat
1312
- */
1313
- static endTyping(typingNotification: TypingIndicator | any): void;
1314
- /**
1315
- * Mark all messages upto a specified message id as read. There are two ways markAsRead works:
1316
- * 1. message
1317
- * 2. messageID, receiverID, receiverType, senderID
1318
- * @param {...string[]} args
1319
- * @memberof CometChat
1320
- */
1321
- static markAsRead(...args: any): any;
1322
- /**
1323
- * Mark all messages upto a specified message id as delivered. There are two ways markAsDelivered works:
1324
- * 1. message
1325
- * 2. messageID, receiverID, receiverType, senderID
1326
- * @param {...string[]} args
1327
- * @memberof CometChat
1328
- */
1329
- static markAsDelivered(...args: any): any;
1330
- /**
1331
- * Send a transient message.
1332
- * @param {string} uid
1333
- * @param {string} receiverType
1334
- * @memberof CometChat
1335
- */
1336
- static sendTransientMessage(transientMessage: TransientMessage): void;
1337
- /**
1338
- * Triggers the onTextMessageReceived event.
1339
- * @internal
1340
- * @param {any} message
1341
- * @memberof CometChat
1342
- */
1343
- static sendTestMessage(message: any): Promise<void>;
1344
- /**
1345
- * Function to fetch message details for the provided messageID.
1346
- * @param {string | any} messageId
1347
- * @returns {Message | any}
1348
- * @memberof CometChat
1349
- */
1350
- static getMessageDetails(messageId: string | any): Promise<TextMessage | MediaMessage | CustomMessage | BaseMessage>;
1351
- /**
1352
- * Function to fetch message receipt details for the provided messageID.
1353
- * @param {string | any} messageId
1354
- * @returns {MessageReceipt[]}
1355
- * @memberof CometChat
1356
- */
1357
- static getMessageReceipts(messageId: string | any): Promise<Object>;
1358
- /**
1359
- * Function to fetch unread message count.
1360
- * @param {boolean} doHideMessages
1361
- * @returns {Object}
1362
- * @memberof CometChat
1363
- */
1364
- static getUnreadMessageCount(doHideMessages?: boolean): Promise<Object>;
1365
- /**
1366
- * Function to fetch unread message count for all users.
1367
- * @param {boolean} doHideMessages
1368
- * @returns {Object}
1369
- * @memberof CometChat
1370
- */
1371
- static getUnreadMessageCountForAllUsers(doHideMessages?: boolean): Promise<Object>;
1372
- /**
1373
- * Function to fetch unread message count for all groups.
1374
- * @param {boolean} doHideMessages
1375
- * @returns {Object}
1376
- * @memberof CometChat
1377
- */
1378
- static getUnreadMessageCountForAllGroups(doHideMessages?: boolean): Promise<Object>;
1379
- /**
1380
- * Function to fetch unread message count for a particular UID.
1381
- * @param {string} UID
1382
- * @param {boolean} doHideMessages
1383
- * @returns {Object}
1384
- * @memberof CometChat
1385
- */
1386
- static getUnreadMessageCountForUser(UID: string, doHideMessages?: boolean): Promise<Object>;
1387
- /**
1388
- * Function to fetch unread message count for a particular GUID.
1389
- * @param {string} GUID
1390
- * @param {boolean} doHideMessages
1391
- * @returns {Object}
1392
- * @memberof CometChat
1393
- */
1394
- static getUnreadMessageCountForGroup(GUID: string, doHideMessages?: boolean): Promise<Object>;
1395
- /**
1396
- * Funtion to edit a message.
1397
- * @param {BaseMessage} message
1398
- * @returns {Promise<BaseMessage>}
1399
- * @memberof CometChat
1400
- */
1401
- static editMessage(message: BaseMessage): Promise<BaseMessage>;
1402
- /**
1403
- * Funtion to delete a message.
1404
- * @param {string} messageId
1405
- * @returns {Promise<BaseMessage>}
1406
- * @memberof CometChat
1407
- */
1408
- static deleteMessage(messageId: string): Promise<BaseMessage>;
1409
- /**---------------------------------------------------------------------------------------*
1410
- * Online User/Group Member count related functions provided by CometChat class *
1411
- *----------------------------------------------------------------------------------------**/
1412
- /**
1413
- * This function will return online user count
1414
- *
1415
- * @returns {Promise<number>}
1416
- * @memberof CometChat
1417
- */
1418
- static getOnlineUserCount(): Promise<number>;
1419
- /**
1420
- * This function will return online group members count for given GUIDs
1421
- *
1422
- * @param {String[]} groups
1423
- * @returns {Promise<number>}
1424
- * @memberof CometChat
1425
- */
1426
- static getOnlineGroupMemberCount(groups: String[]): Promise<Object>;
1427
- /**-------------------------------------------------------------------*
1428
- * User related functions provided by CometChat class *
1429
- *--------------------------------------------------------------------**/
1430
- /**
1431
- * Function to create a user.
1432
- * @param {User | any} user
1433
- * @param {string} apiKey
1434
- * @returns {Promise<User>}
1435
- * @memberof CometChat
1436
- */
1437
- static createUser(user: User | any, apiKey: string): Promise<User>;
1438
- /**
1439
- *
1440
- * Function to update the already existing user and returns the result with updated user.
1441
- * @param {User | any} user
1442
- * @param {string} apiKey
1443
- * @returns {Promise<User>}
1444
- * @memberof CometChat
1445
- */
1446
- static updateUser(user: User | any, apiKey: string): Promise<User>;
1447
- /**
1448
- *
1449
- * function to update the logged-in user and returns the result with updated user
1450
- * @param {User} user
1451
- * @returns Promise<User>
1452
- * @memberof CometChat
1453
- */
1454
- static updateCurrentUserDetails(user: User | any): Promise<User>;
1455
- /**
1456
- * function to get the information for the uid provided as an argument
1457
- * @param {string} uid
1458
- * @returns {Promise<User>}
1459
- * @memberof CometChat
1460
- */
1461
- static getUser(uid: any): Promise<User>;
1462
- /**
1463
- *
1464
- * Function to check if logged-in user is available in local storage. If not present in local storage then fetch from API.
1465
- * @internal
1466
- * @returns {Promise<User | any>}
1467
- * @memberof CometChat
1468
- */
1469
- static getLoggedInUser(): Promise<User | any>;
1470
- /**
1471
- *
1472
- * This function will return logged in user from local storage.
1473
- * @returns {Promise<User | null>}
1474
- * @memberof CometChat
1475
- */
1476
- static getLoggedinUser(): Promise<User | null>;
1477
- /**
1478
- * Function to block users.
1479
- * @param {String[]} blockedUids
1480
- * @returns
1481
- * @memberof CometChat
1482
- */
1483
- static blockUsers(blockedUids: String[]): Promise<Object>;
1484
- /**
1485
- * Function to unblock users.
1486
- * @param {String[]} blockedUids
1487
- * @returns
1488
- * @memberof CometChat
1489
- */
1490
- static unblockUsers(blockedUids: String[]): Promise<Object>;
1491
- /**-------------------------------------------------------------------*
1492
- * Conversation related functions provided by CometChat class *
1493
- *--------------------------------------------------------------------**/
1494
- /**
1495
- * Function to fetch conversation for a specific user/group.
1496
- * @param {string} conversationWith
1497
- * @param {string} conversationType
1498
- * @returns {Promise<Conversation>}
1499
- * @memberof CometChat
1500
- */
1501
- static getConversation(conversationWith: string, conversationType: string): Promise<Conversation>;
1502
- /**
1503
- * Function to tag a conversation for a specific user/group.
1504
- * @param {string} conversationWith
1505
- * @param {string} conversationType
1506
- * @param {Array<String>} tags
1507
- * @returns {Promise<Conversation>}
1508
- * @memberof CometChat
1509
- */
1510
- static tagConversation(conversationWith: string, conversationType: string, tags?: Array<String>): Promise<Conversation>;
1511
- /**
1512
- * function to delete conversation for a specific user/group.
1513
- * @param {string} conversationWith
1514
- * @param {string} conversationType
1515
- * @returns Promise<string>
1516
- * @memberof CometChat
1517
- */
1518
- static deleteConversation(conversationWith: string, conversationType: string): Promise<string>;
1519
- /**-------------------------------------------------------------------*
1520
- * Group related functions provided by CometChat class *
1521
- *--------------------------------------------------------------------**/
1522
- /**
1523
- * Function to create a group.
1524
- * @param {Group} group
1525
- * @returns {Promise<Group>}
1526
- * @memberof CometChat
1527
- */
1528
- static createGroup(group: Group | any): Promise<Group>;
1529
- /**
1530
- * Function to fetch details of a group.
1531
- * @param {string | Object} guid
1532
- * @returns {Promise<Group>}
1533
- * @memberof CometChat
1534
- */
1535
- static getGroup(guid: string | Object): Promise<Group>;
1536
- /**
1537
- * Function to join a public group.
1538
- * @param {guid} guid
1539
- * @param {GroupType} type
1540
- * @param {string} password
1541
- * @returns {Promise<Group>}
1542
- * @memberof CometChat
1543
- */
1544
- static joinGroup(grp: any, type?: GroupType, password?: string): Promise<Group>;
1545
- /**
1546
- *
1547
- * Function to update a group.
1548
- * @param {Group} group
1549
- * @returns {Promise<Group>}
1550
- * @memberof CometChat
1551
- */
1552
- static updateGroup(group: any): Promise<Group>;
1553
- /**
1554
- *
1555
- * Function to delete a group.
1556
- * @param {string} guid
1557
- * @returns {Promise<boolean>}
1558
- * @memberof CometChat
1559
- */
1560
- static deleteGroup(guid: string): Promise<boolean>;
1561
- /**
1562
- * Function to leave a group.
1563
- * @param {string} guid
1564
- * @returns {Promise}
1565
- * @memberof CometChat
1566
- */
1567
- static leaveGroup(guid: string): Promise<boolean>;
1568
- /**
1569
- * Function to kick a member from a group.
1570
- * @param {string} guid
1571
- * @param {string} uid
1572
- * @returns {Promise<boolean>}
1573
- * @memberof CometChat
1574
- */
1575
- static kickGroupMember(guid: string, uid: string): Promise<boolean>;
1576
- /**
1577
- * Function to change the scope of a member in a group.
1578
- * @param {string} guid
1579
- * @param {string} uid
1580
- * @param {GroupMemberScope} scope
1581
- * @returns {Promise<boolean>}
1582
- * @memberof CometChat
1583
- */
1584
- static updateGroupMemberScope(guid: string, uid: string, scope: GroupMemberScope): Promise<boolean>;
1585
- /**
1586
- * Function to ban a group member from a group.
1587
- * @param {string} guid
1588
- * @param {string} uid
1589
- * @returns {Promise<boolean>}
1590
- * @memberof CometChat
1591
- */
1592
- static banGroupMember(guid: string, uid: string): Promise<boolean>;
1593
- /**
1594
- * Function to unban a group member from a group.
1595
- * @param {string} guid
1596
- * @param {string} uid
1597
- * @returns {Promise<boolean>}
1598
- * @memberof CometChat
1599
- */
1600
- static unbanGroupMember(guid: string, uid: string): Promise<boolean>;
1601
- /**
1602
- * Function to add members in a group. This function can also be used to ban a group member from a group.
1603
- * @param {string} guid
1604
- * @param {Array<GroupMember>} groupMembers
1605
- * @param {Array<String>} bannedMembersList
1606
- * @returns {Promise<Object>}
1607
- * @memberof CometChat
1608
- */
1609
- static addMembersToGroup(guid: string, groupMembers: Array<GroupMember>, bannedMembersList: Array<string>): Promise<Object>;
1610
- /**
1611
- *
1612
- * Function to transfer ownership of a group.
1613
- * @param {string} guid
1614
- * @param {string} uid
1615
- * @returns {Promise<string>}
1616
- * @memberof CometChat
1617
- */
1618
- static transferGroupOwnership(guid: string, uid: string): Promise<string>;
1619
- /**
1620
- * Function to create a group and add/ban members in/from that group.
1621
- * @param {Group} group
1622
- * @param {Array<GroupMember>} members
1623
- * @param {Array<String>} banMembers
1624
- * @returns {Promise<Object>}
1625
- * @memberof CometChat
1626
- */
1627
- static createGroupWithMembers(group: Group, members: Array<GroupMember>, banMembers: Array<string>): Promise<Object>;
1628
- /**-------------------------------------------------------------------*
1629
- * Call related functions provided by CometChat class *
1630
- *--------------------------------------------------------------------**/
1631
- /**
1632
- * Function to initiate a user/group call.
1633
- * @param {Call} call
1634
- * @returns {Promise<Call>}
1635
- * @memberof CometChat
1636
- */
1637
- static initiateCall(call: Call | any): Promise<Call>;
1638
- /**
1639
- * Function to accept an incoming user/group call.
1640
- * @param {string} sessionid
1641
- * @returns {Promise<Call>}
1642
- * @memberof CometChat
1643
- */
1644
- static acceptCall(sessionid: string): Promise<Call>;
1645
- /**
1646
- * Function to reject an incoming call or cancel an outgoing call.
1647
- * @param {string} sessionId
1648
- * @param {string} status
1649
- * @returns {Promise<Call>}
1650
- * @memberof CometChat
1651
- */
1652
- static rejectCall(sessionId: string, status: any): Promise<Call>;
1653
- /**
1654
- * Function to end an ongoing call.
1655
- * @param {string} sessionid
1656
- * @param {boolean} isInternal - Optional
1657
- * @returns {Promise<Call>}
1658
- * @memberof CometChat
1659
- */
1660
- static endCall(sessionid: string, isInternal?: boolean): Promise<Call>;
1661
- /**
1662
- * Function to get the active call.
1663
- * @returns {Call}
1664
- * @memberof CometChat
1665
- */
1666
- static getActiveCall(): Call;
1667
- /**
1668
- * Function to start a call.
1669
- * @param {CallSettings | string} callSettings
1670
- * @param {HTMLElement} view
1671
- * @param {UserCallEventListener} callEventHandler
1672
- * @memberof CometChat
1673
- */
1674
- static startCall(callSettings: CallSettings | string, view: HTMLElement, ongoingCallListener?: OngoingCallListener): void;
1675
- /**
1676
- * Function to fetch participant count of an ongoing call.
1677
- * @param {string} sessionId
1678
- * @param {string} type
1679
- * @returns {Promise<number>}
1680
- * @memberof CometChat
1681
- */
1682
- static getCallParticipantCount(sessionId: string, type: string): Promise<number>;
1683
- /**-------------------------------------------------------------------*
1684
- * Call related `helper` functions provided by CometChat class. *
1685
- * ---ONLY PRIVATE FUNCTION DO NOT MADE PUBLIC--- *
1686
- *--------------------------------------------------------------------**/
1687
- /**
1688
- * Function to reject an incoming call.
1689
- * @private
1690
- * @internal
1691
- * @param {string} sessionid
1692
- * @returns {Promise<Call>}
1693
- * @memberof CometChat
1694
- */
1695
- private static rejectIncomingCall;
1696
- /**
1697
- * Function to reject an outgoing call
1698
- * @private
1699
- * @internal
1700
- * @param {string} sessionid
1701
- * @returns {Promise<Call>}
1702
- * @memberof CometChat
1703
- */
1704
- private static cancelCall;
1705
- /**
1706
- * Function to send a busy response for an incoming call.
1707
- * @private
1708
- * @internal
1709
- * @param {string} sessionid
1710
- * @returns {Promise<Call>}
1711
- * @memberof CometChat
1712
- */
1713
- private static sendBusyResponse;
1714
- /**
1715
- * Function to send unanswered response if a call in not answered in a specific time interval.
1716
- * @internal
1717
- * @param {string} sessionid
1718
- * @returns {Promise<Call>}
1719
- * @memberof CometChat
1720
- */
1721
- static sendUnansweredResponse(sessionid: string): Promise<Call>;
1722
- /**-------------------------------------------------------------------------------------------------------*
1723
- * Events listeners setting and removing . *
1724
- *--------------------------------------------------------------------------------------------------------**/
1725
- /**
1726
- *
1727
- * Function to add a Connection Listner.
1728
- * @param {string} name
1729
- * @param {ConnectionListener} connectionListener
1730
- * @memberof CometChat
1731
- */
1732
- static addConnectionListener(name: string, connectionListener: ConnectionListener): void;
1733
- /**
1734
- *
1735
- * Function to remove a Connection Listner.
1736
- * @param {string} name
1737
- * @memberof CometChat
1738
- */
1739
- static removeConnectionListener(name: string): void;
1740
- /**
1741
- *
1742
- * Function to add a Message Listner.
1743
- * @param {string} name
1744
- * @param {MessageListener} messageListener
1745
- * @memberof CometChat
1746
- */
1747
- static addMessageListener(name: string, messageListener: MessageListener): void;
1748
- /**
1749
- *
1750
- * Function to remove a Message Listner.
1751
- * @param {string} name
1752
- * @memberof CometChat
1753
- */
1754
- static removeMessageListener(name: string): void;
1755
- /**
1756
- *
1757
- * Function to add a Call Listener.
1758
- * @param {string} name
1759
- * @param {CallListener} callListener
1760
- * @memberof CometChat
1761
- */
1762
- static addCallListener(name: string, callListener: CallListener): void;
1763
- /**
1764
- *
1765
- * Function to remove a Call Listener.
1766
- * @param {string} name
1767
- * @memberof CometChat
1768
- */
1769
- static removeCallListener(name: string): void;
1770
- /**
1771
- *
1772
- * Function to add a User Listener.
1773
- * @param {string} name
1774
- * @param {UserListener} userListener
1775
- * @memberof CometChat
1776
- */
1777
- static addUserListener(name: string, userListener: UserListener): void;
1778
- /**
1779
- *
1780
- * Function to remove a User Listener.
1781
- * @param {string} name
1782
- * @memberof CometChat
1783
- */
1784
- static removeUserListener(name: string): void;
1785
- /**
1786
- *
1787
- * Function to add a Group Listener.
1788
- * @param {string} name
1789
- * @param {GroupListener} groupListener
1790
- * @memberof CometChat
1791
- */
1792
- static addGroupListener(name: string, groupListener: GroupListener): void;
1793
- /**
1794
- *
1795
- * Function to remove a Group Listener.
1796
- * @param {string} name
1797
- * @memberof CometChat
1798
- */
1799
- static removeGroupListener(name: string): void;
1800
- /**
1801
- * Function to add a Login Listener.
1802
- *
1803
- * @param {string} name
1804
- * @param {LoginListener} loginListener
1805
- * @memberof CometChat
1806
- */
1807
- static addLoginListener(name: string, loginListener: LoginListener): void;
1808
- /**
1809
- * Function to remove a Login Listener.
1810
- *
1811
- * @param {string} name
1812
- * @memberof CometChat
1813
- */
1814
- static removeLoginListener(name: string): void;
1815
- /**------------------------------------*
1816
- * Private helper methods functions *
1817
- *-------------------------------------**/
1818
- /**
1819
- *
1820
- * ---SHOULD NOT BE MADE PUBLIC---
1821
- * Function to generate an Authtoken for the provided UID.
1822
- * @param {string} uid
1823
- * @returns {Promise<Object>}
1824
- * @memberof CometChat
1825
- */
1826
- private static generateAuthToken;
1827
- private static tryReconnectingToWS;
1828
- /**
1829
- *
1830
- * Function to make WebSocket Connection.
1831
- * @internal
1832
- */
1833
- makeWSConnection(): void;
1834
- /**
1835
- *
1836
- * Function is triggered when the WebSocket Connection is broken.
1837
- * @internal
1838
- */
1839
- accidentallyDisconnected(): void;
1840
- private static WSLogin;
1841
- private static pingAnalytics;
1842
- private static updateJWT;
1843
- private static startAnalyticsPingTimer;
1844
- /**
1845
- *
1846
- * Function to clear the analytical timer.
1847
- * @internal
1848
- */
1849
- static clearAnalyticsPingTimer(): void;
1850
- private static startWSReconnectionTimer;
1851
- private static clearWSReconnectionTimer;
1852
- private static getJWT;
1853
- /**
1854
- * Get the current connection status
1855
- * @returns {string}
1856
- * @memberof CometChat
1857
- */
1858
- static getConnectionStatus(): string;
1859
- /**
1860
- * Update the connection status.
1861
- * @internal
1862
- * @memberof CometChat
1863
- */
1864
- setConnectionStatus(connectionStatus: any): void;
1865
- /**
1866
- *
1867
- * Returns a boolean value which indicates if the extension is enabled or not.
1868
- * @param {string} extensionId
1869
- * @returns {Promise<boolean>}
1870
- * @memberof CometChat
1871
- */
1872
- static isExtensionEnabled(extensionId: string): Promise<boolean>;
1873
- /**
1874
- * Returns an object of CCExtension Class which has the details of the extension.
1875
- *
1876
- * @param {string} extensionId
1877
- * @returns {Promise<CCExtension>}
1878
- * @memberof CometChat
1879
- */
1880
- static getExtensionDetails(extensionId: string): Promise<CCExtension>;
1881
- /**
1882
- * Get the XMPP/ WEBRTC details from the servers
1883
- * @internal
1884
- * @returns {Promise<Object>}
1885
- * @memberof CometChat
1886
- */
1887
- static getAppSettings(): Promise<Object>;
1888
- /**
1889
- * Returns a boolean value which indicates if a feature is enabled or not for the current plan.
1890
- * @param {string} feature
1891
- * @returns {Promise<boolean>}
1892
- * @memberof CometChat
1893
- */
1894
- static isFeatureEnabled(feature: string): Promise<boolean>;
1895
- /**
1896
- * Clears the authtoken from server and clears the local cache.
1897
- * @returns {Promise<Object>}
1898
- * @memberof CometChat
1899
- */
1900
- static logout(): Promise<Object>;
1901
- /**
1902
- * Function to call extension API.
1903
- * @param {string} slug
1904
- * @param {string} method
1905
- * @param {string} endpoint
1906
- * @param {Object} data
1907
- * @returns {Promise<Object>}
1908
- * @memberof CometChat
1909
- */
1910
- static callExtension(slug: string, method: string, endpoint: string, data?: Object): Promise<Object>;
1911
- /**
1912
- * Function to set resource, platform and language variable.
1913
- * @param {string} resource
1914
- * @param {string} platform
1915
- * @param {string} language
1916
- * @memberof CometChat
1917
- */
1918
- static setSource(resource: string, platform: string, language: string): void;
1919
- /**
1920
- * Function to clear local storage.
1921
- * @internal
1922
- * @memberof CometChat
1923
- */
1924
- static clearCache(): Promise<unknown>;
1925
- /**
1926
- *
1927
- * Method to connect to WebSocket server.
1928
- *
1929
- * @static
1930
- * @returns void
1931
- * @memberof CometChat
1932
- */
1933
- static connect(): void;
1934
- /**
1935
- *
1936
- * Method to disconnect from WebSocket server.
1937
- *
1938
- * @static
1939
- * @returns void
1940
- * @memberof CometChat
1941
- */
1942
- static disconnect(): void;
1943
- /**
1944
- * @internal
1945
- * @param authToken
1946
- * @returns
1947
- */
1948
- internalRestart(authToken: any): void;
1949
- /**
1950
- * @internal
1951
- * @param pushToLoginListener
1952
- * @returns
1953
- */
1954
- internalLogout(pushToLoginListener?: boolean): Promise<unknown>;
1955
- }