mezon-js 2.10.80 → 2.10.82
Sign up to get free protection for your applications and to get access to all the features.
- package/api.gen.ts +47 -1
- package/client.ts +22 -1
- package/dist/api.gen.d.ts +9 -1
- package/dist/client.d.ts +2 -1
- package/dist/mezon-js.cjs.js +41 -1
- package/dist/mezon-js.esm.mjs +41 -1
- package/package.json +1 -1
package/api.gen.ts
CHANGED
@@ -774,13 +774,15 @@ export interface ApiChannelDescription {
|
|
774
774
|
//
|
775
775
|
user_id?: Array<string>;
|
776
776
|
//
|
777
|
-
usernames?: string
|
777
|
+
usernames?: Array<string>;
|
778
778
|
//
|
779
779
|
status?: number;
|
780
780
|
//
|
781
781
|
metadata?: Array<string>;
|
782
782
|
//
|
783
783
|
about_me?: Array<string>;
|
784
|
+
//
|
785
|
+
display_names?: Array<string>;
|
784
786
|
}
|
785
787
|
|
786
788
|
/** A message sent on a channel. */
|
@@ -2838,6 +2840,14 @@ export interface ApiGetJoinMezonMeetResponse {
|
|
2838
2840
|
user_name?: string;
|
2839
2841
|
}
|
2840
2842
|
|
2843
|
+
/** */
|
2844
|
+
export interface MezonapiCreateRoomChannelApps {
|
2845
|
+
//
|
2846
|
+
channel_id?: string;
|
2847
|
+
//
|
2848
|
+
room_name?: string;
|
2849
|
+
}
|
2850
|
+
|
2841
2851
|
export class MezonApi {
|
2842
2852
|
constructor(
|
2843
2853
|
readonly serverKey: string,
|
@@ -10848,4 +10858,40 @@ export class MezonApi {
|
|
10848
10858
|
),
|
10849
10859
|
]);
|
10850
10860
|
}
|
10861
|
+
|
10862
|
+
/** create meeting room */
|
10863
|
+
createRoomChannelApps(bearerToken: string,
|
10864
|
+
body:MezonapiCreateRoomChannelApps,
|
10865
|
+
options: any = {}): Promise<MezonapiCreateRoomChannelApps> {
|
10866
|
+
|
10867
|
+
if (body === null || body === undefined) {
|
10868
|
+
throw new Error("'body' is a required parameter but is null or undefined.");
|
10869
|
+
}
|
10870
|
+
const urlPath = "/v2/channel-apps/createroom";
|
10871
|
+
const queryParams = new Map<string, any>();
|
10872
|
+
|
10873
|
+
let bodyJson : string = "";
|
10874
|
+
bodyJson = JSON.stringify(body || {});
|
10875
|
+
|
10876
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
10877
|
+
const fetchOptions = buildFetchOptions("POST", options, bodyJson);
|
10878
|
+
if (bearerToken) {
|
10879
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
10880
|
+
}
|
10881
|
+
|
10882
|
+
return Promise.race([
|
10883
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
10884
|
+
if (response.status == 204) {
|
10885
|
+
return response;
|
10886
|
+
} else if (response.status >= 200 && response.status < 300) {
|
10887
|
+
return response.json();
|
10888
|
+
} else {
|
10889
|
+
throw response;
|
10890
|
+
}
|
10891
|
+
}),
|
10892
|
+
new Promise((_, reject) =>
|
10893
|
+
setTimeout(reject, this.timeoutMs, "Request timed out.")
|
10894
|
+
),
|
10895
|
+
]);
|
10896
|
+
}
|
10851
10897
|
}
|
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
|
-
//**
|
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
@@ -447,10 +447,11 @@ export interface ApiChannelDescription {
|
|
447
447
|
type?: number;
|
448
448
|
update_time_seconds?: number;
|
449
449
|
user_id?: Array<string>;
|
450
|
-
usernames?: string
|
450
|
+
usernames?: Array<string>;
|
451
451
|
status?: number;
|
452
452
|
metadata?: Array<string>;
|
453
453
|
about_me?: Array<string>;
|
454
|
+
display_names?: Array<string>;
|
454
455
|
}
|
455
456
|
/** A message sent on a channel. */
|
456
457
|
export interface ApiChannelMessage {
|
@@ -1642,6 +1643,11 @@ export interface ApiGetJoinMezonMeetResponse {
|
|
1642
1643
|
user_id?: string;
|
1643
1644
|
user_name?: string;
|
1644
1645
|
}
|
1646
|
+
/** */
|
1647
|
+
export interface MezonapiCreateRoomChannelApps {
|
1648
|
+
channel_id?: string;
|
1649
|
+
room_name?: string;
|
1650
|
+
}
|
1645
1651
|
export declare class MezonApi {
|
1646
1652
|
readonly serverKey: string;
|
1647
1653
|
readonly basePath: string;
|
@@ -2044,4 +2050,6 @@ export declare class MezonApi {
|
|
2044
2050
|
updateOnboardingStepByClanId(bearerToken: string, clanId: string, body: MezonUpdateOnboardingStepByClanIdBody, options?: any): Promise<any>;
|
2045
2051
|
/** GetJoinMezonMeet */
|
2046
2052
|
getJoinMezonMeet(bearerToken: string, channelId?: string, roomName?: string, options?: any): Promise<ApiGetJoinMezonMeetResponse>;
|
2053
|
+
/** create meeting room */
|
2054
|
+
createRoomChannelApps(bearerToken: string, body: MezonapiCreateRoomChannelApps, options?: any): Promise<MezonapiCreateRoomChannelApps>;
|
2047
2055
|
}
|
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
|
}
|
package/dist/mezon-js.cjs.js
CHANGED
@@ -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
|
-
//**
|
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
|
};
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -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
|
-
//**
|
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,
|