mezon-js 2.8.56 → 2.8.57
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/mezon-js.cjs.js +7 -0
- package/dist/mezon-js.esm.mjs +7 -0
- package/dist/socket.d.ts +4 -1
- package/package.json +1 -1
- package/socket.ts +14 -2
package/dist/mezon-js.cjs.js
CHANGED
@@ -4747,6 +4747,8 @@ var _DefaultSocket = class _DefaultSocket {
|
|
4747
4747
|
this.onuserchannelremoved(message.user_channel_removed_event);
|
4748
4748
|
} else if (message.user_clan_removed_event) {
|
4749
4749
|
this.onuserclanremoved(message.user_clan_removed_event);
|
4750
|
+
} else if (message.clan_event_created) {
|
4751
|
+
this.oneventcreated(message.clan_event_created);
|
4750
4752
|
} else {
|
4751
4753
|
if (this.verbose && window && window.console) {
|
4752
4754
|
console.log("Unrecognized message received: %o", message);
|
@@ -4934,6 +4936,11 @@ var _DefaultSocket = class _DefaultSocket {
|
|
4934
4936
|
console.log(statusEvent);
|
4935
4937
|
}
|
4936
4938
|
}
|
4939
|
+
oneventcreated(clan_event_created) {
|
4940
|
+
if (this.verbose && window && window.console) {
|
4941
|
+
console.log(clan_event_created);
|
4942
|
+
}
|
4943
|
+
}
|
4937
4944
|
send(message, sendTimeout = _DefaultSocket.DefaultSendTimeoutMs) {
|
4938
4945
|
const untypedMessage = message;
|
4939
4946
|
return new Promise((resolve, reject) => {
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -4718,6 +4718,8 @@ var _DefaultSocket = class _DefaultSocket {
|
|
4718
4718
|
this.onuserchannelremoved(message.user_channel_removed_event);
|
4719
4719
|
} else if (message.user_clan_removed_event) {
|
4720
4720
|
this.onuserclanremoved(message.user_clan_removed_event);
|
4721
|
+
} else if (message.clan_event_created) {
|
4722
|
+
this.oneventcreated(message.clan_event_created);
|
4721
4723
|
} else {
|
4722
4724
|
if (this.verbose && window && window.console) {
|
4723
4725
|
console.log("Unrecognized message received: %o", message);
|
@@ -4905,6 +4907,11 @@ var _DefaultSocket = class _DefaultSocket {
|
|
4905
4907
|
console.log(statusEvent);
|
4906
4908
|
}
|
4907
4909
|
}
|
4910
|
+
oneventcreated(clan_event_created) {
|
4911
|
+
if (this.verbose && window && window.console) {
|
4912
|
+
console.log(clan_event_created);
|
4913
|
+
}
|
4914
|
+
}
|
4908
4915
|
send(message, sendTimeout = _DefaultSocket.DefaultSendTimeoutMs) {
|
4909
4916
|
const untypedMessage = message;
|
4910
4917
|
return new Promise((resolve, reject) => {
|
package/dist/socket.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 { ApiChannelMessageHeader, ApiMessageAttachment, ApiMessageMention, ApiMessageReaction, ApiMessageRef, ApiRpc, ApiUser } from "./api.gen";
|
16
|
+
import { ApiChannelMessageHeader, ApiCreateEventRequest, ApiMessageAttachment, ApiMessageMention, ApiMessageReaction, ApiMessageRef, ApiRpc, ApiUser } from "./api.gen";
|
17
17
|
import { Session } from "./session";
|
18
18
|
import { ChannelMessage, Notification } from "./client";
|
19
19
|
import { WebSocketAdapter } from "./web_socket_adapter";
|
@@ -254,6 +254,7 @@ export interface ChannelUpdatedEvent {
|
|
254
254
|
channel_label: string;
|
255
255
|
channel_type: number;
|
256
256
|
status: number;
|
257
|
+
meeting_code: string;
|
257
258
|
}
|
258
259
|
export interface ChannelCreatedEvent {
|
259
260
|
clan_id: string;
|
@@ -576,6 +577,7 @@ export interface Socket {
|
|
576
577
|
getNotificationReactMessage(channel_id_req: string): Promise<NotifiReactMessageEvent>;
|
577
578
|
GetPermissionByRoleIdChannelId(role_id: string, channel_id: string): Promise<PermissionRoleChannelListEvent>;
|
578
579
|
getNotificationChannelCategorySetting(clan_id: string): Promise<NotificationChannelCategorySettingEvent>;
|
580
|
+
oneventcreated: (clan_event_created: ApiCreateEventRequest) => void;
|
579
581
|
}
|
580
582
|
/** Reports an error received from a socket message. */
|
581
583
|
export interface SocketError {
|
@@ -632,6 +634,7 @@ export declare class DefaultSocket implements Socket {
|
|
632
634
|
onstreamdata(streamData: StreamData): void;
|
633
635
|
onheartbeattimeout(): void;
|
634
636
|
oncustomstatus(statusEvent: CustomStatusEvent): void;
|
637
|
+
oneventcreated(clan_event_created: ApiCreateEventRequest): void;
|
635
638
|
send(message: ChannelJoin | ChannelLeave | ChannelMessageSend | ChannelMessageUpdate | CustomStatusEvent | ChannelMessageRemove | MessageTypingEvent | LastSeenMessageEvent | Rpc | StatusFollow | StatusUnfollow | StatusUpdate | Ping, sendTimeout?: number): Promise<any>;
|
636
639
|
followUsers(userIds: string[]): Promise<Status>;
|
637
640
|
joinClanChat(clan_id: string): Promise<ClanJoin>;
|
package/package.json
CHANGED
package/socket.ts
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
|
17
|
-
import { ApiChannelMessageHeader, ApiMessageAttachment, ApiMessageMention, ApiMessageReaction, ApiMessageRef, ApiNotification, ApiRpc, ApiUser} from "./api.gen";
|
17
|
+
import { ApiChannelMessageHeader, ApiCreateEventRequest, ApiMessageAttachment, ApiMessageMention, ApiMessageReaction, ApiMessageRef, ApiNotification, ApiRpc, ApiUser} from "./api.gen";
|
18
18
|
import {Session} from "./session";
|
19
19
|
import {ChannelMessage, Notification} from "./client";
|
20
20
|
import {WebSocketAdapter, WebSocketAdapterText} from "./web_socket_adapter"
|
@@ -360,6 +360,8 @@ export interface ChannelUpdatedEvent {
|
|
360
360
|
channel_type: number;
|
361
361
|
// status
|
362
362
|
status: number;
|
363
|
+
// meeting code
|
364
|
+
meeting_code: string;
|
363
365
|
}
|
364
366
|
|
365
367
|
export interface ChannelCreatedEvent {
|
@@ -874,6 +876,8 @@ export interface Socket {
|
|
874
876
|
GetPermissionByRoleIdChannelId(role_id: string, channel_id: string): Promise<PermissionRoleChannelListEvent>;
|
875
877
|
|
876
878
|
getNotificationChannelCategorySetting(clan_id : string): Promise<NotificationChannelCategorySettingEvent>;
|
879
|
+
|
880
|
+
oneventcreated: (clan_event_created: ApiCreateEventRequest) => void
|
877
881
|
}
|
878
882
|
|
879
883
|
/** Reports an error received from a socket message. */
|
@@ -1042,7 +1046,9 @@ export class DefaultSocket implements Socket {
|
|
1042
1046
|
this.onuserchannelremoved(<UserChannelRemovedEvent>message.user_channel_removed_event);
|
1043
1047
|
} else if (message.user_clan_removed_event) {
|
1044
1048
|
this.onuserclanremoved(<UserClanRemovedEvent>message.user_clan_removed_event);
|
1045
|
-
} else {
|
1049
|
+
} else if(message.clan_event_created){
|
1050
|
+
this.oneventcreated(message.clan_event_created);
|
1051
|
+
}else {
|
1046
1052
|
if (this.verbose && window && window.console) {
|
1047
1053
|
console.log("Unrecognized message received: %o", message);
|
1048
1054
|
}
|
@@ -1265,6 +1271,12 @@ export class DefaultSocket implements Socket {
|
|
1265
1271
|
}
|
1266
1272
|
}
|
1267
1273
|
|
1274
|
+
oneventcreated(clan_event_created: ApiCreateEventRequest) {
|
1275
|
+
if (this.verbose && window && window.console) {
|
1276
|
+
console.log(clan_event_created);
|
1277
|
+
}
|
1278
|
+
}
|
1279
|
+
|
1268
1280
|
send(message: ChannelJoin | ChannelLeave | ChannelMessageSend | ChannelMessageUpdate | CustomStatusEvent |
|
1269
1281
|
ChannelMessageRemove | MessageTypingEvent | LastSeenMessageEvent | Rpc | StatusFollow | StatusUnfollow | StatusUpdate | Ping, sendTimeout = DefaultSocket.DefaultSendTimeoutMs): Promise<any> {
|
1270
1282
|
const untypedMessage = message as any;
|