@cometchat/chat-sdk-javascript 4.0.4 → 4.0.6
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 +73 -2
- package/CometChat.js +1 -1
- package/README.md +6 -60
- package/package.json +1 -1
package/CometChat.d.ts
CHANGED
|
@@ -446,6 +446,11 @@ export class CometChat {
|
|
|
446
446
|
WEBRTC_WEB_FRONTEND_HOST: string;
|
|
447
447
|
WEBRTC_WEB_FRONTEND_VERSION: string;
|
|
448
448
|
SECURED_MEDIA_HOST: string;
|
|
449
|
+
PARAMETERS: string;
|
|
450
|
+
CORE_CONVERSATIONS_UPDATE_ON_CALL_ACTIVITIES: string;
|
|
451
|
+
CORE_CONVERSATIONS_UPDATE_ON_GROUP_ACTIONS: string;
|
|
452
|
+
CORE_CONVERSATIONS_UPDATE_ON_CUSTOM_MESSAGES: string;
|
|
453
|
+
CORE_CONVERSATIONS_UPDATE_ON_REPLIES: string;
|
|
449
454
|
};
|
|
450
455
|
};
|
|
451
456
|
static GroupConstants: {
|
|
@@ -1966,6 +1971,12 @@ export class CometChat {
|
|
|
1966
1971
|
* @memberof CometChat
|
|
1967
1972
|
*/
|
|
1968
1973
|
static markAsInteracted(messageId: string | any, elementId: string): Promise<string>;
|
|
1974
|
+
/**
|
|
1975
|
+
* Retrieves the ConversationUpdateSettings.
|
|
1976
|
+
*
|
|
1977
|
+
* @return A ConversationUpdateSettings object that holds the settings for updating the conversation.
|
|
1978
|
+
*/
|
|
1979
|
+
static getConversationUpdateSettings(): Promise<ConversationUpdateSettings>;
|
|
1969
1980
|
}
|
|
1970
1981
|
|
|
1971
1982
|
export class CometChatNotifications {
|
|
@@ -3657,6 +3668,11 @@ export const APP_SETTINGS: {
|
|
|
3657
3668
|
WEBRTC_WEB_FRONTEND_HOST: string;
|
|
3658
3669
|
WEBRTC_WEB_FRONTEND_VERSION: string;
|
|
3659
3670
|
SECURED_MEDIA_HOST: string;
|
|
3671
|
+
PARAMETERS: string;
|
|
3672
|
+
CORE_CONVERSATIONS_UPDATE_ON_CALL_ACTIVITIES: string;
|
|
3673
|
+
CORE_CONVERSATIONS_UPDATE_ON_GROUP_ACTIONS: string;
|
|
3674
|
+
CORE_CONVERSATIONS_UPDATE_ON_CUSTOM_MESSAGES: string;
|
|
3675
|
+
CORE_CONVERSATIONS_UPDATE_ON_REPLIES: string;
|
|
3660
3676
|
};
|
|
3661
3677
|
};
|
|
3662
3678
|
export const COMMON_UTILITY_CONSTANTS: {
|
|
@@ -3766,6 +3782,7 @@ export class Group {
|
|
|
3766
3782
|
private joinedAt;
|
|
3767
3783
|
private membersCount;
|
|
3768
3784
|
private tags;
|
|
3785
|
+
private isBanned;
|
|
3769
3786
|
/**
|
|
3770
3787
|
* Creates an instance of Group.
|
|
3771
3788
|
* @param {string} guid
|
|
@@ -3931,6 +3948,11 @@ export class Group {
|
|
|
3931
3948
|
* @returns {string[]}
|
|
3932
3949
|
*/
|
|
3933
3950
|
getTags(): Array<String>;
|
|
3951
|
+
/**
|
|
3952
|
+
* Method to check if the logged-in user is banned from the group or not.
|
|
3953
|
+
* @returns {boolean} status of the logged-in user as banned or not.
|
|
3954
|
+
*/
|
|
3955
|
+
isBannedFromGroup(): boolean;
|
|
3934
3956
|
}
|
|
3935
3957
|
|
|
3936
3958
|
export class MessageListener {
|
|
@@ -4253,8 +4275,8 @@ export class Call extends BaseMessage implements Message {
|
|
|
4253
4275
|
protected initiatedAt: number;
|
|
4254
4276
|
protected joinedAt: number;
|
|
4255
4277
|
protected data: any;
|
|
4256
|
-
protected callInitiator:
|
|
4257
|
-
protected callReceiver:
|
|
4278
|
+
protected callInitiator: User;
|
|
4279
|
+
protected callReceiver: User | Group;
|
|
4258
4280
|
/**
|
|
4259
4281
|
* @memberof {@link CometChat | CometChat }
|
|
4260
4282
|
* @param receiverId
|
|
@@ -5218,6 +5240,46 @@ export class TypingIndicator {
|
|
|
5218
5240
|
export class CustomMessage extends BaseMessage implements Message {
|
|
5219
5241
|
protected data?: Object;
|
|
5220
5242
|
constructor(...args: any[]);
|
|
5243
|
+
/**
|
|
5244
|
+
* Retrieves the preview text for a custom message to be displayed in the Conversation List.
|
|
5245
|
+
* This method allows for a textual representation of the custom message that can be used
|
|
5246
|
+
* as a conversation snippet or preview, enhancing the user experience by providing context.
|
|
5247
|
+
* @returns {string} The text to display as the conversation preview.
|
|
5248
|
+
*/
|
|
5249
|
+
getConversationText(): string;
|
|
5250
|
+
/**
|
|
5251
|
+
* Sets the preview text for a custom message to be displayed in the Conversation List.
|
|
5252
|
+
* This method allows for a textual representation of the custom message that can be used
|
|
5253
|
+
* as a conversation snippet or preview, enhancing the user experience by providing context.
|
|
5254
|
+
* @param {string} text The text to set as the conversation preview.
|
|
5255
|
+
*/
|
|
5256
|
+
setConversationText(text: string): void;
|
|
5257
|
+
/**
|
|
5258
|
+
* Determines whether the custom message should be considered as the last message
|
|
5259
|
+
* in the conversation, potentially changing the order of conversations.
|
|
5260
|
+
* This method indicates if sending a custom message will update the conversation's last message,
|
|
5261
|
+
* which may affect the conversation's position in the list based on the sorting order.
|
|
5262
|
+
* @returns {boolean} A boolean value indicating whether sending the custom message triggers an update
|
|
5263
|
+
* to the last message of the conversation, potentially altering the conversation order.
|
|
5264
|
+
*/
|
|
5265
|
+
willUpdateConversation(): boolean;
|
|
5266
|
+
/**
|
|
5267
|
+
* Set the flag to determine if the conversation should be updated.
|
|
5268
|
+
* @param {boolean} updateConversation The flag to set if the conversation should be updated.
|
|
5269
|
+
*/
|
|
5270
|
+
shouldUpdateConversation(updateConversation: boolean): void;
|
|
5271
|
+
/**
|
|
5272
|
+
* Determines whether a push notification should be sent for the custom message.
|
|
5273
|
+
* This method checks if the current custom message configuration specifies that a push notification
|
|
5274
|
+
* is warranted when the message is sent.
|
|
5275
|
+
* @returns {boolean} A boolean value indicating whether to send a push notification for the custom message.
|
|
5276
|
+
*/
|
|
5277
|
+
willSendNotification(): boolean;
|
|
5278
|
+
/**
|
|
5279
|
+
* Set the flag to determine if a notification should be sent.
|
|
5280
|
+
* @param {boolean} sendNotification The flag to set if a notification should be sent.
|
|
5281
|
+
*/
|
|
5282
|
+
shouldSendNotification(sendNotification: boolean): void;
|
|
5221
5283
|
/**
|
|
5222
5284
|
* Method to get custom data of the message.
|
|
5223
5285
|
* @returns {Object}
|
|
@@ -6497,6 +6559,15 @@ export class Reaction {
|
|
|
6497
6559
|
setReactedBy(reactedBy: User): void;
|
|
6498
6560
|
}
|
|
6499
6561
|
|
|
6562
|
+
export class ConversationUpdateSettings {
|
|
6563
|
+
constructor();
|
|
6564
|
+
shouldUpdateOnCallActivities(): boolean;
|
|
6565
|
+
shouldUpdateOnGroupActions(): boolean;
|
|
6566
|
+
shouldUpdateOnCustomMessages(): boolean;
|
|
6567
|
+
shouldUpdateOnMessageReplies(): boolean;
|
|
6568
|
+
static fromJSON(jsonData: Object): ConversationUpdateSettings;
|
|
6569
|
+
}
|
|
6570
|
+
|
|
6500
6571
|
/** Push Notification Preferences Enums */
|
|
6501
6572
|
export enum MessagesOptions {
|
|
6502
6573
|
DONT_SUBSCRIBE,
|