mezon-js 2.10.80 → 2.10.81

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
@@ -2838,6 +2838,14 @@ export interface ApiGetJoinMezonMeetResponse {
2838
2838
  user_name?: string;
2839
2839
  }
2840
2840
 
2841
+ /** */
2842
+ export interface MezonapiCreateRoomChannelApps {
2843
+ //
2844
+ channel_id?: string;
2845
+ //
2846
+ room_name?: string;
2847
+ }
2848
+
2841
2849
  export class MezonApi {
2842
2850
  constructor(
2843
2851
  readonly serverKey: string,
@@ -10848,4 +10856,40 @@ export class MezonApi {
10848
10856
  ),
10849
10857
  ]);
10850
10858
  }
10859
+
10860
+ /** create meeting room */
10861
+ createRoomChannelApps(bearerToken: string,
10862
+ body:MezonapiCreateRoomChannelApps,
10863
+ options: any = {}): Promise<MezonapiCreateRoomChannelApps> {
10864
+
10865
+ if (body === null || body === undefined) {
10866
+ throw new Error("'body' is a required parameter but is null or undefined.");
10867
+ }
10868
+ const urlPath = "/v2/channel-apps/createroom";
10869
+ const queryParams = new Map<string, any>();
10870
+
10871
+ let bodyJson : string = "";
10872
+ bodyJson = JSON.stringify(body || {});
10873
+
10874
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
10875
+ const fetchOptions = buildFetchOptions("POST", options, bodyJson);
10876
+ if (bearerToken) {
10877
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
10878
+ }
10879
+
10880
+ return Promise.race([
10881
+ fetch(fullUrl, fetchOptions).then((response) => {
10882
+ if (response.status == 204) {
10883
+ return response;
10884
+ } else if (response.status >= 200 && response.status < 300) {
10885
+ return response.json();
10886
+ } else {
10887
+ throw response;
10888
+ }
10889
+ }),
10890
+ new Promise((_, reject) =>
10891
+ setTimeout(reject, this.timeoutMs, "Request timed out.")
10892
+ ),
10893
+ ]);
10894
+ }
10851
10895
  }
package/client.ts CHANGED
@@ -159,6 +159,7 @@ import {
159
159
  MezonUpdateEventBody,
160
160
  ApiTransactionDetail,
161
161
  ApiGetJoinMezonMeetResponse,
162
+ MezonapiCreateRoomChannelApps,
162
163
  } from "./api.gen";
163
164
 
164
165
  import { Session } from "./session";
@@ -4869,7 +4870,7 @@ export class Client {
4869
4870
  });
4870
4871
  }
4871
4872
 
4872
- //**list sd topic */
4873
+ //**get join mezon meet */
4873
4874
  async getJoinMezonMeet(
4874
4875
  session: Session,
4875
4876
  channelId?:string,
@@ -4889,4 +4890,24 @@ export class Client {
4889
4890
  return Promise.resolve(response);
4890
4891
  });
4891
4892
  }
4893
+
4894
+ //**create room channel apps */
4895
+ async createRoomChannelApps(
4896
+ session: Session,
4897
+ body: MezonapiCreateRoomChannelApps
4898
+ ): Promise<MezonapiCreateRoomChannelApps> {
4899
+ if (
4900
+ this.autoRefreshSession &&
4901
+ session.refresh_token &&
4902
+ session.isexpired((Date.now() + this.expiredTimespanMs) / 1000)
4903
+ ) {
4904
+ await this.sessionRefresh(session);
4905
+ }
4906
+
4907
+ return this.apiClient
4908
+ .createRoomChannelApps(session.token, body)
4909
+ .then((response: MezonapiCreateRoomChannelApps) => {
4910
+ return Promise.resolve(response);
4911
+ });
4912
+ }
4892
4913
  }
package/dist/api.gen.d.ts CHANGED
@@ -1642,6 +1642,11 @@ export interface ApiGetJoinMezonMeetResponse {
1642
1642
  user_id?: string;
1643
1643
  user_name?: string;
1644
1644
  }
1645
+ /** */
1646
+ export interface MezonapiCreateRoomChannelApps {
1647
+ channel_id?: string;
1648
+ room_name?: string;
1649
+ }
1645
1650
  export declare class MezonApi {
1646
1651
  readonly serverKey: string;
1647
1652
  readonly basePath: string;
@@ -2044,4 +2049,6 @@ export declare class MezonApi {
2044
2049
  updateOnboardingStepByClanId(bearerToken: string, clanId: string, body: MezonUpdateOnboardingStepByClanIdBody, options?: any): Promise<any>;
2045
2050
  /** GetJoinMezonMeet */
2046
2051
  getJoinMezonMeet(bearerToken: string, channelId?: string, roomName?: string, options?: any): Promise<ApiGetJoinMezonMeetResponse>;
2052
+ /** create meeting room */
2053
+ createRoomChannelApps(bearerToken: string, body: MezonapiCreateRoomChannelApps, options?: any): Promise<MezonapiCreateRoomChannelApps>;
2047
2054
  }
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, 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, ApiChannelCanvasListResponse, 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, ApiWalletLedgerList, ApiSdTopicList, ApiSdTopicRequest, ApiSdTopic, MezonUpdateEventBody, ApiTransactionDetail, ApiGetJoinMezonMeetResponse } 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, 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, ApiChannelCanvasListResponse, 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, ApiWalletLedgerList, ApiSdTopicList, ApiSdTopicRequest, ApiSdTopic, MezonUpdateEventBody, ApiTransactionDetail, ApiGetJoinMezonMeetResponse, MezonapiCreateRoomChannelApps } from "./api.gen";
17
17
  import { Session } from "./session";
