mezon-sdk 2.7.71 → 2.7.72

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 v5.28.3
3
+ // protoc-gen-ts_proto v1.181.1
4
+ // protoc v5.27.2
5
5
  // source: api/api.proto
6
6
  /* eslint-disable */
7
7
  import Long from "long";
@@ -308,6 +308,8 @@ function createBaseAccount() {
308
308
  custom_id: "",
309
309
  verify_time: undefined,
310
310
  disable_time: undefined,
311
+ logo: "",
312
+ splash_screen: "",
311
313
  };
312
314
  }
313
315
  export const Account = {
@@ -333,6 +335,12 @@ export const Account = {
333
335
  if (message.disable_time !== undefined) {
334
336
  Timestamp.encode(toTimestamp(message.disable_time), writer.uint32(58).fork()).ldelim();
335
337
  }
338
+ if (message.logo !== "") {
339
+ writer.uint32(66).string(message.logo);
340
+ }
341
+ if (message.splash_screen !== "") {
342
+ writer.uint32(74).string(message.splash_screen);
343
+ }
336
344
  return writer;
337
345
  },
338
346
  decode(input, length) {
@@ -384,6 +392,18 @@ export const Account = {
384
392
  }
385
393
  message.disable_time = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
386
394
  continue;
395
+ case 8:
396
+ if (tag !== 66) {
397
+ break;
398
+ }
399
+ message.logo = reader.string();
400
+ continue;
401
+ case 9:
402
+ if (tag !== 74) {
403
+ break;
404
+ }
405
+ message.splash_screen = reader.string();
406
+ continue;
387
407
  }
388
408
  if ((tag & 7) === 4 || tag === 0) {
389
409
  break;
@@ -403,6 +423,8 @@ export const Account = {
403
423
  custom_id: isSet(object.custom_id) ? globalThis.String(object.custom_id) : "",
404
424
  verify_time: isSet(object.verify_time) ? fromJsonTimestamp(object.verify_time) : undefined,
405
425
  disable_time: isSet(object.disable_time) ? fromJsonTimestamp(object.disable_time) : undefined,
426
+ logo: isSet(object.logo) ? globalThis.String(object.logo) : "",
427
+ splash_screen: isSet(object.splash_screen) ? globalThis.String(object.splash_screen) : "",
406
428
  };
407
429
  },
408
430
  toJSON(message) {
@@ -428,6 +450,12 @@ export const Account = {
428
450
  if (message.disable_time !== undefined) {
429
451
  obj.disable_time = message.disable_time.toISOString();
430
452
  }
453
+ if (message.logo !== "") {
454
+ obj.logo = message.logo;
455
+ }
456
+ if (message.splash_screen !== "") {
457
+ obj.splash_screen = message.splash_screen;
458
+ }
431
459
  return obj;
432
460
  },
433
461
  create(base) {
@@ -442,6 +470,8 @@ export const Account = {
442
470
  message.custom_id = object.custom_id ?? "";
443
471
  message.verify_time = object.verify_time ?? undefined;
444
472
  message.disable_time = object.disable_time ?? undefined;
473
+ message.logo = object.logo ?? "";
474
+ message.splash_screen = object.splash_screen ?? "";
445
475
  return message;
446
476
  },
447
477
  };
@@ -3396,6 +3426,7 @@ function createBaseChannelMessage() {
3396
3426
  mode: 0,
3397
3427
  hide_editted: false,
3398
3428
  is_public: false,
3429
+ topic_id: "",
3399
3430
  };
3400
3431
  }
3401
3432
  export const ChannelMessage = {
@@ -3478,6 +3509,9 @@ export const ChannelMessage = {
3478
3509
  if (message.is_public !== false) {
3479
3510
  writer.uint32(208).bool(message.is_public);
3480
3511
  }
3512
+ if (message.topic_id !== "") {
3513
+ writer.uint32(218).string(message.topic_id);
3514
+ }
3481
3515
  return writer;
3482
3516
  },
3483
3517
  decode(input, length) {
@@ -3643,6 +3677,12 @@ export const ChannelMessage = {
3643
3677
  }
3644
3678
  message.is_public = reader.bool();
3645
3679
  continue;
3680
+ case 27:
3681
+ if (tag !== 218) {
3682
+ break;
3683
+ }
3684
+ message.topic_id = reader.string();
3685
+ continue;
3646
3686
  }
3647
3687
  if ((tag & 7) === 4 || tag === 0) {
3648
3688
  break;
@@ -3679,6 +3719,7 @@ export const ChannelMessage = {
3679
3719
  mode: isSet(object.mode) ? globalThis.Number(object.mode) : 0,
3680
3720
  hide_editted: isSet(object.hide_editted) ? globalThis.Boolean(object.hide_editted) : false,
3681
3721
  is_public: isSet(object.is_public) ? globalThis.Boolean(object.is_public) : false,
3722
+ topic_id: isSet(object.topic_id) ? globalThis.String(object.topic_id) : "",
3682
3723
  };
3683
3724
  },
3684
3725
  toJSON(message) {
@@ -3761,6 +3802,9 @@ export const ChannelMessage = {
3761
3802
  if (message.is_public !== false) {
3762
3803
  obj.is_public = message.is_public;
3763
3804
  }
3805
+ if (message.topic_id !== "") {
3806
+ obj.topic_id = message.topic_id;
3807
+ }
3764
3808
  return obj;
3765
3809
  },
3766
3810
  create(base) {
@@ -3794,6 +3838,7 @@ export const ChannelMessage = {
3794
3838
  message.mode = object.mode ?? 0;
3795
3839
  message.hide_editted = object.hide_editted ?? false;
3796
3840
  message.is_public = object.is_public ?? false;
3841
+ message.topic_id = object.topic_id ?? "";
3797
3842
  return message;
3798
3843
  },
3799
3844
  };
@@ -8745,6 +8790,8 @@ function createBaseUpdateAccountRequest() {
8745
8790
  timezone: undefined,
8746
8791
  about_me: "",
8747
8792
  dob: undefined,
8793
+ logo: "",
8794
+ splash_screen: "",
8748
8795
  };
8749
8796
  }
8750
8797
  export const UpdateAccountRequest = {
@@ -8773,6 +8820,12 @@ export const UpdateAccountRequest = {
8773
8820
  if (message.dob !== undefined) {
8774
8821
  Timestamp.encode(toTimestamp(message.dob), writer.uint32(66).fork()).ldelim();
8775
8822
  }
8823
+ if (message.logo !== "") {
8824
+ writer.uint32(74).string(message.logo);
8825
+ }
8826
+ if (message.splash_screen !== "") {
8827
+ writer.uint32(82).string(message.splash_screen);
8828
+ }
8776
8829
  return writer;
8777
8830
  },
8778
8831
  decode(input, length) {
@@ -8830,6 +8883,18 @@ export const UpdateAccountRequest = {
8830
8883
  }
8831
8884
  message.dob = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
8832
8885
  continue;
8886
+ case 9:
8887
+ if (tag !== 74) {
8888
+ break;
8889
+ }
8890
+ message.logo = reader.string();
8891
+ continue;
8892
+ case 10:
8893
+ if (tag !== 82) {
8894
+ break;
8895
+ }
8896
+ message.splash_screen = reader.string();
8897
+ continue;
8833
8898
  }
8834
8899
  if ((tag & 7) === 4 || tag === 0) {
8835
8900
  break;
@@ -8848,6 +8913,8 @@ export const UpdateAccountRequest = {
8848
8913
  timezone: isSet(object.timezone) ? String(object.timezone) : undefined,
8849
8914
  about_me: isSet(object.about_me) ? globalThis.String(object.about_me) : "",
8850
8915
  dob: isSet(object.dob) ? fromJsonTimestamp(object.dob) : undefined,
8916
+ logo: isSet(object.logo) ? globalThis.String(object.logo) : "",
8917
+ splash_screen: isSet(object.splash_screen) ? globalThis.String(object.splash_screen) : "",
8851
8918
  };
8852
8919
  },
8853
8920
  toJSON(message) {
@@ -8876,6 +8943,12 @@ export const UpdateAccountRequest = {
8876
8943
  if (message.dob !== undefined) {
8877
8944
  obj.dob = message.dob.toISOString();
8878
8945
  }
8946
+ if (message.logo !== "") {
8947
+ obj.logo = message.logo;
8948
+ }
8949
+ if (message.splash_screen !== "") {
8950
+ obj.splash_screen = message.splash_screen;
8951
+ }
8879
8952
  return obj;
8880
8953
  },
8881
8954
  create(base) {
@@ -8891,6 +8964,8 @@ export const UpdateAccountRequest = {
8891
8964
  message.timezone = object.timezone ?? undefined;
8892
8965
  message.about_me = object.about_me ?? "";
8893
8966
  message.dob = object.dob ?? undefined;
8967
+ message.logo = object.logo ?? "";
8968
+ message.splash_screen = object.splash_screen ?? "";
8894
8969
  return message;
8895
8970
  },
8896
8971
  };
@@ -26868,6 +26943,7 @@ function createBaseAuditLog() {
26868
26943
  entity_id: "",
26869
26944
  details: "",
26870
26945
  time_log: undefined,
26946
+ channel_id: "",
26871
26947
  };
26872
26948
  }
26873
26949
  export const AuditLog = {
@@ -26896,6 +26972,9 @@ export const AuditLog = {
26896
26972
  if (message.time_log !== undefined) {
26897
26973
  Timestamp.encode(toTimestamp(message.time_log), writer.uint32(66).fork()).ldelim();
26898
26974
  }
26975
+ if (message.channel_id !== "") {
26976
+ writer.uint32(74).string(message.channel_id);
26977
+ }
26899
26978
  return writer;
26900
26979
  },
26901
26980
  decode(input, length) {
@@ -26953,6 +27032,12 @@ export const AuditLog = {
26953
27032
  }
26954
27033
  message.time_log = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
26955
27034
  continue;
27035
+ case 9:
27036
+ if (tag !== 74) {
27037
+ break;
27038
+ }
27039
+ message.channel_id = reader.string();
27040
+ continue;
26956
27041
  }
26957
27042
  if ((tag & 7) === 4 || tag === 0) {
26958
27043
  break;
@@ -26971,6 +27056,7 @@ export const AuditLog = {
26971
27056
  entity_id: isSet(object.entity_id) ? globalThis.String(object.entity_id) : "",
26972
27057
  details: isSet(object.details) ? globalThis.String(object.details) : "",
26973
27058
  time_log: isSet(object.time_log) ? fromJsonTimestamp(object.time_log) : undefined,
27059
+ channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
26974
27060
  };
26975
27061
  },
26976
27062
  toJSON(message) {
@@ -26999,6 +27085,9 @@ export const AuditLog = {
26999
27085
  if (message.time_log !== undefined) {
27000
27086
  obj.time_log = message.time_log.toISOString();
27001
27087
  }
27088
+ if (message.channel_id !== "") {
27089
+ obj.channel_id = message.channel_id;
27090
+ }
27002
27091
  return obj;
27003
27092
  },
27004
27093
  create(base) {
@@ -27014,6 +27103,7 @@ export const AuditLog = {
27014
27103
  message.entity_id = object.entity_id ?? "";
27015
27104
  message.details = object.details ?? "";
27016
27105
  message.time_log = object.time_log ?? undefined;
27106
+ message.channel_id = object.channel_id ?? "";
27017
27107
  return message;
27018
27108
  },
27019
27109
  };
@@ -29474,6 +29564,875 @@ export const UpdateOnboardingStepRequest = {
29474
29564
  return message;
29475
29565
  },
29476
29566
  };
29567
+ function createBasePTTChannelUser() {
29568
+ return { id: "", user_id: "", channel_id: "", participant: "" };
29569
+ }
29570
+ export const PTTChannelUser = {
29571
+ encode(message, writer = _m0.Writer.create()) {
29572
+ if (message.id !== "") {
29573
+ writer.uint32(10).string(message.id);
29574
+ }
29575
+ if (message.user_id !== "") {
29576
+ writer.uint32(18).string(message.user_id);
29577
+ }
29578
+ if (message.channel_id !== "") {
29579
+ writer.uint32(26).string(message.channel_id);
29580
+ }
29581
+ if (message.participant !== "") {
29582
+ writer.uint32(34).string(message.participant);
29583
+ }
29584
+ return writer;
29585
+ },
29586
+ decode(input, length) {
29587
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
29588
+ let end = length === undefined ? reader.len : reader.pos + length;
29589
+ const message = createBasePTTChannelUser();
29590
+ while (reader.pos < end) {
29591
+ const tag = reader.uint32();
29592
+ switch (tag >>> 3) {
29593
+ case 1:
29594
+ if (tag !== 10) {
29595
+ break;
29596
+ }
29597
+ message.id = reader.string();
29598
+ continue;
29599
+ case 2:
29600
+ if (tag !== 18) {
29601
+ break;
29602
+ }
29603
+ message.user_id = reader.string();
29604
+ continue;
29605
+ case 3:
29606
+ if (tag !== 26) {
29607
+ break;
29608
+ }
29609
+ message.channel_id = reader.string();
29610
+ continue;
29611
+ case 4:
29612
+ if (tag !== 34) {
29613
+ break;
29614
+ }
29615
+ message.participant = reader.string();
29616
+ continue;
29617
+ }
29618
+ if ((tag & 7) === 4 || tag === 0) {
29619
+ break;
29620
+ }
29621
+ reader.skipType(tag & 7);
29622
+ }
29623
+ return message;
29624
+ },
29625
+ fromJSON(object) {
29626
+ return {
29627
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
29628
+ user_id: isSet(object.user_id) ? globalThis.String(object.user_id) : "",
29629
+ channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
29630
+ participant: isSet(object.participant) ? globalThis.String(object.participant) : "",
29631
+ };
29632
+ },
29633
+ toJSON(message) {
29634
+ const obj = {};
29635
+ if (message.id !== "") {
29636
+ obj.id = message.id;
29637
+ }
29638
+ if (message.user_id !== "") {
29639
+ obj.user_id = message.user_id;
29640
+ }
29641
+ if (message.channel_id !== "") {
29642
+ obj.channel_id = message.channel_id;
29643
+ }
29644
+ if (message.participant !== "") {
29645
+ obj.participant = message.participant;
29646
+ }
29647
+ return obj;
29648
+ },
29649
+ create(base) {
29650
+ return PTTChannelUser.fromPartial(base ?? {});
29651
+ },
29652
+ fromPartial(object) {
29653
+ const message = createBasePTTChannelUser();
29654
+ message.id = object.id ?? "";
29655
+ message.user_id = object.user_id ?? "";
29656
+ message.channel_id = object.channel_id ?? "";
29657
+ message.participant = object.participant ?? "";
29658
+ return message;
29659
+ },
29660
+ };
29661
+ function createBasePTTChannelUserList() {
29662
+ return { ptt_channel_users: [] };
29663
+ }
29664
+ export const PTTChannelUserList = {
29665
+ encode(message, writer = _m0.Writer.create()) {
29666
+ for (const v of message.ptt_channel_users) {
29667
+ PTTChannelUser.encode(v, writer.uint32(10).fork()).ldelim();
29668
+ }
29669
+ return writer;
29670
+ },
29671
+ decode(input, length) {
29672
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
29673
+ let end = length === undefined ? reader.len : reader.pos + length;
29674
+ const message = createBasePTTChannelUserList();
29675
+ while (reader.pos < end) {
29676
+ const tag = reader.uint32();
29677
+ switch (tag >>> 3) {
29678
+ case 1:
29679
+ if (tag !== 10) {
29680
+ break;
29681
+ }
29682
+ message.ptt_channel_users.push(PTTChannelUser.decode(reader, reader.uint32()));
29683
+ continue;
29684
+ }
29685
+ if ((tag & 7) === 4 || tag === 0) {
29686
+ break;
29687
+ }
29688
+ reader.skipType(tag & 7);
29689
+ }
29690
+ return message;
29691
+ },
29692
+ fromJSON(object) {
29693
+ return {
29694
+ ptt_channel_users: globalThis.Array.isArray(object?.ptt_channel_users)
29695
+ ? object.ptt_channel_users.map((e) => PTTChannelUser.fromJSON(e))
29696
+ : [],
29697
+ };
29698
+ },
29699
+ toJSON(message) {
29700
+ const obj = {};
29701
+ if (message.ptt_channel_users?.length) {
29702
+ obj.ptt_channel_users = message.ptt_channel_users.map((e) => PTTChannelUser.toJSON(e));
29703
+ }
29704
+ return obj;
29705
+ },
29706
+ create(base) {
29707
+ return PTTChannelUserList.fromPartial(base ?? {});
29708
+ },
29709
+ fromPartial(object) {
29710
+ const message = createBasePTTChannelUserList();
29711
+ message.ptt_channel_users = object.ptt_channel_users?.map((e) => PTTChannelUser.fromPartial(e)) || [];
29712
+ return message;
29713
+ },
29714
+ };
29715
+ function createBaseWalletLedger() {
29716
+ return { id: "", user_id: "", create_time: undefined, value: 0, transaction_id: "" };
29717
+ }
29718
+ export const WalletLedger = {
29719
+ encode(message, writer = _m0.Writer.create()) {
29720
+ if (message.id !== "") {
29721
+ writer.uint32(10).string(message.id);
29722
+ }
29723
+ if (message.user_id !== "") {
29724
+ writer.uint32(18).string(message.user_id);
29725
+ }
29726
+ if (message.create_time !== undefined) {
29727
+ Timestamp.encode(toTimestamp(message.create_time), writer.uint32(26).fork()).ldelim();
29728
+ }
29729
+ if (message.value !== 0) {
29730
+ writer.uint32(32).int32(message.value);
29731
+ }
29732
+ if (message.transaction_id !== "") {
29733
+ writer.uint32(42).string(message.transaction_id);
29734
+ }
29735
+ return writer;
29736
+ },
29737
+ decode(input, length) {
29738
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
29739
+ let end = length === undefined ? reader.len : reader.pos + length;
29740
+ const message = createBaseWalletLedger();
29741
+ while (reader.pos < end) {
29742
+ const tag = reader.uint32();
29743
+ switch (tag >>> 3) {
29744
+ case 1:
29745
+ if (tag !== 10) {
29746
+ break;
29747
+ }
29748
+ message.id = reader.string();
29749
+ continue;
29750
+ case 2:
29751
+ if (tag !== 18) {
29752
+ break;
29753
+ }
29754
+ message.user_id = reader.string();
29755
+ continue;
29756
+ case 3:
29757
+ if (tag !== 26) {
29758
+ break;
29759
+ }
29760
+ message.create_time = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
29761
+ continue;
29762
+ case 4:
29763
+ if (tag !== 32) {
29764
+ break;
29765
+ }
29766
+ message.value = reader.int32();
29767
+ continue;
29768
+ case 5:
29769
+ if (tag !== 42) {
29770
+ break;
29771
+ }
29772
+ message.transaction_id = reader.string();
29773
+ continue;
29774
+ }
29775
+ if ((tag & 7) === 4 || tag === 0) {
29776
+ break;
29777
+ }
29778
+ reader.skipType(tag & 7);
29779
+ }
29780
+ return message;
29781
+ },
29782
+ fromJSON(object) {
29783
+ return {
29784
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
29785
+ user_id: isSet(object.user_id) ? globalThis.String(object.user_id) : "",
29786
+ create_time: isSet(object.create_time) ? fromJsonTimestamp(object.create_time) : undefined,
29787
+ value: isSet(object.value) ? globalThis.Number(object.value) : 0,
29788
+ transaction_id: isSet(object.transaction_id) ? globalThis.String(object.transaction_id) : "",
29789
+ };
29790
+ },
29791
+ toJSON(message) {
29792
+ const obj = {};
29793
+ if (message.id !== "") {
29794
+ obj.id = message.id;
29795
+ }
29796
+ if (message.user_id !== "") {
29797
+ obj.user_id = message.user_id;
29798
+ }
29799
+ if (message.create_time !== undefined) {
29800
+ obj.create_time = message.create_time.toISOString();
29801
+ }
29802
+ if (message.value !== 0) {
29803
+ obj.value = Math.round(message.value);
29804
+ }
29805
+ if (message.transaction_id !== "") {
29806
+ obj.transaction_id = message.transaction_id;
29807
+ }
29808
+ return obj;
29809
+ },
29810
+ create(base) {
29811
+ return WalletLedger.fromPartial(base ?? {});
29812
+ },
29813
+ fromPartial(object) {
29814
+ const message = createBaseWalletLedger();
29815
+ message.id = object.id ?? "";
29816
+ message.user_id = object.user_id ?? "";
29817
+ message.create_time = object.create_time ?? undefined;
29818
+ message.value = object.value ?? 0;
29819
+ message.transaction_id = object.transaction_id ?? "";
29820
+ return message;
29821
+ },
29822
+ };
29823
+ function createBaseWalletLedgerList() {
29824
+ return { wallet_ledger: [], prev_cursor: "", next_cursor: "" };
29825
+ }
29826
+ export const WalletLedgerList = {
29827
+ encode(message, writer = _m0.Writer.create()) {
29828
+ for (const v of message.wallet_ledger) {
29829
+ WalletLedger.encode(v, writer.uint32(10).fork()).ldelim();
29830
+ }
29831
+ if (message.prev_cursor !== "") {
29832
+ writer.uint32(18).string(message.prev_cursor);
29833
+ }
29834
+ if (message.next_cursor !== "") {
29835
+ writer.uint32(26).string(message.next_cursor);
29836
+ }
29837
+ return writer;
29838
+ },
29839
+ decode(input, length) {
29840
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
29841
+ let end = length === undefined ? reader.len : reader.pos + length;
29842
+ const message = createBaseWalletLedgerList();
29843
+ while (reader.pos < end) {
29844
+ const tag = reader.uint32();
29845
+ switch (tag >>> 3) {
29846
+ case 1:
29847
+ if (tag !== 10) {
29848
+ break;
29849
+ }
29850
+ message.wallet_ledger.push(WalletLedger.decode(reader, reader.uint32()));
29851
+ continue;
29852
+ case 2:
29853
+ if (tag !== 18) {
29854
+ break;
29855
+ }
29856
+ message.prev_cursor = reader.string();
29857
+ continue;
29858
+ case 3:
29859
+ if (tag !== 26) {
29860
+ break;
29861
+ }
29862
+ message.next_cursor = reader.string();
29863
+ continue;
29864
+ }
29865
+ if ((tag & 7) === 4 || tag === 0) {
29866
+ break;
29867
+ }
29868
+ reader.skipType(tag & 7);
29869
+ }
29870
+ return message;
29871
+ },
29872
+ fromJSON(object) {
29873
+ return {
29874
+ wallet_ledger: globalThis.Array.isArray(object?.wallet_ledger)
29875
+ ? object.wallet_ledger.map((e) => WalletLedger.fromJSON(e))
29876
+ : [],
29877
+ prev_cursor: isSet(object.prev_cursor) ? globalThis.String(object.prev_cursor) : "",
29878
+ next_cursor: isSet(object.next_cursor) ? globalThis.String(object.next_cursor) : "",
29879
+ };
29880
+ },
29881
+ toJSON(message) {
29882
+ const obj = {};
29883
+ if (message.wallet_ledger?.length) {
29884
+ obj.wallet_ledger = message.wallet_ledger.map((e) => WalletLedger.toJSON(e));
29885
+ }
29886
+ if (message.prev_cursor !== "") {
29887
+ obj.prev_cursor = message.prev_cursor;
29888
+ }
29889
+ if (message.next_cursor !== "") {
29890
+ obj.next_cursor = message.next_cursor;
29891
+ }
29892
+ return obj;
29893
+ },
29894
+ create(base) {
29895
+ return WalletLedgerList.fromPartial(base ?? {});
29896
+ },
29897
+ fromPartial(object) {
29898
+ const message = createBaseWalletLedgerList();
29899
+ message.wallet_ledger = object.wallet_ledger?.map((e) => WalletLedger.fromPartial(e)) || [];
29900
+ message.prev_cursor = object.prev_cursor ?? "";
29901
+ message.next_cursor = object.next_cursor ?? "";
29902
+ return message;
29903
+ },
29904
+ };
29905
+ function createBaseWalletLedgerListReq() {
29906
+ return { limit: undefined, cursor: "", transaction_id: "" };
29907
+ }
29908
+ export const WalletLedgerListReq = {
29909
+ encode(message, writer = _m0.Writer.create()) {
29910
+ if (message.limit !== undefined) {
29911
+ Int32Value.encode({ value: message.limit }, writer.uint32(10).fork()).ldelim();
29912
+ }
29913
+ if (message.cursor !== "") {
29914
+ writer.uint32(18).string(message.cursor);
29915
+ }
29916
+ if (message.transaction_id !== "") {
29917
+ writer.uint32(26).string(message.transaction_id);
29918
+ }
29919
+ return writer;
29920
+ },
29921
+ decode(input, length) {
29922
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
29923
+ let end = length === undefined ? reader.len : reader.pos + length;
29924
+ const message = createBaseWalletLedgerListReq();
29925
+ while (reader.pos < end) {
29926
+ const tag = reader.uint32();
29927
+ switch (tag >>> 3) {
29928
+ case 1:
29929
+ if (tag !== 10) {
29930
+ break;
29931
+ }
29932
+ message.limit = Int32Value.decode(reader, reader.uint32()).value;
29933
+ continue;
29934
+ case 2:
29935
+ if (tag !== 18) {
29936
+ break;
29937
+ }
29938
+ message.cursor = reader.string();
29939
+ continue;
29940
+ case 3:
29941
+ if (tag !== 26) {
29942
+ break;
29943
+ }
29944
+ message.transaction_id = reader.string();
29945
+ continue;
29946
+ }
29947
+ if ((tag & 7) === 4 || tag === 0) {
29948
+ break;
29949
+ }
29950
+ reader.skipType(tag & 7);
29951
+ }
29952
+ return message;
29953
+ },
29954
+ fromJSON(object) {
29955
+ return {
29956
+ limit: isSet(object.limit) ? Number(object.limit) : undefined,
29957
+ cursor: isSet(object.cursor) ? globalThis.String(object.cursor) : "",
29958
+ transaction_id: isSet(object.transaction_id) ? globalThis.String(object.transaction_id) : "",
29959
+ };
29960
+ },
29961
+ toJSON(message) {
29962
+ const obj = {};
29963
+ if (message.limit !== undefined) {
29964
+ obj.limit = message.limit;
29965
+ }
29966
+ if (message.cursor !== "") {
29967
+ obj.cursor = message.cursor;
29968
+ }
29969
+ if (message.transaction_id !== "") {
29970
+ obj.transaction_id = message.transaction_id;
29971
+ }
29972
+ return obj;
29973
+ },
29974
+ create(base) {
29975
+ return WalletLedgerListReq.fromPartial(base ?? {});
29976
+ },
29977
+ fromPartial(object) {
29978
+ const message = createBaseWalletLedgerListReq();
29979
+ message.limit = object.limit ?? undefined;
29980
+ message.cursor = object.cursor ?? "";
29981
+ message.transaction_id = object.transaction_id ?? "";
29982
+ return message;
29983
+ },
29984
+ };
29985
+ function createBaseSdTopic() {
29986
+ return {
29987
+ id: "",
29988
+ creator_id: "",
29989
+ message_id: "",
29990
+ clan_id: "",
29991
+ channel_id: "",
29992
+ status: 0,
29993
+ create_time: undefined,
29994
+ update_time: undefined,
29995
+ };
29996
+ }
29997
+ export const SdTopic = {
29998
+ encode(message, writer = _m0.Writer.create()) {
29999
+ if (message.id !== "") {
30000
+ writer.uint32(10).string(message.id);
30001
+ }
30002
+ if (message.creator_id !== "") {
30003
+ writer.uint32(18).string(message.creator_id);
30004
+ }
30005
+ if (message.message_id !== "") {
30006
+ writer.uint32(26).string(message.message_id);
30007
+ }
30008
+ if (message.clan_id !== "") {
30009
+ writer.uint32(34).string(message.clan_id);
30010
+ }
30011
+ if (message.channel_id !== "") {
30012
+ writer.uint32(42).string(message.channel_id);
30013
+ }
30014
+ if (message.status !== 0) {
30015
+ writer.uint32(48).int32(message.status);
30016
+ }
30017
+ if (message.create_time !== undefined) {
30018
+ Timestamp.encode(toTimestamp(message.create_time), writer.uint32(58).fork()).ldelim();
30019
+ }
30020
+ if (message.update_time !== undefined) {
30021
+ Timestamp.encode(toTimestamp(message.update_time), writer.uint32(66).fork()).ldelim();
30022
+ }
30023
+ return writer;
30024
+ },
30025
+ decode(input, length) {
30026
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
30027
+ let end = length === undefined ? reader.len : reader.pos + length;
30028
+ const message = createBaseSdTopic();
30029
+ while (reader.pos < end) {
30030
+ const tag = reader.uint32();
30031
+ switch (tag >>> 3) {
30032
+ case 1:
30033
+ if (tag !== 10) {
30034
+ break;
30035
+ }
30036
+ message.id = reader.string();
30037
+ continue;
30038
+ case 2:
30039
+ if (tag !== 18) {
30040
+ break;
30041
+ }
30042
+ message.creator_id = reader.string();
30043
+ continue;
30044
+ case 3:
30045
+ if (tag !== 26) {
30046
+ break;
30047
+ }
30048
+ message.message_id = reader.string();
30049
+ continue;
30050
+ case 4:
30051
+ if (tag !== 34) {
30052
+ break;
30053
+ }
30054
+ message.clan_id = reader.string();
30055
+ continue;
30056
+ case 5:
30057
+ if (tag !== 42) {
30058
+ break;
30059
+ }
30060
+ message.channel_id = reader.string();
30061
+ continue;
30062
+ case 6:
30063
+ if (tag !== 48) {
30064
+ break;
30065
+ }
30066
+ message.status = reader.int32();
30067
+ continue;
30068
+ case 7:
30069
+ if (tag !== 58) {
30070
+ break;
30071
+ }
30072
+ message.create_time = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
30073
+ continue;
30074
+ case 8:
30075
+ if (tag !== 66) {
30076
+ break;
30077
+ }
30078
+ message.update_time = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
30079
+ continue;
30080
+ }
30081
+ if ((tag & 7) === 4 || tag === 0) {
30082
+ break;
30083
+ }
30084
+ reader.skipType(tag & 7);
30085
+ }
30086
+ return message;
30087
+ },
30088
+ fromJSON(object) {
30089
+ return {
30090
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
30091
+ creator_id: isSet(object.creator_id) ? globalThis.String(object.creator_id) : "",
30092
+ message_id: isSet(object.message_id) ? globalThis.String(object.message_id) : "",
30093
+ clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
30094
+ channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
30095
+ status: isSet(object.status) ? globalThis.Number(object.status) : 0,
30096
+ create_time: isSet(object.create_time) ? fromJsonTimestamp(object.create_time) : undefined,
30097
+ update_time: isSet(object.update_time) ? fromJsonTimestamp(object.update_time) : undefined,
30098
+ };
30099
+ },
30100
+ toJSON(message) {
30101
+ const obj = {};
30102
+ if (message.id !== "") {
30103
+ obj.id = message.id;
30104
+ }
30105
+ if (message.creator_id !== "") {
30106
+ obj.creator_id = message.creator_id;
30107
+ }
30108
+ if (message.message_id !== "") {
30109
+ obj.message_id = message.message_id;
30110
+ }
30111
+ if (message.clan_id !== "") {
30112
+ obj.clan_id = message.clan_id;
30113
+ }
30114
+ if (message.channel_id !== "") {
30115
+ obj.channel_id = message.channel_id;
30116
+ }
30117
+ if (message.status !== 0) {
30118
+ obj.status = Math.round(message.status);
30119
+ }
30120
+ if (message.create_time !== undefined) {
30121
+ obj.create_time = message.create_time.toISOString();
30122
+ }
30123
+ if (message.update_time !== undefined) {
30124
+ obj.update_time = message.update_time.toISOString();
30125
+ }
30126
+ return obj;
30127
+ },
30128
+ create(base) {
30129
+ return SdTopic.fromPartial(base ?? {});
30130
+ },
30131
+ fromPartial(object) {
30132
+ const message = createBaseSdTopic();
30133
+ message.id = object.id ?? "";
30134
+ message.creator_id = object.creator_id ?? "";
30135
+ message.message_id = object.message_id ?? "";
30136
+ message.clan_id = object.clan_id ?? "";
30137
+ message.channel_id = object.channel_id ?? "";
30138
+ message.status = object.status ?? 0;
30139
+ message.create_time = object.create_time ?? undefined;
30140
+ message.update_time = object.update_time ?? undefined;
30141
+ return message;
30142
+ },
30143
+ };
30144
+ function createBaseSdTopicRequest() {
30145
+ return { message_id: "", clan_id: "", channel_id: "" };
30146
+ }
30147
+ export const SdTopicRequest = {
30148
+ encode(message, writer = _m0.Writer.create()) {
30149
+ if (message.message_id !== "") {
30150
+ writer.uint32(10).string(message.message_id);
30151
+ }
30152
+ if (message.clan_id !== "") {
30153
+ writer.uint32(18).string(message.clan_id);
30154
+ }
30155
+ if (message.channel_id !== "") {
30156
+ writer.uint32(26).string(message.channel_id);
30157
+ }
30158
+ return writer;
30159
+ },
30160
+ decode(input, length) {
30161
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
30162
+ let end = length === undefined ? reader.len : reader.pos + length;
30163
+ const message = createBaseSdTopicRequest();
30164
+ while (reader.pos < end) {
30165
+ const tag = reader.uint32();
30166
+ switch (tag >>> 3) {
30167
+ case 1:
30168
+ if (tag !== 10) {
30169
+ break;
30170
+ }
30171
+ message.message_id = reader.string();
30172
+ continue;
30173
+ case 2:
30174
+ if (tag !== 18) {
30175
+ break;
30176
+ }
30177
+ message.clan_id = reader.string();
30178
+ continue;
30179
+ case 3:
30180
+ if (tag !== 26) {
30181
+ break;
30182
+ }
30183
+ message.channel_id = reader.string();
30184
+ continue;
30185
+ }
30186
+ if ((tag & 7) === 4 || tag === 0) {
30187
+ break;
30188
+ }
30189
+ reader.skipType(tag & 7);
30190
+ }
30191
+ return message;
30192
+ },
30193
+ fromJSON(object) {
30194
+ return {
30195
+ message_id: isSet(object.message_id) ? globalThis.String(object.message_id) : "",
30196
+ clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
30197
+ channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
30198
+ };
30199
+ },
30200
+ toJSON(message) {
30201
+ const obj = {};
30202
+ if (message.message_id !== "") {
30203
+ obj.message_id = message.message_id;
30204
+ }
30205
+ if (message.clan_id !== "") {
30206
+ obj.clan_id = message.clan_id;
30207
+ }
30208
+ if (message.channel_id !== "") {
30209
+ obj.channel_id = message.channel_id;
30210
+ }
30211
+ return obj;
30212
+ },
30213
+ create(base) {
30214
+ return SdTopicRequest.fromPartial(base ?? {});
30215
+ },
30216
+ fromPartial(object) {
30217
+ const message = createBaseSdTopicRequest();
30218
+ message.message_id = object.message_id ?? "";
30219
+ message.clan_id = object.clan_id ?? "";
30220
+ message.channel_id = object.channel_id ?? "";
30221
+ return message;
30222
+ },
30223
+ };
30224
+ function createBaseSdTopicList() {
30225
+ return { count: 0, topics: [] };
30226
+ }
30227
+ export const SdTopicList = {
30228
+ encode(message, writer = _m0.Writer.create()) {
30229
+ if (message.count !== 0) {
30230
+ writer.uint32(8).int32(message.count);
30231
+ }
30232
+ for (const v of message.topics) {
30233
+ SdTopic.encode(v, writer.uint32(18).fork()).ldelim();
30234
+ }
30235
+ return writer;
30236
+ },
30237
+ decode(input, length) {
30238
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
30239
+ let end = length === undefined ? reader.len : reader.pos + length;
30240
+ const message = createBaseSdTopicList();
30241
+ while (reader.pos < end) {
30242
+ const tag = reader.uint32();
30243
+ switch (tag >>> 3) {
30244
+ case 1:
30245
+ if (tag !== 8) {
30246
+ break;
30247
+ }
30248
+ message.count = reader.int32();
30249
+ continue;
30250
+ case 2:
30251
+ if (tag !== 18) {
30252
+ break;
30253
+ }
30254
+ message.topics.push(SdTopic.decode(reader, reader.uint32()));
30255
+ continue;
30256
+ }
30257
+ if ((tag & 7) === 4 || tag === 0) {
30258
+ break;
30259
+ }
30260
+ reader.skipType(tag & 7);
30261
+ }
30262
+ return message;
30263
+ },
30264
+ fromJSON(object) {
30265
+ return {
30266
+ count: isSet(object.count) ? globalThis.Number(object.count) : 0,
30267
+ topics: globalThis.Array.isArray(object?.topics) ? object.topics.map((e) => SdTopic.fromJSON(e)) : [],
30268
+ };
30269
+ },
30270
+ toJSON(message) {
30271
+ const obj = {};
30272
+ if (message.count !== 0) {
30273
+ obj.count = Math.round(message.count);
30274
+ }
30275
+ if (message.topics?.length) {
30276
+ obj.topics = message.topics.map((e) => SdTopic.toJSON(e));
30277
+ }
30278
+ return obj;
30279
+ },
30280
+ create(base) {
30281
+ return SdTopicList.fromPartial(base ?? {});
30282
+ },
30283
+ fromPartial(object) {
30284
+ const message = createBaseSdTopicList();
30285
+ message.count = object.count ?? 0;
30286
+ message.topics = object.topics?.map((e) => SdTopic.fromPartial(e)) || [];
30287
+ return message;
30288
+ },
30289
+ };
30290
+ function createBaseListSdTopicRequest() {
30291
+ return { channel_id: "", limit: 0 };
30292
+ }
30293
+ export const ListSdTopicRequest = {
30294
+ encode(message, writer = _m0.Writer.create()) {
30295
+ if (message.channel_id !== "") {
30296
+ writer.uint32(10).string(message.channel_id);
30297
+ }
30298
+ if (message.limit !== 0) {
30299
+ writer.uint32(16).int32(message.limit);
30300
+ }
30301
+ return writer;
30302
+ },
30303
+ decode(input, length) {
30304
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
30305
+ let end = length === undefined ? reader.len : reader.pos + length;
30306
+ const message = createBaseListSdTopicRequest();
30307
+ while (reader.pos < end) {
30308
+ const tag = reader.uint32();
30309
+ switch (tag >>> 3) {
30310
+ case 1:
30311
+ if (tag !== 10) {
30312
+ break;
30313
+ }
30314
+ message.channel_id = reader.string();
30315
+ continue;
30316
+ case 2:
30317
+ if (tag !== 16) {
30318
+ break;
30319
+ }
30320
+ message.limit = reader.int32();
30321
+ continue;
30322
+ }
30323
+ if ((tag & 7) === 4 || tag === 0) {
30324
+ break;
30325
+ }
30326
+ reader.skipType(tag & 7);
30327
+ }
30328
+ return message;
30329
+ },
30330
+ fromJSON(object) {
30331
+ return {
30332
+ channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
30333
+ limit: isSet(object.limit) ? globalThis.Number(object.limit) : 0,
30334
+ };
30335
+ },
30336
+ toJSON(message) {
30337
+ const obj = {};
30338
+ if (message.channel_id !== "") {
30339
+ obj.channel_id = message.channel_id;
30340
+ }
30341
+ if (message.limit !== 0) {
30342
+ obj.limit = Math.round(message.limit);
30343
+ }
30344
+ return obj;
30345
+ },
30346
+ create(base) {
30347
+ return ListSdTopicRequest.fromPartial(base ?? {});
30348
+ },
30349
+ fromPartial(object) {
30350
+ const message = createBaseListSdTopicRequest();
30351
+ message.channel_id = object.channel_id ?? "";
30352
+ message.limit = object.limit ?? 0;
30353
+ return message;
30354
+ },
30355
+ };
30356
+ function createBaseDeleteSdTopicRequest() {
30357
+ return { channel_id: "", id: "", clan_id: "" };
30358
+ }
30359
+ export const DeleteSdTopicRequest = {
30360
+ encode(message, writer = _m0.Writer.create()) {
30361
+ if (message.channel_id !== "") {
30362
+ writer.uint32(10).string(message.channel_id);
30363
+ }
30364
+ if (message.id !== "") {
30365
+ writer.uint32(18).string(message.id);
30366
+ }
30367
+ if (message.clan_id !== "") {
30368
+ writer.uint32(26).string(message.clan_id);
30369
+ }
30370
+ return writer;
30371
+ },
30372
+ decode(input, length) {
30373
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
30374
+ let end = length === undefined ? reader.len : reader.pos + length;
30375
+ const message = createBaseDeleteSdTopicRequest();
30376
+ while (reader.pos < end) {
30377
+ const tag = reader.uint32();
30378
+ switch (tag >>> 3) {
30379
+ case 1:
30380
+ if (tag !== 10) {
30381
+ break;
30382
+ }
30383
+ message.channel_id = reader.string();
30384
+ continue;
30385
+ case 2:
30386
+ if (tag !== 18) {
30387
+ break;
30388
+ }
30389
+ message.id = reader.string();
30390
+ continue;
30391
+ case 3:
30392
+ if (tag !== 26) {
30393
+ break;
30394
+ }
30395
+ message.clan_id = reader.string();
30396
+ continue;
30397
+ }
30398
+ if ((tag & 7) === 4 || tag === 0) {
30399
+ break;
30400
+ }
30401
+ reader.skipType(tag & 7);
30402
+ }
30403
+ return message;
30404
+ },
30405
+ fromJSON(object) {
30406
+ return {
30407
+ channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
30408
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
30409
+ clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
30410
+ };
30411
+ },
30412
+ toJSON(message) {
30413
+ const obj = {};
30414
+ if (message.channel_id !== "") {
30415
+ obj.channel_id = message.channel_id;
30416
+ }
30417
+ if (message.id !== "") {
30418
+ obj.id = message.id;
30419
+ }
30420
+ if (message.clan_id !== "") {
30421
+ obj.clan_id = message.clan_id;
30422
+ }
30423
+ return obj;
30424
+ },
30425
+ create(base) {
30426
+ return DeleteSdTopicRequest.fromPartial(base ?? {});
30427
+ },
30428
+ fromPartial(object) {
30429
+ const message = createBaseDeleteSdTopicRequest();
30430
+ message.channel_id = object.channel_id ?? "";
30431
+ message.id = object.id ?? "";
30432
+ message.clan_id = object.clan_id ?? "";
30433
+ return message;
30434
+ },
30435
+ };
29477
30436
  function bytesFromBase64(b64) {
29478
30437
  if (globalThis.Buffer) {
29479
30438
  return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));