mezon-js 2.9.23 → 2.9.26

Sign up to get free protection for your applications and to get access to all the features.
package/api.gen.ts CHANGED
@@ -686,6 +686,38 @@ export interface ApiChannelMessageList {
686
686
  messages?: Array<ApiChannelMessage>;
687
687
  }
688
688
 
689
+ /** */
690
+ export interface ApiChannelSettingItem {
691
+ //
692
+ active?: number;
693
+ //
694
+ category_id?: string;
695
+ //
696
+ channel_label?: string;
697
+ //
698
+ channel_private?: number;
699
+ //
700
+ channel_type?: number;
701
+ //
702
+ creator_id?: string;
703
+ //
704
+ id?: string;
705
+ //
706
+ meeting_code?: string;
707
+ //
708
+ parent_id?: string;
709
+ //
710
+ user_ids?: Array<string>;
711
+ }
712
+
713
+ /** */
714
+ export interface ApiChannelSettingListResponse {
715
+ //
716
+ channel_setting_list?: Array<ApiChannelSettingItem>;
717
+ //
718
+ clan_id?: string;
719
+ }
720
+
689
721
  /** A list of users belonging to a channel, along with their role. */
690
722
  export interface ApiChannelUserList {
691
723
  //
@@ -4340,6 +4372,58 @@ export class MezonApi {
4340
4372
  ]);
4341
4373
  }
4342
4374
 
4375
+ /** List channel setting */
4376
+ listChannelSetting(bearerToken: string,
4377
+ clanId:string,
4378
+ parentId?:string,
4379
+ categoryId?:string,
4380
+ privateChannel?:number,
4381
+ active?:number,
4382
+ status?:number,
4383
+ type?:number,
4384
+ limit?:number,
4385
+ page?:number,
4386
+ options: any = {}): Promise<ApiChannelSettingListResponse> {
4387
+
4388
+ if (clanId === null || clanId === undefined) {
4389
+ throw new Error("'clanId' is a required parameter but is null or undefined.");
4390
+ }
4391
+ const urlPath = "/v2/channelsetting/{clanId}"
4392
+ .replace("{clanId}", encodeURIComponent(String(clanId)));
4393
+ const queryParams = new Map<string, any>();
4394
+ queryParams.set("parent_id", parentId);
4395
+ queryParams.set("category_id", categoryId);
4396
+ queryParams.set("private_channel", privateChannel);
4397
+ queryParams.set("active", active);
4398
+ queryParams.set("status", status);
4399
+ queryParams.set("type", type);
4400
+ queryParams.set("limit", limit);
4401
+ queryParams.set("page", page);
4402
+
4403
+ let bodyJson : string = "";
4404
+
4405
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
4406
+ const fetchOptions = buildFetchOptions("GET", options, bodyJson);
4407
+ if (bearerToken) {
4408
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
4409
+ }
4410
+
4411
+ return Promise.race([
4412
+ fetch(fullUrl, fetchOptions).then((response) => {
4413
+ if (response.status == 204) {
4414
+ return response;
4415
+ } else if (response.status >= 200 && response.status < 300) {
4416
+ return response.json();
4417
+ } else {
4418
+ throw response;
4419
+ }
4420
+ }),
4421
+ new Promise((_, reject) =>
4422
+ setTimeout(reject, this.timeoutMs, "Request timed out.")
4423
+ ),
4424
+ ]);
4425
+ }
4426
+
4343
4427
  /** List all users that are part of a channel. */
