mezon-js 2.10.17 → 2.10.19

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
@@ -607,6 +607,8 @@ export interface ApiChannelAttachment {
607
607
  uploader?: string;
608
608
  //
609
609
  url?: string;
610
+ //message id.
611
+ message_id?: string;
610
612
  }
611
613
 
612
614
  /** */
@@ -5360,23 +5362,22 @@ export class MezonApi {
5360
5362
  }
5361
5363
 
5362
5364
  /** list user add channel by channel ids */
5363
- listUsersAddChannelByChannelId(
5364
- bearerToken: string,
5365
- channelId?: string,
5366
- limit?: number,
5367
- options: any = {}
5368
- ): Promise<ApiAllUsersAddChannelResponse> {
5369
- const urlPath = "/v2/channeldesc/users/add";
5365
+ listChannelUsersUC(bearerToken: string,
5366
+ channelId?:string,
5367
+ limit?:number,
5368
+ options: any = {}): Promise<ApiAllUsersAddChannelResponse> {
5369
+
5370
+ const urlPath = "/v2/channeldesc/users";
5370
5371
  const queryParams = new Map<string, any>();
5371
5372
  queryParams.set("channel_id", channelId);
5372
5373
  queryParams.set("limit", limit);
5373
5374
 
5374
- let bodyJson: string = "";
5375
+ let bodyJson : string = "";
5375
5376
 
5376
5377
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
5377
5378
  const fetchOptions = buildFetchOptions("GET", options, bodyJson);
5378
5379
  if (bearerToken) {
5379
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
5380
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
5380
5381
  }
5381
5382
 
5382
5383
  return Promise.race([
@@ -5393,7 +5394,7 @@ export class MezonApi {
5393
5394
  setTimeout(reject, this.timeoutMs, "Request timed out.")
5394
5395
  ),
5395
5396
  ]);
5396
- }
5397
+ }
5397
5398
 
5398
5399
  /** Delete a channel by ID. */
5399
5400
  deleteChannelDesc(
package/client.ts CHANGED
@@ -3851,7 +3851,7 @@ export class Client {
3851
3851
  });
3852
3852
  }
3853
3853
 
