mezon-js-protobuf 1.8.19 → 1.8.21

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
@@ -3799,16 +3799,6 @@ export interface AccountMezon_VarsEntry {
3799
3799
  value: string;
3800
3800
  }
3801
3801
 
3802
- export interface QuickMenuAccessRequest {
3803
- id: string;
3804
- bot_id: string;
3805
- clan_id: string;
3806
- channel_id: string;
3807
- menu_name: string;
3808
- background: string;
3809
- action_msg: string;
3810
- }
3811
-
3812
3802
  export interface QuickMenuAccess {
3813
3803
  id: string;
3814
3804
  bot_id: string;
@@ -3817,11 +3807,13 @@ export interface QuickMenuAccess {
3817
3807
  menu_name: string;
3818
3808
  background: string;
3819
3809
  action_msg: string;
3810
+ menu_type: number;
3820
3811
  }
3821
3812
 
3822
3813
  export interface ListQuickMenuAccessRequest {
3823
3814
  bot_id: string;
3824
3815
  channel_id: string;
3816
+ menu_type: number;
3825
3817
  }
3826
3818
 
3827
3819
  export interface QuickMenuAccessList {
@@ -3841,6 +3833,20 @@ export interface ForSaleItemList {
3841
3833
  for_sale_items: ForSaleItem[];
3842
3834
  }
3843
3835
 
3836
+ export interface ListChannelMemberRequest {
3837
+ channel_id: string;
3838
+ clan_id: string;
3839
+ }
3840
+
3841
+ export interface ChannelMemberDetail {
3842
+ member_id: string;
3843
+ added_by: string;
3844
+ }
3845
+
3846
+ export interface ChannelMemberList {
3847
+ channel_members: ChannelMemberDetail[];
3848
+ }
3849
+
3844
3850
  function createBaseAccount(): Account {
3845
3851
  return {
3846
3852
  user: undefined,
@@ -37808,157 +37814,17 @@ export const AccountMezon_VarsEntry = {
37808
37814
  },
37809
37815
  };
37810
37816
 
37811
- function createBaseQuickMenuAccessRequest(): QuickMenuAccessRequest {
37812
- return { id: "", bot_id: "", clan_id: "", channel_id: "", menu_name: "", background: "", action_msg: "" };
37813
- }
37814
-
37815
- export const QuickMenuAccessRequest = {
37816
- encode(message: QuickMenuAccessRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
37817
- if (message.id !== "") {
37818
- writer.uint32(10).string(message.id);
37819
- }
37820
- if (message.bot_id !== "") {
37821
- writer.uint32(18).string(message.bot_id);
37822
- }
37823
- if (message.clan_id !== "") {
37824
- writer.uint32(26).string(message.clan_id);
37825
- }
37826
- if (message.channel_id !== "") {
37827
- writer.uint32(34).string(message.channel_id);
37828
- }
37829
- if (message.menu_name !== "") {
37830
- writer.uint32(42).string(message.menu_name);
37831
- }
37832
- if (message.background !== "") {
37833
- writer.uint32(50).string(message.background);
37834
- }
37835
- if (message.action_msg !== "") {
37836
- writer.uint32(58).string(message.action_msg);
37837
- }
37838
- return writer;
37839
- },
37840
-
37841
- decode(input: _m0.Reader | Uint8Array, length?: number): QuickMenuAccessRequest {
37842
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
37843
- let end = length === undefined ? reader.len : reader.pos + length;
37844
- const message = createBaseQuickMenuAccessRequest();
37845
- while (reader.pos < end) {
37846
- const tag = reader.uint32();
37847
- switch (tag >>> 3) {
37848
- case 1:
37849
- if (tag !== 10) {
37850
- break;
37851
- }
37852
-
37853
- message.id = reader.string();
37854
- continue;
37855
- case 2:
37856
- if (tag !== 18) {
37857
- break;
37858
- }
37859
-
37860
- message.bot_id = reader.string();
37861
- continue;
37862
- case 3:
37863
- if (tag !== 26) {
37864
- break;
37865
- }
37866
-
37867
- message.clan_id = reader.string();
37868
- continue;
37869
- case 4:
37870
- if (tag !== 34) {
37871
- break;
37872
- }
37873
-
37874
- message.channel_id = reader.string();
37875
- continue;
37876
- case 5:
37877
- if (tag !== 42) {
37878
- break;
37879
- }
37880
-
37881
- message.menu_name = reader.string();
37882
- continue;
37883
- case 6:
37884
- if (tag !== 50) {
37885
- break;
37886
- }
37887
-
37888
- message.background = reader.string();
37889
- continue;
37890
- case 7:
37891
- if (tag !== 58) {
37892
- break;
37893
- }
37894
-
37895
- message.action_msg = reader.string();
37896
- continue;
37897
- }
37898
- if ((tag & 7) === 4 || tag === 0) {
37899
- break;
37900
- }
37901
- reader.skipType(tag & 7);
37902
- }
37903
- return message;
37904
- },
37905
-
37906
- fromJSON(object: any): QuickMenuAccessRequest {
37907
- return {
37908
- id: isSet(object.id) ? globalThis.String(object.id) : "",
37909
- bot_id: isSet(object.bot_id) ? globalThis.String(object.bot_id) : "",
37910
- clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
37911
- channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
37912
- menu_name: isSet(object.menu_name) ? globalThis.String(object.menu_name) : "",
37913
- background: isSet(object.background) ? globalThis.String(object.background) : "",
37914
- action_msg: isSet(object.action_msg) ? globalThis.String(object.action_msg) : "",
37915
- };
37916
- },
37917
-
37918
- toJSON(message: QuickMenuAccessRequest): unknown {
37919
- const obj: any = {};
37920
- if (message.id !== "") {
37921
- obj.id = message.id;
37922
- }
37923
- if (message.bot_id !== "") {
37924
- obj.bot_id = message.bot_id;
37925
- }
37926
- if (message.clan_id !== "") {
37927
- obj.clan_id = message.clan_id;
37928
- }
37929
- if (message.channel_id !== "") {
37930
- obj.channel_id = message.channel_id;
37931
- }
37932
- if (message.menu_name !== "") {
37933
- obj.menu_name = message.menu_name;
37934
- }
37935
- if (message.background !== "") {
37936
- obj.background = message.background;
37937
- }
37938
- if (message.action_msg !== "") {
37939
- obj.action_msg = message.action_msg;
37940
- }
37941
- return obj;
37942
- },
37943
-
37944
- create<I extends Exact<DeepPartial<QuickMenuAccessRequest>, I>>(base?: I): QuickMenuAccessRequest {
37945
- return QuickMenuAccessRequest.fromPartial(base ?? ({} as any));
37946
- },
37947
- fromPartial<I extends Exact<DeepPartial<QuickMenuAccessRequest>, I>>(object: I): QuickMenuAccessRequest {
37948
- const message = createBaseQuickMenuAccessRequest();
37949
- message.id = object.id ?? "";
37950
- message.bot_id = object.bot_id ?? "";
37951
- message.clan_id = object.clan_id ?? "";
37952
- message.channel_id = object.channel_id ?? "";
37953
- message.menu_name = object.menu_name ?? "";
37954
- message.background = object.background ?? "";
37955
- message.action_msg = object.action_msg ?? "";
37956
- return message;
37957
- },
37958
- };
37959
-
37960
37817
  function createBaseQuickMenuAccess(): QuickMenuAccess {
37961
- return { id: "", bot_id: "", clan_id: "", channel_id: "", menu_name: "", background: "", action_msg: "" };
37818
+ return {
37819
+ id: "",
37820
+ bot_id: "",
37821
+ clan_id: "",
37822
+ channel_id: "",
37823
+ menu_name: "",
37824
+ background: "",
37825
+ action_msg: "",
37826
+ menu_type: 0,
37827
+ };
37962
37828
  }
37963
37829
 
37964
37830
  export const QuickMenuAccess = {
@@ -37984,6 +37850,9 @@ export const QuickMenuAccess = {
37984
37850
  if (message.action_msg !== "") {
37985
37851
  writer.uint32(58).string(message.action_msg);
37986
37852
  }
37853
+ if (message.menu_type !== 0) {
37854
+ writer.uint32(64).int32(message.menu_type);
37855
+ }
37987
37856
  return writer;
37988
37857
  },
37989
37858
 
@@ -38043,6 +37912,13 @@ export const QuickMenuAccess = {
38043
37912
 
38044
37913
  message.action_msg = reader.string();
38045
37914
  continue;
37915
+ case 8:
37916
+ if (tag !== 64) {
37917
+ break;
37918
+ }
37919
+
37920
+ message.menu_type = reader.int32();
37921
+ continue;
38046
37922
  }
38047
37923
  if ((tag & 7) === 4 || tag === 0) {
38048
37924
  break;
@@ -38061,6 +37937,7 @@ export const QuickMenuAccess = {
38061
37937
  menu_name: isSet(object.menu_name) ? globalThis.String(object.menu_name) : "",
38062
37938
  background: isSet(object.background) ? globalThis.String(object.background) : "",
38063
37939
  action_msg: isSet(object.action_msg) ? globalThis.String(object.action_msg) : "",
37940
+ menu_type: isSet(object.menu_type) ? globalThis.Number(object.menu_type) : 0,
38064
37941
  };
38065
37942
  },
38066
37943
 
@@ -38087,6 +37964,9 @@ export const QuickMenuAccess = {
38087
37964
  if (message.action_msg !== "") {
38088
37965
  obj.action_msg = message.action_msg;
38089
37966
  }
37967
+ if (message.menu_type !== 0) {
37968
+ obj.menu_type = Math.round(message.menu_type);
37969
+ }
38090
37970
  return obj;
38091
37971
  },
38092
37972
 
@@ -38102,12 +37982,13 @@ export const QuickMenuAccess = {
38102
37982
  message.menu_name = object.menu_name ?? "";
38103
37983
  message.background = object.background ?? "";
38104
37984
  message.action_msg = object.action_msg ?? "";
37985
+ message.menu_type = object.menu_type ?? 0;
38105
37986
  return message;
38106
37987
  },
38107
37988
  };
38108
37989
 
38109
37990
  function createBaseListQuickMenuAccessRequest(): ListQuickMenuAccessRequest {
38110
- return { bot_id: "", channel_id: "" };
37991
+ return { bot_id: "", channel_id: "", menu_type: 0 };
38111
37992
  }
38112
37993
 
38113
37994
  export const ListQuickMenuAccessRequest = {
@@ -38118,6 +37999,9 @@ export const ListQuickMenuAccessRequest = {
38118
37999
  if (message.channel_id !== "") {
38119
38000
  writer.uint32(18).string(message.channel_id);
38120
38001
  }
38002
+ if (message.menu_type !== 0) {
38003
+ writer.uint32(24).int32(message.menu_type);
38004
+ }
38121
38005
  return writer;
38122
38006
  },
38123
38007
 
@@ -38142,6 +38026,13 @@ export const ListQuickMenuAccessRequest = {
38142
38026
 
38143
38027
  message.channel_id = reader.string();
38144
38028
  continue;
38029
+ case 3:
38030
+ if (tag !== 24) {
38031
+ break;
38032
+ }
38033
+
38034
+ message.menu_type = reader.int32();
38035
+ continue;
38145
38036
  }
38146
38037
  if ((tag & 7) === 4 || tag === 0) {
38147
38038
  break;
@@ -38155,6 +38046,7 @@ export const ListQuickMenuAccessRequest = {
38155
38046
  return {
38156
38047
  bot_id: isSet(object.bot_id) ? globalThis.String(object.bot_id) : "",
38157
38048
  channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
38049
+ menu_type: isSet(object.menu_type) ? globalThis.Number(object.menu_type) : 0,
38158
38050
  };
38159
38051
  },
38160
38052
 
@@ -38166,6 +38058,9 @@ export const ListQuickMenuAccessRequest = {
38166
38058
  if (message.channel_id !== "") {
38167
38059
  obj.channel_id = message.channel_id;
38168
38060
  }
38061
+ if (message.menu_type !== 0) {
38062
+ obj.menu_type = Math.round(message.menu_type);
38063
+ }
38169
38064
  return obj;
38170
38065
  },
38171
38066
 
@@ -38176,6 +38071,7 @@ export const ListQuickMenuAccessRequest = {
38176
38071
  const message = createBaseListQuickMenuAccessRequest();
38177
38072
  message.bot_id = object.bot_id ?? "";
38178
38073
  message.channel_id = object.channel_id ?? "";
38074
+ message.menu_type = object.menu_type ?? 0;
38179
38075
  return message;
38180
38076
  },
38181
38077
  };
@@ -38433,6 +38329,215 @@ export const ForSaleItemList = {
38433
38329
  },
38434
38330
  };
38435
38331
 
38332
+ function createBaseListChannelMemberRequest(): ListChannelMemberRequest {
38333
+ return { channel_id: "", clan_id: "" };
38334
+ }
38335
+
38336
+ export const ListChannelMemberRequest = {
38337
+ encode(message: ListChannelMemberRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
38338
+ if (message.channel_id !== "") {
38339
+ writer.uint32(10).string(message.channel_id);
38340
+ }
38341
+ if (message.clan_id !== "") {
38342
+ writer.uint32(18).string(message.clan_id);
38343
+ }
38344
+ return writer;
38345
+ },
38346
+
38347
+ decode(input: _m0.Reader | Uint8Array, length?: number): ListChannelMemberRequest {
38348
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
38349
+ let end = length === undefined ? reader.len : reader.pos + length;
38350
+ const message = createBaseListChannelMemberRequest();
38351
+ while (reader.pos < end) {
38352
+ const tag = reader.uint32();
38353
+ switch (tag >>> 3) {
38354
+ case 1:
38355
+ if (tag !== 10) {
38356
+ break;
38357
+ }
38358
+
38359
+ message.channel_id = reader.string();
38360
+ continue;
38361
+ case 2:
38362
+ if (tag !== 18) {
38363
+ break;
38364
+ }
38365
+
38366
+ message.clan_id = reader.string();
38367
+ continue;
38368
+ }
38369
+ if ((tag & 7) === 4 || tag === 0) {
38370
+ break;
38371
+ }
38372
+ reader.skipType(tag & 7);
38373
+ }
38374
+ return message;
38375
+ },
38376
+
38377
+ fromJSON(object: any): ListChannelMemberRequest {
38378
+ return {
38379
+ channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
38380
+ clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
38381
+ };
38382
+ },
38383
+
38384
+ toJSON(message: ListChannelMemberRequest): unknown {
38385
+ const obj: any = {};
38386
+ if (message.channel_id !== "") {
38387
+ obj.channel_id = message.channel_id;
38388
+ }
38389
+ if (message.clan_id !== "") {
38390
+ obj.clan_id = message.clan_id;
38391
+ }
38392
+ return obj;
38393
+ },
38394
+
38395
+ create<I extends Exact<DeepPartial<ListChannelMemberRequest>, I>>(base?: I): ListChannelMemberRequest {
38396
+ return ListChannelMemberRequest.fromPartial(base ?? ({} as any));
38397
+ },
38398
+ fromPartial<I extends Exact<DeepPartial<ListChannelMemberRequest>, I>>(object: I): ListChannelMemberRequest {
38399
+ const message = createBaseListChannelMemberRequest();
38400
+ message.channel_id = object.channel_id ?? "";
38401
+ message.clan_id = object.clan_id ?? "";
38402
+ return message;
38403
+ },
38404
+ };
38405
+
38406
+ function createBaseChannelMemberDetail(): ChannelMemberDetail {
38407
+ return { member_id: "", added_by: "" };
38408
+ }
38409
+
38410
+ export const ChannelMemberDetail = {
38411
+ encode(message: ChannelMemberDetail, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
38412
+ if (message.member_id !== "") {
38413
+ writer.uint32(10).string(message.member_id);
38414
+ }
38415
+ if (message.added_by !== "") {
38416
+ writer.uint32(18).string(message.added_by);
38417
+ }
38418
+ return writer;
38419
+ },
38420
+
38421
+ decode(input: _m0.Reader | Uint8Array, length?: number): ChannelMemberDetail {
38422
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
38423
+ let end = length === undefined ? reader.len : reader.pos + length;
38424
+ const message = createBaseChannelMemberDetail();
38425
+ while (reader.pos < end) {
38426
+ const tag = reader.uint32();
38427
+ switch (tag >>> 3) {
38428
+ case 1:
38429
+ if (tag !== 10) {
38430
+ break;
38431
+ }
38432
+
38433
+ message.member_id = reader.string();
38434
+ continue;
38435
+ case 2:
38436
+ if (tag !== 18) {
38437
+ break;
38438
+ }
38439
+
38440
+ message.added_by = reader.string();
38441
+ continue;
38442
+ }
38443
+ if ((tag & 7) === 4 || tag === 0) {
38444
+ break;
38445
+ }
38446
+ reader.skipType(tag & 7);
38447
+ }
38448
+ return message;
38449
+ },
38450
+
38451
+ fromJSON(object: any): ChannelMemberDetail {
38452
+ return {
38453
+ member_id: isSet(object.member_id) ? globalThis.String(object.member_id) : "",
38454
+ added_by: isSet(object.added_by) ? globalThis.String(object.added_by) : "",
38455
+ };
38456
+ },
38457
+
38458
+ toJSON(message: ChannelMemberDetail): unknown {
38459
+ const obj: any = {};
38460
+ if (message.member_id !== "") {
38461
+ obj.member_id = message.member_id;
38462
+ }
38463
+ if (message.added_by !== "") {
38464
+ obj.added_by = message.added_by;
38465
+ }
38466
+ return obj;
38467
+ },
38468
+
38469
+ create<I extends Exact<DeepPartial<ChannelMemberDetail>, I>>(base?: I): ChannelMemberDetail {
38470
+ return ChannelMemberDetail.fromPartial(base ?? ({} as any));
38471
+ },
38472
+ fromPartial<I extends Exact<DeepPartial<ChannelMemberDetail>, I>>(object: I): ChannelMemberDetail {
38473
+ const message = createBaseChannelMemberDetail();
38474
+ message.member_id = object.member_id ?? "";
38475
+ message.added_by = object.added_by ?? "";
38476
+ return message;
38477
+ },
38478
+ };
38479
+
38480
+ function createBaseChannelMemberList(): ChannelMemberList {
38481
+ return { channel_members: [] };
38482
+ }
38483
+
38484
+ export const ChannelMemberList = {
38485
+ encode(message: ChannelMemberList, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
38486
+ for (const v of message.channel_members) {
38487
+ ChannelMemberDetail.encode(v!, writer.uint32(10).fork()).ldelim();
38488
+ }
38489
+ return writer;
38490
+ },
38491
+
38492
+ decode(input: _m0.Reader | Uint8Array, length?: number): ChannelMemberList {
38493
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
38494
+ let end = length === undefined ? reader.len : reader.pos + length;
38495
+ const message = createBaseChannelMemberList();
38496
+ while (reader.pos < end) {
38497
+ const tag = reader.uint32();
38498
+ switch (tag >>> 3) {
38499
+ case 1:
38500
+ if (tag !== 10) {
38501
+ break;
38502
+ }
38503
+
38504
+ message.channel_members.push(ChannelMemberDetail.decode(reader, reader.uint32()));
38505
+ continue;
38506
+ }
38507
+ if ((tag & 7) === 4 || tag === 0) {
38508
+ break;
38509
+ }
38510
+ reader.skipType(tag & 7);
38511
+ }
38512
+ return message;
38513
+ },
38514
+
38515
+ fromJSON(object: any): ChannelMemberList {
38516
+ return {
38517
+ channel_members: globalThis.Array.isArray(object?.channel_members)
38518
+ ? object.channel_members.map((e: any) => ChannelMemberDetail.fromJSON(e))
38519
+ : [],
38520
+ };
38521
+ },
38522
+
38523
+ toJSON(message: ChannelMemberList): unknown {
38524
+ const obj: any = {};
38525
+ if (message.channel_members?.length) {
38526
+ obj.channel_members = message.channel_members.map((e) => ChannelMemberDetail.toJSON(e));
38527
+ }
38528
+ return obj;
38529
+ },
38530
+
38531
+ create<I extends Exact<DeepPartial<ChannelMemberList>, I>>(base?: I): ChannelMemberList {
38532
+ return ChannelMemberList.fromPartial(base ?? ({} as any));
38533
+ },
38534
+ fromPartial<I extends Exact<DeepPartial<ChannelMemberList>, I>>(object: I): ChannelMemberList {
38535
+ const message = createBaseChannelMemberList();
38536
+ message.channel_members = object.channel_members?.map((e) => ChannelMemberDetail.fromPartial(e)) || [];
38537
+ return message;
38538
+ },
38539
+ };
38540
+
38436
38541
  function bytesFromBase64(b64: string): Uint8Array {
38437
38542
  if ((globalThis as any).Buffer) {
38438
38543
  return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));