mezon-js 2.8.55 → 2.8.56

Sign up to get free protection for your applications and to get access to all the features.
package/api.gen.ts CHANGED
@@ -137,6 +137,8 @@ export interface MezonUpdateClanStickerByIdBody {
137
137
  //
138
138
  category?: string;
139
139
  //
140
+ clan_id?: string;
141
+ //
140
142
  shortname?: string;
141
143
  //
142
144
  source?: string;
@@ -645,7 +647,7 @@ export interface ApiClanEmojiCreateRequest {
645
647
  /** Get clan profile. */
646
648
  export interface ApiClanProfile {
647
649
  //
648
- avartar?: string;
650
+ avatar?: string;
649
651
  //
650
652
  clan_id?: string;
651
653
  //
package/client.ts CHANGED
@@ -769,6 +769,17 @@ export class Client {
769
769
  });
770
770
  }
771
771
 
772
+ async deleteApp(session: Session, appId: string): Promise<boolean> {
773
+ if (this.autoRefreshSession && session.refresh_token &&
774
+ session.isexpired((Date.now() + this.expiredTimespanMs)/1000)) {
775
+ await this.sessionRefresh(session);
776
+ }
777
+
778
+ return this.apiClient.deleteApp(session.token, appId).then((response: any) => {
779
+ return response !== undefined;
780
+ });
781
+ }
782
+
772
783
  /** A socket created with the client's configuration. */
773
784
  createSocket(useSSL = false, verbose: boolean = false, adapter : WebSocketAdapter = new WebSocketAdapterText(), sendTimeoutMs : number = DefaultSocket.DefaultSendTimeoutMs): Socket {
774
785
  return new DefaultSocket(this.host, this.port, useSSL, verbose, adapter, sendTimeoutMs);
package/dist/api.gen.d.ts CHANGED
@@ -78,6 +78,7 @@ export interface MezonUpdateClanEmojiByIdBody {
78
78
  /** */
79
79
  export interface MezonUpdateClanStickerByIdBody {
80
80
  category?: string;
81
+ clan_id?: string;
81
82
  shortname?: string;
82
83
  source?: string;
83
84
  }
@@ -369,7 +370,7 @@ export interface ApiClanEmojiCreateRequest {
369
370
  }
370
371
  /** Get clan profile. */
371
372
  export interface ApiClanProfile {
372
- avartar?: string;
373
+ avatar?: string;
373
374
  clan_id?: string;
374
375
  nick_name?: string;
375
376
  user_id?: string;
package/dist/client.d.ts CHANGED
@@ -364,6 +364,7 @@ export declare class Client {
364
364
  addRolesChannelDesc(session: Session, request: ApiAddRoleChannelDescRequest): Promise<boolean>;
365
365
  /** Update action role when delete role */
366
366
  deleteRoleChannelDesc(session: Session, request: ApiDeleteRoleRequest): Promise<boolean>;
367
+ deleteApp(session: Session, appId: string): Promise<boolean>;
367
368
  /** A socket created with the client's configuration. */
368
369
  createSocket(useSSL?: boolean, verbose?: boolean, adapter?: WebSocketAdapter, sendTimeoutMs?: number): Socket;
369
370
  /** Delete one or more users by ID or username. */
@@ -5106,10 +5106,10 @@ var _DefaultSocket = class _DefaultSocket {
5106
5106
  return response.channel_desc_list_event;
5107
5107
  });
5108
5108
  }
5109
- ListUsersByUserId() {
5109
+ ListUserClansByUserId() {
5110
5110
  return __async(this, null, function* () {
5111
- const response = yield this.send({ list_user: {} });
5112
- return response.list_user;
5111
+ const response = yield this.send({ all_user_clans: {} });
5112
+ return response.all_user_clans;
5113
5113
  });
5114
5114
  }
5115
5115
  hashtagDMList(user_id, limit) {
@@ -5479,6 +5479,16 @@ var Client = class {
5479
5479
  });
5480
5480
  });
5481
5481
  }
5482
+ deleteApp(session, appId) {
5483
+ return __async(this, null, function* () {
5484
+ if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
5485
+ yield this.sessionRefresh(session);
5486
+ }
5487
+ return this.apiClient.deleteApp(session.token, appId).then((response) => {
5488
+ return response !== void 0;
5489
+ });
5490
+ });
5491
+ }
5482
5492
  /** A socket created with the client's configuration. */
5483
5493
  createSocket(useSSL = false, verbose = false, adapter = new WebSocketAdapterText(), sendTimeoutMs = DefaultSocket.DefaultSendTimeoutMs) {
5484
5494
  return new DefaultSocket(this.host, this.port, useSSL, verbose, adapter, sendTimeoutMs);
@@ -5077,10 +5077,10 @@ var _DefaultSocket = class _DefaultSocket {
5077
5077
  return response.channel_desc_list_event;
5078
5078
  });
5079
5079
  }
