@tencentcloud/lite-chat 1.2.1 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3110 @@
1
+ declare interface LOGIN_OPTIONS {
2
+ userID: string;
3
+ /**
4
+ * The password with which the user logs in to Chat. It is the ciphertext generated by encrypting information such as userID.
5
+ */
6
+ userSig: string;
7
+ }
8
+
9
+ declare interface GET_MESSAGE_LIST_OPTIONS {
10
+ /**
11
+ * Conversation ID. Supported formats are as follows:
12
+ * - C2C${userID} (one-to-one chat)
13
+ * - GROUP${groupID} (group chat)
14
+ * - @TIM#SYSTEM (system notification conversation)
15
+ */
16
+ conversationID: string;
17
+ /**
18
+ * Message ID, which is used to continue pulling messages by page. This parameter can be left unspecified the first time messages are pulled. Every time the API is called, this parameter is returned, and you need to specify it for the next pulling.
19
+ */
20
+ nextReqMessageID?: string;
21
+ }
22
+
23
+ declare interface GET_MESSAGE_LIST_HOPPING_OPTIONS {
24
+ /**
25
+ * Conversation ID. Supported formats are as follows:
26
+ * - C2C${userID} (one-to-one chat)
27
+ * - GROUP${groupID} (group chat)
28
+ * - GROUP${topicID} (topic chat)
29
+ */
30
+ conversationID: string;
31
+ /**
32
+ * Sequence of a group chat message.
33
+ */
34
+ sequence?: number;
35
+ /**
36
+ * Timestamp of a one-to-one message.
37
+ */
38
+ time?: number;
39
+ /**
40
+ * - 0, Pulling older messages than now by default.
41
+ * - 1, Pulling newer messages than now.
42
+ */
43
+ direction?: number;
44
+ }
45
+
46
+ declare interface SET_MESSAGE_READ_OPTIONS {
47
+ /**
48
+ * Conversation ID. Supported formats are as follows:
49
+ * - C2C${userID} (one-to-one chat)
50
+ * - GROUP${groupID} (group chat)
51
+ * - @TIM#SYSTEM (system notification conversation)
52
+ */
53
+ conversationID: string;
54
+ }
55
+
56
+ declare interface GET_CONVERSATION_LIST_OPTIONS {
57
+ type?: TencentCloudChat.TYPES;
58
+ groupName?: string;
59
+ markType?: number;
60
+ hasUnreadCount?: boolean;
61
+ hasGroupAtInfo?: boolean;
62
+ }
63
+
64
+ declare interface DELETE_CONVERSATION_OPTIONS {
65
+ /**
66
+ * conversation ID list
67
+ */
68
+ conversationIDList: Array<string>;
69
+ /**
70
+ * - true, By default, clears chat history with a user or clears chat history from a group from local and the cloud.
71
+ * - false, delete conversations only, keep the chat history.
72
+ */
73
+ clearHistoryMessage?: boolean;
74
+ }
75
+
76
+ declare interface SET_CONVERSATION_DRAFT_OPTIONS {
77
+ /**
78
+ * Conversation ID. Supported formats are as follows:
79
+ * - C2C${userID} (one-to-one chat)
80
+ * - GROUP${groupID} (group chat)
81
+ */
82
+ conversationID: string;
83
+ /**
84
+ * Draft content.
85
+ */
86
+ draftText: string;
87
+ }
88
+
89
+ declare interface PIN_CONVERSATION_OPTIONS {
90
+ /**
91
+ * Conversation ID. Supported formats are as follows:
92
+ * - C2C${userID} (one-to-one chat)
93
+ * - GROUP${groupID} (group chat)
94
+ */
95
+ conversationID: string;
96
+ /**
97
+ * true: pin the conversation to top; false: unpin the conversation from top
98
+ */
99
+ isPinned: boolean;
100
+ }
101
+
102
+ declare interface SET_ALL_MESSAGE_READ_OPTIONS {
103
+ /**
104
+ * - TencentCloudChat.TYPES.READ_ALL_C2C_MSG, set one-to-one messages as read.
105
+ * - TencentCloudChat.TYPES.READ_ALL_GROUP_MSG, set group messages as read.
106
+ * - TencentCloudChat.TYPES.READ_ALL_MSG, set all messages as read.
107
+ */
108
+ scope: TencentCloudChat.TYPES;
109
+ }
110
+
111
+ declare interface SET_MESSAGE_REMIND_TYPE_OPTIONS {
112
+ /**
113
+ * groupID or topicID
114
+ */
115
+ groupID?: string;
116
+ /**
117
+ * A list contains userIDs of one-to-one chats. maximum support 30.
118
+ */
119
+ userIDList?: Array<string>;
120
+ /**
121
+ * - TencentCloudChat.TYPES.MSG_REMIND_ACPT_AND_NOTE,the SDK receives a message and throws a MESSAGE_RECEIVED event to notify the access side, which then sends a notification.
122
+ * - TencentCloudChat.TYPES.MSG_REMIND_ACPT_NOT_NOTE,the SDK receives a message and throws a MESSAGE_RECEIVED event to notify the access side, which then does not send a notification.
123
+ * - TencentCloudChat.TYPES.MSG_REMIND_DISCARD, the SDK rejects a message.
124
+ * - TencentCloudChat.TYPES.NOT_RECEIVE_OFFLINE_PUSH_EXCEPT_AT,the SDK receives a message online and only receives offline push for group mentions when offline.
125
+ */
126
+ messageRemindType: TencentCloudChat.TYPES;
127
+ }
128
+
129
+ declare interface SET_ALL_RECEIVE_MESSAGE_OPTIONS {
130
+ /**
131
+ * - TencentCloudChat.TYPES.MSG_REMIND_ACPT_AND_NOTE,the SDK receives a message and throws a MESSAGE_RECEIVED event to notify the access side, which then sends a notification.
132
+ * - TencentCloudChat.TYPES.MSG_REMIND_ACPT_NOT_NOTE,the SDK receives a message and throws a MESSAGE_RECEIVED event to notify the access side, which then does not send a notification.
133
+ */
134
+ messageRemindType?: TencentCloudChat.TYPES;
135
+ startHour?: number;
136
+ startMinute?: number;
137
+ startSecond?: number;
138
+ duration?: number;
139
+ isRepeated?: boolean;
140
+ }
141
+
142
+ declare interface GET_GROUP_MESSAGE_READ_MEMBER_LIST_OPTIONS {
143
+ /**
144
+ * group message
145
+ */
146
+ message: Message;
147
+ /**
148
+ * Pulling-by-page cursor. It is set to 0 when the information is pulled for the first time. The value of this field in the callback for the current paginated pulling is passed in for the next pull.
149
+ */
150
+ cursor: string;
151
+ /**
152
+ * Specify the group message read members type.
153
+ * - 0, read, by default.
154
+ * - 1, unread.
155
+ */
156
+ filter: number;
157
+ /**
158
+ * Number of read members pulled per page. maximum support 100.
159
+ */
160
+ count: number;
161
+ }
162
+
163
+ declare interface SET_CONVERSATION_CUSTOM_DATA_OPTIONS {
164
+ /**
165
+ * conversation ID list
166
+ */
167
+ conversationIDList: Array<string>;
168
+ /**
169
+ * Maximum support 256 bytes
170
+ */
171
+ customData: string;
172
+ }
173
+
174
+ declare interface MARK_CONVERSATION_OPTIONS {
175
+ /**
176
+ * conversation ID list
177
+ */
178
+ conversationIDList: Array<string>;
179
+ /**
180
+ * mark type of the conversation
181
+ */
182
+ markType: number;
183
+ /**
184
+ * - true mark
185
+ * - false unmark
186
+ */
187
+ enableMark: boolean;
188
+ }
189
+
190
+ declare interface CREATE_CONVERSATION_GROUP_OPTIONS {
191
+ /**
192
+ * conversation ID list
193
+ */
194
+ conversationIDList: Array<string>;
195
+ /**
196
+ * group name(Required parameters, length must be greater than 0, maximum support 32 bytes)
197
+ */
198
+ groupName: string;
199
+ }
200
+
201
+ declare interface RENAME_CONVERSATION_GROUP_OPTIONS {
202
+ oldName: string;
203
+ newName: string;
204
+ }
205
+
206
+ declare interface ADD_CONVERSATIONS_TO_GROUP_OPTIONS {
207
+ /**
208
+ * conversation ID list
209
+ */
210
+ conversationIDList: Array<string>;
211
+ /**
212
+ * group name(Required parameters, length must be greater than 0, maximum support 32 bytes)
213
+ */
214
+ groupName: string;
215
+ }
216
+
217
+ declare interface DELETE_CONVERSATIONS_FROM_GROUP_OPTIONS {
218
+ /**
219
+ * conversation ID list
220
+ */
221
+ conversationIDList: Array<string>;
222
+ /**
223
+ * group name(Required parameters, length must be greater than 0, maximum support 32 bytes)
224
+ */
225
+ groupName: string;
226
+ }
227
+
228
+ declare interface GET_USER_PROFILE_OPTIONS {
229
+ /**
230
+ * User account list
231
+ */
232
+ userIDList: Array<string>;
233
+ }
234
+
235
+ declare interface UPDATE_YOUR_PROFILE_OPTIONS {
236
+ /**
237
+ * Nickname
238
+ */
239
+ nick?: string;
240
+ /**
241
+ * Profile photo address
242
+ */
243
+ avatar?: string;
244
+ /**
245
+ * - TencentCloudChat.TYPES.GENDER_UNKNOWN: unspecified
246
+ * - TencentCloudChat.TYPES.GENDER_FEMALE: female
247
+ * - TencentCloudChat.TYPES.GENDER_MALE: male
248
+ */
249
+ gender?: TencentCloudChat.TYPES;
250
+ /**
251
+ * Status
252
+ */
253
+ selfSignature?: string;
254
+ /**
255
+ * When receiving friend requests from others:
256
+ * - TencentCloudChat.TYPES.ALLOW_TYPE_ALLOW_ANY: accept any friend request received automatically without verification
257
+ * - TencentCloudChat.TYPES.ALLOW_TYPE_NEED_CONFIRM: verification is required for friend requests received
258
+ * - TencentCloudChat.TYPES.ALLOW_TYPE_DENY_ANY: reject friend requests received
259
+ */
260
+ allowType?: TencentCloudChat.TYPES;
261
+ /**
262
+ * Birthday. Recommended format: 20000101
263
+ */
264
+ birthday?: number;
265
+ /**
266
+ * Location. Recommended usage: We recommend that the app locally define a set of mappings between numbers and location names, and the backend actually stores 4 numbers of the uint32_t type, indicating the country, province, city, and county in sequence.
267
+ */
268
+ location?: string;
269
+ language?: number;
270
+ /**
271
+ * - 0: receive messages
272
+ * - 1: do not receive messages
273
+ */
274
+ messageSettings?: number;
275
+ /**
276
+ * Whether the admin prohibits the user from initiating a friend request:
277
+ * - TencentCloudChat.TYPES.FORBID_TYPE_NONE (default value): allow the user to initiate a friend request
278
+ * - TencentCloudChat.TYPES.FORBID_TYPE_SEND_OUT: prohibit the user from initiating a friend request
279
+ */
280
+ adminForbidType?: TencentCloudChat.TYPES;
281
+ /**
282
+ * We recommend that you divide the level to store the level information of multiple roles.
283
+ */
284
+ level?: number;
285
+ /**
286
+ * We recommend that you divide the role to store the information of multiple roles.
287
+ */
288
+ role?: number;
289
+ /**
290
+ * Collection of custom profile key-value pairs, which can be used as needed.
291
+ */
292
+ profileCustomField?: Array<any>;
293
+ }
294
+
295
+ declare interface ADD_TO_BLOCKLIST_LIST_OPTIONS {
296
+ /**
297
+ * List of the userIDs to be added to the blocklist. The number of userIDs in a single request cannot exceed 1,000.
298
+ */
299
+ userIDList: Array<string>;
300
+ }
301
+
302
+ declare interface REMOVE_FROM_BLOCKLIST_LIST_OPTIONS {
303
+ /**
304
+ * List of the userIDs to be removed from the blocklist. The number of userIDs in a single request cannot exceed 1,000.
305
+ */
306
+ userIDList: Array<string>;
307
+ }
308
+
309
+ declare interface SET_SELF_STATUS_OPTIONS {
310
+ customStatus: string;
311
+ }
312
+
313
+ declare interface GET_USER_STATUS_OPTIONS {
314
+ /**
315
+ * List of the userIDs. The number of userIDs in a single request cannot exceed 500.
316
+ */
317
+ userIDList: Array<string>;
318
+ }
319
+
320
+ declare interface SUBSCRIBE_USER_STATUS_OPTIONS {
321
+ /**
322
+ * List of the userIDs. The number of userIDs in a single request cannot exceed 100.
323
+ */
324
+ userIDList: Array<string>;
325
+ }
326
+
327
+ declare interface UNSUBSCRIBE_USER_STATUS_OPTIONS {
328
+ /**
329
+ * Identifiers for users whose status will be unsubscribed. If userIDList is undefined, status of all users will be unsubscribed.
330
+ */
331
+ userIDList: Array<string> | undefined;
332
+ }
333
+
334
+ declare interface ADD_FRIEND_OPTIONS {
335
+ /**
336
+ * User ID
337
+ */
338
+ to: string;
339
+ /**
340
+ * Source from which a friend is addFriend.
341
+ * - The source field contains a prefix and keyword.
342
+ * - The prefix of the source field is AddSource_Type_.
343
+ * - Keyword: the keyword must be a string of letters with a length no more than 8 bytes. You are advised to use an English word or its abbreviation as the keyword.
344
+ * - Example: if the source keyword is Android, the source field is AddSource_Type_Android.
345
+ */
346
+ source: string;
347
+ /**
348
+ * Friend request content. The maximum length of friend request content cannot exceed 256 bytes.
349
+ */
350
+ wording?: string;
351
+ /**
352
+ * Friend adding mode, defaults to two-way friend adding.
353
+ * - TencentCloudChat.TYPES.SNS_ADD_TYPE_SINGLE: one-way friend adding (one-way friend relationship: B is on A's friend list, but A is not on B's friend list)
354
+ * - TencentCloudChat.TYPES.SNS_ADD_TYPE_BOTH: two-way friend adding (two-way friend relationship: A and B are on each other's friend list)
355
+ */
356
+ type?: TencentCloudChat.TYPES;
357
+ /**
358
+ * Friend remarks. The maximum length of friend remarks cannot exceed 96 bytes.
359
+ */
360
+ remark?: string;
361
+ /**
362
+ * Friend Group. The length of a groupName cannot exceed 30 bytes.
363
+ */
364
+ groupName?: string;
365
+ }
366
+
367
+ declare interface DELETE_FRIEND_OPTIONS {
368
+ /**
369
+ * List of the userIDs to be deleted. The number of userIDs in a single request cannot exceed 100.
370
+ */
371
+ userIDList: Array<string>;
372
+ /**
373
+ * Deletion mode. Two-way deletion is the default mode.
374
+ * - TencentCloudChat.TYPES.SNS_DELETE_TYPE_SINGLE: one-way deletion (only delete B from A's friend list but do not delete A from B's friend list)
375
+ * - TencentCloudChat.TYPES.SNS_DELETE_TYPE_BOTH: two-way deletion (delete A and B from each other's friend lists)
376
+ */
377
+ type?: TencentCloudChat.TYPES;
378
+ }
379
+
380
+ declare interface CHECK_FRIEND_OPTIONS {
381
+ /**
382
+ * List of friend userIDs to verify. The number of userIDs in a single request cannot exceed 1,000.
383
+ */
384
+ userIDList: Array<string>;
385
+ /**
386
+ * Verification mode. Two-way verification is the default mode.
387
+ * - TencentCloudChat.TYPES.SNS_CHECK_TYPE_SINGLE: one-way friend verification (check whether B is on A's friend list, but does not check whether A is on B's friend list)
388
+ * - TencentCloudChat.TYPES.SNS_CHECK_TYPE_BOTH: two-way friend verification (check whether A and B are on each other's friend lists)
389
+ */
390
+ type: TencentCloudChat.TYPES;
391
+ }
392
+
393
+ declare interface GET_FRIEND_PROFILE_OPTIONS {
394
+ /**
395
+ * List of userIDs whose data is to be obtained
396
+ */
397
+ userIDList: Array<string>;
398
+ }
399
+
400
+ declare interface UPDATE_FRIEND_OPTIONS {
401
+ /**
402
+ * Friend userID
403
+ */
404
+ userID: string;
405
+ /**
406
+ * Friend remark. The maximum length of friend remarks cannot exceed 96 bytes.
407
+ */
408
+ remark?: string;
409
+ /**
410
+ * Collection of custom friend field key-value pairs.
411
+ */
412
+ friendCustomField?: Array<any>;
413
+ }
414
+
415
+ declare interface ACCEPT_FRIEND_APPLICATION_OPTIONS {
416
+ /**
417
+ * userID for which the friend request is to be accepted
418
+ */
419
+ userID: string;
420
+ /**
421
+ * Friend remarks
422
+ */
423
+ remark?: string;
424
+ /**
425
+ * Accepting mode.
426
+ * - TencentCloudChat.TYPES.SNS_APPLICATION_AGREE: agree to add as a one-way friend
427
+ * - TencentCloudChat.TYPES.SNS_APPLICATION_AGREE_AND_ADD: agree to add as a two-way friend
428
+ */
429
+ type: TencentCloudChat.TYPES;
430
+ }
431
+
432
+ declare interface REFUSE_FRIEND_APPLICATION_OPTIONS {
433
+ /**
434
+ * userID for which the friend request is to be rejected
435
+ */
436
+ userID: string;
437
+ }
438
+
439
+ declare interface DELETE_FRIEND_APPLICATION_OPTIONS {
440
+ /**
441
+ * userID for which the friend request is to be deleted
442
+ */
443
+ userID: string;
444
+ /**
445
+ * Friend request type
446
+ * - TencentCloudChat.TYPES.SNS_APPLICATION_SENT_TO_ME: friend request received by me
447
+ * - TencentCloudChat.TYPES.SNS_APPLICATION_SENT_BY_ME: friend request sent by me
448
+ */
449
+ type: TencentCloudChat.TYPES;
450
+ }
451
+
452
+ declare interface CREATE_FRIEND_GROUP_OPTIONS {
453
+ /**
454
+ * Friend group name
455
+ */
456
+ name: string;
457
+ /**
458
+ * List of friend userIDs to be added to the friend group
459
+ */
460
+ userIDList: Array<string>;
461
+ }
462
+
463
+ declare interface DELETE_FRIEND_GROUP_OPTIONS {
464
+ /**
465
+ * Name of the friend group to be deleted
466
+ */
467
+ name: string;
468
+ }
469
+
470
+ declare interface ADD_TO_FRIEND_GROUP_OPTIONS {
471
+ /**
472
+ * Friend group name
473
+ */
474
+ name: string;
475
+ /**
476
+ * List of friend userIDs to be added to the friend group
477
+ */
478
+ userIDList: Array<string>;
479
+ }
480
+
481
+ declare interface REMOVE_FROM_FRIEND_GROUP_OPTIONS {
482
+ /**
483
+ * Friend group name
484
+ */
485
+ name: string;
486
+ /**
487
+ * List of friend userIDs to be removed from the friend group
488
+ */
489
+ userIDList: Array<string>;
490
+ }
491
+
492
+ declare interface RENAME_FRIEND_GROUP_OPTIONS {
493
+ /**
494
+ * Original name of the friend group
495
+ */
496
+ oldName: string;
497
+ /**
498
+ * New name of the friend group
499
+ */
500
+ newName: string;
501
+ }
502
+
503
+ declare interface GET_GROUP_PROFILE_OPTIONS {
504
+ groupID: string;
505
+ /**
506
+ * Group-specific custom field filter, which specifies the group custom fields to pull.
507
+ */
508
+ groupCustomFieldFilter?: Array<string>;
509
+ }
510
+
511
+ declare interface CREATE_GROUP_OPTIONS {
512
+ /**
513
+ * Group name. The maximum length is 30 bytes. This parameter is required.
514
+ */
515
+ name: string;
516
+ /**
517
+ * Group type. Supported group types are as follows:
518
+ * - TencentCloudChat.TYPES.GRP_WORK (default value): work group
519
+ * - TencentCloudChat.TYPES.GRP_PUBLIC: public group
520
+ * - TencentCloudChat.TYPES.GRP_MEETING: meeting group
521
+ * - TencentCloudChat.TYPES.GRP_AVCHATROOM: audio-video group
522
+ */
523
+ type: TencentCloudChat.TYPES;
524
+ /**
525
+ * Group ID. If no value is specified, the SDK automatically creates a unique group ID.
526
+ */
527
+ groupID?: string;
528
+ /**
529
+ * Group ID. If no value is specified, the SDK automatically creates a unique group ID.
530
+ */
531
+ introduction?: string;
532
+ /**
533
+ * Group notice. The maximum length is 300 bytes.
534
+ */
535
+ notification?: string;
536
+ /**
537
+ * Group profile photo URL. The maximum length is 100 bytes.
538
+ */
539
+ avatar?: string;
540
+ /**
541
+ * Maximum number of group members. Default value: 200 for a work group, 2000 for a public group, 10000 for a meeting group, and no limit for an audio-video group
542
+ */
543
+ maxMemberNum?: number;
544
+ /**
545
+ * Method for handling requests to join the group
546
+ * - TencentCloudChat.TYPES.JOIN_OPTIONS_FREE_ACCESS: allow free group joining
547
+ * - TencentCloudChat.TYPES.JOIN_OPTIONS_NEED_PERMISSION: require approval for group joining
548
+ * - TencentCloudChat.TYPES.JOIN_OPTIONS_DISABLE_APPLY: forbid group joining
549
+ */
550
+ joinOption?: TencentCloudChat.TYPES;
551
+ /**
552
+ * Initial group member list, which can contain up to 500 members. Members cannot be added when you create an audio-video group.
553
+ */
554
+ memberList?: Array<any>;
555
+ /**
556
+ * Group custom field. By default, this parameter is not available and needs to be enabled.
557
+ */
558
+ groupCustomField?: Array<any>;
559
+ /**
560
+ * - true, create a community group that supports topic
561
+ * - false, create a community group that not support topic
562
+ */
563
+ isSupportTopic?: boolean;
564
+ }
565
+
566
+ declare interface UPDATE_GROUP_PROFILE_OPTIONS {
567
+ groupID: string;
568
+ /**
569
+ * Group name. The maximum length is 30 bytes. This parameter is required.
570
+ */
571
+ name?: string;
572
+ /**
573
+ * Group profile photo URL. The maximum length is 100 bytes.
574
+ */
575
+ avatar?: string;
576
+ /**
577
+ * Group ID. If no value is specified, the SDK automatically creates a unique group ID.
578
+ */
579
+ introduction?: string;
580
+ /**
581
+ * Group notice. The maximum length is 300 bytes.
582
+ */
583
+ notification?: string;
584
+ /**
585
+ * Whether to mute all. true: mute all; false: unmute all
586
+ */
587
+ muteAllMembers?: boolean;
588
+ /**
589
+ * Method for handling requests to join the group
590
+ * - TencentCloudChat.TYPES.JOIN_OPTIONS_FREE_ACCESS: allow free group joining
591
+ * - TencentCloudChat.TYPES.JOIN_OPTIONS_NEED_PERMISSION: require approval for group joining
592
+ * - TencentCloudChat.TYPES.JOIN_OPTIONS_DISABLE_APPLY: forbid group joining
593
+ */
594
+ joinOption?: TencentCloudChat.TYPES;
595
+ /**
596
+ * Group custom field. By default, this parameter is not available and needs to be enabled.
597
+ */
598
+ groupCustomField?: Array<any>;
599
+ }
600
+
601
+ declare interface JOIN_GROUP_OPTIONS {
602
+ groupID: string;
603
+ applyMessage?: string;
604
+ /**
605
+ * Type of the group to join. This field is required when the user wants to join an audio-video group. Valid values:
606
+ * - TencentCloudChat.TYPES.GRP_PUBLIC, Public group
607
+ * - TencentCloudChat.TYPES.GRP_MEETING, Meeting group
608
+ * - TencentCloudChat.TYPES.GRP_AVCHATROOM, Audio-video group
609
+ * - TencentCloudChat.TYPES.GRP_COMMUNITY, Community group
610
+ */
611
+ type?: TencentCloudChat.TYPES;
612
+ }
613
+
614
+ declare interface CHANGE_GROUP_OWNER_OPTIONS {
615
+ groupID: string;
616
+ newOwnerID: string;
617
+ }
618
+
619
+ declare interface HANDLE_GROUP_APPLICATION_OPTIONS {
620
+ /**
621
+ * Processing result: Agree or Reject
622
+ */
623
+ handleAction: string;
624
+ /**
625
+ * Remarks
626
+ */
627
+ handleMessage?: string;
628
+ /**
629
+ * Message instance of the corresponding group system message
630
+ */
631
+ message?: Message;
632
+ application?: any;
633
+ }
634
+
635
+ declare interface INIT_GROUP_ATTRIBUTE_OPTIONS {
636
+ groupID: string;
637
+ groupAttributes: any;
638
+ }
639
+
640
+ declare interface SET_GROUP_ATTRIBUTE_OPTIONS {
641
+ groupID: string;
642
+ groupAttributes: any;
643
+ }
644
+
645
+ declare interface DELETE_GROUP_ATTRIBUTE_OPTIONS {
646
+ groupID: string;
647
+ /**
648
+ * List of group attribute keys
649
+ */
650
+ keyList: Array<string>;
651
+ }
652
+
653
+ declare interface GET_GROUP_ATTRIBUTE_OPTIONS {
654
+ groupID: string;
655
+ /**
656
+ * List of group attribute keys
657
+ */
658
+ keyList: Array<string>;
659
+ }
660
+
661
+ declare interface SET_GROUP_COUNTER_OPTIONS {
662
+ groupID: string;
663
+ counters: any;
664
+ }
665
+
666
+ declare interface INCREASE_GROUP_COUNTER_OPTIONS {
667
+ groupID: string;
668
+ key: string;
669
+ value: number;
670
+ }
671
+
672
+ declare interface DECREASE_GROUP_COUNTER_OPTIONS {
673
+ groupID: string;
674
+ key: string;
675
+ value: number;
676
+ }
677
+
678
+ declare interface GET_GROUP_COUNTERS_OPTIONS {
679
+ groupID: string;
680
+ /**
681
+ * List of group counter keys
682
+ */
683
+ keyList?: Array<string>;
684
+ }
685
+
686
+ declare interface GET_GROUP_MEMBER_LIST_OPTIONS {
687
+ groupID: string;
688
+ /**
689
+ * Number of group members whose IDs are to be pulled. The maximum value is 100
690
+ */
691
+ count?: number;
692
+ /**
693
+ * Offset. Group members are pulled from 0 by default
694
+ */
695
+ offset?: number | string;
696
+ /**
697
+ * Custom mark of group members, only available in audio-video group
698
+ */
699
+ filter?: number;
700
+ /**
701
+ * Member role. Pull the group members of the specified role. If the value is undefined, all group members will be pulled
702
+ */
703
+ role?: string;
704
+ }
705
+
706
+ declare interface GET_GROUP_MEMBER_PROFILE_OPTIONS {
707
+ groupID: string;
708
+ /**
709
+ * List of IDs of group members whose profiles you want to query
710
+ */
711
+ userIDList: Array<string>;
712
+ /**
713
+ * Group member custom field to query. This field is optional. If no value is passed in, the SDK queries all group member custom fields by default.
714
+ */
715
+ memberCustomFieldFilter?: Array<string>;
716
+ }
717
+
718
+ declare interface ADD_GROUP_MEMBER_OPTIONS {
719
+ groupID: string;
720
+ /**
721
+ * An array of IDs of the group members to be added. Up to 500 group members can be added at a time.
722
+ */
723
+ userIDList: Array<string>;
724
+ }
725
+
726
+ declare interface DELETE_GROUP_MEMBER_OPTIONS {
727
+ groupID: string;
728
+ /**
729
+ * List of userIDs of group members to be deleted
730
+ */
731
+ userIDList: Array<string>;
732
+ /**
733
+ * Reason for group member deletion
734
+ */
735
+ reason?: string;
736
+ duration?: number;
737
+ }
738
+
739
+ declare interface SET_GROUP_MEMBER_MUTE_TIME_OPTIONS {
740
+ groupID: string;
741
+ userID: string;
742
+ /**
743
+ * Muting duration, in seconds. For example, if the muting duration is set to 1000, the user is muted for 1,000 seconds immediately. If the muting duration is set to 0, the user is unmuted.
744
+ */
745
+ muteTime: number;
746
+ }
747
+
748
+ declare interface SET_GROUP_MEMBER_ROLE_OPTIONS {
749
+ groupID: string;
750
+ userID: string;
751
+ /**
752
+ * Valid values:
753
+ * - TencentCloudChat.TYPES.GRP_MBR_ROLE_ADMIN (group admin)
754
+ * - TencentCloudChat.TYPES.GRP_MBR_ROLE_MEMBER (common group member)
755
+ */
756
+ role: TencentCloudChat.TYPES;
757
+ }
758
+
759
+ declare interface SET_GROUP_MEMBER_NAME_CARD_OPTIONS {
760
+ groupID: string;
761
+ nameCard: string;
762
+ /**
763
+ * ID of the user whose name card is to be modified. The value is the user's own userID by default.
764
+ */
765
+ userID?: string;
766
+ }
767
+
768
+ declare interface SET_GROUP_MEMBER_CUSTOM_FIELD_OPTIONS {
769
+ groupID: string;
770
+ memberCustomField: Array<any>;
771
+ /**
772
+ * ID of the group member whose custom field is to be modified. If this field is not specified, the user's own group member custom field is modified by default.
773
+ */
774
+ userID?: string;
775
+ }
776
+
777
+ declare interface MARK_GROUP_MEMBER_LIST_OPTIONS {
778
+ groupID: string;
779
+ /**
780
+ * List of userIDs of group members to be marked. maximum support 500.
781
+ */
782
+ userIDList: Array<string>;
783
+ /**
784
+ * The value must be equal or greater than 1000. You can customize it. A maximum of 10 marks are allowed to be defined in an AVChatRoom.
785
+ */
786
+ markType: number;
787
+ /**
788
+ * True means setting the mark, and false means removing the mark.
789
+ */
790
+ enableMark: boolean;
791
+ }
792
+
793
+ declare interface CREATE_TOPIC_IN_COMMUNICATION_OPTIONS {
794
+ groupID: string;
795
+ topicName: string;
796
+ topicID?: string;
797
+ avatar?: string;
798
+ notification?: string;
799
+ introduction?: string;
800
+ customData?: string;
801
+ }
802
+
803
+ declare interface DELETE_TOPIC_FROM_COMMUNICATION_OPTIONS {
804
+ groupID: string;
805
+ /**
806
+ * Undefined means removing all topics in the community group.
807
+ */
808
+ topicIDList: Array<string> | undefined;
809
+ }
810
+
811
+ declare interface UPDATE_TOPIC_PROFILE_OPTIONS {
812
+ groupID: string;
813
+ topicID: string;
814
+ topicName?: string;
815
+ avatar?: string;
816
+ notification?: string;
817
+ introduction?: string;
818
+ customData?: string;
819
+ muteAllMembers?: boolean;
820
+ }
821
+
822
+ declare interface GET_TOPIC_LIST_OPTIONS {
823
+ groupID: string;
824
+ /**
825
+ * Undefined means fetching all topics in the community group.
826
+ */
827
+ topicIDList: Array<string> | undefined;
828
+ }
829
+
830
+ declare interface MESSAGE_OPTIONS {
831
+ /**
832
+ * userID or groupID of the message recipient
833
+ */
834
+ to: string;
835
+ /**
836
+ * Conversation type. Valid values:
837
+ * - TencentCloudChat.TYPES.CONV_C2C (one-to-one chat)
838
+ * - TencentCloudChat.TYPES.CONV_GROUP (group chat)
839
+ */
840
+ conversationType: TencentCloudChat.TYPES;
841
+ /**
842
+ * Message priority
843
+ */
844
+ priority?: TencentCloudChat.TYPES;
845
+ /**
846
+ * Message content container
847
+ */
848
+ payload: any;
849
+ /**
850
+ * Message custom data (saved in the cloud, will be sent to the peer end, and can still be pulled after the app is uninstalled and reinstalled
851
+ */
852
+ cloudCustomData?: string;
853
+ /**
854
+ * Whether a read receipt is required.
855
+ * - You need to buy Flagship Edition to use this feature for both group and one-to-one chats
856
+ * - You need to go to the Chat console to enable this feature for specific group type.
857
+ */
858
+ needReadReceipt?: boolean;
859
+ /**
860
+ * Message receivers
861
+ */
862
+ receiverList?: Array<string>;
863
+ /**
864
+ * Whether to support message extension
865
+ */
866
+ isSupportExtension?: boolean;
867
+ /**
868
+ * Callback function used to query the upload progress
869
+ */
870
+ onProgress?: Function;
871
+ /**
872
+ * Message custom moderation configuration (supported only in v3.3.0 and later versions)
873
+ * Valid only after the [Cloud Moderation] function is activated.
874
+ * You can go to the [Console](https://console.cloud.tencent.com/im) (Cloud moderation -> Moderation configuration -> Custom configuration -> Add custom configuration) to get the configuration ID.
875
+ * [Custom moderation] please refer to document [cloud moderation function](https://cloud.tencent.com/document/product/269/78633#a5efc9e8-a7ec-40e3-9b18-8ed1910f589c)
876
+ * This field needs to be set up before sending messages. It is only used to control the message moderation when sending messages, it's value will not be stored in cloud and local.
877
+ * @property(nonatomic,strong) NSString *customModerationConfigurationID;
878
+ */
879
+ customModerationConfigurationID?: string;
880
+ }
881
+
882
+ declare interface TRANSLATE_TEXT_OPTIONS {
883
+ sourceTextList: Array<string>;
884
+ sourceLanguage: string;
885
+ targetLanguage: string;
886
+ }
887
+
888
+ declare interface CONVERT_VOICE_TO_TEXT_OPTIONS {
889
+ message: Message;
890
+ language?: string;
891
+ }
892
+
893
+ declare interface MESSAGE_SEARCH_OPTIONS {
894
+ keywordList?: Array<string>;
895
+ keywordListMatchType?: 'or' | 'and';
896
+ senderUserIDList?: Array<string>;
897
+ messageTypeList?: Array<string>;
898
+ conversationID?: string;
899
+ timePosition?: number;
900
+ timePeriod?: number;
901
+ count?: number;
902
+ cursor?: string;
903
+ }
904
+
905
+ declare interface USER_CLOUD_SEARCH_OPTIONS {
906
+ keywordList?: Array<string>;
907
+ keywordListMatchType?: 'or' | 'and';
908
+ miniBirthday?: number;
909
+ maxBirthday?: number;
910
+ userGenderType?: TencentCloudChat.TYPES.GENDER_FEMALE | TencentCloudChat.TYPES.GENDER_MALE;
911
+ count?: number;
912
+ cursor?: string;
913
+ }
914
+
915
+ declare interface GROUP_CLOUD_SEARCH_OPTIONS {
916
+ keywordList?: Array<string>;
917
+ keywordListMatchType?: 'or' | 'and';
918
+ groupTypeList?: Array<string>;
919
+ count?: number;
920
+ cursor?: string;
921
+ }
922
+
923
+ declare interface MEMBER_CLOUD_SEARCH_OPTIONS {
924
+ keywordList?: Array<string>;
925
+ keywordListMatchType?: 'or' | 'and';
926
+ groupTypeList?: Array<string>;
927
+ groupIDList?: Array<string>;
928
+ count?: number;
929
+ cursor?: string;
930
+ }
931
+
932
+
933
+ declare interface GET_MESSAGE_REACTIONS_OPTIONS {
934
+ messageList: Array<Message>;
935
+ maxUserCountPerReaction?: number;
936
+ }
937
+
938
+ declare interface GET_USER_LIST_MESSAGE_REACTIONS_OPTIONS {
939
+ message: Message;
940
+ reactionID: string;
941
+ nextSeq: number;
942
+ count?: number;
943
+ }
944
+
945
+ export declare interface Message {
946
+ /**
947
+ * Message ID
948
+ */
949
+ ID: string;
950
+ /**
951
+ * Message type
952
+ */
953
+ type: TencentCloudChat.TYPES;
954
+ /**
955
+ * Message content
956
+ */
957
+ payload: any;
958
+ /**
959
+ * Conversation ID of the message
960
+ */
961
+ conversationID: string;
962
+ /**
963
+ * Conversation type of the message
964
+ */
965
+ conversationType: TencentCloudChat.TYPES;
966
+ /**
967
+ * Recipient's userID
968
+ */
969
+ to: string;
970
+ /**
971
+ * Sender's userID. In the case of message sending, this field is set to the current login user by default
972
+ */
973
+ from: string;
974
+ /**
975
+ * Message flow.
976
+ * - in: received message
977
+ * - out: sent message
978
+ */
979
+ flow: string;
980
+ /**
981
+ * Message timestamp, in seconds
982
+ */
983
+ time: number;
984
+ /**
985
+ * Message status
986
+ * - unSend: not sent
987
+ * - success: sent successfully
988
+ * - fail: sending failed
989
+ */
990
+ status: string;
991
+ /**
992
+ * Whether the message is a recalled message. true indicates that the message is a recalled message
993
+ */
994
+ isRevoked: boolean;
995
+ /**
996
+ * Message priority, used for group chat
997
+ */
998
+ priority: TencentCloudChat.TYPES;
999
+ /**
1000
+ * Nickname of the message sender
1001
+ */
1002
+ nick: string;
1003
+ /**
1004
+ * Profile photo of the message sender
1005
+ */
1006
+ avatar: string;
1007
+ /**
1008
+ * Whether the message is read by peer in a one-to-one chat
1009
+ */
1010
+ isPeerRead: boolean;
1011
+ /**
1012
+ * Group name card of the message sender
1013
+ */
1014
+ nameCard: string;
1015
+ /**
1016
+ * userIDs of @ group members in a group chat
1017
+ */
1018
+ atUserList: Array<string>;
1019
+ /**
1020
+ * Message custom data (saved in the cloud, will be sent to the peer end, and can still be pulled after the app is uninstalled and reinstalled
1021
+ */
1022
+ cloudCustomData: string;
1023
+ /**
1024
+ * Whether the message is a deleted message. true indicates that the message is a deleted message
1025
+ */
1026
+ isDeleted: boolean;
1027
+ /**
1028
+ * Whether the message is modified by a third party. true indicates that the message is modified by a third party
1029
+ */
1030
+ isModified: boolean;
1031
+ /**
1032
+ * Whether the message sender need read receipt
1033
+ */
1034
+ needReadReceipt: boolean;
1035
+ /**
1036
+ * Info about read receipt
1037
+ */
1038
+ readReceiptInfo: any;
1039
+ /**
1040
+ * Whether the message is a broadcast message, only available in audio-video group(You need to buy Flagship Edition)
1041
+ */
1042
+ isBroadcastMessage: boolean;
1043
+ /**
1044
+ * Whether to support message extension(You need to buy Flagship Edition)
1045
+ */
1046
+ isSupportExtension: boolean;
1047
+ /**
1048
+ * Deprecated, use revokerInfo instead
1049
+ */
1050
+ revoker: string;
1051
+ /**
1052
+ * UserInfo of revoker
1053
+ */
1054
+ revokerInfo: UserInfo;
1055
+ /**
1056
+ * Reason for retraction of the message
1057
+ */
1058
+ revokeReason: string;
1059
+ /**
1060
+ * sequence of the message, generated by server
1061
+ */
1062
+ sequence: number;
1063
+ /**
1064
+ * true indicates that the message has risk content
1065
+ */
1066
+ hasRiskContent: boolean;
1067
+ }
1068
+
1069
+ export declare interface UserInfo {
1070
+ avatar: string;
1071
+ nick: string;
1072
+ userID: string;
1073
+ }
1074
+
1075
+ export declare interface SimplifiedMessage {
1076
+ ID: string;
1077
+ /**
1078
+ * Nickname of the message sender
1079
+ */
1080
+ nick: string;
1081
+ /**
1082
+ * Profile photo address of the message sender
1083
+ */
1084
+ avatar: string;
1085
+ /**
1086
+ * userID of the message sender
1087
+ */
1088
+ from: string;
1089
+ /**
1090
+ * Message Body
1091
+ */
1092
+ messageBody: Array<any>;
1093
+ /**
1094
+ * Message timestamp, in seconds
1095
+ */
1096
+ time: number;
1097
+ /**
1098
+ * Message custom data (saved in the cloud, will be sent to the peer end, and can still be pulled after the app is uninstalled and reinstalled)
1099
+ */
1100
+ cloudCustomData: string;
1101
+ }
1102
+
1103
+ export declare interface Conversation {
1104
+ /**
1105
+ * Conversation ID. Supported formats are as follows:
1106
+ * - C2C${userID} (one-to-one chat)
1107
+ * - GROUP${groupID} (group chat)
1108
+ * - @TIM#SYSTEM (system notification conversation)
1109
+ */
1110
+ conversationID: string;
1111
+ /**
1112
+ * Conversation type. Supported values are as follows:
1113
+ * - TencentCloudChat.TYPES.CONV_C2C, one-to-one chat
1114
+ * - TencentCloudChat.TYPES.CONV_GROUP, group chat
1115
+ * - TencentCloudChat.TYPES.CONV_SYSTEM, system conversation
1116
+ */
1117
+ type: TencentCloudChat.TYPES;
1118
+ /**
1119
+ * Unread message count. TencentCloudChat.TYPES.GRP_MEETING and TencentCloudChat.TYPES.GRP_AVCHATROOM groups do not support the unread count feature, and this field is 0 for them.
1120
+ */
1121
+ unreadCount: number;
1122
+ /**
1123
+ * Latest message of the conversation
1124
+ */
1125
+ lastMessage: any;
1126
+ /**
1127
+ * Group profile of a group chat
1128
+ */
1129
+ groupProfile: Group;
1130
+ /**
1131
+ * User profile of a one-to-one chat
1132
+ */
1133
+ userProfile: Profile;
1134
+ /**
1135
+ * @ information list of a group chat, which can be used by the access side to display "someone@me" or "@All" notifications on the chat list.
1136
+ */
1137
+ groupAtInfoList: Array<any>;
1138
+ /**
1139
+ * Friend remarks. This field has a value only for a one-to-one chat where the peer party is my friend and I have set remarks for this friend
1140
+ */
1141
+ remark: string;
1142
+ /**
1143
+ * Whether the chat is pinned on top
1144
+ */
1145
+ isPinned: boolean;
1146
+ /**
1147
+ * - TencentCloudChat.TYPES.MSG_REMIND_ACPT_AND_NOTE,the SDK receives a message and throws a MESSAGE_RECEIVED event to notify the access side, which then sends a notification.
1148
+ * - TencentCloudChat.TYPES.MSG_REMIND_ACPT_NOT_NOTE,the SDK receives a message and throws a MESSAGE_RECEIVED event to notify the access side, which then does not send a notification.
1149
+ * - TencentCloudChat.TYPES.MSG_REMIND_DISCARD, the SDK rejects a message.
1150
+ * - TencentCloudChat.TYPES.NOT_RECEIVE_OFFLINE_PUSH_EXCEPT_AT,the SDK receives a message online and only receives offline push for group mentions when offline.
1151
+ */
1152
+ messageRemindType: TencentCloudChat.TYPES;
1153
+ markList: Array<number>;
1154
+ customData: string;
1155
+ conversationGroupList: Array<string>;
1156
+ draftText: string;
1157
+ }
1158
+
1159
+ export declare interface Group {
1160
+ /**
1161
+ * Unique identifier of the group. Each group ID must be unique in the app. The prefix is @TGS#, and custom group IDs can also be used in the app.
1162
+ */
1163
+ groupID: string;
1164
+ /**
1165
+ * Name of the group. The maximum length is 30 bytes and cannot be adjusted.
1166
+ */
1167
+ name: string;
1168
+ /**
1169
+ * URL of the group's profile photo. The maximum length is 100 bytes and cannot be adjusted.
1170
+ */
1171
+ avatar: string;
1172
+ /**
1173
+ * Group type. The current SDK supports the following types:
1174
+ * - TencentCloudChat.TYPES.GRP_WORK, Work group
1175
+ * - TencentCloudChat.TYPES.GRP_PUBLIC, Public group
1176
+ * - TencentCloudChat.TYPES.GRP_MEETING, Meeting group
1177
+ * - TencentCloudChat.TYPES.GRP_AVCHATROOM, Audio-video group
1178
+ * - TencentCloudChat.TYPES.GRP_COMMUNITY, Community group
1179
+ */
1180
+ type: TencentCloudChat.TYPES;
1181
+ /**
1182
+ * Introduction of the group. The maximum length is 120 bytes and cannot be adjusted.
1183
+ */
1184
+ introduction: string;
1185
+ /**
1186
+ * Group announcement. The maximum length is 150 bytes and cannot be adjusted.
1187
+ */
1188
+ notification: string;
1189
+ /**
1190
+ * Group owner ID
1191
+ */
1192
+ ownerID: string;
1193
+ /**
1194
+ * Group creation time
1195
+ */
1196
+ createTime: string;
1197
+ /**
1198
+ * This value increases every time the group information changes.
1199
+ */
1200
+ infoSequence: number;
1201
+ /**
1202
+ * Time of the last change to group information
1203
+ */
1204
+ lastInfoTime: number;
1205
+ /**
1206
+ * Information of the current user in the group
1207
+ */
1208
+ selfInfo: any;
1209
+ /**
1210
+ * Last message of the group. Note that if the group is not on the conversation list, only lastTime of this object has a value, and the other values are null.
1211
+ */
1212
+ lastMessage: any;
1213
+ /**
1214
+ * Sequence number of the next message in the group chat. Every message in the group chat has a unique sequence number. Sequence numbers are consecutive numbers based on the sequence of sent messages. With every message sent in the group chat, nextMessageSeq (starting from 1) increases by 1.
1215
+ */
1216
+ nextMessageSeq: number;
1217
+ /**
1218
+ * Number of current members
1219
+ */
1220
+ memberCount: number;
1221
+ /**
1222
+ * Maximum number of members
1223
+ */
1224
+ maxMemberCount: number;
1225
+ /**
1226
+ * Whether to mute all. true: mute all; false: unmute all.
1227
+ */
1228
+ muteAllMembers: boolean;
1229
+ /**
1230
+ * Group joining option:
1231
+ * - TencentCloudChat.TYPES.JOIN_OPTIONS_FREE_ACCESS: allow free group joining. This is the fixed value for audio-video groups.
1232
+ * - TencentCloudChat.TYPES.JOIN_OPTIONS_NEED_PERMISSION: require approval for group joining.
1233
+ * - TencentCloudChat.TYPES.JOIN_OPTIONS_DISABLE_APPLY: forbid group joining. This is the fixed value for work groups.
1234
+ */
1235
+ joinOption: TencentCloudChat.TYPES;
1236
+ /**
1237
+ * Group custom field.
1238
+ */
1239
+ groupCustomField: Array<any>;
1240
+ isSupportTopic: boolean;
1241
+ }
1242
+
1243
+ export declare interface Profile {
1244
+ /**
1245
+ * User account
1246
+ */
1247
+ userID: string;
1248
+ /**
1249
+ * Nickname, whose length cannot exceed 500 bytes
1250
+ */
1251
+ nick: string;
1252
+ /**
1253
+ * Gender:
1254
+ * - TencentCloudChat.TYPES.GENDER_UNKNOWN: unspecified
1255
+ * - TencentCloudChat.TYPES.GENDER_FEMALE: female
1256
+ * - TencentCloudChat.TYPES.GENDER_MALE: male
1257
+ */
1258
+ gender: TencentCloudChat.TYPES;
1259
+ /**
1260
+ * Birthday, whose value is of the uint32 type. Recommended usage: 20000101
1261
+ */
1262
+ birthday: number;
1263
+ /**
1264
+ * Location, whose length cannot exceed 16 bytes. We recommend that the app locally define a set of mappings between numbers and location names, and the backend actually stores 4 numbers of the uint32_t type:
1265
+ * - 1st number: indicates the country.
1266
+ * - 2nd number: indicates the province.
1267
+ * - 3rd number: indicates the city.
1268
+ * - 4th number: indicates the county.
1269
+ */
1270
+ location: string;
1271
+ /**
1272
+ * Personal signature, whose length cannot exceed 500 bytes
1273
+ */
1274
+ selfSignature: string;
1275
+ /**
1276
+ * Friend request verification mode:
1277
+ * - TencentCloudChat.TYPES.ALLOW_TYPE_ALLOW_ANY: automatically accept all friend requests received
1278
+ * - TencentCloudChat.TYPES.ALLOW_TYPE_NEED_CONFIRM: manually accept friend requests received
1279
+ * - TencentCloudChat.TYPES.ALLOW_TYPE_DENY_ANY: automatically reject all friend requests received
1280
+ */
1281
+ allowType: TencentCloudChat.TYPES;
1282
+ /**
1283
+ * Language, whose value is of the uint32 type
1284
+ */
1285
+ language: number;
1286
+ /**
1287
+ * Profile photo URL, whose length cannot exceed 500 bytes
1288
+ */
1289
+ avatar: string;
1290
+ /**
1291
+ * Message setting, whose value is of the uint32 type. Flag bit: bit 0 (set to 0 to receive messages, and set to 1 to block messages)
1292
+ */
1293
+ messageSettings: number;
1294
+ /**
1295
+ * Whether the admin prohibits the user from initiating a friend request
1296
+ * - TencentCloudChat.TYPES.FORBID_TYPE_NONE: allow the user to initiate a friend request (default value)
1297
+ * - TencentCloudChat.TYPES.FORBID_TYPE_SEND_OUT: prohibit the user from initiating a friend request
1298
+ */
1299
+ adminForbidType: TencentCloudChat.TYPES;
1300
+ /**
1301
+ * Level, whose value is of the uint32 type. We recommend that you divide the level to store the level information of multiple roles.
1302
+ */
1303
+ level: number;
1304
+ /**
1305
+ * Role, whose value is of the uint32 type. We recommend that you divide the role to store the information of multiple roles.
1306
+ */
1307
+ role: number;
1308
+ /**
1309
+ * Last update time, in the user's local time
1310
+ */
1311
+ lastUpdatedNumber: number;
1312
+ /**
1313
+ * Collection of custom profile key-value pairs, which can be used as needed.
1314
+ */
1315
+ profileCustomField: Array<any>;
1316
+ }
1317
+
1318
+ export declare interface Friend {
1319
+ /**
1320
+ * Friend's ID
1321
+ */
1322
+ userID: string;
1323
+ /**
1324
+ * Friend remarks
1325
+ */
1326
+ remark: string;
1327
+ /**
1328
+ * Friend list
1329
+ */
1330
+ groupList: Array<string>;
1331
+ /**
1332
+ * Source from which a friend is added
1333
+ */
1334
+ source: string;
1335
+ /**
1336
+ * Friend request content
1337
+ */
1338
+ wording: string;
1339
+ /**
1340
+ * Friend's profile
1341
+ */
1342
+ profile: Profile;
1343
+ /**
1344
+ * Collection of custom friend field key-value pairs.
1345
+ */
1346
+ friendCustomField: Array<any>;
1347
+ }
1348
+
1349
+ export declare interface FriendApplication {
1350
+ /**
1351
+ * User ID
1352
+ * - If type is TencentCloudChat.TYPES.SNS_APPLICATION_SENT_TO_ME, userID is the ID of the user who initiates the request.
1353
+ * - If type is TencentCloudChat.TYPES.SNS_APPLICATION_SENT_BY_ME, userID is the ID of the user who receives the request.
1354
+ */
1355
+ userID: string;
1356
+ /**
1357
+ * User's profile photo
1358
+ */
1359
+ avatar: string;
1360
+ /**
1361
+ * Nickname in the friend request
1362
+ */
1363
+ nick: string;
1364
+ /**
1365
+ * Friend request time
1366
+ */
1367
+ time: number;
1368
+ /**
1369
+ * Friend request source
1370
+ */
1371
+ source: string;
1372
+ /**
1373
+ * Friend request remarks
1374
+ */
1375
+ wording: string;
1376
+ /**
1377
+ * Friend request type
1378
+ * - TencentCloudChat.TYPES.SNS_APPLICATION_SENT_TO_ME: friend request received by me
1379
+ * - TencentCloudChat.TYPES.SNS_APPLICATION_SENT_BY_ME: friend request sent by me
1380
+ */
1381
+ type: TencentCloudChat.TYPES;
1382
+ }
1383
+
1384
+ export declare interface FriendGroup {
1385
+ /**
1386
+ * Friend group name
1387
+ */
1388
+ name: string;
1389
+ /**
1390
+ * userID list of the friend group
1391
+ */
1392
+ userIDList: Array<string>;
1393
+ /**
1394
+ * Number of members on the friend group
1395
+ */
1396
+ count: number;
1397
+ }
1398
+
1399
+ export declare interface GroupMember {
1400
+ /**
1401
+ * Group member ID
1402
+ */
1403
+ userID: string;
1404
+ /**
1405
+ * Group member profile photo URL
1406
+ */
1407
+ avatar: string;
1408
+ /**
1409
+ * Group member nickname
1410
+ */
1411
+ nick: string;
1412
+ /**
1413
+ * Role in the group
1414
+ */
1415
+ role: string;
1416
+ /**
1417
+ * Time when the member joined the group
1418
+ */
1419
+ joinTime: number;
1420
+ /**
1421
+ * Time when the member joined the group
1422
+ */
1423
+ nameCard: string;
1424
+ /**
1425
+ * Muting deadline timestamp, in seconds
1426
+ * - Muted: muteUntil is later than the current time
1427
+ * - Unmuted: muteUntil is earlier than the current time
1428
+ */
1429
+ muteUntil: number;
1430
+ /**
1431
+ * Group member custom field
1432
+ */
1433
+ memberCustomField: Array<any>;
1434
+ }
1435
+
1436
+ export declare interface Topic {
1437
+ topicID: string;
1438
+ topicName: string;
1439
+ avatar: string;
1440
+ introduction: string;
1441
+ notification: string;
1442
+ unreadCount: number;
1443
+ muteAllMembers: boolean;
1444
+ customData: string;
1445
+ groupAtInfoList: Array<any>;
1446
+ lastMessage: any;
1447
+ selfInfo: any;
1448
+ }
1449
+
1450
+ declare interface OFFLINE_ANDROID_INFO {
1451
+ sound?: string;
1452
+ XiaoMiChannelID?: string;
1453
+ OPPOChannelID?: string;
1454
+ FCMChannelID?: string;
1455
+ VIVOClassification?: string;
1456
+ VIVOCategory?: string;
1457
+ HuaWeiCategory?: string;
1458
+ OPPOCategory?: string;
1459
+ }
1460
+
1461
+ declare interface OFFLINE_APNS_INFO {
1462
+ sound?: string;
1463
+ ignoreIOSBadge?: boolean;
1464
+ disableVoipPush?: boolean;
1465
+ }
1466
+
1467
+ declare interface OFFLINE_PUSH_INFO_PARAMS {
1468
+ disablePush?: boolean;
1469
+ disableVoipPush?: boolean;
1470
+ title?: string;
1471
+ description?: string;
1472
+ extension?: string;
1473
+ androidInfo?: OFFLINE_ANDROID_INFO;
1474
+ apnsInfo?: OFFLINE_APNS_INFO;
1475
+ }
1476
+
1477
+ declare interface INVITE_OPTIONS {
1478
+ userID: string;
1479
+ data?: string;
1480
+ timeout?: number;
1481
+ onlineUserOnly?: boolean;
1482
+ offlinePushInfo?: OFFLINE_PUSH_INFO_PARAMS;
1483
+ }
1484
+
1485
+ declare interface INVITE_IN_GROUP_OPTIONS {
1486
+ groupID: string;
1487
+ inviteeList: Array<string>,
1488
+ data?: string;
1489
+ timeout?: number;
1490
+ onlineUserOnly?: boolean;
1491
+ offlinePushInfo?: OFFLINE_PUSH_INFO_PARAMS;
1492
+ }
1493
+
1494
+ declare interface INVITATION_HANDLE_OPTIONS {
1495
+ inviteID: string;
1496
+ data?: string;
1497
+ }
1498
+
1499
+ declare interface MODIFY_INVITATION_OPTIONS {
1500
+ inviteID: string;
1501
+ data: string;
1502
+ }
1503
+
1504
+ export declare interface Signaling {
1505
+ /**
1506
+ * Unique identifier of the signaling. Each inviteID must be unique in the invite.
1507
+ */
1508
+ inviteID: string;
1509
+ /**
1510
+ * ID of the inviter's group
1511
+ */
1512
+ groupID: string;
1513
+ /**
1514
+ * inviter
1515
+ */
1516
+ inviter: string;
1517
+ /**
1518
+ * List of invitees. Invitees specified by inviteeList must be in the group specified by groupID. Otherwise, the invitation fails.
1519
+ */
1520
+ inviteeList: Array<string>;
1521
+ /**
1522
+ * Signaling custom data
1523
+ */
1524
+ data: string;
1525
+ /**
1526
+ * Types of signaling operations. Valid values:
1527
+ * - TencentCloudChat.TSignaling.ACTION_TYPE_INVITE: invitees initiate the invitation
1528
+ * - TencentCloudChat.TSignaling.ACTION_TYPE_CANCEL_INVITE: invitees cancel invitations
1529
+ * - TencentCloudChat.TSignaling.ACTION_TYPE_ACCEPT_INVITE: invitees accept the invitation
1530
+ * - TencentCloudChat.TSignaling.ACTION_TYPE_REJECT_INVITE: invitees reject the invitation
1531
+ * - TencentCloudChat.TSignaling.ACTION_TYPE_INVITE_TIMEOUT: invitation timeout
1532
+ */
1533
+ actionType: TencentCloudChat.TSignaling;
1534
+ /**
1535
+ * Signaling timeout
1536
+ */
1537
+ timeout: number;
1538
+ }
1539
+
1540
+ /**
1541
+ * TencentCloudChat SDK supports Internet Explorer 9+, Chrome, WeChat, Mobile QQ, QQ Browser, Firefox, Opera, and Safari.
1542
+ */
1543
+ export declare class ChatSDK {
1544
+ /**
1545
+ * Log in to the Chat SDK using userID and userSig. The login process contains several steps that are executed asynchronously, and the returned Promise object is used to process login success or failure.
1546
+ * - After successful login, to call APIs that require authentication, such as sendMessage, you must wait until the SDK enters the ready state (you can obtain the status of the SDK by listening to the TencentCloudChat.EVENT.SDK_READY event).<br/>
1547
+ * - By default, multi-instance login is not supported. If you use an account that has been logged in on another page to log in on the current page, the account may be forcibly logged out on the other page, which will trigger the TencentCloudChat.EVENT.KICKED_OUT event. You can proceed accordingly after detecting the event through listening.
1548
+ * To support multi-instance login (allowing the use of the same account to log in concurrently on multiple pages), log in to the Chat console, locate the corresponding SDKAppID, and go to App Configuration > Feature Configuration > Online Web Instances to configure the number of instances. The configuration will take effect within 50 minutes.
1549
+ */
1550
+ login(options: LOGIN_OPTIONS): Promise<any>;
1551
+
1552
+ /**
1553
+ * This API is used to log out of the Chat SDK. It is usually called when you switch between accounts. This API clears the login status of the current account and all the data in the memory.
1554
+ * - When calling this API, the instance publishes the SDK_NOT_READY event. In this case, the instance is automatically logged out and cannot receive or send messages.
1555
+ * - Assume that the value of the Online Web Instances configured in the Chat console is greater than 1, and the same account has been used to log in to instances a1 and a2 (including a Mini Program instance). After a1.logout() is executed, a1 is automatically logged out and cannot receive or send messages, whereas a2 is not affected.
1556
+ * - Assume that the Online Web Instances is set to 2, and your account has been used to log in to instances a1 and a2. When you use this account to log in to instance a3, either a1 or a2 will be forcibly logged out. In most cases, the instance that first entered the login state is forcibly logged out. This is called kicked offline due to multi-instance login. If a1 is forcibly logged out, a logout process is executed within a1 and the KICKED_OUT event is triggered. The access side can listen for this event and redirect it to the login page when the event is triggered. At this time, a1 is forcibly logged out, whereas instances a2 and a3 can continue to run properly.
1557
+ */
1558
+ logout(): Promise<void>;
1559
+
1560
+ /**
1561
+ * Get the userID of the logged-in user. If the user is not logged in, it returns an empty string ('').
1562
+ */
1563
+ getLoginUser(): String;
1564
+
1565
+ /**
1566
+ * Get server time.
1567
+ */
1568
+ getServerTime(): Number;
1569
+
1570
+ /**
1571
+ * Get ready status of the SDK. When the SDK is ready, developers can call APIs that require authentication, such as sendMessage
1572
+ */
1573
+ isReady(): boolean;
1574
+
1575
+ /**
1576
+ * Terminate the SDK instance. The SDK will log out, disconnect the WebSocket persistent connection, and then release resources.
1577
+ */
1578
+ destroy(): Promise<void>;
1579
+
1580
+ /**
1581
+ * Listen for events.
1582
+ * - Please call the API to listen for events before calling the login API to avoid missing events distributed by the SDK.
1583
+ * @param eventName - Event name. All event names are stored in the TencentCloudChat.EVENT variable.
1584
+ * @param handler - Event processing method. When an event is triggered, this handler is called to process the event.
1585
+ * @param context - Context in which the handler is expected to execute.
1586
+ */
1587
+ on(eventName: string, handler: Function, context?: any): void;
1588
+
1589
+ /**
1590
+ * Cancel event listening.
1591
+ * @param eventName - Event name. All event names are stored in the TencentCloudChat.EVENT variable.
1592
+ * @param handler - Event processing method. When an event is triggered, this handler is called to process the event.
1593
+ * @param context - Context in which the handler is expected to execute.
1594
+ */
1595
+ off(eventName: string, handler: Function, context?: any): void;
1596
+
1597
+ /**
1598
+ * Register a plugin.
1599
+ * Before sending messages, such as image, audio, video, and file messages, the Chat SDK needs to use the upload plugin to upload files to Tencent COS.
1600
+ */
1601
+ registerPlugin(options: Object): void;
1602
+
1603
+ /**
1604
+ * Set the log level. Logs below this level will not be printed.
1605
+ * @param level -
1606
+ * - 0: common level. You are advised to use this level during connection as it covers more logs.
1607
+ * - 1: release level, at which the SDK outputs important information. We recommend that you use this log level in a production environment.
1608
+ * - 2: alarm level. The SDK prints only alarm and error logs.
1609
+ * - 3: error level. The SDK prints only error logs.
1610
+ * - 4: no log level. The SDK does not print any logs.
1611
+ */
1612
+ setLogLevel(level: number): void;
1613
+
1614
+ // ----------- Message -----------
1615
+
1616
+ /**
1617
+ * Create a text message. This API returns a message instance. If you need to send a text message, call the sendMessage API to send this message instance.
1618
+ */
1619
+ createTextMessage(options: MESSAGE_OPTIONS): Message;
1620
+
1621
+ /**
1622
+ * Create a text message with the @ notification feature. This API returns a message instance. If you need to send a text message, call the sendMessage API to send this message instance.
1623
+ * - This API applies only to group chats.
1624
+ */
1625
+ createTextAtMessage(options: MESSAGE_OPTIONS): Message;
1626
+
1627
+ /**
1628
+ * Create an image message. This API returns a message instance. If you need to send an image message, call the sendMessage API to send this message instance.
1629
+ */
1630
+ createImageMessage(options: MESSAGE_OPTIONS): Message;
1631
+
1632
+ /**
1633
+ * Create an audio message. This API returns a message instance. If you need to send an audio message, call the sendMessage API.
1634
+ */
1635
+ createAudioMessage(options: MESSAGE_OPTIONS): Message;
1636
+
1637
+ /**
1638
+ * Create a video message. This API returns a message instance. If you need to send a video message, call the sendMessage API to send this message instance.
1639
+ */
1640
+ createVideoMessage(options: MESSAGE_OPTIONS): Message;
1641
+
1642
+ /**
1643
+ * Create a custom message. This API returns a message instance. If you need to send a custom message, call the sendMessage API to send this message instance.
1644
+ * If the SDK does not provide the capability you need, use custom messages to customize features, for example, the dice rolling feature.
1645
+ */
1646
+ createCustomMessage(options: MESSAGE_OPTIONS): Message;
1647
+
1648
+ /**
1649
+ * Create an emoji message. This API returns a message instance. If you need to send an emoji message, call the sendMessage API to send this message instance.
1650
+ */
1651
+ createFaceMessage(options: MESSAGE_OPTIONS): Message;
1652
+
1653
+ /**
1654
+ * Create a file message. This API returns a message instance. If you need to send a file message, call the sendMessage API to send this message instance.
1655
+ */
1656
+ createFileMessage(options: MESSAGE_OPTIONS): Message;
1657
+
1658
+ /**
1659
+ * Create a location message. This API returns a message instance. If you need to send a file message, call the sendMessage API to send this message instance.
1660
+ */
1661
+ createLocationMessage(options: MESSAGE_OPTIONS): Message;
1662
+
1663
+ /**
1664
+ * Create a combined message. This API returns a message instance. If you need to send a combined message, call the sendMessage API to send this message instance.
1665
+ */
1666
+ createMergerMessage(options: MESSAGE_OPTIONS): Message;
1667
+
1668
+ /**
1669
+ * Download a combined message. If the combined message sent by the sender is large in size, the SDK will store it on the cloud, and the message recipient needs to download it from the cloud to the local host before viewing the message.
1670
+ */
1671
+ downloadMergerMessage(options: MESSAGE_OPTIONS): Promise<any>;
1672
+
1673
+ /**
1674
+ * Create a forward message. This API returns a message instance. If you need to send a forward message, call the sendMessage API to send this message instance.
1675
+ */
1676
+ createForwardMessage(options: MESSAGE_OPTIONS): Message;
1677
+
1678
+ /**
1679
+ * Send a message
1680
+ * - The SDK must be in the ready state to call this API to send message instances successfully. The SDK status can be obtained by listening for the following events:
1681
+ * TencentCloudChat.EVENT.SDK_READY: triggered when the SDK is in the ready state
1682
+ * TencentCloudChat.EVENT.SDK_NOT_READY: triggered when the SDK is in the not ready state
1683
+ * - To receive a newly pushed one-to-one message, group message, group notification, or group system message, you need to listen for the TencentCloudChat.EVENT.MESSAGE_RECEIVED event.
1684
+ * - Messages sent by this API do not trigger the TencentCloudChat.EVENT.MESSAGE_RECEIVED event. Messages sent by the same account from other clients (or through the RESTful API) trigger the TencentCloudChat.EVENT.MESSAGE_RECEIVED event.
1685
+ * - Offline push is applicable only to Android or iOS terminals, and is not supported by web apps or WeChat Mini Programs.
1686
+ */
1687
+ sendMessage(message: Message, options?: any): Promise<any>;
1688
+
1689
+ /**
1690
+ * Recall a one-to-one message or a group message. If the recall is successful, the value of isRevoked for the recalled message is set to true.
1691
+ */
1692
+ revokeMessage(message: Message): Promise<any>;
1693
+
1694
+ /**
1695
+ * Resend a message. When a message fails to be sent, call this API to resend it.
1696
+ */
1697
+ resendMessage(message: Message, options?: any): Promise<any>;
1698
+
1699
+ /**
1700
+ * Delete messages. After successful deletion, the isDeleted property value of a deleted message is true.
1701
+ * For a one-to-one chat, deleted messages cannot be pulled upon the next login of the current user, but the message pulling on the peer end is not affected.
1702
+ * For a group chat, deleted messages cannot be pulled upon the next login of the current user, but the message pulling of other members in the group is not affected.
1703
+ */
1704
+ deleteMessage(messageList: Array<Message>): Promise<any>;
1705
+
1706
+ /**
1707
+ * Translate texts.
1708
+ */
1709
+ translateText(options: TRANSLATE_TEXT_OPTIONS): Promise<any>;
1710
+
1711
+ /**
1712
+ * Speech to text.
1713
+ */
1714
+ convertVoiceToText(options: CONVERT_VOICE_TO_TEXT_OPTIONS): Promise<any>;
1715
+
1716
+ /**
1717
+ * Set message extensions.
1718
+ */
1719
+ setMessageExtensions(message: Message, extensions: Array<any>): Promise<any>;
1720
+
1721
+ /**
1722
+ * Get message extensions.
1723
+ */
1724
+ getMessageExtensions(message: Message, keyList?: Array<String>): Promise<any>;
1725
+
1726
+ /**
1727
+ * Delete message extensions.
1728
+ */
1729
+ deleteMessageExtensions(message: Message, keyList?: Array<String>): Promise<any>;
1730
+
1731
+ /**
1732
+ * Modify a message.
1733
+ */
1734
+ modifyMessage(message: Message): Promise<any>;
1735
+
1736
+ /**
1737
+ * Search cloud messages.
1738
+ */
1739
+ searchCloudMessages(options: MESSAGE_SEARCH_OPTIONS): Promise<any>;
1740
+
1741
+ /**
1742
+ * Search cloud groups.
1743
+ */
1744
+ searchCloudGroups(options: GROUP_CLOUD_SEARCH_OPTIONS): Promise<any>;
1745
+
1746
+ /**
1747
+ * Search cloud users.
1748
+ */
1749
+ searchCloudUsers(options: USER_CLOUD_SEARCH_OPTIONS): Promise<any>;
1750
+
1751
+ /**
1752
+ * Search cloud group members.
1753
+ */
1754
+ searchCloudGroupMembers(options: MEMBER_CLOUD_SEARCH_OPTIONS): Promise<any>;
1755
+
1756
+
1757
+ /**
1758
+ * Add message reaction.
1759
+ */
1760
+ addMessageReaction(message: Message, reactionID: string): Promise<any>;
1761
+
1762
+ /**
1763
+ * Remove message reaction.
1764
+ */
1765
+ removeMessageReaction(message: Message, reactionID: string): Promise<any>;
1766
+
1767
+ /**
1768
+ * Get message reactions.
1769
+ */
1770
+ getMessageReactions(options: GET_MESSAGE_REACTIONS_OPTIONS): Promise<any>;
1771
+
1772
+ /**
1773
+ * Get user list of message reaction.
1774
+ */
1775
+ getAllUserListOfMessageReaction(options: GET_USER_LIST_MESSAGE_REACTIONS_OPTIONS): Promise<any>;
1776
+
1777
+ // ----------- Conversation -----------
1778
+
1779
+ /**
1780
+ * Pull by page the message list of a specified conversation. This API is called when the message list is rendered for the first time after the user enters the conversation, or when the user pulls down the list to see more messages.
1781
+ */
1782
+ getMessageList(options: GET_MESSAGE_LIST_OPTIONS): Promise<any>;
1783
+
1784
+ /**
1785
+ * Pull group chat messages by sequence or Pull one-to-one chat messages by time.
1786
+ */
1787
+ getMessageListHopping(options: GET_MESSAGE_LIST_HOPPING_OPTIONS): Promise<any>;
1788
+
1789
+ /**
1790
+ * Set the unread messages of a conversation to the read state. Messages set to the read state are not counted as unread messages. This API is called when you open or switch a conversation. If this API is not called when you open or switch a conversation, the corresponding messages remain in the unread state.
1791
+ */
1792
+ setMessageRead(options: SET_MESSAGE_READ_OPTIONS): Promise<any>;
1793
+
1794
+ /**
1795
+ * Send read receipts to the message sender for message which have been received.
1796
+ * - To send a read receipt to a group message, you need to go to the console and turn on the corresponding switch.
1797
+ * - After the API is called successfully, the conversation unread count will not change, and the message sender will receive the TencentCloudChat.TYPES.MESSAGE_READ_RECEIPT_RECEIVED callback, which will carry the latest read information of the message.
1798
+ */
1799
+ sendMessageReadReceipt(messageList: Array<Message>): Promise<any>;
1800
+
1801
+ /**
1802
+ * Get read receipts for messages which have been sent by myself
1803
+ * - To obtain the read receipt of group message, you need to go to the console and turn on the corresponding switch.
1804
+ * - The messages in messageList must be in the same conversation.
1805
+ */
1806
+ getMessageReadReceiptList(messageList: Array<Message>): Promise<any>;
1807
+
1808
+ /**
1809
+ * Get group members profile who have read ths message.
1810
+ */
1811
+ getGroupMessageReadMemberList(options: GET_GROUP_MESSAGE_READ_MEMBER_LIST_OPTIONS): Promise<any>;
1812
+
1813
+ /**
1814
+ * Query local messages in a specified conversation by messageID
1815
+ */
1816
+ findMessage(messageID: string): Message | null;
1817
+
1818
+ /**
1819
+ * Get the conversation list.
1820
+ * - The profile in the conversation list obtained by this API is incomplete. It contains only the information, such as profile photo and nickname, which is sufficient to meet the rendering requirements of the conversation list. To query the detailed conversation profile, call getConversationProfile.
1821
+ * - The conversation retention time is consistent with the storage time of the last message, which is 7 days by default. That is, the conversations will be stored for 7 days by default.
1822
+ * - If the options parameter is not provided, it means to get all the conversations.
1823
+ * - If the options parameter is provided as an array, it means to get the specified multiple conversations, and if an empty array is passed in, the interface will not return any data.
1824
+ * - If the options parameter is provided as an object with properties like type, markType, groupName, hasUnreadCount, and hasGroupAtInfo, it means to filter the conversation list based on these conditions.
1825
+ */
1826
+ getConversationList(options?: Array<string> | GET_CONVERSATION_LIST_OPTIONS): Promise<any>;
1827
+
1828
+ /**
1829
+ * Get a conversation profile. When you click a conversation in the conversation list, this API is called to get the detailed information of the conversation.
1830
+ */
1831
+ getConversationProfile(conversationID: string): Promise<any>;
1832
+
1833
+ /**
1834
+ * Delete a conversation or conversations. At the same time, you can choose whether to delete chat history.
1835
+ */
1836
+ deleteConversation(options: string | DELETE_CONVERSATION_OPTIONS): Promise<any>;
1837
+
1838
+ /**
1839
+ * Set draft of the conversation.
1840
+ */
1841
+ setConversationDraft(options: SET_CONVERSATION_DRAFT_OPTIONS): Promise<any>;
1842
+
1843
+ /**
1844
+ * Clears chat history with a user or clears chat history from a group from local and the cloud.
1845
+ */
1846
+ clearHistoryMessage(conversationID: string): Promise<any>;
1847
+
1848
+ /**
1849
+ * Pin/Unpin a conversation to/from top. After this API is called successfully, the conversation list will be sorted again, and the SDK will distribute the TencentCloudChat.EVENT.CONVERSATION_LIST_UPDATED event.
1850
+ */
1851
+ pinConversation(options: PIN_CONVERSATION_OPTIONS): Promise<any>;
1852
+
1853
+ /**
1854
+ * Mark all messages as read
1855
+ */
1856
+ setAllMessageRead(options: SET_ALL_MESSAGE_READ_OPTIONS): Promise<any>;
1857
+
1858
+ /**
1859
+ * You can use this API to mute notifications or enable new message alerts.
1860
+ */
1861
+ setMessageRemindType(options: SET_MESSAGE_REMIND_TYPE_OPTIONS): Promise<any>;
1862
+
1863
+ /**
1864
+ * You can use this API to set notification configuration for all receiving messages.
1865
+ */
1866
+ setAllReceiveMessageOpt(options: SET_ALL_RECEIVE_MESSAGE_OPTIONS): Promise<any>;
1867
+
1868
+ /**
1869
+ * You can use this API to get notification configuration for all receiving messages.
1870
+ */
1871
+ getAllReceiveMessageOpt(): Promise<any>;
1872
+
1873
+ /**
1874
+ * Get the total message unread count in conversations.
1875
+ * - The total unread message count excludes the unread message count of Do-Not-Disturb conversations.
1876
+ */
1877
+ getTotalUnreadMessageCount(): number;
1878
+
1879
+ // ----------- Conversation Group -----------
1880
+
1881
+ /**
1882
+ * Set conversation custom data
1883
+ */
1884
+ setConversationCustomData(options: SET_CONVERSATION_CUSTOM_DATA_OPTIONS): Promise<any>;
1885
+
1886
+ /**
1887
+ * Mark conversation(You need to buy Flagship Edition).
1888
+ */
1889
+ markConversation(options: MARK_CONVERSATION_OPTIONS): Promise<any>;
1890
+
1891
+ /**
1892
+ * Get a list of conversation groups.
1893
+ */
1894
+ getConversationGroupList(): Promise<any>;
1895
+
1896
+ /**
1897
+ * Create a conversation group.
1898
+ */
1899
+ createConversationGroup(options: CREATE_CONVERSATION_GROUP_OPTIONS): Promise<any>;
1900
+
1901
+ /**
1902
+ * Delete a conversation group.
1903
+ */
1904
+ deleteConversationGroup(groupName: string): Promise<any>;
1905
+
1906
+ /**
1907
+ * Rename a conversation group. The SDK will trigger TencentCloudChat.EVENT.CONVERSATION_LIST_UPDATED and TencentCloudChat.EVENT.CONVERSATION_GROUP_LIST_UPDATED.
1908
+ */
1909
+ renameConversationGroup(options: RENAME_CONVERSATION_GROUP_OPTIONS): Promise<any>;
1910
+
1911
+ /**
1912
+ * Add conversation list to a group.
1913
+ */
1914
+ addConversationsToGroup(options: ADD_CONVERSATIONS_TO_GROUP_OPTIONS): Promise<any>;
1915
+
1916
+ /**
1917
+ * Delete conversation list from a group.
1918
+ */
1919
+ deleteConversationsFromGroup(options: DELETE_CONVERSATIONS_FROM_GROUP_OPTIONS): Promise<any>;
1920
+
1921
+ // ----------- Profile -----------
1922
+ /**
1923
+ * Get your personal profile.
1924
+ */
1925
+ getMyProfile(): Promise<any>;
1926
+
1927
+ /**
1928
+ * Get other users' profiles. This API will get both standard profile fields and custom profile fields at the same time.
1929
+ */
1930
+ getUserProfile(options: GET_USER_PROFILE_OPTIONS): Promise<any>;
1931
+
1932
+ /**
1933
+ * Update your personal profile.
1934
+ */
1935
+ updateMyProfile(options: UPDATE_YOUR_PROFILE_OPTIONS): Promise<any>;
1936
+
1937
+ /**
1938
+ * Get your blocklist.
1939
+ */
1940
+ getBlacklist(): Promise<any>;
1941
+
1942
+ /**
1943
+ * Add a user to the blocklist. By adding a user to the blocklist, you can block all the messages sent by the user. Therefore, this API can be used to block the messages of a specified user.
1944
+ */
1945
+ addToBlacklist(options: ADD_TO_BLOCKLIST_LIST_OPTIONS): Promise<any>;
1946
+
1947
+ /**
1948
+ * Remove users from the blocklist.
1949
+ */
1950
+ removeFromBlacklist(options: REMOVE_FROM_BLOCKLIST_LIST_OPTIONS): Promise<any>;
1951
+
1952
+ // ----------- User Status -----------
1953
+ /**
1954
+ * Setup user status for yourself.
1955
+ */
1956
+ setSelfStatus(options: SET_SELF_STATUS_OPTIONS): Promise<any>;
1957
+
1958
+ /**
1959
+ * Get user status information.
1960
+ */
1961
+ getUserStatus(options: GET_USER_STATUS_OPTIONS): Promise<any>;
1962
+
1963
+ /**
1964
+ * Subscribe user status.
1965
+ */
1966
+ subscribeUserStatus(options: SUBSCRIBE_USER_STATUS_OPTIONS): Promise<any>;
1967
+
1968
+ /**
1969
+ * Unsubscribe user status.
1970
+ */
1971
+ unsubscribeUserStatus(options: UNSUBSCRIBE_USER_STATUS_OPTIONS): Promise<any>;
1972
+
1973
+ // ----------- Relationship chain -----------
1974
+
1975
+ /**
1976
+ * Get the friend list in the SDK cache. When a friend list is updated, the SDK distributes the TencentCloudChat.EVENT.FRIEND_LIST_UPDATED event.
1977
+ */
1978
+ getFriendList(): Promise<any>;
1979
+
1980
+ /**
1981
+ * Add a friend.
1982
+ */
1983
+ addFriend(options: ADD_FRIEND_OPTIONS): Promise<any>;
1984
+
1985
+ /**
1986
+ * Delete friends. Both one-way deletion and two-way deletion are supported.
1987
+ */
1988
+ deleteFriend(options: DELETE_FRIEND_OPTIONS): Promise<any>;
1989
+
1990
+ /**
1991
+ * Verify friends.
1992
+ */
1993
+ checkFriend(options: CHECK_FRIEND_OPTIONS): Promise<any>;
1994
+
1995
+ /**
1996
+ * Get the standard and custom friend and profile data of a specified user.
1997
+ */
1998
+ getFriendProfile(options: GET_FRIEND_PROFILE_OPTIONS): Promise<any>;
1999
+
2000
+ /**
2001
+ * Update the relationship chain data of friends. This API can update only friend remarks and custom relationship chain fields.
2002
+ */
2003
+ updateFriend(options: UPDATE_FRIEND_OPTIONS): Promise<any>;
2004
+
2005
+ /**
2006
+ * Get the friend request list in the SDK cache. When a friend request list is updated, the SDK distributes the TencentCloudChat.EVENT.FRIEND_APPLICATION_LIST_UPDATED event.
2007
+ */
2008
+ getFriendApplicationList(): Promise<any>;
2009
+
2010
+ /**
2011
+ * Accept a friend request.
2012
+ */
2013
+ acceptFriendApplication(options: ACCEPT_FRIEND_APPLICATION_OPTIONS): Promise<any>;
2014
+
2015
+ /**
2016
+ * Reject a friend request.
2017
+ */
2018
+ refuseFriendApplication(options: REFUSE_FRIEND_APPLICATION_OPTIONS): Promise<any>;
2019
+
2020
+ /**
2021
+ * Delete a friend request.
2022
+ */
2023
+ deleteFriendApplication(options: DELETE_FRIEND_APPLICATION_OPTIONS): Promise<any>;
2024
+
2025
+ /**
2026
+ * Set all friend requests as read.
2027
+ */
2028
+ setFriendApplicationRead(): Promise<any>;
2029
+
2030
+ /**
2031
+ * Get the list of friend lists in the SDK cache. When the list of friend lists is updated, the SDK distributes the TencentCloudChat.EVENT.FRIEND_GROUP_LIST_UPDATED event.
2032
+ */
2033
+ getFriendGroupList(): Promise<any>;
2034
+
2035
+ /**
2036
+ * Create a friend group.
2037
+ */
2038
+ createFriendGroup(options: CREATE_FRIEND_GROUP_OPTIONS): Promise<any>;
2039
+
2040
+ /**
2041
+ * Delete a friend group.
2042
+ */
2043
+ deleteFriendGroup(options: DELETE_FRIEND_GROUP_OPTIONS): Promise<any>;
2044
+
2045
+ /**
2046
+ * Add friends to a friend group.
2047
+ */
2048
+ addToFriendGroup(options: ADD_TO_FRIEND_GROUP_OPTIONS): Promise<any>;
2049
+
2050
+ /**
2051
+ * Remove friends from a friend group.
2052
+ */
2053
+ removeFromFriendGroup(options: REMOVE_FROM_FRIEND_GROUP_OPTIONS): Promise<any>;
2054
+
2055
+ /**
2056
+ * Modify the name of a friend group.
2057
+ */
2058
+ renameFriendGroup(options: RENAME_FRIEND_GROUP_OPTIONS): Promise<any>;
2059
+
2060
+ // ----------- FOLLOW -----------
2061
+
2062
+ /**
2063
+ * Follow another users who you want.
2064
+ */
2065
+ followUser(userIDList: Array<string>): Promise<any>;
2066
+
2067
+ /**
2068
+ * Unfollow users that you are following.
2069
+ */
2070
+ unfollowUser(userIDList: Array<string>): Promise<any>;
2071
+
2072
+ /**
2073
+ * Get a list of users who are following you.
2074
+ */
2075
+ getMyFollowersList(startIndex?: string): Promise<any>;
2076
+
2077
+ /**
2078
+ * Get a list of users that you are following.
2079
+ */
2080
+ getMyFollowingList(startIndex?: string): Promise<any>;
2081
+
2082
+ /**
2083
+ * Get a list of users who are following both you and a specified user.
2084
+ */
2085
+ getMutualFollowersList(startIndex?: string): Promise<any>;
2086
+
2087
+ /**
2088
+ * You can get youself or another users's information about followersCount、followingCount、mutualFollowersCount.
2089
+ */
2090
+ getUserFollowInfo(userIDList?: Array<string>): Promise<any>;
2091
+
2092
+ /**
2093
+ * Check the following relationship of the specified user.
2094
+ */
2095
+ checkFollowType(userIDList: Array<string>): Promise<any>;
2096
+
2097
+ // ----------- GROUP -----------
2098
+
2099
+ /**
2100
+ * Get your group list when you need to render or refresh **My Groups**.
2101
+ */
2102
+ getGroupList(): Promise<any>;
2103
+
2104
+ /**
2105
+ * Get a group profile.
2106
+ */
2107
+ getGroupProfile(options: GET_GROUP_PROFILE_OPTIONS): Promise<any>;
2108
+
2109
+ /**
2110
+ * Create a group.
2111
+ * - After creating an audio-video group (TencentCloudChat.TYPES.GRP_AVCHATROOM) via this API, you need to call the joinGroup API to join the group to enable the messaging process.
2112
+ */
2113
+ createGroup(options: CREATE_GROUP_OPTIONS): Promise<any>;
2114
+
2115
+ /**
2116
+ * This API is used by a group owner to delete a group.
2117
+ */
2118
+ dismissGroup(groupID: string): Promise<any>;
2119
+
2120
+ /**
2121
+ * Modify a group profile.
2122
+ */
2123
+ updateGroupProfile(options: UPDATE_GROUP_PROFILE_OPTIONS): Promise<any>;
2124
+
2125
+ /**
2126
+ * Request to join a specific group.
2127
+ * - Users cannot request to join a work group. They can only be added to a work group via addGroupMember.
2128
+ * - A user can only join one audio-video group at a time. For example, if a user is already in audio-video group A and attempts to join audio-video group B, the SDK will remove the user from audio-video group A first and then add the user to audio-video group B.
2129
+ */
2130
+ joinGroup(options: JOIN_GROUP_OPTIONS): Promise<any>;
2131
+
2132
+ /**
2133
+ * Leave a group.
2134
+ * - A group owner can only leave work groups. After the group owner leaves a work group, the work group has no group owner.
2135
+ */
2136
+ quitGroup(groupID: string): Promise<any>
2137
+
2138
+ /**
2139
+ * Search for a group by groupID.
2140
+ * Work groups (TencentCloudChat.TYPES.GRP_WORK) cannot be searched.
2141
+ */
2142
+ searchGroupByID(groupID: string): Promise<any>
2143
+
2144
+ /**
2145
+ * Get the number of online users.
2146
+ * - This API applies to all types of groups from v3.2.0
2147
+ * - It's recommended that you call this API for no more than one time per 5-10 seconds in an audio-video group. In other types of groups, the frequency is limited once every 60 seconds.
2148
+ */
2149
+ getGroupOnlineMemberCount(groupID: string): Promise<any>;
2150
+
2151
+ /**
2152
+ * Transfer a group. Only group owners have the permission to transfer groups. Audio-video groups (TencentCloudChat.TYPES.GRP_AVCHATROOM) cannot be transferred.
2153
+ */
2154
+ changeGroupOwner(options: CHANGE_GROUP_OWNER_OPTIONS): Promise<any>;
2155
+
2156
+ /**
2157
+ * Get group joining request list.
2158
+ */
2159
+ getGroupApplicationList(): Promise<any>;
2160
+
2161
+ /**
2162
+ * Process (approve or reject) a group joining request.
2163
+ * - If a group has more than one admin, all online admins will receive a group system message about the group joining request when someone requests to join the group. If one admin processes the request (accepts or rejects it), the other admins cannot process the request again (that is, cannot modify the processing result).
2164
+ */
2165
+ handleGroupApplication(options: HANDLE_GROUP_APPLICATION_OPTIONS): Promise<any>;
2166
+
2167
+ /**
2168
+ * Initialize group attributes. The business side needs to control the operation permission of this API based on application scenarios.
2169
+ * - This API applies only to audio-video groups. If you call this API for other types of groups, this API returns the 2641 error code.
2170
+ * - Before using this API, you must call the joinGroup API to join an audio-video group. Otherwise, this API returns the 2642 error code.
2171
+ * - Up to 16 group attribute keys are supported, with a length limit of 32 bytes. The size of each group attribute value can be up to 4 KB, and the total size of all group attributes (including keys and values) can be up to 16 KB.
2172
+ */
2173
+ initGroupAttributes(options: INIT_GROUP_ATTRIBUTE_OPTIONS): Promise<any>;
2174
+
2175
+ /**
2176
+ * Set group attributes.
2177
+ * - This API applies only to audio-video groups. If you call this API for other types of groups, this API returns the 2641 error code.
2178
+ * - Before using this API, you must call the joinGroup API to join an audio-video group. Otherwise, this API returns the 2642 error code.
2179
+ */
2180
+ setGroupAttributes(options: SET_GROUP_ATTRIBUTE_OPTIONS): Promise<any>;
2181
+
2182
+ /**
2183
+ * Delete group attributes.
2184
+ */
2185
+ deleteGroupAttributes(options: DELETE_GROUP_ATTRIBUTE_OPTIONS): Promise<any>;
2186
+
2187
+ /**
2188
+ * Get group attributes.
2189
+ */
2190
+ getGroupAttributes(options: GET_GROUP_ATTRIBUTE_OPTIONS): Promise<any>;
2191
+
2192
+ /**
2193
+ * Set group counters.
2194
+ */
2195
+ setGroupCounters(options: SET_GROUP_COUNTER_OPTIONS): Promise<any>;
2196
+
2197
+ /**
2198
+ * Increase group counter.
2199
+ */
2200
+ increaseGroupCounter(options: INCREASE_GROUP_COUNTER_OPTIONS): Promise<any>;
2201
+
2202
+ /**
2203
+ * Decrease group counter.
2204
+ */
2205
+ decreaseGroupCounter(options: DECREASE_GROUP_COUNTER_OPTIONS): Promise<any>;
2206
+
2207
+ /**
2208
+ * Get group counters.
2209
+ */
2210
+ getGroupCounters(options: GET_GROUP_COUNTERS_OPTIONS): Promise<any>;
2211
+
2212
+ // ----------- GROUP MEMBER -----------
2213
+
2214
+ /**
2215
+ * Get the group member list.
2216
+ * - This API is used to pull paginated list of group members and not the complete list. To get the complete list of group members (memberNum), use getGroupProfile.
2217
+ */
2218
+ getGroupMemberList(options: GET_GROUP_MEMBER_LIST_OPTIONS): Promise<any>;
2219
+
2220
+ /**
2221
+ * Get group member profiles, including muting durations.
2222
+ * - The maximum number of users in each query is 50. If the length of the array passed in is greater than 50, only the first 50 users will be queried and the rest will be discarded.
2223
+ */
2224
+ getGroupMemberProfile(options: GET_GROUP_MEMBER_PROFILE_OPTIONS): Promise<any>;
2225
+
2226
+ /**
2227
+ * Add group members.
2228
+ * - TencentCloudChat.TYPES.GRP_PRIVATE (work group): any group member can invite users to the group and approval by the invitee is not required.
2229
+ * - TencentCloudChat.TYPES.GRP_PUBLIC (public group)/TencentCloudChat.TYPES.GRP_MEETING (meeting group): only the app admin can invite users to the group and approval by the invitee is not required.
2230
+ * - TencentCloudChat.TYPES.GRP_AVCHATROOM (audio-video chat room): no member (including the app admin) is allowed to invite any user to the group.
2231
+ */
2232
+ addGroupMember(options: ADD_GROUP_MEMBER_OPTIONS): Promise<any>;
2233
+
2234
+ /**
2235
+ * Delete group members. Only the group owner can delete group members.
2236
+ */
2237
+ deleteGroupMember(options: DELETE_GROUP_MEMBER_OPTIONS): Promise<any>;
2238
+
2239
+ /**
2240
+ * Set the muting duration for a group member. You can mute or unmute a group member. The muting and unmuting features are unavailable for work groups (TencentCloudChat.TYPES.GRP_WORK).
2241
+ * - Only the group owner and the group admin have the permission to perform this operation.
2242
+ */
2243
+ setGroupMemberMuteTime(options: SET_GROUP_MEMBER_MUTE_TIME_OPTIONS): Promise<any>;
2244
+
2245
+ /**
2246
+ * Change the role of a group member. Only the group owner has the permission to perform this operation.
2247
+ */
2248
+ setGroupMemberRole(options: SET_GROUP_MEMBER_ROLE_OPTIONS): Promise<any>;
2249
+
2250
+ /**
2251
+ * Set a group member's name card.
2252
+ * - The group owner can set the name cards of all members.
2253
+ * - The group admin can set its own name card and the name cards of common group members.
2254
+ * - Common group members can only set their own name cards.
2255
+ */
2256
+ setGroupMemberNameCard(options: SET_GROUP_MEMBER_NAME_CARD_OPTIONS): Promise<any>;
2257
+
2258
+ /**
2259
+ * Set a group member custom field.
2260
+ */
2261
+ setGroupMemberCustomField(options: SET_GROUP_MEMBER_CUSTOM_FIELD_OPTIONS): Promise<any>;
2262
+
2263
+ /**
2264
+ * Mark group members.
2265
+ */
2266
+ markGroupMemberList(options: MARK_GROUP_MEMBER_LIST_OPTIONS): Promise<any>;
2267
+
2268
+ // ----------- TOPIC -----------
2269
+
2270
+ /**
2271
+ * Get the list of Community-groups which support Topic that the current user has joined.
2272
+ */
2273
+ getJoinedCommunityList(): Promise<any>;
2274
+
2275
+ /**
2276
+ * Create a topic.
2277
+ */
2278
+ createTopicInCommunity(options: CREATE_TOPIC_IN_COMMUNICATION_OPTIONS): Promise<any>;
2279
+
2280
+ /**
2281
+ * Delete a topic.
2282
+ */
2283
+ deleteTopicFromCommunity(options: DELETE_TOPIC_FROM_COMMUNICATION_OPTIONS): Promise<any>;
2284
+
2285
+ /**
2286
+ * Modify topic information.
2287
+ */
2288
+ updateTopicProfile(options: UPDATE_TOPIC_PROFILE_OPTIONS): Promise<any>;
2289
+
2290
+ /**
2291
+ * Get Topic List
2292
+ */
2293
+ getTopicList(options: GET_TOPIC_LIST_OPTIONS): Promise<any>;
2294
+
2295
+ // ----------- Signaling -----------
2296
+
2297
+ /**
2298
+ * Add the signaling listener
2299
+ * @param eventName - Event name. All event names are stored in the TencentCloudChat.TSignaling variable.
2300
+ * @param handler - Event processing method. When an event is triggered, this handler is called to process the event.
2301
+ * @param context - Context in which the handler is expected to execute.
2302
+ */
2303
+ addSignalingListener(eventName: string, handler: Function, context?: any): void;
2304
+
2305
+ /**
2306
+ * Remove the signaling listener
2307
+ * @param eventName - Event name. All event names are stored in the TencentCloudChat.TSignaling variable.
2308
+ * @param handler - Event processing method. When an event is triggered, this handler is called to process the event.
2309
+ * @param context - Context in which the handler is expected to execute.
2310
+ */
2311
+ removeSignalingListener(eventName: string, handler: Function, context?: any): void;
2312
+
2313
+ /**
2314
+ * Invite someone
2315
+ */
2316
+ invite(options: INVITE_OPTIONS): Promise<any>;
2317
+
2318
+ /**
2319
+ * Sync invite someone
2320
+ */
2321
+ inviteSync(options: INVITE_OPTIONS, successCb: Function, errorCb: Function): void;
2322
+
2323
+ /**
2324
+ * Invite certain users in the group
2325
+ */
2326
+ inviteInGroup(options: INVITE_IN_GROUP_OPTIONS): Promise<any>;
2327
+
2328
+ /**
2329
+ * Sync invite certain users in the group
2330
+ */
2331
+ inviteInGroupSync(options: INVITE_IN_GROUP_OPTIONS, successCb: Function, errorCb: Function): void;
2332
+
2333
+ /**
2334
+ * The inviter canceled the invitation
2335
+ */
2336
+ cancel(options: INVITATION_HANDLE_OPTIONS): Promise<any>;
2337
+
2338
+ /**
2339
+ * The invitee accepts the invitation
2340
+ */
2341
+ accept(options: INVITATION_HANDLE_OPTIONS): Promise<any>;
2342
+
2343
+ /**
2344
+ * The invitee rejects the invitation
2345
+ */
2346
+ reject(options: INVITATION_HANDLE_OPTIONS): Promise<any>;
2347
+
2348
+ /**
2349
+ * Get the signaling information
2350
+ * If onlineUserOnly is set to false in the invite operation, a custom message is generated for each signaling operation (including the invite, cancel, accept, reject, and timeout operations).<br/>
2351
+ * The message will be delivered to users via MESSAGE_RECEIVED event and can be pulled by users via historical message pulling.<br/>
2352
+ * If you want to customize the display text based on the signaling information, call the following API to get the signaling information.
2353
+ */
2354
+ getSignalingInfo(message: Message): Signaling | null;
2355
+
2356
+ /**
2357
+ * Modify the invitation
2358
+ */
2359
+ modifyInvitation(options: MODIFY_INVITATION_OPTIONS): Promise<any>;
2360
+
2361
+ callExperimentalAPI(key: string, options: any)
2362
+
2363
+ use(plugin: any, subPlugin?: any[]): void;
2364
+ }
2365
+
2366
+ declare interface CREATE_OPTIONS {
2367
+ /**
2368
+ * SDKAppID of your Chat application
2369
+ */
2370
+ SDKAppID: number;
2371
+ /**
2372
+ * WebSocket server proxy address
2373
+ */
2374
+ proxyServer?: String | undefined;
2375
+ /**
2376
+ * Image, video, file upload proxy address
2377
+ */
2378
+ fileUploadProxy?: String | undefined;
2379
+ /**
2380
+ * Image, video, file download proxy address
2381
+ */
2382
+ fileDownloadProxy?: String | undefined;
2383
+ /**
2384
+ * Scenes of chat-uikit
2385
+ */
2386
+ scene?: String | undefined;
2387
+ }
2388
+
2389
+ /**
2390
+ * TencentCloudChat is the namespace of the Chat Web SDK and provides the static method create() for creating SDK instances.
2391
+ */
2392
+ declare module TencentCloudChat {
2393
+ /**
2394
+ * Factory function of the Chat Web SDK, which is used to create SDK instances.
2395
+ * Before connecting, you need to create an Chat application in the Chat console and obtain the SDKAppID.
2396
+ * @example
2397
+ * let options = {
2398
+ * SDKAppID: 0 // Replace 0 with the SDKAppID of your Chat application when connecting. Value type: Number
2399
+ * };
2400
+ * let chat = TencentCloudChat.create(options); // The SDK instance is usually represented by chat
2401
+ */
2402
+ function create(options: CREATE_OPTIONS): ChatSDK;
2403
+
2404
+ enum EVENT {
2405
+ /**
2406
+ * This event is triggered when the SDK enters the ready state. When detecting this event during listening, the access side can call SDK APIs such as the message sending API to use various features of the SDK.
2407
+ * - The SDK will not trigger the SDK_READY event until login is successful.
2408
+ */
2409
+ SDK_READY = 'sdkStateReady',
2410
+
2411
+ /**
2412
+ * This event is triggered when the SDK enters the not ready state. When this event occurs, the access side cannot use SDK features such as message sending.
2413
+ * To resume the SDK features, the access side needs to call the login API to drive the SDK to enter the ready state.
2414
+ */
2415
+ SDK_NOT_READY = 'sdkStateNotReady',
2416
+
2417
+ /**
2418
+ * This event is triggered when the SDK receives a newly pushed one-to-one message, group message, group notification, or group system message. When this event occurs, the access side can traverse event.data to obtain the message list and render it to the UI.
2419
+ */
2420
+ MESSAGE_RECEIVED = 'onMessageReceived',
2421
+
2422
+ /**
2423
+ * This event is triggered when the SDK receives a newly pushed room customData. When this event occurs, the access side can traverse event.data to obtain the customData.
2424
+ */
2425
+ ROOM_CUSTOM_DATA_RECEIVED = 'onRoomCustomDataReceived',
2426
+
2427
+ /**
2428
+ * This event is triggered when the SDK receives a notification for message modifications by a third-party callback. When this event occurs, the message sender can traverse event.data to obtain the message list and update the content of the message with the same ID on the UI.
2429
+ */
2430
+ MESSAGE_MODIFIED = 'onMessageModified',
2431
+
2432
+ /**
2433
+ * This event is triggered when the SDK receives a notification indicating that messages are recalled. When this event occurs, the access side can traverse event.data to obtain data of the message recall list and renders the recalled messages to the UI.
2434
+ * For example, "The peer party has recalled a message" can be displayed if a message is recalled during a one-to-one conversation,
2435
+ * and "XXX has recalled a message" can be displayed if a message is recalled during a group conversation.
2436
+ */
2437
+ MESSAGE_REVOKED = 'onMessageRevoked',
2438
+
2439
+ /**
2440
+ * This event is triggered when the SDK receives a notification (read receipt) indicating that the peer end has read the message.
2441
+ */
2442
+ MESSAGE_READ_BY_PEER = 'onMessageReadByPeer',
2443
+
2444
+ /**
2445
+ * This event is triggered when the SDK receives a notification (read receipt) indicating that group members have read the message.
2446
+ */
2447
+ MESSAGE_READ_RECEIPT_RECEIVED = 'onMessageReadReceiptReceived',
2448
+
2449
+ /**
2450
+ * This event is triggered when the conversation list is updated. event.data is an array that stores the Conversation objects.
2451
+ */
2452
+ CONVERSATION_LIST_UPDATED = 'onConversationListUpdated',
2453
+
2454
+ /**
2455
+ * This event is triggered when total message unread count in conversations is updated.
2456
+ */
2457
+ TOTAL_UNREAD_MESSAGE_COUNT_UPDATED = 'onTotalUnreadMessageCountUpdated',
2458
+
2459
+ /**
2460
+ * This event is triggered when conversation group list is updated.
2461
+ */
2462
+ CONVERSATION_GROUP_LIST_UPDATED = 'onConversationGroupListUpdated',
2463
+
2464
+ /**
2465
+ * This event is triggered when conversations in the conversation group is updated.
2466
+ */
2467
+ CONVERSATION_IN_GROUP_UPDATED = 'onConversationInGroupUpdated',
2468
+
2469
+ /**
2470
+ * This event is triggered when the SDK group list is updated. The access side can traverse event.data to obtain the group list and render it to the UI.
2471
+ */
2472
+ GROUP_LIST_UPDATED = 'onGroupListUpdated',
2473
+
2474
+ /**
2475
+ * This event is triggered when group properties are updated. The access side can traverse event.data to obtain the updated group properties.
2476
+ */
2477
+ GROUP_ATTRIBUTES_UPDATED = 'groupAttributesUpdated',
2478
+
2479
+ /**
2480
+ * This event is triggered when group counter is updated. The access side can traverse event.data to obtain the updated group counter.
2481
+ */
2482
+ GROUP_COUNTER_UPDATED = 'onGroupCounterUpdated',
2483
+
2484
+ /**
2485
+ * This event is triggered when an topic is created.
2486
+ */
2487
+ TOPIC_CREATED = 'onTopicCreated',
2488
+
2489
+ /**
2490
+ * This event is triggered when topics are removed.
2491
+ */
2492
+ TOPIC_DELETED = 'onTopicDeleted',
2493
+
2494
+ /**
2495
+ * This event is triggered when the topic list is updated.
2496
+ */
2497
+ TOPIC_UPDATED = 'onTopicUpdated',
2498
+
2499
+ /**
2500
+ * This event is triggered when the profile of the current user or profiles of friends are changed. event.data is an array that stores Profile objects.
2501
+ */
2502
+ PROFILE_UPDATED = 'onProfileUpdated',
2503
+
2504
+ /**
2505
+ * This event is triggered when status of users you subscribed or your friends updated.
2506
+ */
2507
+ USER_STATUS_UPDATED = 'onUserStatusUpdated',
2508
+
2509
+ /**
2510
+ * This event is triggered when the SDK blocklist is updated.
2511
+ */
2512
+ BLACKLIST_UPDATED = 'blacklistUpdated',
2513
+
2514
+ /**
2515
+ * This event is triggered when the friend list is updated.
2516
+ */
2517
+ FRIEND_LIST_UPDATED = 'onFriendListUpdated',
2518
+
2519
+ /**
2520
+ * This event is triggered when the friend group list is updated.
2521
+ */
2522
+ FRIEND_GROUP_LIST_UPDATED = 'onFriendGroupListUpdated',
2523
+
2524
+ /**
2525
+ * This event is triggered when the SDK friend request list is updated.
2526
+ */
2527
+ FRIEND_APPLICATION_LIST_UPDATED = 'onFriendApplicationListUpdated',
2528
+
2529
+ /**
2530
+ * This event is triggered when my followers list is updated.
2531
+ */
2532
+ MY_FOLLOWERS_LIST_UPDATED = 'onMyFollowersListUpdated',
2533
+
2534
+ /**
2535
+ * This event is triggered when my following list is updated.
2536
+ */
2537
+ MY_FOLLOWING_LIST_UPDATED = 'onMyFollowingListUpdated',
2538
+
2539
+ /**
2540
+ * This event is triggered when my mutual followers list is updated.
2541
+ */
2542
+ MUTUAL_FOLLOWERS_LIST_UPDATED = 'onMutualFollowersListUpdated',
2543
+
2544
+ /**
2545
+ * This event is triggered when the current user is kicked offline.
2546
+ */
2547
+ KICKED_OUT = 'kickedOut',
2548
+
2549
+ /**
2550
+ * This event is triggered when the SDK encounters an error.
2551
+ */
2552
+ ERROR = 'error',
2553
+
2554
+ /**
2555
+ * This event is triggered when the network status changes.
2556
+ */
2557
+ NET_STATE_CHANGE = 'netStateChange',
2558
+
2559
+ /**
2560
+ * This event is triggered when the all receiving message option changes.
2561
+ */
2562
+ ALL_RECEIVE_MESSAGE_OPT_UPDATED = 'onAllReceiveMessageOptUpdated',
2563
+ }
2564
+
2565
+ enum TYPES {
2566
+ /**
2567
+ * Message type: text message
2568
+ */
2569
+ MSG_TEXT = 'TIMTextElem',
2570
+
2571
+ /**
2572
+ * Message type: image message
2573
+ */
2574
+ MSG_IMAGE = 'TIMImageElem',
2575
+
2576
+ /**
2577
+ * Message type: audio message
2578
+ */
2579
+ MSG_AUDIO = 'TIMSoundElem',
2580
+
2581
+ /**
2582
+ * Message type: file message
2583
+ */
2584
+ MSG_FILE = 'TIMFileElem',
2585
+
2586
+ /**
2587
+ * Message type: emoji message
2588
+ */
2589
+ MSG_FACE = 'TIMFaceElem',
2590
+
2591
+ /**
2592
+ * Message type: video message
2593
+ */
2594
+ MSG_VIDEO = 'TIMVideoFileElem',
2595
+
2596
+ /**
2597
+ * Message type: location message
2598
+ */
2599
+ MSG_LOCATION = 'TIMLocationElem',
2600
+
2601
+ /**
2602
+ * Message type: group notification
2603
+ */
2604
+ MSG_GRP_TIP = 'TIMGroupTipElem',
2605
+
2606
+ /**
2607
+ * Message type: group system message
2608
+ */
2609
+ MSG_GRP_SYS_NOTICE = 'TIMGroupSystemNoticeElem',
2610
+
2611
+ /**
2612
+ * Message type: custom message
2613
+ */
2614
+ MSG_CUSTOM = 'TIMCustomElem',
2615
+
2616
+ /**
2617
+ * Message type: combined message
2618
+ */
2619
+ MSG_MERGER = 'TIMRelayElem',
2620
+
2621
+ /**
2622
+ * High priority of group message. Recommended message type: red packet and gift message
2623
+ */
2624
+ MSG_PRIORITY_HIGH = 'High',
2625
+
2626
+ /**
2627
+ * Normal priority of group message. Recommended message type: common text message
2628
+ */
2629
+ MSG_PRIORITY_NORMAL = 'Normal',
2630
+
2631
+ /**
2632
+ * Low priority of group message. Recommended message type: like message
2633
+ */
2634
+ MSG_PRIORITY_LOW = 'Low',
2635
+
2636
+ /**
2637
+ * Lowest priority of group message. Recommended message type: least important message
2638
+ */
2639
+ MSG_PRIORITY_LOWEST = 'Lowest',
2640
+
2641
+ /**
2642
+ * Conversation type: one-to-one chat
2643
+ */
2644
+ CONV_C2C = 'C2C',
2645
+
2646
+ /**
2647
+ * Conversation type: group chat
2648
+ */
2649
+ CONV_GROUP = 'GROUP',
2650
+
2651
+ /**
2652
+ * Conversation type: topic chat
2653
+ */
2654
+ CONV_TOPIC = 'TOPIC',
2655
+
2656
+ /**
2657
+ * Conversation type: system conversation
2658
+ */
2659
+ CONV_SYSTEM = '@TIM#SYSTEM',
2660
+
2661
+ CONV_AT_ME = 1,
2662
+
2663
+ CONV_AT_ALL = 2,
2664
+
2665
+ CONV_AT_ALL_AT_ME = 3,
2666
+
2667
+ CONV_MARK_TYPE_STAR = 0x1,
2668
+
2669
+ CONV_MARK_TYPE_UNREAD = 0x2,
2670
+
2671
+ CONV_MARK_TYPE_FOLD = 0x3,
2672
+
2673
+ CONV_MARK_TYPE_HIDE = 0x4,
2674
+
2675
+ /**
2676
+ * Group type: work group
2677
+ */
2678
+ GRP_WORK = 'Private',
2679
+
2680
+ /**
2681
+ * Group type: public group
2682
+ */
2683
+ GRP_PUBLIC = 'Public',
2684
+
2685
+ /**
2686
+ * Group type: meeting group
2687
+ */
2688
+ GRP_MEETING = 'ChatRoom',
2689
+
2690
+ /**
2691
+ * Group type: audio-video group
2692
+ */
2693
+ GRP_AVCHATROOM = 'AVChatRoom',
2694
+
2695
+ /**
2696
+ * Group type: community group
2697
+ */
2698
+ GRP_COMMUNITY = 'Community',
2699
+
2700
+ /**
2701
+ * Group member role: group owner
2702
+ */
2703
+ GRP_MBR_ROLE_OWNER = 'Owner',
2704
+
2705
+ /**
2706
+ * Group member role: group admin
2707
+ */
2708
+ GRP_MBR_ROLE_ADMIN = 'Admin',
2709
+
2710
+ /**
2711
+ * Group member role: common group member
2712
+ */
2713
+ GRP_MBR_ROLE_MEMBER = 'Member',
2714
+
2715
+ /**
2716
+ * Group member role: custom community member
2717
+ */
2718
+ GRP_MBR_ROLE_CUSTOM = 'Custom',
2719
+
2720
+ /**
2721
+ * Group notification: a member joins the group
2722
+ */
2723
+ GRP_TIP_MBR_JOIN = 1,
2724
+
2725
+ /**
2726
+ * Group notification: a member leaves the group
2727
+ */
2728
+ GRP_TIP_MBR_QUIT = 2,
2729
+
2730
+ /**
2731
+ * Group notification: a group member is removed from the group
2732
+ */
2733
+ GRP_TIP_MBR_KICKED_OUT = 3,
2734
+
2735
+ /**
2736
+ * Group notification: a group member is granted the group admin role
2737
+ */
2738
+ GRP_TIP_MBR_SET_ADMIN = 4,
2739
+
2740
+ /**
2741
+ * Group notification: the group admin role of a group member is revoked
2742
+ */
2743
+ GRP_TIP_MBR_CANCELED_ADMIN = 5,
2744
+
2745
+ /**
2746
+ * Group notification: the group profile is modified
2747
+ */
2748
+ GRP_TIP_GRP_PROFILE_UPDATED = 6,
2749
+
2750
+ /**
2751
+ * Group notification: the profile of a group member is modified
2752
+ */
2753
+ GRP_TIP_MBR_PROFILE_UPDATED = 7,
2754
+
2755
+ /**
2756
+ * Group notification: an audio-video group member is banned
2757
+ */
2758
+ GRP_TIP_BAN_AVCHATROOM_MEMBER = 10,
2759
+
2760
+ /**
2761
+ * Group notification: an audio-video group member is unbanned
2762
+ */
2763
+ GRP_TIP_UNBAN_AVCHATROOM_MEMBER = 11,
2764
+
2765
+ /**
2766
+ * Group notification: the SDK receives a message and notifies the access side, which then sends a notification
2767
+ */
2768
+ MSG_REMIND_ACPT_AND_NOTE = 'AcceptAndNotify',
2769
+
2770
+ /**
2771
+ * Group notification: the SDK receives a message and notifies the access side, which then does not send any notifications
2772
+ */
2773
+ MSG_REMIND_ACPT_NOT_NOTE = 'AcceptNotNotify',
2774
+
2775
+ /**
2776
+ * Group notification: the SDK rejects a message.
2777
+ */
2778
+ MSG_REMIND_DISCARD = 'Discard',
2779
+
2780
+ /**
2781
+ * Group notification: the SDK receives a message online and only receives offline push for group mentions when offline
2782
+ */
2783
+ NOT_RECEIVE_OFFLINE_PUSH_EXCEPT_AT = 'AcceptNotNotifyExceptAt',
2784
+
2785
+ /**
2786
+ * Topic notification: the SDK only receives mention message and notifies the access side, which then send a notification
2787
+ */
2788
+ NOT_RECEIVE_MSG_EXCEPT_AT = 'NotReceiveMsgExceptAt',
2789
+
2790
+ /**
2791
+ * Gender: unspecified
2792
+ */
2793
+ GENDER_UNKNOWN = 'Gender_Type_Unknown',
2794
+
2795
+ /**
2796
+ * Gender: female
2797
+ */
2798
+ GENDER_FEMALE = 'Gender_Type_Female',
2799
+
2800
+ /**
2801
+ * Gender: male
2802
+ */
2803
+ GENDER_MALE = 'Gender_Type_Male',
2804
+
2805
+ /**
2806
+ * Kicked-offline type: kicked-offline due to multi-account login
2807
+ */
2808
+ KICKED_OUT_MULT_ACCOUNT = 'multipleAccount',
2809
+
2810
+ /**
2811
+ * Kicked-offline type: kicked-offline due to multi-device login
2812
+ */
2813
+ KICKED_OUT_MULT_DEVICE = 'multipleDevice',
2814
+
2815
+ /**
2816
+ * Kicked-offline type: kicked-offline type due to signature expiration
2817
+ */
2818
+ KICKED_OUT_USERSIG_EXPIRED = 'userSigExpired',
2819
+
2820
+ /**
2821
+ * Kicked-offline type: kicked-offline type due to RESTAPI
2822
+ */
2823
+ KICKED_OUT_REST_API = 'REST_API_Kick',
2824
+
2825
+ /**
2826
+ * When receiving friend requests from others: automatically accept all friend requests received
2827
+ */
2828
+ ALLOW_TYPE_ALLOW_ANY = 'AllowType_Type_AllowAny',
2829
+
2830
+ /**
2831
+ * When receiving friend requests from others: manually accept friend requests received
2832
+ */
2833
+ ALLOW_TYPE_NEED_CONFIRM = 'AllowType_Type_NeedConfirm',
2834
+
2835
+ /**
2836
+ * When receiving friend requests from others: reject all friend requests received
2837
+ */
2838
+ ALLOW_TYPE_DENY_ANY = 'AllowType_Type_DenyAny',
2839
+
2840
+ /**
2841
+ * Whether the admin prohibits the user from initiating a friend request: allow the user to initiate a friend request (default value)
2842
+ */
2843
+ FORBID_TYPE_NONE = 'AdminForbid_Type_None',
2844
+
2845
+ /**
2846
+ * Whether the admin prohibits the user from initiating a friend request: prohibit the user from initiating a friend request
2847
+ */
2848
+ FORBID_TYPE_SEND_OUT = 'AdminForbid_Type_SendOut',
2849
+
2850
+ /**
2851
+ * Group joining option: allow free group joining
2852
+ */
2853
+ JOIN_OPTIONS_FREE_ACCESS = 'FreeAccess',
2854
+
2855
+ /**
2856
+ * Group joining option: require admin approval for group joining
2857
+ */
2858
+ JOIN_OPTIONS_NEED_PERMISSION = 'NeedPermission',
2859
+
2860
+ /**
2861
+ * Group joining option: forbid group joining
2862
+ */
2863
+ JOIN_OPTIONS_DISABLE_APPLY = 'DisableApply',
2864
+
2865
+ /**
2866
+ * Group joining request status: joined the group successfully
2867
+ */
2868
+ JOIN_STATUS_SUCCESS = 'JoinedSuccess',
2869
+
2870
+ /**
2871
+ * Group joining request status: already in the group
2872
+ */
2873
+ JOIN_STATUS_ALREADY_IN_GROUP = 'AlreadyInGroup',
2874
+
2875
+ /**
2876
+ * Group joining request status: waiting to be approved by the admin
2877
+ */
2878
+ JOIN_STATUS_WAIT_APPROVAL = 'WaitAdminApproval',
2879
+
2880
+ /**
2881
+ * Group profile: group owner ID
2882
+ */
2883
+ GRP_PROFILE_OWNER_ID = 'ownerID',
2884
+
2885
+ /**
2886
+ * Group profile: group creation time
2887
+ */
2888
+ GRP_PROFILE_CREATE_TIME = 'createTime',
2889
+
2890
+ /**
2891
+ * Group profile: latest group profile modification time
2892
+ */
2893
+ GRP_PROFILE_LAST_INFO_TIME = 'lastInfoTime',
2894
+
2895
+ /**
2896
+ * Group profile: number of group members in the current group
2897
+ */
2898
+ GRP_PROFILE_MEMBER_NUM = 'memberNum',
2899
+
2900
+ /**
2901
+ * Group profile: maximum number of group members in the current group
2902
+ */
2903
+ GRP_PROFILE_MAX_MEMBER_NUM = 'maxMemberNum',
2904
+
2905
+ /**
2906
+ * Group profile: group joining option
2907
+ */
2908
+ GRP_PROFILE_JOIN_OPTION = 'joinOption',
2909
+
2910
+ /**
2911
+ * Group profile: group introduction
2912
+ */
2913
+ GRP_PROFILE_INTRODUCTION = 'introduction',
2914
+
2915
+ /**
2916
+ * Group profile: group notice
2917
+ */
2918
+ GRP_PROFILE_NOTIFICATION = 'notification',
2919
+
2920
+ /**
2921
+ * Group profile: whether to mute all members
2922
+ */
2923
+ GRP_PROFILE_MUTE_ALL_MBRS = 'muteAllMembers',
2924
+
2925
+ /**
2926
+ * Friend adding mode: one-way friend adding
2927
+ */
2928
+ SNS_ADD_TYPE_SINGLE = 'Add_Type_Single',
2929
+
2930
+ /**
2931
+ * Friend adding mode: two-way friend adding
2932
+ */
2933
+ SNS_ADD_TYPE_BOTH = 'Add_Type_Both',
2934
+
2935
+ /**
2936
+ * Friend deletion mode: one-way friend deletion
2937
+ */
2938
+ SNS_DELETE_TYPE_SINGLE = 'Delete_Type_Single',
2939
+
2940
+ /**
2941
+ * Friend deletion mode: two-way friend deletion
2942
+ */
2943
+ SNS_DELETE_TYPE_BOTH = 'Delete_Type_Both',
2944
+
2945
+ /**
2946
+ * Friend request pulling: pulling friend requests received and sent by me
2947
+ */
2948
+ SNS_APPLICATION_TYPE_BOTH = 'Pendency_Type_Both',
2949
+
2950
+ /**
2951
+ * Friend request pulling: pulling friend requests received by me
2952
+ */
2953
+ SNS_APPLICATION_SENT_TO_ME = 'Pendency_Type_ComeIn',
2954
+
2955
+ /**
2956
+ * Friend request pulling: pulling friend requests sent by me
2957
+ */
2958
+ SNS_APPLICATION_SENT_BY_ME = 'Pendency_Type_SendOut',
2959
+
2960
+ /**
2961
+ * Friend request accepting mode: agree to add as a one-way friend
2962
+ */
2963
+ SNS_APPLICATION_AGREE = 'Response_Action_Agree',
2964
+
2965
+ /**
2966
+ * Friend request accepting mode: agree to add as a two-way friend
2967
+ */
2968
+ SNS_APPLICATION_AGREE_AND_ADD = 'Response_Action_AgreeAndAdd',
2969
+
2970
+ /**
2971
+ * Friend verification: two-way friend verification
2972
+ */
2973
+ SNS_CHECK_TYPE_BOTH = 'CheckResult_Type_Both',
2974
+
2975
+ /**
2976
+ * Friend verification: one-way friend verification
2977
+ */
2978
+ SNS_CHECK_TYPE_SINGLE = 'CheckResult_Type_Single',
2979
+
2980
+ /**
2981
+ * Friend relationship: A and B are not on each other's friend list
2982
+ */
2983
+ SNS_TYPE_NO_RELATION = 'CheckResult_Type_NoRelation',
2984
+
2985
+ /**
2986
+ * Friend relationship: B is on A's friend list, but A is not on B's friend list
2987
+ */
2988
+ SNS_TYPE_A_WITH_B = 'CheckResult_Type_AWithB',
2989
+
2990
+ /**
2991
+ * Friend relationship: B is not on A's friend list, but A is on B's friend list
2992
+ */
2993
+ SNS_TYPE_B_WITH_A = 'CheckResult_Type_BWithA',
2994
+
2995
+ /**
2996
+ * Friend relationship: A and B are on each other's friend list
2997
+ */
2998
+ SNS_TYPE_BOTH_WAY = 'CheckResult_Type_BothWay',
2999
+
3000
+ /**
3001
+ * Network status: connected
3002
+ */
3003
+ NET_STATE_CONNECTED = 'connected',
3004
+
3005
+ /**
3006
+ * Network status: connecting
3007
+ */
3008
+ NET_STATE_CONNECTING = 'connecting',
3009
+
3010
+ /**
3011
+ * Network status: disconnected
3012
+ */
3013
+ NET_STATE_DISCONNECTED = 'disconnected',
3014
+
3015
+ /**
3016
+ * @ all members during a group chat
3017
+ */
3018
+ MSG_AT_ALL = '__kImSDK_MesssageAtALL__',
3019
+
3020
+ READ_ALL_C2C_MSG = 'readAllC2CMessage',
3021
+
3022
+ READ_ALL_GROUP_MSG = 'readAllGroupMessage',
3023
+
3024
+ READ_ALL_MSG = 'readAllMessage',
3025
+
3026
+ /**
3027
+ * Unknown status
3028
+ */
3029
+ USER_STATUS_UNKNOWN = 0,
3030
+
3031
+ /**
3032
+ * Online status
3033
+ */
3034
+ USER_STATUS_ONLINE = 1,
3035
+
3036
+ /**
3037
+ * Offline status
3038
+ */
3039
+ USER_STATUS_OFFLINE = 2,
3040
+
3041
+ /**
3042
+ * Unlogined status (such as logout or registering)
3043
+ */
3044
+ USER_STATUS_UNLOGINED = 3,
3045
+
3046
+ /**
3047
+ * On the iOS platform, no sound is played when receiving offline push notifications
3048
+ */
3049
+ IOS_OFFLINE_PUSH_NO_SOUND = 'push.no_sound',
3050
+
3051
+ /**
3052
+ * On the iOS platform, play the default sound when receiving offline push notifications
3053
+ */
3054
+ IOS_OFFLINE_PUSH_DEFAULT_SOUND = 'default',
3055
+ }
3056
+
3057
+ enum TSignaling {
3058
+ /**
3059
+ * Signaling event: Received an invitation
3060
+ */
3061
+ NEW_INVITATION_RECEIVED = 'newInvitationReceived',
3062
+ /**
3063
+ * Signaling event: The invitee accepted the invitation
3064
+ */
3065
+ INVITEE_ACCEPTED = 'ts_invitee_accepted',
3066
+ /**
3067
+ * Signaling event: The invitee declined the invitation
3068
+ */
3069
+ INVITEE_REJECTED = 'ts_invitee_rejected',
3070
+ /**
3071
+ * Signaling event: The invitation was canceled
3072
+ */
3073
+ INVITATION_CANCELLED = 'ts_invitation_cancelled',
3074
+ /**
3075
+ * Signaling event: The invitation timed out
3076
+ */
3077
+ INVITATION_TIMEOUT = 'ts_invitation_timeout',
3078
+ /**
3079
+ * Signaling event: The invitation was modified
3080
+ */
3081
+ INVITATION_MODIFIED = 'ts_invitation_modified',
3082
+ /**
3083
+ * Signaling type: unknown
3084
+ */
3085
+ ACTION_TYPE_UNKNOWN = 0,
3086
+ /**
3087
+ * Signaling type: The inviter initiated the invitation
3088
+ */
3089
+ ACTION_TYPE_INVITE = 1,
3090
+ /**
3091
+ * Signaling type: The inviter canceled the invitation
3092
+ */
3093
+ ACTION_TYPE_CANCEL_INVITE = 2,
3094
+ /**
3095
+ * Signaling type: The invitee accepted the invitation
3096
+ */
3097
+ ACTION_TYPE_ACCEPT_INVITE = 3,
3098
+ /**
3099
+ * Signaling type: The invitee declined the invitation
3100
+ */
3101
+ ACTION_TYPE_REJECT_INVITE = 4,
3102
+ /**
3103
+ * Signaling type: The invitation timed out
3104
+ */
3105
+ ACTION_TYPE_INVITE_TIMEOUT = 5,
3106
+ }
3107
+ }
3108
+
3109
+ export default TencentCloudChat;
3110
+