mezon-js 2.12.6 → 2.12.8
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 +80 -0
- package/client.ts +14 -0
- package/dist/api.gen.d.ts +26 -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,48 @@ 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
|
+
|
3193
|
+
/** */
|
3194
|
+
export interface ApiClanDiscoverRequest {
|
3195
|
+
//
|
3196
|
+
item_per_page?: number;
|
3197
|
+
//
|
3198
|
+
page_number?: number;
|
3199
|
+
}
|
3200
|
+
|
3159
3201
|
export class MezonApi {
|
3160
3202
|
basePath: string;
|
3161
3203
|
constructor(
|
@@ -10743,4 +10785,42 @@ export class MezonApi {
|
|
10743
10785
|
),
|
10744
10786
|
]);
|
10745
10787
|
}
|
10788
|
+
|
10789
|
+
/** Discover mezon clan. */
|
10790
|
+
clanDiscover(basicAuthUsername: string,
|
10791
|
+
basicAuthPassword: string,
|
10792
|
+
basePath: string,
|
10793
|
+
body:ApiClanDiscoverRequest,
|
10794
|
+
options: any = {}): Promise<ApiListClanDiscover> {
|
10795
|
+
|
10796
|
+
if (body === null || body === undefined) {
|
10797
|
+
throw new Error("'body' is a required parameter but is null or undefined.");
|
10798
|
+
}
|
10799
|
+
const urlPath = "/v2/clan/discover";
|
10800
|
+
const queryParams = new Map<string, any>();
|
10801
|
+
|
10802
|
+
let bodyJson : string = "";
|
10803
|
+
bodyJson = JSON.stringify(body || {});
|
10804
|
+
|
10805
|
+
const fullUrl = this.buildFullUrl(basePath, urlPath, queryParams);
|
10806
|
+
const fetchOptions = buildFetchOptions("POST", options, bodyJson);
|
10807
|
+
if (basicAuthUsername) {
|
10808
|
+
fetchOptions.headers["Authorization"] = "Basic " + encode(basicAuthUsername + ":" + basicAuthPassword);
|
10809
|
+
}
|
10810
|
+
|
10811
|
+
return Promise.race([
|
10812
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
10813
|
+
if (response.status == 204) {
|
10814
|
+
return response;
|
10815
|
+
} else if (response.status >= 200 && response.status < 300) {
|
10816
|
+
return response.json();
|
10817
|
+
} else {
|
10818
|
+
throw response;
|
10819
|
+
}
|
10820
|
+
}),
|
10821
|
+
new Promise((_, reject) =>
|
10822
|
+
setTimeout(reject, this.timeoutMs, "Request timed out.")
|
10823
|
+
),
|
10824
|
+
]);
|
10825
|
+
}
|
10746
10826
|
}
|
package/client.ts
CHANGED
@@ -163,6 +163,8 @@ import {
|
|
163
163
|
ApiGenerateMeetTokenExternalResponse,
|
164
164
|
ApiUpdateClanOrderRequest,
|
165
165
|
ApiMessage2InboxRequest,
|
166
|
+
ApiListClanDiscover,
|
167
|
+
ApiClanDiscoverRequest,
|
166
168
|
} from "./api.gen";
|
167
169
|
|
168
170
|
import { Session } from "./session";
|
@@ -4736,4 +4738,16 @@ export class Client {
|
|
4736
4738
|
return response !== undefined;
|
4737
4739
|
});
|
4738
4740
|
}
|
4741
|
+
|
4742
|
+
/** list clan discover. */
|
4743
|
+
listClanDiscover(
|
4744
|
+
basePath: string,
|
4745
|
+
request: ApiClanDiscoverRequest
|
4746
|
+
): Promise<ApiListClanDiscover> {
|
4747
|
+
return this.apiClient
|
4748
|
+
.clanDiscover(this.serverkey, "", basePath, request)
|
4749
|
+
.then((response: ApiListClanDiscover) => {
|
4750
|
+
return Promise.resolve(response);
|
4751
|
+
});
|
4752
|
+
}
|
4739
4753
|
}
|
package/dist/api.gen.d.ts
CHANGED
@@ -1807,6 +1807,30 @@ 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
|
+
}
|
1829
|
+
/** */
|
1830
|
+
export interface ApiClanDiscoverRequest {
|
1831
|
+
item_per_page?: number;
|
1832
|
+
page_number?: number;
|
1833
|
+
}
|
1810
1834
|
export declare class MezonApi {
|
1811
1835
|
readonly serverKey: string;
|
1812
1836
|
readonly timeoutMs: number;
|
@@ -2194,4 +2218,6 @@ export declare class MezonApi {
|
|
2194
2218
|
listChannelDetail(bearerToken: string, channelId: string, options?: any): Promise<ApiChannelDescription>;
|
2195
2219
|
/** */
|
2196
2220
|
updateClanOrder(bearerToken: string, body: ApiUpdateClanOrderRequest, options?: any): Promise<any>;
|
2221
|
+
/** Discover mezon clan. */
|
2222
|
+
clanDiscover(basicAuthUsername: string, basicAuthPassword: string, basePath: string, body: ApiClanDiscoverRequest, options?: any): Promise<ApiListClanDiscover>;
|
2197
2223
|
}
|
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, ApiClanDiscoverRequest } 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, request: ApiClanDiscoverRequest): 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, body, options = {}) {
|
6665
|
+
if (body === null || body === void 0) {
|
6666
|
+
throw new Error("'body' 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(body || {});
|
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, request) {
|
10336
|
+
return this.apiClient.clanDiscover(this.serverkey, "", basePath, request).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, body, options = {}) {
|
6631
|
+
if (body === null || body === void 0) {
|
6632
|
+
throw new Error("'body' 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(body || {});
|
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, request) {
|
10302
|
+
return this.apiClient.clanDiscover(this.serverkey, "", basePath, request).then((response) => {
|
10303
|
+
return Promise.resolve(response);
|
10304
|
+
});
|
10305
|
+
}
|
10271
10306
|
};
|
10272
10307
|
export {
|
10273
10308
|
ChannelStreamMode,
|