mezon-js 2.13.3 → 2.13.5

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/api.gen.ts CHANGED
@@ -796,6 +796,8 @@ export interface ApiChannelDescription {
796
796
  onlines?: Array<boolean>;
797
797
  // DM status
798
798
  avatars?: Array<string>;
799
+ // member count
800
+ member_count?: number;
799
801
  }
800
802
 
801
803
  /** A message sent on a channel. */
@@ -5186,6 +5188,7 @@ export class MezonApi {
5186
5188
  cursor?: string,
5187
5189
  clanId?: string,
5188
5190
  channelType?: number,
5191
+ isMobile?: boolean,
5189
5192
  options: any = {}
5190
5193
  ): Promise<ApiChannelDescList> {
5191
5194
  const urlPath = "/v2/channeldesc";
@@ -5195,6 +5198,7 @@ export class MezonApi {
5195
5198
  queryParams.set("cursor", cursor);
5196
5199
  queryParams.set("clan_id", clanId);
5197
5200
  queryParams.set("channel_type", channelType);
5201
+ queryParams.set("is_mobile", isMobile);
5198
5202
 
5199
5203
  let bodyJson: string = "";
5200
5204
 
package/client.ts CHANGED
@@ -1557,7 +1557,8 @@ export class Client {
1557
1557
  state?: number,
1558
1558
  cursor?: string,
1559
1559
  clanId?: string,
1560
- channelType?: number
1560
+ channelType?: number,
1561
+ isMobile?: boolean
1561
1562
  ): Promise<ApiChannelDescList> {
1562
1563
  if (
1563
1564
  this.autoRefreshSession &&
@@ -1574,7 +1575,8 @@ export class Client {
1574
1575
  state,
1575
1576
  cursor,
1576
1577
  clanId,
1577
- channelType
1578
+ channelType,
1579
+ isMobile
1578
1580
  )
1579
1581
  .then((response: ApiChannelDescList) => {
1580
1582
  var result: ApiChannelDescList = {
package/dist/api.gen.d.ts CHANGED
@@ -455,6 +455,7 @@ export interface ApiChannelDescription {
455
455
  display_names?: Array<string>;
456
456
  onlines?: Array<boolean>;
457
457
  avatars?: Array<string>;
458
+ member_count?: number;
458
459
  }
459
460
  /** A message sent on a channel. */
460
461
  export interface ApiChannelMessage {
@@ -2034,7 +2035,7 @@ export declare class MezonApi {
2034
2035
  /** List all users that are part of a channel. */
2035
2036
  listChannelUsers(bearerToken: string, clanId: string, channelId: string, channelType?: number, limit?: number, state?: number, cursor?: string, options?: any): Promise<ApiChannelUserList>;
2036
2037
  /** List user channels */
2037
- listChannelDescs(bearerToken: string, limit?: number, state?: number, cursor?: string, clanId?: string, channelType?: number, options?: any): Promise<ApiChannelDescList>;
2038
+ listChannelDescs(bearerToken: string, limit?: number, state?: number, cursor?: string, clanId?: string, channelType?: number, isMobile?: boolean, options?: any): Promise<ApiChannelDescList>;
2038
2039
  /** Create a new channel with the current user as the owner. */
2039
2040
  createChannelDesc(bearerToken: string, body: ApiCreateChannelDescRequest, options?: any): Promise<ApiChannelDescription>;
2040
2041
  /** list user add channel by channel ids */
package/dist/client.d.ts CHANGED
@@ -412,7 +412,7 @@ export declare class Client {
412
412
  /** List a channel's users. */
413
413
  listClanUsers(session: Session, clanId: string): Promise<ApiClanUserList>;
414
414
  /** List channels. */
415
- listChannelDescs(session: Session, limit?: number, state?: number, cursor?: string, clanId?: string, channelType?: number): Promise<ApiChannelDescList>;
415
+ listChannelDescs(session: Session, limit?: number, state?: number, cursor?: string, clanId?: string, channelType?: number, isMobile?: boolean): Promise<ApiChannelDescList>;
416
416
  /** List clans */
417
417
  listClanDescs(session: Session, limit?: number, state?: number, cursor?: string): Promise<ApiClanDescList>;
418
418
  /** List categories. */
@@ -2134,7 +2134,7 @@ var MezonApi = class {
2134
2134
  ]);
2135
2135
  }
2136
2136
  /** List user channels */
2137
- listChannelDescs(bearerToken, limit, state, cursor, clanId, channelType, options = {}) {
2137
+ listChannelDescs(bearerToken, limit, state, cursor, clanId, channelType, isMobile, options = {}) {
2138
2138
  const urlPath = "/v2/channeldesc";
2139
2139
  const queryParams = /* @__PURE__ */ new Map();
2140
2140
  queryParams.set("limit", limit);
@@ -2142,6 +2142,7 @@ var MezonApi = class {
2142
2142
  queryParams.set("cursor", cursor);
2143
2143
  queryParams.set("clan_id", clanId);
2144
2144
  queryParams.set("channel_type", channelType);
2145
+ queryParams.set("is_mobile", isMobile);
2145
2146
  let bodyJson = "";
2146
2147
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
2147
2148
  const fetchOptions = buildFetchOptions("GET", options, bodyJson);
@@ -8961,7 +8962,7 @@ var Client = class {
8961
8962
  });
8962
8963
  }
8963
8964
  /** List channels. */
8964
- listChannelDescs(session, limit, state, cursor, clanId, channelType) {
8965
+ listChannelDescs(session, limit, state, cursor, clanId, channelType, isMobile) {
8965
8966
  return __async(this, null, function* () {
8966
8967
  if (this.autoRefreshSession && session.refresh_token && session.isexpired(Date.now() / 1e3)) {
8967
8968
  yield this.sessionRefresh(session);
@@ -8972,7 +8973,8 @@ var Client = class {
8972
8973
  state,
8973
8974
  cursor,
8974
8975
  clanId,
8975
- channelType
8976
+ channelType,
8977
+ isMobile
8976
8978
  ).then((response) => {
8977
8979
  var result = {
8978
8980
  channeldesc: [],
@@ -2100,7 +2100,7 @@ var MezonApi = class {
2100
2100
  ]);
2101
2101
  }
2102
2102
  /** List user channels */
2103
- listChannelDescs(bearerToken, limit, state, cursor, clanId, channelType, options = {}) {
2103
+ listChannelDescs(bearerToken, limit, state, cursor, clanId, channelType, isMobile, options = {}) {
2104
2104
  const urlPath = "/v2/channeldesc";
2105
2105
  const queryParams = /* @__PURE__ */ new Map();
2106
2106
  queryParams.set("limit", limit);
@@ -2108,6 +2108,7 @@ var MezonApi = class {
2108
2108
  queryParams.set("cursor", cursor);
2109
2109
  queryParams.set("clan_id", clanId);
2110
2110
  queryParams.set("channel_type", channelType);
2111
+ queryParams.set("is_mobile", isMobile);
2111
2112
  let bodyJson = "";
2112
2113
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
2113
2114
  const fetchOptions = buildFetchOptions("GET", options, bodyJson);
@@ -8927,7 +8928,7 @@ var Client = class {
8927
8928
  });
8928
8929
  }
8929
8930
  /** List channels. */
8930
- listChannelDescs(session, limit, state, cursor, clanId, channelType) {
8931
+ listChannelDescs(session, limit, state, cursor, clanId, channelType, isMobile) {
8931
8932
  return __async(this, null, function* () {
8932
8933
  if (this.autoRefreshSession && session.refresh_token && session.isexpired(Date.now() / 1e3)) {
8933
8934
  yield this.sessionRefresh(session);
@@ -8938,7 +8939,8 @@ var Client = class {
8938
8939
  state,
8939
8940
  cursor,
8940
8941
  clanId,
8941
- channelType
8942
+ channelType,
8943
+ isMobile
8942
8944
  ).then((response) => {
8943
8945
  var result = {
8944
8946
  channeldesc: [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mezon-js",
3
- "version": "2.13.3",
3
+ "version": "2.13.5",
4
4
  "scripts": {
5
5
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
6
6
  },