@cometchat/chat-sdk-javascript 4.0.11 → 4.0.13
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 +127 -5
- package/CometChat.js +1 -1
- package/package.json +1 -1
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,12 @@ 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;
|
|
400
|
+
ATTACHMENT_TYPES: string;
|
|
395
401
|
};
|
|
396
402
|
};
|
|
397
403
|
};
|
|
@@ -975,6 +981,7 @@ export class CometChat {
|
|
|
975
981
|
MSG_VER_POST: string;
|
|
976
982
|
};
|
|
977
983
|
static GoalType: typeof GoalType;
|
|
984
|
+
static AttachmentType: typeof AttachmentType;
|
|
978
985
|
static CometChatException: typeof CometChatException;
|
|
979
986
|
static TextMessage: typeof TextMessage;
|
|
980
987
|
static MediaMessage: typeof MediaMessage;
|
|
@@ -988,6 +995,7 @@ export class CometChat {
|
|
|
988
995
|
static InteractionGoal: typeof InteractionGoal;
|
|
989
996
|
static Interaction: typeof Interaction;
|
|
990
997
|
static InteractionReceipt: typeof InteractionReceipt;
|
|
998
|
+
static MessageReceipt: typeof MessageReceipt;
|
|
991
999
|
static Group: typeof Group;
|
|
992
1000
|
static User: typeof User;
|
|
993
1001
|
static GroupMember: typeof GroupMember;
|
|
@@ -1111,7 +1119,6 @@ export class CometChat {
|
|
|
1111
1119
|
PROTECTED: string;
|
|
1112
1120
|
PASSWORD: string;
|
|
1113
1121
|
};
|
|
1114
|
-
static MessageReceipt: typeof MessageReceipt;
|
|
1115
1122
|
/**
|
|
1116
1123
|
* Setter method for CometChat authToken.
|
|
1117
1124
|
* @internal
|
|
@@ -3042,6 +3049,12 @@ export const MessageConstatnts: {
|
|
|
3042
3049
|
MENTIONS_WITH_TAG_INFO: string;
|
|
3043
3050
|
MENTIONS_WITH_BLOCKED_INFO: string;
|
|
3044
3051
|
ONLY_INTERACTION_GOAL_COMPLETED: string;
|
|
3052
|
+
HAS_ATTACHMENTS: string;
|
|
3053
|
+
HAS_LINKS: string;
|
|
3054
|
+
HAS_MENTIONS: string;
|
|
3055
|
+
HAS_REACTIONS: string;
|
|
3056
|
+
MENTIONED_UIDS: string;
|
|
3057
|
+
ATTACHMENT_TYPES: string;
|
|
3045
3058
|
};
|
|
3046
3059
|
};
|
|
3047
3060
|
};
|
|
@@ -3837,6 +3850,12 @@ export const AI_FEATURE_ACCESSIBLE = "features.ai.accessible";
|
|
|
3837
3850
|
export const AI_FEATURE_ENABLED = "features.ai.enabled";
|
|
3838
3851
|
export const AI_SLUG_ACCESSIBLE = "features.ai.%s.accessible";
|
|
3839
3852
|
export const AI_SLUG_ENABLED = "features.ai.%s.enabled";
|
|
3853
|
+
export enum AttachmentType {
|
|
3854
|
+
IMAGE = "image",
|
|
3855
|
+
VIDEO = "video",
|
|
3856
|
+
AUDIO = "audio",
|
|
3857
|
+
FILE = "file"
|
|
3858
|
+
}
|
|
3840
3859
|
|
|
3841
3860
|
/**
|
|
3842
3861
|
*
|
|
@@ -5243,6 +5262,11 @@ export class ConversationsRequest {
|
|
|
5243
5262
|
* @returns {string}
|
|
5244
5263
|
*/
|
|
5245
5264
|
getConversationType(): string;
|
|
5265
|
+
/**
|
|
5266
|
+
* Method to get the search string based on which the conversations will be fetched.
|
|
5267
|
+
* @returns {string}
|
|
5268
|
+
*/
|
|
5269
|
+
getSearchKeyword(): string;
|
|
5246
5270
|
/**
|
|
5247
5271
|
* Checks if the filtering should include both user and group tags.
|
|
5248
5272
|
* @return true if both user and group tags are included. false otherwise.
|
|
@@ -5273,6 +5297,12 @@ export class ConversationsRequest {
|
|
|
5273
5297
|
* @returns {String[]}
|
|
5274
5298
|
*/
|
|
5275
5299
|
getUserTags(): String[];
|
|
5300
|
+
/**
|
|
5301
|
+
* Determines whether only unread conversations should be fetched.
|
|
5302
|
+
*
|
|
5303
|
+
* @returns {boolean}
|
|
5304
|
+
*/
|
|
5305
|
+
getUnread(): boolean;
|
|
5276
5306
|
}
|
|
5277
5307
|
export class ConversationsRequestBuilder {
|
|
5278
5308
|
/** @private */ conversationType: string;
|
|
@@ -5284,6 +5314,8 @@ export class ConversationsRequestBuilder {
|
|
|
5284
5314
|
/** @private */ userTags: Array<String>;
|
|
5285
5315
|
/** @private */ IncludeBlockedUsers: boolean;
|
|
5286
5316
|
/** @private */ WithBlockedInfo: boolean;
|
|
5317
|
+
/** @private */ searchKeyword: string;
|
|
5318
|
+
/** @private */ unreadOnly: boolean;
|
|
5287
5319
|
/**
|
|
5288
5320
|
*
|
|
5289
5321
|
* @param {number} limit
|
|
@@ -5298,6 +5330,14 @@ export class ConversationsRequestBuilder {
|
|
|
5298
5330
|
* @returns
|
|
5299
5331
|
*/
|
|
5300
5332
|
setConversationType(conversationType: string): this;
|
|
5333
|
+
/**
|
|
5334
|
+
*
|
|
5335
|
+
* @param {string} searchKeyword
|
|
5336
|
+
* Method to set the search string based on which the conversations will be fetched.
|
|
5337
|
+
* This string will be searched in the `conversationWith` property.
|
|
5338
|
+
* @returns
|
|
5339
|
+
*/
|
|
5340
|
+
setSearchKeyword(searchKeyword: string): this;
|
|
5301
5341
|
/**
|
|
5302
5342
|
*
|
|
5303
5343
|
* @param {boolean} getUserAndGroupTags
|
|
@@ -5358,6 +5398,12 @@ export class ConversationsRequestBuilder {
|
|
|
5358
5398
|
* @returns
|
|
5359
5399
|
*/
|
|
5360
5400
|
withBlockedInfo(_withBlockedInfo: boolean): this;
|
|
5401
|
+
/**
|
|
5402
|
+
* A method to fetch unread conversations.
|
|
5403
|
+
* @param {boolean} unread
|
|
5404
|
+
* @returns
|
|
5405
|
+
*/
|
|
5406
|
+
setUnread(unread: boolean): this;
|
|
5361
5407
|
/**
|
|
5362
5408
|
* This method will return an object of the ConversationsRequest class.
|
|
5363
5409
|
* @returns {ConversationsRequest}
|
|
@@ -5471,6 +5517,36 @@ export class MessagesRequest {
|
|
|
5471
5517
|
* @return {boolean}
|
|
5472
5518
|
*/
|
|
5473
5519
|
isHideDeletedMessages(): boolean;
|
|
5520
|
+
/**
|
|
5521
|
+
* Gets the flag indicating whether to only fetch messages which have attachments.
|
|
5522
|
+
*
|
|
5523
|
+
* @return {boolean}
|
|
5524
|
+
*/
|
|
5525
|
+
getHasAttachments(): boolean;
|
|
5526
|
+
/**
|
|
5527
|
+
* Method to only fetch messages which have links.
|
|
5528
|
+
*
|
|
5529
|
+
* @return {boolean}
|
|
5530
|
+
*/
|
|
5531
|
+
getHasLinks(): boolean;
|
|
5532
|
+
/**
|
|
5533
|
+
* Method to only fetch messages which have mentions.
|
|
5534
|
+
*
|
|
5535
|
+
* @return {boolean}
|
|
5536
|
+
*/
|
|
5537
|
+
getHasMentions(): boolean;
|
|
5538
|
+
/**
|
|
5539
|
+
* Method to only fetch messages which have reactions.
|
|
5540
|
+
*
|
|
5541
|
+
* @return {boolean}
|
|
5542
|
+
*/
|
|
5543
|
+
getHasReactions(): boolean;
|
|
5544
|
+
/**
|
|
5545
|
+
* Method to only fetch messages which have the given mentioned UIDs.
|
|
5546
|
+
*
|
|
5547
|
+
* @return {String[]}
|
|
5548
|
+
*/
|
|
5549
|
+
getMentionedUIDs(): String[];
|
|
5474
5550
|
/**
|
|
5475
5551
|
* Gets the list of tags for which the messages are to be fetched.
|
|
5476
5552
|
*
|
|
@@ -5501,6 +5577,11 @@ export class MessagesRequest {
|
|
|
5501
5577
|
* @return {boolean}
|
|
5502
5578
|
*/
|
|
5503
5579
|
isInteractionGoalCompletedOnly(): boolean;
|
|
5580
|
+
/**
|
|
5581
|
+
* Returns the list of selected attachment types used for filtering messages.
|
|
5582
|
+
* @return {Array<AttachmentTypes>}
|
|
5583
|
+
*/
|
|
5584
|
+
getAttachmentTypes(): Array<AttachmentType>;
|
|
5504
5585
|
/**
|
|
5505
5586
|
* Get list of next messages based on the parameters specified in MessagesRequestBuilder class. The Developer need to call this method repeatedly using the same object of MessagesRequest class to get paginated list of message.
|
|
5506
5587
|
* @returns {Promise<BaseMessage[] | []>}
|
|
@@ -5536,6 +5617,12 @@ export class MessagesRequestBuilder {
|
|
|
5536
5617
|
/** @private */ interactionGoalCompletedOnly?: boolean;
|
|
5537
5618
|
/** @private */ mentionsWithUserTags?: boolean;
|
|
5538
5619
|
/** @private */ mentionsWithBlockedRelation?: boolean;
|
|
5620
|
+
/** @private */ HasAttachments?: boolean;
|
|
5621
|
+
/** @private */ HasLinks?: boolean;
|
|
5622
|
+
/** @private */ HasMentions?: boolean;
|
|
5623
|
+
/** @private */ HasReactions?: boolean;
|
|
5624
|
+
/** @private */ mentionedUIDs?: Array<String>;
|
|
5625
|
+
/** @private */ attachmentTypes?: Array<AttachmentType>;
|
|
5539
5626
|
/**
|
|
5540
5627
|
* 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
5628
|
* @param {number} limit
|
|
@@ -5638,6 +5725,36 @@ export class MessagesRequestBuilder {
|
|
|
5638
5725
|
* @returns
|
|
5639
5726
|
*/
|
|
5640
5727
|
hideDeletedMessages(hideDeletedMessages: boolean): this;
|
|
5728
|
+
/**
|
|
5729
|
+
* Method to only fetch messages which have attachments.
|
|
5730
|
+
* @param {boolean} hasAttachments
|
|
5731
|
+
* @returns
|
|
5732
|
+
*/
|
|
5733
|
+
hasAttachments(hasAttachments: boolean): this;
|
|
5734
|
+
/**
|
|
5735
|
+
* Method to only fetch messages which have links.
|
|
5736
|
+
* @param {boolean} hasLinks
|
|
5737
|
+
* @returns
|
|
5738
|
+
*/
|
|
5739
|
+
hasLinks(hasLinks: boolean): this;
|
|
5740
|
+
/**
|
|
5741
|
+
* Method to only fetch messages which have mentions.
|
|
5742
|
+
* @param {boolean} hasMentions
|
|
5743
|
+
* @returns
|
|
5744
|
+
*/
|
|
5745
|
+
hasMentions(hasMentions: boolean): this;
|
|
5746
|
+
/**
|
|
5747
|
+
* Method to only fetch messages which have reactions.
|
|
5748
|
+
* @param {boolean} hasReactions
|
|
5749
|
+
* @returns
|
|
5750
|
+
*/
|
|
5751
|
+
hasReactions(hasReactions: boolean): this;
|
|
5752
|
+
/**
|
|
5753
|
+
* Method to only fetch messages which have the given mentioned UIDs.
|
|
5754
|
+
* @param {Array<String>} mentionedUIDs
|
|
5755
|
+
* @returns
|
|
5756
|
+
*/
|
|
5757
|
+
setMentionedUIDs(mentionedUIDs: Array<String>): this;
|
|
5641
5758
|
/**
|
|
5642
5759
|
* A method to set parameter to get the messages belonging to specific tags.
|
|
5643
5760
|
* @param {Array<String>} tags
|
|
@@ -5668,6 +5785,12 @@ export class MessagesRequestBuilder {
|
|
|
5668
5785
|
* @returns
|
|
5669
5786
|
*/
|
|
5670
5787
|
setInteractionGoalCompletedOnly(interactionGoalCompletedOnly?: boolean): this;
|
|
5788
|
+
/**
|
|
5789
|
+
* Filters messages by specific attachment types.
|
|
5790
|
+
* @param {Array<AttachmentTyes>} attachmentTypes
|
|
5791
|
+
* @returns
|
|
5792
|
+
*/
|
|
5793
|
+
setAttachmentTypes(attachmentTypes: Array<AttachmentType>): this;
|
|
5671
5794
|
/**
|
|
5672
5795
|
* This method will return an object of the MessagesRequest class.
|
|
5673
5796
|
* @returns {MessagesRequest}
|
|
@@ -7687,4 +7810,3 @@ export class RTCUser {
|
|
|
7687
7810
|
setResource(resource: string): void;
|
|
7688
7811
|
getResource(): string;
|
|
7689
7812
|
}
|
|
7690
|
-
|