@cometchat/chat-sdk-javascript 4.0.2 → 4.0.4-beta1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CometChat.d.ts +253 -56
- package/CometChat.js +1 -1
- package/package.json +1 -1
package/CometChat.d.ts
CHANGED
|
@@ -18,6 +18,8 @@ export class CometChat {
|
|
|
18
18
|
KEY_DATA: string;
|
|
19
19
|
KEY_META: string;
|
|
20
20
|
KEY_CURSOR: string;
|
|
21
|
+
KEY_NEXT: string;
|
|
22
|
+
KEY_PREVIOUS: string;
|
|
21
23
|
KEY_ACTION: string;
|
|
22
24
|
KEY_MESSAGE: string;
|
|
23
25
|
KEY_ERROR: string;
|
|
@@ -29,6 +31,7 @@ export class CometChat {
|
|
|
29
31
|
KEY_IDENTITY: string;
|
|
30
32
|
KEY_SERVICE: string;
|
|
31
33
|
KEY_ENTITIES: string;
|
|
34
|
+
KEY_REACTIONS: string;
|
|
32
35
|
KEY_ENTITITY: string;
|
|
33
36
|
KEY_ENTITYTYPE: string;
|
|
34
37
|
KEY_ATTACHMENTS: string;
|
|
@@ -385,7 +388,6 @@ export class CometChat {
|
|
|
385
388
|
HIDE_DELETED_MESSAGES: string;
|
|
386
389
|
WITH_TAGS: string;
|
|
387
390
|
TAGS: string;
|
|
388
|
-
MY_MENTIONS_ONLY: string;
|
|
389
391
|
MENTIONS_WITH_TAG_INFO: string;
|
|
390
392
|
MENTIONS_WITH_BLOCKED_INFO: string;
|
|
391
393
|
ONLY_INTERACTION_GOAL_COMPLETED: string;
|
|
@@ -716,6 +718,7 @@ export class CometChat {
|
|
|
716
718
|
static SESSION_STORE: {
|
|
717
719
|
SESSION_ID: string;
|
|
718
720
|
};
|
|
721
|
+
static REACTION_ACTION: typeof REACTION_ACTION;
|
|
719
722
|
static ExtensionErrors: {
|
|
720
723
|
INVALID_EXTENSION: {
|
|
721
724
|
code: string;
|
|
@@ -873,6 +876,7 @@ export class CometChat {
|
|
|
873
876
|
static DEFAULT_VALUES: {
|
|
874
877
|
ZERO: number;
|
|
875
878
|
MSGS_LIMIT: number;
|
|
879
|
+
REACTIONS_LIMIT: number;
|
|
876
880
|
MSGS_MAX_LIMIT: number;
|
|
877
881
|
USERS_LIMIT: number;
|
|
878
882
|
USERS_MAX_LIMIT: number;
|
|
@@ -887,6 +891,7 @@ export class CometChat {
|
|
|
887
891
|
REGION_DEFAULT_US: string;
|
|
888
892
|
REGION_DEFAULT_IN: string;
|
|
889
893
|
REGION_DEFAULT_PRIVATE: string;
|
|
894
|
+
REACTIONS_MAX_LIMIT: number;
|
|
890
895
|
};
|
|
891
896
|
static DELIVERY_RECEIPTS: {
|
|
892
897
|
RECEIVER_ID: string;
|
|
@@ -969,12 +974,17 @@ export class CometChat {
|
|
|
969
974
|
static User: typeof User;
|
|
970
975
|
static GroupMember: typeof GroupMember;
|
|
971
976
|
static Conversation: typeof Conversation;
|
|
977
|
+
static ReactionCount: typeof ReactionCount;
|
|
978
|
+
static ReactionEvent: typeof ReactionEvent;
|
|
979
|
+
static Reaction: typeof Reaction;
|
|
972
980
|
static USER_STATUS: {
|
|
973
981
|
ONLINE: string;
|
|
974
982
|
OFFLINE: string;
|
|
975
983
|
};
|
|
976
984
|
static MessagesRequest: typeof MessagesRequest;
|
|
977
985
|
static MessagesRequestBuilder: typeof MessagesRequestBuilder;
|
|
986
|
+
static ReactionsRequest: typeof ReactionsRequest;
|
|
987
|
+
static ReactionsRequestBuilder: typeof ReactionsRequestBuilder;
|
|
978
988
|
static UsersRequest: typeof UsersRequest;
|
|
979
989
|
static UsersRequestBuilder: typeof UsersRequestBuilder;
|
|
980
990
|
static ConversationsRequest: typeof ConversationsRequest;
|
|
@@ -1366,6 +1376,22 @@ export class CometChat {
|
|
|
1366
1376
|
* @memberof CometChat
|
|
1367
1377
|
*/
|
|
1368
1378
|
static getUnreadMessageCountForGroup(GUID: string, doHideMessages?: boolean): Promise<Object>;
|
|
1379
|
+
/**
|
|
1380
|
+
* Function to add reaction for the provided messageID.
|
|
1381
|
+
* @param {string | any} messageId
|
|
1382
|
+
* @param {string} reaction
|
|
1383
|
+
* @returns {Promise<BaseMessage>}
|
|
1384
|
+
* @memberof CometChat
|
|
1385
|
+
*/
|
|
1386
|
+
static addReaction(messageId: string | any, reaction: string): Promise<BaseMessage>;
|
|
1387
|
+
/**
|
|
1388
|
+
* Function to remove reaction for the provided messageID.
|
|
1389
|
+
* @param {string | any} messageId
|
|
1390
|
+
* @param {string} reaction
|
|
1391
|
+
* @returns {Promise<BaseMessage>}
|
|
1392
|
+
* @memberof CometChat
|
|
1393
|
+
*/
|
|
1394
|
+
static removeReaction(messageId: string | any, reaction: string): Promise<BaseMessage>;
|
|
1369
1395
|
/**
|
|
1370
1396
|
* Funtion to edit a message.
|
|
1371
1397
|
* @param {BaseMessage} message
|
|
@@ -2245,6 +2271,8 @@ export class BaseMessage implements Message {
|
|
|
2245
2271
|
protected sender?: User;
|
|
2246
2272
|
protected receiverId?: string;
|
|
2247
2273
|
protected receiver?: User | Group;
|
|
2274
|
+
protected data?: object;
|
|
2275
|
+
protected reactions?: ReactionCount[];
|
|
2248
2276
|
protected type?: string;
|
|
2249
2277
|
protected category?: MessageCategory;
|
|
2250
2278
|
protected receiverType?: string;
|
|
@@ -2264,108 +2292,119 @@ export class BaseMessage implements Message {
|
|
|
2264
2292
|
protected deletedBy: string;
|
|
2265
2293
|
protected replyCount: number;
|
|
2266
2294
|
protected rawMessage: Object;
|
|
2295
|
+
protected unreadRepliesCount: number;
|
|
2267
2296
|
protected mentionedUsers?: User[];
|
|
2268
2297
|
protected mentionedMe?: boolean;
|
|
2269
2298
|
constructor(receiverId: string, messageType: string, receiverType: string, category: MessageCategory);
|
|
2299
|
+
/**
|
|
2300
|
+
* Get unread replies count of the message
|
|
2301
|
+
* @returns {number}
|
|
2302
|
+
*/
|
|
2303
|
+
getUnreadRepliesCount(): number;
|
|
2304
|
+
/**
|
|
2305
|
+
* @param {number}
|
|
2306
|
+
* Set unread replies count of the message
|
|
2307
|
+
*/
|
|
2308
|
+
setUnreadRepliesCount(value: number): void;
|
|
2270
2309
|
/**
|
|
2271
2310
|
* Get ID of the message
|
|
2272
2311
|
* @returns {number}
|
|
2273
|
-
|
|
2312
|
+
*/
|
|
2274
2313
|
getId(): number;
|
|
2275
2314
|
/**
|
|
2276
2315
|
* @param {number} value
|
|
2277
2316
|
* Set ID of the message
|
|
2278
|
-
|
|
2317
|
+
*/
|
|
2279
2318
|
setId(value: number): void;
|
|
2280
2319
|
/**
|
|
2281
2320
|
* Get conversation ID of the message.
|
|
2282
2321
|
* @returns {string}
|
|
2283
|
-
|
|
2322
|
+
*/
|
|
2284
2323
|
getConversationId(): string;
|
|
2285
2324
|
/**
|
|
2286
2325
|
* @param {string} value
|
|
2287
2326
|
* Set conversation ID of the message.
|
|
2288
|
-
|
|
2327
|
+
*/
|
|
2289
2328
|
setConversationId(value: string): void;
|
|
2290
2329
|
/**
|
|
2291
2330
|
* Get parent message ID of the message.
|
|
2292
2331
|
* @returns {number}
|
|
2293
|
-
|
|
2332
|
+
*/
|
|
2294
2333
|
getParentMessageId(): number;
|
|
2295
2334
|
/**
|
|
2296
2335
|
* @param {number} value
|
|
2297
2336
|
* Set parent message ID of the message.
|
|
2298
|
-
|
|
2337
|
+
*/
|
|
2299
2338
|
setParentMessageId(value: number): void;
|
|
2300
2339
|
/**
|
|
2301
2340
|
* Get MUID of the message.
|
|
2302
2341
|
* @returns {string}
|
|
2303
|
-
|
|
2342
|
+
*/
|
|
2304
2343
|
getMuid(): string;
|
|
2305
2344
|
/**
|
|
2306
2345
|
* @param {string} value
|
|
2307
2346
|
* Sets the MUID of the message.
|
|
2308
|
-
|
|
2347
|
+
*/
|
|
2309
2348
|
setMuid(value: string): void;
|
|
2310
2349
|
/**
|
|
2311
2350
|
* Get sender of the message.
|
|
2312
2351
|
* @returns {User}
|
|
2313
|
-
|
|
2352
|
+
*/
|
|
2314
2353
|
getSender(): User;
|
|
2315
2354
|
/**
|
|
2316
2355
|
* @param {User} value
|
|
2317
2356
|
* Set sender of the message.
|
|
2318
|
-
|
|
2357
|
+
*/
|
|
2319
2358
|
setSender(value: User): void;
|
|
2320
2359
|
/**
|
|
2321
2360
|
* Get receiver of the message.
|
|
2322
2361
|
* @returns {User | Group}
|
|
2323
|
-
|
|
2362
|
+
*/
|
|
2324
2363
|
getReceiver(): User | Group;
|
|
2325
2364
|
/**
|
|
2326
2365
|
* @param {User | Group} value
|
|
2327
2366
|
* Set receiver of the message.
|
|
2328
|
-
|
|
2367
|
+
*/
|
|
2329
2368
|
setReceiver(value: User | Group): void;
|
|
2330
2369
|
/**
|
|
2331
2370
|
* Get receiverID of the message.
|
|
2332
2371
|
* @returns {string}
|
|
2333
|
-
|
|
2372
|
+
*/
|
|
2334
2373
|
getReceiverId(): string;
|
|
2335
2374
|
/**
|
|
2336
2375
|
* @param {string} value
|
|
2337
2376
|
* Set receiverId of the message.
|
|
2338
|
-
|
|
2377
|
+
*/
|
|
2339
2378
|
setReceiverId(value: string): void;
|
|
2340
2379
|
/**
|
|
2341
2380
|
* Get type of the message.
|
|
2342
2381
|
* @returns {string}
|
|
2343
|
-
|
|
2382
|
+
*/
|
|
2344
2383
|
getType(): string;
|
|
2345
2384
|
/**
|
|
2346
2385
|
* @param {string} value
|
|
2347
2386
|
* Set type of the message.
|
|
2348
|
-
|
|
2387
|
+
*/
|
|
2349
2388
|
setType(value: string): void;
|
|
2350
2389
|
/**
|
|
2351
2390
|
* Get receiver type of the message.
|
|
2352
2391
|
* @returns {string}
|
|
2353
|
-
|
|
2392
|
+
*/
|
|
2354
2393
|
getReceiverType(): string;
|
|
2355
2394
|
/**
|
|
2356
2395
|
* @param {string} value
|
|
2357
2396
|
* Set the receiver type of the message.
|
|
2358
|
-
|
|
2397
|
+
*/
|
|
2359
2398
|
setReceiverType(value: string): void;
|
|
2360
2399
|
/**
|
|
2361
2400
|
* Get message's sentAt timestamp.
|
|
2362
2401
|
* @returns {number}
|
|
2363
|
-
|
|
2402
|
+
*/
|
|
2364
2403
|
getSentAt(): number;
|
|
2365
2404
|
/**
|
|
2366
2405
|
* @param {number} value
|
|
2367
2406
|
* Set message's sentAt timestamp.
|
|
2368
|
-
|
|
2407
|
+
*/
|
|
2369
2408
|
setSentAt(value: number): void;
|
|
2370
2409
|
/** @private */
|
|
2371
2410
|
getStatus(): string;
|
|
@@ -2374,22 +2413,22 @@ export class BaseMessage implements Message {
|
|
|
2374
2413
|
/**
|
|
2375
2414
|
* Get delivery timestamp of the message.
|
|
2376
2415
|
* @returns {number}
|
|
2377
|
-
|
|
2416
|
+
*/
|
|
2378
2417
|
getDeliveredAt(): number;
|
|
2379
2418
|
/**
|
|
2380
2419
|
* @param {number} deliveredAt
|
|
2381
2420
|
* Set delivery timestamp of the message.
|
|
2382
|
-
|
|
2421
|
+
*/
|
|
2383
2422
|
setDeliveredAt(deliveredAt: number): void;
|
|
2384
2423
|
/**
|
|
2385
2424
|
* Get timestamp of the message at which it was delivered to logged in user.
|
|
2386
2425
|
* @returns {number}
|
|
2387
|
-
|
|
2426
|
+
*/
|
|
2388
2427
|
getDeliveredToMeAt(): number;
|
|
2389
2428
|
/**
|
|
2390
2429
|
* @param {number} deliveredToMeAt
|
|
2391
2430
|
* Set timestamp of the message at which it was delivered to logged in user.
|
|
2392
|
-
|
|
2431
|
+
*/
|
|
2393
2432
|
setDeliveredToMeAt(deliveredToMeAt: number): void;
|
|
2394
2433
|
/**
|
|
2395
2434
|
* Get Timestamp of the when message was read at.
|
|
@@ -2399,67 +2438,67 @@ export class BaseMessage implements Message {
|
|
|
2399
2438
|
/**
|
|
2400
2439
|
* @param {number} readAt
|
|
2401
2440
|
* Set read timestamp of the message.
|
|
2402
|
-
|
|
2441
|
+
*/
|
|
2403
2442
|
setReadAt(readAt: number): void;
|
|
2404
2443
|
/**
|
|
2405
2444
|
* Get timestamp of the message at which it was read by the logged in user.
|
|
2406
2445
|
* @returns {number}
|
|
2407
|
-
|
|
2446
|
+
*/
|
|
2408
2447
|
getReadByMeAt(): number;
|
|
2409
2448
|
/**
|
|
2410
2449
|
* @param {number} readByMeAt
|
|
2411
2450
|
* Set timestamp of the message at which it was read by the logged in user.
|
|
2412
|
-
|
|
2451
|
+
*/
|
|
2413
2452
|
setReadByMeAt(readByMeAt: number): void;
|
|
2414
2453
|
/**
|
|
2415
2454
|
* Get category of the message.
|
|
2416
2455
|
* @returns {string}
|
|
2417
|
-
|
|
2456
|
+
*/
|
|
2418
2457
|
getCategory(): MessageCategory;
|
|
2419
2458
|
/**
|
|
2420
2459
|
* @param {string} category
|
|
2421
2460
|
* Set category of the message.
|
|
2422
|
-
|
|
2461
|
+
*/
|
|
2423
2462
|
setCategory(category: MessageCategory): void;
|
|
2424
2463
|
/**
|
|
2425
2464
|
* Get timestamp of the message when it was updated/edited.
|
|
2426
2465
|
* @returns
|
|
2427
|
-
|
|
2466
|
+
*/
|
|
2428
2467
|
getEditedAt(): number;
|
|
2429
2468
|
/**
|
|
2430
2469
|
* @param {number} editedAt
|
|
2431
2470
|
* Set timestamp of the message when it was updated/edited.
|
|
2432
|
-
|
|
2471
|
+
*/
|
|
2433
2472
|
setEditedAt(editedAt: number): void;
|
|
2434
2473
|
/**
|
|
2435
2474
|
* Get UID of the user who edited/updated the message.
|
|
2436
2475
|
* @returns
|
|
2437
|
-
|
|
2476
|
+
*/
|
|
2438
2477
|
getEditedBy(): string;
|
|
2439
2478
|
/**
|
|
2440
2479
|
* @param {string} editedBy
|
|
2441
2480
|
* Set UID of the user who edited/updated the message.
|
|
2442
|
-
|
|
2481
|
+
*/
|
|
2443
2482
|
setEditedBy(editedBy: string): void;
|
|
2444
2483
|
/**
|
|
2445
2484
|
* Get timestamp of the message when it was deleted.
|
|
2446
2485
|
* @returns {number}
|
|
2447
|
-
|
|
2486
|
+
*/
|
|
2448
2487
|
getDeletedAt(): number;
|
|
2449
2488
|
/**
|
|
2450
2489
|
* @param {number} deletedAt
|
|
2451
2490
|
* Set timestamp of the message when it was deleted.
|
|
2452
|
-
|
|
2491
|
+
*/
|
|
2453
2492
|
setDeletedAt(deletedAt: number): void;
|
|
2454
2493
|
/**
|
|
2455
2494
|
* Get UID of the user who deleted the message.
|
|
2456
2495
|
* @returns {number}
|
|
2457
|
-
|
|
2496
|
+
*/
|
|
2458
2497
|
getDeletedBy(): string;
|
|
2459
2498
|
/**
|
|
2460
2499
|
* @param {string} deletedBy
|
|
2461
2500
|
* Set UID of the user who deleted the message.
|
|
2462
|
-
|
|
2501
|
+
*/
|
|
2463
2502
|
setDeletedBy(deletedBy: string): void;
|
|
2464
2503
|
/**
|
|
2465
2504
|
* Get the number of replies of the message.
|
|
@@ -2469,7 +2508,7 @@ export class BaseMessage implements Message {
|
|
|
2469
2508
|
/**
|
|
2470
2509
|
* @param {number} value
|
|
2471
2510
|
* Set the number of replies of the message.
|
|
2472
|
-
|
|
2511
|
+
*/
|
|
2473
2512
|
setReplyCount(value: number): void;
|
|
2474
2513
|
/**
|
|
2475
2514
|
* Get the raw JSON of the message.
|
|
@@ -2479,28 +2518,48 @@ export class BaseMessage implements Message {
|
|
|
2479
2518
|
/**
|
|
2480
2519
|
* @param {Object} rawMessage
|
|
2481
2520
|
* Set the raw JSON of the message.
|
|
2482
|
-
|
|
2521
|
+
*/
|
|
2483
2522
|
setRawMessage(rawMessage: Object): void;
|
|
2484
2523
|
/**
|
|
2485
2524
|
* @param {User[]} mentionedUsers
|
|
2486
2525
|
* Set the array of mentioned users
|
|
2487
|
-
|
|
2526
|
+
*/
|
|
2488
2527
|
setMentionedUsers(mentionedUsers: User[]): void;
|
|
2489
2528
|
/**
|
|
2490
2529
|
* Get the array of mentioned users
|
|
2491
2530
|
* @returns
|
|
2492
|
-
|
|
2531
|
+
*/
|
|
2493
2532
|
getMentionedUsers(): User[];
|
|
2494
2533
|
/**
|
|
2495
2534
|
* @param {boolean} hasMentionedMe
|
|
2496
2535
|
* Method to set if the user was mentioned in the message
|
|
2497
|
-
|
|
2536
|
+
*/
|
|
2498
2537
|
setHasMentionedMe(hasMentionedMe: boolean): void;
|
|
2499
2538
|
/**
|
|
2500
2539
|
* Method to check if the user was mentioned in the message
|
|
2501
2540
|
* @returns
|
|
2502
|
-
|
|
2541
|
+
*/
|
|
2503
2542
|
hasMentionedMe(): boolean;
|
|
2543
|
+
/**
|
|
2544
|
+
* Method to get data of the message.
|
|
2545
|
+
* @returns {Object}
|
|
2546
|
+
*/
|
|
2547
|
+
getData(): any;
|
|
2548
|
+
/**
|
|
2549
|
+
* Method to set data of the message.
|
|
2550
|
+
* @param {Object} value
|
|
2551
|
+
*/
|
|
2552
|
+
setData(value: object): void;
|
|
2553
|
+
/**
|
|
2554
|
+
* set the array of reactions in message
|
|
2555
|
+
* @param {ReactionCount[]} reactions
|
|
2556
|
+
*/
|
|
2557
|
+
setReactions(reactions: any): ReactionCount[];
|
|
2558
|
+
/**
|
|
2559
|
+
* Get the array of reactions in message
|
|
2560
|
+
* @returns {ReactionCount[]}
|
|
2561
|
+
*/
|
|
2562
|
+
getReactions(): ReactionCount[];
|
|
2504
2563
|
}
|
|
2505
2564
|
|
|
2506
2565
|
/**
|
|
@@ -2515,7 +2574,7 @@ export class TextMessage extends BaseMessage implements Message {
|
|
|
2515
2574
|
};
|
|
2516
2575
|
/** @private */ static readonly CATEGORY: string;
|
|
2517
2576
|
private text?;
|
|
2518
|
-
|
|
2577
|
+
protected data?: any;
|
|
2519
2578
|
private processedText?;
|
|
2520
2579
|
private tags?;
|
|
2521
2580
|
/**
|
|
@@ -2556,7 +2615,7 @@ export class TextMessage extends BaseMessage implements Message {
|
|
|
2556
2615
|
* Method to set data of the message.
|
|
2557
2616
|
* @param {Object} value
|
|
2558
2617
|
*/
|
|
2559
|
-
setData(value:
|
|
2618
|
+
setData(value: any): void;
|
|
2560
2619
|
/**
|
|
2561
2620
|
* Method to get text of the message.
|
|
2562
2621
|
* @returns {string}
|
|
@@ -2591,6 +2650,7 @@ export const constants: {
|
|
|
2591
2650
|
export const DEFAULT_VALUES: {
|
|
2592
2651
|
ZERO: number;
|
|
2593
2652
|
MSGS_LIMIT: number;
|
|
2653
|
+
REACTIONS_LIMIT: number;
|
|
2594
2654
|
MSGS_MAX_LIMIT: number;
|
|
2595
2655
|
USERS_LIMIT: number;
|
|
2596
2656
|
USERS_MAX_LIMIT: number;
|
|
@@ -2605,6 +2665,7 @@ export const DEFAULT_VALUES: {
|
|
|
2605
2665
|
REGION_DEFAULT_US: string;
|
|
2606
2666
|
REGION_DEFAULT_IN: string;
|
|
2607
2667
|
REGION_DEFAULT_PRIVATE: string;
|
|
2668
|
+
REACTIONS_MAX_LIMIT: number;
|
|
2608
2669
|
};
|
|
2609
2670
|
export const CALLING_COMPONENT_VERSION = 5;
|
|
2610
2671
|
export enum GroupType {
|
|
@@ -2672,6 +2733,8 @@ export const ResponseConstants: {
|
|
|
2672
2733
|
KEY_DATA: string;
|
|
2673
2734
|
KEY_META: string;
|
|
2674
2735
|
KEY_CURSOR: string;
|
|
2736
|
+
KEY_NEXT: string;
|
|
2737
|
+
KEY_PREVIOUS: string;
|
|
2675
2738
|
KEY_ACTION: string;
|
|
2676
2739
|
KEY_MESSAGE: string;
|
|
2677
2740
|
KEY_ERROR: string;
|
|
@@ -2683,6 +2746,7 @@ export const ResponseConstants: {
|
|
|
2683
2746
|
KEY_IDENTITY: string;
|
|
2684
2747
|
KEY_SERVICE: string;
|
|
2685
2748
|
KEY_ENTITIES: string;
|
|
2749
|
+
KEY_REACTIONS: string;
|
|
2686
2750
|
KEY_ENTITITY: string;
|
|
2687
2751
|
KEY_ENTITYTYPE: string;
|
|
2688
2752
|
KEY_ATTACHMENTS: string;
|
|
@@ -2824,7 +2888,6 @@ export const MessageConstatnts: {
|
|
|
2824
2888
|
HIDE_DELETED_MESSAGES: string;
|
|
2825
2889
|
WITH_TAGS: string;
|
|
2826
2890
|
TAGS: string;
|
|
2827
|
-
MY_MENTIONS_ONLY: string;
|
|
2828
2891
|
MENTIONS_WITH_TAG_INFO: string;
|
|
2829
2892
|
MENTIONS_WITH_BLOCKED_INFO: string;
|
|
2830
2893
|
ONLY_INTERACTION_GOAL_COMPLETED: string;
|
|
@@ -3540,6 +3603,10 @@ export const CONNECTION_STATUS: {
|
|
|
3540
3603
|
export const SESSION_STORE: {
|
|
3541
3604
|
SESSION_ID: string;
|
|
3542
3605
|
};
|
|
3606
|
+
export enum REACTION_ACTION {
|
|
3607
|
+
REACTION_ADDED = "message_reaction_added",
|
|
3608
|
+
REACTION_REMOVED = "message_reaction_removed"
|
|
3609
|
+
}
|
|
3543
3610
|
export const API_ERROR_CODES: {
|
|
3544
3611
|
AUTH_ERR_AUTH_TOKEN_NOT_FOUND: string;
|
|
3545
3612
|
};
|
|
@@ -3842,6 +3909,15 @@ export class MessageListener {
|
|
|
3842
3909
|
* This event is triggered when a interaction goal is completd .
|
|
3843
3910
|
*/
|
|
3844
3911
|
onInteractionGoalCompleted?: Function;
|
|
3912
|
+
/**
|
|
3913
|
+
* This event is triggered when a reaction is added.
|
|
3914
|
+
*/
|
|
3915
|
+
onMessageReactionAdded?: Function; /**
|
|
3916
|
+
|
|
3917
|
+
/**
|
|
3918
|
+
* This event is triggered when a reaction is removed.
|
|
3919
|
+
*/
|
|
3920
|
+
onMessageReactionRemoved?: Function;
|
|
3845
3921
|
constructor(...args: any[]);
|
|
3846
3922
|
}
|
|
3847
3923
|
export class CallListener {
|
|
@@ -4383,6 +4459,7 @@ export class Action extends BaseMessage implements Message {
|
|
|
4383
4459
|
TYPE_MESSAGE_DELETED: string;
|
|
4384
4460
|
TYPE_MEMBER_ADDED: string;
|
|
4385
4461
|
};
|
|
4462
|
+
protected data?: any;
|
|
4386
4463
|
protected actionBy: User | Group | BaseMessage;
|
|
4387
4464
|
protected actionFor: User | Group | BaseMessage;
|
|
4388
4465
|
protected actionOn: User | Group | BaseMessage;
|
|
@@ -4872,7 +4949,6 @@ export class MessagesRequestBuilder {
|
|
|
4872
4949
|
/** @private */ tags?: Array<String>;
|
|
4873
4950
|
/** @private */ WithTags?: boolean;
|
|
4874
4951
|
/** @private */ interactionGoalCompletedOnly?: boolean;
|
|
4875
|
-
/** @private */ ListMentionedMessages?: boolean;
|
|
4876
4952
|
/** @private */ mentionsWithUserTags?: boolean;
|
|
4877
4953
|
/** @private */ mentionsWithBlockedRelation?: boolean;
|
|
4878
4954
|
/**
|
|
@@ -4989,12 +5065,6 @@ export class MessagesRequestBuilder {
|
|
|
4989
5065
|
* @returns
|
|
4990
5066
|
*/
|
|
4991
5067
|
withTags(withTags: boolean): this;
|
|
4992
|
-
/**
|
|
4993
|
-
* A method to get the list of message with mentions
|
|
4994
|
-
* @param {boolean} listMentionedMessages
|
|
4995
|
-
* @returns
|
|
4996
|
-
*/
|
|
4997
|
-
myMentionsOnly(listMentionedMessages?: boolean): this;
|
|
4998
5068
|
/**
|
|
4999
5069
|
* A method to include the user tags when getting the list of message with mentions
|
|
5000
5070
|
* @param {boolean} mentionsWithUserTags
|
|
@@ -5073,6 +5143,7 @@ export class TypingIndicator {
|
|
|
5073
5143
|
* @module CustomMessage
|
|
5074
5144
|
*/
|
|
5075
5145
|
export class CustomMessage extends BaseMessage implements Message {
|
|
5146
|
+
protected data?: Object;
|
|
5076
5147
|
constructor(...args: any[]);
|
|
5077
5148
|
/**
|
|
5078
5149
|
* Method to get custom data of the message.
|
|
@@ -5381,6 +5452,7 @@ export class CometChatHelper {
|
|
|
5381
5452
|
* @memberof CometChat
|
|
5382
5453
|
*/
|
|
5383
5454
|
static getConversationFromMessage(message: TextMessage | MediaMessage | CustomMessage | InteractiveMessage | any): Promise<Conversation>;
|
|
5455
|
+
static updateMessageWithReactionInfo(baseMessage: BaseMessage, messageReaction: Reaction, action: REACTION_ACTION): BaseMessage | CometChatException;
|
|
5384
5456
|
}
|
|
5385
5457
|
|
|
5386
5458
|
/**
|
|
@@ -5393,13 +5465,35 @@ export class Conversation {
|
|
|
5393
5465
|
protected lastMessage: TextMessage | MediaMessage | CustomMessage | any;
|
|
5394
5466
|
protected conversationWith: User | Group;
|
|
5395
5467
|
protected unreadMessageCount: number;
|
|
5468
|
+
protected unreadMentionsCount: number;
|
|
5469
|
+
protected lastReadMessageId: string;
|
|
5396
5470
|
protected tags: Array<String>;
|
|
5397
|
-
constructor(conversationId: string, conversationType: string, lastMessage: TextMessage | MediaMessage | CustomMessage | any, conversationWith: User | Group, unreadMessageCount: number, tags: Array<String
|
|
5471
|
+
constructor(conversationId: string, conversationType: string, lastMessage: TextMessage | MediaMessage | CustomMessage | any, conversationWith: User | Group, unreadMessageCount: number, tags: Array<String>, unreadMentionsCount: number | any, lastReadMessageId: string | any);
|
|
5398
5472
|
/**
|
|
5399
5473
|
* Method to set conversation ID of the conversation.
|
|
5400
5474
|
* @param {string} conversationId
|
|
5401
5475
|
*/
|
|
5402
5476
|
setConversationId(conversationId: string): void;
|
|
5477
|
+
/**
|
|
5478
|
+
* Method to get unreadMentionsCount of the conversation.
|
|
5479
|
+
* @returns {number}
|
|
5480
|
+
*/
|
|
5481
|
+
getUnreadMentionsCount(): number;
|
|
5482
|
+
/**
|
|
5483
|
+
* Method to set unreadMentionsCount of the conversation.
|
|
5484
|
+
* @param {number}
|
|
5485
|
+
*/
|
|
5486
|
+
setUnreadMentionsCount(count: number): void;
|
|
5487
|
+
/**
|
|
5488
|
+
* Method to get lastReadMessageId of the conversation.
|
|
5489
|
+
* @returns {string}
|
|
5490
|
+
*/
|
|
5491
|
+
getLastReadMessageId(): string;
|
|
5492
|
+
/**
|
|
5493
|
+
* Method to set lastReadMessageId of the conversation.
|
|
5494
|
+
* @param {string}
|
|
5495
|
+
*/
|
|
5496
|
+
setLastReadMessageId(id: string): void;
|
|
5403
5497
|
/**
|
|
5404
5498
|
* Method to set conversation type of the conversation.
|
|
5405
5499
|
* @param {string} conversationId
|
|
@@ -5965,6 +6059,7 @@ export class MediaDevice {
|
|
|
5965
6059
|
}
|
|
5966
6060
|
|
|
5967
6061
|
export class TransientMessage {
|
|
6062
|
+
protected data: any;
|
|
5968
6063
|
constructor(receiverId: string, receiverType: string, data: any);
|
|
5969
6064
|
/**
|
|
5970
6065
|
* Method to get receiverID of the transient message.
|
|
@@ -6035,7 +6130,7 @@ export class InteractiveMessage extends BaseMessage implements Message {
|
|
|
6035
6130
|
};
|
|
6036
6131
|
private interactiveData;
|
|
6037
6132
|
private interactionGoal;
|
|
6038
|
-
|
|
6133
|
+
protected data?: Object;
|
|
6039
6134
|
private interactions?;
|
|
6040
6135
|
private tags?;
|
|
6041
6136
|
private allowSenderInteraction?;
|
|
@@ -6227,6 +6322,108 @@ export class InteractionReceipt {
|
|
|
6227
6322
|
setInteractions(interactions: Array<Interaction>): void;
|
|
6228
6323
|
}
|
|
6229
6324
|
|
|
6325
|
+
export class ReactionsRequest {
|
|
6326
|
+
constructor(builder?: ReactionsRequestBuilder);
|
|
6327
|
+
/**
|
|
6328
|
+
* Get list of next reactions list based on the parameters specified in ReactionsRequestBuilder class. The Developer need to call this method repeatedly using the same object of ReactionsRequest class to get paginated list of reactions.
|
|
6329
|
+
* @returns {Promise<Reaction[] | []>}
|
|
6330
|
+
*/
|
|
6331
|
+
fetchNext(): Promise<Reaction[] | []>;
|
|
6332
|
+
/**
|
|
6333
|
+
* Get list of previous reactions list based on the parameters specified in ReactionsRequestBuilder class. The Developer need to call this method repeatedly using the same object of ReactionsRequest class to get paginated list of reactions.
|
|
6334
|
+
* @returns {Promise<Reaction[] | []>}
|
|
6335
|
+
*/
|
|
6336
|
+
fetchPrevious(): Promise<Reaction[] | []>;
|
|
6337
|
+
}
|
|
6338
|
+
export class ReactionsRequestBuilder {
|
|
6339
|
+
/** @private */ limit?: number;
|
|
6340
|
+
/** @private */ msgId: number;
|
|
6341
|
+
/** @private */ reaction?: string;
|
|
6342
|
+
/**
|
|
6343
|
+
* A method to set limit for the number of entries returned in a single iteration. A maximum of 20 entries can fetched in a single iteration.
|
|
6344
|
+
* @param {number} limit
|
|
6345
|
+
* @returns
|
|
6346
|
+
*/
|
|
6347
|
+
setLimit(limit: number): this;
|
|
6348
|
+
/**
|
|
6349
|
+
* A method to set message ID for which reactions needed to fetch.
|
|
6350
|
+
* @param {number} id
|
|
6351
|
+
* @returns
|
|
6352
|
+
*/
|
|
6353
|
+
setMessageId(id?: number): this;
|
|
6354
|
+
/**
|
|
6355
|
+
* A method to fetch list of Reaction for a specific reaction.
|
|
6356
|
+
* @returns
|
|
6357
|
+
*/
|
|
6358
|
+
setReaction(reaction: string): this;
|
|
6359
|
+
/**
|
|
6360
|
+
* This method will return an object of the ReactionsRequest class.
|
|
6361
|
+
* @returns {ReactionsRequest}
|
|
6362
|
+
*/
|
|
6363
|
+
build(): ReactionsRequest;
|
|
6364
|
+
}
|
|
6365
|
+
|
|
6366
|
+
export class ReactionCount {
|
|
6367
|
+
constructor(reaction: string, count: number, reactedByMe: boolean);
|
|
6368
|
+
/**
|
|
6369
|
+
* Method to get reacted reaction.
|
|
6370
|
+
* @returns {string}
|
|
6371
|
+
*/
|
|
6372
|
+
getReaction(): string;
|
|
6373
|
+
/**
|
|
6374
|
+
* Method to set reacted reaction.
|
|
6375
|
+
*/
|
|
6376
|
+
setReaction(reaction: string): void;
|
|
6377
|
+
/**
|
|
6378
|
+
* Method to get no of users reacted with a reaction.
|
|
6379
|
+
* @returns {number}
|
|
6380
|
+
*/
|
|
6381
|
+
getCount(): number;
|
|
6382
|
+
/**
|
|
6383
|
+
* Method to set no of users reacted with a reaction.
|
|
6384
|
+
*/
|
|
6385
|
+
setCount(count: number): void;
|
|
6386
|
+
/**
|
|
6387
|
+
* Method to get if loggedIn user reacted with the a reaction.
|
|
6388
|
+
* @returns {boolean}
|
|
6389
|
+
*/
|
|
6390
|
+
getReactedByMe(): boolean;
|
|
6391
|
+
/**
|
|
6392
|
+
* Method to set if loggedIn user reacted with the a reaction.
|
|
6393
|
+
*/
|
|
6394
|
+
setReactedByMe(reactedByMe: boolean): void;
|
|
6395
|
+
}
|
|
6396
|
+
|
|
6397
|
+
export class ReactionEvent {
|
|
6398
|
+
constructor(reaction: Reaction, receiverId: string, receiverType: string, conversationId: string, parentMessageId?: string);
|
|
6399
|
+
getReaction(): Reaction;
|
|
6400
|
+
setReaction(reaction: Reaction): void;
|
|
6401
|
+
getReceiverId(): string;
|
|
6402
|
+
setReceiverId(receiverId: string): void;
|
|
6403
|
+
getReceiverType(): string;
|
|
6404
|
+
setReceiverType(receiverType: string): void;
|
|
6405
|
+
getConversationId(): string;
|
|
6406
|
+
setConversationId(conversationId: string): void;
|
|
6407
|
+
getParentMessageId(): string;
|
|
6408
|
+
setParentMessageId(parentMessageId: string): void;
|
|
6409
|
+
}
|
|
6410
|
+
|
|
6411
|
+
export class Reaction {
|
|
6412
|
+
constructor(reactionId: string, messageId: string, reaction: string, uid: string, reactedAt: number, reactedBy: User);
|
|
6413
|
+
getReactionId(): string;
|
|
6414
|
+
setReactionId(id: string): void;
|
|
6415
|
+
getMessageId(): string;
|
|
6416
|
+
setMessageId(messageId: string): void;
|
|
6417
|
+
getReaction(): string;
|
|
6418
|
+
setReaction(reaction: string): void;
|
|
6419
|
+
getUid(): string;
|
|
6420
|
+
setUid(uid: string): void;
|
|
6421
|
+
getReactedAt(): number;
|
|
6422
|
+
setReactedAt(reactedAt: number): void;
|
|
6423
|
+
getReactedBy(): User;
|
|
6424
|
+
setReactedBy(reactedBy: User): void;
|
|
6425
|
+
}
|
|
6426
|
+
|
|
6230
6427
|
/**
|
|
6231
6428
|
*
|
|
6232
6429
|
*
|