4344
4428
  listChannelVoiceUsers(
4345
4429
  bearerToken: string,
@@ -8188,18 +8272,17 @@ export class MezonApi {
8188
8272
  }
8189
8273
 
8190
8274
  /** ListUserPermissionInChannel */
8191
- listUserPermissionInChannel(
8192
- bearerToken: string,
8193
- clanId?: string,
8194
- channelId?: string,
8195
- options: any = {}
8196
- ): Promise<ApiUserPermissionInChannelListResponse> {
8275
+ listUserPermissionInChannel(bearerToken: string,
8276
+ clanId?:string,
8277
+ channelId?:string,
8278
+ options: any = {}): Promise<ApiUserPermissionInChannelListResponse> {
8279
+
8197
8280
  const urlPath = "/v2/users/clans/channels";
8198
8281
  const queryParams = new Map<string, any>();
8199
8282
  queryParams.set("clan_id", clanId);
8200
8283
  queryParams.set("channel_id", channelId);
8201
8284
 
8202
- let bodyJson: string = "";
8285
+ let bodyJson : string = "";
8203
8286
 
8204
8287
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
8205
8288
  const fetchOptions = buildFetchOptions("GET", options, bodyJson);
package/client.ts CHANGED
@@ -3001,7 +3001,7 @@ export class Client {
3001
3001
  session: Session,
3002
3002
  messageId: string,
3003
3003
  channelId: string,
3004
- clanId: string,
3004
+ clanId: string
3005
3005
  ): Promise<ApiPinMessagesList> {
3006
3006
  if (
3007
3007
  this.autoRefreshSession &&
@@ -3919,4 +3919,42 @@ export class Client {
3919
3919
  return Promise.resolve(response);
3920
3920
  });
3921
3921
  }
3922
+
3923
+ async getChannelSettingInClan(
3924
+ session: Session,
3925
+ clanId: string,
3926
+ parentId?: string,
3927
+ categoryId?: string,
3928
+ privateChannel?: number,
3929
+ active?: number,
3930
+ status?: number,
3931
+ type?: number,
3932
+ limit?: number,
3933
+ page?: number
3934
+ ): Promise<any> {
3935
+ if (
3936
+ this.autoRefreshSession &&
3937
+ session.refresh_token &&
3938
+ session.isexpired((Date.now() + this.expiredTimespanMs) / 1000)
3939
+ ) {
3940
+ await this.sessionRefresh(session);
3941
+ }
3942
+
3943
+ return this.apiClient
3944
+ .listChannelSetting(
3945
+ session.token,
3946
+ clanId,
3947
+ parentId,
3948
+ categoryId,
3949
+ privateChannel,
3950
+ active,
3951
+ status,
3952
+ type,
3953
+ limit,
3954
+ page
3955
+ )
3956
+ .then((response: any) => {
3957
+ return Promise.resolve(response);
3958
+ });
3959
+ }
3922
3960
  }
package/dist/api.gen.d.ts CHANGED
@@ -395,6 +395,24 @@ export interface ApiChannelMessageList {
395
395
  last_sent_message?: ApiChannelMessageHeader;
396
396
  messages?: Array<ApiChannelMessage>;
397
397
  }
398
+ /** */
399
+ export interface ApiChannelSettingItem {
400
+ active?: number;
401
+ category_id?: string;
402
+ channel_label?: string;
403
+ channel_private?: number;
404
+ channel_type?: number;
405
+ creator_id?: string;
406
+ id?: string;
407
+ meeting_code?: string;
408
+ parent_id?: string;
409
+ user_ids?: Array<string>;
410
+ }
411
+ /** */
412
+ export interface ApiChannelSettingListResponse {
413
+ channel_setting_list?: Array<ApiChannelSettingItem>;
414
+ clan_id?: string;
415
+ }
398
416
  /** A list of users belonging to a channel, along with their role. */
399
417
  export interface ApiChannelUserList {
400
418
  channel_id?: string;
@@ -1332,6 +1350,8 @@ export declare class MezonApi {
1332
1350
  deleteChannelDesc(bearerToken: string, channelId: string, options?: any): Promise<any>;
1333
1351
  /** Update fields in a given channel. */
1334
1352
  updateChannelDesc(bearerToken: string, channelId: string, body: {}, options?: any): Promise<any>;
1353
+ /** List channel setting */
1354
+ listChannelSetting(bearerToken: string, clanId: string, parentId?: string, categoryId?: string, privateChannel?: number, active?: number, status?: number, type?: number, limit?: number, page?: number, options?: any): Promise<ApiChannelSettingListResponse>;
1335
1355
  /** List all users that are part of a channel. */
1336
1356
  listChannelVoiceUsers(bearerToken: string, clanId?: string, channelId?: string, channelType?: number, limit?: number, state?: number, cursor?: string, options?: any): Promise<ApiVoiceChannelUserList>;
1337
1357
  /** List clans */
package/dist/client.d.ts CHANGED
@@ -577,4 +577,5 @@ export declare class Client {
577
577
  listUserPermissionInChannel(session: Session, clanId?: string, channelId?: string): Promise<ApiUserPermissionInChannelListResponse>;
578
578
  getPermissionByRoleIdChannelId(session: Session, roleId?: string, channelId?: string, userId?: string): Promise<ApiPermissionRoleChannelListEventResponse>;
579
579
  markAsRead(session: Session, request: ApiMarkAsReadRequest): Promise<any>;
580
+ getChannelSettingInClan(session: Session, clanId: string, parentId?: string, categoryId?: string, privateChannel?: number, active?: number, status?: number, type?: number, limit?: number, page?: number): Promise<any>;
580
581
  }
@@ -2436,6 +2436,42 @@ var MezonApi = class {
2436
2436
  )
2437
2437
  ]);
2438
2438
  }
2439
+ /** List channel setting */
2440
+ listChannelSetting(bearerToken, clanId, parentId, categoryId, privateChannel, active, status, type, limit, page, options = {}) {
2441
+ if (clanId === null || clanId === void 0) {
2442
+ throw new Error("'clanId' is a required parameter but is null or undefined.");
2443
+ }
2444
+ const urlPath = "/v2/channelsetting/{clanId}".replace("{clanId}", encodeURIComponent(String(clanId)));
2445
+ const queryParams = /* @__PURE__ */ new Map();
2446
+ queryParams.set("parent_id", parentId);
2447
+ queryParams.set("category_id", categoryId);
2448
+ queryParams.set("private_channel", privateChannel);
2449
+ queryParams.set("active", active);
2450
+ queryParams.set("status", status);
2451
+ queryParams.set("type", type);
2452
+ queryParams.set("limit", limit);
2453
+ queryParams.set("page", page);
2454
+ let bodyJson = "";
2455
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
2456
+ const fetchOptions = buildFetchOptions("GET", options, bodyJson);
2457
+ if (bearerToken) {
2458
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
2459
+ }
2460
+ return Promise.race([
2461
+ fetch(fullUrl, fetchOptions).then((response) => {
2462
+ if (response.status == 204) {
2463
+ return response;
2464
+ } else if (response.status >= 200 && response.status < 300) {
2465
+ return response.json();
2466
+ } else {
2467
+ throw response;
2468
+ }
2469
+ }),
2470
+ new Promise(
2471
+ (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
2472
+ )
2473
+ ]);
2474
+ }
2439
2475
  /** List all users that are part of a channel. */
2440
2476
  listChannelVoiceUsers(bearerToken, clanId, channelId, channelType, limit, state, cursor, options = {}) {
2441
2477
  const urlPath = "/v2/channelvoice";
@@ -5950,6 +5986,8 @@ var _DefaultSocket = class _DefaultSocket {
5950
5986
  this.onstreamingchannelleaved(message.streaming_leaved_event);
5951
5987
  } else if (message.set_permission_channel_event) {
5952
5988
  this.onsetpermissionchannel(message.set_permission_channel_event);
5989
+ } else if (message.event_user_permission_channel) {
5990
+ this.onuserpermissionchannel(message.event_user_permission_channel);
5953
5991
  } else {
5954
5992
  if (this.verbose && window && window.console) {
5955
5993
  console.log("Unrecognized message received: %o", message);
@@ -6212,6 +6250,11 @@ var _DefaultSocket = class _DefaultSocket {
6212
6250
  console.log(set_permission_channel_event);
6213
6251
  }
6214
6252
  }
6253
+ onuserpermissionchannel(event_user_permission_channel) {
6254
+ if (this.verbose && window && window.console) {
6255
+ console.log(event_user_permission_channel);
6256
+ }
6257
+ }
6215
6258
  send(message, sendTimeout = _DefaultSocket.DefaultSendTimeoutMs) {
6216
6259
  const untypedMessage = message;
6217
6260
  return new Promise((resolve, reject) => {
@@ -6367,90 +6410,6 @@ var _DefaultSocket = class _DefaultSocket {
6367
6410
  return response.check_name_existed_event;
6368
6411
  });
6369
6412
  }
6370
- listClanEmojiByUserId() {
6371
- return __async(this, null, function* () {
6372
- const response = yield this.send({ emojis_listed_event: {} });
6373
- return response.emojis_listed_event;
6374
- });
6375
- }
6376
- listUserPermissionInChannel(clan_id, channel_id) {
6377
- return __async(this, null, function* () {
6378
- const response = yield this.send({ user_permission_in_channel_list_event: { clan_id, channel_id } });
6379
- return response.user_permission_in_channel_list_event;
6380
- });
6381
- }
6382
- listRoles(ClanId, Limit, State, Cursor) {
6383
- return __async(this, null, function* () {
6384
- const response = yield this.send({ role_list_event: { ClanId, Limit, State, Cursor } });
6385
- return response.role_list_event;
6386
- });
6387
- }
6388
- listChannelByUserId() {
6389
- return __async(this, null, function* () {
6390
- const response = yield this.send({ channel_desc_list_event: {} });
6391
- return response.channel_desc_list_event;
6392
- });
6393
- }
6394
- listUserClansByUserId() {
6395
- return __async(this, null, function* () {
6396
- const response = yield this.send({ all_user_clans: {} });
6397
- return response.all_user_clans;
6398
- });
6399
- }
6400
- listUsersAddChannelByChannelId(channelId, limit) {
6401
- return __async(this, null, function* () {
6402
- const response = yield this.send({ all_users_add_channel_event: { channel_id: channelId, limit } });
6403
- return response.all_users_add_channel_event;
6404
- });
6405
- }
6406
- hashtagDMList(user_id, limit) {
6407
- return __async(this, null, function* () {
6408
- const response = yield this.send({ hashtag_dm_list_event: { user_id, limit } });
6409
- return response.hashtag_dm_list_event;
6410
- });
6411
- }
6412
- getPermissionByRoleIdChannelId(role_id, channel_id, user_id) {
6413
- return __async(this, null, function* () {
6414
- const response = yield this.send({ permission_role_channel_list_event: { role_id, channel_id, user_id } });
6415
- return response.permission_role_channel_list_event;
6416
- });
6417
- }
6418
- listStickersByUserId() {
6419
- return __async(this, null, function* () {
6420
- const response = yield this.send({ sticker_listed_event: {} });
6421
- return response.sticker_listed_event;
6422
- });
6423
- }
6424
- getNotificationChannelSetting(channel_id) {
6425
- return __async(this, null, function* () {
6426
- const response = yield this.send({ notification_channel_setting_event: { channel_id } });
6427
- return response.notification_channel_setting_event;
6428
- });
6429
- }
6430
- getNotificationCategorySetting(category_id) {
6431
- return __async(this, null, function* () {
6432
- const response = yield this.send({ notification_category_setting_event: { category_id } });
6433
- return response.notification_category_setting_event;
6434
- });
6435
- }
6436
- getNotificationClanSetting(clan_id) {
6437
- return __async(this, null, function* () {
6438
- const response = yield this.send({ notification_clan_setting_event: { clan_id } });
6439
- return response.notification_clan_setting_event;
6440
- });
6441
- }
6442
- getNotificationReactMessage(channel_id) {
6443
- return __async(this, null, function* () {
6444
- const response = yield this.send({ notifi_react_message_event: { channel_id } });
6445
- return response.notifi_react_message_event;
6446
- });
6447
- }
6448
- getNotificationChannelCategorySetting(clan_id) {
6449
- return __async(this, null, function* () {
6450
- const response = yield this.send({ notification_channel_category_setting_event: { clan_id } });
6451
- return response.notification_channel_category_setting_event;
6452
- });
6453
- }
6454
6413
  pingPong() {
6455
6414
  return __async(this, null, function* () {
6456
6415
  if (!this.adapter.isOpen()) {
@@ -8550,4 +8509,25 @@ var Client = class {
8550
8509
  });
8551
8510
  });
8552
8511
  }
8512
+ getChannelSettingInClan(session, clanId, parentId, categoryId, privateChannel, active, status, type, limit, page) {
8513
+ return __async(this, null, function* () {
8514
+ if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
8515
+ yield this.sessionRefresh(session);
8516
+ }
8517
+ return this.apiClient.listChannelSetting(
8518
+ session.token,
8519
+ clanId,
8520
+ parentId,
8521
+ categoryId,
8522
+ privateChannel,
8523
+ active,
8524
+ status,
8525
+ type,
8526
+ limit,
8527
+ page
8528
+ ).then((response) => {
8529
+ return Promise.resolve(response);
8530
+ });
8531
+ });
8532
+ }
8553
8533
  };
@@ -2407,6 +2407,42 @@ var MezonApi = class {
2407
2407
  )
2408
2408
  ]);
2409
2409
  }
