mezon-sdk 2.7.71 → 2.7.73

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.
@@ -1,7 +1,7 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v1.181.2
4
- // protoc v3.21.12
3
+ // protoc-gen-ts_proto v1.181.1
4
+ // protoc v5.27.2
5
5
  // source: rtapi/realtime.proto
6
6
  /* eslint-disable */
7
7
  import _m0 from "protobufjs/minimal";
@@ -156,6 +156,7 @@ function createBaseEnvelope() {
156
156
  incoming_call_push: undefined,
157
157
  ptt_joined_event: undefined,
158
158
  ptt_leaved_event: undefined,
159
+ sd_topic_event: undefined,
159
160
  };
160
161
  }
161
162
  export const Envelope = {
@@ -367,6 +368,9 @@ export const Envelope = {
367
368
  if (message.ptt_leaved_event !== undefined) {
368
369
  PTTLeavedEvent.encode(message.ptt_leaved_event, writer.uint32(554).fork()).ldelim();
369
370
  }
371
+ if (message.sd_topic_event !== undefined) {
372
+ SdTopicEvent.encode(message.sd_topic_event, writer.uint32(562).fork()).ldelim();
373
+ }
370
374
  return writer;
371
375
  },
372
376
  decode(input, length) {
@@ -790,6 +794,12 @@ export const Envelope = {
790
794
  }
791
795
  message.ptt_leaved_event = PTTLeavedEvent.decode(reader, reader.uint32());
792
796
  continue;
797
+ case 70:
798
+ if (tag !== 562) {
799
+ break;
800
+ }
801
+ message.sd_topic_event = SdTopicEvent.decode(reader, reader.uint32());
802
+ continue;
793
803
  }
794
804
  if ((tag & 7) === 4 || tag === 0) {
795
805
  break;
@@ -957,6 +967,7 @@ export const Envelope = {
957
967
  : undefined,
958
968
  ptt_joined_event: isSet(object.ptt_joined_event) ? PTTJoinedEvent.fromJSON(object.ptt_joined_event) : undefined,
959
969
  ptt_leaved_event: isSet(object.ptt_leaved_event) ? PTTLeavedEvent.fromJSON(object.ptt_leaved_event) : undefined,
970
+ sd_topic_event: isSet(object.sd_topic_event) ? SdTopicEvent.fromJSON(object.sd_topic_event) : undefined,
960
971
  };
961
972
  },
962
973
  toJSON(message) {
@@ -1139,7 +1150,6 @@ export const Envelope = {
1139
1150
  obj.token_sent_event = TokenSentEvent.toJSON(message.token_sent_event);
1140
1151
  }
1141
1152
  if (message.message_button_clicked !== undefined) {
1142
- console.log('message.message_button_clicked', message.message_button_clicked);
1143
1153
  obj.message_button_clicked = MessageButtonClicked.toJSON(message.message_button_clicked);
1144
1154
  }
1145
1155
  if (message.unmute_event !== undefined) {
@@ -1169,6 +1179,9 @@ export const Envelope = {
1169
1179
  if (message.ptt_leaved_event !== undefined) {
1170
1180
  obj.ptt_leaved_event = PTTLeavedEvent.toJSON(message.ptt_leaved_event);
1171
1181
  }
1182
+ if (message.sd_topic_event !== undefined) {
1183
+ obj.sd_topic_event = SdTopicEvent.toJSON(message.sd_topic_event);
1184
+ }
1172
1185
  return obj;
1173
1186
  },
1174
1187
  create(base) {
@@ -1397,6 +1410,9 @@ export const Envelope = {
1397
1410
  message.ptt_leaved_event = (object.ptt_leaved_event !== undefined && object.ptt_leaved_event !== null)
1398
1411
  ? PTTLeavedEvent.fromPartial(object.ptt_leaved_event)
1399
1412
  : undefined;
1413
+ message.sd_topic_event = (object.sd_topic_event !== undefined && object.sd_topic_event !== null)
1414
+ ? SdTopicEvent.fromPartial(object.sd_topic_event)
1415
+ : undefined;
1400
1416
  return message;
1401
1417
  },
1402
1418
  };
@@ -2873,6 +2889,7 @@ function createBaseChannelMessageSend() {
2873
2889
  avatar: "",
2874
2890
  is_public: false,
2875
2891
  code: 0,
2892
+ topic_id: "",
2876
2893
  };
2877
2894
  }
2878
2895
  export const ChannelMessageSend = {
@@ -2913,6 +2930,9 @@ export const ChannelMessageSend = {
2913
2930
  if (message.code !== 0) {
2914
2931
  writer.uint32(96).int32(message.code);
2915
2932
  }
2933
+ if (message.topic_id !== "") {
2934
+ writer.uint32(106).string(message.topic_id);
2935
+ }
2916
2936
  return writer;
2917
2937
  },
2918
2938
  decode(input, length) {
@@ -2994,6 +3014,12 @@ export const ChannelMessageSend = {
2994
3014
  }
2995
3015
  message.code = reader.int32();
2996
3016
  continue;
3017
+ case 13:
3018
+ if (tag !== 106) {
3019
+ break;
3020
+ }
3021
+ message.topic_id = reader.string();
3022
+ continue;
2997
3023
  }
2998
3024
  if ((tag & 7) === 4 || tag === 0) {
2999
3025
  break;
@@ -3022,6 +3048,7 @@ export const ChannelMessageSend = {
3022
3048
  avatar: isSet(object.avatar) ? globalThis.String(object.avatar) : "",
3023
3049
  is_public: isSet(object.is_public) ? globalThis.Boolean(object.is_public) : false,
3024
3050
  code: isSet(object.code) ? globalThis.Number(object.code) : 0,
3051
+ topic_id: isSet(object.topic_id) ? globalThis.String(object.topic_id) : "",
3025
3052
  };
3026
3053
  },
3027
3054
  toJSON(message) {
@@ -3062,6 +3089,9 @@ export const ChannelMessageSend = {
3062
3089
  if (message.code !== 0) {
3063
3090
  obj.code = Math.round(message.code);
3064
3091
  }
3092
+ if (message.topic_id !== "") {
3093
+ obj.topic_id = message.topic_id;
3094
+ }
3065
3095
  return obj;
3066
3096
  },
3067
3097
  create(base) {
@@ -3081,6 +3111,7 @@ export const ChannelMessageSend = {
3081
3111
  message.avatar = object.avatar ?? "";
3082
3112
  message.is_public = object.is_public ?? false;
3083
3113
  message.code = object.code ?? 0;
3114
+ message.topic_id = object.topic_id ?? "";
3084
3115
  return message;
3085
3116
  },
3086
3117
  };
@@ -7377,6 +7408,7 @@ function createBaseUserProfileRedis() {
7377
7408
  fcm_tokens: [],
7378
7409
  online: false,
7379
7410
  metadata: "",
7411
+ is_disabled: false,
7380
7412
  };
7381
7413
  }
7382
7414
  export const UserProfileRedis = {
@@ -7411,6 +7443,9 @@ export const UserProfileRedis = {
7411
7443
  if (message.metadata !== "") {
7412
7444
  writer.uint32(82).string(message.metadata);
7413
7445
  }
7446
+ if (message.is_disabled !== false) {
7447
+ writer.uint32(88).bool(message.is_disabled);
7448
+ }
7414
7449
  return writer;
7415
7450
  },
7416
7451
  decode(input, length) {
@@ -7480,6 +7515,12 @@ export const UserProfileRedis = {
7480
7515
  }
7481
7516
  message.metadata = reader.string();
7482
7517
  continue;
7518
+ case 11:
7519
+ if (tag !== 88) {
7520
+ break;
7521
+ }
7522
+ message.is_disabled = reader.bool();
7523
+ continue;
7483
7524
  }
7484
7525
  if ((tag & 7) === 4 || tag === 0) {
7485
7526
  break;
@@ -7502,6 +7543,7 @@ export const UserProfileRedis = {
7502
7543
  : [],
7503
7544
  online: isSet(object.online) ? globalThis.Boolean(object.online) : false,
7504
7545
  metadata: isSet(object.metadata) ? globalThis.String(object.metadata) : "",
7546
+ is_disabled: isSet(object.is_disabled) ? globalThis.Boolean(object.is_disabled) : false,
7505
7547
  };
7506
7548
  },
7507
7549
  toJSON(message) {
@@ -7536,6 +7578,9 @@ export const UserProfileRedis = {
7536
7578
  if (message.metadata !== "") {
7537
7579
  obj.metadata = message.metadata;
7538
7580
  }
7581
+ if (message.is_disabled !== false) {
7582
+ obj.is_disabled = message.is_disabled;
7583
+ }
7539
7584
  return obj;
7540
7585
  },
7541
7586
  create(base) {
@@ -7553,6 +7598,7 @@ export const UserProfileRedis = {
7553
7598
  message.fcm_tokens = object.fcm_tokens?.map((e) => FCMTokens.fromPartial(e)) || [];
7554
7599
  message.online = object.online ?? false;
7555
7600
  message.metadata = object.metadata ?? "";
7601
+ message.is_disabled = object.is_disabled ?? false;
7556
7602
  return message;
7557
7603
  },
7558
7604
  };
@@ -8505,21 +8551,18 @@ export const JoinPTTChannel = {
8505
8551
  },
8506
8552
  };
8507
8553
  function createBaseTalkPTTChannel() {
8508
- return { channel_id: "", data_type: 0, json_data: "", state: 0 };
8554
+ return { user_id: "", channel_id: "", isTalk: false };
8509
8555
  }
8510
8556
  export const TalkPTTChannel = {
8511
8557
  encode(message, writer = _m0.Writer.create()) {
8512
- if (message.channel_id !== "") {
8513
- writer.uint32(10).string(message.channel_id);
8514
- }
8515
- if (message.data_type !== 0) {
8516
- writer.uint32(16).int32(message.data_type);
8558
+ if (message.user_id !== "") {
8559
+ writer.uint32(10).string(message.user_id);
8517
8560
  }
8518
- if (message.json_data !== "") {
8519
- writer.uint32(26).string(message.json_data);
8561
+ if (message.channel_id !== "") {
8562
+ writer.uint32(18).string(message.channel_id);
8520
8563
  }
8521
- if (message.state !== 0) {
8522
- writer.uint32(32).int32(message.state);
8564
+ if (message.isTalk !== false) {
8565
+ writer.uint32(24).bool(message.isTalk);
8523
8566
  }
8524
8567
  return writer;
8525
8568
  },
@@ -8534,25 +8577,19 @@ export const TalkPTTChannel = {
8534
8577
  if (tag !== 10) {
8535
8578
  break;
8536
8579
  }
8537
- message.channel_id = reader.string();
8580
+ message.user_id = reader.string();
8538
8581
  continue;
8539
8582
  case 2:
8540
- if (tag !== 16) {
8583
+ if (tag !== 18) {
8541
8584
  break;
8542
8585
  }
8543
- message.data_type = reader.int32();
8586
+ message.channel_id = reader.string();
8544
8587
  continue;
8545
8588
  case 3:
8546
- if (tag !== 26) {
8547
- break;
8548
- }
8549
- message.json_data = reader.string();
8550
- continue;
8551
- case 4:
8552
- if (tag !== 32) {
8589
+ if (tag !== 24) {
8553
8590
  break;
8554
8591
  }
8555
- message.state = reader.int32();
8592
+ message.isTalk = reader.bool();
8556
8593
  continue;
8557
8594
  }
8558
8595
  if ((tag & 7) === 4 || tag === 0) {
@@ -8564,25 +8601,21 @@ export const TalkPTTChannel = {
8564
8601
  },
8565
8602
  fromJSON(object) {
8566
8603
  return {
8604
+ user_id: isSet(object.user_id) ? globalThis.String(object.user_id) : "",
8567
8605
  channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
8568
- data_type: isSet(object.data_type) ? globalThis.Number(object.data_type) : 0,
8569
- json_data: isSet(object.json_data) ? globalThis.String(object.json_data) : "",
8570
- state: isSet(object.state) ? globalThis.Number(object.state) : 0,
8606
+ isTalk: isSet(object.isTalk) ? globalThis.Boolean(object.isTalk) : false,
8571
8607
  };
8572
8608
  },
8573
8609
  toJSON(message) {
8574
8610
  const obj = {};
8611
+ if (message.user_id !== "") {
8612
+ obj.user_id = message.user_id;
8613
+ }
8575
8614
  if (message.channel_id !== "") {
8576
8615
  obj.channel_id = message.channel_id;
8577
8616
  }
8578
- if (message.data_type !== 0) {
8579
- obj.data_type = Math.round(message.data_type);
8580
- }
8581
- if (message.json_data !== "") {
8582
- obj.json_data = message.json_data;
8583
- }
8584
- if (message.state !== 0) {
8585
- obj.state = Math.round(message.state);
8617
+ if (message.isTalk !== false) {
8618
+ obj.isTalk = message.isTalk;
8586
8619
  }
8587
8620
  return obj;
8588
8621
  },
@@ -8591,10 +8624,9 @@ export const TalkPTTChannel = {
8591
8624
  },
8592
8625
  fromPartial(object) {
8593
8626
  const message = createBaseTalkPTTChannel();
8627
+ message.user_id = object.user_id ?? "";
8594
8628
  message.channel_id = object.channel_id ?? "";
8595
- message.data_type = object.data_type ?? 0;
8596
- message.json_data = object.json_data ?? "";
8597
- message.state = object.state ?? 0;
8629
+ message.isTalk = object.isTalk ?? false;
8598
8630
  return message;
8599
8631
  },
8600
8632
  };
@@ -9002,6 +9034,100 @@ export const PTTJoinedEvent = {
9002
9034
  return message;
9003
9035
  },
9004
9036
  };
9037
+ function createBaseSdTopicEvent() {
9038
+ return { id: "", clan_id: "", channel_id: "", message_id: "" };
9039
+ }
9040
+ export const SdTopicEvent = {
9041
+ encode(message, writer = _m0.Writer.create()) {
9042
+ if (message.id !== "") {
9043
+ writer.uint32(10).string(message.id);
9044
+ }
9045
+ if (message.clan_id !== "") {
9046
+ writer.uint32(18).string(message.clan_id);
9047
+ }
9048
+ if (message.channel_id !== "") {
9049
+ writer.uint32(26).string(message.channel_id);
9050
+ }
9051
+ if (message.message_id !== "") {
9052
+ writer.uint32(34).string(message.message_id);
9053
+ }
9054
+ return writer;
9055
+ },
9056
+ decode(input, length) {
9057
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
9058
+ let end = length === undefined ? reader.len : reader.pos + length;
9059
+ const message = createBaseSdTopicEvent();
9060
+ while (reader.pos < end) {
9061
+ const tag = reader.uint32();
9062
+ switch (tag >>> 3) {
9063
+ case 1:
9064
+ if (tag !== 10) {
9065
+ break;
9066
+ }
9067
+ message.id = reader.string();
9068
+ continue;
9069
+ case 2:
9070
+ if (tag !== 18) {
9071
+ break;
9072
+ }
9073
+ message.clan_id = reader.string();
9074
+ continue;
9075
+ case 3:
9076
+ if (tag !== 26) {
9077
+ break;
9078
+ }
9079
+ message.channel_id = reader.string();
9080
+ continue;
9081
+ case 4:
9082
+ if (tag !== 34) {
9083
+ break;
9084
+ }
9085
+ message.message_id = reader.string();
9086
+ continue;
9087
+ }
9088
+ if ((tag & 7) === 4 || tag === 0) {
9089
+ break;
9090
+ }
9091
+ reader.skipType(tag & 7);
9092
+ }
9093
+ return message;
9094
+ },
9095
+ fromJSON(object) {
9096
+ return {
9097
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
9098
+ clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
9099
+ channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
9100
+ message_id: isSet(object.message_id) ? globalThis.String(object.message_id) : "",
9101
+ };
9102
+ },
9103
+ toJSON(message) {
9104
+ const obj = {};
9105
+ if (message.id !== "") {
9106
+ obj.id = message.id;
9107
+ }
9108
+ if (message.clan_id !== "") {
9109
+ obj.clan_id = message.clan_id;
9110
+ }
9111
+ if (message.channel_id !== "") {
9112
+ obj.channel_id = message.channel_id;
9113
+ }
9114
+ if (message.message_id !== "") {
9115
+ obj.message_id = message.message_id;
9116
+ }
9117
+ return obj;
9118
+ },
9119
+ create(base) {
9120
+ return SdTopicEvent.fromPartial(base ?? {});
9121
+ },
9122
+ fromPartial(object) {
9123
+ const message = createBaseSdTopicEvent();
9124
+ message.id = object.id ?? "";
9125
+ message.clan_id = object.clan_id ?? "";
9126
+ message.channel_id = object.channel_id ?? "";
9127
+ message.message_id = object.message_id ?? "";
9128
+ return message;
9129
+ },
9130
+ };
9005
9131
  function toTimestamp(date) {
9006
9132
  const seconds = Math.trunc(date.getTime() / 1_000);
9007
9133
  const nanos = (date.getTime() % 1_000) * 1_000_000;