@cometchat/chat-sdk-javascript 4.0.0-beta1

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 (140) hide show
  1. package/dist/.DS_Store +0 -0
  2. package/dist/CometChat.js +1 -0
  3. package/dist/index.d.ts +5894 -0
  4. package/dist/javascript-chat-sdk/.git/COMMIT_EDITMSG +1 -0
  5. package/dist/javascript-chat-sdk/.git/FETCH_HEAD +4 -0
  6. package/dist/javascript-chat-sdk/.git/HEAD +1 -0
  7. package/dist/javascript-chat-sdk/.git/ORIG_HEAD +1 -0
  8. package/dist/javascript-chat-sdk/.git/config +19 -0
  9. package/dist/javascript-chat-sdk/.git/description +1 -0
  10. package/dist/javascript-chat-sdk/.git/hooks/applypatch-msg.sample +15 -0
  11. package/dist/javascript-chat-sdk/.git/hooks/commit-msg.sample +24 -0
  12. package/dist/javascript-chat-sdk/.git/hooks/fsmonitor-watchman.sample +174 -0
  13. package/dist/javascript-chat-sdk/.git/hooks/post-update.sample +8 -0
  14. package/dist/javascript-chat-sdk/.git/hooks/pre-applypatch.sample +14 -0
  15. package/dist/javascript-chat-sdk/.git/hooks/pre-commit.sample +49 -0
  16. package/dist/javascript-chat-sdk/.git/hooks/pre-merge-commit.sample +13 -0
  17. package/dist/javascript-chat-sdk/.git/hooks/pre-push.sample +53 -0
  18. package/dist/javascript-chat-sdk/.git/hooks/pre-rebase.sample +169 -0
  19. package/dist/javascript-chat-sdk/.git/hooks/pre-receive.sample +24 -0
  20. package/dist/javascript-chat-sdk/.git/hooks/prepare-commit-msg.sample +42 -0
  21. package/dist/javascript-chat-sdk/.git/hooks/push-to-checkout.sample +78 -0
  22. package/dist/javascript-chat-sdk/.git/hooks/update.sample +128 -0
  23. package/dist/javascript-chat-sdk/.git/index +0 -0
  24. package/dist/javascript-chat-sdk/.git/info/exclude +6 -0
  25. package/dist/javascript-chat-sdk/.git/logs/HEAD +13 -0
  26. package/dist/javascript-chat-sdk/.git/logs/refs/heads/master +1 -0
  27. package/dist/javascript-chat-sdk/.git/logs/refs/heads/master-v3 +3 -0
  28. package/dist/javascript-chat-sdk/.git/logs/refs/heads/master-v4 +4 -0
  29. package/dist/javascript-chat-sdk/.git/logs/refs/remotes/origin/HEAD +1 -0
  30. package/dist/javascript-chat-sdk/.git/logs/refs/remotes/origin/master-v3 +2 -0
  31. package/dist/javascript-chat-sdk/.git/logs/refs/remotes/origin/master-v4 +2 -0
  32. package/dist/javascript-chat-sdk/.git/logs/refs/stash +1 -0
  33. package/dist/javascript-chat-sdk/.git/objects/09/b9e17d9a0acd55c3644f4cfa19b1c40a139018 +0 -0
  34. package/dist/javascript-chat-sdk/.git/objects/0f/2d8999b370e8ddb236f767aa565b2aa72a6b21 +0 -0
  35. package/dist/javascript-chat-sdk/.git/objects/15/7f5161e31be14c74df7907c9c5046fbbea4461 +0 -0
  36. package/dist/javascript-chat-sdk/.git/objects/17/89200f3f5621f9df6d08d1071c59557ce5a29d +0 -0
  37. package/dist/javascript-chat-sdk/.git/objects/26/1de108a0253f54cf37e8a072f7f5f0098c7e89 +4 -0
  38. package/dist/javascript-chat-sdk/.git/objects/43/7ffc94a259dcd818cca308ab60a2780714092d +1 -0
  39. package/dist/javascript-chat-sdk/.git/objects/4e/6ab6a981ea6dccdb60b6438d7ca142aef269fc +0 -0
  40. package/dist/javascript-chat-sdk/.git/objects/5e/04a3d79cebcc2b02c14ea807f839ea73d44461 +0 -0
  41. package/dist/javascript-chat-sdk/.git/objects/65/bbff4d1cccc12285ea1c59a6f2082552f0d034 +0 -0
  42. package/dist/javascript-chat-sdk/.git/objects/6a/a6ef178cb2e3775bb149aba99ace8399525da6 +0 -0
  43. package/dist/javascript-chat-sdk/.git/objects/6b/e1ffe406de9ebb698ea891315b2b1459160029 +0 -0
  44. package/dist/javascript-chat-sdk/.git/objects/6b/efb8e9de892be7ecee5d39c30c0aa17d43d727 +2 -0
  45. package/dist/javascript-chat-sdk/.git/objects/6e/f136ca41bbb5684639947fa121b7eebb795592 +0 -0
  46. package/dist/javascript-chat-sdk/.git/objects/87/96f6311621c3ee4fc8d37eeec64a6c94e3e6ca +0 -0
  47. package/dist/javascript-chat-sdk/.git/objects/8b/2d226d44814b7265b68ab7953a87cd44d77965 +0 -0
  48. package/dist/javascript-chat-sdk/.git/objects/9c/bc4afb06153fd276e240e709984bf1099386ba +0 -0
  49. package/dist/javascript-chat-sdk/.git/objects/a9/6c6710dfb57871b6eccda3a94d83990ba94d9f +0 -0
  50. package/dist/javascript-chat-sdk/.git/objects/ad/1b70a4bb12b3fe2e6306d2b0922582036f4e42 +0 -0
  51. package/dist/javascript-chat-sdk/.git/objects/c1/655387f263ec50dbef8042099eead57dfe00c2 +0 -0
  52. package/dist/javascript-chat-sdk/.git/objects/e0/ad85d968302e5447402ed4d0bc8ace931b9167 +0 -0
  53. package/dist/javascript-chat-sdk/.git/objects/e8/0b03094191c92690d5bb92b4271058f188efd1 +1 -0
  54. package/dist/javascript-chat-sdk/.git/objects/f0/cc86624ec0504ed24dcd6a7b2cdee917b73395 +2 -0
  55. package/dist/javascript-chat-sdk/.git/objects/f9/95e0e3dc98868eb6404f8cdd84632ae140e1ff +2 -0
  56. package/dist/javascript-chat-sdk/.git/objects/fb/d9b82e03d33337a8d2606fc9e2f1652ffda3de +0 -0
  57. package/dist/javascript-chat-sdk/.git/objects/pack/pack-efd6261f29a0c404693064c4a255aada38ddab72.idx +0 -0
  58. package/dist/javascript-chat-sdk/.git/objects/pack/pack-efd6261f29a0c404693064c4a255aada38ddab72.pack +0 -0
  59. package/dist/javascript-chat-sdk/.git/packed-refs +107 -0
  60. package/dist/javascript-chat-sdk/.git/refs/heads/master +1 -0
  61. package/dist/javascript-chat-sdk/.git/refs/heads/master-v3 +1 -0
  62. package/dist/javascript-chat-sdk/.git/refs/heads/master-v4 +1 -0
  63. package/dist/javascript-chat-sdk/.git/refs/remotes/origin/HEAD +1 -0
  64. package/dist/javascript-chat-sdk/.git/refs/remotes/origin/master-v3 +1 -0
  65. package/dist/javascript-chat-sdk/.git/refs/remotes/origin/master-v4 +1 -0
  66. package/dist/javascript-chat-sdk/.git/refs/stash +1 -0
  67. package/dist/javascript-chat-sdk/.gitignore +2 -0
  68. package/dist/javascript-chat-sdk/CometChat.d.ts +4732 -0
  69. package/dist/javascript-chat-sdk/CometChat.js +1 -0
  70. package/dist/javascript-chat-sdk/LICENSE.md +3 -0
  71. package/dist/javascript-chat-sdk/README.md +189 -0
  72. package/dist/javascript-chat-sdk/package.json +36 -0
  73. package/dist/package.json +36 -0
  74. package/dist/type/index.d.ts +10 -0
  75. package/dist/type/lib/BannedMembersRequest.d.ts +60 -0
  76. package/dist/type/lib/BlockedUsersRequest.d.ts +67 -0
  77. package/dist/type/lib/CallSettings.d.ts +429 -0
  78. package/dist/type/lib/CometChat.d.ts +1954 -0
  79. package/dist/type/lib/CometChatErrorConstants.d.ts +124 -0
  80. package/dist/type/lib/CometChatHelper.d.ts +26 -0
  81. package/dist/type/lib/Constants.d.ts +953 -0
  82. package/dist/type/lib/ConversationRequest.d.ts +89 -0
  83. package/dist/type/lib/GroupMembersRequest.d.ts +61 -0
  84. package/dist/type/lib/GroupsRequest.d.ts +78 -0
  85. package/dist/type/lib/Helper.d.ts +46 -0
  86. package/dist/type/lib/ListenerHandlers.d.ts +101 -0
  87. package/dist/type/lib/MessagesRequest.d.ts +188 -0
  88. package/dist/type/lib/UsersRequest.d.ts +142 -0
  89. package/dist/type/lib/WebSockets/WSConnectionHelper.d.ts +41 -0
  90. package/dist/type/lib/WebSockets/WSConstants.d.ts +71 -0
  91. package/dist/type/lib/WebSockets/WSHelper.d.ts +3 -0
  92. package/dist/type/lib/controllers/CallController.d.ts +151 -0
  93. package/dist/type/lib/controllers/ConversationController.d.ts +14 -0
  94. package/dist/type/lib/controllers/GroupMemberController.d.ts +10 -0
  95. package/dist/type/lib/controllers/GroupsController.d.ts +9 -0
  96. package/dist/type/lib/controllers/MessageController.d.ts +18 -0
  97. package/dist/type/lib/controllers/PresenceController.d.ts +0 -0
  98. package/dist/type/lib/controllers/TypingNotificationController.d.ts +14 -0
  99. package/dist/type/lib/controllers/UserAuthController.d.ts +10 -0
  100. package/dist/type/lib/controllers/UsersController.d.ts +9 -0
  101. package/dist/type/lib/localStore/KeyStore.d.ts +45 -0
  102. package/dist/type/lib/localStore/MessageListenerEventMaping.d.ts +56 -0
  103. package/dist/type/lib/localStore/MessagesStore.d.ts +72 -0
  104. package/dist/type/lib/localStore/UserStore.d.ts +72 -0
  105. package/dist/type/lib/localStore/store.d.ts +61 -0
  106. package/dist/type/lib/models/Action.d.ts +159 -0
  107. package/dist/type/lib/models/AppSettings.d.ts +135 -0
  108. package/dist/type/lib/models/BaseMessage.d.ts +259 -0
  109. package/dist/type/lib/models/CCExtension.d.ts +15 -0
  110. package/dist/type/lib/models/Call.d.ts +159 -0
  111. package/dist/type/lib/models/CometChatAuthEvent.d.ts +25 -0
  112. package/dist/type/lib/models/CometChatEvent.d.ts +25 -0
  113. package/dist/type/lib/models/CometChatMessageEvent.d.ts +9 -0
  114. package/dist/type/lib/models/CometChatPingEvent.d.ts +6 -0
  115. package/dist/type/lib/models/CometChatPresenceEvent.d.ts +15 -0
  116. package/dist/type/lib/models/CometChatReceiptEvent.d.ts +14 -0
  117. package/dist/type/lib/models/CometChatTransientEvent.d.ts +11 -0
  118. package/dist/type/lib/models/CometChatTypingEvent.d.ts +14 -0
  119. package/dist/type/lib/models/ConversationModel.d.ts +73 -0
  120. package/dist/type/lib/models/CustomError.d.ts +13 -0
  121. package/dist/type/lib/models/CustomMessage.d.ts +71 -0
  122. package/dist/type/lib/models/ErrorModel.d.ts +12 -0
  123. package/dist/type/lib/models/Group.d.ts +190 -0
  124. package/dist/type/lib/models/GroupMember.d.ts +43 -0
  125. package/dist/type/lib/models/Listner.d.ts +258 -0
  126. package/dist/type/lib/models/MediaDevice.d.ts +36 -0
  127. package/dist/type/lib/models/MediaMessage.d.ts +115 -0
  128. package/dist/type/lib/models/MessageReceipt.d.ts +99 -0
  129. package/dist/type/lib/models/RTCUser.d.ts +18 -0
  130. package/dist/type/lib/models/TextMessage.d.ts +84 -0
  131. package/dist/type/lib/models/TransientMessage.d.ts +48 -0
  132. package/dist/type/lib/models/TypingNotification.d.ts +52 -0
  133. package/dist/type/lib/models/UserModel.d.ts +175 -0
  134. package/dist/type/lib/models/UserPresence.d.ts +0 -0
  135. package/dist/type/lib/models/attachment.d.ts +74 -0
  136. package/dist/type/lib/rest-api/EndPointUtils.d.ts +9 -0
  137. package/dist/type/lib/rest-api/EndpointFactory.d.ts +28 -0
  138. package/dist/type/lib/rest-api/HttpHelper.d.ts +10 -0
  139. package/package.json +48 -0
  140. package/readme.md +189 -0
