mezon-js 2.10.1 → 2.10.2

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
@@ -1990,6 +1990,44 @@ export interface ApiRpc {
1990
1990
  payload?: string;
1991
1991
  }
1992
1992
 
1993
+ /** */
1994
+ export interface ApiSdTopic {
1995
+ //
1996
+ channel_id?: string;
1997
+ //
1998
+ clan_id?: string;
1999
+ //
2000
+ create_time?: string;
2001
+ //
2002
+ creator_id?: string;
2003
+ //
2004
+ id?: string;
2005
+ //
2006
+ message_id?: string;
2007
+ //
2008
+ status?: number;
2009
+ //
2010
+ update_time?: string;
2011
+ }
2012
+
2013
+ /** */
2014
+ export interface ApiSdTopicList {
2015
+ //
2016
+ count?: number;
2017
+ //
2018
+ topics?: Array<ApiSdTopic>;
2019
+ }
2020
+
2021
+ /** */
2022
+ export interface ApiSdTopicRequest {
2023
+ //
2024
+ channel_id?: string;
2025
+ //
2026
+ clan_id?: string;
2027
+ //
2028
+ message_id?: string;
2029
+ }
2030
+
1993
2031
  /** */
1994
2032
  export interface ApiSearchMessageDocument {
1995
2033
  //
@@ -9127,6 +9165,81 @@ export class MezonApi {
9127
9165
  ]);
9128
9166
  }
9129
9167
 
9168
+ /** List Sd Topic */
9169
+ listSdTopic(
9170
+ bearerToken: string,
9171
+ channelId?: string,
9172
+ limit?: number,
9173
+ options: any = {}
9174
+ ): Promise<ApiSdTopicList> {
9175
+ const urlPath = "/v2/sdmtopic";
9176
+ const queryParams = new Map<string, any>();
9177
+ queryParams.set("channel_id", channelId);
9178
+ queryParams.set("limit", limit);
9179
+
9180
+ let bodyJson: string = "";
9181
+
9182
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
9183
+ const fetchOptions = buildFetchOptions("GET", options, bodyJson);
9184
+ if (bearerToken) {
9185
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
9186
+ }
9187
+
9188
+ return Promise.race([
9189
+ fetch(fullUrl, fetchOptions).then((response) => {
9190
+ if (response.status == 204) {
9191
+ return response;
9192
+ } else if (response.status >= 200 && response.status < 300) {
9193
+ return response.json();
9194
+ } else {
9195
+ throw response;
9196
+ }
9197
+ }),
9198
+ new Promise((_, reject) =>
9199
+ setTimeout(reject, this.timeoutMs, "Request timed out.")
9200
+ ),
9201
+ ]);
9202
+ }
9203
+
9204
+ /** Create Sd Topic */
9205
+ createSdTopic(
9206
+ bearerToken: string,
9207
+ body: ApiSdTopicRequest,
9208
+ options: any = {}
9209
+ ): Promise<ApiSdTopic> {
9210
+ if (body === null || body === undefined) {
9211
+ throw new Error(
9212
+ "'body' is a required parameter but is null or undefined."
9213
+ );
9214
+ }
9215
+ const urlPath = "/v2/sdmtopic";
9216
+ const queryParams = new Map<string, any>();
9217
+
9218
+ let bodyJson: string = "";
9219
+ bodyJson = JSON.stringify(body || {});
9220
+
9221
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
9222
+ const fetchOptions = buildFetchOptions("POST", options, bodyJson);
9223
+ if (bearerToken) {
9224
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
9225
+ }
9226
+
9227
+ return Promise.race([
9228
+ fetch(fullUrl, fetchOptions).then((response) => {
9229
+ if (response.status == 204) {
9230
+ return response;
9231
+ } else if (response.status >= 200 && response.status < 300) {
9232
+ return response.json();
9233
+ } else {
9234
+ throw response;
9235
+ }
9236
+ }),
9237
+ new Promise((_, reject) =>
9238
+ setTimeout(reject, this.timeoutMs, "Request timed out.")
9239
+ ),
9240
+ ]);
9241
+ }
9242
+
9130
9243
  /** Delete a specific system messages. */
9131
9244
  deleteSystemMessage(
9132
9245
  bearerToken: string,
package/client.ts CHANGED
@@ -155,6 +155,9 @@ import {
155
155
  MezonUpdateOnboardingStepByClanIdBody,
156
156
  ApiPTTChannelUserList,
157
157
  ApiWalletLedgerList,
158
+ ApiSdTopicList,
159
+ ApiSdTopicRequest,
160
+ ApiSdTopic,
158
161
  } from "./api.gen";
159
162
 
160
163
  import { Session } from "./session";
@@ -4782,4 +4785,45 @@ export class Client {
4782
4785
  return Promise.resolve(response);
4783
4786
  });
