@cometchat/chat-sdk-javascript 4.0.3 → 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 +84 -76
- package/CometChat.js +1 -1
- package/package.json +1 -1
package/CometChat.d.ts
CHANGED
|
@@ -388,7 +388,6 @@ export class CometChat {
|
|
|
388
388
|
HIDE_DELETED_MESSAGES: string;
|
|
389
389
|
WITH_TAGS: string;
|
|
390
390
|
TAGS: string;
|
|
391
|
-
MY_MENTIONS_ONLY: string;
|
|
392
391
|
MENTIONS_WITH_TAG_INFO: string;
|
|
393
392
|
MENTIONS_WITH_BLOCKED_INFO: string;
|
|
394
393
|
ONLY_INTERACTION_GOAL_COMPLETED: string;
|
|
@@ -892,6 +891,7 @@ export class CometChat {
|
|
|
892
891
|
REGION_DEFAULT_US: string;
|
|
893
892
|
REGION_DEFAULT_IN: string;
|
|
894
893
|
REGION_DEFAULT_PRIVATE: string;
|
|
894
|
+
REACTIONS_MAX_LIMIT: number;
|
|
895
895
|
};
|
|
896
896
|
static DELIVERY_RECEIPTS: {
|
|
897
897
|
RECEIVER_ID: string;
|
|
@@ -974,14 +974,17 @@ export class CometChat {
|
|
|
974
974
|
static User: typeof User;
|
|
975
975
|
static GroupMember: typeof GroupMember;
|
|
976
976
|
static Conversation: typeof Conversation;
|
|
977
|
+
static ReactionCount: typeof ReactionCount;
|
|
978
|
+
static ReactionEvent: typeof ReactionEvent;
|
|
979
|
+
static Reaction: typeof Reaction;
|
|
977
980
|
static USER_STATUS: {
|
|
978
981
|
ONLINE: string;
|
|
979
982
|
OFFLINE: string;
|
|
980
983
|
};
|
|
981
984
|
static MessagesRequest: typeof MessagesRequest;
|
|
982
985
|
static MessagesRequestBuilder: typeof MessagesRequestBuilder;
|
|
983
|
-
static
|
|
984
|
-
static
|
|
986
|
+
static ReactionsRequest: typeof ReactionsRequest;
|
|
987
|
+
static ReactionsRequestBuilder: typeof ReactionsRequestBuilder;
|
|
985
988
|
static UsersRequest: typeof UsersRequest;
|
|
986
989
|
static UsersRequestBuilder: typeof UsersRequestBuilder;
|
|
987
990
|
static ConversationsRequest: typeof ConversationsRequest;
|
|
@@ -2549,7 +2552,7 @@ export class BaseMessage implements Message {
|
|
|
2549
2552
|
setData(value: object): void;
|
|
2550
2553
|
/**
|
|
2551
2554
|
* set the array of reactions in message
|
|
2552
|
-
* @
|
|
2555
|
+
* @param {ReactionCount[]} reactions
|
|
2553
2556
|
*/
|
|
2554
2557
|
setReactions(reactions: any): ReactionCount[];
|
|
2555
2558
|
/**
|
|
@@ -2662,6 +2665,7 @@ export const DEFAULT_VALUES: {
|
|
|
2662
2665
|
REGION_DEFAULT_US: string;
|
|
2663
2666
|
REGION_DEFAULT_IN: string;
|
|
2664
2667
|
REGION_DEFAULT_PRIVATE: string;
|
|
2668
|
+
REACTIONS_MAX_LIMIT: number;
|
|
2665
2669
|
};
|
|
2666
2670
|
export const CALLING_COMPONENT_VERSION = 5;
|
|
2667
2671
|
export enum GroupType {
|
|
@@ -2884,7 +2888,6 @@ export const MessageConstatnts: {
|
|
|
2884
2888
|
HIDE_DELETED_MESSAGES: string;
|
|
2885
2889
|
WITH_TAGS: string;
|
|
2886
2890
|
TAGS: string;
|
|
2887
|
-
MY_MENTIONS_ONLY: string;
|
|
2888
2891
|
MENTIONS_WITH_TAG_INFO: string;
|
|
2889
2892
|
MENTIONS_WITH_BLOCKED_INFO: string;
|
|
2890
2893
|
ONLY_INTERACTION_GOAL_COMPLETED: string;
|
|
@@ -4946,7 +4949,6 @@ export class MessagesRequestBuilder {
|
|
|
4946
4949
|
/** @private */ tags?: Array<String>;
|
|
4947
4950
|
/** @private */ WithTags?: boolean;
|
|
4948
4951
|
/** @private */ interactionGoalCompletedOnly?: boolean;
|
|
4949
|
-
/** @private */ ListMentionedMessages?: boolean;
|
|
4950
4952
|
/** @private */ mentionsWithUserTags?: boolean;
|
|
4951
4953
|
/** @private */ mentionsWithBlockedRelation?: boolean;
|
|
4952
4954
|
/**
|
|
@@ -5063,12 +5065,6 @@ export class MessagesRequestBuilder {
|
|
|
5063
5065
|
* @returns
|
|
5064
5066
|
*/
|
|
5065
5067
|
withTags(withTags: boolean): this;
|
|
5066
|
-
/**
|
|
5067
|
-
* A method to get the list of message with mentions
|
|
5068
|
-
* @param {boolean} listMentionedMessages
|
|
5069
|
-
* @returns
|
|
5070
|
-
*/
|
|
5071
|
-
myMentionsOnly(listMentionedMessages?: boolean): this;
|
|
5072
5068
|
/**
|
|
5073
5069
|
* A method to include the user tags when getting the list of message with mentions
|
|
5074
5070
|
* @param {boolean} mentionsWithUserTags
|
|
@@ -5456,7 +5452,7 @@ export class CometChatHelper {
|
|
|
5456
5452
|
* @memberof CometChat
|
|
5457
5453
|
*/
|
|
5458
5454
|
static getConversationFromMessage(message: TextMessage | MediaMessage | CustomMessage | InteractiveMessage | any): Promise<Conversation>;
|
|
5459
|
-
static updateMessageWithReactionInfo(baseMessage: BaseMessage, messageReaction:
|
|
5455
|
+
static updateMessageWithReactionInfo(baseMessage: BaseMessage, messageReaction: Reaction, action: REACTION_ACTION): BaseMessage | CometChatException;
|
|
5460
5456
|
}
|
|
5461
5457
|
|
|
5462
5458
|
/**
|
|
@@ -6326,25 +6322,25 @@ export class InteractionReceipt {
|
|
|
6326
6322
|
setInteractions(interactions: Array<Interaction>): void;
|
|
6327
6323
|
}
|
|
6328
6324
|
|
|
6329
|
-
export class
|
|
6330
|
-
constructor(builder?:
|
|
6325
|
+
export class ReactionsRequest {
|
|
6326
|
+
constructor(builder?: ReactionsRequestBuilder);
|
|
6331
6327
|
/**
|
|
6332
|
-
* Get list of next reactions list based on the parameters specified in
|
|
6333
|
-
* @returns {Promise<
|
|
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[] | []>}
|
|
6334
6330
|
*/
|
|
6335
|
-
fetchNext(): Promise<
|
|
6331
|
+
fetchNext(): Promise<Reaction[] | []>;
|
|
6336
6332
|
/**
|
|
6337
|
-
* Get list of previous reactions list based on the parameters specified in
|
|
6338
|
-
* @returns {Promise<
|
|
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[] | []>}
|
|
6339
6335
|
*/
|
|
6340
|
-
fetchPrevious(): Promise<
|
|
6336
|
+
fetchPrevious(): Promise<Reaction[] | []>;
|
|
6341
6337
|
}
|
|
6342
|
-
export class
|
|
6338
|
+
export class ReactionsRequestBuilder {
|
|
6343
6339
|
/** @private */ limit?: number;
|
|
6344
6340
|
/** @private */ msgId: number;
|
|
6345
6341
|
/** @private */ reaction?: string;
|
|
6346
6342
|
/**
|
|
6347
|
-
* A method to set limit for the number of entries returned in a single iteration. A maximum of
|
|
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.
|
|
6348
6344
|
* @param {number} limit
|
|
6349
6345
|
* @returns
|
|
6350
6346
|
*/
|
|
@@ -6356,15 +6352,76 @@ export class ReactionRequestBuilder {
|
|
|
6356
6352
|
*/
|
|
6357
6353
|
setMessageId(id?: number): this;
|
|
6358
6354
|
/**
|
|
6359
|
-
* A method to fetch list of
|
|
6355
|
+
* A method to fetch list of Reaction for a specific reaction.
|
|
6360
6356
|
* @returns
|
|
6361
6357
|
*/
|
|
6362
6358
|
setReaction(reaction: string): this;
|
|
6363
6359
|
/**
|
|
6364
|
-
* This method will return an object of the
|
|
6365
|
-
* @returns {
|
|
6360
|
+
* This method will return an object of the ReactionsRequest class.
|
|
6361
|
+
* @returns {ReactionsRequest}
|
|
6366
6362
|
*/
|
|
6367
|
-
build():
|
|
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;
|
|
6368
6425
|
}
|
|
6369
6426
|
|
|
6370
6427
|
/**
|
|
@@ -6471,55 +6528,6 @@ export class MessageReceipt {
|
|
|
6471
6528
|
setReceiptType(receiptType?: string): void;
|
|
6472
6529
|
}
|
|
6473
6530
|
|
|
6474
|
-
export class ReactionCount {
|
|
6475
|
-
reaction: string;
|
|
6476
|
-
count: number;
|
|
6477
|
-
reactedByMe?: boolean;
|
|
6478
|
-
constructor(object: any);
|
|
6479
|
-
/**
|
|
6480
|
-
* Method to get reacted reaction.
|
|
6481
|
-
* @returns {string}
|
|
6482
|
-
*/
|
|
6483
|
-
getReaction(): string;
|
|
6484
|
-
/**
|
|
6485
|
-
* Method to set reacted reaction.
|
|
6486
|
-
*/
|
|
6487
|
-
setReaction(reaction: string): void;
|
|
6488
|
-
/**
|
|
6489
|
-
* Method to get no of users reacted with a reaction.
|
|
6490
|
-
* @returns {number}
|
|
6491
|
-
*/
|
|
6492
|
-
getCount(): number;
|
|
6493
|
-
/**
|
|
6494
|
-
* Method to set no of users reacted with a reaction.
|
|
6495
|
-
*/
|
|
6496
|
-
setCount(count: number): void;
|
|
6497
|
-
/**
|
|
6498
|
-
* Method to get if loggedIn user reacted with the a reaction.
|
|
6499
|
-
* @returns {boolean}
|
|
6500
|
-
*/
|
|
6501
|
-
getReactedByMe(): boolean;
|
|
6502
|
-
/**
|
|
6503
|
-
* Method to set if loggedIn user reacted with the a reaction.
|
|
6504
|
-
*/
|
|
6505
|
-
setReactedByMe(reactedByMe: boolean): void;
|
|
6506
|
-
}
|
|
6507
|
-
export class MessageReaction {
|
|
6508
|
-
constructor(object: any);
|
|
6509
|
-
getReactionId(): string;
|
|
6510
|
-
setReactionId(id: string): void;
|
|
6511
|
-
getMessageId(): number | string;
|
|
6512
|
-
setMessageId(messageId: number | string): void;
|
|
6513
|
-
getReaction(): string;
|
|
6514
|
-
setReaction(reaction: string): void;
|
|
6515
|
-
getUid(): string;
|
|
6516
|
-
setUid(uid: string): void;
|
|
6517
|
-
getReactedAt(): number;
|
|
6518
|
-
setReactedAt(reactedAt: number): void;
|
|
6519
|
-
getReactedBy(): User;
|
|
6520
|
-
setReactedBy(reactedBy: User): void;
|
|
6521
|
-
}
|
|
6522
|
-
|
|
6523
6531
|
export class RTCUser {
|
|
6524
6532
|
constructor(uid: string);
|
|
6525
6533
|
setUID(uid: string): void;
|