18
18
  import { Socket } from "./socket";
19
19
  import { WebSocketAdapter } from "./web_socket_adapter";
@@ -640,4 +640,5 @@ export declare class Client {
640
640
  createSdTopic(session: Session, request: ApiSdTopicRequest): Promise<ApiSdTopic>;
641
641
  getTopicDetail(session: Session, topicId?: string): Promise<ApiSdTopic>;
642
642
  getJoinMezonMeet(session: Session, channelId?: string, roomName?: string): Promise<ApiGetJoinMezonMeetResponse>;
643
+ createRoomChannelApps(session: Session, body: MezonapiCreateRoomChannelApps): Promise<MezonapiCreateRoomChannelApps>;
643
644
  }
@@ -6984,6 +6984,35 @@ var MezonApi = class {
6984
6984
  )
6985
6985
  ]);
6986
6986
  }
6987
+ /** create meeting room */
6988
+ createRoomChannelApps(bearerToken, body, options = {}) {
6989
+ if (body === null || body === void 0) {
6990
+ throw new Error("'body' is a required parameter but is null or undefined.");
6991
+ }
6992
+ const urlPath = "/v2/channel-apps/createroom";
6993
+ const queryParams = /* @__PURE__ */ new Map();
6994
+ let bodyJson = "";
6995
+ bodyJson = JSON.stringify(body || {});
6996
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
6997
+ const fetchOptions = buildFetchOptions("POST", options, bodyJson);
6998
+ if (bearerToken) {
6999
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
7000
+ }
7001
+ return Promise.race([
7002
+ fetch(fullUrl, fetchOptions).then((response) => {
7003
+ if (response.status == 204) {
7004
+ return response;
7005
+ } else if (response.status >= 200 && response.status < 300) {
7006
+ return response.json();
7007
+ } else {
7008
+ throw response;
7009
+ }
7010
+ }),
7011
+ new Promise(
7012
+ (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
7013
+ )
7014
+ ]);
7015
+ }
6987
7016
  };
6988
7017
 
6989
7018
  // session.ts
@@ -10688,7 +10717,7 @@ var Client = class {
10688
10717
  });
10689
10718
  });
10690
10719
  }
10691
- //**list sd topic */
10720
+ //**get join mezon meet */
10692
10721
  getJoinMezonMeet(session, channelId, roomName) {
10693
10722
  return __async(this, null, function* () {
10694
10723
  if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
@@ -10699,4 +10728,15 @@ var Client = class {
10699
10728
  });
10700
10729
  });
10701
10730
  }
10731
+ //**create room channel apps */
10732
+ createRoomChannelApps(session, body) {
10733
+ return __async(this, null, function* () {
10734
+ if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
10735
+ yield this.sessionRefresh(session);
10736
+ }
10737
+ return this.apiClient.createRoomChannelApps(session.token, body).then((response) => {
10738
+ return Promise.resolve(response);
10739
+ });
10740
+ });
10741
+ }
10702
10742
  };
@@ -6950,6 +6950,35 @@ var MezonApi = class {
6950
6950
  )
6951
6951
  ]);
6952
6952
  }
6953
+ /** create meeting room */
6954
+ createRoomChannelApps(bearerToken, body, options = {}) {
6955
+ if (body === null || body === void 0) {
6956
+ throw new Error("'body' is a required parameter but is null or undefined.");
6957
+ }
6958
+ const urlPath = "/v2/channel-apps/createroom";
6959
+ const queryParams = /* @__PURE__ */ new Map();
6960
+ let bodyJson = "";
6961
+ bodyJson = JSON.stringify(body || {});
6962
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
6963
+ const fetchOptions = buildFetchOptions("POST", options, bodyJson);
6964
+ if (bearerToken) {
6965
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
6966
+ }
6967
+ return Promise.race([
6968
+ fetch(fullUrl, fetchOptions).then((response) => {
6969
+ if (response.status == 204) {
6970
+ return response;
6971
+ } else if (response.status >= 200 && response.status < 300) {
6972
+ return response.json();
6973
+ } else {
6974
+ throw response;
6975
+ }
6976
+ }),
6977
+ new Promise(
6978
+ (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
6979
+ )
6980
+ ]);
6981
+ }
6953
6982
  };
6954
6983
 
6955
6984
  // session.ts
@@ -10654,7 +10683,7 @@ var Client = class {
10654
10683
  });
10655
10684
  });
10656
10685
  }
10657
- //**list sd topic */
10686
+ //**get join mezon meet */
10658
10687
  getJoinMezonMeet(session, channelId, roomName) {
10659
10688
  return __async(this, null, function* () {
10660
10689
  if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
@@ -10665,6 +10694,17 @@ var Client = class {
10665
10694
  });
10666
10695
  });
10667
10696
  }
10697
+ //**create room channel apps */
10698
+ createRoomChannelApps(session, body) {
10699
+ return __async(this, null, function* () {
10700
+ if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
10701
+ yield this.sessionRefresh(session);
10702
+ }
10703
+ return this.apiClient.createRoomChannelApps(session.token, body).then((response) => {
10704
+ return Promise.resolve(response);
10705
+ });
10706
+ });
10707
+ }
10668
10708
  };
10669
10709
  export {
10670
10710
  ChannelStreamMode,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mezon-js",
3
3
 
4
- "version": "2.10.80",
4
+ "version": "2.10.81",
5
5
 
6
6
  "scripts": {
7
7
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"