4784
4787
  }
4788
+
4789
+ //**list sd topic */
4790
+ async listSdTopic(
4791
+ session: Session,
4792
+ channelId?: string,
4793
+ limit?: number
4794
+ ): Promise<ApiSdTopicList> {
4795
+ if (
4796
+ this.autoRefreshSession &&
4797
+ session.refresh_token &&
4798
+ session.isexpired((Date.now() + this.expiredTimespanMs) / 1000)
4799
+ ) {
4800
+ await this.sessionRefresh(session);
4801
+ }
4802
+
4803
+ return this.apiClient
4804
+ .listSdTopic(session.token, channelId, limit)
4805
+ .then((response: ApiSdTopicList) => {
4806
+ return Promise.resolve(response);
4807
+ });
4808
+ }
4809
+
4810
+ //**post sd topic */
4811
+ async createSdTopic(
4812
+ session: Session,
4813
+ request: ApiSdTopicRequest
4814
+ ): Promise<ApiSdTopic> {
4815
+ if (
4816
+ this.autoRefreshSession &&
4817
+ session.refresh_token &&
4818
+ session.isexpired((Date.now() + this.expiredTimespanMs) / 1000)
4819
+ ) {
4820
+ await this.sessionRefresh(session);
4821
+ }
4822
+
4823
+ return this.apiClient
4824
+ .createSdTopic(session.token, request)
4825
+ .then((response: ApiSdTopic) => {
4826
+ return response;
4827
+ });
4828
+ }
4785
4829
  }
package/dist/api.gen.d.ts CHANGED
@@ -1158,6 +1158,28 @@ export interface ApiRpc {
1158
1158
  payload?: string;
1159
1159
  }
1160
1160
  /** */
