@cometchat/chat-sdk-javascript 4.0.7 → 4.0.8

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
@@ -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
  /**
@@ -4423,6 +4477,8 @@ export class CallController {
4423
4477
  /** @internal */
4424
4478
  onCallStarted(call: Call): Promise<Call>;
4425
4479
  /** @internal */
4480
+ clearActiveCall(): void;
4481
+ /** @internal */
4426
4482
  endCallSession(): void;
4427
4483
  /** @internal */
4428
4484
  startCall(callsettings: CallSettings, view: HTMLElement): void;
@@ -5188,8 +5244,8 @@ export class ConversationsRequestBuilder {
5188
5244
  /** @private */ WithTags: boolean;
5189
5245
  /** @private */ groupTags: Array<String>;
5190
5246
  /** @private */ userTags: Array<String>;
5191
- /** @private */ includeBlockedUsers: boolean;
5192
- /** @private */ withBlockedInfo: boolean;
5247
+ /** @private */ IncludeBlockedUsers: boolean;
5248
+ /** @private */ WithBlockedInfo: boolean;
5193
5249
  /**
5194
5250
  *
5195
5251
  * @param {number} limit
@@ -5237,16 +5293,33 @@ export class ConversationsRequestBuilder {
5237
5293
  setUserTags(userTags: Array<String>): this;
5238
5294
  /**
5239
5295
  * A method to include blocked users in the list of conversations.
5240
- * @param {boolean} userTags
5296
+ * @param {boolean} _includeBlockedUsers
5297
+ * @returns
5298
+ * @deprecated This method is deprecated as of version 4.0.8 due to newer method 'includeBlockedUsers'.
5299
+ * It will be removed in subsequent versions.
5300
+ */
5301
+ setIncludeBlockedUsers(_includeBlockedUsers: boolean): this;
5302
+ /**
5303
+ * A method to include blocked users in the list of conversations.
5304
+ * @param {boolean} _includeBlockedUsers
5241
5305
  * @returns
5242
5306
  */
5243
- setIncludeBlockedUsers(_includeBlockedUsers: any): this;
5307
+ includeBlockedUsers(_includeBlockedUsers: boolean): this;
5244
5308
  /**
5245
5309
  * A method to include blocked users information in the list of conversations.
5246
- * @param {boolean} userTags
5310
+ * @param {boolean} _withBlockedInfo
5311
+ * @returns
5312
+ *
5313
+ * @deprecated This method is deprecated as of version 4.0.8 due to newer method 'withBlockedInfo'.
5314
+ * It will be removed in subsequent versions.
5315
+ */
5316
+ setWithBlockedInfo(_withBlockedInfo: boolean): this;
5317
+ /**
5318
+ * A method to include blocked users information in the list of conversations.
5319
+ * @param {boolean} _withBlockedInfo
5247
5320
  * @returns
5248
5321
  */
5249
- setWithBlockedInfo(_withBlockedInfo: any): this;
5322
+ withBlockedInfo(_withBlockedInfo: boolean): this;
5250
5323
  /**
5251
5324
  * This method will return an object of the ConversationsRequest class.
5252
5325
  * @returns {ConversationsRequest}
@@ -7060,6 +7133,8 @@ export const APIConstants: {
7060
7133
  KEY_MUTED_CONVERSATIONS: string;
7061
7134
  KEY_FROM: string;
7062
7135
  KEY_TO: string;
7136
+ KEY_GET_TIMEZONE: string;
7137
+ KEY_UPDATE_TIMEZONE: string;
7063
7138
  };
7064
7139
  export const APIResponseConstants: {
7065
7140
  TOKEN_REGISTER_SUCCESS: string;
@@ -7070,6 +7145,9 @@ export const APIResponseConstants: {
7070
7145
  MUTE_CONVERSATION_ERROR: string;
7071
7146
  UNMUTE_CONVERSATION_SUCCESS: string;
7072
7147
  UNMUTE_CONVERSATION_ERROR: string;
7148
+ TIMEZONE_UPDATE_SUCCESS: string;
7149
+ TIMEZONE_UPDATE_ERROR: string;
7150
+ TIMEZONE_FETCH_ERROR: string;
7073
7151
  };
7074
7152
  export const DEFAULT_PROVIDER_ID = "default";
7075
7153
 
@@ -7291,6 +7369,54 @@ export class MutePreferences {
7291
7369
  static fromJSON(jsonData: Object): MutePreferences;
7292
7370
  }
7293
7371
 
7372
+ export class NotificationPreferences {
7373
+ /**
7374
+ * Get the OneOnOne preferences.
7375
+ * @returns {OneOnOnePreferences}
7376
+ */
7377
+ getOneOnOnePreferences(): OneOnOnePreferences;
7378
+ /**
7379
+ * @param {OneOnOnePreferences} oneOnOnePreferences
7380
+ * Set the OneOnOne preferences.
7381
+ */
7382
+ setOneOnOnePreferences(oneOnOnePreferences: OneOnOnePreferences): void;
7383
+ /**
7384
+ * Get the Muted preferences.
7385
+ * @returns {MutePreferences}
7386
+ */
7387
+ getMutePreferences(): MutePreferences;
7388
+ /**
7389
+ * @param {MutePreferences} mutePreferences
7390
+ * Set the Mute preferences.
7391
+ */
7392
+ setMutePreferences(mutePreferences: MutePreferences): void;
7393
+ /**
7394
+ * Get the Group preferences.
7395
+ * @returns {GroupPreferences}
7396
+ */
7397
+ getGroupPreferences(): GroupPreferences;
7398
+ /**
7399
+ * @param {GroupPreferences} groupPreferences
7400
+ * Set the Group preferences.
7401
+ */
7402
+ setGroupPreferences(groupPreferences: GroupPreferences): void;
7403
+ /**
7404
+ * Returns whether to use privacy template or not.
7405
+ * @returns {boolean}
7406
+ */
7407
+ getUsePrivacyTemplate(): boolean;
7408
+ /**
7409
+ * @param {boolean} usePrivacyTemplate
7410
+ * Set whether to use privacy template or not.
7411
+ */
7412
+ setUsePrivacyTemplate(usePrivacyTemplate: boolean): void;
7413
+ /**
7414
+ * @param {Object} jsonData
7415
+ * Convert JSON object to NotificationPreferences.
7416
+ */
7417
+ static fromJSON(jsonData: Object): NotificationPreferences;
7418
+ }
7419
+
7294
7420
  export class OneOnOnePreferences {
7295
7421
  /**
7296
7422
  * Get the reactions preferences for groups.
@@ -7329,6 +7455,10 @@ export class OneOnOnePreferences {
7329
7455
  static fromJSON(jsonData: Object): OneOnOnePreferences;
7330
7456
  }
7331
7457
 
7458
+ /**
7459
+ * @deprecated This class is deprecated as of version 4.0.8 due to newer class 'NotificationPreferences'.
7460
+ * It will be removed in subsequent versions.
7461
+ */
7332
7462
  export class PushPreferences {
7333
7463
  /**
7334
7464
  * Get the OneOnOne preferences.