mezon-js-protobuf 1.8.27 → 1.8.29

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
@@ -969,11 +969,11 @@ export interface ListChannelAttachmentRequest {
969
969
  | number
970
970
  | undefined;
971
971
  /** An optional previous id for page. */
972
- before: string;
972
+ before: number;
973
973
  /** An optional next id for page. */
974
- after: string;
974
+ after: number;
975
975
  /** An optional around id for page. */
976
- around: string;
976
+ around: number;
977
977
  }
978
978
 
979
979
  /** List all users that are part of a clan. */
@@ -1147,7 +1147,9 @@ export interface UpdateAccountRequest {
1147
1147
  | Date
1148
1148
  | undefined;
1149
1149
  /** logo url */
1150
- logo: string;
1150
+ logo:
1151
+ | string
1152
+ | undefined;
1151
1153
  /** splash screen */
1152
1154
  splash_screen: string;
1153
1155
  /** e2ee encrypt private key */
@@ -1428,6 +1430,8 @@ export interface UpdateClanDescRequest {
1428
1430
  description: string;
1429
1431
  /** about */
1430
1432
  about: string;
1433
+ /** short url for community */
1434
+ short_url: string | undefined;
1431
1435
  }
1432
1436
 
1433
1437
  /** Delete a clan the user has access to. */
@@ -2558,6 +2562,7 @@ export interface Webhook {
2558
2562
  update_time: string;
2559
2563
  avatar: string;
2560
2564
  status: number;
2565
+ clan_id: string;
2561
2566
  }
2562
2567
 
2563
2568
  export interface WebhookCreateRequest {
@@ -3697,6 +3702,12 @@ export interface GenerateMeetTokenRequest {
3697
3702
  room_name: string;
3698
3703
  }
3699
3704
 
3705
+ export interface MeetParticipantRequest {
3706
+ username: string;
3707
+ room_name: string;
3708
+ clan_id: string;
3709
+ }
3710
+
3700
3711
  export interface GenerateMeetTokenResponse {
3701
3712
  token: string;
3702
3713
  }
@@ -3870,6 +3881,11 @@ export interface IsFollowerResponse {
3870
3881
  is_follower: boolean;
3871
3882
  }
3872
3883
 
3884
+ export interface TransferOwnershipRequest {
3885
+ clan_id: string;
3886
+ new_owner_id: string;
3887
+ }
3888
+
3873
3889
  function createBaseAccount(): Account {
3874
3890
  return {
3875
3891
  user: undefined,
@@ -9565,9 +9581,9 @@ function createBaseListChannelAttachmentRequest(): ListChannelAttachmentRequest
9565
9581
  file_type: "",
9566
9582
  limit: undefined,
9567
9583
  state: undefined,
9568
- before: "",
9569
- after: "",
9570
- around: "",
9584
+ before: 0,
9585
+ after: 0,
9586
+ around: 0,
9571
9587
  };
9572
9588
  }
9573
9589
 
@@ -9588,14 +9604,14 @@ export const ListChannelAttachmentRequest = {
9588
9604
  if (message.state !== undefined) {
9589
9605
  Int32Value.encode({ value: message.state! }, writer.uint32(42).fork()).ldelim();
9590
9606
  }
9591
- if (message.before !== "") {
9592
- writer.uint32(50).string(message.before);
9607
+ if (message.before !== 0) {
9608
+ writer.uint32(48).uint32(message.before);
9593
9609
  }
9594
- if (message.after !== "") {
9595
- writer.uint32(58).string(message.after);
9610
+ if (message.after !== 0) {
9611
+ writer.uint32(56).uint32(message.after);
9596
9612
  }
9597
- if (message.around !== "") {
9598
- writer.uint32(66).string(message.around);
9613
+ if (message.around !== 0) {
9614
+ writer.uint32(64).uint32(message.around);
9599
9615
  }
9600
9616
  return writer;
9601
9617
  },
@@ -9643,25 +9659,25 @@ export const ListChannelAttachmentRequest = {
9643
9659
  message.state = Int32Value.decode(reader, reader.uint32()).value;
9644
9660
  continue;
9645
9661
  case 6:
9646
- if (tag !== 50) {
9662
+ if (tag !== 48) {
9647
9663
  break;
9648
9664
  }
9649
9665
 
9650
- message.before = reader.string();
9666
+ message.before = reader.uint32();
9651
9667
  continue;
9652
9668
  case 7:
9653
- if (tag !== 58) {
9669
+ if (tag !== 56) {
9654
9670
  break;
9655
9671
  }
9656
9672
 
9657
- message.after = reader.string();
9673
+ message.after = reader.uint32();
9658
9674
  continue;
9659
9675
  case 8:
9660
- if (tag !== 66) {
9676
+ if (tag !== 64) {
9661
9677
  break;
9662
9678
  }
9663
9679
 
9664
- message.around = reader.string();
9680
+ message.around = reader.uint32();
9665
9681
  continue;
9666
9682
  }
9667
9683
  if ((tag & 7) === 4 || tag === 0) {
@@ -9679,9 +9695,9 @@ export const ListChannelAttachmentRequest = {
9679
9695
  file_type: isSet(object.file_type) ? globalThis.String(object.file_type) : "",
9680
9696
  limit: isSet(object.limit) ? Number(object.limit) : undefined,
9681
9697
  state: isSet(object.state) ? Number(object.state) : undefined,
9682
- before: isSet(object.before) ? globalThis.String(object.before) : "",
9683
- after: isSet(object.after) ? globalThis.String(object.after) : "",
9684
- around: isSet(object.around) ? globalThis.String(object.around) : "",
9698
+ before: isSet(object.before) ? globalThis.Number(object.before) : 0,
9699
+ after: isSet(object.after) ? globalThis.Number(object.after) : 0,
9700
+ around: isSet(object.around) ? globalThis.Number(object.around) : 0,
9685
9701
  };
9686
9702
  },
9687
9703
 
@@ -9702,14 +9718,14 @@ export const ListChannelAttachmentRequest = {
9702
9718
  if (message.state !== undefined) {
9703
9719
  obj.state = message.state;
9704
9720
  }
9705
- if (message.before !== "") {
9706
- obj.before = message.before;
9721
+ if (message.before !== 0) {
9722
+ obj.before = Math.round(message.before);
9707
9723
  }
9708
- if (message.after !== "") {
9709
- obj.after = message.after;
9724
+ if (message.after !== 0) {
9725
+ obj.after = Math.round(message.after);
9710
9726
  }
9711
- if (message.around !== "") {
9712
- obj.around = message.around;
9727
+ if (message.around !== 0) {
9728
+ obj.around = Math.round(message.around);
9713
9729
  }
9714
9730
  return obj;
9715
9731
  },
@@ -9724,9 +9740,9 @@ export const ListChannelAttachmentRequest = {
9724
9740
  message.file_type = object.file_type ?? "";
9725
9741
  message.limit = object.limit ?? undefined;
9726
9742
  message.state = object.state ?? undefined;
9727
- message.before = object.before ?? "";
9728
- message.after = object.after ?? "";
9729
- message.around = object.around ?? "";
9743
+ message.before = object.before ?? 0;
9744
+ message.after = object.after ?? 0;
9745
+ message.around = object.around ?? 0;
9730
9746
  return message;
9731
9747
  },
9732
9748
  };
@@ -10874,7 +10890,7 @@ function createBaseUpdateAccountRequest(): UpdateAccountRequest {
10874
10890
  timezone: undefined,
10875
10891
  about_me: "",
10876
10892
  dob: undefined,
10877
- logo: "",
10893
+ logo: undefined,
10878
10894
  splash_screen: "",
10879
10895
  encrypt_private_key: "",
10880
10896
  };
@@ -10906,8 +10922,8 @@ export const UpdateAccountRequest = {
10906
10922
  if (message.dob !== undefined) {
10907
10923
  Timestamp.encode(toTimestamp(message.dob), writer.uint32(66).fork()).ldelim();
10908
10924
  }
10909
- if (message.logo !== "") {
10910
- writer.uint32(74).string(message.logo);
10925
+ if (message.logo !== undefined) {
10926
+ StringValue.encode({ value: message.logo! }, writer.uint32(74).fork()).ldelim();
10911
10927
  }
10912
10928
  if (message.splash_screen !== "") {
10913
10929
  writer.uint32(82).string(message.splash_screen);
@@ -10986,7 +11002,7 @@ export const UpdateAccountRequest = {
10986
11002
  break;
10987
11003
  }
10988
11004
 
10989
- message.logo = reader.string();
11005
+ message.logo = StringValue.decode(reader, reader.uint32()).value;
10990
11006
  continue;
10991
11007
  case 10:
10992
11008
  if (tag !== 82) {
@@ -11021,7 +11037,7 @@ export const UpdateAccountRequest = {
11021
11037
  timezone: isSet(object.timezone) ? String(object.timezone) : undefined,
11022
11038
  about_me: isSet(object.about_me) ? globalThis.String(object.about_me) : "",
11023
11039
  dob: isSet(object.dob) ? fromJsonTimestamp(object.dob) : undefined,
11024
- logo: isSet(object.logo) ? globalThis.String(object.logo) : "",
11040
+ logo: isSet(object.logo) ? String(object.logo) : undefined,
11025
11041
  splash_screen: isSet(object.splash_screen) ? globalThis.String(object.splash_screen) : "",
11026
11042
  encrypt_private_key: isSet(object.encrypt_private_key) ? globalThis.String(object.encrypt_private_key) : "",
11027
11043
  };
@@ -11053,7 +11069,7 @@ export const UpdateAccountRequest = {
11053
11069
  if (message.dob !== undefined) {
11054
11070
  obj.dob = message.dob.toISOString();
11055
11071
  }
11056
- if (message.logo !== "") {
11072
+ if (message.logo !== undefined) {
11057
11073
  obj.logo = message.logo;
11058
11074
  }
11059
11075
  if (message.splash_screen !== "") {
@@ -11078,7 +11094,7 @@ export const UpdateAccountRequest = {
11078
11094
  message.timezone = object.timezone ?? undefined;
11079
11095
  message.about_me = object.about_me ?? "";
11080
11096
  message.dob = object.dob ?? undefined;
11081
- message.logo = object.logo ?? "";
11097
+ message.logo = object.logo ?? undefined;
11082
11098
  message.splash_screen = object.splash_screen ?? "";
11083
11099
  message.encrypt_private_key = object.encrypt_private_key ?? "";
11084
11100
  return message;
@@ -12603,6 +12619,7 @@ function createBaseUpdateClanDescRequest(): UpdateClanDescRequest {
12603
12619
  community_banner: undefined,
12604
12620
  description: "",
12605
12621
  about: "",
12622
+ short_url: undefined,
12606
12623
  };
12607
12624
  }
12608
12625
 
@@ -12644,6 +12661,9 @@ export const UpdateClanDescRequest = {
12644
12661
  if (message.about !== "") {
12645
12662
  writer.uint32(98).string(message.about);
12646
12663
  }
12664
+ if (message.short_url !== undefined) {
12665
+ StringValue.encode({ value: message.short_url! }, writer.uint32(106).fork()).ldelim();
12666
+ }
12647
12667
  return writer;
12648
12668
  },
12649
12669
 
@@ -12738,6 +12758,13 @@ export const UpdateClanDescRequest = {
12738
12758
 
12739
12759
  message.about = reader.string();
12740
12760
  continue;
12761
+ case 13:
12762
+ if (tag !== 106) {
12763
+ break;
12764
+ }
12765
+
12766
+ message.short_url = StringValue.decode(reader, reader.uint32()).value;
12767
+ continue;
12741
12768
  }
12742
12769
  if ((tag & 7) === 4 || tag === 0) {
12743
12770
  break;
@@ -12761,6 +12788,7 @@ export const UpdateClanDescRequest = {
12761
12788
  community_banner: isSet(object.community_banner) ? String(object.community_banner) : undefined,
12762
12789
  description: isSet(object.description) ? globalThis.String(object.description) : "",
12763
12790
  about: isSet(object.about) ? globalThis.String(object.about) : "",
12791
+ short_url: isSet(object.short_url) ? String(object.short_url) : undefined,
12764
12792
  };
12765
12793
  },
12766
12794
 
@@ -12802,6 +12830,9 @@ export const UpdateClanDescRequest = {
12802
12830
  if (message.about !== "") {
12803
12831
  obj.about = message.about;
12804
12832
  }
12833
+ if (message.short_url !== undefined) {
12834
+ obj.short_url = message.short_url;
12835
+ }
12805
12836
  return obj;
12806
12837
  },
12807
12838
 
@@ -12822,6 +12853,7 @@ export const UpdateClanDescRequest = {
12822
12853
  message.community_banner = object.community_banner ?? undefined;
12823
12854
  message.description = object.description ?? "";
12824
12855
  message.about = object.about ?? "";
12856
+ message.short_url = object.short_url ?? undefined;
12825
12857
  return message;
12826
12858
  },
12827
12859
  };
@@ -24012,6 +24044,7 @@ function createBaseWebhook(): Webhook {
24012
24044
  update_time: "",
24013
24045
  avatar: "",
24014
24046
  status: 0,
24047
+ clan_id: "",
24015
24048
  };
24016
24049
  }
24017
24050
 
@@ -24047,6 +24080,9 @@ export const Webhook = {
24047
24080
  if (message.status !== 0) {
24048
24081
  writer.uint32(80).int32(message.status);
24049
24082
  }
24083
+ if (message.clan_id !== "") {
24084
+ writer.uint32(90).string(message.clan_id);
24085
+ }
24050
24086
  return writer;
24051
24087
  },
24052
24088
 
@@ -24127,6 +24163,13 @@ export const Webhook = {
24127
24163
 
24128
24164
  message.status = reader.int32();
24129
24165
  continue;
24166
+ case 11:
24167
+ if (tag !== 90) {
24168
+ break;
24169
+ }
24170
+
24171
+ message.clan_id = reader.string();
24172
+ continue;
24130
24173
  }
24131
24174
  if ((tag & 7) === 4 || tag === 0) {
24132
24175
  break;
@@ -24148,6 +24191,7 @@ export const Webhook = {
24148
24191
  update_time: isSet(object.update_time) ? globalThis.String(object.update_time) : "",
24149
24192
  avatar: isSet(object.avatar) ? globalThis.String(object.avatar) : "",
24150
24193
  status: isSet(object.status) ? globalThis.Number(object.status) : 0,
24194
+ clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
24151
24195
  };
24152
24196
  },
24153
24197
 
@@ -24183,6 +24227,9 @@ export const Webhook = {
24183
24227
  if (message.status !== 0) {
24184
24228
  obj.status = Math.round(message.status);
24185
24229
  }
24230
+ if (message.clan_id !== "") {
24231
+ obj.clan_id = message.clan_id;
24232
+ }
24186
24233
  return obj;
24187
24234
  },
24188
24235
 
@@ -24201,6 +24248,7 @@ export const Webhook = {
24201
24248
  message.update_time = object.update_time ?? "";
24202
24249
  message.avatar = object.avatar ?? "";
24203
24250
  message.status = object.status ?? 0;
24251
+ message.clan_id = object.clan_id ?? "";
24204
24252
  return message;
24205
24253
  },
24206
24254
  };
@@ -36007,6 +36055,95 @@ export const GenerateMeetTokenRequest = {
36007
36055
  },
36008
36056
  };
36009
36057
 
36058
+ function createBaseMeetParticipantRequest(): MeetParticipantRequest {
36059
+ return { username: "", room_name: "", clan_id: "" };
36060
+ }
36061
+
36062
+ export const MeetParticipantRequest = {
36063
+ encode(message: MeetParticipantRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
36064
+ if (message.username !== "") {
36065
+ writer.uint32(10).string(message.username);
36066
+ }
36067
+ if (message.room_name !== "") {
36068
+ writer.uint32(18).string(message.room_name);
36069
+ }
36070
+ if (message.clan_id !== "") {
36071
+ writer.uint32(26).string(message.clan_id);
36072
+ }
36073
+ return writer;
36074
+ },
36075
+
36076
+ decode(input: _m0.Reader | Uint8Array, length?: number): MeetParticipantRequest {
36077
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
36078
+ let end = length === undefined ? reader.len : reader.pos + length;
36079
+ const message = createBaseMeetParticipantRequest();
36080
+ while (reader.pos < end) {
36081
+ const tag = reader.uint32();
36082
+ switch (tag >>> 3) {
36083
+ case 1:
36084
+ if (tag !== 10) {
36085
+ break;
36086
+ }
36087
+
36088
+ message.username = reader.string();
36089
+ continue;
36090
+ case 2:
36091
+ if (tag !== 18) {
36092
+ break;
36093
+ }
36094
+
36095
+ message.room_name = reader.string();
36096
+ continue;
36097
+ case 3:
36098
+ if (tag !== 26) {
36099
+ break;
36100
+ }
36101
+
36102
+ message.clan_id = reader.string();
36103
+ continue;
36104
+ }
36105
+ if ((tag & 7) === 4 || tag === 0) {
36106
+ break;
36107
+ }
36108
+ reader.skipType(tag & 7);
36109
+ }
36110
+ return message;
36111
+ },
36112
+
36113
+ fromJSON(object: any): MeetParticipantRequest {
36114
+ return {
36115
+ username: isSet(object.username) ? globalThis.String(object.username) : "",
36116
+ room_name: isSet(object.room_name) ? globalThis.String(object.room_name) : "",
36117
+ clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
36118
+ };
36119
+ },
36120
+
36121
+ toJSON(message: MeetParticipantRequest): unknown {
36122
+ const obj: any = {};
36123
+ if (message.username !== "") {
36124
+ obj.username = message.username;
36125
+ }
36126
+ if (message.room_name !== "") {
36127
+ obj.room_name = message.room_name;
36128
+ }
36129
+ if (message.clan_id !== "") {
36130
+ obj.clan_id = message.clan_id;
36131
+ }
36132
+ return obj;
36133
+ },
36134
+
36135
+ create<I extends Exact<DeepPartial<MeetParticipantRequest>, I>>(base?: I): MeetParticipantRequest {
36136
+ return MeetParticipantRequest.fromPartial(base ?? ({} as any));
36137
+ },
36138
+ fromPartial<I extends Exact<DeepPartial<MeetParticipantRequest>, I>>(object: I): MeetParticipantRequest {
36139
+ const message = createBaseMeetParticipantRequest();
36140
+ message.username = object.username ?? "";
36141
+ message.room_name = object.room_name ?? "";
36142
+ message.clan_id = object.clan_id ?? "";
36143
+ return message;
36144
+ },
36145
+ };
36146
+
36010
36147
  function createBaseGenerateMeetTokenResponse(): GenerateMeetTokenResponse {
36011
36148
  return { token: "" };
36012
36149
  }
@@ -38641,6 +38778,80 @@ export const IsFollowerResponse = {
38641
38778
  },
38642
38779
  };
38643
38780
 
38781
+ function createBaseTransferOwnershipRequest(): TransferOwnershipRequest {
38782
+ return { clan_id: "", new_owner_id: "" };
38783
+ }
38784
+
38785
+ export const TransferOwnershipRequest = {
38786
+ encode(message: TransferOwnershipRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
38787
+ if (message.clan_id !== "") {
38788
+ writer.uint32(10).string(message.clan_id);
38789
+ }
38790
+ if (message.new_owner_id !== "") {
38791
+ writer.uint32(18).string(message.new_owner_id);
38792
+ }
38793
+ return writer;
38794
+ },
38795
+
38796
+ decode(input: _m0.Reader | Uint8Array, length?: number): TransferOwnershipRequest {
38797
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
38798
+ let end = length === undefined ? reader.len : reader.pos + length;
38799
+ const message = createBaseTransferOwnershipRequest();
38800
+ while (reader.pos < end) {
38801
+ const tag = reader.uint32();
38802
+ switch (tag >>> 3) {
38803
+ case 1:
38804
+ if (tag !== 10) {
38805
+ break;
38806
+ }
38807
+
38808
+ message.clan_id = reader.string();
38809
+ continue;
38810
+ case 2:
38811
+ if (tag !== 18) {
38812
+ break;
38813
+ }
38814
+
38815
+ message.new_owner_id = reader.string();
38816
+ continue;
38817
+ }
38818
+ if ((tag & 7) === 4 || tag === 0) {
38819
+ break;
38820
+ }
38821
+ reader.skipType(tag & 7);
38822
+ }
38823
+ return message;
38824
+ },
38825
+
38826
+ fromJSON(object: any): TransferOwnershipRequest {
38827
+ return {
38828
+ clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
38829
+ new_owner_id: isSet(object.new_owner_id) ? globalThis.String(object.new_owner_id) : "",
38830
+ };
38831
+ },
38832
+
38833
+ toJSON(message: TransferOwnershipRequest): unknown {
38834
+ const obj: any = {};
38835
+ if (message.clan_id !== "") {
38836
+ obj.clan_id = message.clan_id;
38837
+ }
38838
+ if (message.new_owner_id !== "") {
38839
+ obj.new_owner_id = message.new_owner_id;
38840
+ }
38841
+ return obj;
38842
+ },
38843
+
38844
+ create<I extends Exact<DeepPartial<TransferOwnershipRequest>, I>>(base?: I): TransferOwnershipRequest {
38845
+ return TransferOwnershipRequest.fromPartial(base ?? ({} as any));
38846
+ },
38847
+ fromPartial<I extends Exact<DeepPartial<TransferOwnershipRequest>, I>>(object: I): TransferOwnershipRequest {
38848
+ const message = createBaseTransferOwnershipRequest();
38849
+ message.clan_id = object.clan_id ?? "";
38850
+ message.new_owner_id = object.new_owner_id ?? "";
38851
+ return message;
38852
+ },
38853
+ };
38854
+
38644
38855
  function bytesFromBase64(b64: string): Uint8Array {
38645
38856
  if ((globalThis as any).Buffer) {
38646
38857
  return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));