mezon-js 2.12.6 → 2.12.7
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 +72 -0
- package/client.ts +13 -0
- package/dist/api.gen.d.ts +21 -0
- package/dist/client.d.ts +3 -1
- package/dist/mezon-js.cjs.js +35 -0
- package/dist/mezon-js.esm.mjs +35 -0
- package/package.json +1 -1
package/api.gen.ts
CHANGED
@@ -3156,6 +3156,40 @@ export interface ApiUserEventRequest {
|
|
3156
3156
|
event_id?: string;
|
3157
3157
|
}
|
3158
3158
|
|
3159
|
+
/** */
|
3160
|
+
export interface ApiClanDiscover {
|
3161
|
+
//
|
3162
|
+
about?: string;
|
3163
|
+
//
|
3164
|
+
banner?: string;
|
3165
|
+
//
|
3166
|
+
clan_id?: string;
|
3167
|
+
//
|
3168
|
+
clan_logo?: string;
|
3169
|
+
//
|
3170
|
+
clan_name?: string;
|
3171
|
+
//
|
3172
|
+
description?: string;
|
3173
|
+
//
|
3174
|
+
invite_id?: string;
|
3175
|
+
//
|
3176
|
+
online_members?: number;
|
3177
|
+
//
|
3178
|
+
total_members?: number;
|
3179
|
+
//
|
3180
|
+
verified?: boolean;
|
3181
|
+
}
|
3182
|
+
|
3183
|
+
/** */
|
3184
|
+
export interface ApiListClanDiscover {
|
3185
|
+
//
|
3186
|
+
clan_discover?: Array<ApiClanDiscover>;
|
3187
|
+
//
|
3188
|
+
page?: number;
|
3189
|
+
//
|
3190
|
+
page_count?: number;
|
3191
|
+
}
|
3192
|
+
|
3159
3193
|
export class MezonApi {
|
3160
3194
|
basePath: string;
|
3161
3195
|
constructor(
|
@@ -10743,4 +10777,42 @@ export class MezonApi {
|
|
10743
10777
|
),
|
10744
10778
|
]);
|
10745
10779
|
}
|
10780
|
+
|
10781
|
+
/** Discover mezon clan. */
|
10782
|
+
clanDiscover(basicAuthUsername: string,
|
10783
|
+
basicAuthPassword: string,
|
10784
|
+
basePath: string,
|
10785
|
+
page: number,
|
10786
|
+
options: any = {}): Promise<ApiListClanDiscover> {
|
10787
|
+
|
10788
|
+
if (page === null || page === undefined) {
|
10789
|
+
throw new Error("'page' is a required parameter but is null or undefined.");
|
10790
|
+
}
|
10791
|
+
const urlPath = "/v2/clan/discover";
|
10792
|
+
const queryParams = new Map<string, any>();
|
10793
|
+
|
10794
|
+
let bodyJson : string = "";
|
10795
|
+
bodyJson = JSON.stringify(page || {});
|
10796
|
+
|
10797
|
+
const fullUrl = this.buildFullUrl(basePath, urlPath, queryParams);
|
10798
|
+
const fetchOptions = buildFetchOptions("POST", options, bodyJson);
|
10799
|
+
if (basicAuthUsername) {
|
10800
|
+
fetchOptions.headers["Authorization"] = "Basic " + encode(basicAuthUsername + ":" + basicAuthPassword);
|
10801
|
+
}
|
10802
|
+
|
10803
|
+
return Promise.race([
|
10804
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
10805
|
+
if (response.status == 204) {
|
10806
|
+
return response;
|
10807
|
+
} else if (response.status >= 200 && response.status < 300) {
|
10808
|
+
return response.json();
|
10809
|
+
} else {
|
10810
|
+
throw response;
|
10811
|
+
}
|
10812
|
+
}),
|
10813
|
+
new Promise((_, reject) =>
|
10814
|
+
setTimeout(reject, this.timeoutMs, "Request timed out.")
|
10815
|
+
),
|
10816
|
+
]);
|
10817
|
+
}
|
10746
10818
|
}
|
package/client.ts
CHANGED
@@ -163,6 +163,7 @@ import {
|
|
163
163
|
ApiGenerateMeetTokenExternalResponse,
|
164
164
|
ApiUpdateClanOrderRequest,
|
165
165
|
ApiMessage2InboxRequest,
|
166
|
+
ApiListClanDiscover,
|
166
167
|
} from "./api.gen";
|
167
168
|
|
168
169
|
import { Session } from "./session";
|
@@ -4736,4 +4737,16 @@ export class Client {
|
|
4736
4737
|
return response !== undefined;
|
4737
4738
|
});
|
4738
4739
|
}
|
4740
|
+
|
4741
|
+
/** list clan discover. */
|
4742
|
+
listClanDiscover(
|
4743
|
+
basePath: string,
|
4744
|
+
page: number
|
4745
|
+
): Promise<ApiListClanDiscover> {
|
4746
|
+
return this.apiClient
|
4747
|
+
.clanDiscover(this.serverkey, "", basePath, page)
|
4748
|
+
.then((response: ApiListClanDiscover) => {
|
4749
|
+
return Promise.resolve(response);
|
4750
|
+
});
|
4751
|
+
}
|
4739
4752
|
}
|
package/dist/api.gen.d.ts
CHANGED
@@ -1807,6 +1807,25 @@ export interface ApiUserEventRequest {
|
|
1807
1807
|
clan_id?: string;
|
1808
1808
|
event_id?: string;
|
1809
1809
|
}
|
1810
|
+
/** */
|
1811
|
+
export interface ApiClanDiscover {
|
1812
|
+
about?: string;
|
1813
|
+
banner?: string;
|
1814
|
+
clan_id?: string;
|
1815
|
+
clan_logo?: string;
|
1816
|
+
clan_name?: string;
|
1817
|
+
description?: string;
|
1818
|
+
invite_id?: string;
|
1819
|
+
online_members?: number;
|
1820
|
+
total_members?: number;
|
1821
|
+
verified?: boolean;
|
1822
|
+
}
|
1823
|
+
/** */
|
1824
|
+
export interface ApiListClanDiscover {
|
1825
|
+
clan_discover?: Array<ApiClanDiscover>;
|
1826
|
+
page?: number;
|
1827
|
+
page_count?: number;
|
1828
|
+
}
|
1810
1829
|
export declare class MezonApi {
|
1811
1830
|
readonly serverKey: string;
|
1812
1831
|
readonly timeoutMs: number;
|
@@ -2194,4 +2213,6 @@ export declare class MezonApi {
|
|
2194
2213
|
listChannelDetail(bearerToken: string, channelId: string, options?: any): Promise<ApiChannelDescription>;
|
2195
2214
|
/** */
|
2196
2215
|
updateClanOrder(bearerToken: string, body: ApiUpdateClanOrderRequest, options?: any): Promise<any>;
|
2216
|
+
/** Discover mezon clan. */
|
2217
|
+
clanDiscover(basicAuthUsername: string, basicAuthPassword: string, basePath: string, page: number, options?: any): Promise<ApiListClanDiscover>;
|
2197
2218
|
}
|
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, ApiAccountMezon, ApiAccountEmail, ApiChannelDescList, ApiChannelDescription, ApiCreateChannelDescRequest, ApiDeleteRoleRequest, ApiClanDescList, ApiCreateClanDescRequest, ApiClanDesc, ApiCategoryDesc, ApiCategoryDescList, ApiPermissionList, ApiRoleUserList, ApiRole, ApiCreateRoleRequest, ApiAddRoleChannelDescRequest, ApiCreateCategoryDescRequest, ApiUpdateCategoryDescRequest, ApiEvent, ApiNotificationList, ApiUpdateAccountRequest, ApiSession, 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, MezonapiCreateRoomChannelApps, ApiGenerateMeetTokenRequest, ApiGenerateMeetTokenResponse, ApiMezonOauthClientList, ApiMezonOauthClient, ApiCreateHashChannelAppsResponse, MezonapiEmojiRecentList, ApiUserEventRequest, ApiUpdateRoleOrderRequest, ApiGenerateMezonMeetResponse, ApiGenerateMeetTokenExternalResponse, ApiUpdateClanOrderRequest, ApiMessage2InboxRequest } from "./api.gen";
|
16
|
+
import { ApiAccount, ApiAccountMezon, ApiAccountEmail, ApiChannelDescList, ApiChannelDescription, ApiCreateChannelDescRequest, ApiDeleteRoleRequest, ApiClanDescList, ApiCreateClanDescRequest, ApiClanDesc, ApiCategoryDesc, ApiCategoryDescList, ApiPermissionList, ApiRoleUserList, ApiRole, ApiCreateRoleRequest, ApiAddRoleChannelDescRequest, ApiCreateCategoryDescRequest, ApiUpdateCategoryDescRequest, ApiEvent, ApiNotificationList, ApiUpdateAccountRequest, ApiSession, 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, MezonapiCreateRoomChannelApps, ApiGenerateMeetTokenRequest, ApiGenerateMeetTokenResponse, ApiMezonOauthClientList, ApiMezonOauthClient, ApiCreateHashChannelAppsResponse, MezonapiEmojiRecentList, ApiUserEventRequest, ApiUpdateRoleOrderRequest, ApiGenerateMezonMeetResponse, ApiGenerateMeetTokenExternalResponse, ApiUpdateClanOrderRequest, ApiMessage2InboxRequest, ApiListClanDiscover } from "./api.gen";
|
17
17
|
import { Session } from "./session";
|
18
18
|
import { Socket } from "./socket";
|
19
19
|
import { WebSocketAdapter } from "./web_socket_adapter";
|
@@ -621,4 +621,6 @@ export declare class Client {
|
|
621
621
|
generateMeetTokenExternal(token: string, displayName?: string, isGuest?: boolean): Promise<ApiGenerateMeetTokenExternalResponse>;
|
622
622
|
/** Update clan order to view. */
|
623
623
|
updateClanOrder(session: Session, request: ApiUpdateClanOrderRequest): Promise<boolean>;
|
624
|
+
/** list clan discover. */
|
625
|
+
listClanDiscover(basePath: string, page: number): Promise<ApiListClanDiscover>;
|
624
626
|
}
|
package/dist/mezon-js.cjs.js
CHANGED
@@ -6660,6 +6660,35 @@ var MezonApi = class {
|
|
6660
6660
|
)
|
6661
6661
|
]);
|
6662
6662
|
}
|
6663
|
+
/** Discover mezon clan. */
|
6664
|
+
clanDiscover(basicAuthUsername, basicAuthPassword, basePath, page, options = {}) {
|
6665
|
+
if (page === null || page === void 0) {
|
6666
|
+
throw new Error("'page' is a required parameter but is null or undefined.");
|
6667
|
+
}
|
6668
|
+
const urlPath = "/v2/clan/discover";
|
6669
|
+
const queryParams = /* @__PURE__ */ new Map();
|
6670
|
+
let bodyJson = "";
|
6671
|
+
bodyJson = JSON.stringify(page || {});
|
6672
|
+
const fullUrl = this.buildFullUrl(basePath, urlPath, queryParams);
|
6673
|
+
const fetchOptions = buildFetchOptions("POST", options, bodyJson);
|
6674
|
+
if (basicAuthUsername) {
|
6675
|
+
fetchOptions.headers["Authorization"] = "Basic " + encode(basicAuthUsername + ":" + basicAuthPassword);
|
6676
|
+
}
|
6677
|
+
return Promise.race([
|
6678
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
6679
|
+
if (response.status == 204) {
|
6680
|
+
return response;
|
6681
|
+
} else if (response.status >= 200 && response.status < 300) {
|
6682
|
+
return response.json();
|
6683
|
+
} else {
|
6684
|
+
throw response;
|
6685
|
+
}
|
6686
|
+
}),
|
6687
|
+
new Promise(
|
6688
|
+
(_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
|
6689
|
+
)
|
6690
|
+
]);
|
6691
|
+
}
|
6663
6692
|
};
|
6664
6693
|
|
6665
6694
|
// session.ts
|
@@ -10302,4 +10331,10 @@ var Client = class {
|
|
10302
10331
|
});
|
10303
10332
|
});
|
10304
10333
|
}
|
10334
|
+
/** list clan discover. */
|
10335
|
+
listClanDiscover(basePath, page) {
|
10336
|
+
return this.apiClient.clanDiscover(this.serverkey, "", basePath, page).then((response) => {
|
10337
|
+
return Promise.resolve(response);
|
10338
|
+
});
|
10339
|
+
}
|
10305
10340
|
};
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -6626,6 +6626,35 @@ var MezonApi = class {
|
|
6626
6626
|
)
|
6627
6627
|
]);
|
6628
6628
|
}
|
6629
|
+
/** Discover mezon clan. */
|
6630
|
+
clanDiscover(basicAuthUsername, basicAuthPassword, basePath, page, options = {}) {
|
6631
|
+
if (page === null || page === void 0) {
|
6632
|
+
throw new Error("'page' is a required parameter but is null or undefined.");
|
6633
|
+
}
|
6634
|
+
const urlPath = "/v2/clan/discover";
|
6635
|
+
const queryParams = /* @__PURE__ */ new Map();
|
6636
|
+
let bodyJson = "";
|
6637
|
+
bodyJson = JSON.stringify(page || {});
|
6638
|
+
const fullUrl = this.buildFullUrl(basePath, urlPath, queryParams);
|
6639
|
+
const fetchOptions = buildFetchOptions("POST", options, bodyJson);
|
6640
|
+
if (basicAuthUsername) {
|
6641
|
+
fetchOptions.headers["Authorization"] = "Basic " + encode(basicAuthUsername + ":" + basicAuthPassword);
|
6642
|
+
}
|
6643
|
+
return Promise.race([
|
6644
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
6645
|
+
if (response.status == 204) {
|
6646
|
+
return response;
|
6647
|
+
} else if (response.status >= 200 && response.status < 300) {
|
6648
|
+
return response.json();
|
6649
|
+
} else {
|
6650
|
+
throw response;
|
6651
|
+
}
|
6652
|
+
}),
|
6653
|
+
new Promise(
|
6654
|
+
(_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
|
6655
|
+
)
|
6656
|
+
]);
|
6657
|
+
}
|
6629
6658
|
};
|
6630
6659
|
|
6631
6660
|
// session.ts
|
@@ -10268,6 +10297,12 @@ var Client = class {
|
|
10268
10297
|
});
|
10269
10298
|
});
|
10270
10299
|
}
|
10300
|
+
/** list clan discover. */
|
10301
|
+
listClanDiscover(basePath, page) {
|
10302
|
+
return this.apiClient.clanDiscover(this.serverkey, "", basePath, page).then((response) => {
|
10303
|
+
return Promise.resolve(response);
|
10304
|
+
});
|
10305
|
+
}
|
10271
10306
|
};
|
10272
10307
|
export {
|
10273
10308
|
ChannelStreamMode,
|