1161
+ export interface ApiSdTopic {
1162
+ channel_id?: string;
1163
+ clan_id?: string;
1164
+ create_time?: string;
1165
+ creator_id?: string;
1166
+ id?: string;
1167
+ message_id?: string;
1168
+ status?: number;
1169
+ update_time?: string;
1170
+ }
1171
+ /** */
1172
+ export interface ApiSdTopicList {
1173
+ count?: number;
1174
+ topics?: Array<ApiSdTopic>;
1175
+ }
1176
+ /** */
1177
+ export interface ApiSdTopicRequest {
1178
+ channel_id?: string;
1179
+ clan_id?: string;
1180
+ message_id?: string;
1181
+ }
1182
+ /** */
1161
1183
  export interface ApiSearchMessageDocument {
1162
1184
  attachments?: Array<ApiMessageAttachment>;
1163
1185
  avatar_url?: string;
@@ -1898,6 +1920,10 @@ export declare class MezonApi {
1898
1920
  getSystemMessagesList(bearerToken: string, options?: any): Promise<ApiSystemMessagesList>;
1899
1921
  /** Create a system messages. */
1900
1922
  createSystemMessage(bearerToken: string, body: ApiSystemMessageRequest, options?: any): Promise<any>;
1923
+ /** List Sd Topic */
1924
+ listSdTopic(bearerToken: string, channelId?: string, limit?: number, options?: any): Promise<ApiSdTopicList>;
1925
+ /** Create Sd Topic */
1926
+ createSdTopic(bearerToken: string, body: ApiSdTopicRequest, options?: any): Promise<ApiSdTopic>;
1901
1927
  /** Delete a specific system messages. */
1902
1928
  deleteSystemMessage(bearerToken: string, clanId: string, options?: any): Promise<any>;
1903
1929
  /** Get details of a specific system messages. */
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, 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, ApiSetDefaultNotificationRequest, ApiSetNotificationRequest, ApiSetMuteNotificationRequest, ApiSearchMessageRequest, ApiSearchMessageResponse, ApiPinMessageRequest, ApiPinMessagesList, ApiDeleteChannelDescRequest, ApiChangeChannelPrivateRequest, ApiClanEmojiCreateRequest, MezonUpdateClanEmojiByIdBody, ApiWebhookCreateRequest, ApiWebhookListResponse, MezonUpdateWebhookByIdBody, ApiWebhookGenerateResponse, ApiCheckDuplicateClanNameResponse, ApiClanStickerAddRequest, MezonUpdateClanStickerByIdBody, MezonChangeChannelCategoryBody, ApiUpdateRoleChannelRequest, ApiAddAppRequest, ApiAppList, ApiApp, MezonUpdateAppBody, ApiSystemMessagesList, ApiSystemMessage, ApiSystemMessageRequest, MezonUpdateSystemMessageBody, ApiUpdateCategoryOrderRequest, ApiGiveCoffeeEvent, ApiListStreamingChannelsResponse, ApiStreamingChannelUserList, ApiRegisterStreamingChannelRequest, ApiRoleList, ApiListChannelAppsResponse, ApiNotificationChannelCategorySettingList, ApiNotificationUserChannel, ApiNotificationSetting, ApiNotifiReactMessage, ApiHashtagDmList, ApiEmojiListedResponse, ApiStickerListedResponse, ApiAllUsersAddChannelResponse, ApiRoleListEventResponse, ApiAllUserClans, ApiUserPermissionInChannelListResponse, ApiPermissionRoleChannelListEventResponse, ApiMarkAsReadRequest, ApiEditChannelCanvasRequest, ApiChannelSettingListResponse, ApiAddFavoriteChannelResponse, ApiRegistFcmDeviceTokenResponse, ApiListUserActivity, ApiCreateActivityRequest, ApiLoginIDResponse, ApiLoginRequest, ApiConfirmLoginRequest, ApiUserActivity, ApiChanEncryptionMethod, ApiGetPubKeysResponse, ApiPubKey, ApiGetKeyServerResp, MezonapiListAuditLog, ApiTokenSentEvent, MezonDeleteWebhookByIdBody, ApiWithdrawTokenRequest, ApiListOnboardingResponse, ApiCreateOnboardingRequest, MezonUpdateOnboardingBody, ApiOnboardingItem, ApiGenerateClanWebhookRequest, ApiGenerateClanWebhookResponse, ApiListClanWebhookResponse, MezonUpdateClanWebhookByIdBody, MezonUpdateClanDescBody, ApiUserStatusUpdate, ApiUserStatus, ApiListOnboardingStepResponse, MezonUpdateOnboardingStepByClanIdBody, ApiPTTChannelUserList, ApiWalletLedgerList } from "./api.gen";
16
+ import { ApiAccount, ApiAccountCustom, ApiAccountDevice, ApiAccountEmail, ApiAccountFacebook, ApiAccountFacebookInstantGame, ApiAccountGoogle, ApiAccountGameCenter, ApiAccountSteam, ApiChannelDescList, ApiChannelDescription, ApiCreateChannelDescRequest, ApiDeleteRoleRequest, ApiClanDescList, ApiCreateClanDescRequest, ApiClanDesc, ApiCategoryDesc, ApiCategoryDescList, 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, ApiSetDefaultNotificationRequest, ApiSetNotificationRequest, ApiSetMuteNotificationRequest, ApiSearchMessageRequest, ApiSearchMessageResponse, ApiPinMessageRequest, ApiPinMessagesList, ApiDeleteChannelDescRequest, ApiChangeChannelPrivateRequest, ApiClanEmojiCreateRequest, MezonUpdateClanEmojiByIdBody, ApiWebhookCreateRequest, ApiWebhookListResponse, MezonUpdateWebhookByIdBody, ApiWebhookGenerateResponse, ApiCheckDuplicateClanNameResponse, ApiClanStickerAddRequest, MezonUpdateClanStickerByIdBody, MezonChangeChannelCategoryBody, ApiUpdateRoleChannelRequest, ApiAddAppRequest, ApiAppList, ApiApp, MezonUpdateAppBody, ApiSystemMessagesList, ApiSystemMessage, ApiSystemMessageRequest, MezonUpdateSystemMessageBody, ApiUpdateCategoryOrderRequest, ApiGiveCoffeeEvent, ApiListStreamingChannelsResponse, ApiStreamingChannelUserList, ApiRegisterStreamingChannelRequest, ApiRoleList, ApiListChannelAppsResponse, ApiNotificationChannelCategorySettingList, ApiNotificationUserChannel, ApiNotificationSetting, ApiNotifiReactMessage, ApiHashtagDmList, ApiEmojiListedResponse, ApiStickerListedResponse, ApiAllUsersAddChannelResponse, ApiRoleListEventResponse, ApiAllUserClans, ApiUserPermissionInChannelListResponse, ApiPermissionRoleChannelListEventResponse, ApiMarkAsReadRequest, ApiEditChannelCanvasRequest, ApiChannelSettingListResponse, ApiAddFavoriteChannelResponse, ApiRegistFcmDeviceTokenResponse, ApiListUserActivity, ApiCreateActivityRequest, ApiLoginIDResponse, ApiLoginRequest, ApiConfirmLoginRequest, ApiUserActivity, ApiChanEncryptionMethod, ApiGetPubKeysResponse, ApiPubKey, ApiGetKeyServerResp, MezonapiListAuditLog, ApiTokenSentEvent, MezonDeleteWebhookByIdBody, ApiWithdrawTokenRequest, ApiListOnboardingResponse, ApiCreateOnboardingRequest, MezonUpdateOnboardingBody, ApiOnboardingItem, ApiGenerateClanWebhookRequest, ApiGenerateClanWebhookResponse, ApiListClanWebhookResponse, MezonUpdateClanWebhookByIdBody, MezonUpdateClanDescBody, ApiUserStatusUpdate, ApiUserStatus, ApiListOnboardingStepResponse, MezonUpdateOnboardingStepByClanIdBody, ApiPTTChannelUserList, ApiWalletLedgerList, ApiSdTopicList, ApiSdTopicRequest, ApiSdTopic } from "./api.gen";
17
17
  import { Session } from "./session";
18
18
  import { Socket } from "./socket";
19
19
  import { WebSocketAdapter } from "./web_socket_adapter";
@@ -630,4 +630,6 @@ export declare class Client {
630
630
  /** List a ptt channel's users. */
631
631
  listPTTChannelUsers(session: Session, clanId: string, channelId: string, channelType: number, state?: number, limit?: number, cursor?: string): Promise<ApiPTTChannelUserList>;
632
632
  listWalletLedger(session: Session, limit?: number, cursor?: string, transactionId?: string): Promise<ApiWalletLedgerList>;
633
+ listSdTopic(session: Session, channelId?: string, limit?: number): Promise<ApiSdTopicList>;
634
+ createSdTopic(session: Session, request: ApiSdTopicRequest): Promise<ApiSdTopic>;
633
635
  }
@@ -5741,6 +5741,64 @@ var MezonApi = class {
5741
5741
  )
5742
5742
  ]);
