mezon-js 2.10.96 → 2.10.98
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 -5
- package/dist/api.gen.d.ts +4 -3
- package/dist/mezon-js.cjs.js +7 -0
- package/dist/mezon-js.esm.mjs +7 -0
- package/dist/socket.d.ts +18 -4
- package/package.json +1 -1
- package/socket.ts +38 -6
package/api.gen.ts
CHANGED
@@ -691,6 +691,8 @@ export interface ApiEditChannelCanvasRequest {
|
|
691
691
|
is_default?: boolean;
|
692
692
|
//
|
693
693
|
title?: string;
|
694
|
+
//
|
695
|
+
status?: number;
|
694
696
|
}
|
695
697
|
|
696
698
|
/** */
|
@@ -759,8 +761,8 @@ export interface ApiChannelDescription {
|
|
759
761
|
meeting_code?: string;
|
760
762
|
//
|
761
763
|
meeting_uri?: string;
|
762
|
-
//The
|
763
|
-
|
764
|
+
//The parent channel this message belongs to.
|
765
|
+
parent_id?: string;
|
764
766
|
//
|
765
767
|
is_online?: Array<boolean>;
|
766
768
|
//
|
@@ -1109,8 +1111,8 @@ export interface ApiCreateChannelDescRequest {
|
|
1109
1111
|
channel_private?: number;
|
1110
1112
|
//
|
1111
1113
|
clan_id?: string;
|
1112
|
-
//The
|
1113
|
-
|
1114
|
+
//The parent channel this message belongs to.
|
1115
|
+
parent_id?: string;
|
1114
1116
|
//The channel type.
|
1115
1117
|
type?: number;
|
1116
1118
|
//The users to add.
|
@@ -1415,7 +1417,7 @@ export interface ApiHashtagDm {
|
|
1415
1417
|
//
|
1416
1418
|
meeting_code?: string;
|
1417
1419
|
//
|
1418
|
-
|
1420
|
+
parent_id?: string;
|
1419
1421
|
//
|
1420
1422
|
type?: number;
|
1421
1423
|
}
|
package/dist/api.gen.d.ts
CHANGED
@@ -402,6 +402,7 @@ export interface ApiEditChannelCanvasRequest {
|
|
402
402
|
id?: string;
|
403
403
|
is_default?: boolean;
|
404
404
|
title?: string;
|
405
|
+
status?: number;
|
405
406
|
}
|
406
407
|
/** */
|
407
408
|
export interface ApiEditChannelCanvasResponse {
|
@@ -439,7 +440,7 @@ export interface ApiChannelDescription {
|
|
439
440
|
last_sent_message?: ApiChannelMessageHeader;
|
440
441
|
meeting_code?: string;
|
441
442
|
meeting_uri?: string;
|
442
|
-
|
443
|
+
parent_id?: string;
|
443
444
|
is_online?: Array<boolean>;
|
444
445
|
topic?: string;
|
445
446
|
type?: number;
|
@@ -634,7 +635,7 @@ export interface ApiCreateChannelDescRequest {
|
|
634
635
|
channel_label?: string;
|
635
636
|
channel_private?: number;
|
636
637
|
clan_id?: string;
|
637
|
-
|
638
|
+
parent_id?: string;
|
638
639
|
type?: number;
|
639
640
|
user_ids?: Array<string>;
|
640
641
|
}
|
@@ -810,7 +811,7 @@ export interface ApiHashtagDm {
|
|
810
811
|
clan_id?: string;
|
811
812
|
clan_name?: string;
|
812
813
|
meeting_code?: string;
|
813
|
-
|
814
|
+
parent_id?: string;
|
814
815
|
type?: number;
|
815
816
|
}
|
816
817
|
/** */
|
package/dist/mezon-js.cjs.js
CHANGED
@@ -7506,6 +7506,8 @@ var _DefaultSocket = class _DefaultSocket {
|
|
7506
7506
|
);
|
7507
7507
|
} else if (message.custom_status_event) {
|
7508
7508
|
this.oncustomstatus(message.custom_status_event);
|
7509
|
+
} else if (message.canvas_event) {
|
7510
|
+
this.oncanvasevent(message.canvas_event);
|
7509
7511
|
} else if (message.user_channel_added_event) {
|
7510
7512
|
this.onuserchanneladded(
|
7511
7513
|
message.user_channel_added_event
|
@@ -7819,6 +7821,11 @@ var _DefaultSocket = class _DefaultSocket {
|
|
7819
7821
|
console.log(statusEvent);
|
7820
7822
|
}
|
7821
7823
|
}
|
7824
|
+
oncanvasevent(canvasEvent) {
|
7825
|
+
if (this.verbose && window && window.console) {
|
7826
|
+
console.log(canvasEvent);
|
7827
|
+
}
|
7828
|
+
}
|
7822
7829
|
oneventcreated(clan_event_created) {
|
7823
7830
|
if (this.verbose && window && window.console) {
|
7824
7831
|
console.log(clan_event_created);
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -7472,6 +7472,8 @@ var _DefaultSocket = class _DefaultSocket {
|
|
7472
7472
|
);
|
7473
7473
|
} else if (message.custom_status_event) {
|
7474
7474
|
this.oncustomstatus(message.custom_status_event);
|
7475
|
+
} else if (message.canvas_event) {
|
7476
|
+
this.oncanvasevent(message.canvas_event);
|
7475
7477
|
} else if (message.user_channel_added_event) {
|
7476
7478
|
this.onuserchanneladded(
|
7477
7479
|
message.user_channel_added_event
|
@@ -7785,6 +7787,11 @@ var _DefaultSocket = class _DefaultSocket {
|
|
7785
7787
|
console.log(statusEvent);
|
7786
7788
|
}
|
7787
7789
|
}
|
7790
|
+
oncanvasevent(canvasEvent) {
|
7791
|
+
if (this.verbose && window && window.console) {
|
7792
|
+
console.log(canvasEvent);
|
7793
|
+
}
|
7794
|
+
}
|
7788
7795
|
oneventcreated(clan_event_created) {
|
7789
7796
|
if (this.verbose && window && window.console) {
|
7790
7797
|
console.log(clan_event_created);
|
package/dist/socket.d.ts
CHANGED
@@ -313,7 +313,7 @@ export interface ChannelUpdatedEvent {
|
|
313
313
|
clan_id: string;
|
314
314
|
category_id: string;
|
315
315
|
creator_id: string;
|
316
|
-
|
316
|
+
parent_id: string;
|
317
317
|
channel_id: string;
|
318
318
|
channel_label: string;
|
319
319
|
channel_type: number;
|
@@ -331,7 +331,7 @@ export interface ChannelCreatedEvent {
|
|
331
331
|
clan_id: string;
|
332
332
|
category_id: string;
|
333
333
|
creator_id: string;
|
334
|
-
|
334
|
+
parent_id: string;
|
335
335
|
channel_id: string;
|
336
336
|
channel_label: string;
|
337
337
|
channel_private: number;
|
@@ -345,6 +345,7 @@ export interface ChannelDeletedEvent {
|
|
345
345
|
category_id: string;
|
346
346
|
channel_id: string;
|
347
347
|
deletor: string;
|
348
|
+
parent_id: string;
|
348
349
|
}
|
349
350
|
export interface StickerCreateEvent {
|
350
351
|
clan_id: string;
|
@@ -514,7 +515,7 @@ export interface ChannelDescription {
|
|
514
515
|
channel_private?: number;
|
515
516
|
meeting_code?: string;
|
516
517
|
clan_name?: string;
|
517
|
-
|
518
|
+
parent_id?: string;
|
518
519
|
last_sent_message?: ApiChannelMessageHeader;
|
519
520
|
}
|
520
521
|
export interface HashtagDm {
|
@@ -525,7 +526,7 @@ export interface HashtagDm {
|
|
525
526
|
meeting_code?: string;
|
526
527
|
type?: number;
|
527
528
|
channel_private?: number;
|
528
|
-
|
529
|
+
parent_id?: string;
|
529
530
|
}
|
530
531
|
export interface NotificationSetting {
|
531
532
|
id?: string;
|
@@ -693,6 +694,17 @@ export interface JoinChannelAppData {
|
|
693
694
|
username: string;
|
694
695
|
hash: string;
|
695
696
|
}
|
697
|
+
/** */
|
698
|
+
export interface ChannelCanvas {
|
699
|
+
content?: string;
|
700
|
+
creator_id?: string;
|
701
|
+
editor_id?: string;
|
702
|
+
id?: string;
|
703
|
+
is_default?: boolean;
|
704
|
+
title?: string;
|
705
|
+
channel_id?: string;
|
706
|
+
status?: number;
|
707
|
+
}
|
696
708
|
/** A socket connection to Mezon server. */
|
697
709
|
export interface Socket {
|
698
710
|
/** Connection is Open */
|
@@ -765,6 +777,7 @@ export interface Socket {
|
|
765
777
|
*/
|
766
778
|
onheartbeattimeout: () => void;
|
767
779
|
oncustomstatus: (statusEvent: CustomStatusEvent) => void;
|
780
|
+
oncanvasevent: (canvasEvent: ChannelCanvas) => void;
|
768
781
|
/** Receive channel message. */
|
769
782
|
onchannelmessage: (channelMessage: ChannelMessage) => void;
|
770
783
|
/** Receive typing event */
|
@@ -890,6 +903,7 @@ export declare class DefaultSocket implements Socket {
|
|
890
903
|
onstreamdata(streamData: StreamData): void;
|
891
904
|
onheartbeattimeout(): void;
|
892
905
|
oncustomstatus(statusEvent: CustomStatusEvent): void;
|
906
|
+
oncanvasevent(canvasEvent: ChannelCanvas): void;
|
893
907
|
oneventcreated(clan_event_created: ApiCreateEventRequest): void;
|
894
908
|
oncoffeegiven(give_coffee_event: ApiGiveCoffeeEvent): void;
|
895
909
|
onroleassign(role_assign_event: RoleAssignedEvent): void;
|
package/package.json
CHANGED
package/socket.ts
CHANGED
@@ -456,8 +456,8 @@ export interface ChannelUpdatedEvent {
|
|
456
456
|
category_id: string;
|
457
457
|
// creator
|
458
458
|
creator_id: string;
|
459
|
-
//
|
460
|
-
|
459
|
+
// parent_id
|
460
|
+
parent_id: string;
|
461
461
|
// channel id
|
462
462
|
channel_id: string;
|
463
463
|
// channel label
|
@@ -491,8 +491,8 @@ export interface ChannelCreatedEvent {
|
|
491
491
|
category_id: string;
|
492
492
|
// creator
|
493
493
|
creator_id: string;
|
494
|
-
//
|
495
|
-
|
494
|
+
// parent_id
|
495
|
+
parent_id: string;
|
496
496
|
// channel id
|
497
497
|
channel_id: string;
|
498
498
|
// channel label
|
@@ -518,6 +518,8 @@ export interface ChannelDeletedEvent {
|
|
518
518
|
channel_id: string;
|
519
519
|
// deletor
|
520
520
|
deletor: string;
|
521
|
+
// parent id
|
522
|
+
parent_id: string;
|
521
523
|
}
|
522
524
|
|
523
525
|
export interface StickerCreateEvent {
|
@@ -754,7 +756,7 @@ export interface ChannelDescription {
|
|
754
756
|
//
|
755
757
|
clan_name?: string;
|
756
758
|
//
|
757
|
-
|
759
|
+
parent_id?: string;
|
758
760
|
//
|
759
761
|
last_sent_message?: ApiChannelMessageHeader;
|
760
762
|
}
|
@@ -776,7 +778,7 @@ export interface HashtagDm {
|
|
776
778
|
//
|
777
779
|
channel_private?: number;
|
778
780
|
//
|
779
|
-
|
781
|
+
parent_id?: string;
|
780
782
|
}
|
781
783
|
|
782
784
|
export interface NotificationSetting {
|
@@ -975,6 +977,26 @@ export interface JoinChannelAppData {
|
|
975
977
|
hash: string;
|
976
978
|
}
|
977
979
|
|
980
|
+
/** */
|
981
|
+
export interface ChannelCanvas {
|
982
|
+
//
|
983
|
+
content?: string;
|
984
|
+
//
|
985
|
+
creator_id?: string;
|
986
|
+
//
|
987
|
+
editor_id?: string;
|
988
|
+
//
|
989
|
+
id?: string;
|
990
|
+
//
|
991
|
+
is_default?: boolean;
|
992
|
+
//
|
993
|
+
title?: string;
|
994
|
+
//
|
995
|
+
channel_id?: string;
|
996
|
+
//
|
997
|
+
status?: number;
|
998
|
+
}
|
999
|
+
|
978
1000
|
/** A socket connection to Mezon server. */
|
979
1001
|
export interface Socket {
|
980
1002
|
/** Connection is Open */
|
@@ -1226,6 +1248,8 @@ export interface Socket {
|
|
1226
1248
|
|
1227
1249
|
oncustomstatus: (statusEvent: CustomStatusEvent) => void;
|
1228
1250
|
|
1251
|
+
oncanvasevent: (canvasEvent: ChannelCanvas) => void;
|
1252
|
+
|
1229
1253
|
/** Receive channel message. */
|
1230
1254
|
onchannelmessage: (channelMessage: ChannelMessage) => void;
|
1231
1255
|
|
@@ -1561,6 +1585,8 @@ export class DefaultSocket implements Socket {
|
|
1561
1585
|
);
|
1562
1586
|
} else if (message.custom_status_event) {
|
1563
1587
|
this.oncustomstatus(<CustomStatusEvent>message.custom_status_event);
|
1588
|
+
} else if (message.canvas_event) {
|
1589
|
+
this.oncanvasevent(<ChannelCanvas>message.canvas_event);
|
1564
1590
|
} else if (message.user_channel_added_event) {
|
1565
1591
|
this.onuserchanneladded(
|
1566
1592
|
<UserChannelAddedEvent>message.user_channel_added_event
|
@@ -1920,6 +1946,12 @@ export class DefaultSocket implements Socket {
|
|
1920
1946
|
}
|
1921
1947
|
}
|
1922
1948
|
|
1949
|
+
oncanvasevent(canvasEvent: ChannelCanvas) {
|
1950
|
+
if (this.verbose && window && window.console) {
|
1951
|
+
console.log(canvasEvent);
|
1952
|
+
}
|
1953
|
+
}
|
1954
|
+
|
1923
1955
|
oneventcreated(clan_event_created: ApiCreateEventRequest) {
|
1924
1956
|
if (this.verbose && window && window.console) {
|
1925
1957
|
console.log(clan_event_created);
|