@cometchat/chat-sdk-javascript 4.0.10 → 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 +223 -97
- 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,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
|
};
|
|
@@ -483,6 +488,9 @@ export class CometChat {
|
|
|
483
488
|
ENDED: string;
|
|
484
489
|
};
|
|
485
490
|
};
|
|
491
|
+
/**
|
|
492
|
+
* @deprecated Use `PresenceConstants` instead.
|
|
493
|
+
*/
|
|
486
494
|
static PresenceConstatnts: {
|
|
487
495
|
STATUS: {
|
|
488
496
|
ONLINE: string;
|
|
@@ -492,6 +500,15 @@ export class CometChat {
|
|
|
492
500
|
LEFT: string;
|
|
493
501
|
};
|
|
494
502
|
};
|
|
503
|
+
static PresenceConstants: {
|
|
504
|
+
STATUS: {
|
|
505
|
+
ONLINE: string;
|
|
506
|
+
AVAILABLE: string;
|
|
507
|
+
OFFLINE: string;
|
|
508
|
+
JOINED: string;
|
|
509
|
+
LEFT: string;
|
|
510
|
+
};
|
|
511
|
+
};
|
|
495
512
|
static APPINFO: {
|
|
496
513
|
platform: string;
|
|
497
514
|
sdkVersion: string;
|
|
@@ -976,6 +993,7 @@ export class CometChat {
|
|
|
976
993
|
static InteractionGoal: typeof InteractionGoal;
|
|
977
994
|
static Interaction: typeof Interaction;
|
|
978
995
|
static InteractionReceipt: typeof InteractionReceipt;
|
|
996
|
+
static MessageReceipt: typeof MessageReceipt;
|
|
979
997
|
static Group: typeof Group;
|
|
980
998
|
static User: typeof User;
|
|
981
999
|
static GroupMember: typeof GroupMember;
|
|
@@ -3029,6 +3047,11 @@ export const MessageConstatnts: {
|
|
|
3029
3047
|
MENTIONS_WITH_TAG_INFO: string;
|
|
3030
3048
|
MENTIONS_WITH_BLOCKED_INFO: string;
|
|
3031
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;
|
|
3032
3055
|
};
|
|
3033
3056
|
};
|
|
3034
3057
|
};
|
|
@@ -3662,6 +3685,9 @@ export const FeatureRestrictionErrors: {
|
|
|
3662
3685
|
details: {};
|
|
3663
3686
|
};
|
|
3664
3687
|
};
|
|
3688
|
+
/**
|
|
3689
|
+
* @deprecated Use `PresenceConstants` instead.
|
|
3690
|
+
*/
|
|
3665
3691
|
export const PresenceConstatnts: {
|
|
3666
3692
|
STATUS: {
|
|
3667
3693
|
ONLINE: string;
|
|
@@ -3671,6 +3697,15 @@ export const PresenceConstatnts: {
|
|
|
3671
3697
|
LEFT: string;
|
|
3672
3698
|
};
|
|
3673
3699
|
};
|
|
3700
|
+
export const PresenceConstants: {
|
|
3701
|
+
STATUS: {
|
|
3702
|
+
ONLINE: string;
|
|
3703
|
+
AVAILABLE: string;
|
|
3704
|
+
OFFLINE: string;
|
|
3705
|
+
JOINED: string;
|
|
3706
|
+
LEFT: string;
|
|
3707
|
+
};
|
|
3708
|
+
};
|
|
3674
3709
|
export const APP_SETTINGS: {
|
|
3675
3710
|
APP_SETTINGS: string;
|
|
3676
3711
|
KEYS: {
|
|
@@ -5218,6 +5253,11 @@ export class ConversationsRequest {
|
|
|
5218
5253
|
* @returns {string}
|
|
5219
5254
|
*/
|
|
5220
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;
|
|
5221
5261
|
/**
|
|
5222
5262
|
* Checks if the filtering should include both user and group tags.
|
|
5223
5263
|
* @return true if both user and group tags are included. false otherwise.
|
|
@@ -5248,6 +5288,12 @@ export class ConversationsRequest {
|
|
|
5248
5288
|
* @returns {String[]}
|
|
5249
5289
|
*/
|
|
5250
5290
|
getUserTags(): String[];
|
|
5291
|
+
/**
|
|
5292
|
+
* Determines whether only unread conversations should be fetched.
|
|
5293
|
+
*
|
|
5294
|
+
* @returns {boolean}
|
|
5295
|
+
*/
|
|
5296
|
+
getUnread(): boolean;
|
|
5251
5297
|
}
|
|
5252
5298
|
export class ConversationsRequestBuilder {
|
|
5253
5299
|
/** @private */ conversationType: string;
|
|
@@ -5259,6 +5305,8 @@ export class ConversationsRequestBuilder {
|
|
|
5259
5305
|
/** @private */ userTags: Array<String>;
|
|
5260
5306
|
/** @private */ IncludeBlockedUsers: boolean;
|
|
5261
5307
|
/** @private */ WithBlockedInfo: boolean;
|
|
5308
|
+
/** @private */ searchKeyword: string;
|
|
5309
|
+
/** @private */ unreadOnly: boolean;
|
|
5262
5310
|
/**
|
|
5263
5311
|
*
|
|
5264
5312
|
* @param {number} limit
|
|
@@ -5273,6 +5321,14 @@ export class ConversationsRequestBuilder {
|
|
|
5273
5321
|
* @returns
|
|
5274
5322
|
*/
|
|
5275
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;
|
|
5276
5332
|
/**
|
|
5277
5333
|
*
|
|
5278
5334
|
* @param {boolean} getUserAndGroupTags
|
|
@@ -5333,6 +5389,12 @@ export class ConversationsRequestBuilder {
|
|
|
5333
5389
|
* @returns
|
|
5334
5390
|
*/
|
|
5335
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;
|
|
5336
5398
|
/**
|
|
5337
5399
|
* This method will return an object of the ConversationsRequest class.
|
|
5338
5400
|
* @returns {ConversationsRequest}
|
|
@@ -5446,6 +5508,36 @@ export class MessagesRequest {
|
|
|
5446
5508
|
* @return {boolean}
|
|
5447
5509
|
*/
|
|
5448
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[];
|
|
5449
5541
|
/**
|
|
5450
5542
|
* Gets the list of tags for which the messages are to be fetched.
|
|
5451
5543
|
*
|
|
@@ -5511,6 +5603,11 @@ export class MessagesRequestBuilder {
|
|
|
5511
5603
|
/** @private */ interactionGoalCompletedOnly?: boolean;
|
|
5512
5604
|
/** @private */ mentionsWithUserTags?: boolean;
|
|
5513
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>;
|
|
5514
5611
|
/**
|
|
5515
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.
|
|
5516
5613
|
* @param {number} limit
|
|
@@ -5613,6 +5710,36 @@ export class MessagesRequestBuilder {
|
|
|
5613
5710
|
* @returns
|
|
5614
5711
|
*/
|
|
5615
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;
|
|
5616
5743
|
/**
|
|
5617
5744
|
* A method to set parameter to get the messages belonging to specific tags.
|
|
5618
5745
|
* @param {Array<String>} tags
|
|
@@ -7070,6 +7197,99 @@ export class ConversationUpdateSettings {
|
|
|
7070
7197
|
static fromJSON(jsonData: Object): ConversationUpdateSettings;
|
|
7071
7198
|
}
|
|
7072
7199
|
|
|
7200
|
+
/**
|
|
7201
|
+
*
|
|
7202
|
+
* @module MessageReceipt
|
|
7203
|
+
*/
|
|
7204
|
+
export class MessageReceipt {
|
|
7205
|
+
RECEIPT_TYPE: {
|
|
7206
|
+
READ_RECEIPT: string;
|
|
7207
|
+
DELIVERY_RECEIPT: string;
|
|
7208
|
+
READ_BY_ALL_RECEIPT: string;
|
|
7209
|
+
DELIVERED_TO_ALL_RECEIPT: string;
|
|
7210
|
+
};
|
|
7211
|
+
/**
|
|
7212
|
+
* Method to get receiver type of the message receipt.
|
|
7213
|
+
* @returns {string}
|
|
7214
|
+
*/
|
|
7215
|
+
getReceiverType(): string;
|
|
7216
|
+
/**
|
|
7217
|
+
* Method to set receiver type of the message receipt.
|
|
7218
|
+
* @param {string} receiverType
|
|
7219
|
+
*/
|
|
7220
|
+
setReceiverType(receiverType: string): void;
|
|
7221
|
+
/**
|
|
7222
|
+
* Method to get sender of the message receipt.
|
|
7223
|
+
* @returns {User}
|
|
7224
|
+
*/
|
|
7225
|
+
getSender(): User;
|
|
7226
|
+
/**
|
|
7227
|
+
* Method to set sender of the message receipt.
|
|
7228
|
+
* @param {User} sender
|
|
7229
|
+
*/
|
|
7230
|
+
setSender(sender: User): void;
|
|
7231
|
+
/**
|
|
7232
|
+
* Method to get receiver of the message receipt.
|
|
7233
|
+
* @returns {string}
|
|
7234
|
+
*/
|
|
7235
|
+
getReceiver(): string;
|
|
7236
|
+
/**
|
|
7237
|
+
* Method to set receiver of the message receipt.
|
|
7238
|
+
* @param {string} receiver
|
|
7239
|
+
*/
|
|
7240
|
+
setReceiver(receiver: string): void;
|
|
7241
|
+
/**
|
|
7242
|
+
* Method to get timestamp of the message receipt.
|
|
7243
|
+
* @returns {string}
|
|
7244
|
+
*/
|
|
7245
|
+
getTimestamp(): string;
|
|
7246
|
+
/**
|
|
7247
|
+
* Method to set timestamp of the message receipt.
|
|
7248
|
+
* @param {string} timestamp
|
|
7249
|
+
*/
|
|
7250
|
+
setTimestamp(timestamp: string): void;
|
|
7251
|
+
/**
|
|
7252
|
+
* Method to set readAt timestamp of the message receipt.
|
|
7253
|
+
* @param {number} readAt
|
|
7254
|
+
*/
|
|
7255
|
+
setReadAt(readAt: number): void;
|
|
7256
|
+
/**
|
|
7257
|
+
* Method to get readAt timestamp of the message receipt.
|
|
7258
|
+
* @returns {number}
|
|
7259
|
+
*/
|
|
7260
|
+
getReadAt(): number;
|
|
7261
|
+
/**
|
|
7262
|
+
* Method to set deliveredAt timestamp of the message receipt.
|
|
7263
|
+
* @param {number} deliveredAt
|
|
7264
|
+
*/
|
|
7265
|
+
setDeliveredAt(deliveredAt: number): void;
|
|
7266
|
+
/**
|
|
7267
|
+
* Method to get deliveredAt timestamp of the message receipt.
|
|
7268
|
+
* @returns {number}
|
|
7269
|
+
*/
|
|
7270
|
+
getDeliveredAt(): number;
|
|
7271
|
+
/**
|
|
7272
|
+
* Method to get the message ID.
|
|
7273
|
+
* @returns {string}
|
|
7274
|
+
*/
|
|
7275
|
+
getMessageId(): string;
|
|
7276
|
+
/**
|
|
7277
|
+
* Method to set the message ID.
|
|
7278
|
+
* @param {string} messageId
|
|
7279
|
+
*/
|
|
7280
|
+
setMessageId(messageId: string): void;
|
|
7281
|
+
/**
|
|
7282
|
+
* Method to get the receipt type of message receipt.
|
|
7283
|
+
* @returns {string}
|
|
7284
|
+
*/
|
|
7285
|
+
getReceiptType(): string;
|
|
7286
|
+
/**
|
|
7287
|
+
* Method to set the receipt type of message receipt.
|
|
7288
|
+
* @param {string} receiptType
|
|
7289
|
+
*/
|
|
7290
|
+
setReceiptType(receiptType?: string): void;
|
|
7291
|
+
}
|
|
7292
|
+
|
|
7073
7293
|
/** Push Notification Preferences Enums */
|
|
7074
7294
|
export enum MessagesOptions {
|
|
7075
7295
|
DONT_SUBSCRIBE,
|
|
@@ -7556,99 +7776,6 @@ export interface ErrorModel {
|
|
|
7556
7776
|
details?: string;
|
|
7557
7777
|
}
|
|
7558
7778
|
|
|
7559
|
-
/**
|
|
7560
|
-
*
|
|
7561
|
-
* @module MessageReceipt
|
|
7562
|
-
*/
|
|
7563
|
-
export class MessageReceipt {
|
|
7564
|
-
RECEIPT_TYPE: {
|
|
7565
|
-
READ_RECEIPT: string;
|
|
7566
|
-
DELIVERY_RECEIPT: string;
|
|
7567
|
-
READ_BY_ALL_RECEIPT: string;
|
|
7568
|
-
DELIVERED_TO_ALL_RECEIPT: string;
|
|
7569
|
-
};
|
|
7570
|
-
/**
|
|
7571
|
-
* Method to get receiver type of the message receipt.
|
|
7572
|
-
* @returns {string}
|
|
7573
|
-
*/
|
|
7574
|
-
getReceiverType(): string;
|
|
7575
|
-
/**
|
|
7576
|
-
* Method to set receiver type of the message receipt.
|
|
7577
|
-
* @param {string} receiverType
|
|
7578
|
-
*/
|
|
7579
|
-
setReceiverType(receiverType: string): void;
|
|
7580
|
-
/**
|
|
7581
|
-
* Method to get sender of the message receipt.
|
|
7582
|
-
* @returns {User}
|
|
7583
|
-
*/
|
|
7584
|
-
getSender(): User;
|
|
7585
|
-
/**
|
|
7586
|
-
* Method to set sender of the message receipt.
|
|
7587
|
-
* @param {User} sender
|
|
7588
|
-
*/
|
|
7589
|
-
setSender(sender: User): void;
|
|
7590
|
-
/**
|
|
7591
|
-
* Method to get receiver of the message receipt.
|
|
7592
|
-
* @returns {string}
|
|
7593
|
-
*/
|
|
7594
|
-
getReceiver(): string;
|
|
7595
|
-
/**
|
|
7596
|
-
* Method to set receiver of the message receipt.
|
|
7597
|
-
* @param {string} receiver
|
|
7598
|
-
*/
|
|
7599
|
-
setReceiver(receiver: string): void;
|
|
7600
|
-
/**
|
|
7601
|
-
* Method to get timestamp of the message receipt.
|
|
7602
|
-
* @returns {string}
|
|
7603
|
-
*/
|
|
7604
|
-
getTimestamp(): string;
|
|
7605
|
-
/**
|
|
7606
|
-
* Method to set timestamp of the message receipt.
|
|
7607
|
-
* @param {string} timestamp
|
|
7608
|
-
*/
|
|
7609
|
-
setTimestamp(timestamp: string): void;
|
|
7610
|
-
/**
|
|
7611
|
-
* Method to set readAt timestamp of the message receipt.
|
|
7612
|
-
* @param {number} readAt
|
|
7613
|
-
*/
|
|
7614
|
-
setReadAt(readAt: number): void;
|
|
7615
|
-
/**
|
|
7616
|
-
* Method to get readAt timestamp of the message receipt.
|
|
7617
|
-
* @returns {number}
|
|
7618
|
-
*/
|
|
7619
|
-
getReadAt(): number;
|
|
7620
|
-
/**
|
|
7621
|
-
* Method to set deliveredAt timestamp of the message receipt.
|
|
7622
|
-
* @param {number} deliveredAt
|
|
7623
|
-
*/
|
|
7624
|
-
setDeliveredAt(deliveredAt: number): void;
|
|
7625
|
-
/**
|
|
7626
|
-
* Method to get deliveredAt timestamp of the message receipt.
|
|
7627
|
-
* @returns {number}
|
|
7628
|
-
*/
|
|
7629
|
-
getDeliveredAt(): number;
|
|
7630
|
-
/**
|
|
7631
|
-
* Method to get the message ID.
|
|
7632
|
-
* @returns {string}
|
|
7633
|
-
*/
|
|
7634
|
-
getMessageId(): string;
|
|
7635
|
-
/**
|
|
7636
|
-
* Method to set the message ID.
|
|
7637
|
-
* @param {string} messageId
|
|
7638
|
-
*/
|
|
7639
|
-
setMessageId(messageId: string): void;
|
|
7640
|
-
/**
|
|
7641
|
-
* Method to get the receipt type of message receipt.
|
|
7642
|
-
* @returns {string}
|
|
7643
|
-
*/
|
|
7644
|
-
getReceiptType(): string;
|
|
7645
|
-
/**
|
|
7646
|
-
* Method to set the receipt type of message receipt.
|
|
7647
|
-
* @param {string} receiptType
|
|
7648
|
-
*/
|
|
7649
|
-
setReceiptType(receiptType?: string): void;
|
|
7650
|
-
}
|
|
7651
|
-
|
|
7652
7779
|
export class RTCUser {
|
|
7653
7780
|
constructor(uid: string);
|
|
7654
7781
|
setUID(uid: string): void;
|
|
@@ -7662,4 +7789,3 @@ export class RTCUser {
|
|
|
7662
7789
|
setResource(resource: string): void;
|
|
7663
7790
|
getResource(): string;
|
|
7664
7791
|
}
|
|
7665
|
-
|