mezon-js 2.13.20 → 2.13.21

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/client.ts CHANGED
@@ -1457,6 +1457,28 @@ export class Client {
1457
1457
  });
1458
1458
  }
1459
1459
 
1460
+ async listChannelDetail(
1461
+ session: Session,
1462
+ channelId: string
1463
+ ): Promise<ApiChannelDescription> {
1464
+ if (
1465
+ this.autoRefreshSession &&
1466
+ session.refresh_token &&
1467
+ session.isexpired(Date.now() / 1000)
1468
+ ) {
1469
+ await this.sessionRefresh(session);
1470
+ }
1471
+
1472
+ return this.apiClient
1473
+ .listChannelDetail(
1474
+ session.token,
1475
+ channelId
1476
+ )
1477
+ .then((response: ApiChannelDescription) => {
1478
+ return Promise.resolve(response);
1479
+ });
1480
+ }
1481
+
1460
1482
  /** List channels. */
1461
1483
  async listChannelDescs(
1462
1484
  session: Session,
package/dist/client.d.ts CHANGED
@@ -312,6 +312,7 @@ export declare class Client {
312
312
  listChannelAttachments(session: Session, clanId: string, channelId: string, fileType: string, state?: number, limit?: number, before?: number, after?: number): Promise<ApiChannelAttachmentList>;
313
313
  /** List a channel's users. */
314
314
  listClanUsers(session: Session, clanId: string): Promise<ApiClanUserList>;
315
+ listChannelDetail(session: Session, channelId: string): Promise<ApiChannelDescription>;
315
316
  /** List channels. */
316
317
  listChannelDescs(session: Session, limit?: number, state?: number, cursor?: string, clanId?: string, channelType?: number, isMobile?: boolean): Promise<ApiChannelDescList>;
317
318
  /** List clans */
@@ -9026,6 +9026,19 @@ var Client = class {
9026
9026
  });
9027
9027
  });
9028
9028
  }
9029
+ listChannelDetail(session, channelId) {
9030
+ return __async(this, null, function* () {
9031
+ if (this.autoRefreshSession && session.refresh_token && session.isexpired(Date.now() / 1e3)) {
9032
+ yield this.sessionRefresh(session);
9033
+ }
9034
+ return this.apiClient.listChannelDetail(
9035
+ session.token,
9036
+ channelId
9037
+ ).then((response) => {
9038
+ return Promise.resolve(response);
9039
+ });
9040
+ });
9041
+ }
9029
9042
  /** List channels. */
9030
9043
  listChannelDescs(session, limit, state, cursor, clanId, channelType, isMobile) {
9031
9044
  return __async(this, null, function* () {
@@ -8992,6 +8992,19 @@ var Client = class {
8992
8992
  });
8993
8993
  });
8994
8994
  }
8995
+ listChannelDetail(session, channelId) {
8996
+ return __async(this, null, function* () {
8997
+ if (this.autoRefreshSession && session.refresh_token && session.isexpired(Date.now() / 1e3)) {
8998
+ yield this.sessionRefresh(session);
8999
+ }
9000
+ return this.apiClient.listChannelDetail(
9001
+ session.token,
9002
+ channelId
9003
+ ).then((response) => {
9004
+ return Promise.resolve(response);
9005
+ });
9006
+ });
9007
+ }
8995
9008
  /** List channels. */
8996
9009
  listChannelDescs(session, limit, state, cursor, clanId, channelType, isMobile) {
8997
9010
  return __async(this, null, function* () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mezon-js",
3
- "version": "2.13.20",
3
+ "version": "2.13.21",
4
4
  "scripts": {
5
5
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
6
6
  },