mezon-js-protobuf 1.8.79 → 1.8.80

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/api.ts CHANGED
@@ -1615,9 +1615,7 @@ export interface CreateChannelDescRequest {
1615
1615
  /** The category of channel */
1616
1616
  category_id: string;
1617
1617
  /** The channel type. */
1618
- type:
1619
- | number
1620
- | undefined;
1618
+ type: number;
1621
1619
  /** The channel lable */
1622
1620
  channel_label: string;
1623
1621
  /** The channel private */
@@ -1841,7 +1839,7 @@ export interface PinMessage {
1841
1839
  /** The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was created. */
1842
1840
  create_time_seconds: number;
1843
1841
  /** attachment */
1844
- attachment: string;
1842
+ attachment: Uint8Array;
1845
1843
  }
1846
1844
 
1847
1845
  export interface PinMessagesList {
@@ -3478,7 +3476,7 @@ export interface SdTopic {
3478
3476
  status: number;
3479
3477
  create_time_seconds: number;
3480
3478
  update_time_seconds: number;
3481
- message: ChannelMessage | undefined;
3479
+ content: string;
3482
3480
  last_sent_message: ChannelMessageHeader | undefined;
3483
3481
  }
3484
3482
 
@@ -15660,7 +15658,7 @@ function createBaseCreateChannelDescRequest(): CreateChannelDescRequest {
15660
15658
  parent_id: "",
15661
15659
  channel_id: "",
15662
15660
  category_id: "",
15663
- type: undefined,
15661
+ type: 0,
15664
15662
  channel_label: "",
15665
15663
  channel_private: 0,
15666
15664
  user_ids: [],
@@ -15682,8 +15680,8 @@ export const CreateChannelDescRequest = {
15682
15680
  if (message.category_id !== "") {
15683
15681
  writer.uint32(34).string(message.category_id);
15684
15682
  }
15685
- if (message.type !== undefined) {
15686
- Int32Value.encode({ value: message.type! }, writer.uint32(42).fork()).ldelim();
15683
+ if (message.type !== 0) {
15684
+ writer.uint32(40).int32(message.type);
15687
15685
  }
15688
15686
  if (message.channel_label !== "") {
15689
15687
  writer.uint32(50).string(message.channel_label);
@@ -15736,11 +15734,11 @@ export const CreateChannelDescRequest = {
15736
15734
  message.category_id = reader.string();
15737
15735
  continue;
15738
15736
  case 5:
15739
- if (tag !== 42) {
15737
+ if (tag !== 40) {
15740
15738
  break;
15741
15739
  }
15742
15740
 
15743
- message.type = Int32Value.decode(reader, reader.uint32()).value;
15741
+ message.type = reader.int32();
15744
15742
  continue;
15745
15743
  case 6:
15746
15744
  if (tag !== 50) {
@@ -15785,7 +15783,7 @@ export const CreateChannelDescRequest = {
15785
15783
  parent_id: isSet(object.parent_id) ? globalThis.String(object.parent_id) : "",
15786
15784
  channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
15787
15785
  category_id: isSet(object.category_id) ? globalThis.String(object.category_id) : "",
15788
- type: isSet(object.type) ? Number(object.type) : undefined,
15786
+ type: isSet(object.type) ? globalThis.Number(object.type) : 0,
15789
15787
  channel_label: isSet(object.channel_label) ? globalThis.String(object.channel_label) : "",
15790
15788
  channel_private: isSet(object.channel_private) ? globalThis.Number(object.channel_private) : 0,
15791
15789
  user_ids: globalThis.Array.isArray(object?.user_ids) ? object.user_ids.map((e: any) => globalThis.String(e)) : [],
@@ -15807,8 +15805,8 @@ export const CreateChannelDescRequest = {
15807
15805
  if (message.category_id !== "") {
15808
15806
  obj.category_id = message.category_id;
15809
15807
  }
15810
- if (message.type !== undefined) {
15811
- obj.type = message.type;
15808
+ if (message.type !== 0) {
15809
+ obj.type = Math.round(message.type);
15812
15810
  }
15813
15811
  if (message.channel_label !== "") {
15814
15812
  obj.channel_label = message.channel_label;
@@ -15834,7 +15832,7 @@ export const CreateChannelDescRequest = {
15834
15832
  message.parent_id = object.parent_id ?? "";
15835
15833
  message.channel_id = object.channel_id ?? "";
15836
15834
  message.category_id = object.category_id ?? "";
15837
- message.type = object.type ?? undefined;
15835
+ message.type = object.type ?? 0;
15838
15836
  message.channel_label = object.channel_label ?? "";
15839
15837
  message.channel_private = object.channel_private ?? 0;
15840
15838
  message.user_ids = object.user_ids?.map((e) => e) || [];
@@ -17923,7 +17921,7 @@ function createBasePinMessage(): PinMessage {
17923
17921
  username: "",
17924
17922
  avatar: "",
17925
17923
  create_time_seconds: 0,
17926
- attachment: "",
17924
+ attachment: new Uint8Array(0),
17927
17925
  };
17928
17926
  }
17929
17927
 
@@ -17953,8 +17951,8 @@ export const PinMessage = {
17953
17951
  if (message.create_time_seconds !== 0) {
17954
17952
  writer.uint32(64).uint32(message.create_time_seconds);
17955
17953
  }
17956
- if (message.attachment !== "") {
17957
- writer.uint32(74).string(message.attachment);
17954
+ if (message.attachment.length !== 0) {
17955
+ writer.uint32(74).bytes(message.attachment);
17958
17956
  }
17959
17957
  return writer;
17960
17958
  },
@@ -18027,7 +18025,7 @@ export const PinMessage = {
18027
18025
  break;
18028
18026
  }
18029
18027
 
18030
- message.attachment = reader.string();
18028
+ message.attachment = reader.bytes();
18031
18029
  continue;
18032
18030
  }
18033
18031
  if ((tag & 7) === 4 || tag === 0) {
@@ -18048,7 +18046,7 @@ export const PinMessage = {
18048
18046
  username: isSet(object.username) ? globalThis.String(object.username) : "",
18049
18047
  avatar: isSet(object.avatar) ? globalThis.String(object.avatar) : "",
18050
18048
  create_time_seconds: isSet(object.create_time_seconds) ? globalThis.Number(object.create_time_seconds) : 0,
18051
- attachment: isSet(object.attachment) ? globalThis.String(object.attachment) : "",
18049
+ attachment: isSet(object.attachment) ? bytesFromBase64(object.attachment) : new Uint8Array(0),
18052
18050
  };
18053
18051
  },
18054
18052
 
@@ -18078,8 +18076,8 @@ export const PinMessage = {
18078
18076
  if (message.create_time_seconds !== 0) {
18079
18077
  obj.create_time_seconds = Math.round(message.create_time_seconds);
18080
18078
  }
18081
- if (message.attachment !== "") {
18082
- obj.attachment = message.attachment;
18079
+ if (message.attachment.length !== 0) {
18080
+ obj.attachment = base64FromBytes(message.attachment);
18083
18081
  }
18084
18082
  return obj;
18085
18083
  },
@@ -18097,7 +18095,7 @@ export const PinMessage = {
18097
18095
  message.username = object.username ?? "";
18098
18096
  message.avatar = object.avatar ?? "";
18099
18097
  message.create_time_seconds = object.create_time_seconds ?? 0;
18100
- message.attachment = object.attachment ?? "";
18098
+ message.attachment = object.attachment ?? new Uint8Array(0);
18101
18099
  return message;
18102
18100
  },
18103
18101
  };
@@ -35085,7 +35083,7 @@ function createBaseSdTopic(): SdTopic {
35085
35083
  status: 0,
35086
35084
  create_time_seconds: 0,
35087
35085
  update_time_seconds: 0,
35088
- message: undefined,
35086
+ content: "",
35089
35087
  last_sent_message: undefined,
35090
35088
  };
35091
35089
  }
@@ -35116,8 +35114,8 @@ export const SdTopic = {
35116
35114
  if (message.update_time_seconds !== 0) {
35117
35115
  writer.uint32(64).uint32(message.update_time_seconds);
35118
35116
  }
35119
- if (message.message !== undefined) {
35120
- ChannelMessage.encode(message.message, writer.uint32(74).fork()).ldelim();
35117
+ if (message.content !== "") {
35118
+ writer.uint32(74).string(message.content);
35121
35119
  }
35122
35120
  if (message.last_sent_message !== undefined) {
35123
35121
  ChannelMessageHeader.encode(message.last_sent_message, writer.uint32(82).fork()).ldelim();
@@ -35193,7 +35191,7 @@ export const SdTopic = {
35193
35191
  break;
35194
35192
  }
35195
35193
 
35196
- message.message = ChannelMessage.decode(reader, reader.uint32());
35194
+ message.content = reader.string();
35197
35195
  continue;
35198
35196
  case 10:
35199
35197
  if (tag !== 82) {
@@ -35221,7 +35219,7 @@ export const SdTopic = {
35221
35219
  status: isSet(object.status) ? globalThis.Number(object.status) : 0,
35222
35220
  create_time_seconds: isSet(object.create_time_seconds) ? globalThis.Number(object.create_time_seconds) : 0,
35223
35221
  update_time_seconds: isSet(object.update_time_seconds) ? globalThis.Number(object.update_time_seconds) : 0,
35224
- message: isSet(object.message) ? ChannelMessage.fromJSON(object.message) : undefined,
35222
+ content: isSet(object.content) ? globalThis.String(object.content) : "",
35225
35223
  last_sent_message: isSet(object.last_sent_message)
35226
35224
  ? ChannelMessageHeader.fromJSON(object.last_sent_message)
35227
35225
  : undefined,
@@ -35254,8 +35252,8 @@ export const SdTopic = {
35254
35252
  if (message.update_time_seconds !== 0) {
35255
35253
  obj.update_time_seconds = Math.round(message.update_time_seconds);
35256
35254
  }
35257
- if (message.message !== undefined) {
35258
- obj.message = ChannelMessage.toJSON(message.message);
35255
+ if (message.content !== "") {
35256
+ obj.content = message.content;
35259
35257
  }
35260
35258
  if (message.last_sent_message !== undefined) {
35261
35259
  obj.last_sent_message = ChannelMessageHeader.toJSON(message.last_sent_message);
@@ -35276,9 +35274,7 @@ export const SdTopic = {
35276
35274
  message.status = object.status ?? 0;
35277
35275
  message.create_time_seconds = object.create_time_seconds ?? 0;
35278
35276
  message.update_time_seconds = object.update_time_seconds ?? 0;
35279
- message.message = (object.message !== undefined && object.message !== null)
35280
- ? ChannelMessage.fromPartial(object.message)
35281
- : undefined;
35277
+ message.content = object.content ?? "";
35282
35278
  message.last_sent_message = (object.last_sent_message !== undefined && object.last_sent_message !== null)
35283
35279
  ? ChannelMessageHeader.fromPartial(object.last_sent_message)
35284
35280
  : undefined;