@cometchat/chat-sdk-javascript 4.0.11 → 4.0.12

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 CHANGED
@@ -7,9 +7,9 @@
7
7
  * @param {string} appId appId generted at the time of perchase. unique for each client.
8
8
  * @returns {CometChat}
9
9
  */
10
- export function init(appId: string): CometChat;
11
- export as namespace CometChat;
12
- export as namespace CometChatNotifications;
10
+ export function init(appId: string): CometChat;
11
+ export as namespace CometChat;
12
+ export as namespace CometChatNotifications;
13
13
 
14
14
  export class CometChat {
15
15
  static GroupType: typeof GroupType;
@@ -392,6 +392,11 @@ export class CometChat {
392
392
  MENTIONS_WITH_TAG_INFO: string;
393
393
  MENTIONS_WITH_BLOCKED_INFO: string;
394
394
  ONLY_INTERACTION_GOAL_COMPLETED: string;
395
+ HAS_ATTACHMENTS: string;
396
+ HAS_LINKS: string;
397
+ HAS_MENTIONS: string;
398
+ HAS_REACTIONS: string;
399
+ MENTIONED_UIDS: string;
395
400
  };
396
401
  };
397
402
  };
@@ -988,6 +993,7 @@ export class CometChat {
988
993
  static InteractionGoal: typeof InteractionGoal;
989
994
  static Interaction: typeof Interaction;
990
995
  static InteractionReceipt: typeof InteractionReceipt;
996
+ static MessageReceipt: typeof MessageReceipt;
991
997
  static Group: typeof Group;
992
998
  static User: typeof User;
993
999
  static GroupMember: typeof GroupMember;
@@ -1111,7 +1117,6 @@ export class CometChat {
1111
1117
  PROTECTED: string;
1112
1118
  PASSWORD: string;
1113
1119
  };
1114
- static MessageReceipt: typeof MessageReceipt;
1115
1120
  /**
1116
1121
  * Setter method for CometChat authToken.
1117
1122
  * @internal
@@ -3042,6 +3047,11 @@ export const MessageConstatnts: {
3042
3047
  MENTIONS_WITH_TAG_INFO: string;
3043
3048
  MENTIONS_WITH_BLOCKED_INFO: string;
3044
3049
  ONLY_INTERACTION_GOAL_COMPLETED: string;
3050
+ HAS_ATTACHMENTS: string;
3051
+ HAS_LINKS: string;
3052
+ HAS_MENTIONS: string;
3053
+ HAS_REACTIONS: string;
3054
+ MENTIONED_UIDS: string;
3045
3055
  };
3046
3056
  };
3047
3057
  };
@@ -5243,6 +5253,11 @@ export class ConversationsRequest {
5243
5253
  * @returns {string}
5244
5254
  */
5245
5255
  getConversationType(): string;
5256
+ /**
5257
+ * Method to get the search string based on which the conversations will be fetched.
5258
+ * @returns {string}
5259
+ */
5260
+ getSearchKeyword(): string;
5246
5261
  /**
5247
5262
  * Checks if the filtering should include both user and group tags.
5248
5263
  * @return true if both user and group tags are included. false otherwise.
@@ -5273,6 +5288,12 @@ export class ConversationsRequest {
5273
5288
  * @returns {String[]}
5274
5289
  */
5275
5290
  getUserTags(): String[];
5291
+ /**
5292
+ * Determines whether only unread conversations should be fetched.
5293
+ *
5294
+ * @returns {boolean}
5295
+ */
5296
+ getUnread(): boolean;
5276
5297
  }
