Skip to content

Commit 1f93533

Browse files
committed
v4.0.4-beta1
1 parent ed02daa commit 1f93533

File tree

3 files changed

+42
-60
lines changed

3 files changed

+42
-60
lines changed

CometChat.d.ts

Lines changed: 40 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1438,7 +1438,7 @@ export class BaseMessage implements Message {
14381438
setData(value: object): void;
14391439
/**
14401440
* set the array of reactions in message
1441-
* @returns {ReactionCount[]}
1441+
* @param {ReactionCount[]} reactions
14421442
*/
14431443
setReactions(reactions: any): ReactionCount[];
14441444
/**
@@ -1460,7 +1460,7 @@ export class TextMessage extends BaseMessage implements Message {
14601460
};
14611461
/** @private */ static readonly CATEGORY: string;
14621462
private text?;
1463-
protected data?;
1463+
protected data?: any;
14641464
private processedText?;
14651465
private tags?;
14661466
/**
@@ -1550,6 +1550,7 @@ export const DEFAULT_VALUES: {
15501550
REGION_DEFAULT_US: string;
15511551
REGION_DEFAULT_IN: string;
15521552
REGION_DEFAULT_PRIVATE: string;
1553+
REACTIONS_MAX_LIMIT: number;
15531554
};
15541555
export enum GroupType {
15551556
Public = "public",
@@ -1770,7 +1771,6 @@ export const MessageConstatnts: {
17701771
TYPES: string;
17711772
HIDE_REPLIES: string;
17721773
HIDE_DELETED_MESSAGES: string;
1773-
MY_MENTIONS_ONLY: string;
17741774
MENTIONS_WITH_TAG_INFO: string;
17751775
MENTIONS_WITH_BLOCKED_INFO: string;
17761776
ONLY_INTERACTION_GOAL_COMPLETED: string;
@@ -3610,7 +3610,6 @@ export class MessagesRequestBuilder {
36103610
/** @private */ tags?: Array<String>;
36113611
/** @private */ WithTags?: boolean;
36123612
/** @private */ interactionGoalCompletedOnly?: boolean;
3613-
/** @private */ ListMentionedMessages?: boolean;
36143613
/** @private */ mentionsWithUserTags?: boolean;
36153614
/** @private */ mentionsWithBlockedRelation?: boolean;
36163615
/**
@@ -3727,12 +3726,6 @@ export class MessagesRequestBuilder {
37273726
* @returns
37283727
*/
37293728
withTags(withTags: boolean): this;
3730-
/**
3731-
* A method to get the list of message with mentions
3732-
* @param {boolean} listMentionedMessages
3733-
* @returns
3734-
*/
3735-
myMentionsOnly(listMentionedMessages?: boolean): this;
37363729
/**
37373730
* A method to include the user tags when getting the list of message with mentions
37383731
* @param {boolean} mentionsWithUserTags
@@ -3750,30 +3743,6 @@ export class MessagesRequestBuilder {
37503743
* @param {boolean} interactionGoalCompletedOnly
37513744
* @returns
37523745
*/
3753-
setInteractionGoalCompletedOnly(interactionGoalCompletedOnly?: boolean): this;
3754-
/**
3755-
* A method to get the list of message with mentions
3756-
* @param {boolean} listMentionedMessages
3757-
* @returns
3758-
*/
3759-
myMentionsOnly(listMentionedMessages?: boolean): this;
3760-
/**
3761-
* A method to include the user tags when getting the list of message with mentions
3762-
* @param {boolean} mentionsWithUserTags
3763-
* @returns
3764-
*/
3765-
mentionsWithTagInfo(mentionsWithUserTags?: boolean): this;
3766-
/**
3767-
* A method to include the blocked relation when getting the list of message with mentions
3768-
* @param {boolean} mentionsWithBlockedRelation
3769-
* @returns
3770-
*/
3771-
mentionsWithBlockedInfo(mentionsWithBlockedRelation?: boolean): this;
3772-
/**
3773-
* A method to get only interacted messages.
3774-
* @param {boolean} interactionGoalCompletedOnly
3775-
* @returns
3776-
*/
37773746
setInteractionGoalCompletedOnly(interactionGoalCompletedOnly?: boolean): this;
37783747
/**
37793748
* This method will return an object of the MessagesRequest class.
@@ -3837,7 +3806,7 @@ export class TypingIndicator {
38373806
export class CustomMessage extends BaseMessage implements Message {
38383807
private customData;
38393808
private subType;
3840-
protected data?;
3809+
protected data?: any;
38413810
private tags?;
38423811
constructor(...args: any[]);
38433812
/**
@@ -4146,7 +4115,7 @@ export class CometChatHelper {
41464115
* @memberof CometChat
41474116
*/
41484117
static getConversationFromMessage(message: TextMessage | MediaMessage | CustomMessage | InteractiveMessage | any): Promise<Conversation>;
4149-
static updateMessageWithReactionInfo(baseMessage: BaseMessage, messageReaction: MessageReaction, action: REACTION_ACTION): Promise<BaseMessage | null>;
4118+
static updateMessageWithReactionInfo(baseMessage: BaseMessage, messageReaction: Reaction, action: REACTION_ACTION): BaseMessage | CometChatException;
41504119
}
41514120