5080
- ListUsersByUserId() {
5080
+ ListUserClansByUserId() {
5081
5081
  return __async(this, null, function* () {
5082
- const response = yield this.send({ list_user: {} });
5083
- return response.list_user;
5082
+ const response = yield this.send({ all_user_clans: {} });
5083
+ return response.all_user_clans;
5084
5084
  });
5085
5085
  }
5086
5086
  hashtagDMList(user_id, limit) {
@@ -5450,6 +5450,16 @@ var Client = class {
5450
5450
  });
5451
5451
  });
5452
5452
  }
5453
+ deleteApp(session, appId) {
5454
+ return __async(this, null, function* () {
5455
+ if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
5456
+ yield this.sessionRefresh(session);
5457
+ }
5458
+ return this.apiClient.deleteApp(session.token, appId).then((response) => {
5459
+ return response !== void 0;
5460
+ });
5461
+ });
5462
+ }
5453
5463
  /** A socket created with the client's configuration. */
5454
5464
  createSocket(useSSL = false, verbose = false, adapter = new WebSocketAdapterText(), sendTimeoutMs = DefaultSocket.DefaultSendTimeoutMs) {
5455
5465
  return new DefaultSocket(this.host, this.port, useSSL, verbose, adapter, sendTimeoutMs);
package/dist/socket.d.ts CHANGED
@@ -400,7 +400,7 @@ export interface ChannelDescListEvent {
400
400
  channeldesc?: Array<ChannelDescription>;
401
401
  }
402
402
  /** */
403
- export interface ListUser {
403
+ export interface AllUserClans {
404
404
  user?: Array<ApiUser>;
405
405
  }
406
406
  /** */
@@ -568,7 +568,7 @@ export interface Socket {
568
568
  listClanEmojiByClanId(clan_id: string): Promise<EmojiListedEvent>;
569
569
  listClanStickersByClanId(clan_id: string): Promise<StrickerListedEvent>;
570
570
  ListChannelByUserId(): Promise<ChannelDescListEvent>;
571
- ListUsersByUserId(): Promise<ListUser>;
571
+ ListUserClansByUserId(): Promise<AllUserClans>;
572
572
  hashtagDMList(user_id: Array<string>, limit: number): Promise<HashtagDmListEvent>;
573
573
  getNotificationChannelSetting(channel_id: string): Promise<NotificationChannelSettingEvent>;
574
574
  getNotificationCategorySetting(category_id: string): Promise<NotificationCategorySettingEvent>;
@@ -655,7 +655,7 @@ export declare class DefaultSocket implements Socket {
655
655
  checkDuplicateClanName(clan_name: string): Promise<ClanNameExistedEvent>;
656
656
  listClanEmojiByClanId(clan_id: string): Promise<EmojiListedEvent>;
657
657
  ListChannelByUserId(): Promise<ChannelDescListEvent>;
658
- ListUsersByUserId(): Promise<ListUser>;
658
+ ListUserClansByUserId(): Promise<AllUserClans>;
659
659
  hashtagDMList(user_id: Array<string>, limit: number): Promise<HashtagDmListEvent>;
660
660
  GetPermissionByRoleIdChannelId(role_id: string, channel_id: string): Promise<PermissionRoleChannelListEvent>;
661
661
  listClanStickersByClanId(clan_id: string): Promise<StrickerListedEvent>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mezon-js",
3
- "version": "2.8.55",
3
+ "version": "2.8.56",
4
4
  "scripts": {
5
5
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
6
6
  },
package/socket.ts CHANGED
@@ -569,7 +569,7 @@ export interface ChannelDescListEvent {
569
569
  }
570
570
 
571
571
  /** */
572
- export interface ListUser {
572
+ export interface AllUserClans {
573
573
  //
574
574
  user?: Array<ApiUser>;
575
575
  }
@@ -859,7 +859,7 @@ export interface Socket {
859
859
 
860
860
  ListChannelByUserId(): Promise<ChannelDescListEvent>;
861
861
 
862
- ListUsersByUserId(): Promise<ListUser>;
862
+ ListUserClansByUserId(): Promise<AllUserClans>;
863
863
 
864
864
  hashtagDMList(user_id: Array<string>, limit: number): Promise<HashtagDmListEvent>;
865
865
 
@@ -1434,9 +1434,9 @@ export class DefaultSocket implements Socket {
1434
1434
  return response.channel_desc_list_event
1435
1435
  }
1436
1436
 
1437
- async ListUsersByUserId(): Promise<ListUser> {
1438
- const response = await this.send({list_user: {}});
1439
- return response.list_user
1437
+ async ListUserClansByUserId(): Promise<AllUserClans> {
1438
+ const response = await this.send({all_user_clans: {}});
1439
+ return response.all_user_clans
1440
1440
  }
1441
1441
 
1442
1442
  async hashtagDMList(user_id: Array<string>, limit: number): Promise<HashtagDmListEvent> {