5277
5298
  export class ConversationsRequestBuilder {
5278
5299
  /** @private */ conversationType: string;
@@ -5284,6 +5305,8 @@ export class ConversationsRequestBuilder {
5284
5305
  /** @private */ userTags: Array<String>;
5285
5306
  /** @private */ IncludeBlockedUsers: boolean;
5286
5307
  /** @private */ WithBlockedInfo: boolean;
5308
+ /** @private */ searchKeyword: string;
5309
+ /** @private */ unreadOnly: boolean;
5287
5310
  /**
5288
5311
  *
5289
5312
  * @param {number} limit
@@ -5298,6 +5321,14 @@ export class ConversationsRequestBuilder {
5298
5321
  * @returns
5299
5322
  */
5300
5323
  setConversationType(conversationType: string): this;
5324
+ /**
5325
+ *
5326
+ * @param {string} searchKeyword
5327
+ * Method to set the search string based on which the conversations will be fetched.
5328
+ * This string will be searched in the `conversationWith` property.
5329
+ * @returns
5330
+ */
5331
+ setSearchKeyword(searchKeyword: string): this;
5301
5332
  /**
5302
5333
  *
5303
5334
  * @param {boolean} getUserAndGroupTags
@@ -5358,6 +5389,12 @@ export class ConversationsRequestBuilder {
5358
5389
  * @returns
5359
5390
  */
5360
5391
  withBlockedInfo(_withBlockedInfo: boolean): this;
5392
+ /**
5393
+ * A method to fetch unread conversations.
5394
+ * @param {boolean} unread
5395
+ * @returns
5396
+ */
5397
+ setUnread(unread: boolean): this;
5361
5398
  /**
5362
5399
  * This method will return an object of the ConversationsRequest class.
5363
5400
  * @returns {ConversationsRequest}
@@ -5471,6 +5508,36 @@ export class MessagesRequest {
5471
5508
  * @return {boolean}
5472
5509
  */
5473
5510
  isHideDeletedMessages(): boolean;
5511
+ /**
5512
+ * Gets the flag indicating whether to only fetch messages which have attachments.
5513
+ *
5514
+ * @return {boolean}
5515
+ */
5516
+ getHasAttachments(): boolean;
5517
+ /**
5518
+ * Method to only fetch messages which have links.
5519
+ *
5520
+ * @return {boolean}
5521
+ */
5522
+ getHasLinks(): boolean;
5523
+ /**
5524
+ * Method to only fetch messages which have mentions.
5525
+ *
5526
+ * @return {boolean}
5527
+ */
5528
+ getHasMentions(): boolean;
5529
+ /**
5530
+ * Method to only fetch messages which have reactions.
5531
+ *
5532
+ * @return {boolean}
5533
+ */
5534
+ getHasReactions(): boolean;
5535
+ /**
5536
+ * Method to only fetch messages which have the given mentioned UIDs.
5537
+ *
5538
+ * @return {String[]}
5539
+ */
5540
+ getMentionedUIDs(): String[];
5474
5541
  /**
5475
5542
  * Gets the list of tags for which the messages are to be fetched.
5476
5543
  *
@@ -5536,6 +5603,11 @@ export class MessagesRequestBuilder {
5536
5603
  /** @private */ interactionGoalCompletedOnly?: boolean;
5537
5604
  /** @private */ mentionsWithUserTags?: boolean;
5538
5605
  /** @private */ mentionsWithBlockedRelation?: boolean;
5606
+ /** @private */ HasAttachments?: boolean;
5607
+ /** @private */ HasLinks?: boolean;
5608
+ /** @private */ HasMentions?: boolean;
5609
+ /** @private */ HasReactions?: boolean;
5610
+ /** @private */ mentionedUIDs?: Array<String>;
5539
5611
  /**
5540
5612
  * A method to set limit for the number of messages returned in a single iteration. A maximum of 100 messages can fetched in a single iteration.
5541
5613
  * @param {number} limit
@@ -5638,6 +5710,36 @@ export class MessagesRequestBuilder {
5638
5710
  * @returns
5639
5711
  */
5640
5712
  hideDeletedMessages(hideDeletedMessages: boolean): this;
5713
+ /**
5714
+ * Method to only fetch messages which have attachments.
5715
+ * @param {boolean} hasAttachments
5716
+ * @returns
5717
+ */
5718
+ hasAttachments(hasAttachments: boolean): this;
5719
+ /**
5720
+ * Method to only fetch messages which have links.
5721
+ * @param {boolean} hasLinks
5722
+ * @returns
5723
+ */
5724
+ hasLinks(hasLinks: boolean): this;
5725
+ /**
5726
+ * Method to only fetch messages which have mentions.
5727
+ * @param {boolean} hasMentions
5728
+ * @returns
5729
+ */
5730
+ hasMentions(hasMentions: boolean): this;
5731
+ /**
5732
+ * Method to only fetch messages which have reactions.
5733
+ * @param {boolean} hasReactions
5734
+ * @returns
5735
+ */
5736
+ hasReactions(hasReactions: boolean): this;
5737
+ /**
5738
+ * Method to only fetch messages which have the given mentioned UIDs.
5739
+ * @param {Array<String>} mentionedUIDs
5740
+ * @returns
5741
+ */
5742
+ setMentionedUIDs(mentionedUIDs: Array<String>): this;
5641
5743
  /**
5642
5744
  * A method to set parameter to get the messages belonging to specific tags.
5643
5745
  * @param {Array<String>} tags
@@ -7687,4 +7789,3 @@ export class RTCUser {
7687
7789
  setResource(resource: string): void;
7688
7790
  getResource(): string;
7689
7791
  }
7690
-