41524121
/**
@@ -4837,9 +4806,7 @@ export class MessageReceipt {
48374806
}
48384807

48394808
export class ReactionCount {
4840-
reaction: string;
4841-
count: number;
4842-
reactedByMe?: boolean;
4809+
constructor(reaction: string, count: number, reactedByMe: boolean);
48434810
/**
48444811
* Method to get reacted reaction.
48454812
* @returns {string}
@@ -4868,12 +4835,27 @@ export class ReactionCount {
48684835
*/
48694836
setReactedByMe(reactedByMe: boolean): void;
48704837
}
4871-
export class MessageReaction {
4872-
constructor(object: any);
4838+
4839+
export class ReactionEvent {
4840+
constructor(reaction: Reaction, receiverId: string, receiverType: string, conversationId: string, parentMessageId?: string);
4841+
getReaction(): Reaction;
4842+
setReaction(reaction: Reaction): void;
4843+
getReceiverId(): string;
4844+
setReceiverId(receiverId: string): void;
4845+
getReceiverType(): string;
4846+
setReceiverType(receiverType: string): void;
4847+
getConversationId(): string;
4848+
setConversationId(conversationId: string): void;
4849+
getParentMessageId(): string;
4850+
setParentMessageId(parentMessageId: string): void;
4851+
}
4852+
4853+
export class Reaction {
4854+
constructor(reactionId: string, messageId: string, reaction: string, uid: string, reactedAt: number, reactedBy: User);
48734855
getReactionId(): string;
48744856
setReactionId(id: string): void;
4875-
getMessageId(): number | string;
4876-
setMessageId(messageId: number | string): void;
4857+
getMessageId(): string;
4858+
setMessageId(messageId: string): void;
48774859
getReaction(): string;
48784860
setReaction(reaction: string): void;
48794861
getUid(): string;
@@ -4925,7 +4907,7 @@ export class InteractiveMessage extends BaseMessage implements Message {
49254907
};
49264908
private interactiveData;
49274909
private interactionGoal;
4928-
protected data?;
4910+
protected data?: any;
49294911
private interactions?;
49304912
private tags?;
49314913
private allowSenderInteraction?;
@@ -5117,25 +5099,25 @@ export class InteractionReceipt {
51175099
setInteractions(interactions: Array<Interaction>): void;
51185100
}
51195101

5120-
export class ReactionRequest {
5121-
constructor(builder?: ReactionRequestBuilder);
5102+
export class ReactionsRequest {
5103+
constructor(builder?: ReactionsRequestBuilder);
51225104
/**
5123-
* 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.
5124-
* @returns {Promise<MessageReaction[] | []>}
5105+
* 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.
5106+
* @returns {Promise<Reaction[] | []>}
51255107
*/
5126-
fetchNext(): Promise<MessageReaction[] | []>;
5108+
fetchNext(): Promise<Reaction[] | []>;
51275109
/**
5128-
* 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.
5129-
* @returns {Promise<MessageReaction[] | []>}
5110+
* 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.
5111+
* @returns {Promise<Reaction[] | []>}
51305112
*/
5131-
fetchPrevious(): Promise<MessageReaction[] | []>;
5113+
fetchPrevious(): Promise<Reaction[] | []>;
51325114
}
5133-
export class ReactionRequestBuilder {
5115+
export class ReactionsRequestBuilder {
51345116
/** @private */ limit?: number;
51355117
/** @private */ msgId: number;
51365118
/** @private */ reaction?: string;
51375119
/**
5138-
* 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.
5120+
* 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.
51395121
* @param {number} limit
51405122
* @returns
51415123
*/
@@ -5147,15 +5129,15 @@ export class ReactionRequestBuilder {
51475129
*/
51485130
setMessageId(id?: number): this;
51495131
/**
5150-
* A method to fetch list of MessageReaction for a specific reaction.
5132+
* A method to fetch list of Reaction for a specific reaction.
51515133
* @returns
51525134
*/
51535135
setReaction(reaction: string): this;
51545136
/**
5155-
* This method will return an object of the ReactionRequest class.
5156-
* @returns {ReactionRequest}
5137+
* This method will return an object of the ReactionsRequest class.
5138+
* @returns {ReactionsRequest}
51575139
*/
5158-
build(): ReactionRequest;
5140+
build(): ReactionsRequest;
51595141
}
51605142

51615143
}

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-ionic",
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)