mezon-js 2.12.46 → 2.12.48
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 +2 -49
- package/client.ts +1 -20
- package/dist/api.gen.d.ts +1 -11
- package/dist/client.d.ts +1 -2
- package/dist/mezon-js.cjs.js +2 -38
- package/dist/mezon-js.esm.mjs +2 -38
- package/package.json +1 -1
package/api.gen.ts
CHANGED
@@ -20,6 +20,8 @@ export interface ChannelUserListChannelUser {
|
|
20
20
|
thread_id?: string;
|
21
21
|
//User.
|
22
22
|
user_id?: string;
|
23
|
+
//Added by
|
24
|
+
added_by?: string;
|
23
25
|
}
|
24
26
|
|
25
27
|
/** A single user-role pair. */
|
@@ -3289,21 +3291,6 @@ export interface ApiClanDiscoverRequest {
|
|
3289
3291
|
page_number?: number;
|
3290
3292
|
}
|
3291
3293
|
|
3292
|
-
/** */
|
3293
|
-
export interface ApiChannelMemberDetail {
|
3294
|
-
//
|
3295
|
-
added_by?: string;
|
3296
|
-
//
|
3297
|
-
member_id?: string;
|
3298
|
-
}
|
3299
|
-
|
3300
|
-
/** */
|
3301
|
-
export interface ApiChannelMemberList {
|
3302
|
-
//
|
3303
|
-
channel_members?: Array<ApiChannelMemberDetail>;
|
3304
|
-
}
|
3305
|
-
|
3306
|
-
|
3307
3294
|
export class MezonApi {
|
3308
3295
|
basePath: string;
|
3309
3296
|
constructor(
|
@@ -11111,38 +11098,4 @@ export class MezonApi {
|
|
11111
11098
|
]);
|
11112
11099
|
}
|
11113
11100
|
|
11114
|
-
/** */
|
11115
|
-
listChannelMember(bearerToken: string,
|
11116
|
-
channelId?:string,
|
11117
|
-
clanId?:string,
|
11118
|
-
options: any = {}): Promise<ApiChannelMemberList> {
|
11119
|
-
|
11120
|
-
const urlPath = "/v2/listchannelmember";
|
11121
|
-
const queryParams = new Map<string, any>();
|
11122
|
-
queryParams.set("channel_id", channelId);
|
11123
|
-
queryParams.set("clan_id", clanId);
|
11124
|
-
|
11125
|
-
let bodyJson : string = "";
|
11126
|
-
|
11127
|
-
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
11128
|
-
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
11129
|
-
if (bearerToken) {
|
11130
|
-
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
11131
|
-
}
|
11132
|
-
|
11133
|
-
return Promise.race([
|
11134
|
-
fetch(fullUrl, fetchOptions).then((response) => {
|
11135
|
-
if (response.status == 204) {
|
11136
|
-
return response;
|
11137
|
-
} else if (response.status >= 200 && response.status < 300) {
|
11138
|
-
return response.json();
|
11139
|
-
} else {
|
11140
|
-
throw response;
|
11141
|
-
}
|
11142
|
-
}),
|
11143
|
-
new Promise((_, reject) =>
|
11144
|
-
setTimeout(reject, this.timeoutMs, "Request timed out.")
|
11145
|
-
),
|
11146
|
-
]);
|
11147
|
-
}
|
11148
11101
|
}
|
package/client.ts
CHANGED
@@ -169,7 +169,6 @@ import {
|
|
169
169
|
ApiUnlockedItemRequest,
|
170
170
|
ApiForSaleItemList,
|
171
171
|
ApiUnlockedItemResponse,
|
172
|
-
ApiChannelMemberList,
|
173
172
|
} from "./api.gen";
|
174
173
|
|
175
174
|
import { Session } from "./session";
|
@@ -1411,6 +1410,7 @@ export class Client {
|
|
1411
1410
|
clan_nick: gu.clan_nick,
|
1412
1411
|
id: gu.id,
|
1413
1412
|
clan_id: gu.clan_id,
|
1413
|
+
added_by: gu.added_by
|
1414
1414
|
});
|
1415
1415
|
});
|
1416
1416
|
return Promise.resolve(result);
|
@@ -4860,23 +4860,4 @@ export class Client {
|
|
4860
4860
|
});
|
4861
4861
|
}
|
4862
4862
|
|
4863
|
-
async listChannelMember(
|
4864
|
-
session: Session,
|
4865
|
-
channelId:string,
|
4866
|
-
clanId:string,
|
4867
|
-
): Promise<ApiChannelMemberList> {
|
4868
|
-
if (
|
4869
|
-
this.autoRefreshSession &&
|
4870
|
-
session.refresh_token &&
|
4871
|
-
session.isexpired(Date.now() / 1000)
|
4872
|
-
) {
|
4873
|
-
await this.sessionRefresh(session);
|
4874
|
-
}
|
4875
|
-
|
4876
|
-
return this.apiClient
|
4877
|
-
.listChannelMember(session.token, channelId, clanId)
|
4878
|
-
.then((response: ApiChannelMemberList) => {
|
4879
|
-
return Promise.resolve(response);
|
4880
|
-
});
|
4881
|
-
}
|
4882
4863
|
}
|
package/dist/api.gen.d.ts
CHANGED
@@ -7,6 +7,7 @@ export interface ChannelUserListChannelUser {
|
|
7
7
|
role_id?: Array<string>;
|
8
8
|
thread_id?: string;
|
9
9
|
user_id?: string;
|
10
|
+
added_by?: string;
|
10
11
|
}
|
11
12
|
/** A single user-role pair. */
|
12
13
|
export interface ClanUserListClanUser {
|
@@ -1884,15 +1885,6 @@ export interface ApiClanDiscoverRequest {
|
|
1884
1885
|
item_per_page?: number;
|
1885
1886
|
page_number?: number;
|
1886
1887
|
}
|
1887
|
-
/** */
|
1888
|
-
export interface ApiChannelMemberDetail {
|
1889
|
-
added_by?: string;
|
1890
|
-
member_id?: string;
|
1891
|
-
}
|
1892
|
-
/** */
|
1893
|
-
export interface ApiChannelMemberList {
|
1894
|
-
channel_members?: Array<ApiChannelMemberDetail>;
|
1895
|
-
}
|
1896
1888
|
export declare class MezonApi {
|
1897
1889
|
readonly serverKey: string;
|
1898
1890
|
readonly timeoutMs: number;
|
@@ -2292,6 +2284,4 @@ export declare class MezonApi {
|
|
2292
2284
|
unlockItem(bearerToken: string, body: ApiUnlockedItemRequest, options?: any): Promise<ApiUnlockedItemResponse>;
|
2293
2285
|
/** For sale items */
|
2294
2286
|
listForSaleItems(bearerToken: string, page?: number, options?: any): Promise<ApiForSaleItemList>;
|
2295
|
-
/** */
|
2296
|
-
listChannelMember(bearerToken: string, channelId?: string, clanId?: string, options?: any): Promise<ApiChannelMemberList>;
|
2297
2287
|
}
|
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, 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, ApiEmojiRecentList, ApiUserEventRequest, ApiUpdateRoleOrderRequest, ApiGenerateMezonMeetResponse, ApiGenerateMeetTokenExternalResponse, ApiUpdateClanOrderRequest, ApiMessage2InboxRequest, ApiListClanDiscover, ApiClanDiscoverRequest, ApiQuickMenuAccessList, ApiQuickMenuAccessRequest, ApiUnlockedItemRequest, ApiForSaleItemList, ApiUnlockedItemResponse
|
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, 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, ApiEmojiRecentList, ApiUserEventRequest, ApiUpdateRoleOrderRequest, ApiGenerateMezonMeetResponse, ApiGenerateMeetTokenExternalResponse, ApiUpdateClanOrderRequest, ApiMessage2InboxRequest, ApiListClanDiscover, ApiClanDiscoverRequest, ApiQuickMenuAccessList, ApiQuickMenuAccessRequest, ApiUnlockedItemRequest, ApiForSaleItemList, ApiUnlockedItemResponse } from "./api.gen";
|
17
17
|
import { Session } from "./session";
|
18
18
|
import { Socket } from "./socket";
|
19
19
|
import { WebSocketAdapter } from "./web_socket_adapter";
|
@@ -631,5 +631,4 @@ export declare class Client {
|
|
631
631
|
updateQuickMenuAccess(session: Session, request: ApiQuickMenuAccessRequest): Promise<any>;
|
632
632
|
unlockItem(session: Session, request: ApiUnlockedItemRequest): Promise<ApiUnlockedItemResponse>;
|
633
633
|
listForSaleItems(session: Session, page?: number): Promise<ApiForSaleItemList>;
|
634
|
-
listChannelMember(session: Session, channelId: string, clanId: string): Promise<ApiChannelMemberList>;
|
635
634
|
}
|
package/dist/mezon-js.cjs.js
CHANGED
@@ -6828,33 +6828,6 @@ var MezonApi = class {
|
|
6828
6828
|
)
|
6829
6829
|
]);
|
6830
6830
|
}
|
6831
|
-
/** */
|
6832
|
-
listChannelMember(bearerToken, channelId, clanId, options = {}) {
|
6833
|
-
const urlPath = "/v2/listchannelmember";
|
6834
|
-
const queryParams = /* @__PURE__ */ new Map();
|
6835
|
-
queryParams.set("channel_id", channelId);
|
6836
|
-
queryParams.set("clan_id", clanId);
|
6837
|
-
let bodyJson = "";
|
6838
|
-
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
6839
|
-
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
6840
|
-
if (bearerToken) {
|
6841
|
-
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
6842
|
-
}
|
6843
|
-
return Promise.race([
|
6844
|
-
fetch(fullUrl, fetchOptions).then((response) => {
|
6845
|
-
if (response.status == 204) {
|
6846
|
-
return response;
|
6847
|
-
} else if (response.status >= 200 && response.status < 300) {
|
6848
|
-
return response.json();
|
6849
|
-
} else {
|
6850
|
-
throw response;
|
6851
|
-
}
|
6852
|
-
}),
|
6853
|
-
new Promise(
|
6854
|
-
(_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
|
6855
|
-
)
|
6856
|
-
]);
|
6857
|
-
}
|
6858
6831
|
};
|
6859
6832
|
|
6860
6833
|
// session.ts
|
@@ -8674,7 +8647,8 @@ var Client = class {
|
|
8674
8647
|
clan_avatar: gu.clan_avatar,
|
8675
8648
|
clan_nick: gu.clan_nick,
|
8676
8649
|
id: gu.id,
|
8677
|
-
clan_id: gu.clan_id
|
8650
|
+
clan_id: gu.clan_id,
|
8651
|
+
added_by: gu.added_by
|
8678
8652
|
});
|
8679
8653
|
});
|
8680
8654
|
return Promise.resolve(result);
|
@@ -10660,14 +10634,4 @@ var Client = class {
|
|
10660
10634
|
});
|
10661
10635
|
});
|
10662
10636
|
}
|
10663
|
-
listChannelMember(session, channelId, clanId) {
|
10664
|
-
return __async(this, null, function* () {
|
10665
|
-
if (this.autoRefreshSession && session.refresh_token && session.isexpired(Date.now() / 1e3)) {
|
10666
|
-
yield this.sessionRefresh(session);
|
10667
|
-
}
|
10668
|
-
return this.apiClient.listChannelMember(session.token, channelId, clanId).then((response) => {
|
10669
|
-
return Promise.resolve(response);
|
10670
|
-
});
|
10671
|
-
});
|
10672
|
-
}
|
10673
10637
|
};
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -6794,33 +6794,6 @@ var MezonApi = class {
|
|
6794
6794
|
)
|
6795
6795
|
]);
|
6796
6796
|
}
|
6797
|
-
/** */
|
6798
|
-
listChannelMember(bearerToken, channelId, clanId, options = {}) {
|
6799
|
-
const urlPath = "/v2/listchannelmember";
|
6800
|
-
const queryParams = /* @__PURE__ */ new Map();
|
6801
|
-
queryParams.set("channel_id", channelId);
|
6802
|
-
queryParams.set("clan_id", clanId);
|
6803
|
-
let bodyJson = "";
|
6804
|
-
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
6805
|
-
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
6806
|
-
if (bearerToken) {
|
6807
|
-
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
6808
|
-
}
|
6809
|
-
return Promise.race([
|
6810
|
-
fetch(fullUrl, fetchOptions).then((response) => {
|
6811
|
-
if (response.status == 204) {
|
6812
|
-
return response;
|
6813
|
-
} else if (response.status >= 200 && response.status < 300) {
|
6814
|
-
return response.json();
|
6815
|
-
} else {
|
6816
|
-
throw response;
|
6817
|
-
}
|
6818
|
-
}),
|
6819
|
-
new Promise(
|
6820
|
-
(_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
|
6821
|
-
)
|
6822
|
-
]);
|
6823
|
-
}
|
6824
6797
|
};
|
6825
6798
|
|
6826
6799
|
// session.ts
|
@@ -8640,7 +8613,8 @@ var Client = class {
|
|
8640
8613
|
clan_avatar: gu.clan_avatar,
|
8641
8614
|
clan_nick: gu.clan_nick,
|
8642
8615
|
id: gu.id,
|
8643
|
-
clan_id: gu.clan_id
|
8616
|
+
clan_id: gu.clan_id,
|
8617
|
+
added_by: gu.added_by
|
8644
8618
|
});
|
8645
8619
|
});
|
8646
8620
|
return Promise.resolve(result);
|
@@ -10626,16 +10600,6 @@ var Client = class {
|
|
10626
10600
|
});
|
10627
10601
|
});
|
10628
10602
|
}
|
10629
|
-
listChannelMember(session, channelId, clanId) {
|
10630
|
-
return __async(this, null, function* () {
|
10631
|
-
if (this.autoRefreshSession && session.refresh_token && session.isexpired(Date.now() / 1e3)) {
|
10632
|
-
yield this.sessionRefresh(session);
|
10633
|
-
}
|
10634
|
-
return this.apiClient.listChannelMember(session.token, channelId, clanId).then((response) => {
|
10635
|
-
return Promise.resolve(response);
|
10636
|
-
});
|
10637
|
-
});
|
10638
|
-
}
|
10639
10603
|
};
|
10640
10604
|
export {
|
10641
10605
|
ChannelStreamMode,
|