mezon-js 2.10.62 → 2.10.64
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 +7 -7
- package/client.ts +10 -10
- package/dist/api.gen.d.ts +5 -5
- package/dist/client.d.ts +2 -2
- package/dist/mezon-js.cjs.js +9 -9
- package/dist/mezon-js.esm.mjs +9 -9
- package/package.json +1 -1
package/api.gen.ts
CHANGED
@@ -1777,7 +1777,7 @@ export interface ApiStreamHttpCallbackResponse {
|
|
1777
1777
|
}
|
1778
1778
|
|
1779
1779
|
/** A list of users belonging to a channel, along with their role. */
|
1780
|
-
export interface
|
1780
|
+
export interface ApiSFUChannelUser {
|
1781
1781
|
//
|
1782
1782
|
channel_id?: string;
|
1783
1783
|
//
|
@@ -1789,9 +1789,9 @@ export interface ApiPTTChannelUser {
|
|
1789
1789
|
}
|
1790
1790
|
|
1791
1791
|
/** A list of users belonging to a channel, along with their role. */
|
1792
|
-
export interface
|
1792
|
+
export interface ApiSFUChannelUserList {
|
1793
1793
|
//
|
1794
|
-
|
1794
|
+
sfu_channel_users?: Array<ApiSFUChannelUser>;
|
1795
1795
|
}
|
1796
1796
|
|
1797
1797
|
/** */
|
@@ -8129,8 +8129,8 @@ export class MezonApi {
|
|
8129
8129
|
]);
|
8130
8130
|
}
|
8131
8131
|
|
8132
|
-
/** List all users in
|
8133
|
-
|
8132
|
+
/** List all users in SFU channel. */
|
8133
|
+
listSFUChannelUsers(
|
8134
8134
|
bearerToken: string,
|
8135
8135
|
clanId?: string,
|
8136
8136
|
channelId?: string,
|
@@ -8139,8 +8139,8 @@ export class MezonApi {
|
|
8139
8139
|
state?: number,
|
8140
8140
|
cursor?: string,
|
8141
8141
|
options: any = {}
|
8142
|
-
): Promise<
|
8143
|
-
const urlPath = "/v2/
|
8142
|
+
): Promise<ApiSFUChannelUserList> {
|
8143
|
+
const urlPath = "/v2/sfu_channels/users";
|
8144
8144
|
const queryParams = new Map<string, any>();
|
8145
8145
|
queryParams.set("clan_id", clanId);
|
8146
8146
|
queryParams.set("channel_id", channelId);
|
package/client.ts
CHANGED
@@ -156,7 +156,7 @@ import {
|
|
156
156
|
ApiSdTopicList,
|
157
157
|
ApiSdTopicRequest,
|
158
158
|
ApiSdTopic,
|
159
|
-
|
159
|
+
ApiSFUChannelUserList,
|
160
160
|
MezonUpdateEventBody,
|
161
161
|
} from "./api.gen";
|
162
162
|
|
@@ -4753,7 +4753,7 @@ export class Client {
|
|
4753
4753
|
}
|
4754
4754
|
|
4755
4755
|
/** List a ptt channel's users. */
|
4756
|
-
async
|
4756
|
+
async listSFUChannelUsers(
|
4757
4757
|
session: Session,
|
4758
4758
|
clanId: string,
|
4759
4759
|
channelId: string,
|
@@ -4761,7 +4761,7 @@ export class Client {
|
|
4761
4761
|
state?: number,
|
4762
4762
|
limit?: number,
|
4763
4763
|
cursor?: string
|
4764
|
-
): Promise<
|
4764
|
+
): Promise<ApiSFUChannelUserList> {
|
4765
4765
|
if (
|
4766
4766
|
this.autoRefreshSession &&
|
4767
4767
|
session.refresh_token &&
|
@@ -4771,7 +4771,7 @@ export class Client {
|
|
4771
4771
|
}
|
4772
4772
|
|
4773
4773
|
return this.apiClient
|
4774
|
-
.
|
4774
|
+
.listSFUChannelUsers(
|
4775
4775
|
session.token,
|
4776
4776
|
clanId,
|
4777
4777
|
channelId,
|
@@ -4780,17 +4780,17 @@ export class Client {
|
|
4780
4780
|
state,
|
4781
4781
|
cursor
|
4782
4782
|
)
|
4783
|
-
.then((response:
|
4784
|
-
var result:
|
4785
|
-
|
4783
|
+
.then((response: ApiSFUChannelUserList) => {
|
4784
|
+
var result: ApiSFUChannelUserList = {
|
4785
|
+
sfu_channel_users: [],
|
4786
4786
|
};
|
4787
4787
|
|
4788
|
-
if (response.
|
4788
|
+
if (response.sfu_channel_users == null) {
|
4789
4789
|
return Promise.resolve(result);
|
4790
4790
|
}
|
4791
4791
|
|
4792
|
-
response.
|
4793
|
-
result.
|
4792
|
+
response.sfu_channel_users!.forEach((gu) => {
|
4793
|
+
result.sfu_channel_users!.push({
|
4794
4794
|
id: gu.id,
|
4795
4795
|
channel_id: gu.channel_id,
|
4796
4796
|
user_id: gu.user_id,
|
package/dist/api.gen.d.ts
CHANGED
@@ -1028,15 +1028,15 @@ export interface ApiStreamHttpCallbackResponse {
|
|
1028
1028
|
msg?: string;
|
1029
1029
|
}
|
1030
1030
|
/** A list of users belonging to a channel, along with their role. */
|
1031
|
-
export interface
|
1031
|
+
export interface ApiSFUChannelUser {
|
1032
1032
|
channel_id?: string;
|
1033
1033
|
id?: string;
|
1034
1034
|
participant?: string;
|
1035
1035
|
user_id?: string;
|
1036
1036
|
}
|
1037
1037
|
/** A list of users belonging to a channel, along with their role. */
|
1038
|
-
export interface
|
1039
|
-
|
1038
|
+
export interface ApiSFUChannelUserList {
|
1039
|
+
sfu_channel_users?: Array<ApiSFUChannelUser>;
|
1040
1040
|
}
|
1041
1041
|
/** */
|
1042
1042
|
export interface ApiPermission {
|
@@ -1900,8 +1900,8 @@ export declare class MezonApi {
|
|
1900
1900
|
getPinMessagesList(bearerToken: string, messageId?: string, channelId?: string, clanId?: string, options?: any): Promise<ApiPinMessagesList>;
|
1901
1901
|
/** set notification user channel. */
|
1902
1902
|
createPinMessage(bearerToken: string, body: ApiPinMessageRequest, options?: any): Promise<ApiChannelMessageHeader>;
|
1903
|
-
/** List all users in
|
1904
|
-
|
1903
|
+
/** List all users in SFU channel. */
|
1904
|
+
listSFUChannelUsers(bearerToken: string, clanId?: string, channelId?: string, channelType?: number, limit?: number, state?: number, cursor?: string, options?: any): Promise<ApiSFUChannelUserList>;
|
1905
1905
|
/** get pubkey */
|
1906
1906
|
getPubKeys(bearerToken: string, userIds?: Array<string>, options?: any): Promise<ApiGetPubKeysResponse>;
|
1907
1907
|
/** store pubkey for e2ee */
|
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, 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,
|
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, 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, ApiSFUChannelUserList, MezonUpdateEventBody } from "./api.gen";
|
17
17
|
import { Session } from "./session";
|
18
18
|
import { Socket } from "./socket";
|
19
19
|
import { WebSocketAdapter } from "./web_socket_adapter";
|
@@ -638,7 +638,7 @@ export declare class Client {
|
|
638
638
|
updateUserStatus(session: Session, request: ApiUserStatusUpdate): Promise<boolean>;
|
639
639
|
getUserStatus(session: Session): Promise<ApiUserStatus>;
|
640
640
|
/** List a ptt channel's users. */
|
641
|
-
|
641
|
+
listSFUChannelUsers(session: Session, clanId: string, channelId: string, channelType: number, state?: number, limit?: number, cursor?: string): Promise<ApiSFUChannelUserList>;
|
642
642
|
listWalletLedger(session: Session, limit?: number, cursor?: string, transactionId?: string): Promise<ApiWalletLedgerList>;
|
643
643
|
listSdTopic(session: Session, clanId?: string, limit?: number): Promise<ApiSdTopicList>;
|
644
644
|
createSdTopic(session: Session, request: ApiSdTopicRequest): Promise<ApiSdTopic>;
|
package/dist/mezon-js.cjs.js
CHANGED
@@ -4879,9 +4879,9 @@ var MezonApi = class {
|
|
4879
4879
|
)
|
4880
4880
|
]);
|
4881
4881
|
}
|
4882
|
-
/** List all users in
|
4883
|
-
|
4884
|
-
const urlPath = "/v2/
|
4882
|
+
/** List all users in SFU channel. */
|
4883
|
+
listSFUChannelUsers(bearerToken, clanId, channelId, channelType, limit, state, cursor, options = {}) {
|
4884
|
+
const urlPath = "/v2/sfu_channels/users";
|
4885
4885
|
const queryParams = /* @__PURE__ */ new Map();
|
4886
4886
|
queryParams.set("clan_id", clanId);
|
4887
4887
|
queryParams.set("channel_id", channelId);
|
@@ -10572,12 +10572,12 @@ var Client = class {
|
|
10572
10572
|
});
|
10573
10573
|
}
|
10574
10574
|
/** List a ptt channel's users. */
|
10575
|
-
|
10575
|
+
listSFUChannelUsers(session, clanId, channelId, channelType, state, limit, cursor) {
|
10576
10576
|
return __async(this, null, function* () {
|
10577
10577
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
10578
10578
|
yield this.sessionRefresh(session);
|
10579
10579
|
}
|
10580
|
-
return this.apiClient.
|
10580
|
+
return this.apiClient.listSFUChannelUsers(
|
10581
10581
|
session.token,
|
10582
10582
|
clanId,
|
10583
10583
|
channelId,
|
@@ -10587,13 +10587,13 @@ var Client = class {
|
|
10587
10587
|
cursor
|
10588
10588
|
).then((response) => {
|
10589
10589
|
var result = {
|
10590
|
-
|
10590
|
+
sfu_channel_users: []
|
10591
10591
|
};
|
10592
|
-
if (response.
|
10592
|
+
if (response.sfu_channel_users == null) {
|
10593
10593
|
return Promise.resolve(result);
|
10594
10594
|
}
|
10595
|
-
response.
|
10596
|
-
result.
|
10595
|
+
response.sfu_channel_users.forEach((gu) => {
|
10596
|
+
result.sfu_channel_users.push({
|
10597
10597
|
id: gu.id,
|
10598
10598
|
channel_id: gu.channel_id,
|
10599
10599
|
user_id: gu.user_id,
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -4844,9 +4844,9 @@ var MezonApi = class {
|
|
4844
4844
|
)
|
4845
4845
|
]);
|
4846
4846
|
}
|
4847
|
-
/** List all users in
|
4848
|
-
|
4849
|
-
const urlPath = "/v2/
|
4847
|
+
/** List all users in SFU channel. */
|
4848
|
+
listSFUChannelUsers(bearerToken, clanId, channelId, channelType, limit, state, cursor, options = {}) {
|
4849
|
+
const urlPath = "/v2/sfu_channels/users";
|
4850
4850
|
const queryParams = /* @__PURE__ */ new Map();
|
4851
4851
|
queryParams.set("clan_id", clanId);
|
4852
4852
|
queryParams.set("channel_id", channelId);
|
@@ -10537,12 +10537,12 @@ var Client = class {
|
|
10537
10537
|
});
|
10538
10538
|
}
|
10539
10539
|
/** List a ptt channel's users. */
|
10540
|
-
|
10540
|
+
listSFUChannelUsers(session, clanId, channelId, channelType, state, limit, cursor) {
|
10541
10541
|
return __async(this, null, function* () {
|
10542
10542
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
10543
10543
|
yield this.sessionRefresh(session);
|
10544
10544
|
}
|
10545
|
-
return this.apiClient.
|
10545
|
+
return this.apiClient.listSFUChannelUsers(
|
10546
10546
|
session.token,
|
10547
10547
|
clanId,
|
10548
10548
|
channelId,
|
@@ -10552,13 +10552,13 @@ var Client = class {
|
|
10552
10552
|
cursor
|
10553
10553
|
).then((response) => {
|
10554
10554
|
var result = {
|
10555
|
-
|
10555
|
+
sfu_channel_users: []
|
10556
10556
|
};
|
10557
|
-
if (response.
|
10557
|
+
if (response.sfu_channel_users == null) {
|
10558
10558
|
return Promise.resolve(result);
|
10559
10559
|
}
|
10560
|
-
response.
|
10561
|
-
result.
|
10560
|
+
response.sfu_channel_users.forEach((gu) => {
|
10561
|
+
result.sfu_channel_users.push({
|
10562
10562
|
id: gu.id,
|
10563
10563
|
channel_id: gu.channel_id,
|
10564
10564
|
user_id: gu.user_id,
|