mezon-js 2.8.39 → 2.8.40

Sign up to get free protection for your applications and to get access to all the features.
package/api.gen.ts CHANGED
@@ -165,6 +165,8 @@ export interface MezonUpdateRoleBody {
165
165
  //
166
166
  allow_mention?: number;
167
167
  //
168
+ clan_id?: string;
169
+ //
168
170
  color?: string;
169
171
  //
170
172
  description?: string;
@@ -183,7 +185,7 @@ export interface MezonUpdateRoleBody {
183
185
  /** Delete a role the user has access to. */
184
186
  export interface MezonUpdateRoleDeleteBody {
185
187
  //
186
- channel_id?: string;
188
+ clan_id?: string;
187
189
  }
188
190
 
189
191
  /** */
@@ -788,6 +790,8 @@ export interface ApiDeleteEventRequest {
788
790
  export interface ApiDeleteRoleRequest {
789
791
  //
790
792
  channel_id?: string;
793
+ //
794
+ clan_id?: string;
791
795
  //The id of a role.
792
796
  role_id?: string;
793
797
  }
@@ -1167,20 +1171,6 @@ export interface ApiPermissionList {
1167
1171
  permissions?: Array<ApiPermission>;
1168
1172
  }
1169
1173
 
1170
- /** */
1171
- export interface ApiPermissionRoleChannel {
1172
- //
1173
- active?: boolean;
1174
- //
1175
- permission_id?: string;
1176
- }
1177
-
1178
- /** A list of permission role channel. */
1179
- export interface ApiPermissionRoleChannelList {
1180
- //A list of permission.
1181
- permission_role_channel?: Array<ApiPermissionRoleChannel>;
1182
- }
1183
-
1184
1174
  /** */
1185
1175
  export interface ApiPermissionUpdate {
1186
1176
  //
@@ -5302,41 +5292,6 @@ export class MezonApi {
5302
5292
  ]);
5303
5293
  }
5304
5294
 
5305
- /** List permission role channel */
5306
- getListPermissionRoleChannel(bearerToken: string,
5307
- roleId?:string,
5308
- channelId?:string,
5309
- options: any = {}): Promise<ApiPermissionRoleChannelList> {
5310
-
5311
- const urlPath = "/v2/permissionrolechannel/get";
5312
- const queryParams = new Map<string, any>();
5313
- queryParams.set("role_id", roleId);
5314
- queryParams.set("channel_id", channelId);
5315
-
5316
- let bodyJson : string = "";
5317
-
5318
- const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
5319
- const fetchOptions = buildFetchOptions("GET", options, bodyJson);
5320
- if (bearerToken) {
5321
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
5322
- }
5323
-
5324
- return Promise.race([
5325
- fetch(fullUrl, fetchOptions).then((response) => {
5326
- if (response.status == 204) {
5327
- return response;
5328
- } else if (response.status >= 200 && response.status < 300) {
5329
- return response.json();
5330
- } else {
5331
- throw response;
5332
- }
5333
- }),
5334
- new Promise((_, reject) =>
5335
- setTimeout(reject, this.timeoutMs, "Request timed out.")
5336
- ),
5337
- ]);
5338
- }
5339
-
5340
5295
  /** set permission role channel. */
5341
5296
  setRoleChannelPermission(bearerToken: string,
5342
5297
  body:ApiUpdateRoleChannelRequest,
@@ -5812,7 +5767,7 @@ export class MezonApi {
5812
5767
  /** Update fields in a given role. */
5813
5768
  updateRole(bearerToken: string,
5814
5769
  roleId:string,
5815
- body:{},
5770
+ body:MezonUpdateRoleBody,
5816
5771
  options: any = {}): Promise<any> {
5817
5772
 
5818
5773
  if (roleId === null || roleId === undefined) {
package/client.ts CHANGED
@@ -93,11 +93,11 @@ import {
93
93
  ApiClanStickerAddRequest,
94
94
  MezonUpdateClanStickerByIdBody,
95
95
  MezonChangeChannelCategoryBody,
96
- ApiPermissionRoleChannelList,
97
96
  ApiUpdateRoleChannelRequest,
98
97
  ApiAddAppRequest,
99
98
  ApiAppList,
100
99
  ApiApp,
100
+ MezonUpdateRoleDeleteBody,
101
101
  } from "./api.gen";
102
102
 
103
103
  import { Session } from "./session";
@@ -453,6 +453,8 @@ export interface ApiUpdateRoleRequest {
453
453
  remove_user_ids: string[];
454
454
  /** The permissions to remove. */
455
455
  remove_permission_ids: string[];
456
+ //
457
+ clan_id: string
456
458
  }
457
459
 
458
460
  /** A client for Mezon server. */
@@ -1310,7 +1312,7 @@ export class Client {
1310
1312
  }
1311
1313
 
1312
1314
  /** Update action role when delete role */
1313
- async updateRoleDelete(session: Session, roleId:string, request:{}): Promise<boolean> {
1315
+ async updateRoleDelete(session: Session, roleId:string, request:MezonUpdateRoleDeleteBody): Promise<boolean> {
1314
1316
  if (this.autoRefreshSession && session.refresh_token &&
1315
1317
  session.isexpired((Date.now() + this.expiredTimespanMs)/1000)) {
1316
1318
  await this.sessionRefresh(session);
@@ -2212,18 +2214,6 @@ async changeChannelCategory(session: Session, id: string, request: MezonChangeCh
2212
2214
  })
2213
2215
  }
2214
2216
 
2215
- /** */
2216
- async getListPermissionRoleChannel(session: Session, roleId: string, channelId: string): Promise<ApiPermissionRoleChannelList> {
2217
- if (this.autoRefreshSession && session.refresh_token &&
2218
- session.isexpired((Date.now() + this.expiredTimespanMs)/1000)) {
2219
- await this.sessionRefresh(session);
2220
- }
2221
-
2222
- return this.apiClient.getListPermissionRoleChannel(session.token, roleId, channelId).then((response: ApiPermissionRoleChannelList) => {
2223
- return Promise.resolve(response);
2224
- });
2225
- }
2226
-
2227
2217
  /** */
2228
2218
  async setRoleChannelPermission(session: Session, request: ApiUpdateRoleChannelRequest): Promise<boolean> {
2229
2219
  if (this.autoRefreshSession && session.refresh_token &&
package/dist/api.gen.d.ts CHANGED
@@ -94,6 +94,7 @@ export interface MezonUpdateRoleBody {
94
94
  active_permission_ids?: Array<string>;
95
95
  add_user_ids?: Array<string>;
96
96
  allow_mention?: number;
97
+ clan_id?: string;
97
98
  color?: string;
98
99
  description?: string;
99
100
  display_online?: number;
@@ -104,7 +105,7 @@ export interface MezonUpdateRoleBody {
104
105
  }
105
106
  /** Delete a role the user has access to. */
106
107
  export interface MezonUpdateRoleDeleteBody {
107
- channel_id?: string;
108
+ clan_id?: string;
108
109
  }
109
110
  /** */
110
111
  export interface MezonUpdateUserProfileByClanBody {
@@ -452,6 +453,7 @@ export interface ApiDeleteEventRequest {
452
453
  /** Delete a role the user has access to. */
453
454
  export interface ApiDeleteRoleRequest {
454
455
  channel_id?: string;
456
+ clan_id?: string;
455
457
  role_id?: string;
456
458
  }
457
459
  /** Storage objects to delete. */
@@ -678,15 +680,6 @@ export interface ApiPermissionList {
678
680
  permissions?: Array<ApiPermission>;
679
681
  }
680
682
  /** */
681
- export interface ApiPermissionRoleChannel {
682
- active?: boolean;
683
- permission_id?: string;
684
- }
685
- /** A list of permission role channel. */
686
- export interface ApiPermissionRoleChannelList {
687
- permission_role_channel?: Array<ApiPermissionRoleChannel>;
688
- }
689
- /** */
690
683
  export interface ApiPermissionUpdate {
691
684
  permission_id?: string;
692
685
  type?: number;
@@ -1186,8 +1179,6 @@ export declare class MezonApi {
1186
1179
  deleteNotiReactMessage(bearerToken: string, channelId?: string, options?: any): Promise<any>;
1187
1180
  /** */
1188
1181
  setNotificationReactMessage(bearerToken: string, body: ApiNotificationChannel, options?: any): Promise<any>;
1189
- /** List permission role channel */
1190
- getListPermissionRoleChannel(bearerToken: string, roleId?: string, channelId?: string, options?: any): Promise<ApiPermissionRoleChannelList>;
1191
1182
  /** set permission role channel. */
1192
1183
  setRoleChannelPermission(bearerToken: string, body: ApiUpdateRoleChannelRequest, options?: any): Promise<any>;
1193
1184
  /** Get permission list */
@@ -1215,7 +1206,7 @@ export declare class MezonApi {
1215
1206
  /** Delete a role by ID. */
1216
1207
  deleteRole(bearerToken: string, roleId: string, channelId?: string, options?: any): Promise<any>;
1217
1208
  /** Update fields in a given role. */
1218
- updateRole(bearerToken: string, roleId: string, body: {}, options?: any): Promise<any>;
1209
+ updateRole(bearerToken: string, roleId: string, body: MezonUpdateRoleBody, options?: any): Promise<any>;
1219
1210
  /** List role permissions */
1220
1211
  listRolePermissions(bearerToken: string, roleId: string, options?: any): Promise<ApiPermissionList>;
1221
1212
  /** List role permissions */
package/dist/client.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 { ApiAccount, ApiAccountCustom, ApiAccountDevice, ApiAccountEmail, ApiAccountFacebook, ApiAccountFacebookInstantGame, ApiAccountGoogle, ApiAccountGameCenter, ApiAccountSteam, ApiChannelDescList, ApiChannelDescription, ApiCreateChannelDescRequest, ApiDeleteRoleRequest, ApiClanDescList, ApiCreateClanDescRequest, ApiClanDesc, ApiCategoryDesc, ApiCategoryDescList, ApiRoleList, ApiPermissionList, ApiRoleUserList, ApiRole, ApiCreateRoleRequest, ApiAddRoleChannelDescRequest, ApiCreateCategoryDescRequest, ApiUpdateCategoryDescRequest, ApiEvent, ApiUpdateAccountRequest, ApiAccountApple, ApiLinkSteamRequest, ApiClanDescProfile, ApiClanProfile, ApiChannelUserList, ApiClanUserList, ApiLinkInviteUserRequest, ApiUpdateEventRequest, ApiLinkInviteUser, ApiInviteUserRes, ApiUploadAttachmentRequest, ApiUploadAttachment, ApiMessageReaction, ApiMessageMention, ApiMessageAttachment, ApiMessageRef, ApiChannelMessageHeader, ApiVoiceChannelUserList, ApiChannelAttachmentList, ApiCreateEventRequest, ApiEventManagement, ApiEventList, ApiDeleteEventRequest, ApiNotificationChannelCategoySettingsList, ApiSetDefaultNotificationRequest, ApiSetNotificationRequest, ApiSetMuteNotificationRequest, ApiSearchMessageRequest, ApiSearchMessageResponse, ApiPinMessageRequest, ApiPinMessagesList, ApiDeleteChannelDescRequest, ApiChangeChannelPrivateRequest, ApiClanEmojiCreateRequest, MezonUpdateClanEmojiByIdBody, ApiWebhookCreateRequest, ApiWebhookListResponse, MezonUpdateWebhookByIdBody, ApiWebhookGenerateResponse, ApiCheckDuplicateClanNameResponse, ApiClanStickerAddRequest, MezonUpdateClanStickerByIdBody, MezonChangeChannelCategoryBody, ApiPermissionRoleChannelList, ApiUpdateRoleChannelRequest, ApiAddAppRequest, ApiAppList, ApiApp } from "./api.gen";
16
+ import { ApiAccount, ApiAccountCustom, ApiAccountDevice, ApiAccountEmail, ApiAccountFacebook, ApiAccountFacebookInstantGame, ApiAccountGoogle, ApiAccountGameCenter, ApiAccountSteam, ApiChannelDescList, ApiChannelDescription, ApiCreateChannelDescRequest, ApiDeleteRoleRequest, ApiClanDescList, ApiCreateClanDescRequest, ApiClanDesc, ApiCategoryDesc, ApiCategoryDescList, ApiRoleList, ApiPermissionList, ApiRoleUserList, ApiRole, ApiCreateRoleRequest, ApiAddRoleChannelDescRequest, ApiCreateCategoryDescRequest, ApiUpdateCategoryDescRequest, ApiEvent, ApiUpdateAccountRequest, ApiAccountApple, ApiLinkSteamRequest, ApiClanDescProfile, ApiClanProfile, ApiChannelUserList, ApiClanUserList, ApiLinkInviteUserRequest, ApiUpdateEventRequest, ApiLinkInviteUser, ApiInviteUserRes, ApiUploadAttachmentRequest, ApiUploadAttachment, ApiMessageReaction, ApiMessageMention, ApiMessageAttachment, ApiMessageRef, ApiChannelMessageHeader, ApiVoiceChannelUserList, ApiChannelAttachmentList, ApiCreateEventRequest, ApiEventManagement, ApiEventList, ApiDeleteEventRequest, ApiNotificationChannelCategoySettingsList, ApiSetDefaultNotificationRequest, ApiSetNotificationRequest, ApiSetMuteNotificationRequest, ApiSearchMessageRequest, ApiSearchMessageResponse, ApiPinMessageRequest, ApiPinMessagesList, ApiDeleteChannelDescRequest, ApiChangeChannelPrivateRequest, ApiClanEmojiCreateRequest, MezonUpdateClanEmojiByIdBody, ApiWebhookCreateRequest, ApiWebhookListResponse, MezonUpdateWebhookByIdBody, ApiWebhookGenerateResponse, ApiCheckDuplicateClanNameResponse, ApiClanStickerAddRequest, MezonUpdateClanStickerByIdBody, MezonChangeChannelCategoryBody, ApiUpdateRoleChannelRequest, ApiAddAppRequest, ApiAppList, ApiApp, MezonUpdateRoleDeleteBody } from "./api.gen";
17
17
  import { Session } from "./session";
18
18
  import { Socket } from "./socket";
19
19
  import { WebSocketAdapter } from "./web_socket_adapter";
@@ -308,6 +308,7 @@ export interface ApiUpdateRoleRequest {
308
308
  remove_user_ids: string[];
309
309
  /** The permissions to remove. */
310
310
  remove_permission_ids: string[];
311
+ clan_id: string;
311
312
  }
312
313
  /** A client for Mezon server. */
313
314
  export declare class Client {
@@ -417,7 +418,7 @@ export declare class Client {
417
418
  /** List permission */
418
419
  getListPermission(session: Session): Promise<ApiPermissionList>;
419
420
  /** Update action role when delete role */
420
- updateRoleDelete(session: Session, roleId: string, request: {}): Promise<boolean>;
421
+ updateRoleDelete(session: Session, roleId: string, request: MezonUpdateRoleDeleteBody): Promise<boolean>;
421
422
  /** List user roles */
422
423
  listRolePermissions(session: Session, roleId: string): Promise<ApiPermissionList>;
423
424
  /** List user roles */
@@ -535,8 +536,6 @@ export declare class Client {
535
536
  updateClanStickerById(session: Session, id: string, request: MezonUpdateClanStickerByIdBody): Promise<boolean>;
536
537
  changeChannelCategory(session: Session, id: string, request: MezonChangeChannelCategoryBody): Promise<boolean>;
537
538
  /** */
538
- getListPermissionRoleChannel(session: Session, roleId: string, channelId: string): Promise<ApiPermissionRoleChannelList>;
539
- /** */
540
539
  setRoleChannelPermission(session: Session, request: ApiUpdateRoleChannelRequest): Promise<boolean>;
541
540
  addApp(session: Session, request: ApiAddAppRequest): Promise<boolean>;
542
541
  getApp(session: Session, id: string): Promise<ApiApp>;
@@ -3468,33 +3468,6 @@ var MezonApi = class {
3468
3468
  )
3469
3469
  ]);
3470
3470
  }
3471
- /** List permission role channel */
3472
- getListPermissionRoleChannel(bearerToken, roleId, channelId, options = {}) {
3473
- const urlPath = "/v2/permissionrolechannel/get";
3474
- const queryParams = /* @__PURE__ */ new Map();
3475
- queryParams.set("role_id", roleId);
3476
- queryParams.set("channel_id", channelId);
3477
- let bodyJson = "";
3478
- const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
3479
- const fetchOptions = buildFetchOptions("GET", options, bodyJson);
3480
- if (bearerToken) {
3481
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
3482
- }
3483
- return Promise.race([
3484
- fetch(fullUrl, fetchOptions).then((response) => {
3485
- if (response.status == 204) {
3486
- return response;
3487
- } else if (response.status >= 200 && response.status < 300) {
3488
- return response.json();
3489
- } else {
3490
- throw response;
3491
- }
3492
- }),
3493
- new Promise(
3494
- (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
3495
- )
3496
- ]);
3497
- }
3498
3471
  /** set permission role channel. */
3499
3472
  setRoleChannelPermission(bearerToken, body, options = {}) {
3500
3473
  if (body === null || body === void 0) {
@@ -5096,6 +5069,12 @@ var _DefaultSocket = class _DefaultSocket {
5096
5069
  return response.hashtag_dm_list_event;
5097
5070
  });
5098
5071
  }
5072
+ GetPermissionByRoleIdChannelId(role_id, channel_id) {
5073
+ return __async(this, null, function* () {
5074
+ const response = yield this.send({ permission_role_channel_list_event: { role_id, channel_id } });
5075
+ return response.permission_role_channel_list_event;
5076
+ });
5077
+ }
5099
5078
  listClanStickersByClanId(clan_id) {
5100
5079
  return __async(this, null, function* () {
5101
5080
  const response = yield this.send({ sticker_listed_event: { clan_id } });
@@ -6764,17 +6743,6 @@ var Client = class {
6764
6743
  });
6765
6744
  }
6766
6745
  /** */
6767
- getListPermissionRoleChannel(session, roleId, channelId) {
6768
- return __async(this, null, function* () {
6769
- if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
6770
- yield this.sessionRefresh(session);
6771
- }
6772
- return this.apiClient.getListPermissionRoleChannel(session.token, roleId, channelId).then((response) => {
6773
- return Promise.resolve(response);
6774
- });
6775
- });
6776
- }
6777
- /** */
6778
6746
  setRoleChannelPermission(session, request) {
6779
6747
  return __async(this, null, function* () {
6780
6748
  if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
@@ -3439,33 +3439,6 @@ var MezonApi = class {
3439
3439
  )
3440
3440
  ]);
3441
3441
  }
3442
- /** List permission role channel */
3443
- getListPermissionRoleChannel(bearerToken, roleId, channelId, options = {}) {
3444
- const urlPath = "/v2/permissionrolechannel/get";
3445
- const queryParams = /* @__PURE__ */ new Map();
3446
- queryParams.set("role_id", roleId);
3447
- queryParams.set("channel_id", channelId);
3448
- let bodyJson = "";
3449
- const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
3450
- const fetchOptions = buildFetchOptions("GET", options, bodyJson);
3451
- if (bearerToken) {
3452
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
3453
- }
3454
- return Promise.race([
3455
- fetch(fullUrl, fetchOptions).then((response) => {
3456
- if (response.status == 204) {
3457
- return response;
3458
- } else if (response.status >= 200 && response.status < 300) {
3459
- return response.json();
3460
- } else {
3461
- throw response;
3462
- }
3463
- }),
3464
- new Promise(
3465
- (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
3466
- )
3467
- ]);
3468
- }
3469
3442
  /** set permission role channel. */
3470
3443
  setRoleChannelPermission(bearerToken, body, options = {}) {
3471
3444
  if (body === null || body === void 0) {
@@ -5067,6 +5040,12 @@ var _DefaultSocket = class _DefaultSocket {
5067
5040
  return response.hashtag_dm_list_event;
5068
5041
  });
5069
5042
  }
5043
+ GetPermissionByRoleIdChannelId(role_id, channel_id) {
5044
+ return __async(this, null, function* () {
5045
+ const response = yield this.send({ permission_role_channel_list_event: { role_id, channel_id } });
5046
+ return response.permission_role_channel_list_event;
5047
+ });
5048
+ }
5070
5049
  listClanStickersByClanId(clan_id) {
5071
5050
  return __async(this, null, function* () {
5072
5051
  const response = yield this.send({ sticker_listed_event: { clan_id } });
@@ -6735,17 +6714,6 @@ var Client = class {
6735
6714
  });
6736
6715
  }
6737
6716
  /** */
6738
- getListPermissionRoleChannel(session, roleId, channelId) {
6739
- return __async(this, null, function* () {
6740
- if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
6741
- yield this.sessionRefresh(session);
6742
- }
6743
- return this.apiClient.getListPermissionRoleChannel(session.token, roleId, channelId).then((response) => {
6744
- return Promise.resolve(response);
6745
- });
6746
- });
6747
- }
6748
- /** */
6749
6717
  setRoleChannelPermission(session, request) {
6750
6718
  return __async(this, null, function* () {
6751
6719
  if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
package/dist/socket.d.ts CHANGED
@@ -267,6 +267,15 @@ export interface ChannelDeletedEvent {
267
267
  channel_id: string;
268
268
  deletor: string;
269
269
  }
270
+ export interface PermissionRoleChannelListEvent {
271
+ role_id?: string;
272
+ channel_id?: string;
273
+ permission_role_channel?: Array<PermissionRoleChannel>;
274
+ }
275
+ export interface PermissionRoleChannel {
276
+ permission_id?: string;
277
+ active?: boolean;
278
+ }
270
279
  export interface ClanUpdatedEvent {
271
280
  clan_id: string;
272
281
  clan_name: string;
@@ -542,6 +551,7 @@ export interface Socket {
542
551
  getNotificationCategorySetting(category_id: string): Promise<NotificationCategorySettingEvent>;
543
552
  getNotificationClanSetting(clan_id: string): Promise<NotificationClanSettingEvent>;
544
553
  getNotificationReactMessage(channel_id_req: string): Promise<NotifiReactMessageEvent>;
554
+ GetPermissionByRoleIdChannelId(role_id: string, channel_id: string): Promise<PermissionRoleChannelListEvent>;
545
555
  }
546
556
  /** Reports an error received from a socket message. */
547
557
  export interface SocketError {
@@ -621,6 +631,7 @@ export declare class DefaultSocket implements Socket {
621
631
  listClanEmojiByClanId(clan_id: string): Promise<EmojiListedEvent>;
622
632
  ListChannelByUserId(): Promise<ChannelDescListEvent>;
623
633
  hashtagDMList(user_id: Array<string>, limit: number): Promise<HashtagDmListEvent>;
634
+ GetPermissionByRoleIdChannelId(role_id: string, channel_id: string): Promise<PermissionRoleChannelListEvent>;
624
635
  listClanStickersByClanId(clan_id: string): Promise<StrickerListedEvent>;
625
636
  getNotificationChannelSetting(channel_id: string): Promise<NotificationChannelSettingEvent>;
626
637
  getNotificationCategorySetting(category_id: string): Promise<NotificationCategorySettingEvent>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mezon-js",
3
- "version": "2.8.39",
3
+ "version": "2.8.40",
4
4
  "scripts": {
5
5
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
6
6
  },
package/socket.ts CHANGED
@@ -385,6 +385,24 @@ export interface ChannelDeletedEvent {
385
385
  deletor: string;
386
386
  }
387
387
 
388
+ // A list of permission role channel.
389
+ export interface PermissionRoleChannelListEvent {
390
+ //
391
+ role_id?: string;
392
+ //
393
+ channel_id?: string;
394
+ // A list of permission.
395
+ permission_role_channel?: Array<PermissionRoleChannel>;
396
+ }
397
+
398
+ // Permission role channel
399
+ export interface PermissionRoleChannel {
400
+ // Permission id
401
+ permission_id?: string;
402
+ // active
403
+ active?: boolean;
404
+ }
405
+
388
406
  // clan updated event
389
407
  export interface ClanUpdatedEvent {
390
408
  // the clan id
@@ -814,6 +832,7 @@ export interface Socket {
814
832
 
815
833
  getNotificationReactMessage(channel_id_req: string): Promise<NotifiReactMessageEvent>;
816
834
 
835
+ GetPermissionByRoleIdChannelId(role_id: string, channel_id: string): Promise<PermissionRoleChannelListEvent>;
817
836
  }
818
837
 
819
838
  /** Reports an error received from a socket message. */
@@ -1370,6 +1389,11 @@ export class DefaultSocket implements Socket {
1370
1389
  return response.hashtag_dm_list_event
1371
1390
  }
1372
1391
 
1392
+ async GetPermissionByRoleIdChannelId(role_id: string, channel_id: string): Promise<PermissionRoleChannelListEvent> {
1393
+ const response = await this.send({permission_role_channel_list_event: {role_id: role_id, channel_id: channel_id }});
1394
+ return response.permission_role_channel_list_event
1395
+ }
1396
+
1373
1397
  async listClanStickersByClanId(clan_id: string): Promise<StrickerListedEvent> {
1374
1398
  const response = await this.send({sticker_listed_event: {clan_id: clan_id}});
1375
1399
  return response.sticker_listed_event