5743
5743
  }
5744
+ /** List Sd Topic */
5745
+ listSdTopic(bearerToken, channelId, limit, options = {}) {
5746
+ const urlPath = "/v2/sdmtopic";
5747
+ const queryParams = /* @__PURE__ */ new Map();
5748
+ queryParams.set("channel_id", channelId);
5749
+ queryParams.set("limit", limit);
5750
+ let bodyJson = "";
5751
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
5752
+ const fetchOptions = buildFetchOptions("GET", options, bodyJson);
5753
+ if (bearerToken) {
5754
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
5755
+ }
5756
+ return Promise.race([
5757
+ fetch(fullUrl, fetchOptions).then((response) => {
5758
+ if (response.status == 204) {
5759
+ return response;
5760
+ } else if (response.status >= 200 && response.status < 300) {
5761
+ return response.json();
5762
+ } else {
5763
+ throw response;
5764
+ }
5765
+ }),
5766
+ new Promise(
5767
+ (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
5768
+ )
5769
+ ]);
5770
+ }
5771
+ /** Create Sd Topic */
5772
+ createSdTopic(bearerToken, body, options = {}) {
5773
+ if (body === null || body === void 0) {
5774
+ throw new Error(
5775
+ "'body' is a required parameter but is null or undefined."
5776
+ );
5777
+ }
5778
+ const urlPath = "/v2/sdmtopic";
5779
+ const queryParams = /* @__PURE__ */ new Map();
5780
+ let bodyJson = "";
5781
+ bodyJson = JSON.stringify(body || {});
5782
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
5783
+ const fetchOptions = buildFetchOptions("POST", options, bodyJson);
5784
+ if (bearerToken) {
5785
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
5786
+ }
5787
+ return Promise.race([
5788
+ fetch(fullUrl, fetchOptions).then((response) => {
5789
+ if (response.status == 204) {
5790
+ return response;
5791
+ } else if (response.status >= 200 && response.status < 300) {
5792
+ return response.json();
5793
+ } else {
5794
+ throw response;
5795
+ }
5796
+ }),
5797
+ new Promise(
5798
+ (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
5799
+ )
5800
+ ]);
5801
+ }
5744
5802
  /** Delete a specific system messages. */
5745
5803
  deleteSystemMessage(bearerToken, clanId, options = {}) {
5746
5804
  if (clanId === null || clanId === void 0) {
@@ -10493,4 +10551,26 @@ var Client = class {
10493
10551
  });
10494
10552
  });
10495
10553
  }