3854
- async listUsersAddChannelByChannelId(
3854
+ async listChannelUsersUC(
3855
3855
  session: Session,
3856
3856
  channel_id: string,
3857
3857
  limit: number
@@ -3865,7 +3865,7 @@ export class Client {
3865
3865
  }
3866
3866
 
3867
3867
  return this.apiClient
3868
- .listUsersAddChannelByChannelId(session.token, channel_id, limit)
3868
+ .listChannelUsersUC(session.token, channel_id, limit)
3869
3869
  .then((response: any) => {
3870
3870
  return Promise.resolve(response);
3871
3871
  });
package/dist/api.gen.d.ts CHANGED
@@ -356,6 +356,7 @@ export interface ApiChannelAttachment {
356
356
  id?: string;
357
357
  uploader?: string;
358
358
  url?: string;
359
+ message_id?: string;
359
360
  }
360
361
  /** */
361
362
  export interface ApiChannelAttachmentList {
@@ -1731,7 +1732,7 @@ export declare class MezonApi {
1731
1732
  /** Create a new channel with the current user as the owner. */
1732
1733
  createChannelDesc(bearerToken: string, body: ApiCreateChannelDescRequest, options?: any): Promise<ApiChannelDescription>;
1733
1734
  /** list user add channel by channel ids */
1734
- listUsersAddChannelByChannelId(bearerToken: string, channelId?: string, limit?: number, options?: any): Promise<ApiAllUsersAddChannelResponse>;
1735
+ listChannelUsersUC(bearerToken: string, channelId?: string, limit?: number, options?: any): Promise<ApiAllUsersAddChannelResponse>;
1735
1736
  /** Delete a channel by ID. */
1736
1737
  deleteChannelDesc(bearerToken: string, channelId: string, options?: any): Promise<any>;
1737
1738
  /** Update fields in a given channel. */
package/dist/client.d.ts CHANGED
@@ -585,7 +585,7 @@ export declare class Client {
585
585
  getNotificationReactMessage(session: Session, channelId: string): Promise<ApiNotifiReactMessage>;
586
586
  hashtagDMList(session: Session, userId: Array<string>, limit: number): Promise<ApiHashtagDmList>;
587
587
  listChannelByUserId(session: Session): Promise<ApiChannelDescList>;
588
- listUsersAddChannelByChannelId(session: Session, channel_id: string, limit: number): Promise<ApiAllUsersAddChannelResponse>;
588
+ listChannelUsersUC(session: Session, channel_id: string, limit: number): Promise<ApiAllUsersAddChannelResponse>;
589
589
  getListEmojisByUserId(session: Session): Promise<ApiEmojiListedResponse>;
590
590
  getListStickersByUserId(session: Session): Promise<ApiStickerListedResponse>;
591
591
  listUserClansByUserId(session: Session): Promise<ApiAllUserClans>;
@@ -2767,8 +2767,8 @@ var MezonApi = class {
2767
2767
  ]);
2768
2768
  }
2769
2769
  /** list user add channel by channel ids */
2770
- listUsersAddChannelByChannelId(bearerToken, channelId, limit, options = {}) {
2771
- const urlPath = "/v2/channeldesc/users/add";
2770
+ listChannelUsersUC(bearerToken, channelId, limit, options = {}) {
2771
+ const urlPath = "/v2/channeldesc/users";
2772
2772
  const queryParams = /* @__PURE__ */ new Map();
2773
2773
  queryParams.set("channel_id", channelId);
2774
2774
  queryParams.set("limit", limit);
@@ -7236,7 +7236,8 @@ var _DefaultSocket = class _DefaultSocket {
7236
7236
  hide_editted: message.channel_message.hide_editted,
7237
7237
  is_public: message.channel_message.is_public,
7238
7238
  create_time_seconds: message.channel_message.create_time_seconds,
7239
- update_time_seconds: message.channel_message.update_time_seconds
7239
+ update_time_seconds: message.channel_message.update_time_seconds,
7240
+ topic_id: message.channel_message.topic_id
7240
7241
  };
7241
7242
  this.onchannelmessage(e);
7242
7243
  } else if (message.message_typing_event) {
@@ -10027,12 +10028,12 @@ var Client = class {
10027
10028
  });
10028
10029
  });
10029
10030
  }
10030
- listUsersAddChannelByChannelId(session, channel_id, limit) {
10031
+ listChannelUsersUC(session, channel_id, limit) {
10031
10032
  return __async(this, null, function* () {
10032
10033
  if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
10033
10034
  yield this.sessionRefresh(session);
10034
10035
  }
10035
- return this.apiClient.listUsersAddChannelByChannelId(session.token, channel_id, limit).then((response) => {
10036
+ return this.apiClient.listChannelUsersUC(session.token, channel_id, limit).then((response) => {
10036
10037
  return Promise.resolve(response);
10037
10038
  });
10038
10039
  });
@@ -2733,8 +2733,8 @@ var MezonApi = class {
2733
2733
  ]);
2734
2734
  }
2735
2735
  /** list user add channel by channel ids */
2736
- listUsersAddChannelByChannelId(bearerToken, channelId, limit, options = {}) {
2737
- const urlPath = "/v2/channeldesc/users/add";
2736
+ listChannelUsersUC(bearerToken, channelId, limit, options = {}) {
2737
+ const urlPath = "/v2/channeldesc/users";
2738
2738
  const queryParams = /* @__PURE__ */ new Map();
2739
2739
  queryParams.set("channel_id", channelId);
2740
2740
  queryParams.set("limit", limit);
@@ -7202,7 +7202,8 @@ var _DefaultSocket = class _DefaultSocket {
7202
7202
  hide_editted: message.channel_message.hide_editted,
7203
7203
  is_public: message.channel_message.is_public,
7204
7204
  create_time_seconds: message.channel_message.create_time_seconds,
7205
- update_time_seconds: message.channel_message.update_time_seconds
7205
+ update_time_seconds: message.channel_message.update_time_seconds,
7206
+ topic_id: message.channel_message.topic_id
7206
7207
  };
7207
7208
  this.onchannelmessage(e);
7208
7209
  } else if (message.message_typing_event) {
@@ -9993,12 +9994,12 @@ var Client = class {
9993
9994
  });
9994
9995
  });
9995
9996
  }
9996
- listUsersAddChannelByChannelId(session, channel_id, limit) {
9997
+ listChannelUsersUC(session, channel_id, limit) {
9997
9998
  return __async(this, null, function* () {
9998
9999
  if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
9999
10000
  yield this.sessionRefresh(session);
10000
10001
  }
10001
- return this.apiClient.listUsersAddChannelByChannelId(session.token, channel_id, limit).then((response) => {
10002
+ return this.apiClient.listChannelUsersUC(session.token, channel_id, limit).then((response) => {
10002
10003
  return Promise.resolve(response);
10003
10004
  });
10004
10005
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mezon-js",
3
3
 
4
- "version": "2.10.17",
4
+ "version": "2.10.19",
5
5
 
6
6
  "scripts": {
7
7
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
package/socket.ts CHANGED
@@ -1472,6 +1472,7 @@ export class DefaultSocket implements Socket {
1472
1472
  is_public: message.channel_message.is_public,
1473
1473
  create_time_seconds: message.channel_message.create_time_seconds,
1474
1474
  update_time_seconds: message.channel_message.update_time_seconds,
1475
+ topic_id: message.channel_message.topic_id,
1475
1476
  };
1476
1477
  this.onchannelmessage(e);
1477
1478
  } else if (message.message_typing_event) {