@@ -55,6 +55,14 @@ export namespace CometChat {
55
55
CANCELLED : string ;
56
56
ENDED : string ;
57
57
} ;
58
+ let SORT_BY : {
59
+ NAME : string ;
60
+ STATUS : string ;
61
+ }
62
+ let SORT_ORDER : {
63
+ ASCENDING : string ;
64
+ DESCENDING : string ;
65
+ }
58
66
59
67
let appSettings : AppSettings ;
60
68
@@ -512,6 +520,16 @@ export namespace CometChat {
512
520
*/
513
521
export function transferGroupOwnership ( guid : string , uid : string ) : Promise < string > ;
514
522
523
+ /**
524
+ * Function to create a group and add/ban members in/from that group.
525
+ * @param {Group } group
526
+ * @param {Array<GroupMember> } members
527
+ * @param {Array<String> } banMembers
528
+ * @returns {Promise<Object> }
529
+ * @memberof CometChat
530
+ */
531
+ export function createGroupWithMembers ( group : Group , members : Array < GroupMember > , banMembers : Array < string > ) : Promise < Object > ;
532
+
515
533
/**-------------------------------------------------------------------*
516
534
* Call related functions provided by CometChat class *
517
535
*--------------------------------------------------------------------**/
@@ -3218,6 +3236,10 @@ export class UsersRequestBuilder {
3218
3236
/** @private */ showFriendsOnly : boolean ;
3219
3237
/** @private */ showTags : boolean ;
3220
3238
/** @private */ UIDs : Array < String > ;
3239
+ /** @private */ SortBy : string ;
3240
+ /** @private */ SortOrder : string ;
3241
+ /** @private */ SearchIn : Array < String > ;
3242
+
3221
3243
/**
3222
3244
* 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.
3223
3245
* @param {number } limit
@@ -3278,6 +3300,31 @@ export class UsersRequestBuilder {
3278
3300
* @returns
3279
3301
*/
3280
3302
setUIDs ( uids : Array < String > ) : this;
3303
+ /**
3304
+ * A method to get the users sorted by either `name` or `status`.
3305
+ * It accepts a string as input.
3306
+ * By default the SDK fetches users sorted by `status`.
3307
+ * @param {string } sortBy
3308
+ * @returns
3309
+ */
3310
+ public sortBy ( sortBy : string ) : this;
3311
+ /**
3312
+ * A method to get the users sorted either in `asc` or `desc` order.
3313
+ * It accepts a string as input.
3314
+ * By default the SDK fetches users sorted in `asc` order.
3315
+ * @param {string } sortOrder
3316
+ * @returns
3317
+ */
3318
+ public sortByOrder ( sortOrder : string ) : this;
3319
+ /**
3320
+ * A method to set which field the search string should be searched.
3321
+ * It accepts an array of string as input.
3322
+ * It can be `["name"]`, `["uid"]` or `["name", "uid"]`.
3323
+ * By default the SDK searches the search string in `["name", "uid"]`.
3324
+ * @param {string[] } searchIn
3325
+ * @returns
3326
+ */
3327
+ public searchIn ( searchIn : Array < String > ) : this;
3281
3328
/**
3282
3329
* This method will return an object of the UsersRequest class.
3283
3330
* @returns {UsersRequest }
@@ -3303,6 +3350,8 @@ export class ConversationsRequestBuilder {
3303
3350
/** @private */ getUserAndGroupTags : boolean ;
3304
3351
/** @private */ tags : Array < String > ;
3305
3352
/** @private */ WithTags : boolean ;
3353
+ /** @private */ groupTags : Array < String > ;
3354
+ /** @private */ userTags : Array < String > ;
3306
3355
/**
3307
3356
*
3308
3357
* @param {number } limit
@@ -3336,6 +3385,18 @@ export class ConversationsRequestBuilder {
3336
3385
* @returns
3337
3386
*/
3338
3387
setTags ( tags : Array < String > ) : this;
3388
+ /**
3389
+ * A method to filter conversation list by group tags.
3390
+ * @param {Array<String> } groupTags
3391
+ * @returns
3392
+ */
3393
+ public setGroupTags ( groupTags : Array < String > ) : this;
3394
+ /**
3395
+ * A method to filter conversation list by user tags.
3396
+ * @param {Array<String> } userTags
3397
+ * @returns
3398
+ */
3399
+ public setUserTags ( userTags : Array < String > ) : this;
3339
3400
/**
3340
3401
* This method will return an object of the ConversationsRequest class.
3341
3402
* @returns {ConversationsRequest }
0 commit comments