mezon-js-protobuf 1.8.8 → 1.8.10

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
@@ -2493,6 +2493,7 @@ export interface ClanEmojiCreateRequest {
2493
2493
  shortname: string;
2494
2494
  category: string;
2495
2495
  id: string;
2496
+ is_for_sale: boolean;
2496
2497
  }
2497
2498
 
2498
2499
  export interface ClanEmojiGetByClanIdRequest {
@@ -2591,11 +2592,13 @@ export interface ClanStickerAddRequest {
2591
2592
  source: string;
2592
2593
  shortname: string;
2593
2594
  category: string;
2594
- clan_id: number;
2595
+ clan_id: string;
2595
2596
  /** UNIQUE include type number */
2596
2597
  id: string;
2597
2598
  /** media type for image or audio */
2598
2599
  media_type: number;
2600
+ /** is for sale */
2601
+ is_for_sale: boolean;
2599
2602
  }
2600
2603
 
2601
2604
  export interface ClanStickerListByClanIdRequest {
@@ -3310,9 +3313,11 @@ export interface TokenSentEvent {
3310
3313
  transaction_id: string;
3311
3314
  }
3312
3315
 
3313
- export interface WithdrawTokenRequest {
3314
- /** amount of token */
3315
- amount: number;
3316
+ export interface UnlockItemRequest {
3317
+ /** item id */
3318
+ item_id: string;
3319
+ /** item type */
3320
+ item_type: number;
3316
3321
  }
3317
3322
 
3318
3323
  export interface ListOnboardingRequest {
@@ -3720,7 +3725,7 @@ export interface MezonOauthClient {
3720
3725
  }
3721
3726
 
3722
3727
  export interface MezonOauthClientList {
3723
- listMezonOauthClient: MezonOauthClient[];
3728
+ list_mezon_oauth_client: MezonOauthClient[];
3724
3729
  }
3725
3730
 
3726
3731
  export interface GetMezonOauthClientRequest {
@@ -3782,6 +3787,35 @@ export interface AccountMezon_VarsEntry {
3782
3787
  value: string;
3783
3788
  }
3784
3789
 
3790
+ export interface QuickMenuAccessRequest {
3791
+ id: string;
3792
+ bot_id: string;
3793
+ clan_id: string;
3794
+ channel_id: string;
3795
+ menu_name: string;
3796
+ background: string;
3797
+ action_msg: string;
3798
+ }
3799
+
3800
+ export interface QuickMenuAccess {
3801
+ id: string;
3802
+ bot_id: string;
3803
+ clan_id: string;
3804
+ channel_id: string;
3805
+ menu_name: string;
3806
+ background: string;
3807
+ action_msg: string;
3808
+ }
3809
+
3810
+ export interface ListQuickMenuAccessRequest {
3811
+ bot_id: string;
3812
+ channel_id: string;
3813
+ }
3814
+
3815
+ export interface QuickMenuAccessList {
3816
+ list_menus: QuickMenuAccess[];
3817
+ }
3818
+
3785
3819
  function createBaseAccount(): Account {
3786
3820
  return {
3787
3821
  user: undefined,
@@ -23327,7 +23361,7 @@ export const AllUsersAddChannelResponse = {
23327
23361
  };
23328
23362
 
23329
23363
  function createBaseClanEmojiCreateRequest(): ClanEmojiCreateRequest {
23330
- return { clan_id: "", source: "", shortname: "", category: "", id: "" };
23364
+ return { clan_id: "", source: "", shortname: "", category: "", id: "", is_for_sale: false };
23331
23365
  }
23332
23366
 
23333
23367
  export const ClanEmojiCreateRequest = {
@@ -23347,6 +23381,9 @@ export const ClanEmojiCreateRequest = {
23347
23381
  if (message.id !== "") {
23348
23382
  writer.uint32(42).string(message.id);
23349
23383
  }
23384
+ if (message.is_for_sale !== false) {
23385
+ writer.uint32(48).bool(message.is_for_sale);
23386
+ }
23350
23387
  return writer;
23351
23388
  },
23352
23389
 
@@ -23392,6 +23429,13 @@ export const ClanEmojiCreateRequest = {
23392
23429
 
23393
23430
  message.id = reader.string();
23394
23431
  continue;
23432
+ case 6:
23433
+ if (tag !== 48) {
23434
+ break;
23435
+ }
23436
+
23437
+ message.is_for_sale = reader.bool();
23438
+ continue;
23395
23439
  }
23396
23440
  if ((tag & 7) === 4 || tag === 0) {
23397
23441
  break;
@@ -23408,6 +23452,7 @@ export const ClanEmojiCreateRequest = {
23408
23452
  shortname: isSet(object.shortname) ? globalThis.String(object.shortname) : "",
23409
23453
  category: isSet(object.category) ? globalThis.String(object.category) : "",
23410
23454
  id: isSet(object.id) ? globalThis.String(object.id) : "",
23455
+ is_for_sale: isSet(object.is_for_sale) ? globalThis.Boolean(object.is_for_sale) : false,
23411
23456
  };
23412
23457
  },
23413
23458
 
@@ -23428,6 +23473,9 @@ export const ClanEmojiCreateRequest = {
23428
23473
  if (message.id !== "") {
23429
23474
  obj.id = message.id;
23430
23475
  }
23476
+ if (message.is_for_sale !== false) {
23477
+ obj.is_for_sale = message.is_for_sale;
23478
+ }
23431
23479
  return obj;
23432
23480
  },
23433
23481
 
@@ -23441,6 +23489,7 @@ export const ClanEmojiCreateRequest = {
23441
23489
  message.shortname = object.shortname ?? "";
23442
23490
  message.category = object.category ?? "";
23443
23491
  message.id = object.id ?? "";
23492
+ message.is_for_sale = object.is_for_sale ?? false;
23444
23493
  return message;
23445
23494
  },
23446
23495
  };
@@ -24714,7 +24763,7 @@ export const CheckDuplicateClanNameResponse = {
24714
24763
  };
24715
24764
 
24716
24765
  function createBaseClanStickerAddRequest(): ClanStickerAddRequest {
24717
- return { source: "", shortname: "", category: "", clan_id: 0, id: "", media_type: 0 };
24766
+ return { source: "", shortname: "", category: "", clan_id: "", id: "", media_type: 0, is_for_sale: false };
24718
24767
  }
24719
24768
 
24720
24769
  export const ClanStickerAddRequest = {
@@ -24728,8 +24777,8 @@ export const ClanStickerAddRequest = {
24728
24777
  if (message.category !== "") {
24729
24778
  writer.uint32(26).string(message.category);
24730
24779
  }
24731
- if (message.clan_id !== 0) {
24732
- writer.uint32(32).int64(message.clan_id);
24780
+ if (message.clan_id !== "") {
24781
+ writer.uint32(34).string(message.clan_id);
24733
24782
  }
24734
24783
  if (message.id !== "") {
24735
24784
  writer.uint32(42).string(message.id);
@@ -24737,6 +24786,9 @@ export const ClanStickerAddRequest = {
24737
24786
  if (message.media_type !== 0) {
24738
24787
  writer.uint32(48).int32(message.media_type);
24739
24788
  }
24789
+ if (message.is_for_sale !== false) {
24790
+ writer.uint32(56).bool(message.is_for_sale);
24791
+ }
24740
24792
  return writer;
24741
24793
  },
24742
24794
 
@@ -24769,11 +24821,11 @@ export const ClanStickerAddRequest = {
24769
24821
  message.category = reader.string();
24770
24822
  continue;
24771
24823
  case 4:
24772
- if (tag !== 32) {
24824
+ if (tag !== 34) {
24773
24825
  break;
24774
24826
  }
24775
24827
 
24776
- message.clan_id = longToNumber(reader.int64() as Long);
24828
+ message.clan_id = reader.string();
24777
24829
  continue;
24778
24830
  case 5:
24779
24831
  if (tag !== 42) {
@@ -24789,6 +24841,13 @@ export const ClanStickerAddRequest = {
24789
24841
 
24790
24842
  message.media_type = reader.int32();
24791
24843
  continue;
24844
+ case 7:
24845
+ if (tag !== 56) {
24846
+ break;
24847
+ }
24848
+
24849
+ message.is_for_sale = reader.bool();
24850
+ continue;
24792
24851
  }
24793
24852
  if ((tag & 7) === 4 || tag === 0) {
24794
24853
  break;
@@ -24803,9 +24862,10 @@ export const ClanStickerAddRequest = {
24803
24862
  source: isSet(object.source) ? globalThis.String(object.source) : "",
24804
24863
  shortname: isSet(object.shortname) ? globalThis.String(object.shortname) : "",
24805
24864
  category: isSet(object.category) ? globalThis.String(object.category) : "",
24806
- clan_id: isSet(object.clan_id) ? globalThis.Number(object.clan_id) : 0,
24865
+ clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
24807
24866
  id: isSet(object.id) ? globalThis.String(object.id) : "",
24808
24867
  media_type: isSet(object.media_type) ? globalThis.Number(object.media_type) : 0,
24868
+ is_for_sale: isSet(object.is_for_sale) ? globalThis.Boolean(object.is_for_sale) : false,
24809
24869
  };
24810
24870
  },
24811
24871
 
@@ -24820,8 +24880,8 @@ export const ClanStickerAddRequest = {
24820
24880
  if (message.category !== "") {
24821
24881
  obj.category = message.category;
24822
24882
  }
24823
- if (message.clan_id !== 0) {
24824
- obj.clan_id = Math.round(message.clan_id);
24883
+ if (message.clan_id !== "") {
24884
+ obj.clan_id = message.clan_id;
24825
24885
  }
24826
24886
  if (message.id !== "") {
24827
24887
  obj.id = message.id;
@@ -24829,6 +24889,9 @@ export const ClanStickerAddRequest = {
24829
24889
  if (message.media_type !== 0) {
24830
24890
  obj.media_type = Math.round(message.media_type);
24831
24891
  }
24892
+ if (message.is_for_sale !== false) {
24893
+ obj.is_for_sale = message.is_for_sale;
24894
+ }
24832
24895
  return obj;
24833
24896
  },
24834
24897
 
@@ -24840,9 +24903,10 @@ export const ClanStickerAddRequest = {
24840
24903
  message.source = object.source ?? "";
24841
24904
  message.shortname = object.shortname ?? "";
24842
24905
  message.category = object.category ?? "";
24843
- message.clan_id = object.clan_id ?? 0;
24906
+ message.clan_id = object.clan_id ?? "";
24844
24907
  message.id = object.id ?? "";
24845
24908
  message.media_type = object.media_type ?? 0;
24909
+ message.is_for_sale = object.is_for_sale ?? false;
24846
24910
  return message;
24847
24911
  },
24848
24912
  };
@@ -31993,31 +32057,41 @@ export const TokenSentEvent = {
31993
32057
  },
31994
32058
  };
31995
32059
 
31996
- function createBaseWithdrawTokenRequest(): WithdrawTokenRequest {
31997
- return { amount: 0 };
32060
+ function createBaseUnlockItemRequest(): UnlockItemRequest {
32061
+ return { item_id: "", item_type: 0 };
31998
32062
  }
31999
32063
 
32000
- export const WithdrawTokenRequest = {
32001
- encode(message: WithdrawTokenRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
32002
- if (message.amount !== 0) {
32003
- writer.uint32(8).int32(message.amount);
32064
+ export const UnlockItemRequest = {
32065
+ encode(message: UnlockItemRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
32066
+ if (message.item_id !== "") {
32067
+ writer.uint32(10).string(message.item_id);
32068
+ }
32069
+ if (message.item_type !== 0) {
32070
+ writer.uint32(16).int32(message.item_type);
32004
32071
  }
32005
32072
  return writer;
32006
32073
  },
32007
32074
 
32008
- decode(input: _m0.Reader | Uint8Array, length?: number): WithdrawTokenRequest {
32075
+ decode(input: _m0.Reader | Uint8Array, length?: number): UnlockItemRequest {
32009
32076
  const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
32010
32077
  let end = length === undefined ? reader.len : reader.pos + length;
32011
- const message = createBaseWithdrawTokenRequest();
32078
+ const message = createBaseUnlockItemRequest();
32012
32079
  while (reader.pos < end) {
32013
32080
  const tag = reader.uint32();
32014
32081
  switch (tag >>> 3) {
32015
32082
  case 1:
32016
- if (tag !== 8) {
32083
+ if (tag !== 10) {
32017
32084
  break;
32018
32085
  }
32019
32086
 
32020
- message.amount = reader.int32();
32087
+ message.item_id = reader.string();
32088
+ continue;
32089
+ case 2:
32090
+ if (tag !== 16) {
32091
+ break;
32092
+ }
32093
+
32094
+ message.item_type = reader.int32();
32021
32095
  continue;
32022
32096
  }
32023
32097
  if ((tag & 7) === 4 || tag === 0) {
@@ -32028,24 +32102,31 @@ export const WithdrawTokenRequest = {
32028
32102
  return message;
32029
32103
  },
32030
32104
 
32031
- fromJSON(object: any): WithdrawTokenRequest {
32032
- return { amount: isSet(object.amount) ? globalThis.Number(object.amount) : 0 };
32105
+ fromJSON(object: any): UnlockItemRequest {
32106
+ return {
32107
+ item_id: isSet(object.item_id) ? globalThis.String(object.item_id) : "",
32108
+ item_type: isSet(object.item_type) ? globalThis.Number(object.item_type) : 0,
32109
+ };
32033
32110
  },
32034
32111
 
32035
- toJSON(message: WithdrawTokenRequest): unknown {
32112
+ toJSON(message: UnlockItemRequest): unknown {
32036
32113
  const obj: any = {};
32037
- if (message.amount !== 0) {
32038
- obj.amount = Math.round(message.amount);
32114
+ if (message.item_id !== "") {
32115
+ obj.item_id = message.item_id;
32116
+ }
32117
+ if (message.item_type !== 0) {
32118
+ obj.item_type = Math.round(message.item_type);
32039
32119
  }
32040
32120
  return obj;
32041
32121
  },
32042
32122
 
32043
- create<I extends Exact<DeepPartial<WithdrawTokenRequest>, I>>(base?: I): WithdrawTokenRequest {
32044
- return WithdrawTokenRequest.fromPartial(base ?? ({} as any));
32123
+ create<I extends Exact<DeepPartial<UnlockItemRequest>, I>>(base?: I): UnlockItemRequest {
32124
+ return UnlockItemRequest.fromPartial(base ?? ({} as any));
32045
32125
  },
32046
- fromPartial<I extends Exact<DeepPartial<WithdrawTokenRequest>, I>>(object: I): WithdrawTokenRequest {
32047
- const message = createBaseWithdrawTokenRequest();
32048
- message.amount = object.amount ?? 0;
32126
+ fromPartial<I extends Exact<DeepPartial<UnlockItemRequest>, I>>(object: I): UnlockItemRequest {
32127
+ const message = createBaseUnlockItemRequest();
32128
+ message.item_id = object.item_id ?? "";
32129
+ message.item_type = object.item_type ?? 0;
32049
32130
  return message;
32050
32131
  },
32051
32132
  };
@@ -36691,12 +36772,12 @@ export const MezonOauthClient = {
36691
36772
  };
36692
36773
 
36693
36774
  function createBaseMezonOauthClientList(): MezonOauthClientList {
36694
- return { listMezonOauthClient: [] };
36775
+ return { list_mezon_oauth_client: [] };
36695
36776
  }
36696
36777
 
36697
36778
  export const MezonOauthClientList = {
36698
36779
  encode(message: MezonOauthClientList, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
36699
- for (const v of message.listMezonOauthClient) {
36780
+ for (const v of message.list_mezon_oauth_client) {
36700
36781
  MezonOauthClient.encode(v!, writer.uint32(10).fork()).ldelim();
36701
36782
  }
36702
36783
  return writer;
@@ -36714,7 +36795,7 @@ export const MezonOauthClientList = {
36714
36795
  break;
36715
36796
  }
36716
36797
 
36717
- message.listMezonOauthClient.push(MezonOauthClient.decode(reader, reader.uint32()));
36798
+ message.list_mezon_oauth_client.push(MezonOauthClient.decode(reader, reader.uint32()));
36718
36799
  continue;
36719
36800
  }
36720
36801
  if ((tag & 7) === 4 || tag === 0) {
@@ -36727,16 +36808,16 @@ export const MezonOauthClientList = {
36727
36808
 
36728
36809
  fromJSON(object: any): MezonOauthClientList {
36729
36810
  return {
36730
- listMezonOauthClient: globalThis.Array.isArray(object?.listMezonOauthClient)
36731
- ? object.listMezonOauthClient.map((e: any) => MezonOauthClient.fromJSON(e))
36811
+ list_mezon_oauth_client: globalThis.Array.isArray(object?.list_mezon_oauth_client)
36812
+ ? object.list_mezon_oauth_client.map((e: any) => MezonOauthClient.fromJSON(e))
36732
36813
  : [],
36733
36814
  };
36734
36815
  },
36735
36816
 
36736
36817
  toJSON(message: MezonOauthClientList): unknown {
36737
36818
  const obj: any = {};
36738
- if (message.listMezonOauthClient?.length) {
36739
- obj.listMezonOauthClient = message.listMezonOauthClient.map((e) => MezonOauthClient.toJSON(e));
36819
+ if (message.list_mezon_oauth_client?.length) {
36820
+ obj.list_mezon_oauth_client = message.list_mezon_oauth_client.map((e) => MezonOauthClient.toJSON(e));
36740
36821
  }
36741
36822
  return obj;
36742
36823
  },
@@ -36746,7 +36827,7 @@ export const MezonOauthClientList = {
36746
36827
  },
36747
36828
  fromPartial<I extends Exact<DeepPartial<MezonOauthClientList>, I>>(object: I): MezonOauthClientList {
36748
36829
  const message = createBaseMezonOauthClientList();
36749
- message.listMezonOauthClient = object.listMezonOauthClient?.map((e) => MezonOauthClient.fromPartial(e)) || [];
36830
+ message.list_mezon_oauth_client = object.list_mezon_oauth_client?.map((e) => MezonOauthClient.fromPartial(e)) || [];
36750
36831
  return message;
36751
36832
  },
36752
36833
  };
@@ -37570,6 +37651,439 @@ export const AccountMezon_VarsEntry = {
37570
37651
  },
37571
37652
  };
37572
37653
 
37654
+ function createBaseQuickMenuAccessRequest(): QuickMenuAccessRequest {
37655
+ return { id: "", bot_id: "", clan_id: "", channel_id: "", menu_name: "", background: "", action_msg: "" };
37656
+ }
37657
+
37658
+ export const QuickMenuAccessRequest = {
37659
+ encode(message: QuickMenuAccessRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
37660
+ if (message.id !== "") {
37661
+ writer.uint32(10).string(message.id);
37662
+ }
37663
+ if (message.bot_id !== "") {
37664
+ writer.uint32(18).string(message.bot_id);
37665
+ }
37666
+ if (message.clan_id !== "") {
37667
+ writer.uint32(26).string(message.clan_id);
37668
+ }
37669
+ if (message.channel_id !== "") {
37670
+ writer.uint32(34).string(message.channel_id);
37671
+ }
37672
+ if (message.menu_name !== "") {
37673
+ writer.uint32(42).string(message.menu_name);
37674
+ }
37675
+ if (message.background !== "") {
37676
+ writer.uint32(50).string(message.background);
37677
+ }
37678
+ if (message.action_msg !== "") {
37679
+ writer.uint32(58).string(message.action_msg);
37680
+ }
37681
+ return writer;
37682
+ },
37683
+
37684
+ decode(input: _m0.Reader | Uint8Array, length?: number): QuickMenuAccessRequest {
37685
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
37686
+ let end = length === undefined ? reader.len : reader.pos + length;
37687
+ const message = createBaseQuickMenuAccessRequest();
37688
+ while (reader.pos < end) {
37689
+ const tag = reader.uint32();
37690
+ switch (tag >>> 3) {
37691
+ case 1:
37692
+ if (tag !== 10) {
37693
+ break;
37694
+ }
37695
+
37696
+ message.id = reader.string();
37697
+ continue;
37698
+ case 2:
37699
+ if (tag !== 18) {
37700
+ break;
37701
+ }
37702
+
37703
+ message.bot_id = reader.string();
37704
+ continue;
37705
+ case 3:
37706
+ if (tag !== 26) {
37707
+ break;
37708
+ }
37709
+
37710
+ message.clan_id = reader.string();
37711
+ continue;
37712
+ case 4:
37713
+ if (tag !== 34) {
37714
+ break;
37715
+ }
37716
+
37717
+ message.channel_id = reader.string();
37718
+ continue;
37719
+ case 5:
37720
+ if (tag !== 42) {
37721
+ break;
37722
+ }
37723
+
37724
+ message.menu_name = reader.string();
37725
+ continue;
37726
+ case 6:
37727
+ if (tag !== 50) {
37728
+ break;
37729
+ }
37730
+
37731
+ message.background = reader.string();
37732
+ continue;
37733
+ case 7:
37734
+ if (tag !== 58) {
37735
+ break;
37736
+ }
37737
+
37738
+ message.action_msg = reader.string();
37739
+ continue;
37740
+ }
37741
+ if ((tag & 7) === 4 || tag === 0) {
37742
+ break;
37743
+ }
37744
+ reader.skipType(tag & 7);
37745
+ }
37746
+ return message;
37747
+ },
37748
+
37749
+ fromJSON(object: any): QuickMenuAccessRequest {
37750
+ return {
37751
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
37752
+ bot_id: isSet(object.bot_id) ? globalThis.String(object.bot_id) : "",
37753
+ clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
37754
+ channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
37755
+ menu_name: isSet(object.menu_name) ? globalThis.String(object.menu_name) : "",
37756
+ background: isSet(object.background) ? globalThis.String(object.background) : "",
37757
+ action_msg: isSet(object.action_msg) ? globalThis.String(object.action_msg) : "",
37758
+ };
37759
+ },
37760
+
37761
+ toJSON(message: QuickMenuAccessRequest): unknown {
37762
+ const obj: any = {};
37763
+ if (message.id !== "") {
37764
+ obj.id = message.id;
37765
+ }
37766
+ if (message.bot_id !== "") {
37767
+ obj.bot_id = message.bot_id;
37768
+ }
37769
+ if (message.clan_id !== "") {
37770
+ obj.clan_id = message.clan_id;
37771
+ }
37772
+ if (message.channel_id !== "") {
37773
+ obj.channel_id = message.channel_id;
37774
+ }
37775
+ if (message.menu_name !== "") {
37776
+ obj.menu_name = message.menu_name;
37777
+ }
37778
+ if (message.background !== "") {
37779
+ obj.background = message.background;
37780
+ }
37781
+ if (message.action_msg !== "") {
37782
+ obj.action_msg = message.action_msg;
37783
+ }
37784
+ return obj;
37785
+ },
37786
+
37787
+ create<I extends Exact<DeepPartial<QuickMenuAccessRequest>, I>>(base?: I): QuickMenuAccessRequest {
37788
+ return QuickMenuAccessRequest.fromPartial(base ?? ({} as any));
37789
+ },
37790
+ fromPartial<I extends Exact<DeepPartial<QuickMenuAccessRequest>, I>>(object: I): QuickMenuAccessRequest {
37791
+ const message = createBaseQuickMenuAccessRequest();
37792
+ message.id = object.id ?? "";
37793
+ message.bot_id = object.bot_id ?? "";
37794
+ message.clan_id = object.clan_id ?? "";
37795
+ message.channel_id = object.channel_id ?? "";
37796
+ message.menu_name = object.menu_name ?? "";
37797
+ message.background = object.background ?? "";
37798
+ message.action_msg = object.action_msg ?? "";
37799
+ return message;
37800
+ },
37801
+ };
37802
+
37803
+ function createBaseQuickMenuAccess(): QuickMenuAccess {
37804
+ return { id: "", bot_id: "", clan_id: "", channel_id: "", menu_name: "", background: "", action_msg: "" };
37805
+ }
37806
+
37807
+ export const QuickMenuAccess = {
37808
+ encode(message: QuickMenuAccess, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
37809
+ if (message.id !== "") {
37810
+ writer.uint32(10).string(message.id);
37811
+ }
37812
+ if (message.bot_id !== "") {
37813
+ writer.uint32(18).string(message.bot_id);
37814
+ }
37815
+ if (message.clan_id !== "") {
37816
+ writer.uint32(26).string(message.clan_id);
37817
+ }
37818
+ if (message.channel_id !== "") {
37819
+ writer.uint32(34).string(message.channel_id);
37820
+ }
37821
+ if (message.menu_name !== "") {
37822
+ writer.uint32(42).string(message.menu_name);
37823
+ }
37824
+ if (message.background !== "") {
37825
+ writer.uint32(50).string(message.background);
37826
+ }
37827
+ if (message.action_msg !== "") {
37828
+ writer.uint32(58).string(message.action_msg);
37829
+ }
37830
+ return writer;
37831
+ },
37832
+
37833
+ decode(input: _m0.Reader | Uint8Array, length?: number): QuickMenuAccess {
37834
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
37835
+ let end = length === undefined ? reader.len : reader.pos + length;
37836
+ const message = createBaseQuickMenuAccess();
37837
+ while (reader.pos < end) {
37838
+ const tag = reader.uint32();
37839
+ switch (tag >>> 3) {
37840
+ case 1:
37841
+ if (tag !== 10) {
37842
+ break;
37843
+ }
37844
+
37845
+ message.id = reader.string();
37846
+ continue;
37847
+ case 2:
37848
+ if (tag !== 18) {
37849
+ break;
37850
+ }
37851
+
37852
+ message.bot_id = reader.string();
37853
+ continue;
37854
+ case 3:
37855
+ if (tag !== 26) {
37856
+ break;
37857
+ }
37858
+
37859
+ message.clan_id = reader.string();
37860
+ continue;
37861
+ case 4:
37862
+ if (tag !== 34) {
37863
+ break;
37864
+ }
37865
+
37866
+ message.channel_id = reader.string();
37867
+ continue;
37868
+ case 5:
37869
+ if (tag !== 42) {
37870
+ break;
37871
+ }
37872
+
37873
+ message.menu_name = reader.string();
37874
+ continue;
37875
+ case 6:
37876
+ if (tag !== 50) {
37877
+ break;
37878
+ }
37879
+
37880
+ message.background = reader.string();
37881
+ continue;
37882
+ case 7:
37883
+ if (tag !== 58) {
37884
+ break;
37885
+ }
37886
+
37887
+ message.action_msg = reader.string();
37888
+ continue;
37889
+ }
37890
+ if ((tag & 7) === 4 || tag === 0) {
37891
+ break;
37892
+ }
37893
+ reader.skipType(tag & 7);
37894
+ }
37895
+ return message;
37896
+ },
37897
+
37898
+ fromJSON(object: any): QuickMenuAccess {
37899
+ return {
37900
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
37901
+ bot_id: isSet(object.bot_id) ? globalThis.String(object.bot_id) : "",
37902
+ clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
37903
+ channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
37904
+ menu_name: isSet(object.menu_name) ? globalThis.String(object.menu_name) : "",
37905
+ background: isSet(object.background) ? globalThis.String(object.background) : "",
37906
+ action_msg: isSet(object.action_msg) ? globalThis.String(object.action_msg) : "",
37907
+ };
37908
+ },
37909
+
37910
+ toJSON(message: QuickMenuAccess): unknown {
37911
+ const obj: any = {};
37912
+ if (message.id !== "") {
37913
+ obj.id = message.id;
37914
+ }
37915
+ if (message.bot_id !== "") {
37916
+ obj.bot_id = message.bot_id;
37917
+ }
37918
+ if (message.clan_id !== "") {
37919
+ obj.clan_id = message.clan_id;
37920
+ }
37921
+ if (message.channel_id !== "") {
37922
+ obj.channel_id = message.channel_id;
37923
+ }
37924
+ if (message.menu_name !== "") {
37925
+ obj.menu_name = message.menu_name;
37926
+ }
37927
+ if (message.background !== "") {
37928
+ obj.background = message.background;
37929
+ }
37930
+ if (message.action_msg !== "") {
37931
+ obj.action_msg = message.action_msg;
37932
+ }
37933
+ return obj;
37934
+ },
37935
+
37936
+ create<I extends Exact<DeepPartial<QuickMenuAccess>, I>>(base?: I): QuickMenuAccess {
37937
+ return QuickMenuAccess.fromPartial(base ?? ({} as any));
37938
+ },
37939
+ fromPartial<I extends Exact<DeepPartial<QuickMenuAccess>, I>>(object: I): QuickMenuAccess {
37940
+ const message = createBaseQuickMenuAccess();
37941
+ message.id = object.id ?? "";
37942
+ message.bot_id = object.bot_id ?? "";
37943
+ message.clan_id = object.clan_id ?? "";
37944
+ message.channel_id = object.channel_id ?? "";
37945
+ message.menu_name = object.menu_name ?? "";
37946
+ message.background = object.background ?? "";
37947
+ message.action_msg = object.action_msg ?? "";
37948
+ return message;
37949
+ },
37950
+ };
37951
+
37952
+ function createBaseListQuickMenuAccessRequest(): ListQuickMenuAccessRequest {
37953
+ return { bot_id: "", channel_id: "" };
37954
+ }
37955
+
37956
+ export const ListQuickMenuAccessRequest = {
37957
+ encode(message: ListQuickMenuAccessRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
37958
+ if (message.bot_id !== "") {
37959
+ writer.uint32(10).string(message.bot_id);
37960
+ }
37961
+ if (message.channel_id !== "") {
37962
+ writer.uint32(18).string(message.channel_id);
37963
+ }
37964
+ return writer;
37965
+ },
37966
+
37967
+ decode(input: _m0.Reader | Uint8Array, length?: number): ListQuickMenuAccessRequest {
37968
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
37969
+ let end = length === undefined ? reader.len : reader.pos + length;
37970
+ const message = createBaseListQuickMenuAccessRequest();
37971
+ while (reader.pos < end) {
37972
+ const tag = reader.uint32();
37973
+ switch (tag >>> 3) {
37974
+ case 1:
37975
+ if (tag !== 10) {
37976
+ break;
37977
+ }
37978
+
37979
+ message.bot_id = reader.string();
37980
+ continue;
37981
+ case 2:
37982
+ if (tag !== 18) {
37983
+ break;
37984
+ }
37985
+
37986
+ message.channel_id = reader.string();
37987
+ continue;
37988
+ }
37989
+ if ((tag & 7) === 4 || tag === 0) {
37990
+ break;
37991
+ }
37992
+ reader.skipType(tag & 7);
37993
+ }
37994
+ return message;
37995
+ },
37996
+
37997
+ fromJSON(object: any): ListQuickMenuAccessRequest {
37998
+ return {
37999
+ bot_id: isSet(object.bot_id) ? globalThis.String(object.bot_id) : "",
38000
+ channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
38001
+ };
38002
+ },
38003
+
38004
+ toJSON(message: ListQuickMenuAccessRequest): unknown {
38005
+ const obj: any = {};
38006
+ if (message.bot_id !== "") {
38007
+ obj.bot_id = message.bot_id;
38008
+ }
38009
+ if (message.channel_id !== "") {
38010
+ obj.channel_id = message.channel_id;
38011
+ }
38012
+ return obj;
38013
+ },
38014
+
38015
+ create<I extends Exact<DeepPartial<ListQuickMenuAccessRequest>, I>>(base?: I): ListQuickMenuAccessRequest {
38016
+ return ListQuickMenuAccessRequest.fromPartial(base ?? ({} as any));
38017
+ },
38018
+ fromPartial<I extends Exact<DeepPartial<ListQuickMenuAccessRequest>, I>>(object: I): ListQuickMenuAccessRequest {
38019
+ const message = createBaseListQuickMenuAccessRequest();
38020
+ message.bot_id = object.bot_id ?? "";
38021
+ message.channel_id = object.channel_id ?? "";
38022
+ return message;
38023
+ },
38024
+ };
38025
+
38026
+ function createBaseQuickMenuAccessList(): QuickMenuAccessList {
38027
+ return { list_menus: [] };
38028
+ }
38029
+
38030
+ export const QuickMenuAccessList = {
38031
+ encode(message: QuickMenuAccessList, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
38032
+ for (const v of message.list_menus) {
38033
+ QuickMenuAccess.encode(v!, writer.uint32(10).fork()).ldelim();
38034
+ }
38035
+ return writer;
38036
+ },
38037
+
38038
+ decode(input: _m0.Reader | Uint8Array, length?: number): QuickMenuAccessList {
38039
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
38040
+ let end = length === undefined ? reader.len : reader.pos + length;
38041
+ const message = createBaseQuickMenuAccessList();
38042
+ while (reader.pos < end) {
38043
+ const tag = reader.uint32();
38044
+ switch (tag >>> 3) {
38045
+ case 1:
38046
+ if (tag !== 10) {
38047
+ break;
38048
+ }
38049
+
38050
+ message.list_menus.push(QuickMenuAccess.decode(reader, reader.uint32()));
38051
+ continue;
38052
+ }
38053
+ if ((tag & 7) === 4 || tag === 0) {
38054
+ break;
38055
+ }
38056
+ reader.skipType(tag & 7);
38057
+ }
38058
+ return message;
38059
+ },
38060
+
38061
+ fromJSON(object: any): QuickMenuAccessList {
38062
+ return {
38063
+ list_menus: globalThis.Array.isArray(object?.list_menus)
38064
+ ? object.list_menus.map((e: any) => QuickMenuAccess.fromJSON(e))
38065
+ : [],
38066
+ };
38067
+ },
38068
+
38069
+ toJSON(message: QuickMenuAccessList): unknown {
38070
+ const obj: any = {};
38071
+ if (message.list_menus?.length) {
38072
+ obj.list_menus = message.list_menus.map((e) => QuickMenuAccess.toJSON(e));
38073
+ }
38074
+ return obj;
38075
+ },
38076
+
38077
+ create<I extends Exact<DeepPartial<QuickMenuAccessList>, I>>(base?: I): QuickMenuAccessList {
38078
+ return QuickMenuAccessList.fromPartial(base ?? ({} as any));
38079
+ },
38080
+ fromPartial<I extends Exact<DeepPartial<QuickMenuAccessList>, I>>(object: I): QuickMenuAccessList {
38081
+ const message = createBaseQuickMenuAccessList();
38082
+ message.list_menus = object.list_menus?.map((e) => QuickMenuAccess.fromPartial(e)) || [];
38083
+ return message;
38084
+ },
38085
+ };
38086
+
37573
38087
  function bytesFromBase64(b64: string): Uint8Array {
37574
38088
  if ((globalThis as any).Buffer) {
37575
38089
  return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));