mezon-js 2.10.75 → 2.10.77
Sign up to get free protection for your applications and to get access to all the features.
- package/api.gen.ts +50 -0
- package/client.ts +22 -0
- package/dist/api.gen.d.ts +10 -0
- package/dist/client.d.ts +2 -1
- package/dist/mezon-js.cjs.js +53 -12
- package/dist/mezon-js.esm.mjs +53 -12
- package/dist/socket.d.ts +13 -6
- package/package.json +1 -1
- package/socket.ts +35 -14
package/api.gen.ts
CHANGED
@@ -2822,6 +2822,20 @@ export interface ApiOnboardingSteps {
|
|
2822
2822
|
user_id?: string;
|
2823
2823
|
}
|
2824
2824
|
|
2825
|
+
/** */
|
2826
|
+
export interface ApiGetJoinMezonMeetResponse {
|
2827
|
+
//
|
2828
|
+
channel_id?: string;
|
2829
|
+
//
|
2830
|
+
room_name?: string;
|
2831
|
+
//
|
2832
|
+
token?: string;
|
2833
|
+
//
|
2834
|
+
user_id?: string;
|
2835
|
+
//
|
2836
|
+
user_name?: string;
|
2837
|
+
}
|
2838
|
+
|
2825
2839
|
export class MezonApi {
|
2826
2840
|
constructor(
|
2827
2841
|
readonly serverKey: string,
|
@@ -10796,4 +10810,40 @@ export class MezonApi {
|
|
10796
10810
|
),
|
10797
10811
|
]);
|
10798
10812
|
}
|
10813
|
+
|
10814
|
+
/** GetJoinMezonMeet */
|
10815
|
+
getJoinMezonMeet(
|
10816
|
+
bearerToken: string,
|
10817
|
+
channelId?:string,
|
10818
|
+
roomName?:string,
|
10819
|
+
options: any = {}): Promise<ApiGetJoinMezonMeetResponse> {
|
10820
|
+
|
10821
|
+
const urlPath = "/v2/mezonmeet/join";
|
10822
|
+
const queryParams = new Map<string, any>();
|
10823
|
+
queryParams.set("channel_id", channelId);
|
10824
|
+
queryParams.set("room_name", roomName);
|
10825
|
+
|
10826
|
+
let bodyJson : string = "";
|
10827
|
+
|
10828
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
10829
|
+
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
10830
|
+
if (bearerToken) {
|
10831
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
10832
|
+
}
|
10833
|
+
|
10834
|
+
return Promise.race([
|
10835
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
10836
|
+
if (response.status == 204) {
|
10837
|
+
return response;
|
10838
|
+
} else if (response.status >= 200 && response.status < 300) {
|
10839
|
+
return response.json();
|
10840
|
+
} else {
|
10841
|
+
throw response;
|
10842
|
+
}
|
10843
|
+
}),
|
10844
|
+
new Promise((_, reject) =>
|
10845
|
+
setTimeout(reject, this.timeoutMs, "Request timed out.")
|
10846
|
+
),
|
10847
|
+
]);
|
10848
|
+
}
|
10799
10849
|
}
|
package/client.ts
CHANGED
@@ -158,6 +158,7 @@ import {
|
|
158
158
|
ApiSdTopic,
|
159
159
|
MezonUpdateEventBody,
|
160
160
|
ApiTransactionDetail,
|
161
|
+
ApiGetJoinMezonMeetResponse,
|
161
162
|
} from "./api.gen";
|
162
163
|
|
163
164
|
import { Session } from "./session";
|
@@ -4867,4 +4868,25 @@ export class Client {
|
|
4867
4868
|
return Promise.resolve(response);
|
4868
4869
|
});
|
4869
4870
|
}
|
4871
|
+
|
4872
|
+
//**list sd topic */
|
4873
|
+
async getJoinMezonMeet(
|
4874
|
+
session: Session,
|
4875
|
+
channelId?:string,
|
4876
|
+
roomName?:string,
|
4877
|
+
): Promise<ApiGetJoinMezonMeetResponse> {
|
4878
|
+
if (
|
4879
|
+
this.autoRefreshSession &&
|
4880
|
+
session.refresh_token &&
|
4881
|
+
session.isexpired((Date.now() + this.expiredTimespanMs) / 1000)
|
4882
|
+
) {
|
4883
|
+
await this.sessionRefresh(session);
|
4884
|
+
}
|
4885
|
+
|
4886
|
+
return this.apiClient
|
4887
|
+
.getJoinMezonMeet(session.token, channelId, roomName)
|
4888
|
+
.then((response: ApiGetJoinMezonMeetResponse) => {
|
4889
|
+
return Promise.resolve(response);
|
4890
|
+
});
|
4891
|
+
}
|
4870
4892
|
}
|
package/dist/api.gen.d.ts
CHANGED
@@ -1633,6 +1633,14 @@ export interface ApiOnboardingSteps {
|
|
1633
1633
|
onboarding_step?: number;
|
1634
1634
|
user_id?: string;
|
1635
1635
|
}
|
1636
|
+
/** */
|
1637
|
+
export interface ApiGetJoinMezonMeetResponse {
|
1638
|
+
channel_id?: string;
|
1639
|
+
room_name?: string;
|
1640
|
+
token?: string;
|
1641
|
+
user_id?: string;
|
1642
|
+
user_name?: string;
|
1643
|
+
}
|
1636
1644
|
export declare class MezonApi {
|
1637
1645
|
readonly serverKey: string;
|
1638
1646
|
readonly basePath: string;
|
@@ -2033,4 +2041,6 @@ export declare class MezonApi {
|
|
2033
2041
|
listOnboardingStep(bearerToken: string, clanId?: string, limit?: number, page?: number, options?: any): Promise<ApiListOnboardingStepResponse>;
|
2034
2042
|
/** Update onboarding step. */
|
2035
2043
|
updateOnboardingStepByClanId(bearerToken: string, clanId: string, body: MezonUpdateOnboardingStepByClanIdBody, options?: any): Promise<any>;
|
2044
|
+
/** GetJoinMezonMeet */
|
2045
|
+
getJoinMezonMeet(bearerToken: string, channelId?: string, roomName?: string, options?: any): Promise<ApiGetJoinMezonMeetResponse>;
|
2036
2046
|
}
|
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 } 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 } from "./api.gen";
|
17
17
|
import { Session } from "./session";
|
18
18
|
import { Socket } from "./socket";
|
19
19
|
import { WebSocketAdapter } from "./web_socket_adapter";
|
@@ -639,4 +639,5 @@ export declare class Client {
|
|
639
639
|
listSdTopic(session: Session, clanId?: string, limit?: number): Promise<ApiSdTopicList>;
|
640
640
|
createSdTopic(session: Session, request: ApiSdTopicRequest): Promise<ApiSdTopic>;
|
641
641
|
getTopicDetail(session: Session, topicId?: string): Promise<ApiSdTopic>;
|
642
|
+
getJoinMezonMeet(session: Session, channelId?: string, roomName?: string): Promise<ApiGetJoinMezonMeetResponse>;
|
642
643
|
}
|
package/dist/mezon-js.cjs.js
CHANGED
@@ -6957,6 +6957,33 @@ var MezonApi = class {
|
|
6957
6957
|
)
|
6958
6958
|
]);
|
6959
6959
|
}
|
6960
|
+
/** GetJoinMezonMeet */
|
6961
|
+
getJoinMezonMeet(bearerToken, channelId, roomName, options = {}) {
|
6962
|
+
const urlPath = "/v2/mezonmeet/join";
|
6963
|
+
const queryParams = /* @__PURE__ */ new Map();
|
6964
|
+
queryParams.set("channel_id", channelId);
|
6965
|
+
queryParams.set("room_name", roomName);
|
6966
|
+
let bodyJson = "";
|
6967
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
6968
|
+
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
6969
|
+
if (bearerToken) {
|
6970
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
6971
|
+
}
|
6972
|
+
return Promise.race([
|
6973
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
6974
|
+
if (response.status == 204) {
|
6975
|
+
return response;
|
6976
|
+
} else if (response.status >= 200 && response.status < 300) {
|
6977
|
+
return response.json();
|
6978
|
+
} else {
|
6979
|
+
throw response;
|
6980
|
+
}
|
6981
|
+
}),
|
6982
|
+
new Promise(
|
6983
|
+
(_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
|
6984
|
+
)
|
6985
|
+
]);
|
6986
|
+
}
|
6960
6987
|
};
|
6961
6988
|
|
6962
6989
|
// session.ts
|
@@ -7304,9 +7331,7 @@ var _DefaultSocket = class _DefaultSocket {
|
|
7304
7331
|
message.user_channel_removed_event
|
7305
7332
|
);
|
7306
7333
|
} else if (message.remove_friend) {
|
7307
|
-
this.onremovefriend(
|
7308
|
-
message.remove_friend
|
7309
|
-
);
|
7334
|
+
this.onremovefriend(message.remove_friend);
|
7310
7335
|
} else if (message.user_clan_removed_event) {
|
7311
7336
|
this.onuserclanremoved(
|
7312
7337
|
message.user_clan_removed_event
|
@@ -7356,9 +7381,7 @@ var _DefaultSocket = class _DefaultSocket {
|
|
7356
7381
|
message.webrtc_signaling_fwd
|
7357
7382
|
);
|
7358
7383
|
} else if (message.sfu_signaling_fwd) {
|
7359
|
-
this.onsfusignalingfwd(
|
7360
|
-
message.sfu_signaling_fwd
|
7361
|
-
);
|
7384
|
+
this.onsfusignalingfwd(message.sfu_signaling_fwd);
|
7362
7385
|
} else if (message.list_activity) {
|
7363
7386
|
this.onactivityupdated(message.list_activity);
|
7364
7387
|
} else if (message.sd_topic_event) {
|
@@ -7766,7 +7789,7 @@ var _DefaultSocket = class _DefaultSocket {
|
|
7766
7789
|
}
|
7767
7790
|
});
|
7768
7791
|
}
|
7769
|
-
removeChatMessage(clan_id, channel_id, mode, is_public, message_id, has_attachment) {
|
7792
|
+
removeChatMessage(clan_id, channel_id, mode, is_public, message_id, has_attachment, topic_id) {
|
7770
7793
|
return __async(this, null, function* () {
|
7771
7794
|
const response = yield this.send({
|
7772
7795
|
channel_message_remove: {
|
@@ -7775,7 +7798,8 @@ var _DefaultSocket = class _DefaultSocket {
|
|
7775
7798
|
mode,
|
7776
7799
|
message_id,
|
7777
7800
|
is_public,
|
7778
|
-
has_attachment
|
7801
|
+
has_attachment,
|
7802
|
+
topic_id
|
7779
7803
|
}
|
7780
7804
|
});
|
7781
7805
|
return response.channel_message_ack;
|
@@ -7796,7 +7820,7 @@ var _DefaultSocket = class _DefaultSocket {
|
|
7796
7820
|
unfollowUsers(user_ids) {
|
7797
7821
|
return this.send({ status_unfollow: { user_ids } });
|
7798
7822
|
}
|
7799
|
-
updateChatMessage(clan_id, channel_id, mode, is_public, message_id, content, mentions, attachments, hideEditted, topic_id) {
|
7823
|
+
updateChatMessage(clan_id, channel_id, mode, is_public, message_id, content, mentions, attachments, hideEditted, topic_id, mess_topic_id) {
|
7800
7824
|
return __async(this, null, function* () {
|
7801
7825
|
const response = yield this.send({
|
7802
7826
|
channel_message_update: {
|
@@ -7809,7 +7833,8 @@ var _DefaultSocket = class _DefaultSocket {
|
|
7809
7833
|
mode,
|
7810
7834
|
is_public,
|
7811
7835
|
hide_editted: hideEditted,
|
7812
|
-
topic_id
|
7836
|
+
topic_id,
|
7837
|
+
mess_topic_id
|
7813
7838
|
}
|
7814
7839
|
});
|
7815
7840
|
return response.channel_message_ack;
|
@@ -7933,10 +7958,15 @@ var _DefaultSocket = class _DefaultSocket {
|
|
7933
7958
|
return response.voice_leaved_event;
|
7934
7959
|
});
|
7935
7960
|
}
|
7936
|
-
writeCustomStatus(clan_id, status) {
|
7961
|
+
writeCustomStatus(clan_id, status, time_reset, no_clear) {
|
7937
7962
|
return __async(this, null, function* () {
|
7938
7963
|
const response = yield this.send({
|
7939
|
-
custom_status_event: {
|
7964
|
+
custom_status_event: {
|
7965
|
+
clan_id,
|
7966
|
+
status,
|
7967
|
+
time_reset,
|
7968
|
+
no_clear
|
7969
|
+
}
|
7940
7970
|
});
|
7941
7971
|
return response.custom_status_event;
|
7942
7972
|
});
|
@@ -10651,4 +10681,15 @@ var Client = class {
|
|
10651
10681
|
});
|
10652
10682
|
});
|
10653
10683
|
}
|
10684
|
+
//**list sd topic */
|
10685
|
+
getJoinMezonMeet(session, channelId, roomName) {
|
10686
|
+
return __async(this, null, function* () {
|
10687
|
+
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
10688
|
+
yield this.sessionRefresh(session);
|
10689
|
+
}
|
10690
|
+
return this.apiClient.getJoinMezonMeet(session.token, channelId, roomName).then((response) => {
|
10691
|
+
return Promise.resolve(response);
|
10692
|
+
});
|
10693
|
+
});
|
10694
|
+
}
|
10654
10695
|
};
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -6923,6 +6923,33 @@ var MezonApi = class {
|
|
6923
6923
|
)
|
6924
6924
|
]);
|
6925
6925
|
}
|
6926
|
+
/** GetJoinMezonMeet */
|
6927
|
+
getJoinMezonMeet(bearerToken, channelId, roomName, options = {}) {
|
6928
|
+
const urlPath = "/v2/mezonmeet/join";
|
6929
|
+
const queryParams = /* @__PURE__ */ new Map();
|
6930
|
+
queryParams.set("channel_id", channelId);
|
6931
|
+
queryParams.set("room_name", roomName);
|
6932
|
+
let bodyJson = "";
|
6933
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
6934
|
+
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
6935
|
+
if (bearerToken) {
|
6936
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
6937
|
+
}
|
6938
|
+
return Promise.race([
|
6939
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
6940
|
+
if (response.status == 204) {
|
6941
|
+
return response;
|
6942
|
+
} else if (response.status >= 200 && response.status < 300) {
|
6943
|
+
return response.json();
|
6944
|
+
} else {
|
6945
|
+
throw response;
|
6946
|
+
}
|
6947
|
+
}),
|
6948
|
+
new Promise(
|
6949
|
+
(_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
|
6950
|
+
)
|
6951
|
+
]);
|
6952
|
+
}
|
6926
6953
|
};
|
6927
6954
|
|
6928
6955
|
// session.ts
|
@@ -7270,9 +7297,7 @@ var _DefaultSocket = class _DefaultSocket {
|
|
7270
7297
|
message.user_channel_removed_event
|
7271
7298
|
);
|
7272
7299
|
} else if (message.remove_friend) {
|
7273
|
-
this.onremovefriend(
|
7274
|
-
message.remove_friend
|
7275
|
-
);
|
7300
|
+
this.onremovefriend(message.remove_friend);
|
7276
7301
|
} else if (message.user_clan_removed_event) {
|
7277
7302
|
this.onuserclanremoved(
|
7278
7303
|
message.user_clan_removed_event
|
@@ -7322,9 +7347,7 @@ var _DefaultSocket = class _DefaultSocket {
|
|
7322
7347
|
message.webrtc_signaling_fwd
|
7323
7348
|
);
|
7324
7349
|
} else if (message.sfu_signaling_fwd) {
|
7325
|
-
this.onsfusignalingfwd(
|
7326
|
-
message.sfu_signaling_fwd
|
7327
|
-
);
|
7350
|
+
this.onsfusignalingfwd(message.sfu_signaling_fwd);
|
7328
7351
|
} else if (message.list_activity) {
|
7329
7352
|
this.onactivityupdated(message.list_activity);
|
7330
7353
|
} else if (message.sd_topic_event) {
|
@@ -7732,7 +7755,7 @@ var _DefaultSocket = class _DefaultSocket {
|
|
7732
7755
|
}
|
7733
7756
|
});
|
7734
7757
|
}
|
7735
|
-
removeChatMessage(clan_id, channel_id, mode, is_public, message_id, has_attachment) {
|
7758
|
+
removeChatMessage(clan_id, channel_id, mode, is_public, message_id, has_attachment, topic_id) {
|
7736
7759
|
return __async(this, null, function* () {
|
7737
7760
|
const response = yield this.send({
|
7738
7761
|
channel_message_remove: {
|
@@ -7741,7 +7764,8 @@ var _DefaultSocket = class _DefaultSocket {
|
|
7741
7764
|
mode,
|
7742
7765
|
message_id,
|
7743
7766
|
is_public,
|
7744
|
-
has_attachment
|
7767
|
+
has_attachment,
|
7768
|
+
topic_id
|
7745
7769
|
}
|
7746
7770
|
});
|
7747
7771
|
return response.channel_message_ack;
|
@@ -7762,7 +7786,7 @@ var _DefaultSocket = class _DefaultSocket {
|
|
7762
7786
|
unfollowUsers(user_ids) {
|
7763
7787
|
return this.send({ status_unfollow: { user_ids } });
|
7764
7788
|
}
|
7765
|
-
updateChatMessage(clan_id, channel_id, mode, is_public, message_id, content, mentions, attachments, hideEditted, topic_id) {
|
7789
|
+
updateChatMessage(clan_id, channel_id, mode, is_public, message_id, content, mentions, attachments, hideEditted, topic_id, mess_topic_id) {
|
7766
7790
|
return __async(this, null, function* () {
|
7767
7791
|
const response = yield this.send({
|
7768
7792
|
channel_message_update: {
|
@@ -7775,7 +7799,8 @@ var _DefaultSocket = class _DefaultSocket {
|
|
7775
7799
|
mode,
|
7776
7800
|
is_public,
|
7777
7801
|
hide_editted: hideEditted,
|
7778
|
-
topic_id
|
7802
|
+
topic_id,
|
7803
|
+
mess_topic_id
|
7779
7804
|
}
|
7780
7805
|
});
|
7781
7806
|
return response.channel_message_ack;
|
@@ -7899,10 +7924,15 @@ var _DefaultSocket = class _DefaultSocket {
|
|
7899
7924
|
return response.voice_leaved_event;
|
7900
7925
|
});
|
7901
7926
|
}
|
7902
|
-
writeCustomStatus(clan_id, status) {
|
7927
|
+
writeCustomStatus(clan_id, status, time_reset, no_clear) {
|
7903
7928
|
return __async(this, null, function* () {
|
7904
7929
|
const response = yield this.send({
|
7905
|
-
custom_status_event: {
|
7930
|
+
custom_status_event: {
|
7931
|
+
clan_id,
|
7932
|
+
status,
|
7933
|
+
time_reset,
|
7934
|
+
no_clear
|
7935
|
+
}
|
7906
7936
|
});
|
7907
7937
|
return response.custom_status_event;
|
7908
7938
|
});
|
@@ -10617,6 +10647,17 @@ var Client = class {
|
|
10617
10647
|
});
|
10618
10648
|
});
|
10619
10649
|
}
|
10650
|
+
//**list sd topic */
|
10651
|
+
getJoinMezonMeet(session, channelId, roomName) {
|
10652
|
+
return __async(this, null, function* () {
|
10653
|
+
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
10654
|
+
yield this.sessionRefresh(session);
|
10655
|
+
}
|
10656
|
+
return this.apiClient.getJoinMezonMeet(session.token, channelId, roomName).then((response) => {
|
10657
|
+
return Promise.resolve(response);
|
10658
|
+
});
|
10659
|
+
});
|
10660
|
+
}
|
10620
10661
|
};
|
10621
10662
|
export {
|
10622
10663
|
ChannelStreamMode,
|
package/dist/socket.d.ts
CHANGED
@@ -221,6 +221,7 @@ interface ChannelMessageUpdate {
|
|
221
221
|
mode: number;
|
222
222
|
is_public: boolean;
|
223
223
|
topic_id?: string;
|
224
|
+
mess_topic_id?: string;
|
224
225
|
};
|
225
226
|
}
|
226
227
|
/** Remove a message previously sent to a realtime chat channel. */
|
@@ -237,6 +238,7 @@ interface ChannelMessageRemove {
|
|
237
238
|
is_public: boolean;
|
238
239
|
/** attachments */
|
239
240
|
has_attachment?: boolean;
|
241
|
+
topic_id?: string;
|
240
242
|
};
|
241
243
|
}
|
242
244
|
/** Presence update for a particular realtime chat channel. */
|
@@ -282,6 +284,10 @@ export interface CustomStatusEvent {
|
|
282
284
|
user_id: string;
|
283
285
|
username: string;
|
284
286
|
status: string;
|
287
|
+
/** time reset */
|
288
|
+
time_reset: number;
|
289
|
+
/** no clear */
|
290
|
+
no_clear: boolean;
|
285
291
|
}
|
286
292
|
export interface ChannelUpdatedEvent {
|
287
293
|
clan_id: string;
|
@@ -298,6 +304,7 @@ export interface ChannelUpdatedEvent {
|
|
298
304
|
e2ee: number;
|
299
305
|
topic: string;
|
300
306
|
age_restricted: number;
|
307
|
+
is_active_thread: boolean;
|
301
308
|
}
|
302
309
|
export interface ChannelCreatedEvent {
|
303
310
|
clan_id: string;
|
@@ -673,13 +680,13 @@ export interface Socket {
|
|
673
680
|
/** Leave a chat channel on the server. */
|
674
681
|
leaveChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<void>;
|
675
682
|
/** Remove a chat message from a chat channel on the server. */
|
676
|
-
removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, has_attachment?: boolean): Promise<ChannelMessageAck>;
|
683
|
+
removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, has_attachment?: boolean, topic_id?: string): Promise<ChannelMessageAck>;
|
677
684
|
/** Execute an RPC function to the server. */
|
678
685
|
rpc(id?: string, payload?: string, http_key?: string): Promise<ApiRpc>;
|
679
686
|
/** Unfollow one or more users from their status updates. */
|
680
687
|
unfollowUsers(user_ids: string[]): Promise<void>;
|
681
688
|
/** Update a chat message on a chat channel in the server. */
|
682
|
-
updateChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, hideEditted?: boolean, topic_id?: string): Promise<ChannelMessageAck>;
|
689
|
+
updateChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, hideEditted?: boolean, topic_id?: string, mess_topic_id?: string): Promise<ChannelMessageAck>;
|
683
690
|
/** Update the status for the current user online. */
|
684
691
|
updateStatus(status?: string): Promise<void>;
|
685
692
|
/** Send a chat message to a chat channel on the server. */
|
@@ -693,7 +700,7 @@ export interface Socket {
|
|
693
700
|
/** Send last pin message */
|
694
701
|
writeLastPinMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, timestamp_seconds: number, operation: number): Promise<LastPinMessageEvent>;
|
695
702
|
/** Send custom user status */
|
696
|
-
writeCustomStatus(clan_id: string, status: string): Promise<CustomStatusEvent>;
|
703
|
+
writeCustomStatus(clan_id: string, status: string, time_reset: number, no_clear: boolean): Promise<CustomStatusEvent>;
|
697
704
|
/** send voice joined */
|
698
705
|
writeVoiceJoined(id: string, clanId: string, clanName: string, voiceChannelId: string, voiceChannelLabel: string, participant: string, lastScreenshot: string): Promise<VoiceJoinedEvent>;
|
699
706
|
/** send voice leaved */
|
@@ -874,10 +881,10 @@ export declare class DefaultSocket implements Socket {
|
|
874
881
|
follower(): Promise<void>;
|
875
882
|
joinChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<Channel>;
|
876
883
|
leaveChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<void>;
|
877
|
-
removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, has_attachment?: boolean): Promise<ChannelMessageAck>;
|
884
|
+
removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, has_attachment?: boolean, topic_id?: string): Promise<ChannelMessageAck>;
|
878
885
|
rpc(id?: string, payload?: string, http_key?: string): Promise<ApiRpc>;
|
879
886
|
unfollowUsers(user_ids: string[]): Promise<void>;
|
880
|
-
updateChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, hideEditted?: boolean, topic_id?: string): Promise<ChannelMessageAck>;
|
887
|
+
updateChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, hideEditted?: boolean, topic_id?: string, mess_topic_id?: string): Promise<ChannelMessageAck>;
|
881
888
|
updateStatus(status?: string): Promise<void>;
|
882
889
|
writeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef>, anonymous_message?: boolean, mention_everyone?: Boolean, avatar?: string, code?: number, topic_id?: string): Promise<ChannelMessageAck>;
|
883
890
|
writeMessageReaction(id: string, clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, emoji_id: string, emoji: string, count: number, message_sender_id: string, action_delete: boolean, topic_id?: string): Promise<ApiMessageReaction>;
|
@@ -886,7 +893,7 @@ export declare class DefaultSocket implements Socket {
|
|
886
893
|
writeLastPinMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, timestamp_seconds: number, operation: number): Promise<LastPinMessageEvent>;
|
887
894
|
writeVoiceJoined(id: string, clanId: string, clanName: string, voiceChannelId: string, voiceChannelLabel: string, participant: string, lastScreenshot: string): Promise<VoiceJoinedEvent>;
|
888
895
|
writeVoiceLeaved(id: string, clanId: string, voiceChannelId: string, voiceUserId: string): Promise<VoiceLeavedEvent>;
|
889
|
-
writeCustomStatus(clan_id: string, status: string): Promise<CustomStatusEvent>;
|
896
|
+
writeCustomStatus(clan_id: string, status: string, time_reset: number, no_clear: boolean): Promise<CustomStatusEvent>;
|
890
897
|
checkDuplicateName(name: string, condition_id: string, type: number): Promise<CheckNameExistedEvent>;
|
891
898
|
forwardWebrtcSignaling(receiver_id: string, data_type: number, json_data: string, channel_id: string, caller_id: string): Promise<WebrtcSignalingFwd>;
|
892
899
|
forwardSFUSignaling(user_id: string, data_type: number, json_data: string, channel_id: string, clan_id: string): Promise<SFUSignalingFwd>;
|
package/package.json
CHANGED
package/socket.ts
CHANGED
@@ -318,6 +318,8 @@ interface ChannelMessageUpdate {
|
|
318
318
|
is_public: boolean;
|
319
319
|
//
|
320
320
|
topic_id?: string;
|
321
|
+
//
|
322
|
+
mess_topic_id?: string;
|
321
323
|
};
|
322
324
|
}
|
323
325
|
|
@@ -338,6 +340,8 @@ interface ChannelMessageRemove {
|
|
338
340
|
is_public: boolean;
|
339
341
|
/** attachments */
|
340
342
|
has_attachment?: boolean;
|
343
|
+
//
|
344
|
+
topic_id?: string;
|
341
345
|
};
|
342
346
|
}
|
343
347
|
|
@@ -412,6 +416,10 @@ export interface CustomStatusEvent {
|
|
412
416
|
username: string;
|
413
417
|
// the status
|
414
418
|
status: string;
|
419
|
+
/** time reset */
|
420
|
+
time_reset: number;
|
421
|
+
/** no clear */
|
422
|
+
no_clear: boolean;
|
415
423
|
}
|
416
424
|
|
417
425
|
export interface ChannelUpdatedEvent {
|
@@ -443,6 +451,8 @@ export interface ChannelUpdatedEvent {
|
|
443
451
|
topic: string;
|
444
452
|
//
|
445
453
|
age_restricted: number;
|
454
|
+
//
|
455
|
+
is_active_thread: boolean;
|
446
456
|
}
|
447
457
|
|
448
458
|
export interface ChannelCreatedEvent {
|
@@ -757,7 +767,7 @@ export interface UserEmojiUsage {
|
|
757
767
|
create_time: string;
|
758
768
|
}
|
759
769
|
export interface RemoveFriend {
|
760
|
-
//
|
770
|
+
//
|
761
771
|
user_id: string;
|
762
772
|
}
|
763
773
|
|
@@ -968,7 +978,8 @@ export interface Socket {
|
|
968
978
|
mode: number,
|
969
979
|
is_public: boolean,
|
970
980
|
message_id: string,
|
971
|
-
has_attachment?: boolean
|
981
|
+
has_attachment?: boolean,
|
982
|
+
topic_id?: string
|
972
983
|
): Promise<ChannelMessageAck>;
|
973
984
|
|
974
985
|
/** Execute an RPC function to the server. */
|
@@ -988,7 +999,8 @@ export interface Socket {
|
|
988
999
|
mentions?: Array<ApiMessageMention>,
|
989
1000
|
attachments?: Array<ApiMessageAttachment>,
|
990
1001
|
hideEditted?: boolean,
|
991
|
-
topic_id?: string
|
1002
|
+
topic_id?: string,
|
1003
|
+
mess_topic_id?: string
|
992
1004
|
): Promise<ChannelMessageAck>;
|
993
1005
|
|
994
1006
|
/** Update the status for the current user online. */
|
@@ -1058,7 +1070,9 @@ export interface Socket {
|
|
1058
1070
|
/** Send custom user status */
|
1059
1071
|
writeCustomStatus(
|
1060
1072
|
clan_id: string,
|
1061
|
-
status: string
|
1073
|
+
status: string,
|
1074
|
+
time_reset: number,
|
1075
|
+
no_clear: boolean
|
1062
1076
|
): Promise<CustomStatusEvent>;
|
1063
1077
|
|
1064
1078
|
/** send voice joined */
|
@@ -1510,9 +1524,7 @@ export class DefaultSocket implements Socket {
|
|
1510
1524
|
<UserChannelRemovedEvent>message.user_channel_removed_event
|
1511
1525
|
);
|
1512
1526
|
} else if (message.remove_friend) {
|
1513
|
-
this.onremovefriend(
|
1514
|
-
<RemoveFriend>message.remove_friend
|
1515
|
-
);
|
1527
|
+
this.onremovefriend(<RemoveFriend>message.remove_friend);
|
1516
1528
|
} else if (message.user_clan_removed_event) {
|
1517
1529
|
this.onuserclanremoved(
|
1518
1530
|
<UserClanRemovedEvent>message.user_clan_removed_event
|
@@ -1562,9 +1574,7 @@ export class DefaultSocket implements Socket {
|
|
1562
1574
|
<WebrtcSignalingFwd>message.webrtc_signaling_fwd
|
1563
1575
|
);
|
1564
1576
|
} else if (message.sfu_signaling_fwd) {
|
1565
|
-
this.onsfusignalingfwd(
|
1566
|
-
<SFUSignalingFwd>message.sfu_signaling_fwd
|
1567
|
-
);
|
1577
|
+
this.onsfusignalingfwd(<SFUSignalingFwd>message.sfu_signaling_fwd);
|
1568
1578
|
} else if (message.list_activity) {
|
1569
1579
|
this.onactivityupdated(<ListActivity>message.list_activity);
|
1570
1580
|
} else if (message.sd_topic_event) {
|
@@ -2078,7 +2088,8 @@ export class DefaultSocket implements Socket {
|
|
2078
2088
|
mode: number,
|
2079
2089
|
is_public: boolean,
|
2080
2090
|
message_id: string,
|
2081
|
-
has_attachment?: boolean
|
2091
|
+
has_attachment?: boolean,
|
2092
|
+
topic_id?: string,
|
2082
2093
|
): Promise<ChannelMessageAck> {
|
2083
2094
|
const response = await this.send({
|
2084
2095
|
channel_message_remove: {
|
@@ -2088,6 +2099,7 @@ export class DefaultSocket implements Socket {
|
|
2088
2099
|
message_id: message_id,
|
2089
2100
|
is_public: is_public,
|
2090
2101
|
has_attachment: has_attachment,
|
2102
|
+
topic_id: topic_id,
|
2091
2103
|
},
|
2092
2104
|
});
|
2093
2105
|
|
@@ -2120,7 +2132,8 @@ export class DefaultSocket implements Socket {
|
|
2120
2132
|
mentions?: Array<ApiMessageMention>,
|
2121
2133
|
attachments?: Array<ApiMessageAttachment>,
|
2122
2134
|
hideEditted?: boolean,
|
2123
|
-
topic_id?: string
|
2135
|
+
topic_id?: string,
|
2136
|
+
mess_topic_id?: string
|
2124
2137
|
): Promise<ChannelMessageAck> {
|
2125
2138
|
const response = await this.send({
|
2126
2139
|
channel_message_update: {
|
@@ -2134,6 +2147,7 @@ export class DefaultSocket implements Socket {
|
|
2134
2147
|
is_public: is_public,
|
2135
2148
|
hide_editted: hideEditted,
|
2136
2149
|
topic_id: topic_id,
|
2150
|
+
mess_topic_id: mess_topic_id,
|
2137
2151
|
},
|
2138
2152
|
});
|
2139
2153
|
return response.channel_message_ack;
|
@@ -2312,10 +2326,17 @@ export class DefaultSocket implements Socket {
|
|
2312
2326
|
|
2313
2327
|
async writeCustomStatus(
|
2314
2328
|
clan_id: string,
|
2315
|
-
status: string
|
2329
|
+
status: string,
|
2330
|
+
time_reset: number,
|
2331
|
+
no_clear: boolean
|
2316
2332
|
): Promise<CustomStatusEvent> {
|
2317
2333
|
const response = await this.send({
|
2318
|
-
custom_status_event: {
|
2334
|
+
custom_status_event: {
|
2335
|
+
clan_id: clan_id,
|
2336
|
+
status: status,
|
2337
|
+
time_reset: time_reset,
|
2338
|
+
no_clear: no_clear,
|
2339
|
+
},
|
2319
2340
|
});
|
2320
2341
|
return response.custom_status_event;
|
2321
2342
|
}
|