mezon-js 2.8.34 → 2.8.36

Sign up to get free protection for your applications and to get access to all the features.
package/api.gen.ts CHANGED
@@ -953,15 +953,15 @@ export interface ApiMessageAttachment {
953
953
  //
954
954
  width?: number;
955
955
  /** The channel this message belongs to. */
956
- channel_id:string;
956
+ channel_id?:string;
957
957
  // The mode
958
- mode: number;
958
+ mode?: number;
959
959
  // The channel label
960
- channel_label: string;
960
+ channel_label?: string;
961
961
  /** The message that user react */
962
- message_id: string;
962
+ message_id?: string;
963
963
  /** Message sender, usually a user ID. */
964
- sender_id: string;
964
+ sender_id?: string;
965
965
  }
966
966
 
967
967
  /** */
@@ -991,15 +991,15 @@ export interface ApiMessageMention {
991
991
  // end position
992
992
  e?: number;
993
993
  /** The channel this message belongs to. */
994
- channel_id:string;
994
+ channel_id?:string;
995
995
  // The mode
996
- mode: number;
996
+ mode?: number;
997
997
  // The channel label
998
- channel_label: string;
998
+ channel_label?: string;
999
999
  /** The message that user react */
1000
- message_id: string;
1000
+ message_id?: string;
1001
1001
  /** Message sender, usually a user ID. */
1002
- sender_id: string;
1002
+ sender_id?: string;
1003
1003
  }
1004
1004
 
1005
1005
  /** */
package/client.ts CHANGED
@@ -243,6 +243,10 @@ export interface ChannelMessage {
243
243
  create_time_ms?: number;
244
244
  //
245
245
  update_time_ms?: number;
246
+ //
247
+ mode?: number;
248
+ //
249
+ message_id?: string;
246
250
  }
247
251
 
248
252
  /** A list of channel messages, usually a result of a list operation. */