@@ -0,0 +1,1954 @@
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 Action: typeof Action;
958
+ static Call: typeof Call;
959
+ static TypingIndicator: typeof TypingIndicator;
960
+ static TransientMessage: typeof TransientMessage;
961
+ static Group: typeof Group;
962
+ static User: typeof User;
963
+ static GroupMember: typeof GroupMember;
964
+ static Conversation: typeof Conversation;
965
+ static USER_STATUS: {
966
+ ONLINE: string;
967
+ OFFLINE: string;
968
+ };
969
+ static MessagesRequest: typeof MessagesRequest;
970
+ static MessagesRequestBuilder: typeof MessagesRequestBuilder;
971
+ static UsersRequest: typeof UsersRequest;
972
+ static UsersRequestBuilder: typeof UsersRequestBuilder;
973
+ static ConversationsRequest: typeof ConversationsRequest;
974
+ static ConversationsRequestBuilder: typeof ConversationsRequestBuilder;
975
+ static BlockedUsersRequest: typeof BlockedUsersRequest;
976
+ static BlockedUsersRequestBuilder: typeof BlockedUsersRequestBuilder;
977
+ static GroupsRequest: typeof GroupsRequest;
978
+ static GroupsRequestBuilder: typeof GroupsRequestBuilder;
979
+ static GroupMembersRequest: typeof GroupMembersRequest;
980
+ static GroupMembersRequestBuilder: typeof GroupMembersRequestBuilder;
981
+ static BannedMembersRequest: typeof BannedMembersRequest;
982
+ static BannedMembersRequestBuilder: typeof BannedMembersRequestBuilder;
983
+ static CallSettings: typeof CallSettings;
984
+ static CallSettingsBuilder: typeof CallSettingsBuilder;
985
+ static MainVideoContainerSetting: typeof MainVideoContainerSetting;
986
+ static VirtualBackground: typeof VirtualBackground;
987
+ static VirtualBackgroundBuilder: typeof VirtualBackgroundBuilder;
988
+ static AppSettings: typeof AppSettings;
989
+ static AppSettingsBuilder: typeof AppSettingsBuilder;
990
+ static MessageListener: typeof MessageListener;
991
+ static UserListener: typeof UserListener;
992
+ static GroupListener: typeof GroupListener;
993
+ static OngoingCallListener: typeof OngoingCallListener;
994
+ static CallListener: typeof CallListener;
995
+ static ConnectionListener: typeof ConnectionListener;
996
+ static LoginListener: typeof LoginListener;
997
+ static CallController: typeof CallController;
998
+ static CometChatHelper: typeof CometChatHelper;
999
+ static Attachment: typeof Attachment;
1000
+ static MediaDevice: typeof MediaDevice;
1001
+ static MESSAGE_TYPE: {
1002
+ TEXT: string;
1003
+ MEDIA: string;
1004
+ IMAGE: string;
1005
+ VIDEO: string;
1006
+ AUDIO: string;
1007
+ FILE: string;
1008
+ CUSTOM: string;
1009
+ };
1010
+ static CATEGORY_MESSAGE: string;
1011
+ static CATEGORY_ACTION: string;
1012
+ static CATEGORY_CALL: string;
1013
+ static CATEGORY_CUSTOM: string;
1014
+ static ACTION_TYPE: {
1015
+ MEMBER_ADDED: string;
1016
+ MEMBER_JOINED: string;
1017
+ MEMBER_LEFT: string;
1018
+ MEMBER_KICKED: string;
1019
+ MEMBER_BANNED: string;
1020
+ MEMBER_UNBANNED: string;
1021
+ MEMBER_INVITED: string;
1022
+ MEMBER_SCOPE_CHANGED: string;
1023
+ MESSAGE_EDITED: string;
1024
+ MESSSAGE_DELETED: string;
1025
+ TYPE_USER: string;
1026
+ TYPE_GROUP: string;
1027
+ TYPE_GROUP_MEMBER: string;
1028
+ };
1029
+ static CALL_TYPE: {
1030
+ AUDIO: string;
1031
+ VIDEO: string;
1032
+ };
1033
+ static SORT_BY: {
1034
+ NAME: string;
1035
+ STATUS: string;
1036
+ };
1037
+ static SORT_ORDER: {
1038
+ ASCENDING: string;
1039
+ DESCENDING: string;
1040
+ };
1041
+ static CALL_MODE: {
1042
+ DEFAULT: string;
1043
+ SPOTLIGHT: string;
1044
+ SINGLE: string;
1045
+ TILE: string;
1046
+ GRID: string;
1047
+ };
1048
+ static RECEIVER_TYPE: {
1049
+ USER: string;
1050
+ GROUP: string;
1051
+ };
1052
+ static CONNECTION_STATUS: {
1053
+ CONNECTED: string;
1054
+ CONNECTING: string;
1055
+ DISCONNECTED: string;
1056
+ FEATURE_THROTTLED: string;
1057
+ };
1058
+ static CALL_STATUS: {
1059
+ INITIATED: string;
1060
+ ONGOING: string;
1061
+ UNANSWERED: string;
1062
+ REJECTED: string;
1063
+ BUSY: string;
1064
+ CANCELLED: string;
1065
+ ENDED: string;
1066
+ };
1067
+ static GROUP_MEMBER_SCOPE: {
1068
+ ADMIN: string;
1069
+ MODERATOR: string;
1070
+ PARTICIPANT: string;
1071
+ };
1072
+ static GROUP_TYPE: {
1073
+ PUBLIC: string;
1074
+ PRIVATE: string;
1075
+ PROTECTED: string;
1076
+ PASSWORD: string;
1077
+ };
1078
+ /** @internal */ static MESSAGE_REQUEST: {
1079
+ ID: string;
1080
+ SENT_AT: string;
1081
+ };
1082
+ /** @internal */ static user?: Me | any;
1083
+ private static appId;
1084
+ private static apiKey?;
1085
+ private static authToken?;
1086
+ private static cometChat;
1087
+ private static keyStore;
1088
+ private static localStorage;
1089
+ /** @internal */ static appSettings: AppSettings;
1090
+ private static WSReconnectionInProgress;
1091
+ private static WSReconnectionTimer;
1092
+ private static WSReconnectionTimerInterval;
1093
+ private static currentConnectionStatus;
1094
+ /** @internal */ static resource: string;
1095
+ /** @internal */ static platform: string;
1096
+ /** @internal */ static language: string;
1097
+ private static mode;
1098
+ private static sessionId;
1099
+ private static isConnectingFromInit;
1100
+ private static loginInProgress;
1101
+ private static internalRestart;
1102
+ private static settingsInterval;
1103
+ private static isAnalyticsPingStarted;
1104
+ private static analyticsPingTimer;
1105
+ private static isLoggedOut;
1106
+ private static isAnalyticsDisabled;
1107
+ private static jwt;
1108
+ private static settingsHash;
1109
+ private static settingsHashReceivedAt;
1110
+ private static disconnectedByUser;
1111
+ private static shouldConnectToWS;
1112
+ /**
1113
+ * Creates an instance of CometChat.
1114
+ * @param {string} appId
1115
+ * @memberof CometChat
1116
+ */
1117
+ private constructor();
1118
+ /**
1119
+ * Setter method for CometChat authToken.
1120
+ * @internal
1121
+ * @param {string} authToken
1122
+ * @memberof CometChat
1123
+ */
1124
+ static setAuthToken(authToken: string): void;
1125
+ /**
1126
+ *Getter method for CometChat authToken.
1127
+ * @internal
1128
+ * @returns
1129
+ * @memberof CometChat
1130
+ */
1131
+ getAuthToken(): string;
1132
+ /**
1133
+ * Getter for appId
1134
+ * @internal
1135
+ * @returns {string}
1136
+ */
1137
+ static getAppId(): string;
1138
+ /**
1139
+ *Getter for apiKey.
1140
+ * @internal
1141
+ * @returns
1142
+ * @memberof CometChat
1143
+ */
1144
+ getApiKey(): string;
1145
+ /**
1146
+ *Getter method for CometChat mode.
1147
+ * @internal
1148
+ * @returns
1149
+ * @memberof CometChat
1150
+ */
1151
+ static getMode(): string;
1152
+ /**
1153
+ *Setter method for CometChat mode.
1154
+ * @internal
1155
+ * @returns
1156
+ * @memberof CometChat
1157
+ */
1158
+ static setMode(mode: string): void;
1159
+ /**
1160
+ * Getter for sessionId.
1161
+ * @internal
1162
+ * @returns
1163
+ * @memberof CometChat
1164
+ */
1165
+ static getSessionId(): string;
1166
+ /**
1167
+ * Storage event when a key is added/updated in localstorage.
1168
+ * @internal
1169
+ * @memberof CometChat
1170
+ */
1171
+ static onStorageEvent(storageEvent: any): void;
1172
+ /**
1173
+ * This method triggers before a page unloads.
1174
+ * @internal
1175
+ * @memberof CometChat
1176
+ */
1177
+ static beforeUnload(unloadEvent: any): void;
1178
+ /**
1179
+ * This method checks if Analytics Ping has started.
1180
+ * @internal
1181
+ * @returns {boolean}
1182
+ */
1183
+ static didAnalyticsPingStart(): boolean;
1184
+ /**
1185
+ * This method gets data from session storage.
1186
+ * @internal
1187
+ * @returns {string | null}
1188
+ * @memberof CometChat
1189
+ */
1190
+ static getDataFromSessionStorage(key: any): string;
1191
+ /**
1192
+ * This method adds data in the session storage.
1193
+ * @internal
1194
+ * @memberof CometChat
1195
+ */
1196
+ static addDataToSessionStorage(key: any, value: any): void;
1197
+ /**
1198
+ * This method removes data from the session storage.
1199
+ * @internal
1200
+ * @memberof CometChat
1201
+ */
1202
+ static removeDataFromSessionStorage(key: any): void;
1203
+ /**--------------------------------*
1204
+ * Core apis
1205
+ * --------------------------------**/
1206
+ /**
1207
+ * Initialize the CometChat app with appId & Object of AppSettings Class.
1208
+ * @param {string} appId
1209
+ * @param {AppSettings} appSettings
1210
+ * @returns {CometChat}
1211
+ * @memberof CometChat
1212
+ */
1213
+ static init(appId: any, appSettings: AppSettings): Promise<boolean>;
1214
+ /**
1215
+ * Function to check whether CometChat class initialized before.
1216
+ * @returns {boolean}
1217
+ * @memberof CometChat
1218
+ */
1219
+ static isInitialized(): boolean;
1220
+ /**
1221
+ * Returns the singleton object of CometChat class. If CometChat object is not created yet? it will create and returns it.
1222
+ *
1223
+ * @internal
1224
+ * @param {string} appId - An optional argument needed for first time initialization.
1225
+ * @returns {CometChat}
1226
+ */
1227
+ static getInstance(appId?: string): CometChat;
1228
+ /**
1229
+ * Function to register the FCM token for Push Notification.
1230
+ * @param {string} token
1231
+ * @param {JSON Object} Settings
1232
+ * @returns {Promise<string>}
1233
+ * @memberof CometChat
1234
+ */
1235
+ static registerTokenForPushNotification(token: string, settings?: {}): Promise<string>;
1236
+ /**
1237
+ * Function which publishes events to the Login Listener.
1238
+ * @internal
1239
+ * @param {User | CometChatException} data
1240
+ * @param {string} status
1241
+ * @memberof CometChat
1242
+ */
1243
+ private static pushToLoginListener;
1244
+ /**
1245
+ * Login funtion will authenticate user provided as an argument. There are two ways to login:
1246
+ * 1. using UID and authKey (unsecure way)
1247
+ * 2. using authToken (secure way)
1248
+ * @param {...string[]} args
1249
+ * @returns {User | CometChatException}
1250
+ * @memberof CometChat
1251
+ */
1252
+ static login(...args: any): Promise<User>;
1253
+ /**-------------------------------------------------------------------*
1254
+ * Message related functions provided by CometChat class *
1255
+ *--------------------------------------------------------------------**/
1256
+ /**
1257
+ * Function to send message.
1258
+ * @param {TextMessage | MediaMessage | CustomMessage | any} message
1259
+ * @returns {Message | any}
1260
+ * @memberof CometChat
1261
+ */
1262
+ static sendMessage(message: TextMessage | MediaMessage | CustomMessage | any): Promise<TextMessage | MediaMessage | CustomMessage | BaseMessage>;
1263
+ /**
1264
+ * Function to send a message to user.
1265
+ * @internal
1266
+ * @param {*} message Object
1267
+ * @returns
1268
+ * @memberof CometChat
1269
+ */
1270
+ static sendDirectMessage(message: Object): Promise<TextMessage | BaseMessage | MediaMessage | CustomMessage>;
1271
+ /**
1272
+ * Function to send a message to group.
1273
+ * @internal
1274
+ * @param {*} message
1275
+ * @returns
1276
+ * @memberof CometChat
1277
+ */
1278
+ static sendGroupMessage(message: any): Promise<TextMessage | BaseMessage | MediaMessage | CustomMessage>;
1279
+ /**
1280
+ * Function to send a media message.
1281
+ * @param {MediaMessage} message
1282
+ * @returns {Message | any}
1283
+ * @memberof CometChat
1284
+ */
1285
+ static sendMediaMessage(message: Object): Promise<TextMessage | BaseMessage | MediaMessage | CustomMessage>;
1286
+ /**
1287
+ *
1288
+ * Function to send a custom message.
1289
+ * @param {CustomMessage} message
1290
+ * @returns {Message | any}
1291
+ * @memberof CometChat
1292
+ */
1293
+ static sendCustomMessage(message: CustomMessage): Promise<TextMessage | BaseMessage | MediaMessage | CustomMessage>;
1294
+ /**
1295
+ *
1296
+ * Function to get the last delivered message id from local storage.
1297
+ * @returns {any}
1298
+ * @memberof CometChat
1299
+ */
1300
+ static getLastDeliveredMessageId(): Promise<any>;
1301
+ /**
1302
+ * Function to send start typing notification to the provided uid/ guid.
1303
+ * @param {TypingIndicator | any} typingNotification
1304
+ * @memberof CometChat
1305
+ */
1306
+ static startTyping(typingNotification: TypingIndicator | any): void;
1307
+ /**
1308
+ * Function to send stop typing notification to the provided uid/ guid.
1309
+ * @param {TypingIndicator | any} typingNotification
1310
+ * @memberof CometChat
1311
+ */
1312
+ static endTyping(typingNotification: TypingIndicator | any): void;
1313
+ /**
1314
+ * Mark all messages upto a specified message id as read. There are two ways markAsRead works:
1315
+ * 1. message
1316
+ * 2. messageID, receiverID, receiverType, senderID
1317
+ * @param {...string[]} args
1318
+ * @memberof CometChat
1319
+ */
1320
+ static markAsRead(...args: any): any;
1321
+ /**
1322
+ * Mark all messages upto a specified message id as delivered. There are two ways markAsDelivered works:
1323
+ * 1. message
1324
+ * 2. messageID, receiverID, receiverType, senderID
1325
+ * @param {...string[]} args
1326
+ * @memberof CometChat
1327
+ */
1328
+ static markAsDelivered(...args: any): any;
1329
+ /**
1330
+ * Send a transient message.
1331
+ * @param {string} uid
1332
+ * @param {string} receiverType
1333
+ * @memberof CometChat
1334
+ */
1335
+ static sendTransientMessage(transientMessage: TransientMessage): void;
1336
+ /**
1337
+ * Triggers the onTextMessageReceived event.
1338
+ * @internal
1339
+ * @param {any} message
1340
+ * @memberof CometChat
1341
+ */
1342
+ static sendTestMessage(message: any): Promise<void>;
1343
+ /**
1344
+ * Function to fetch message details for the provided messageID.
1345
+ * @param {string | any} messageId
1346
+ * @returns {Message | any}
1347
+ * @memberof CometChat
1348
+ */
1349
+ static getMessageDetails(messageId: string | any): Promise<TextMessage | MediaMessage | CustomMessage | BaseMessage>;
1350
+ /**
1351
+ * Function to fetch message receipt details for the provided messageID.
1352
+ * @param {string | any} messageId
1353
+ * @returns {MessageReceipt[]}
1354
+ * @memberof CometChat
1355
+ */
1356
+ static getMessageReceipts(messageId: string | any): Promise<Object>;
1357
+ /**
1358
+ * Function to fetch unread message count.
1359
+ * @param {boolean} doHideMessages
1360
+ * @returns {Object}
1361
+ * @memberof CometChat
1362
+ */
1363
+ static getUnreadMessageCount(doHideMessages?: boolean): Promise<Object>;
1364
+ /**
1365
+ * Function to fetch unread message count for all users.
1366
+ * @param {boolean} doHideMessages
1367
+ * @returns {Object}
1368
+ * @memberof CometChat
1369
+ */
1370
+ static getUnreadMessageCountForAllUsers(doHideMessages?: boolean): Promise<Object>;
1371
+ /**
1372
+ * Function to fetch unread message count for all groups.
1373
+ * @param {boolean} doHideMessages
1374
+ * @returns {Object}
1375
+ * @memberof CometChat
1376
+ */
1377
+ static getUnreadMessageCountForAllGroups(doHideMessages?: boolean): Promise<Object>;
1378
+ /**
1379
+ * Function to fetch unread message count for a particular UID.
1380
+ * @param {string} UID
1381
+ * @param {boolean} doHideMessages
1382
+ * @returns {Object}
1383
+ * @memberof CometChat
1384
+ */
1385
+ static getUnreadMessageCountForUser(UID: string, doHideMessages?: boolean): Promise<Object>;
1386
+ /**
1387
+ * Function to fetch unread message count for a particular GUID.
1388
+ * @param {string} GUID
1389
+ * @param {boolean} doHideMessages
1390
+ * @returns {Object}
1391
+ * @memberof CometChat
1392
+ */
1393
+ static getUnreadMessageCountForGroup(GUID: string, doHideMessages?: boolean): Promise<Object>;
1394
+ /**
1395
+ * Funtion to edit a message.
1396
+ * @param {BaseMessage} message
1397
+ * @returns {Promise<BaseMessage>}
1398
+ * @memberof CometChat
1399
+ */
1400
+ static editMessage(message: BaseMessage): Promise<BaseMessage>;
1401
+ /**
1402
+ * Funtion to delete a message.
1403
+ * @param {string} messageId
1404
+ * @returns {Promise<BaseMessage>}
1405
+ * @memberof CometChat
1406
+ */
1407
+ static deleteMessage(messageId: string): Promise<BaseMessage>;
1408
+ /**---------------------------------------------------------------------------------------*
1409
+ * Online User/Group Member count related functions provided by CometChat class *
1410
+ *----------------------------------------------------------------------------------------**/
1411
+ /**
1412
+ * This function will return online user count
1413
+ *
1414
+ * @returns {Promise<number>}
1415
+ * @memberof CometChat
1416
+ */
1417
+ static getOnlineUserCount(): Promise<number>;
1418
+ /**
1419
+ * This function will return online group members count for given GUIDs
1420
+ *
1421
+ * @param {String[]} groups
1422
+ * @returns {Promise<number>}
1423
+ * @memberof CometChat
1424
+ */
1425
+ static getOnlineGroupMemberCount(groups: String[]): Promise<Object>;
1426
+ /**-------------------------------------------------------------------*
1427
+ * User related functions provided by CometChat class *
1428
+ *--------------------------------------------------------------------**/
1429
+ /**
1430
+ * Function to create a user.
1431
+ * @param {User | any} user
1432
+ * @param {string} apiKey
1433
+ * @returns {Promise<User>}
1434
+ * @memberof CometChat
1435
+ */
1436
+ static createUser(user: User | any, apiKey: string): Promise<User>;
1437
+ /**
1438
+ *
1439
+ * Function to update the already existing user and returns the result with updated user.
1440
+ * @param {User | any} user
1441
+ * @param {string} apiKey
1442
+ * @returns {Promise<User>}
1443
+ * @memberof CometChat
1444
+ */
1445
+ static updateUser(user: User | any, apiKey: string): Promise<User>;
1446
+ /**
1447
+ *
1448
+ * function to update the logged-in user and returns the result with updated user
1449
+ * @param {User} user
1450
+ * @returns Promise<User>
1451
+ * @memberof CometChat
1452
+ */
1453
+ static updateCurrentUserDetails(user: User | any): Promise<User>;
1454
+ /**
1455
+ * function to get the information for the uid provided as an argument
1456
+ * @param {string} uid
1457
+ * @returns {Promise<User>}
1458
+ * @memberof CometChat
1459
+ */
1460
+ static getUser(uid: any): Promise<User>;
1461
+ /**
1462
+ *
1463
+ * Function to check if logged-in user is available in local storage. If not present in local storage then fetch from API.
1464
+ * @internal
1465
+ * @returns {Promise<User | any>}
1466
+ * @memberof CometChat
1467
+ */
1468
+ static getLoggedInUser(): Promise<User | any>;
1469
+ /**
1470
+ *
1471
+ * This function will return logged in user from local storage.
1472
+ * @returns {Promise<User | null>}
1473
+ * @memberof CometChat
1474
+ */
1475
+ static getLoggedinUser(): Promise<User | null>;
1476
+ /**
1477
+ * Function to block users.
1478
+ * @param {String[]} blockedUids
1479
+ * @returns
1480
+ * @memberof CometChat
1481
+ */
1482
+ static blockUsers(blockedUids: String[]): Promise<Object>;
1483
+ /**
1484
+ * Function to unblock users.
1485
+ * @param {String[]} blockedUids
1486
+ * @returns
1487
+ * @memberof CometChat
1488
+ */
1489
+ static unblockUsers(blockedUids: String[]): Promise<Object>;
1490
+ /**-------------------------------------------------------------------*
1491
+ * Conversation related functions provided by CometChat class *
1492
+ *--------------------------------------------------------------------**/
1493
+ /**
1494
+ * Function to fetch conversation for a specific user/group.
1495
+ * @param {string} conversationWith
1496
+ * @param {string} conversationType
1497
+ * @returns {Promise<Conversation>}
1498
+ * @memberof CometChat
1499
+ */
1500
+ static getConversation(conversationWith: string, conversationType: string): Promise<Conversation>;
1501
+ /**
1502
+ * Function to tag a conversation for a specific user/group.
1503
+ * @param {string} conversationWith
1504
+ * @param {string} conversationType
1505
+ * @param {Array<String>} tags
1506
+ * @returns {Promise<Conversation>}
1507
+ * @memberof CometChat
1508
+ */
1509
+ static tagConversation(conversationWith: string, conversationType: string, tags?: Array<String>): Promise<Conversation>;
1510
+ /**
1511
+ * function to delete conversation for a specific user/group.
1512
+ * @param {string} conversationWith
1513
+ * @param {string} conversationType
1514
+ * @returns Promise<string>
1515
+ * @memberof CometChat
1516
+ */
1517
+ static deleteConversation(conversationWith: string, conversationType: string): Promise<string>;
1518
+ /**-------------------------------------------------------------------*
1519
+ * Group related functions provided by CometChat class *
1520
+ *--------------------------------------------------------------------**/
1521
+ /**
1522
+ * Function to create a group.
1523
+ * @param {Group} group
1524
+ * @returns {Promise<Group>}
1525
+ * @memberof CometChat
1526
+ */
1527
+ static createGroup(group: Group | any): Promise<Group>;
1528
+ /**
1529
+ * Function to fetch details of a group.
1530
+ * @param {string | Object} guid
1531
+ * @returns {Promise<Group>}
1532
+ * @memberof CometChat
1533
+ */
1534
+ static getGroup(guid: string | Object): Promise<Group>;
1535
+ /**
1536
+ * Function to join a public group.
1537
+ * @param {guid} guid
1538
+ * @param {GroupType} type
1539
+ * @param {string} password
1540
+ * @returns {Promise<Group>}
1541
+ * @memberof CometChat
1542
+ */
1543
+ static joinGroup(grp: any, type?: GroupType, password?: string): Promise<Group>;
1544
+ /**
1545
+ *
1546
+ * Function to update a group.
1547
+ * @param {Group} group
1548
+ * @returns {Promise<Group>}
1549
+ * @memberof CometChat
1550
+ */
1551
+ static updateGroup(group: any): Promise<Group>;
1552
+ /**
1553
+ *
1554
+ * Function to delete a group.
1555
+ * @param {string} guid
1556
+ * @returns {Promise<boolean>}
1557
+ * @memberof CometChat
1558
+ */
1559
+ static deleteGroup(guid: string): Promise<boolean>;
1560
+ /**
1561
+ * Function to leave a group.
1562
+ * @param {string} guid
1563
+ * @returns {Promise}
1564
+ * @memberof CometChat
1565
+ */
1566
+ static leaveGroup(guid: string): Promise<boolean>;
1567
+ /**
1568
+ * Function to kick a member from a group.
1569
+ * @param {string} guid
1570
+ * @param {string} uid
1571
+ * @returns {Promise<boolean>}
1572
+ * @memberof CometChat
1573
+ */
1574
+ static kickGroupMember(guid: string, uid: string): Promise<boolean>;
1575
+ /**
1576
+ * Function to change the scope of a member in a group.
1577
+ * @param {string} guid
1578
+ * @param {string} uid
1579
+ * @param {GroupMemberScope} scope
1580
+ * @returns {Promise<boolean>}
1581
+ * @memberof CometChat
1582
+ */
1583
+ static updateGroupMemberScope(guid: string, uid: string, scope: GroupMemberScope): Promise<boolean>;
1584
+ /**
1585
+ * Function to ban a group member from a group.
1586
+ * @param {string} guid
1587
+ * @param {string} uid
1588
+ * @returns {Promise<boolean>}
1589
+ * @memberof CometChat
1590
+ */
1591
+ static banGroupMember(guid: string, uid: string): Promise<boolean>;
1592
+ /**
1593
+ * Function to unban a group member from a group.
1594
+ * @param {string} guid
1595
+ * @param {string} uid
1596
+ * @returns {Promise<boolean>}
1597
+ * @memberof CometChat
1598
+ */
1599
+ static unbanGroupMember(guid: string, uid: string): Promise<boolean>;
1600
+ /**
1601
+ * Function to add members in a group. This function can also be used to ban a group member from a group.
1602
+ * @param {string} guid
1603
+ * @param {Array<GroupMember>} groupMembers
1604
+ * @param {Array<String>} bannedMembersList
1605
+ * @returns {Promise<Object>}
1606
+ * @memberof CometChat
1607
+ */
1608
+ static addMembersToGroup(guid: string, groupMembers: Array<GroupMember>, bannedMembersList: Array<string>): Promise<Object>;
1609
+ /**
1610
+ *
1611
+ * Function to transfer ownership of a group.
1612
+ * @param {string} guid
1613
+ * @param {string} uid
1614
+ * @returns {Promise<string>}
1615
+ * @memberof CometChat
1616
+ */
1617
+ static transferGroupOwnership(guid: string, uid: string): Promise<string>;
1618
+ /**
1619
+ * Function to create a group and add/ban members in/from that group.
1620
+ * @param {Group} group
1621
+ * @param {Array<GroupMember>} members
1622
+ * @param {Array<String>} banMembers
1623
+ * @returns {Promise<Object>}
1624
+ * @memberof CometChat
1625
+ */
1626
+ static createGroupWithMembers(group: Group, members: Array<GroupMember>, banMembers: Array<string>): Promise<Object>;
1627
+ /**-------------------------------------------------------------------*
1628
+ * Call related functions provided by CometChat class *
1629
+ *--------------------------------------------------------------------**/
1630
+ /**
1631
+ * Function to initiate a user/group call.
1632
+ * @param {Call} call
1633
+ * @returns {Promise<Call>}
1634
+ * @memberof CometChat
1635
+ */
1636
+ static initiateCall(call: Call | any): Promise<Call>;
1637
+ /**
1638
+ * Function to accept an incoming user/group call.
1639
+ * @param {string} sessionid
1640
+ * @returns {Promise<Call>}
1641
+ * @memberof CometChat
1642
+ */
1643
+ static acceptCall(sessionid: string): Promise<Call>;
1644
+ /**
1645
+ * Function to reject an incoming call or cancel an outgoing call.
1646
+ * @param {string} sessionId
1647
+ * @param {string} status
1648
+ * @returns {Promise<Call>}
1649
+ * @memberof CometChat
1650
+ */
1651
+ static rejectCall(sessionId: string, status: any): Promise<Call>;
1652
+ /**
1653
+ * Function to end an ongoing call.
1654
+ * @param {string} sessionid
1655
+ * @param {boolean} isInternal - Optional
1656
+ * @returns {Promise<Call>}
1657
+ * @memberof CometChat
1658
+ */
1659
+ static endCall(sessionid: string, isInternal?: boolean): Promise<Call>;
1660
+ /**
1661
+ * Function to get the active call.
1662
+ * @returns {Call}
1663
+ * @memberof CometChat
1664
+ */
1665
+ static getActiveCall(): Call;
1666
+ /**
1667
+ * Function to start a call.
1668
+ * @param {CallSettings | string} callSettings
1669
+ * @param {HTMLElement} view
1670
+ * @param {UserCallEventListener} callEventHandler
1671
+ * @memberof CometChat
1672
+ */
1673
+ static startCall(callSettings: CallSettings | string, view: HTMLElement, ongoingCallListener?: OngoingCallListener): void;
1674
+ /**
1675
+ * Function to fetch participant count of an ongoing call.
1676
+ * @param {string} sessionId
1677
+ * @param {string} type
1678
+ * @returns {Promise<number>}
1679
+ * @memberof CometChat
1680
+ */
1681
+ static getCallParticipantCount(sessionId: string, type: string): Promise<number>;
1682
+ /**-------------------------------------------------------------------*
1683
+ * Call related `helper` functions provided by CometChat class. *
1684
+ * ---ONLY PRIVATE FUNCTION DO NOT MADE PUBLIC--- *
1685
+ *--------------------------------------------------------------------**/
1686
+ /**
1687
+ * Function to reject an incoming call.
1688
+ * @private
1689
+ * @internal
1690
+ * @param {string} sessionid
1691
+ * @returns {Promise<Call>}
1692
+ * @memberof CometChat
1693
+ */
1694
+ private static rejectIncomingCall;
1695
+ /**
1696
+ * Function to reject an outgoing call
1697
+ * @private
1698
+ * @internal
1699
+ * @param {string} sessionid
1700
+ * @returns {Promise<Call>}
1701
+ * @memberof CometChat
1702
+ */
1703
+ private static cancelCall;
1704
+ /**
1705
+ * Function to send a busy response for an incoming call.
1706
+ * @private
1707
+ * @internal
1708
+ * @param {string} sessionid
1709
+ * @returns {Promise<Call>}
1710
+ * @memberof CometChat
1711
+ */
1712
+ private static sendBusyResponse;
1713
+ /**
1714
+ * Function to send unanswered response if a call in not answered in a specific time interval.
1715
+ * @internal
1716
+ * @param {string} sessionid
1717
+ * @returns {Promise<Call>}
1718
+ * @memberof CometChat
1719
+ */
1720
+ static sendUnansweredResponse(sessionid: string): Promise<Call>;
1721
+ /**-------------------------------------------------------------------------------------------------------*
1722
+ * Events listeners setting and removing . *
1723
+ *--------------------------------------------------------------------------------------------------------**/
1724
+ /**
1725
+ *
1726
+ * Function to add a Connection Listner.
1727
+ * @param {string} name
1728
+ * @param {ConnectionListener} connectionListener
1729
+ * @memberof CometChat
1730
+ */
1731
+ static addConnectionListener(name: string, connectionListener: ConnectionListener): void;
1732
+ /**
1733
+ *
1734
+ * Function to remove a Connection Listner.
1735
+ * @param {string} name
1736
+ * @memberof CometChat
1737
+ */
1738
+ static removeConnectionListener(name: string): void;
1739
+ /**
1740
+ *
1741
+ * Function to add a Message Listner.
1742
+ * @param {string} name
1743
+ * @param {MessageListener} messageListener
1744
+ * @memberof CometChat
1745
+ */
1746
+ static addMessageListener(name: string, messageListener: MessageListener): void;
1747
+ /**
1748
+ *
1749
+ * Function to remove a Message Listner.
1750
+ * @param {string} name
1751
+ * @memberof CometChat
1752
+ */
1753
+ static removeMessageListener(name: string): void;
1754
+ /**
1755
+ *
1756
+ * Function to add a Call Listener.
1757
+ * @param {string} name
1758
+ * @param {CallListener} callListener
1759
+ * @memberof CometChat
1760
+ */
1761
+ static addCallListener(name: string, callListener: CallListener): void;
1762
+ /**
1763
+ *
1764
+ * Function to remove a Call Listener.
1765
+ * @param {string} name
1766
+ * @memberof CometChat
1767
+ */
1768
+ static removeCallListener(name: string): void;
1769
+ /**
1770
+ *
1771
+ * Function to add a User Listener.
1772
+ * @param {string} name
1773
+ * @param {UserListener} userListener
1774
+ * @memberof CometChat
1775
+ */
1776
+ static addUserListener(name: string, userListener: UserListener): void;
1777
+ /**
1778
+ *
1779
+ * Function to remove a User Listener.
1780
+ * @param {string} name
1781
+ * @memberof CometChat
1782
+ */
1783
+ static removeUserListener(name: string): void;
1784
+ /**
1785
+ *
1786
+ * Function to add a Group Listener.
1787
+ * @param {string} name
1788
+ * @param {GroupListener} groupListener
1789
+ * @memberof CometChat
1790
+ */
1791
+ static addGroupListener(name: string, groupListener: GroupListener): void;
1792
+ /**
1793
+ *
1794
+ * Function to remove a Group Listener.
1795
+ * @param {string} name
1796
+ * @memberof CometChat
1797
+ */
1798
+ static removeGroupListener(name: string): void;
1799
+ /**
1800
+ * Function to add a Login Listener.
1801
+ *
1802
+ * @param {string} name
1803
+ * @param {LoginListener} loginListener
1804
+ * @memberof CometChat
1805
+ */
1806
+ static addLoginListener(name: string, loginListener: LoginListener): void;
1807
+ /**
1808
+ * Function to remove a Login Listener.
1809
+ *
1810
+ * @param {string} name
1811
+ * @memberof CometChat
1812
+ */
1813
+ static removeLoginListener(name: string): void;
1814
+ /**------------------------------------*
1815
+ * Private helper methods functions *
1816
+ *-------------------------------------**/
1817
+ /**
1818
+ *
1819
+ * ---SHOULD NOT BE MADE PUBLIC---
1820
+ * Function to generate an Authtoken for the provided UID.
1821
+ * @param {string} uid
1822
+ * @returns {Promise<Object>}
1823
+ * @memberof CometChat
1824
+ */
1825
+ private static generateAuthToken;
1826
+ private static tryReconnectingToWS;
1827
+ /**
1828
+ *
1829
+ * Function to make WebSocket Connection.
1830
+ * @internal
1831
+ */
1832
+ makeWSConnection(): void;
1833
+ /**
1834
+ *
1835
+ * Function is triggered when the WebSocket Connection is broken.
1836
+ * @internal
1837
+ */
1838
+ accidentallyDisconnected(): void;
1839
+ private static WSLogin;
1840
+ private static pingAnalytics;
1841
+ private static updateJWT;
1842
+ private static startAnalyticsPingTimer;
1843
+ /**
1844
+ *
1845
+ * Function to clear the analytical timer.
1846
+ * @internal
1847
+ */
1848
+ static clearAnalyticsPingTimer(): void;
1849
+ private static startWSReconnectionTimer;
1850
+ private static clearWSReconnectionTimer;
1851
+ private static getJWT;
1852
+ /**
1853
+ * Get the current connection status
1854
+ * @returns {string}
1855
+ * @memberof CometChat
1856
+ */
1857
+ static getConnectionStatus(): string;
1858
+ /**
1859
+ * Update the connection status.
1860
+ * @internal
1861
+ * @memberof CometChat
1862
+ */
1863
+ setConnectionStatus(connectionStatus: any): void;
1864
+ /**
1865
+ *
1866
+ * Returns a boolean value which indicates if the extension is enabled or not.
1867
+ * @param {string} extensionId
1868
+ * @returns {Promise<boolean>}
1869
+ * @memberof CometChat
1870
+ */
1871
+ static isExtensionEnabled(extensionId: string): Promise<boolean>;
1872
+ /**
1873
+ * Returns an object of CCExtension Class which has the details of the extension.
1874
+ *
1875
+ * @param {string} extensionId
1876
+ * @returns {Promise<CCExtension>}
1877
+ * @memberof CometChat
1878
+ */
1879
+ static getExtensionDetails(extensionId: string): Promise<CCExtension>;
1880
+ /**
1881
+ * Get the XMPP/ WEBRTC details from the servers
1882
+ * @internal
1883
+ * @returns {Promise<Object>}
1884
+ * @memberof CometChat
1885
+ */
1886
+ static getAppSettings(): Promise<Object>;
1887
+ /**
1888
+ * Returns a boolean value which indicates if a feature is enabled or not for the current plan.
1889
+ * @param {string} feature
1890
+ * @returns {Promise<boolean>}
1891
+ * @memberof CometChat
1892
+ */
1893
+ static isFeatureEnabled(feature: string): Promise<boolean>;
1894
+ /**
1895
+ * Clears the authtoken from server and clears the local cache.
1896
+ * @returns {Promise<Object>}
1897
+ * @memberof CometChat
1898
+ */
1899
+ static logout(): Promise<Object>;
1900
+ /**
1901
+ * Function to call extension API.
1902
+ * @param {string} slug
1903
+ * @param {string} method
1904
+ * @param {string} endpoint
1905
+ * @param {Object} data
1906
+ * @returns {Promise<Object>}
1907
+ * @memberof CometChat
1908
+ */
1909
+ static callExtension(slug: string, method: string, endpoint: string, data?: Object): Promise<Object>;
1910
+ /**
1911
+ * Function to set resource, platform and language variable.
1912
+ * @param {string} resource
1913
+ * @param {string} platform
1914
+ * @param {string} language
1915
+ * @memberof CometChat
1916
+ */
1917
+ static setSource(resource: string, platform: string, language: string): void;
1918
+ /**
1919
+ * Function to clear local storage.
1920
+ * @internal
1921
+ * @memberof CometChat
1922
+ */
1923
+ static clearCache(): Promise<unknown>;
1924
+ /**
1925
+ *
1926
+ * Method to connect to WebSocket server.
1927
+ *
1928
+ * @static
1929
+ * @returns void
1930
+ * @memberof CometChat
1931
+ */
1932
+ static connect(): void;
1933
+ /**
1934
+ *
1935
+ * Method to disconnect from WebSocket server.
1936
+ *
1937
+ * @static
1938
+ * @returns void
1939
+ * @memberof CometChat
1940
+ */
1941
+ static disconnect(): void;
1942
+ /**
1943
+ * @internal
1944
+ * @param authToken
1945
+ * @returns
1946
+ */
1947
+ internalRestart(authToken: any): void;
1948
+ /**
1949
+ * @internal
1950
+ * @param pushToLoginListener
1951
+ * @returns
1952
+ */
1953
+ internalLogout(pushToLoginListener?: boolean): Promise<unknown>;
1954
+ }