mezon-js 2.9.84 → 2.9.85

Sign up to get free protection for your applications and to get access to all the features.
@@ -7050,6 +7050,10 @@ var _DefaultSocket = class _DefaultSocket {
7050
7050
  this.onmessagebuttonclicked(
7051
7051
  message.message_button_clicked
7052
7052
  );
7053
+ } else if (message.dropdown_box_selected) {
7054
+ this.onmessagedropdownboxselected(
7055
+ message.dropdown_box_selected
7056
+ );
7053
7057
  } else if (message.webrtc_signaling_fwd) {
7054
7058
  this.onwebrtcsignalingfwd(
7055
7059
  message.webrtc_signaling_fwd
@@ -7342,6 +7346,11 @@ var _DefaultSocket = class _DefaultSocket {
7342
7346
  console.log(messageButtonClicked);
7343
7347
  }
7344
7348
  }
7349
+ onmessagedropdownboxselected(msg) {
7350
+ if (this.verbose && window && window.console) {
7351
+ console.log(msg);
7352
+ }
7353
+ }
7345
7354
  onwebrtcsignalingfwd(event) {
7346
7355
  if (this.verbose && window && window.console) {
7347
7356
  console.log(event);
@@ -7622,6 +7631,21 @@ var _DefaultSocket = class _DefaultSocket {
7622
7631
  return response.webrtc_signaling_fwd;
7623
7632
  });
7624
7633
  }
7634
+ handleDropdownBoxSelected(message_id, channel_id, selectbox_id, sender_id, user_id, value) {
7635
+ return __async(this, null, function* () {
7636
+ const response = yield this.send({
7637
+ message_button_clicked: {
7638
+ message_id,
7639
+ channel_id,
7640
+ selectbox_id,
7641
+ sender_id,
7642
+ user_id,
7643
+ value
7644
+ }
7645
+ });
7646
+ return response.dropdown_box_selected;
7647
+ });
7648
+ }
7625
7649
  handleMessageButtonClick(message_id, channel_id, button_id, sender_id, user_id) {
7626
7650
  return __async(this, null, function* () {
7627
7651
  const response = yield this.send({
@@ -7020,6 +7020,10 @@ var _DefaultSocket = class _DefaultSocket {
7020
7020
  this.onmessagebuttonclicked(
7021
7021
  message.message_button_clicked
7022
7022
  );
7023
+ } else if (message.dropdown_box_selected) {
7024
+ this.onmessagedropdownboxselected(
7025
+ message.dropdown_box_selected
7026
+ );
7023
7027
  } else if (message.webrtc_signaling_fwd) {
7024
7028
  this.onwebrtcsignalingfwd(
7025
7029
  message.webrtc_signaling_fwd
@@ -7312,6 +7316,11 @@ var _DefaultSocket = class _DefaultSocket {
7312
7316
  console.log(messageButtonClicked);
7313
7317
  }
7314
7318
  }
7319
+ onmessagedropdownboxselected(msg) {
7320
+ if (this.verbose && window && window.console) {
7321
+ console.log(msg);
7322
+ }
7323
+ }
7315
7324
  onwebrtcsignalingfwd(event) {
7316
7325
  if (this.verbose && window && window.console) {
7317
7326
  console.log(event);
@@ -7592,6 +7601,21 @@ var _DefaultSocket = class _DefaultSocket {
7592
7601
  return response.webrtc_signaling_fwd;
7593
7602
  });
7594
7603
  }
7604
+ handleDropdownBoxSelected(message_id, channel_id, selectbox_id, sender_id, user_id, value) {
7605
+ return __async(this, null, function* () {
7606
+ const response = yield this.send({
7607
+ message_button_clicked: {
7608
+ message_id,
7609
+ channel_id,
7610
+ selectbox_id,
7611
+ sender_id,
7612
+ user_id,
7613
+ value
7614
+ }
7615
+ });
7616
+ return response.dropdown_box_selected;
7617
+ });
7618
+ }
7595
7619
  handleMessageButtonClick(message_id, channel_id, button_id, sender_id, user_id) {
7596
7620
  return __async(this, null, function* () {
7597
7621
  const response = yield this.send({
package/dist/socket.d.ts CHANGED
@@ -577,6 +577,14 @@ export interface PermissionChangedEvent {
577
577
  user_id: string;
578
578
  channel_id: string;
579
579
  }
580
+ export interface DropdownBoxSelected {
581
+ message_id: string;
582
+ channel_id: string;
583
+ selectbox_id: string;
584
+ sender_id: string;
585
+ user_id: string;
586
+ value: Array<string>;
587
+ }
580
588
  export interface MessageButtonClicked {
581
589
  message_id: string;
582
590
  channel_id: string;
@@ -713,8 +721,10 @@ export interface Socket {
713
721
  getHeartbeatTimeoutMs(): number;
714
722
  checkDuplicateName(name: string, condition_id: string, type: number): Promise<CheckNameExistedEvent>;
715
723
  handleMessageButtonClick: (message_id: string, channel_id: string, button_id: string, sender_id: string, user_id: string) => Promise<MessageButtonClicked>;
716
- onmessagebuttonclicked: (event: MessageButtonClicked) => void;
724
+ handleDropdownBoxSelected: (message_id: string, channel_id: string, selectbox_id: string, sender_id: string, user_id: string, value: Array<string>) => Promise<DropdownBoxSelected>;
717
725
  forwardWebrtcSignaling: (receiverId: string, dataType: number, jsonData: string, channelId: string, caller_id: string) => Promise<WebrtcSignalingFwd>;
726
+ onmessagebuttonclicked: (event: MessageButtonClicked) => void;
727
+ onmessagedropdownboxselected: (event: DropdownBoxSelected) => void;
718
728
  onwebrtcsignalingfwd: (event: WebrtcSignalingFwd) => void;
719
729
  oneventcreated: (clan_event_created: ApiCreateEventRequest) => void;
720
730
  oncoffeegiven: (give_coffee_event: ApiGiveCoffeeEvent) => void;
@@ -806,11 +816,12 @@ export declare class DefaultSocket implements Socket {
806
816
  onunmuteevent(unmute_event: UnmuteEvent): void;
807
817
  ontokensent(tokenSentEvent: ApiTokenSentEvent): void;
808
818
  onmessagebuttonclicked(messageButtonClicked: MessageButtonClicked): void;
819
+ onmessagedropdownboxselected(msg: DropdownBoxSelected): void;
809
820
  onwebrtcsignalingfwd(event: WebrtcSignalingFwd): void;
810
821
  onactivityupdated(list_activity: ListActivity): void;
811
822
  onjoinpttchannel(join_ptt_channel: JoinPTTChannel): void;
812
823
  ontalkpttchannel(talk_ptt_channel: TalkPTTChannel): void;
813
- send(message: ChannelJoin | ChannelLeave | ChannelMessageSend | ChannelMessageUpdate | CustomStatusEvent | ChannelMessageRemove | MessageTypingEvent | LastSeenMessageEvent | Rpc | StatusFollow | StatusUnfollow | StatusUpdate | Ping | WebrtcSignalingFwd | MessageButtonClicked | JoinPTTChannel | TalkPTTChannel, sendTimeout?: number): Promise<any>;
824
+ send(message: ChannelJoin | ChannelLeave | ChannelMessageSend | ChannelMessageUpdate | CustomStatusEvent | ChannelMessageRemove | MessageTypingEvent | LastSeenMessageEvent | Rpc | StatusFollow | StatusUnfollow | StatusUpdate | Ping | WebrtcSignalingFwd | MessageButtonClicked | DropdownBoxSelected | JoinPTTChannel | TalkPTTChannel, sendTimeout?: number): Promise<any>;
814
825
  followUsers(userIds: string[]): Promise<Status>;
815
826
  joinClanChat(clan_id: string): Promise<ClanJoin>;
816
827
  joinChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<Channel>;
@@ -830,6 +841,7 @@ export declare class DefaultSocket implements Socket {
830
841
  writeCustomStatus(clan_id: string, status: string): Promise<CustomStatusEvent>;
831
842
  checkDuplicateName(name: string, condition_id: string, type: number): Promise<CheckNameExistedEvent>;
832
843
  forwardWebrtcSignaling(receiver_id: string, data_type: number, json_data: string, channel_id: string, caller_id: string): Promise<WebrtcSignalingFwd>;
844
+ handleDropdownBoxSelected(message_id: string, channel_id: string, selectbox_id: string, sender_id: string, user_id: string, value: Array<string>): Promise<DropdownBoxSelected>;
833
845
  handleMessageButtonClick(message_id: string, channel_id: string, button_id: string, sender_id: string, user_id: string): Promise<MessageButtonClicked>;
834
846
  joinPTTChannel(channelId: string, dataType: number, jsonData: string): Promise<JoinPTTChannel>;
835
847
  talkPTTChannel(channelId: string, dataType: number, jsonData: string, state: number): Promise<TalkPTTChannel>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mezon-js",
3
3
 
4
- "version": "2.9.84",
4
+ "version": "2.9.85",
5
5
 
6
6
  "scripts": {
7
7
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
package/socket.ts CHANGED
@@ -820,6 +820,15 @@ export interface PermissionChangedEvent {
820
820
  channel_id: string;
821
821
  }
822
822
 
823
+ export interface DropdownBoxSelected {
824
+ message_id: string;
825
+ channel_id: string;
826
+ selectbox_id: string;
827
+ sender_id: string;
828
+ user_id: string;
829
+ value: Array<string>;
830
+ }
831
+
823
832
  export interface MessageButtonClicked {
824
833
  message_id: string;
825
834
  channel_id: string;
@@ -1150,7 +1159,14 @@ export interface Socket {
1150
1159
  user_id: string
1151
1160
  ) => Promise<MessageButtonClicked>;
1152
1161
 
1153
- onmessagebuttonclicked: (event: MessageButtonClicked) => void;
1162
+ handleDropdownBoxSelected: (
1163
+ message_id: string,
1164
+ channel_id: string,
1165
+ selectbox_id: string,
1166
+ sender_id: string,
1167
+ user_id: string,
1168
+ value: Array<string>
1169
+ ) => Promise<DropdownBoxSelected>;
1154
1170
 
1155
1171
  forwardWebrtcSignaling: (
1156
1172
  receiverId: string,
@@ -1160,6 +1176,11 @@ export interface Socket {
1160
1176
  caller_id: string
1161
1177
  ) => Promise<WebrtcSignalingFwd>;
1162
1178
 
1179
+
1180
+ onmessagebuttonclicked: (event: MessageButtonClicked) => void;
1181
+
1182
+ onmessagedropdownboxselected: (event: DropdownBoxSelected) => void;
1183
+
1163
1184
  onwebrtcsignalingfwd: (event: WebrtcSignalingFwd) => void;
1164
1185
 
1165
1186
  oneventcreated: (clan_event_created: ApiCreateEventRequest) => void;
@@ -1453,6 +1474,10 @@ export class DefaultSocket implements Socket {
1453
1474
  this.onmessagebuttonclicked(
1454
1475
  <MessageButtonClicked>message.message_button_clicked
1455
1476
  );
1477
+ } else if (message.dropdown_box_selected) {
1478
+ this.onmessagedropdownboxselected(
1479
+ <DropdownBoxSelected>message.dropdown_box_selected
1480
+ );
1456
1481
  } else if (message.webrtc_signaling_fwd) {
1457
1482
  this.onwebrtcsignalingfwd(
1458
1483
  <WebrtcSignalingFwd>message.webrtc_signaling_fwd
@@ -1800,6 +1825,12 @@ export class DefaultSocket implements Socket {
1800
1825
  }
1801
1826
  }
1802
1827
 
1828
+ onmessagedropdownboxselected(msg: DropdownBoxSelected) {
1829
+ if (this.verbose && window && window.console) {
1830
+ console.log(msg);
1831
+ }
1832
+ }
1833
+
1803
1834
  onwebrtcsignalingfwd(event: WebrtcSignalingFwd) {
1804
1835
  if (this.verbose && window && window.console) {
1805
1836
  console.log(event);
@@ -1840,6 +1871,7 @@ export class DefaultSocket implements Socket {
1840
1871
  | Ping
1841
1872
  | WebrtcSignalingFwd
1842
1873
  | MessageButtonClicked
1874
+ | DropdownBoxSelected
1843
1875
  | JoinPTTChannel
1844
1876
  | TalkPTTChannel,
1845
1877
  sendTimeout = DefaultSocket.DefaultSendTimeoutMs
@@ -2194,6 +2226,27 @@ export class DefaultSocket implements Socket {
2194
2226
  return response.webrtc_signaling_fwd;
2195
2227
  }
2196
2228
 
2229
+ async handleDropdownBoxSelected(
2230
+ message_id: string,
2231
+ channel_id: string,
2232
+ selectbox_id: string,
2233
+ sender_id: string,
2234
+ user_id: string,
2235
+ value: Array<string>
2236
+ ): Promise<DropdownBoxSelected> {
2237
+ const response = await this.send({
2238
+ message_button_clicked: {
2239
+ message_id: message_id,
2240
+ channel_id: channel_id,
2241
+ selectbox_id: selectbox_id,
2242
+ sender_id: sender_id,
2243
+ user_id: user_id,
2244
+ value: value
2245
+ },
2246
+ });
2247
+ return response.dropdown_box_selected;
2248
+ }
2249
+
2197
2250
  async handleMessageButtonClick(
2198
2251
  message_id: string,
2199
2252
  channel_id: string,