@@ -1038,7 +1042,7 @@ export class Client {
1038
1042
  var result: ChannelMessageList = {
1039
1043
  messages: [],
1040
1044
  last_seen_message: response.last_seen_message,
1041
- last_sent_message: response.last_sent_message
1045
+ last_sent_message: response.last_sent_message
1042
1046
  };
1043
1047
 
1044
1048
  if (response.messages == null) {
package/dist/api.gen.d.ts CHANGED
@@ -548,13 +548,13 @@ export interface ApiMessageAttachment {
548
548
  url?: string;
549
549
  width?: number;
550
550
  /** The channel this message belongs to. */
551
- channel_id: string;
552
- mode: number;
553
- channel_label: string;
551
+ channel_id?: string;
552
+ mode?: number;
553
+ channel_label?: string;
554
554
  /** The message that user react */
555
- message_id: string;
555
+ message_id?: string;
556
556
  /** Message sender, usually a user ID. */
557
- sender_id: string;
557
+ sender_id?: string;
558
558
  }
559
559
  /** */
560
560
  export interface ApiMessageDeleted {
@@ -572,13 +572,13 @@ export interface ApiMessageMention {
572
572
  s?: number;
573
573
  e?: number;
574
574
  /** The channel this message belongs to. */
575
- channel_id: string;
576
- mode: number;
577
- channel_label: string;
575
+ channel_id?: string;
576
+ mode?: number;
577
+ channel_label?: string;
578
578
  /** The message that user react */
579
- message_id: string;
579
+ message_id?: string;
580
580
  /** Message sender, usually a user ID. */
581
- sender_id: string;
581
+ sender_id?: string;
582
582
  }
583
583
  /** */
584
584
  export interface ApiMessageReaction {
package/dist/client.d.ts CHANGED
@@ -117,6 +117,8 @@ export interface ChannelMessage {
117
117
  display_name?: string;
118
118
  create_time_ms?: number;
119
119
  update_time_ms?: number;
120
+ mode?: number;
121
+ message_id?: string;
120
122
  }
121
123
  /** A list of channel messages, usually a result of a list operation. */
122
124
  export interface ChannelMessageList {
package/dist/socket.d.ts CHANGED
@@ -13,9 +13,9 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { ApiChannelMessage, ApiMessageAttachment, ApiMessageMention, ApiMessageReaction, ApiMessageRef, ApiRpc } from "./api.gen";
16
+ import { ApiMessageAttachment, ApiMessageMention, ApiMessageReaction, ApiMessageRef, ApiRpc } from "./api.gen";
17
17
  import { Session } from "./session";
18
- import { Notification } from "./client";
18
+ import { ChannelMessage, Notification } from "./client";
19
19
  import { WebSocketAdapter } from "./web_socket_adapter";
20
20
  /** An object which represents a connected user in the server. */
21
21
  export interface Presence {
@@ -505,7 +505,7 @@ export interface Socket {
505
505
  onheartbeattimeout: () => void;
506
506
  oncustomstatus: (statusEvent: CustomStatusEvent) => void;
507
507
  /** Receive channel message. */
508
- onchannelmessage: (channelMessage: ApiChannelMessage) => void;
508
+ onchannelmessage: (channelMessage: ChannelMessage) => void;
509
509
  /** Receive typing event */
510
510
  onmessagetyping: (messageTypingEvent: MessageTypingEvent) => void;
511
511
  /** Receive reaction event */
@@ -575,7 +575,7 @@ export declare class DefaultSocket implements Socket {
575
575
  onerror(evt: Event): void;
576
576
  onmessagetyping(messagetyping: MessageTypingEvent): void;
577
577
  onmessagereaction(messagereaction: ApiMessageReaction): void;
578
- onchannelmessage(channelMessage: ApiChannelMessage): void;
578
+ onchannelmessage(channelMessage: ChannelMessage): void;
579
579
  onchannelpresence(channelPresence: ChannelPresenceEvent): void;
580
580
  onuserchanneladded(user: UserChannelAddedEvent): void;
581
581
  onuserprofileupdate(user: UserProfileUpdatedEvent): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mezon-js",
3
- "version": "2.8.34",
3
+ "version": "2.8.36",
4
4
  "scripts": {
5
5
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
6
6
  },
package/socket.ts CHANGED
@@ -14,9 +14,9 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import {ApiChannelMessage, ApiMessageAttachment, ApiMessageMention, ApiMessageReaction, ApiMessageRef, ApiNotification, ApiRpc} from "./api.gen";
17
+ import { ApiMessageAttachment, ApiMessageMention, ApiMessageReaction, ApiMessageRef, ApiNotification, ApiRpc} from "./api.gen";
18
18
  import {Session} from "./session";
19
- import {Notification} from "./client";
19
+ import {ChannelMessage, Notification} from "./client";
20
20
  import {WebSocketAdapter, WebSocketAdapterText} from "./web_socket_adapter"
21
21
 
22
22
  /** Stores function references for resolve/reject with a DOM Promise. */
@@ -737,7 +737,7 @@ export interface Socket {
737
737
  oncustomstatus: (statusEvent: CustomStatusEvent) => void;
738
738
 
739
739
  /** Receive channel message. */
740
- onchannelmessage: (channelMessage: ApiChannelMessage) => void;
740
+ onchannelmessage: (channelMessage: ChannelMessage) => void;
741
741
 
742
742
  /** Receive typing event */
743
743
  onmessagetyping: (messageTypingEvent: MessageTypingEvent) => void;
@@ -936,7 +936,7 @@ export class DefaultSocket implements Socket {
936
936
  } catch(e) {
937
937
  //console.log("references is invalid", e);
938
938
  }
939
- var e: ApiChannelMessage = {
939
+ var e: ChannelMessage = {
940
940
  id: message.id,
941
941
  avatar: message.channel_message.avatar,
942
942
  channel_id: message.channel_message.channel_id,
@@ -1064,7 +1064,7 @@ export class DefaultSocket implements Socket {
1064
1064
  }
1065
1065
  }
1066
1066
 
1067
- onchannelmessage(channelMessage: ApiChannelMessage) {
1067
+ onchannelmessage(channelMessage: ChannelMessage) {
1068
1068
  if (this.verbose && window && window.console) {
1069
1069
  console.log(channelMessage);
1070
1070
  }