Skip to content

Commit 9a0fb5e

Browse files
committed
Updated SDK Version to 4.1.3
1 parent 22311e2 commit 9a0fb5e

File tree

3 files changed

+79
-4
lines changed

3 files changed

+79
-4
lines changed

CometChat.d.ts

Lines changed: 77 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ export class CometChat {
300300
};
301301
SESSION_ID_REQUIRED: {
302302
code: string;
303-
name: string;
303+
/** @internal */ name: string;
304304
message: string;
305305
details: {};
306306
};
@@ -1087,6 +1087,7 @@ export class CometChat {
10871087
static CometChatHelper: typeof CometChatHelper;
10881088
static Attachment: typeof Attachment;
10891089
static MediaDevice: typeof MediaDevice;
1090+
static StorageMode: typeof StorageMode;
10901091
static MESSAGE_TYPE: {
10911092
TEXT: string;
10921093
MEDIA: string;
@@ -1216,6 +1217,10 @@ export class CometChat {
12161217
* @memberof CometChat
12171218
*/
12181219
static getSessionId(): string;
1220+
/**
1221+
* Initialize the storage with the current storage mode from AppSettings
1222+
*/
1223+
static initializeStorage(): Promise<void>;
12191224
/**
12201225
* Storage event when a key is added/updated in localstorage.
12211226
* @internal
@@ -2947,6 +2952,10 @@ export enum GroupMemberScope {
29472952
Moderator = "moderator",
29482953
Member = "member"
29492954
}
2955+
export enum StorageMode {
2956+
LOCAL = "local",
2957+
SESSION = "session"
2958+
}
29502959
export const GROUP_MEMBER_SCOPE: {
29512960
ADMIN: string;
29522961
MODERATOR: string;
@@ -5040,6 +5049,10 @@ export class GroupsRequestBuilder {
50405049
}
50415050

50425051
export class GroupMembersRequest {
5052+
static USER_STATUS: {
5053+
ONLINE: string;
5054+
OFFLINE: string;
5055+
};
50435056
constructor(builder: GroupMembersRequestBuilder);
50445057
/**
50455058
* Get list of next set of group members based on the parameters specified in GroupMembersRequestBuilder class. The Developer need to call this method repeatedly using the same object of GroupMembersRequest class to get paginated list of group members.
@@ -5071,6 +5084,12 @@ export class GroupMembersRequest {
50715084
* @return {String[]}
50725085
*/
50735086
getScopes(): String[];
5087+
/**
5088+
* Gets the status filter used to fetch members based on their online or offline status.
5089+
*
5090+
* @return {string}
5091+
*/
5092+
getStatus(): string;
50745093
/**
50755094
* @internal
50765095
*/
@@ -5081,6 +5100,7 @@ export class GroupMembersRequestBuilder {
50815100
/** @private */ searchKeyword: string;
50825101
/** @private */ guid: string;
50835102
/** @private */ scopes?: Array<String>;
5103+
/** @private */ status: string;
50845104
constructor(guid: string);
50855105
/**
50865106
* Set the unique identifier of the group.
@@ -5110,6 +5130,12 @@ export class GroupMembersRequestBuilder {
51105130
* @returns
51115131
*/
51125132
setScopes(scopes: Array<String>): this;
5133+
/**
5134+
* A method to get the members belonging to a specific status.
5135+
* @param {string} status
5136+
* @returns
5137+
*/
5138+
setStatus(status: string): this;
51135139
/**
51145140
* This method will return an object of the GroupMembersRequest class.
51155141
* @returns {GroupMembersRequest}
@@ -5478,6 +5504,18 @@ export class ConversationsRequest {
54785504
* @returns {boolean}
54795505
*/
54805506
getUnread(): boolean;
5507+
/**
5508+
* Determines whether agentic conversations should be hidden.
5509+
*
5510+
* @returns {boolean}
5511+
*/
5512+
getHideAgentic(): boolean;
5513+
/**
5514+
* Determines whether only agentic conversations should be fetched.
5515+
*
5516+
* @returns {boolean}
5517+
*/
5518+
getOnlyAgentic(): boolean;
54815519
}
54825520
export class ConversationsRequestBuilder {
54835521
/** @private */ conversationType: string;
@@ -5491,6 +5529,8 @@ export class ConversationsRequestBuilder {
54915529
/** @private */ WithBlockedInfo: boolean;
54925530
/** @private */ searchKeyword: string;
54935531
/** @private */ unreadOnly: boolean;
5532+
/** @private */ hideAgentic: boolean;
5533+
/** @private */ onlyAgentic: boolean;
54945534
/**
54955535
*
54965536
* @param {number} limit
@@ -5579,6 +5619,18 @@ export class ConversationsRequestBuilder {
55795619
* @returns
55805620
*/
55815621
setUnread(unread: boolean): this;
5622+
/**
5623+
* A method to hide agentic conversations from the list.
5624+
* @param {boolean} hideAgentic
5625+
* @returns
5626+
*/
5627+
setHideAgentic(hideAgentic: boolean): this;
5628+
/**
5629+
* A method to fetch only agentic conversations.
5630+
* @param {boolean} onlyAgentic
5631+
* @returns
5632+
*/
5633+
setOnlyAgentic(onlyAgentic: boolean): this;
55825634
/**
55835635
* This method will return an object of the ConversationsRequest class.
55845636
* @returns {ConversationsRequest}
@@ -6262,6 +6314,10 @@ export class BlockedUsersRequestBuilder {
62626314
build(): BlockedUsersRequest;
62636315
}
62646316

6317+
/**
6318+
*
6319+
* @module AppSettings
6320+
*/
62656321
export class AppSettings {
62666322
static SUBSCRIPTION_TYPE_NONE: string;
62676323
static SUBSCRIPTION_TYPE_ALL_USERS: string;
@@ -6275,6 +6331,9 @@ export class AppSettings {
62756331
static REGION_IN: string;
62766332
/** @private */
62776333
static REGION_PRIVATE: string;
6334+
/** Storage modes */
6335+
static STORAGE_MODE_LOCAL: StorageMode;
6336+
static STORAGE_MODE_SESSION: StorageMode;
62786337
/** @private */
62796338
subscriptionType: string;
62806339
/** @private */
@@ -6289,6 +6348,8 @@ export class AppSettings {
62896348
adminHost: string;
62906349
/** @private */
62916350
clientHost: string;
6351+
/** @private */
6352+
storageMode: StorageMode;
62926353
/**
62936354
* @private
62946355
* @param {AppSettingsBuilder}
@@ -6326,9 +6387,14 @@ export class AppSettings {
63266387
getAdminHost(): string;
63276388
/**
63286389
* This method returns the client host to which the SDK should connect.
6329-
* @returns {boolean}
6390+
* @returns {string}
63306391
*/
63316392
getClientHost(): string;
6393+
/**
6394+
* This method returns the storage mode (local or session) set using the `setStorageMode()` of the AppSettingsBuilder.
6395+
* @returns {StorageMode}
6396+
*/
6397+
getStorageMode(): StorageMode;
63326398
}
63336399
export class AppSettingsBuilder {
63346400
/** @private */
@@ -6345,6 +6411,8 @@ export class AppSettingsBuilder {
63456411
adminHost: string;
63466412
/** @private */
63476413
clientHost: string;
6414+
/** @private */
6415+
storageMode: StorageMode;
63486416
/**
63496417
* A method to subscribe presence for all users.
63506418
* @returns
@@ -6391,6 +6459,13 @@ export class AppSettingsBuilder {
63916459
* @returns
63926460
*/
63936461
overrideClientHost(clientHost: string): this;
6462+
/**
6463+
* @param {StorageMode} storageMode
6464+
* This method is used to set the storage mode for the SDK. Default is 'local' (localStorage).
6465+
* Use 'session' for sessionStorage.
6466+
* @returns {this}
6467+
*/
6468+
setStorageMode(storageMode: StorageMode): this;
63946469
/**
63956470
* This method will return an object of the AppSettings class.
63966471
* @returns {AppSettings}

CometChat.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cometchat/chat-sdk-javascript",
3-
"version": "4.1.2",
3+
"version": "4.1.3",
44
"description": "A complete chat solution.",
55
"main": "CometChat.js",
66
"scripts": {

0 commit comments

Comments
 (0)