10554
+ //**list sd topic */
10555
+ listSdTopic(session, channelId, limit) {
10556
+ return __async(this, null, function* () {
10557
+ if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
10558
+ yield this.sessionRefresh(session);
10559
+ }
10560
+ return this.apiClient.listSdTopic(session.token, channelId, limit).then((response) => {
10561
+ return Promise.resolve(response);
10562
+ });
10563
+ });
10564
+ }
10565
+ //**post sd topic */
10566
+ createSdTopic(session, request) {
10567
+ return __async(this, null, function* () {
10568
+ if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
10569
+ yield this.sessionRefresh(session);
10570
+ }
10571
+ return this.apiClient.createSdTopic(session.token, request).then((response) => {
10572
+ return response;
10573
+ });
10574
+ });
10575
+ }
10496
10576
  };
@@ -5707,6 +5707,64 @@ var MezonApi = class {
5707
5707
  )
5708
5708
  ]);
5709
5709
  }
5710
+ /** List Sd Topic */
5711
+ listSdTopic(bearerToken, channelId, limit, options = {}) {
5712
+ const urlPath = "/v2/sdmtopic";
5713
+ const queryParams = /* @__PURE__ */ new Map();
5714
+ queryParams.set("channel_id", channelId);
5715
+ queryParams.set("limit", limit);
5716
+ let bodyJson = "";
5717
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
5718
+ const fetchOptions = buildFetchOptions("GET", options, bodyJson);
5719
+ if (bearerToken) {
5720
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
5721
+ }
5722
+ return Promise.race([
5723
+ fetch(fullUrl, fetchOptions).then((response) => {
5724
+ if (response.status == 204) {
5725
+ return response;
5726
+ } else if (response.status >= 200 && response.status < 300) {
5727
+ return response.json();
5728
+ } else {
5729
+ throw response;
5730
+ }
5731
+ }),
5732
+ new Promise(
5733
+ (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
5734
+ )
5735
+ ]);
5736
+ }
5737
+ /** Create Sd Topic */
5738
+ createSdTopic(bearerToken, body, options = {}) {
5739
+ if (body === null || body === void 0) {
5740
+ throw new Error(
5741
+ "'body' is a required parameter but is null or undefined."
5742
+ );
5743
+ }
5744
+ const urlPath = "/v2/sdmtopic";
5745
+ const queryParams = /* @__PURE__ */ new Map();
5746
+ let bodyJson = "";
5747
+ bodyJson = JSON.stringify(body || {});
5748
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
5749
+ const fetchOptions = buildFetchOptions("POST", options, bodyJson);
5750
+ if (bearerToken) {
5751
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
5752
+ }
5753
+ return Promise.race([
5754
+ fetch(fullUrl, fetchOptions).then((response) => {
5755
+ if (response.status == 204) {
5756
+ return response;
5757
+ } else if (response.status >= 200 && response.status < 300) {
5758
+ return response.json();
5759
+ } else {
5760
+ throw response;
5761
+ }
5762
+ }),
5763
+ new Promise(
5764
+ (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
5765
+ )
5766
+ ]);
5767
+ }
5710
5768
  /** Delete a specific system messages. */
5711
5769
  deleteSystemMessage(bearerToken, clanId, options = {}) {
5712
5770
  if (clanId === null || clanId === void 0) {
@@ -10459,6 +10517,28 @@ var Client = class {
10459
10517
  });
10460
10518
  });
10461
10519
  }
10520
+ //**list sd topic */
10521
+ listSdTopic(session, channelId, limit) {
10522
+ return __async(this, null, function* () {
10523
+ if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
10524
+ yield this.sessionRefresh(session);
10525
+ }
10526
+ return this.apiClient.listSdTopic(session.token, channelId, limit).then((response) => {
10527
+ return Promise.resolve(response);
10528
+ });
10529
+ });
10530
+ }
10531
+ //**post sd topic */
10532
+ createSdTopic(session, request) {
10533
+ return __async(this, null, function* () {
10534
+ if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
10535
+ yield this.sessionRefresh(session);
10536
+ }
10537
+ return this.apiClient.createSdTopic(session.token, request).then((response) => {
10538
+ return response;
10539
+ });
10540
+ });
10541
+ }
10462
10542
  };
10463
10543
  export {
10464
10544
  ChannelStreamMode,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mezon-js",
3
3
 
4
- "version": "2.10.1",
4
+ "version": "2.10.2",
5
5
 
6
6
  "scripts": {
7
7
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"