@cometchat/chat-sdk-javascript 4.1.3 → 4.1.5
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 +113 -8
- package/CometChat.js +1 -1
- package/package.json +1 -1
package/CometChat.d.ts
CHANGED
|
@@ -300,7 +300,7 @@ export class CometChat {
|
|
|
300
300
|
};
|
|
301
301
|
SESSION_ID_REQUIRED: {
|
|
302
302
|
code: string;
|
|
303
|
-
|
|
303
|
+
name: string;
|
|
304
304
|
message: string;
|
|
305
305
|
details: {};
|
|
306
306
|
};
|
|
@@ -493,6 +493,7 @@ export class CometChat {
|
|
|
493
493
|
CORE_CONVERSATIONS_UPDATE_ON_GROUP_ACTIONS: string;
|
|
494
494
|
CORE_CONVERSATIONS_UPDATE_ON_CUSTOM_MESSAGES: string;
|
|
495
495
|
CORE_CONVERSATIONS_UPDATE_ON_REPLIES: string;
|
|
496
|
+
FLAG_REASONS: string;
|
|
496
497
|
};
|
|
497
498
|
};
|
|
498
499
|
static GroupConstants: {
|
|
@@ -2072,6 +2073,26 @@ export class CometChat {
|
|
|
2072
2073
|
* @return A ConversationUpdateSettings object that holds the settings for updating the conversation.
|
|
2073
2074
|
*/
|
|
2074
2075
|
static getConversationUpdateSettings(): Promise<ConversationUpdateSettings>;
|
|
2076
|
+
/**
|
|
2077
|
+
* Fetches the list of flag reasons configured in the CometChat Dashboard.
|
|
2078
|
+
* @returns {Promise<FlagReason[]>}
|
|
2079
|
+
* @memberof CometChat
|
|
2080
|
+
*/
|
|
2081
|
+
static getFlagReasons(): Promise<FlagReason[]>;
|
|
2082
|
+
/**
|
|
2083
|
+
* Allows users to flag a message with a specific reason and an optional remark.
|
|
2084
|
+
* @param {string} messageId
|
|
2085
|
+
* @param {{ reasonId?: string; remark?: string }} payload
|
|
2086
|
+
* @returns {Promise<{ success: boolean; message: string }>}
|
|
2087
|
+
* @memberof CometChat
|
|
2088
|
+
*/
|
|
2089
|
+
static flagMessage(messageId: string, payload: {
|
|
2090
|
+
reasonId: string;
|
|
2091
|
+
remark?: string;
|
|
2092
|
+
}): Promise<{
|
|
2093
|
+
success: boolean;
|
|
2094
|
+
message: string;
|
|
2095
|
+
}>;
|
|
2075
2096
|
}
|
|
2076
2097
|
|
|
2077
2098
|
export class CometChatNotifications {
|
|
@@ -3894,6 +3915,7 @@ export const APP_SETTINGS: {
|
|
|
3894
3915
|
CORE_CONVERSATIONS_UPDATE_ON_GROUP_ACTIONS: string;
|
|
3895
3916
|
CORE_CONVERSATIONS_UPDATE_ON_CUSTOM_MESSAGES: string;
|
|
3896
3917
|
CORE_CONVERSATIONS_UPDATE_ON_REPLIES: string;
|
|
3918
|
+
FLAG_REASONS: string;
|
|
3897
3919
|
};
|
|
3898
3920
|
};
|
|
3899
3921
|
export const COMMON_UTILITY_CONSTANTS: {
|
|
@@ -4002,6 +4024,14 @@ export const AI_ASSISTANT_EVENTS: {
|
|
|
4002
4024
|
TOOL_CALL_RESULT: string;
|
|
4003
4025
|
TOOL_CALL_ARGUMENT: string;
|
|
4004
4026
|
};
|
|
4027
|
+
export interface FlagReason {
|
|
4028
|
+
id: string;
|
|
4029
|
+
name: string;
|
|
4030
|
+
description: string;
|
|
4031
|
+
default?: boolean;
|
|
4032
|
+
createdAt: number;
|
|
4033
|
+
updatedAt: number;
|
|
4034
|
+
}
|
|
4005
4035
|
|
|
4006
4036
|
/**
|
|
4007
4037
|
*
|
|
@@ -4523,12 +4553,6 @@ export class Call extends BaseMessage implements Message {
|
|
|
4523
4553
|
MEDIA: string;
|
|
4524
4554
|
IMAGE: string;
|
|
4525
4555
|
VIDEO: string;
|
|
4526
|
-
AUDIO: string;
|
|
4527
|
-
FILE: string;
|
|
4528
|
-
CUSTOM: string;
|
|
4529
|
-
ASSISTANT: string;
|
|
4530
|
-
TOOL_RESULT: string;
|
|
4531
|
-
TOOL_ARGUMENTS: string;
|
|
4532
4556
|
};
|
|
4533
4557
|
static readonly RECEIVER_TYPE: {
|
|
4534
4558
|
USER: string;
|
|
@@ -4540,7 +4564,6 @@ export class Call extends BaseMessage implements Message {
|
|
|
4540
4564
|
CALL: string;
|
|
4541
4565
|
CUSTOM: string;
|
|
4542
4566
|
INTERACTIVE: string;
|
|
4543
|
-
AGENTIC: string;
|
|
4544
4567
|
};
|
|
4545
4568
|
static readonly ACTION_TYPE: {
|
|
4546
4569
|
TYPE_MEMBER_JOINED: string;
|
|
@@ -5000,6 +5023,12 @@ export class GroupsRequest {
|
|
|
5000
5023
|
* @return {boolean}
|
|
5001
5024
|
*/
|
|
5002
5025
|
isWithTags(): boolean;
|
|
5026
|
+
/**
|
|
5027
|
+
* Get the current page number that the request is on.
|
|
5028
|
+
*
|
|
5029
|
+
* @return {number}
|
|
5030
|
+
*/
|
|
5031
|
+
getPage(): number;
|
|
5003
5032
|
}
|
|
5004
5033
|
export class GroupsRequestBuilder {
|
|
5005
5034
|
/** @private */ limit: number;
|
|
@@ -5007,6 +5036,7 @@ export class GroupsRequestBuilder {
|
|
|
5007
5036
|
/** @private */ hasJoined: boolean;
|
|
5008
5037
|
/** @private */ tags: Array<String>;
|
|
5009
5038
|
/** @private */ showTags: boolean;
|
|
5039
|
+
/** @private */ page: number;
|
|
5010
5040
|
/**
|
|
5011
5041
|
*
|
|
5012
5042
|
* @param {number} limit
|
|
@@ -5041,6 +5071,13 @@ export class GroupsRequestBuilder {
|
|
|
5041
5071
|
* @returns
|
|
5042
5072
|
*/
|
|
5043
5073
|
withTags(withTags: boolean): this;
|
|
5074
|
+
/**
|
|
5075
|
+
*
|
|
5076
|
+
* @param {number} page
|
|
5077
|
+
* A method to set the page number to start fetching from. Page 0 will fetch the first page.
|
|
5078
|
+
* @returns
|
|
5079
|
+
*/
|
|
5080
|
+
setPage(page: number): this;
|
|
5044
5081
|
/**
|
|
5045
5082
|
* This method will return an object of the GroupsRequest class.
|
|
5046
5083
|
* @returns {GroupsRequest}
|
|
@@ -5084,6 +5121,12 @@ export class GroupMembersRequest {
|
|
|
5084
5121
|
* @return {String[]}
|
|
5085
5122
|
*/
|
|
5086
5123
|
getScopes(): String[];
|
|
5124
|
+
/**
|
|
5125
|
+
* Get the current page number that the request is on.
|
|
5126
|
+
*
|
|
5127
|
+
* @return {number}
|
|
5128
|
+
*/
|
|
5129
|
+
getPage(): number;
|
|
5087
5130
|
/**
|
|
5088
5131
|
* Gets the status filter used to fetch members based on their online or offline status.
|
|
5089
5132
|
*
|
|
@@ -5100,6 +5143,7 @@ export class GroupMembersRequestBuilder {
|
|
|
5100
5143
|
/** @private */ searchKeyword: string;
|
|
5101
5144
|
/** @private */ guid: string;
|
|
5102
5145
|
/** @private */ scopes?: Array<String>;
|
|
5146
|
+
/** @private */ page: number;
|
|
5103
5147
|
/** @private */ status: string;
|
|
5104
5148
|
constructor(guid: string);
|
|
5105
5149
|
/**
|
|
@@ -5130,6 +5174,13 @@ export class GroupMembersRequestBuilder {
|
|
|
5130
5174
|
* @returns
|
|
5131
5175
|
*/
|
|
5132
5176
|
setScopes(scopes: Array<String>): this;
|
|
5177
|
+
/**
|
|
5178
|
+
*
|
|
5179
|
+
* @param {number} page
|
|
5180
|
+
* A method to set the page number to start fetching from. Page 0 will fetch the first page.
|
|
5181
|
+
* @returns
|
|
5182
|
+
*/
|
|
5183
|
+
setPage(page: number): this;
|
|
5133
5184
|
/**
|
|
5134
5185
|
* A method to get the members belonging to a specific status.
|
|
5135
5186
|
* @param {string} status
|
|
@@ -5175,6 +5226,12 @@ export class BannedMembersRequest {
|
|
|
5175
5226
|
* @return {String[]}
|
|
5176
5227
|
*/
|
|
5177
5228
|
getScopes(): String[];
|
|
5229
|
+
/**
|
|
5230
|
+
* Get the current page number that the request is on.
|
|
5231
|
+
*
|
|
5232
|
+
* @return {number}
|
|
5233
|
+
*/
|
|
5234
|
+
getPage(): number;
|
|
5178
5235
|
/**
|
|
5179
5236
|
* @internal
|
|
5180
5237
|
*/
|
|
@@ -5185,6 +5242,7 @@ export class BannedMembersRequestBuilder {
|
|
|
5185
5242
|
/** @private */ searchKeyword: string;
|
|
5186
5243
|
/** @private */ guid: string;
|
|
5187
5244
|
/** @private */ scopes?: Array<String>;
|
|
5245
|
+
/** @private */ page: number;
|
|
5188
5246
|
constructor(guid: string);
|
|
5189
5247
|
/**
|
|
5190
5248
|
* Set the unique identifier of the group.
|
|
@@ -5214,6 +5272,13 @@ export class BannedMembersRequestBuilder {
|
|
|
5214
5272
|
* @returns
|
|
5215
5273
|
*/
|
|
5216
5274
|
setScopes(scopes: Array<String>): this;
|
|
5275
|
+
/**
|
|
5276
|
+
*
|
|
5277
|
+
* @param {number} page
|
|
5278
|
+
* A method to set the page number to start fetching from. Page 0 will fetch the first page.
|
|
5279
|
+
* @returns
|
|
5280
|
+
*/
|
|
5281
|
+
setPage(page: number): this;
|
|
5217
5282
|
/**
|
|
5218
5283
|
* This method will return an object of the BannedMembersRequest class.
|
|
5219
5284
|
* @returns {BannedMembersRequest}
|
|
@@ -5311,6 +5376,12 @@ export class UsersRequest {
|
|
|
5311
5376
|
* @return {string}
|
|
5312
5377
|
*/
|
|
5313
5378
|
getSortOrder(): string;
|
|
5379
|
+
/**
|
|
5380
|
+
* Get the current page number that the request is on.
|
|
5381
|
+
*
|
|
5382
|
+
* @return {number}
|
|
5383
|
+
*/
|
|
5384
|
+
getPage(): number;
|
|
5314
5385
|
/**
|
|
5315
5386
|
* Get list of next set of users based on the parameters specified in UsersRequestBuilder class The Developer need to call this method repeatedly using the same object of UsersRequestBuilder class to get paginated list of users.
|
|
5316
5387
|
* @returns {Promise<User[] | []>}
|
|
@@ -5335,6 +5406,7 @@ export class UsersRequestBuilder {
|
|
|
5335
5406
|
/** @private */ SortBy: string;
|
|
5336
5407
|
/** @private */ SortOrder: string;
|
|
5337
5408
|
/** @private */ SearchIn: Array<String>;
|
|
5409
|
+
/** @private */ page: number;
|
|
5338
5410
|
/**
|
|
5339
5411
|
* A method to set limit for the number of Users returned in a single iteration. A maximum of 100 users can fetched in a single iteration.
|
|
5340
5412
|
* @param {number} limit
|
|
@@ -5420,6 +5492,12 @@ export class UsersRequestBuilder {
|
|
|
5420
5492
|
* @returns
|
|
5421
5493
|
*/
|
|
5422
5494
|
searchIn(searchIn: Array<String>): this;
|
|
5495
|
+
/**
|
|
5496
|
+
* A method to set the page number to start fetching from. Page 0 will fetch the first page.
|
|
5497
|
+
* @param {number} page
|
|
5498
|
+
* @returns
|
|
5499
|
+
*/
|
|
5500
|
+
setPage(page: number): this;
|
|
5423
5501
|
/**
|
|
5424
5502
|
* This method will return an object of the UsersRequest class.
|
|
5425
5503
|
* @returns {UsersRequest}
|
|
@@ -5504,6 +5582,12 @@ export class ConversationsRequest {
|
|
|
5504
5582
|
* @returns {boolean}
|
|
5505
5583
|
*/
|
|
5506
5584
|
getUnread(): boolean;
|
|
5585
|
+
/**
|
|
5586
|
+
* Get the current page number that the request is on.
|
|
5587
|
+
*
|
|
5588
|
+
* @return {number}
|
|
5589
|
+
*/
|
|
5590
|
+
getPage(): number;
|
|
5507
5591
|
/**
|
|
5508
5592
|
* Determines whether agentic conversations should be hidden.
|
|
5509
5593
|
*
|
|
@@ -5529,6 +5613,7 @@ export class ConversationsRequestBuilder {
|
|
|
5529
5613
|
/** @private */ WithBlockedInfo: boolean;
|
|
5530
5614
|
/** @private */ searchKeyword: string;
|
|
5531
5615
|
/** @private */ unreadOnly: boolean;
|
|
5616
|
+
/** @private */ page: number;
|
|
5532
5617
|
/** @private */ hideAgentic: boolean;
|
|
5533
5618
|
/** @private */ onlyAgentic: boolean;
|
|
5534
5619
|
/**
|
|
@@ -5619,6 +5704,12 @@ export class ConversationsRequestBuilder {
|
|
|
5619
5704
|
* @returns
|
|
5620
5705
|
*/
|
|
5621
5706
|
setUnread(unread: boolean): this;
|
|
5707
|
+
/**
|
|
5708
|
+
* A method to set the page number to start fetching from. Page 0 will fetch the first page.
|
|
5709
|
+
* @param {number} page
|
|
5710
|
+
* @returns
|
|
5711
|
+
*/
|
|
5712
|
+
setPage(page: number): this;
|
|
5622
5713
|
/**
|
|
5623
5714
|
* A method to hide agentic conversations from the list.
|
|
5624
5715
|
* @param {boolean} hideAgentic
|
|
@@ -6275,6 +6366,12 @@ export class BlockedUsersRequest {
|
|
|
6275
6366
|
* @return {string}
|
|
6276
6367
|
*/
|
|
6277
6368
|
getSearchKeyword(): string;
|
|
6369
|
+
/**
|
|
6370
|
+
* Get the current page number that the request is on.
|
|
6371
|
+
*
|
|
6372
|
+
* @return {number}
|
|
6373
|
+
*/
|
|
6374
|
+
getPage(): number;
|
|
6278
6375
|
/** @internal */
|
|
6279
6376
|
getNextData(): any;
|
|
6280
6377
|
}
|
|
@@ -6282,6 +6379,7 @@ export class BlockedUsersRequestBuilder {
|
|
|
6282
6379
|
/** @private */ limit: number;
|
|
6283
6380
|
/** @private */ searchKeyword: string;
|
|
6284
6381
|
/** @private */ direction: string;
|
|
6382
|
+
/** @private */ page: number;
|
|
6285
6383
|
/**
|
|
6286
6384
|
*
|
|
6287
6385
|
* @param {number} limit
|
|
@@ -6303,6 +6401,13 @@ export class BlockedUsersRequestBuilder {
|
|
|
6303
6401
|
* @returns
|
|
6304
6402
|
*/
|
|
6305
6403
|
setDirection(direction: string): this;
|
|
6404
|
+
/**
|
|
6405
|
+
*
|
|
6406
|
+
* @param {number} page
|
|
6407
|
+
* A method to set the page number to start fetching from. Page 0 will fetch the first page.
|
|
6408
|
+
* @returns
|
|
6409
|
+
*/
|
|
6410
|
+
setPage(page: number): this;
|
|
6306
6411
|
/** @internal */
|
|
6307
6412
|
blockedByMe(): this;
|
|
6308
6413
|
/** @internal */
|