2410
+ /** List channel setting */
2411
+ listChannelSetting(bearerToken, clanId, parentId, categoryId, privateChannel, active, status, type, limit, page, options = {}) {
2412
+ if (clanId === null || clanId === void 0) {
2413
+ throw new Error("'clanId' is a required parameter but is null or undefined.");
2414
+ }
2415
+ const urlPath = "/v2/channelsetting/{clanId}".replace("{clanId}", encodeURIComponent(String(clanId)));
2416
+ const queryParams = /* @__PURE__ */ new Map();
2417
+ queryParams.set("parent_id", parentId);
2418
+ queryParams.set("category_id", categoryId);
2419
+ queryParams.set("private_channel", privateChannel);
2420
+ queryParams.set("active", active);
2421
+ queryParams.set("status", status);
2422
+ queryParams.set("type", type);
2423
+ queryParams.set("limit", limit);
2424
+ queryParams.set("page", page);
2425
+ let bodyJson = "";
2426
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
2427
+ const fetchOptions = buildFetchOptions("GET", options, bodyJson);
2428
+ if (bearerToken) {
2429
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
2430
+ }
2431
+ return Promise.race([
2432
+ fetch(fullUrl, fetchOptions).then((response) => {
2433
+ if (response.status == 204) {
2434
+ return response;
2435
+ } else if (response.status >= 200 && response.status < 300) {
2436
+ return response.json();
2437
+ } else {
2438
+ throw response;
2439
+ }
2440
+ }),
2441
+ new Promise(
2442
+ (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
2443
+ )
2444
+ ]);
2445
+ }
2410
2446
  /** List all users that are part of a channel. */
2411
2447
  listChannelVoiceUsers(bearerToken, clanId, channelId, channelType, limit, state, cursor, options = {}) {
2412
2448
  const urlPath = "/v2/channelvoice";
@@ -5921,6 +5957,8 @@ var _DefaultSocket = class _DefaultSocket {
5921
5957
  this.onstreamingchannelleaved(message.streaming_leaved_event);
5922
5958
  } else if (message.set_permission_channel_event) {
5923
5959
  this.onsetpermissionchannel(message.set_permission_channel_event);
5960
+ } else if (message.event_user_permission_channel) {
5961
+ this.onuserpermissionchannel(message.event_user_permission_channel);
5924
5962
  } else {
5925
5963
  if (this.verbose && window && window.console) {
5926
5964
  console.log("Unrecognized message received: %o", message);
@@ -6183,6 +6221,11 @@ var _DefaultSocket = class _DefaultSocket {
6183
6221
  console.log(set_permission_channel_event);
6184
6222
  }
6185
6223
  }
6224
+ onuserpermissionchannel(event_user_permission_channel) {
6225
+ if (this.verbose && window && window.console) {
6226
+ console.log(event_user_permission_channel);
6227
+ }
6228
+ }
6186
6229
  send(message, sendTimeout = _DefaultSocket.DefaultSendTimeoutMs) {
6187
6230
  const untypedMessage = message;
6188
6231
  return new Promise((resolve, reject) => {
@@ -6338,90 +6381,6 @@ var _DefaultSocket = class _DefaultSocket {
6338
6381
  return response.check_name_existed_event;
6339
6382
  });
6340
6383
  }
6341
- listClanEmojiByUserId() {
6342
- return __async(this, null, function* () {
6343
- const response = yield this.send({ emojis_listed_event: {} });
6344
- return response.emojis_listed_event;
6345
- });
6346
- }
6347
- listUserPermissionInChannel(clan_id, channel_id) {
6348
- return __async(this, null, function* () {
6349
- const response = yield this.send({ user_permission_in_channel_list_event: { clan_id, channel_id } });
6350
- return response.user_permission_in_channel_list_event;
6351
- });
6352
- }
6353
- listRoles(ClanId, Limit, State, Cursor) {
6354
- return __async(this, null, function* () {
6355
- const response = yield this.send({ role_list_event: { ClanId, Limit, State, Cursor } });
6356
- return response.role_list_event;
6357
- });
6358
- }
6359
- listChannelByUserId() {
6360
- return __async(this, null, function* () {
6361
- const response = yield this.send({ channel_desc_list_event: {} });
6362
- return response.channel_desc_list_event;
6363
- });
6364
- }
6365
- listUserClansByUserId() {
6366
- return __async(this, null, function* () {
6367
- const response = yield this.send({ all_user_clans: {} });
6368
- return response.all_user_clans;
6369
- });
6370
- }
6371
- listUsersAddChannelByChannelId(channelId, limit) {
6372
- return __async(this, null, function* () {
6373
- const response = yield this.send({ all_users_add_channel_event: { channel_id: channelId, limit } });
6374
- return response.all_users_add_channel_event;
6375
- });
6376
- }
6377
- hashtagDMList(user_id, limit) {
6378
- return __async(this, null, function* () {
6379
- const response = yield this.send({ hashtag_dm_list_event: { user_id, limit } });
6380
- return response.hashtag_dm_list_event;
6381
- });
6382
- }
6383
- getPermissionByRoleIdChannelId(role_id, channel_id, user_id) {
6384
- return __async(this, null, function* () {
6385
- const response = yield this.send({ permission_role_channel_list_event: { role_id, channel_id, user_id } });
6386
- return response.permission_role_channel_list_event;
6387
- });
6388
- }
6389
- listStickersByUserId() {
6390
- return __async(this, null, function* () {
6391
- const response = yield this.send({ sticker_listed_event: {} });
6392
- return response.sticker_listed_event;
6393
- });
6394
- }
6395
- getNotificationChannelSetting(channel_id) {
6396
- return __async(this, null, function* () {
6397
- const response = yield this.send({ notification_channel_setting_event: { channel_id } });
6398
- return response.notification_channel_setting_event;
6399
- });
6400
- }
6401
- getNotificationCategorySetting(category_id) {
6402
- return __async(this, null, function* () {
6403
- const response = yield this.send({ notification_category_setting_event: { category_id } });
6404
- return response.notification_category_setting_event;
6405
- });
6406
- }
6407
- getNotificationClanSetting(clan_id) {
6408
- return __async(this, null, function* () {
6409
- const response = yield this.send({ notification_clan_setting_event: { clan_id } });
6410
- return response.notification_clan_setting_event;
6411
- });
6412
- }
6413
- getNotificationReactMessage(channel_id) {
6414
- return __async(this, null, function* () {
6415
- const response = yield this.send({ notifi_react_message_event: { channel_id } });
6416
- return response.notifi_react_message_event;
6417
- });
6418
- }
6419
- getNotificationChannelCategorySetting(clan_id) {
6420
- return __async(this, null, function* () {
6421
- const response = yield this.send({ notification_channel_category_setting_event: { clan_id } });
6422
- return response.notification_channel_category_setting_event;
6423
- });
6424
- }
6425
6384
  pingPong() {
6426
6385
  return __async(this, null, function* () {
6427
6386
  if (!this.adapter.isOpen()) {
@@ -8521,6 +8480,27 @@ var Client = class {
8521
8480
  });
8522
8481
  });
8523
8482
  }
8483
+ getChannelSettingInClan(session, clanId, parentId, categoryId, privateChannel, active, status, type, limit, page) {
8484
+ return __async(this, null, function* () {
8485
+ if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
8486
+ yield this.sessionRefresh(session);
8487
+ }
8488
+ return this.apiClient.listChannelSetting(
8489
+ session.token,
8490
+ clanId,
8491
+ parentId,
8492
+ categoryId,
8493
+ privateChannel,
8494
+ active,
8495
+ status,
8496
+ type,
8497
+ limit,
8498
+ page
8499
+ ).then((response) => {
8500
+ return Promise.resolve(response);
8501
+ });
8502
+ });
8503
+ }
8524
8504
  };
8525
8505
  export {
8526
8506
  ChannelStreamMode,
package/dist/socket.d.ts CHANGED
@@ -13,7 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { ApiChannelDescList, ApiChannelMessageHeader, ApiCreateEventRequest, ApiGiveCoffeeEvent, ApiHashtagDmList, ApiMessageAttachment, ApiMessageMention, ApiMessageReaction, ApiMessageRef, ApiNotificationChannelCategorySettingList, ApiPermissionList, ApiPermissionUpdate, ApiRole, ApiRoleList, ApiRpc, ApiUser } from "./api.gen";
16
+ import { ApiChannelMessageHeader, ApiCreateEventRequest, ApiGiveCoffeeEvent, ApiMessageAttachment, ApiMessageMention, ApiMessageReaction, ApiMessageRef, ApiPermissionUpdate, ApiRole, ApiRpc } from "./api.gen";
17
17
  import { Session } from "./session";
18
18
  import { ChannelMessage, Notification } from "./client";
19
19
  import { WebSocketAdapter } from "./web_socket_adapter";
@@ -338,15 +338,6 @@ export interface ClanDeletedEvent {
338
338
  clan_id: string;
339
339
  deletor: string;
340
340
  }
341
- export interface PermissionRoleChannelListEvent {
342
- role_id?: string;
343
- channel_id?: string;
344
- permission_role_channel?: Array<PermissionRoleChannel>;
345
- }
346
- export interface PermissionRoleChannel {
347
- permission_id?: string;
348
- active?: boolean;
349
- }
350
341
  export interface ClanUpdatedEvent {
351
342
  clan_id: string;
352
343
  clan_name: string;
@@ -436,10 +427,6 @@ export interface CheckNameExistedEvent {
436
427
  type: number;
437
428
  }
438
429
  /** */
439
- export interface StrickerListedEvent {
440
- stickers?: Array<ClanSticker>;
441
- }
442
- /** */
443
430
  export interface ClanSticker {
444
431
  category?: string;
445
432
  clan_id?: string;
@@ -451,25 +438,11 @@ export interface ClanSticker {
451
438
  logo?: string;
452
439
  clan_name?: string;
453
440
  }
454
- /** */
455
- export interface EmojiListedEvent {
456
- emoji_list?: Array<ClanEmoji>;
457
- }
458
- export interface RoleListEvent {
459
- Limit: number;
460
- State: number;
461
- Cursor: string;
462
- ClanId: string;
463
- roles: ApiRoleList;
464
- }
465
441
  export interface RoleEvent {
466
442
  role: ApiRole;
467
443
  status: number;
468
444
  user_id: string;
469
445
  }
470
- export interface AllUsersAddChannelEvent {
471
- user_ids: Array<string>;
472
- }
473
446
  export interface EventEmoji {
474
447
  id: string;
475
448
  clan_id: string;
@@ -481,11 +454,6 @@ export interface EventEmoji {
481
454
  logo: string;
482
455
  clan_name: string;
483
456
  }
484
- export interface UserPermissionInChannelListEvent {
485
- clan_id: string;
486
- channel_id: string;
487
- permissions: ApiPermissionList;
488
- }
489
457
  /** */
490
458
  export interface ClanEmoji {
491
459
  category?: string;
@@ -498,14 +466,6 @@ export interface ClanEmoji {
498
466
  clan_id?: string;
499
467
  }
500
468
  /** */
501
- export interface ChannelDescListEvent {
502
- channeldesc?: ApiChannelDescList;
503
- }
504
- /** */
505
- export interface AllUserClans {
506
- user?: Array<ApiUser>;
507
- }
508
- /** */
509
469
  export interface ChannelDescription {
510
470
  clan_id?: string;
511
471
  channel_id?: string;
@@ -518,11 +478,6 @@ export interface ChannelDescription {
518
478
  parrent_id?: string;
519
479
  last_sent_message?: ApiChannelMessageHeader;
520
480
  }
521
- export interface HashtagDmListEvent {
522
- user_id?: Array<string>;
523
- limit?: number;
524
- hashtag_dm?: ApiHashtagDmList;
525
- }
526
481
  export interface HashtagDm {
527
482
  channel_id?: string;
528
483
  channel_label?: string;
@@ -533,37 +488,10 @@ export interface HashtagDm {
533
488
  channel_private?: number;
534
489
  parrent_id?: string;
535
490
  }
536
- export interface NotificationChannelSettingEvent {
537
- channel_id?: string;
538
- notification_user_channel?: NotificationUserChannel;
539
- }
540
- export interface NotificationUserChannel {
541
- active?: number;
542
- id?: string;
543
- notification_setting_type?: number;
544
- time_mute?: string;
545
- }
546
- export interface NotificationCategorySettingEvent {
547
- category_id?: string;
548
- notification_user_channel?: NotificationUserChannel;
549
- }
550
- export interface NotificationClanSettingEvent {
551
- clan_id?: string;
552
- notification_setting?: NotificationSetting;
553
- }
554
491
  export interface NotificationSetting {
555
492
  id?: string;
556
493
  notification_setting_type?: number;
557
494
  }
558
- export interface NotifiReactMessageEvent {
559
- channel_id?: string;
560
- notifi_react_message?: NotifiReactMessage;
561
- }
562
- export interface NotifiReactMessage {
563
- id?: string;
564
- user_id?: string;
565
- channel_id_req?: string;
566
- }
567
495
  export interface NotificationChannelCategorySetting {
568
496
  id: string;
569
497
  channel_category_label: string;
@@ -571,10 +499,6 @@ export interface NotificationChannelCategorySetting {
571
499
  channel_category_title: string;
572
500
  action: number;
573
501
  }
574
- export interface NotificationChannelCategorySettingEvent {
575
- clan_id?: string;
576
- notification_channel_category_settings_list?: ApiNotificationChannelCategorySettingList;
577
- }
578
502
  export interface UserEmojiUsage {
579
503
  user_id: string;
580
504
  emoji_id: string;
@@ -656,6 +580,12 @@ export interface SetPermissionChannelEvent {
656
580
  channel_id: string;
657
581
  /** List permission update */
658
582
  permission_updates: ApiPermissionUpdate[];
583
+ /** */
584
+ caller: string;
585
+ }
586
+ export interface EventUserPermissionChannel {
587
+ user_id: string;
588
+ channel_id: string;
659
589
  }
660
590
  /** A socket connection to Mezon server. */
661
591
  export interface Socket {
@@ -757,20 +687,6 @@ export interface Socket {
757
687
  setHeartbeatTimeoutMs(ms: number): void;
758
688
  getHeartbeatTimeoutMs(): number;
759
689
  checkDuplicateName(name: string, condition_id: string, type: number): Promise<CheckNameExistedEvent>;
760
- listClanEmojiByUserId(): Promise<EmojiListedEvent>;
761
- listUserPermissionInChannel(clan_id: string, channel_id: string): Promise<UserPermissionInChannelListEvent>;
762
- listRoles(ClanId: string, Limit: number, State: number, Cursor: string): Promise<RoleListEvent>;
763
- listStickersByUserId(): Promise<StrickerListedEvent>;
764
- listChannelByUserId(): Promise<ChannelDescListEvent>;
765
- listUserClansByUserId(): Promise<AllUserClans>;
766
- listUsersAddChannelByChannelId(channelId: string, limit: number): Promise<AllUsersAddChannelEvent>;
767
- hashtagDMList(user_id: Array<string>, limit: number): Promise<HashtagDmListEvent>;
768
- getNotificationChannelSetting(channel_id: string): Promise<NotificationChannelSettingEvent>;
769
- getNotificationCategorySetting(category_id: string): Promise<NotificationCategorySettingEvent>;
770
- getNotificationClanSetting(clan_id: string): Promise<NotificationClanSettingEvent>;
771
- getNotificationReactMessage(channel_id_req: string): Promise<NotifiReactMessageEvent>;
772
- getPermissionByRoleIdChannelId(role_id: string, channel_id: string, user_id: string): Promise<PermissionRoleChannelListEvent>;
773
- getNotificationChannelCategorySetting(clan_id: string): Promise<NotificationChannelCategorySettingEvent>;
774
690
  oneventcreated: (clan_event_created: ApiCreateEventRequest) => void;
775
691
  oncoffeegiven: (give_coffee_event: ApiGiveCoffeeEvent) => void;
776
692
  oneventemoji: (event_emoji: EventEmoji) => void;
@@ -780,6 +696,7 @@ export interface Socket {
780
696
  onstreamingchanneljoined: (streaming_joined_event: StreamingJoinedEvent) => void;
781
697
  onstreamingchannelleaved: (streaming_leaved_event: StreamingLeavedEvent) => void;
782
698
  onsetpermissionchannel: (set_permission_channel_event: SetPermissionChannelEvent) => void;
699
+ onuserpermissionchannel: (event_user_permission_channel: EventUserPermissionChannel) => void;
783
700
  }
784
701
  /** Reports an error received from a socket message. */
785
702
  export interface SocketError {
@@ -851,6 +768,7 @@ export declare class DefaultSocket implements Socket {
851
768
  onstreamingchanneljoined(streaming_joined_event: StreamingJoinedEvent): void;
852
769
  onstreamingchannelleaved(streaming_leaved_event: StreamingLeavedEvent): void;
853
770
  onsetpermissionchannel(set_permission_channel_event: SetPermissionChannelEvent): void;
771
+ onuserpermissionchannel(event_user_permission_channel: EventUserPermissionChannel): void;
854
772
  send(message: ChannelJoin | ChannelLeave | ChannelMessageSend | ChannelMessageUpdate | CustomStatusEvent | ChannelMessageRemove | MessageTypingEvent | LastSeenMessageEvent | Rpc | StatusFollow | StatusUnfollow | StatusUpdate | Ping, sendTimeout?: number): Promise<any>;
855
773
  followUsers(userIds: string[]): Promise<Status>;
856
774
  joinClanChat(clan_id: string): Promise<ClanJoin>;
@@ -870,20 +788,6 @@ export declare class DefaultSocket implements Socket {
870
788
  writeVoiceLeaved(id: string, clanId: string, voiceChannelId: string, voiceUserId: string): Promise<VoiceLeavedEvent>;
871
789
  writeCustomStatus(clan_id: string, status: string): Promise<CustomStatusEvent>;
872
790
  checkDuplicateName(name: string, condition_id: string, type: number): Promise<CheckNameExistedEvent>;
873
- listClanEmojiByUserId(): Promise<EmojiListedEvent>;
874
- listUserPermissionInChannel(clan_id: string, channel_id: string): Promise<UserPermissionInChannelListEvent>;
875
- listRoles(ClanId: string, Limit: number, State: number, Cursor: string): Promise<RoleListEvent>;
876
- listChannelByUserId(): Promise<ChannelDescListEvent>;
877
- listUserClansByUserId(): Promise<AllUserClans>;
878
- listUsersAddChannelByChannelId(channelId: string, limit: number): Promise<AllUsersAddChannelEvent>;
879
- hashtagDMList(user_id: Array<string>, limit: number): Promise<HashtagDmListEvent>;
880
- getPermissionByRoleIdChannelId(role_id: string, channel_id: string, user_id: string): Promise<PermissionRoleChannelListEvent>;
881
- listStickersByUserId(): Promise<StrickerListedEvent>;
882
- getNotificationChannelSetting(channel_id: string): Promise<NotificationChannelSettingEvent>;
883
- getNotificationCategorySetting(category_id: string): Promise<NotificationCategorySettingEvent>;
884
- getNotificationClanSetting(clan_id: string): Promise<NotificationClanSettingEvent>;
885
- getNotificationReactMessage(channel_id: string): Promise<NotifiReactMessageEvent>;
886
- getNotificationChannelCategorySetting(clan_id: string): Promise<NotificationChannelCategorySettingEvent>;
887
791
  private pingPong;
888
792
  }
889
793
  export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mezon-js",
3
3
 
4
- "version": "2.9.23",
4
+ "version": "2.9.26",
5
5
 
6
6
  "scripts": {
7
7
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
package/socket.ts CHANGED
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { ApiChannelDescList, ApiChannelMessageHeader, ApiCreateEventRequest, ApiGiveCoffeeEvent, ApiHashtagDmList, ApiMessageAttachment, ApiMessageMention, ApiMessageReaction, ApiMessageRef, ApiNotification, ApiNotificationChannelCategorySettingList, ApiPermissionList, ApiPermissionUpdate, ApiRole, ApiRoleList, ApiRpc, ApiUser} from "./api.gen";
17
+ import { ApiChannelMessageHeader, ApiCreateEventRequest, ApiGiveCoffeeEvent, ApiMessageAttachment, ApiMessageMention, ApiMessageReaction, ApiMessageRef, ApiNotification, ApiPermissionUpdate, ApiRole, ApiRpc} from "./api.gen";
18
18
  import {Session} from "./session";
19
19
  import {ChannelMessage, Notification} from "./client";
20
20
  import {WebSocketAdapter, WebSocketAdapterText} from "./web_socket_adapter"
@@ -506,24 +506,6 @@ export interface ClanDeletedEvent {
506
506
  deletor: string;
507
507
  }
508
508
 
509
- // A list of permission role channel.
510
- export interface PermissionRoleChannelListEvent {
511
- //
512
- role_id?: string;
513
- //
514
- channel_id?: string;
515
- // A list of permission.
516
- permission_role_channel?: Array<PermissionRoleChannel>;
517
- }
518
-
519
- // Permission role channel
520
- export interface PermissionRoleChannel {
521
- // Permission id
522
- permission_id?: string;
523
- // active
524
- active?: boolean;
525
- }
526
-
527
509
  // clan updated event
528
510
  export interface ClanUpdatedEvent {
529
511
  // the clan id
@@ -627,13 +609,6 @@ export interface CheckNameExistedEvent {
627
609
  type: number;
628
610
  }
629
611
 
630
-
631
- /** */
632
- export interface StrickerListedEvent {
633
- // sticker data
634
- stickers?: Array<ClanSticker>;
635
- }
636
-
637
612
  /** */
638
613
  export interface ClanSticker {
639
614
  //
@@ -656,34 +631,12 @@ export interface ClanSticker {
656
631
  clan_name?: string;
657
632
  }
658
633
 
659
- /** */
660
- export interface EmojiListedEvent {
661
- // emoji data
662
- emoji_list?: Array<ClanEmoji>;
663
- }
664
-
665
- export interface RoleListEvent {
666
- Limit: number;
667
- // The role state to list.
668
- State: number;
669
- // Cursor to start from
670
- Cursor: string;
671
- // The clan of this role
672
- ClanId: string;
673
- //
674
- roles: ApiRoleList;
675
- }
676
-
677
634
  export interface RoleEvent {
678
635
  role: ApiRole;
679
636
  status: number;
680
637
  user_id: string;
681
638
  }
682
639
 
683
- export interface AllUsersAddChannelEvent {
684
- user_ids: Array<string>;
685
- }
686
-
687
640
  export interface EventEmoji {
688
641
  id : string
689
642
  clan_id: string
@@ -696,15 +649,6 @@ export interface EventEmoji {
696
649
  clan_name: string
697
650
  }
698
651
 
699
- export interface UserPermissionInChannelListEvent {
700
- //
701
- clan_id: string;
702
- //
703
- channel_id: string;
704
- // A list of permission.
705
- permissions: ApiPermissionList;
706
- }
707
-
708
652
  /** */
709
653
  export interface ClanEmoji {
710
654
  //
@@ -725,18 +669,6 @@ export interface ClanEmoji {
725
669
  clan_id?: string;
726
670
  }
727
671
 
728
- /** */
729
- export interface ChannelDescListEvent {
730
- //
731
- channeldesc?: ApiChannelDescList;
732
- }
733
-
734
- /** */
735
- export interface AllUserClans {
736
- //
737
- user?: Array<ApiUser>;
738
- }
739
-
740
672
  /** */
741
673
  export interface ChannelDescription {
742
674
  // The clan of this channel
@@ -761,16 +693,6 @@ export interface ChannelDescription {
761
693
  last_sent_message?: ApiChannelMessageHeader;
762
694
  }
763
695
 
764
- // A list of Channel
765
- export interface HashtagDmListEvent {
766
- // user Id
767
- user_id?: Array<string>;
768
- // Max number of records to return. Between 1 and 100.
769
- limit?: number;
770
- // A list of channel.
771
- hashtag_dm?: ApiHashtagDmList;
772
- }
773
-
774
696
  // hashtagDM
775
697
  export interface HashtagDm {
776
698
  // The channel id.
@@ -791,38 +713,6 @@ export interface HashtagDm {
791
713
  parrent_id?: string;
792
714
  }
793
715
 
794
- export interface NotificationChannelSettingEvent {
795
- // The channel id.
796
- channel_id?: string;
797
- //
798
- notification_user_channel?: NotificationUserChannel;
799
- }
800
-
801
- export interface NotificationUserChannel {
802
- //
803
- active?: number;
804
- //
805
- id?: string;
806
- //
807
- notification_setting_type?: number;
808
- //
809
- time_mute?: string;
810
- }
811
-
812
- export interface NotificationCategorySettingEvent {
813
- //
814
- category_id?: string;
815
- //
816
- notification_user_channel?: NotificationUserChannel;
817
- }
818
-
819
- export interface NotificationClanSettingEvent {
820
- // The clan of this channel
821
- clan_id?: string;
822
- //
823
- notification_setting?: NotificationSetting;
824
- }
825
-
826
716
  export interface NotificationSetting {
827
717
  //
828
718
  id?: string;
@@ -830,22 +720,6 @@ export interface NotificationSetting {
830
720
  notification_setting_type?: number;
831
721
  }
832
722
 
833
- export interface NotifiReactMessageEvent {
834
- //
835
- channel_id?: string;
836
- //
837
- notifi_react_message?: NotifiReactMessage;
838
- }
839
-
840
- export interface NotifiReactMessage {
841
- //
842
- id?: string;
843
- //
844
- user_id?: string;
845
- //
846
- channel_id_req?: string;
847
- }
848
-
849
723
  export interface NotificationChannelCategorySetting {
850
724
  // Notification id
851
725
  id: string;
@@ -859,11 +733,6 @@ export interface NotificationChannelCategorySetting {
859
733
  action: number
860
734
  }
861
735
 
862
- export interface NotificationChannelCategorySettingEvent {
863
- clan_id? : string;
864
- notification_channel_category_settings_list?: ApiNotificationChannelCategorySettingList
865
- }
866
-
867
736
  export interface UserEmojiUsage {
868
737
  user_id: string;
869
738
  emoji_id: string;
@@ -953,6 +822,13 @@ export interface SetPermissionChannelEvent {
953
822
  channel_id: string;
954
823
  /** List permission update */
955
824
  permission_updates: ApiPermissionUpdate[];
825
+ /** */
826
+ caller: string;
827
+ }
828
+
829
+ export interface EventUserPermissionChannel{
830
+ user_id: string;
831
+ channel_id: string;
956
832
  }
957
833
 
958
834
  /** A socket connection to Mezon server. */
@@ -1127,34 +1003,6 @@ export interface Socket {
1127
1003
 
1128
1004
  checkDuplicateName(name: string, condition_id: string, type: number): Promise<CheckNameExistedEvent>;
1129
1005
 
1130
- listClanEmojiByUserId(): Promise<EmojiListedEvent>;
1131
-
1132
- listUserPermissionInChannel(clan_id: string, channel_id: string): Promise<UserPermissionInChannelListEvent>;
1133
-
1134
- listRoles(ClanId: string, Limit: number, State: number, Cursor: string): Promise<RoleListEvent>;
1135
-
1136
- listStickersByUserId(): Promise<StrickerListedEvent>;
1137
-
1138
- listChannelByUserId(): Promise<ChannelDescListEvent>;
1139
-
1140
- listUserClansByUserId(): Promise<AllUserClans>;
1141
-
1142
- listUsersAddChannelByChannelId(channelId: string, limit: number): Promise<AllUsersAddChannelEvent>;
1143
-
1144
- hashtagDMList(user_id: Array<string>, limit: number): Promise<HashtagDmListEvent>;
1145
-
1146
- getNotificationChannelSetting(channel_id: string): Promise<NotificationChannelSettingEvent>;
1147
-
1148
- getNotificationCategorySetting(category_id: string): Promise<NotificationCategorySettingEvent>;
1149
-
1150
- getNotificationClanSetting(clan_id: string): Promise<NotificationClanSettingEvent>;
1151
-
1152
- getNotificationReactMessage(channel_id_req: string): Promise<NotifiReactMessageEvent>;
1153
-
1154
- getPermissionByRoleIdChannelId(role_id: string, channel_id: string, user_id: string): Promise<PermissionRoleChannelListEvent>;
1155
-
1156
- getNotificationChannelCategorySetting(clan_id : string): Promise<NotificationChannelCategorySettingEvent>;
1157
-
1158
1006
  oneventcreated: (clan_event_created: ApiCreateEventRequest) => void;
1159
1007
 
1160
1008
  oncoffeegiven: (give_coffee_event: ApiGiveCoffeeEvent) => void;
@@ -1172,6 +1020,8 @@ export interface Socket {
1172
1020
  onstreamingchannelleaved: (streaming_leaved_event: StreamingLeavedEvent) => void;
1173
1021
 
1174
1022
  onsetpermissionchannel: (set_permission_channel_event: SetPermissionChannelEvent) => void;
1023
+
1024
+ onuserpermissionchannel: (event_user_permission_channel: EventUserPermissionChannel) => void;
1175
1025
  }
1176
1026
 
1177
1027
  /** Reports an error received from a socket message. */
@@ -1371,7 +1221,9 @@ export class DefaultSocket implements Socket {
1371
1221
  this.onstreamingchannelleaved(<StreamingLeavedEvent>message.streaming_leaved_event);
1372
1222
  } else if(message.set_permission_channel_event){
1373
1223
  this.onsetpermissionchannel(<SetPermissionChannelEvent>message.set_permission_channel_event);
1374
- }else {
1224
+ } else if(message.event_user_permission_channel){
1225
+ this.onuserpermissionchannel(<EventUserPermissionChannel>message.event_user_permission_channel);
1226
+ } else {
1375
1227
  if (this.verbose && window && window.console) {
1376
1228
  console.log("Unrecognized message received: %o", message);
1377
1229
  }
@@ -1685,6 +1537,12 @@ export class DefaultSocket implements Socket {
1685
1537
  }
1686
1538
  }
1687
1539
 
1540
+ onuserpermissionchannel(event_user_permission_channel: EventUserPermissionChannel){
1541
+ if (this.verbose && window && window.console) {
1542
+ console.log(event_user_permission_channel);
1543
+ }
1544
+ }
1545
+
1688
1546
  send(message: ChannelJoin | ChannelLeave | ChannelMessageSend | ChannelMessageUpdate | CustomStatusEvent |
1689
1547
  ChannelMessageRemove | MessageTypingEvent | LastSeenMessageEvent | Rpc | StatusFollow | StatusUnfollow | StatusUpdate | Ping, sendTimeout = DefaultSocket.DefaultSendTimeoutMs): Promise<any> {
1690
1548
  const untypedMessage = message as any;
@@ -1839,76 +1697,6 @@ export class DefaultSocket implements Socket {
1839
1697
  return response.check_name_existed_event
1840
1698
  }
1841
1699
 
1842
- async listClanEmojiByUserId(): Promise<EmojiListedEvent> {
1843
- const response = await this.send({emojis_listed_event: {}});
1844
- return response.emojis_listed_event
1845
- }
1846
-
1847
- async listUserPermissionInChannel(clan_id: string, channel_id: string): Promise<UserPermissionInChannelListEvent> {
1848
- const response = await this.send({user_permission_in_channel_list_event : {clan_id: clan_id, channel_id: channel_id }});
1849
- return response.user_permission_in_channel_list_event
1850
- }
1851
-
1852
- async listRoles(ClanId: string, Limit: number, State: number, Cursor: string): Promise<RoleListEvent> {
1853
- const response = await this.send({role_list_event: {ClanId: ClanId, Limit: Limit, State: State, Cursor: Cursor}});
1854
- return response.role_list_event
1855
- }
1856
-
1857
- async listChannelByUserId(): Promise<ChannelDescListEvent> {
1858
- const response = await this.send({channel_desc_list_event: {}});
1859
- return response.channel_desc_list_event
1860
- }
1861
-
1862
- async listUserClansByUserId(): Promise<AllUserClans> {
1863
- const response = await this.send({all_user_clans: {}});
1864
- return response.all_user_clans
1865
- }
1866
-
1867
- async listUsersAddChannelByChannelId(channelId: string, limit: number): Promise<AllUsersAddChannelEvent> {
1868
- const response = await this.send({all_users_add_channel_event: {channel_id: channelId, limit: limit}});
1869
- return response.all_users_add_channel_event
1870
- }
1871
-
1872
- async hashtagDMList(user_id: Array<string>, limit: number): Promise<HashtagDmListEvent> {
1873
- const response = await this.send({hashtag_dm_list_event: {user_id: user_id, limit: limit }});
1874
- return response.hashtag_dm_list_event
1875
- }
1876
-
1877
- async getPermissionByRoleIdChannelId(role_id: string, channel_id: string, user_id: string): Promise<PermissionRoleChannelListEvent> {
1878
- const response = await this.send({permission_role_channel_list_event: {role_id: role_id, channel_id: channel_id, user_id: user_id }});
1879
- return response.permission_role_channel_list_event
1880
- }
1881
-
1882
- async listStickersByUserId(): Promise<StrickerListedEvent> {
1883
- const response = await this.send({sticker_listed_event: {}});
1884
- return response.sticker_listed_event
1885
- }
1886
-
1887
- async getNotificationChannelSetting(channel_id: string): Promise<NotificationChannelSettingEvent> {
1888
- const response = await this.send({notification_channel_setting_event: {channel_id: channel_id}})
1889
- return response.notification_channel_setting_event
1890
- }
1891
-
1892
- async getNotificationCategorySetting(category_id: string): Promise<NotificationCategorySettingEvent> {
1893
- const response = await this.send({notification_category_setting_event: {category_id: category_id}})
1894
- return response.notification_category_setting_event
1895
- }
1896
-
1897
- async getNotificationClanSetting(clan_id: string): Promise<NotificationClanSettingEvent> {
1898
- const response = await this.send({notification_clan_setting_event: {clan_id: clan_id}})
1899
- return response.notification_clan_setting_event
1900
- }
1901
-
1902
- async getNotificationReactMessage(channel_id: string): Promise<NotifiReactMessageEvent> {
1903
- const response = await this.send({notifi_react_message_event: {channel_id: channel_id}})
1904
- return response.notifi_react_message_event
1905
- }
1906
-
1907
- async getNotificationChannelCategorySetting(clan_id: string): Promise<NotificationChannelCategorySettingEvent> {
1908
- const response = await this.send({notification_channel_category_setting_event: {clan_id : clan_id}})
1909
- return response.notification_channel_category_setting_event
1910
- }
1911
-
1912
1700
  private async pingPong(): Promise<void> {
1913
1701
  if (!this.adapter.isOpen()) {
1914
1702
  return;