Skip to content

Commit 3567f4d

Browse files
committed
v4.0.4-beta1
1 parent 0a2b7c3 commit 3567f4d

File tree

3 files changed

+86
-78
lines changed

3 files changed

+86
-78
lines changed

CometChat.d.ts

Lines changed: 84 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,6 @@ export class CometChat {
388388
HIDE_DELETED_MESSAGES: string;
389389
WITH_TAGS: string;
390390
TAGS: string;
391-
MY_MENTIONS_ONLY: string;
392391
MENTIONS_WITH_TAG_INFO: string;
393392
MENTIONS_WITH_BLOCKED_INFO: string;
394393
ONLY_INTERACTION_GOAL_COMPLETED: string;
@@ -892,6 +891,7 @@ export class CometChat {
892891
REGION_DEFAULT_US: string;
893892
REGION_DEFAULT_IN: string;
894893
REGION_DEFAULT_PRIVATE: string;
894+
REACTIONS_MAX_LIMIT: number;
895895
};
896896
static DELIVERY_RECEIPTS: {
897897
RECEIVER_ID: string;
@@ -974,14 +974,17 @@ export class CometChat {
974974
static User: typeof User;
975975
static GroupMember: typeof GroupMember;
976976
static Conversation: typeof Conversation;
977+
static ReactionCount: typeof ReactionCount;
978+
static ReactionEvent: typeof ReactionEvent;
979+
static Reaction: typeof Reaction;
977980
static USER_STATUS: {
978981
ONLINE: string;
979982
OFFLINE: string;
980983
};
981984
static MessagesRequest: typeof MessagesRequest;
982985
static MessagesRequestBuilder: typeof MessagesRequestBuilder;
983-
static ReactionRequest: typeof ReactionRequest;
984-
static ReactionRequestBuilder: typeof ReactionRequestBuilder;
986+
static ReactionsRequest: typeof ReactionsRequest;
987+
static ReactionsRequestBuilder: typeof ReactionsRequestBuilder;
985988
static UsersRequest: typeof UsersRequest;
986989
static UsersRequestBuilder: typeof UsersRequestBuilder;
987990
static ConversationsRequest: typeof ConversationsRequest;
@@ -2549,7 +2552,7 @@ export class BaseMessage implements Message {
25492552
setData(value: object): void;
25502553
/**
25512554
* set the array of reactions in message
2552-
* @returns {ReactionCount[]}
2555+
* @param {ReactionCount[]} reactions
25532556
*/
25542557
setReactions(reactions: any): ReactionCount[];
25552558
/**
@@ -2662,6 +2665,7 @@ export const DEFAULT_VALUES: {
26622665
REGION_DEFAULT_US: string;
26632666
REGION_DEFAULT_IN: string;
26642667
REGION_DEFAULT_PRIVATE: string;
2668+
REACTIONS_MAX_LIMIT: number;
26652669
};
26662670
export const CALLING_COMPONENT_VERSION = 5;
26672671
export enum GroupType {
@@ -2884,7 +2888,6 @@ export const MessageConstatnts: {
28842888
HIDE_DELETED_MESSAGES: string;
28852889
WITH_TAGS: string;
28862890
TAGS: string;
2887-
MY_MENTIONS_ONLY: string;
28882891
MENTIONS_WITH_TAG_INFO: string;
28892892
MENTIONS_WITH_BLOCKED_INFO: string;
28902893
ONLY_INTERACTION_GOAL_COMPLETED: string;
@@ -4946,7 +4949,6 @@ export class MessagesRequestBuilder {
49464949
/** @private */ tags?: Array<String>;
49474950
/** @private */ WithTags?: boolean;
49484951
/** @private */ interactionGoalCompletedOnly?: boolean;
4949-
/** @private */ ListMentionedMessages?: boolean;
49504952
/** @private */ mentionsWithUserTags?: boolean;
49514953
/** @private */ mentionsWithBlockedRelation?: boolean;
49524954
/**
@@ -5063,12 +5065,6 @@ export class MessagesRequestBuilder {
50635065
* @returns
50645066
*/
50655067
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;
50725068
/**
50735069
* A method to include the user tags when getting the list of message with mentions
50745070
* @param {boolean} mentionsWithUserTags
@@ -5456,7 +5452,7 @@ export class CometChatHelper {
54565452
* @memberof CometChat
54575453
*/
54585454
static getConversationFromMessage(message: TextMessage | MediaMessage | CustomMessage | InteractiveMessage | any): Promise<Conversation>;
5459-
static updateMessageWithReactionInfo(baseMessage: BaseMessage, messageReaction: MessageReaction, action: REACTION_ACTION): Promise<BaseMessage | null>;
5455+
static updateMessageWithReactionInfo(baseMessage: BaseMessage, messageReaction: Reaction, action: REACTION_ACTION): BaseMessage | CometChatException;
54605456
}
54615457

54625458
/**
@@ -6326,25 +6322,25 @@ export class InteractionReceipt {
63266322
setInteractions(interactions: Array<Interaction>): void;
63276323
}
63286324

6329-
export class ReactionRequest {
6330-
constructor(builder?: ReactionRequestBuilder);
6325+
export class ReactionsRequest {
6326+
constructor(builder?: ReactionsRequestBuilder);
63316327
/**
6332-
* Get list of next reactions list based on the parameters specified in ReactionRequestBuilder class. The Developer need to call this method repeatedly using the same object of ReactionRequest class to get paginated list of reactions.
6333-
* @returns {Promise<MessageReaction[] | []>}
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[] | []>}
63346330
*/
6335-
fetchNext(): Promise<MessageReaction[] | []>;
6331+
fetchNext(): Promise<Reaction[] | []>;
63366332
/**
6337-
* Get list of previous reactions list based on the parameters specified in ReactionRequestBuilder class. The Developer need to call this method repeatedly using the same object of ReactionRequest class to get paginated list of reactions.
6338-
* @returns {Promise<MessageReaction[] | []>}
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[] | []>}
63396335
*/
6340-
fetchPrevious(): Promise<MessageReaction[] | []>;
6336+
fetchPrevious(): Promise<Reaction[] | []>;
63416337
}
6342-
export class ReactionRequestBuilder {
6338+
export class ReactionsRequestBuilder {
63436339
/** @private */ limit?: number;
63446340
/** @private */ msgId: number;
63456341
/** @private */ reaction?: string;
63466342
/**
6347-
* A method to set limit for the number of entries returned in a single iteration. A maximum of 100 entries can fetched in a single iteration.
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.
63486344
* @param {number} limit
63496345
* @returns
63506346
*/
@@ -6356,15 +6352,76 @@ export class ReactionRequestBuilder {
63566352
*/
63576353
setMessageId(id?: number): this;
63586354
/**
6359-
* A method to fetch list of MessageReaction for a specific reaction.
6355+
* A method to fetch list of Reaction for a specific reaction.
63606356
* @returns
63616357
*/
63626358
setReaction(reaction: string): this;
63636359
/**
6364-
* This method will return an object of the ReactionRequest class.
6365-
* @returns {ReactionRequest}
6360+
* This method will return an object of the ReactionsRequest class.
6361+
* @returns {ReactionsRequest}
63666362
*/
6367-
build(): ReactionRequest;
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;
63686425
}
63696426

63706427
/**
@@ -6471,55 +6528,6 @@ export class MessageReceipt {
64716528
setReceiptType(receiptType?: string): void;
64726529
}
64736530

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-
65236531
export class RTCUser {
65246532
constructor(uid: string);
65256533
setUID(uid: string): void;

CometChat.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cometchat/chat-sdk-javascript",
3-
"version": "4.0.3",
3+
"version": "4.0.4-beta1",
44
"description": "A complete chat solution.",
55
"main": "CometChat.js",
66
"scripts": {

0 commit comments

Comments
 (0)