@cometchat/chat-sdk-javascript 4.0.7 → 4.0.9
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 +146 -6
- package/CometChat.js +1 -1
- package/README.md +12 -125
- package/package.json +1 -1
package/CometChat.d.ts
CHANGED
|
@@ -1670,6 +1670,12 @@ export class CometChat {
|
|
|
1670
1670
|
* @memberof CometChat
|
|
1671
1671
|
*/
|
|
1672
1672
|
static getActiveCall(): Call;
|
|
1673
|
+
/**
|
|
1674
|
+
* Function to clear any active call.
|
|
1675
|
+
* @returns {void}
|
|
1676
|
+
* @memberof CometChat
|
|
1677
|
+
*/
|
|
1678
|
+
static clearActiveCall(): void;
|
|
1673
1679
|
/**
|
|
1674
1680
|
* Function to start a call.
|
|
1675
1681
|
* @param {CallSettings | string} callSettings
|
|
@@ -1989,31 +1995,64 @@ export class CometChatNotifications {
|
|
|
1989
1995
|
static MutedConversationType: typeof MutedConversationType;
|
|
1990
1996
|
static PushPlatforms: typeof PushPlatforms;
|
|
1991
1997
|
static DaySchedule: typeof DaySchedule;
|
|
1998
|
+
/**
|
|
1999
|
+
* @deprecated This property is deprecated as of version 4.0.8 due to newer property 'NotificationPreferences'.
|
|
2000
|
+
* It will be removed in subsequent versions.
|
|
2001
|
+
*/
|
|
1992
2002
|
static PushPreferences: typeof PushPreferences;
|
|
1993
2003
|
static GroupPreferences: typeof GroupPreferences;
|
|
1994
2004
|
static OneOnOnePreferences: typeof OneOnOnePreferences;
|
|
1995
2005
|
static MutePreferences: typeof MutePreferences;
|
|
1996
2006
|
static MutedConversation: typeof MutedConversation;
|
|
1997
2007
|
static UnmutedConversation: typeof UnmutedConversation;
|
|
2008
|
+
static NotificationPreferences: typeof NotificationPreferences;
|
|
1998
2009
|
/**
|
|
1999
2010
|
* Function to get preferences set for the logged-in user.
|
|
2000
2011
|
* @returns {Promise<PushPreferences>}
|
|
2001
2012
|
* @memberof CometChatNotifications
|
|
2013
|
+
* @deprecated
|
|
2014
|
+
*
|
|
2015
|
+
* This method is deprecated as of version 4.0.8 due to newer method 'fetchPreferences'. It will be removed in subsequent versions.
|
|
2002
2016
|
*/
|
|
2003
2017
|
static fetchPushPreferences(): Promise<PushPreferences>;
|
|
2018
|
+
/**
|
|
2019
|
+
* Function to get preferences set for the logged-in user.
|
|
2020
|
+
* @returns {Promise<NotificationPreferences>}
|
|
2021
|
+
* @memberof CometChatNotifications
|
|
2022
|
+
*/
|
|
2023
|
+
static fetchPreferences(): Promise<NotificationPreferences>;
|
|
2004
2024
|
/**
|
|
2005
2025
|
* Function to update preferences for the logged-in user.
|
|
2006
2026
|
* @param {PushPreferences} pushPreferences
|
|
2007
2027
|
* @returns {Promise<PushPreferences>}
|
|
2008
2028
|
* @memberof CometChatNotifications
|
|
2029
|
+
* @deprecated
|
|
2030
|
+
*
|
|
2031
|
+
* This method is deprecated as of version 4.0.8 due to newer method 'updatePreferences'. It will be removed in subsequent versions.
|
|
2009
2032
|
*/
|
|
2010
2033
|
static updatePushPreferences(pushPreferences: PushPreferences): Promise<PushPreferences>;
|
|
2034
|
+
/**
|
|
2035
|
+
* Function to update preferences for the logged-in user.
|
|
2036
|
+
* @param {NotificationPreferences} notificationPreferences
|
|
2037
|
+
* @returns {Promise<NotificationPreferences>}
|
|
2038
|
+
* @memberof CometChatNotifications
|
|
2039
|
+
*/
|
|
2040
|
+
static updatePreferences(notificationPreferences: NotificationPreferences): Promise<NotificationPreferences>;
|
|
2011
2041
|
/**
|
|
2012
2042
|
* Function to reset preferences for the logged-in user.
|
|
2013
2043
|
* @returns {Promise<PushPreferences>}
|
|
2014
2044
|
* @memberof CometChatNotifications
|
|
2045
|
+
* @deprecated
|
|
2046
|
+
*
|
|
2047
|
+
* This method is deprecated as of version 4.0.8 due to newer method 'resetPreferences'. It will be removed in subsequent versions.
|
|
2015
2048
|
*/
|
|
2016
2049
|
static resetPushPreferences(): Promise<PushPreferences>;
|
|
2050
|
+
/**
|
|
2051
|
+
* Function to reset preferences for the logged-in user.
|
|
2052
|
+
* @returns {Promise<NotificationPreferences>}
|
|
2053
|
+
* @memberof CometChatNotifications
|
|
2054
|
+
*/
|
|
2055
|
+
static resetPreferences(): Promise<NotificationPreferences>;
|
|
2017
2056
|
/**
|
|
2018
2057
|
* Function to register push token for the current authToken of the logged-in user.
|
|
2019
2058
|
* @returns {Promise<string>}
|
|
@@ -2049,6 +2088,21 @@ export class CometChatNotifications {
|
|
|
2049
2088
|
* @memberof CometChatNotifications
|
|
2050
2089
|
*/
|
|
2051
2090
|
static getMutedConversations(): Promise<MutedConversation[]>;
|
|
2091
|
+
/**
|
|
2092
|
+
* Function to update timezone for the logged-in user.
|
|
2093
|
+
* @returns {Promise<string>}
|
|
2094
|
+
* @param {string} timezone
|
|
2095
|
+
* @memberof CometChatNotifications
|
|
2096
|
+
*/
|
|
2097
|
+
static updateTimezone(timezone: String): Promise<string>;
|
|
2098
|
+
/**
|
|
2099
|
+
* Function to get timezone for the logged-in user.
|
|
2100
|
+
* @returns {Promise<{timezone: string} | string>} A promise that resolves to an object containing the timezone or a string in case of an error.
|
|
2101
|
+
* @memberof CometChatNotifications
|
|
2102
|
+
*/
|
|
2103
|
+
static getTimezone(): Promise<{
|
|
2104
|
+
timezone: string;
|
|
2105
|
+
} | string>;
|
|
2052
2106
|
}
|
|
2053
2107
|
|
|
2054
2108
|
/**
|
|
@@ -4013,6 +4067,14 @@ export class MessageListener {
|
|
|
4013
4067
|
* This event is triggered when a reaction is removed.
|
|
4014
4068
|
*/
|
|
4015
4069
|
onMessageReactionRemoved?: Function;
|
|
4070
|
+
/**
|
|
4071
|
+
* This event is triggered when a message is delivered to all members in a group.
|
|
4072
|
+
*/
|
|
4073
|
+
onMessagesDeliveredToAll?: Function;
|
|
4074
|
+
/**
|
|
4075
|
+
* This event is triggered when a message is read by all members in a group.
|
|
4076
|
+
*/
|
|
4077
|
+
onMessagesReadByAll?: Function;
|
|
4016
4078
|
constructor(...args: any[]);
|
|
4017
4079
|
}
|
|
4018
4080
|
export class CallListener {
|
|
@@ -4423,6 +4485,8 @@ export class CallController {
|
|
|
4423
4485
|
/** @internal */
|
|
4424
4486
|
onCallStarted(call: Call): Promise<Call>;
|
|
4425
4487
|
/** @internal */
|
|
4488
|
+
clearActiveCall(): void;
|
|
4489
|
+
/** @internal */
|
|
4426
4490
|
endCallSession(): void;
|
|
4427
4491
|
/** @internal */
|
|
4428
4492
|
startCall(callsettings: CallSettings, view: HTMLElement): void;
|
|
@@ -5188,8 +5252,8 @@ export class ConversationsRequestBuilder {
|
|
|
5188
5252
|
/** @private */ WithTags: boolean;
|
|
5189
5253
|
/** @private */ groupTags: Array<String>;
|
|
5190
5254
|
/** @private */ userTags: Array<String>;
|
|
5191
|
-
/** @private */
|
|
5192
|
-
/** @private */
|
|
5255
|
+
/** @private */ IncludeBlockedUsers: boolean;
|
|
5256
|
+
/** @private */ WithBlockedInfo: boolean;
|
|
5193
5257
|
/**
|
|
5194
5258
|
*
|
|
5195
5259
|
* @param {number} limit
|
|
@@ -5237,16 +5301,33 @@ export class ConversationsRequestBuilder {
|
|
|
5237
5301
|
setUserTags(userTags: Array<String>): this;
|
|
5238
5302
|
/**
|
|
5239
5303
|
* A method to include blocked users in the list of conversations.
|
|
5240
|
-
* @param {boolean}
|
|
5304
|
+
* @param {boolean} _includeBlockedUsers
|
|
5305
|
+
* @returns
|
|
5306
|
+
* @deprecated This method is deprecated as of version 4.0.8 due to newer method 'includeBlockedUsers'.
|
|
5307
|
+
* It will be removed in subsequent versions.
|
|
5308
|
+
*/
|
|
5309
|
+
setIncludeBlockedUsers(_includeBlockedUsers: boolean): this;
|
|
5310
|
+
/**
|
|
5311
|
+
* A method to include blocked users in the list of conversations.
|
|
5312
|
+
* @param {boolean} _includeBlockedUsers
|
|
5241
5313
|
* @returns
|
|
5242
5314
|
*/
|
|
5243
|
-
|
|
5315
|
+
includeBlockedUsers(_includeBlockedUsers: boolean): this;
|
|
5244
5316
|
/**
|
|
5245
5317
|
* A method to include blocked users information in the list of conversations.
|
|
5246
|
-
* @param {boolean}
|
|
5318
|
+
* @param {boolean} _withBlockedInfo
|
|
5247
5319
|
* @returns
|
|
5320
|
+
*
|
|
5321
|
+
* @deprecated This method is deprecated as of version 4.0.8 due to newer method 'withBlockedInfo'.
|
|
5322
|
+
* It will be removed in subsequent versions.
|
|
5248
5323
|
*/
|
|
5249
|
-
setWithBlockedInfo(_withBlockedInfo:
|
|
5324
|
+
setWithBlockedInfo(_withBlockedInfo: boolean): this;
|
|
5325
|
+
/**
|
|
5326
|
+
* A method to include blocked users information in the list of conversations.
|
|
5327
|
+
* @param {boolean} _withBlockedInfo
|
|
5328
|
+
* @returns
|
|
5329
|
+
*/
|
|
5330
|
+
withBlockedInfo(_withBlockedInfo: boolean): this;
|
|
5250
5331
|
/**
|
|
5251
5332
|
* This method will return an object of the ConversationsRequest class.
|
|
5252
5333
|
* @returns {ConversationsRequest}
|
|
@@ -7060,6 +7141,8 @@ export const APIConstants: {
|
|
|
7060
7141
|
KEY_MUTED_CONVERSATIONS: string;
|
|
7061
7142
|
KEY_FROM: string;
|
|
7062
7143
|
KEY_TO: string;
|
|
7144
|
+
KEY_GET_TIMEZONE: string;
|
|
7145
|
+
KEY_UPDATE_TIMEZONE: string;
|
|
7063
7146
|
};
|
|
7064
7147
|
export const APIResponseConstants: {
|
|
7065
7148
|
TOKEN_REGISTER_SUCCESS: string;
|
|
@@ -7070,6 +7153,9 @@ export const APIResponseConstants: {
|
|
|
7070
7153
|
MUTE_CONVERSATION_ERROR: string;
|
|
7071
7154
|
UNMUTE_CONVERSATION_SUCCESS: string;
|
|
7072
7155
|
UNMUTE_CONVERSATION_ERROR: string;
|
|
7156
|
+
TIMEZONE_UPDATE_SUCCESS: string;
|
|
7157
|
+
TIMEZONE_UPDATE_ERROR: string;
|
|
7158
|
+
TIMEZONE_FETCH_ERROR: string;
|
|
7073
7159
|
};
|
|
7074
7160
|
export const DEFAULT_PROVIDER_ID = "default";
|
|
7075
7161
|
|
|
@@ -7291,6 +7377,54 @@ export class MutePreferences {
|
|
|
7291
7377
|
static fromJSON(jsonData: Object): MutePreferences;
|
|
7292
7378
|
}
|
|
7293
7379
|
|
|
7380
|
+
export class NotificationPreferences {
|
|
7381
|
+
/**
|
|
7382
|
+
* Get the OneOnOne preferences.
|
|
7383
|
+
* @returns {OneOnOnePreferences}
|
|
7384
|
+
*/
|
|
7385
|
+
getOneOnOnePreferences(): OneOnOnePreferences;
|
|
7386
|
+
/**
|
|
7387
|
+
* @param {OneOnOnePreferences} oneOnOnePreferences
|
|
7388
|
+
* Set the OneOnOne preferences.
|
|
7389
|
+
*/
|
|
7390
|
+
setOneOnOnePreferences(oneOnOnePreferences: OneOnOnePreferences): void;
|
|
7391
|
+
/**
|
|
7392
|
+
* Get the Muted preferences.
|
|
7393
|
+
* @returns {MutePreferences}
|
|
7394
|
+
*/
|
|
7395
|
+
getMutePreferences(): MutePreferences;
|
|
7396
|
+
/**
|
|
7397
|
+
* @param {MutePreferences} mutePreferences
|
|
7398
|
+
* Set the Mute preferences.
|
|
7399
|
+
*/
|
|
7400
|
+
setMutePreferences(mutePreferences: MutePreferences): void;
|
|
7401
|
+
/**
|
|
7402
|
+
* Get the Group preferences.
|
|
7403
|
+
* @returns {GroupPreferences}
|
|
7404
|
+
*/
|
|
7405
|
+
getGroupPreferences(): GroupPreferences;
|
|
7406
|
+
/**
|
|
7407
|
+
* @param {GroupPreferences} groupPreferences
|
|
7408
|
+
* Set the Group preferences.
|
|
7409
|
+
*/
|
|
7410
|
+
setGroupPreferences(groupPreferences: GroupPreferences): void;
|
|
7411
|
+
/**
|
|
7412
|
+
* Returns whether to use privacy template or not.
|
|
7413
|
+
* @returns {boolean}
|
|
7414
|
+
*/
|
|
7415
|
+
getUsePrivacyTemplate(): boolean;
|
|
7416
|
+
/**
|
|
7417
|
+
* @param {boolean} usePrivacyTemplate
|
|
7418
|
+
* Set whether to use privacy template or not.
|
|
7419
|
+
*/
|
|
7420
|
+
setUsePrivacyTemplate(usePrivacyTemplate: boolean): void;
|
|
7421
|
+
/**
|
|
7422
|
+
* @param {Object} jsonData
|
|
7423
|
+
* Convert JSON object to NotificationPreferences.
|
|
7424
|
+
*/
|
|
7425
|
+
static fromJSON(jsonData: Object): NotificationPreferences;
|
|
7426
|
+
}
|
|
7427
|
+
|
|
7294
7428
|
export class OneOnOnePreferences {
|
|
7295
7429
|
/**
|
|
7296
7430
|
* Get the reactions preferences for groups.
|
|
@@ -7329,6 +7463,10 @@ export class OneOnOnePreferences {
|
|
|
7329
7463
|
static fromJSON(jsonData: Object): OneOnOnePreferences;
|
|
7330
7464
|
}
|
|
7331
7465
|
|
|
7466
|
+
/**
|
|
7467
|
+
* @deprecated This class is deprecated as of version 4.0.8 due to newer class 'NotificationPreferences'.
|
|
7468
|
+
* It will be removed in subsequent versions.
|
|
7469
|
+
*/
|
|
7332
7470
|
export class PushPreferences {
|
|
7333
7471
|
/**
|
|
7334
7472
|
* Get the OneOnOne preferences.
|
|
@@ -7421,6 +7559,8 @@ export class MessageReceipt {
|
|
|
7421
7559
|
RECEIPT_TYPE: {
|
|
7422
7560
|
READ_RECEIPT: string;
|
|
7423
7561
|
DELIVERY_RECEIPT: string;
|
|
7562
|
+
READ_BY_ALL_RECEIPT: string;
|
|
7563
|
+
DELIVERED_TO_ALL_RECEIPT: string;
|
|
7424
7564
|
};
|
|
7425
7565
|
/**
|
|
7426
7566
|
* Method to get receiver type of the message receipt.
|