mezon-js-protobuf 1.8.54 → 1.8.56

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
@@ -259,6 +259,15 @@ export interface SessionLogoutRequest {
259
259
  platform: string;
260
260
  }
261
261
 
262
+ export interface IsBannedResponse {
263
+ is_banned: boolean;
264
+ expired_ban_time: number;
265
+ }
266
+
267
+ export interface IsBannedRequest {
268
+ channel_id: string;
269
+ }
270
+
262
271
  /** Ban users from a group. */
263
272
  export interface BanGroupUsersRequest {
264
273
  /** The group to ban users from. */
@@ -656,6 +665,8 @@ export interface ChannelUserList_ChannelUser {
656
665
  added_by: string;
657
666
  /** is banned */
658
667
  is_banned: boolean;
668
+ /** expired time */
669
+ expired_ban_time: number;
659
670
  }
660
671
 
661
672
  /** A list of users belonging to a channel, along with their role. */
@@ -1236,7 +1247,9 @@ export interface UpdateClanDescRequest {
1236
1247
  /** Clan name */
1237
1248
  clan_name: string;
1238
1249
  /** Clan logo */
1239
- logo: string;
1250
+ logo:
1251
+ | string
1252
+ | undefined;
1240
1253
  /** Clan banner */
1241
1254
  banner:
1242
1255
  | string
@@ -1262,9 +1275,13 @@ export interface UpdateClanDescRequest {
1262
1275
  | string
1263
1276
  | undefined;
1264
1277
  /** string description */
1265
- description: string;
1278
+ description:
1279
+ | string
1280
+ | undefined;
1266
1281
  /** About */
1267
- about: string;
1282
+ about:
1283
+ | string
1284
+ | undefined;
1268
1285
  /** Short url for community */
1269
1286
  short_url:
1270
1287
  | string
@@ -1754,9 +1771,7 @@ export interface BannedUser {
1754
1771
  /** The banned user. */
1755
1772
  banned_id: string;
1756
1773
  /** The avatar */
1757
- banned_avatar: string;
1758
- /** The name */
1759
- banned_name: string;
1774
+ banner_id: string;
1760
1775
  /** ban time */
1761
1776
  ban_time: number;
1762
1777
  /** The reason */
@@ -4635,6 +4650,137 @@ export const SessionLogoutRequest = {
4635
4650
  },
4636
4651
  };
4637
4652
 
4653
+ function createBaseIsBannedResponse(): IsBannedResponse {
4654
+ return { is_banned: false, expired_ban_time: 0 };
4655
+ }
4656
+
4657
+ export const IsBannedResponse = {
4658
+ encode(message: IsBannedResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
4659
+ if (message.is_banned !== false) {
4660
+ writer.uint32(8).bool(message.is_banned);
4661
+ }
4662
+ if (message.expired_ban_time !== 0) {
4663
+ writer.uint32(16).int32(message.expired_ban_time);
4664
+ }
4665
+ return writer;
4666
+ },
4667
+
4668
+ decode(input: _m0.Reader | Uint8Array, length?: number): IsBannedResponse {
4669
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
4670
+ let end = length === undefined ? reader.len : reader.pos + length;
4671
+ const message = createBaseIsBannedResponse();
4672
+ while (reader.pos < end) {
4673
+ const tag = reader.uint32();
4674
+ switch (tag >>> 3) {
4675
+ case 1:
4676
+ if (tag !== 8) {
4677
+ break;
4678
+ }
4679
+
4680
+ message.is_banned = reader.bool();
4681
+ continue;
4682
+ case 2:
4683
+ if (tag !== 16) {
4684
+ break;
4685
+ }
4686
+
4687
+ message.expired_ban_time = reader.int32();
4688
+ continue;
4689
+ }
4690
+ if ((tag & 7) === 4 || tag === 0) {
4691
+ break;
4692
+ }
4693
+ reader.skipType(tag & 7);
4694
+ }
4695
+ return message;
4696
+ },
4697
+
4698
+ fromJSON(object: any): IsBannedResponse {
4699
+ return {
4700
+ is_banned: isSet(object.is_banned) ? globalThis.Boolean(object.is_banned) : false,
4701
+ expired_ban_time: isSet(object.expired_ban_time) ? globalThis.Number(object.expired_ban_time) : 0,
4702
+ };
4703
+ },
4704
+
4705
+ toJSON(message: IsBannedResponse): unknown {
4706
+ const obj: any = {};
4707
+ if (message.is_banned !== false) {
4708
+ obj.is_banned = message.is_banned;
4709
+ }
4710
+ if (message.expired_ban_time !== 0) {
4711
+ obj.expired_ban_time = Math.round(message.expired_ban_time);
4712
+ }
4713
+ return obj;
4714
+ },
4715
+
4716
+ create<I extends Exact<DeepPartial<IsBannedResponse>, I>>(base?: I): IsBannedResponse {
4717
+ return IsBannedResponse.fromPartial(base ?? ({} as any));
4718
+ },
4719
+ fromPartial<I extends Exact<DeepPartial<IsBannedResponse>, I>>(object: I): IsBannedResponse {
4720
+ const message = createBaseIsBannedResponse();
4721
+ message.is_banned = object.is_banned ?? false;
4722
+ message.expired_ban_time = object.expired_ban_time ?? 0;
4723
+ return message;
4724
+ },
4725
+ };
4726
+
4727
+ function createBaseIsBannedRequest(): IsBannedRequest {
4728
+ return { channel_id: "" };
4729
+ }
4730
+
4731
+ export const IsBannedRequest = {
4732
+ encode(message: IsBannedRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
4733
+ if (message.channel_id !== "") {
4734
+ writer.uint32(10).string(message.channel_id);
4735
+ }
4736
+ return writer;
4737
+ },
4738
+
4739
+ decode(input: _m0.Reader | Uint8Array, length?: number): IsBannedRequest {
4740
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
4741
+ let end = length === undefined ? reader.len : reader.pos + length;
4742
+ const message = createBaseIsBannedRequest();
4743
+ while (reader.pos < end) {
4744
+ const tag = reader.uint32();
4745
+ switch (tag >>> 3) {
4746
+ case 1:
4747
+ if (tag !== 10) {
4748
+ break;
4749
+ }
4750
+
4751
+ message.channel_id = reader.string();
4752
+ continue;
4753
+ }
4754
+ if ((tag & 7) === 4 || tag === 0) {
4755
+ break;
4756
+ }
4757
+ reader.skipType(tag & 7);
4758
+ }
4759
+ return message;
4760
+ },
4761
+
4762
+ fromJSON(object: any): IsBannedRequest {
4763
+ return { channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "" };
4764
+ },
4765
+
4766
+ toJSON(message: IsBannedRequest): unknown {
4767
+ const obj: any = {};
4768
+ if (message.channel_id !== "") {
4769
+ obj.channel_id = message.channel_id;
4770
+ }
4771
+ return obj;
4772
+ },
4773
+
4774
+ create<I extends Exact<DeepPartial<IsBannedRequest>, I>>(base?: I): IsBannedRequest {
4775
+ return IsBannedRequest.fromPartial(base ?? ({} as any));
4776
+ },
4777
+ fromPartial<I extends Exact<DeepPartial<IsBannedRequest>, I>>(object: I): IsBannedRequest {
4778
+ const message = createBaseIsBannedRequest();
4779
+ message.channel_id = object.channel_id ?? "";
4780
+ return message;
4781
+ },
4782
+ };
4783
+
4638
4784
  function createBaseBanGroupUsersRequest(): BanGroupUsersRequest {
4639
4785
  return { group_id: "", user_ids: [] };
4640
4786
  }
@@ -7378,6 +7524,7 @@ function createBaseChannelUserList_ChannelUser(): ChannelUserList_ChannelUser {
7378
7524
  clan_id: "",
7379
7525
  added_by: "",
7380
7526
  is_banned: false,
7527
+ expired_ban_time: 0,
7381
7528
  };
7382
7529
  }
7383
7530
 
@@ -7410,6 +7557,9 @@ export const ChannelUserList_ChannelUser = {
7410
7557
  if (message.is_banned !== false) {
7411
7558
  writer.uint32(72).bool(message.is_banned);
7412
7559
  }
7560
+ if (message.expired_ban_time !== 0) {
7561
+ writer.uint32(80).int32(message.expired_ban_time);
7562
+ }
7413
7563
  return writer;
7414
7564
  },
7415
7565
 
@@ -7483,6 +7633,13 @@ export const ChannelUserList_ChannelUser = {
7483
7633
 
7484
7634
  message.is_banned = reader.bool();
7485
7635
  continue;
7636
+ case 10:
7637
+ if (tag !== 80) {
7638
+ break;
7639
+ }
7640
+
7641
+ message.expired_ban_time = reader.int32();
7642
+ continue;
7486
7643
  }
7487
7644
  if ((tag & 7) === 4 || tag === 0) {
7488
7645
  break;
@@ -7503,6 +7660,7 @@ export const ChannelUserList_ChannelUser = {
7503
7660
  clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
7504
7661
  added_by: isSet(object.added_by) ? globalThis.String(object.added_by) : "",
7505
7662
  is_banned: isSet(object.is_banned) ? globalThis.Boolean(object.is_banned) : false,
7663
+ expired_ban_time: isSet(object.expired_ban_time) ? globalThis.Number(object.expired_ban_time) : 0,
7506
7664
  };
7507
7665
  },
7508
7666
 
@@ -7535,6 +7693,9 @@ export const ChannelUserList_ChannelUser = {
7535
7693
  if (message.is_banned !== false) {
7536
7694
  obj.is_banned = message.is_banned;
7537
7695
  }
7696
+ if (message.expired_ban_time !== 0) {
7697
+ obj.expired_ban_time = Math.round(message.expired_ban_time);
7698
+ }
7538
7699
  return obj;
7539
7700
  },
7540
7701
 
@@ -7552,6 +7713,7 @@ export const ChannelUserList_ChannelUser = {
7552
7713
  message.clan_id = object.clan_id ?? "";
7553
7714
  message.added_by = object.added_by ?? "";
7554
7715
  message.is_banned = object.is_banned ?? false;
7716
+ message.expired_ban_time = object.expired_ban_time ?? 0;
7555
7717
  return message;
7556
7718
  },
7557
7719
  };
@@ -11959,7 +12121,7 @@ function createBaseUpdateClanDescRequest(): UpdateClanDescRequest {
11959
12121
  return {
11960
12122
  clan_id: "",
11961
12123
  clan_name: "",
11962
- logo: "",
12124
+ logo: undefined,
11963
12125
  banner: undefined,
11964
12126
  status: 0,
11965
12127
  is_onboarding: undefined,
@@ -11967,8 +12129,8 @@ function createBaseUpdateClanDescRequest(): UpdateClanDescRequest {
11967
12129
  onboarding_banner: undefined,
11968
12130
  is_community: undefined,
11969
12131
  community_banner: undefined,
11970
- description: "",
11971
- about: "",
12132
+ description: undefined,
12133
+ about: undefined,
11972
12134
  short_url: undefined,
11973
12135
  prevent_anonymous: false,
11974
12136
  };
@@ -11982,8 +12144,8 @@ export const UpdateClanDescRequest = {
11982
12144
  if (message.clan_name !== "") {
11983
12145
  writer.uint32(18).string(message.clan_name);
11984
12146
  }
11985
- if (message.logo !== "") {
11986
- writer.uint32(26).string(message.logo);
12147
+ if (message.logo !== undefined) {
12148
+ StringValue.encode({ value: message.logo! }, writer.uint32(26).fork()).ldelim();
11987
12149
  }
11988
12150
  if (message.banner !== undefined) {
11989
12151
  StringValue.encode({ value: message.banner! }, writer.uint32(34).fork()).ldelim();
@@ -12006,11 +12168,11 @@ export const UpdateClanDescRequest = {
12006
12168
  if (message.community_banner !== undefined) {
12007
12169
  StringValue.encode({ value: message.community_banner! }, writer.uint32(82).fork()).ldelim();
12008
12170
  }
12009
- if (message.description !== "") {
12010
- writer.uint32(90).string(message.description);
12171
+ if (message.description !== undefined) {
12172
+ StringValue.encode({ value: message.description! }, writer.uint32(90).fork()).ldelim();
12011
12173
  }
12012
- if (message.about !== "") {
12013
- writer.uint32(98).string(message.about);
12174
+ if (message.about !== undefined) {
12175
+ StringValue.encode({ value: message.about! }, writer.uint32(98).fork()).ldelim();
12014
12176
  }
12015
12177
  if (message.short_url !== undefined) {
12016
12178
  StringValue.encode({ value: message.short_url! }, writer.uint32(106).fork()).ldelim();
@@ -12047,7 +12209,7 @@ export const UpdateClanDescRequest = {
12047
12209
  break;
12048
12210
  }
12049
12211
 
12050
- message.logo = reader.string();
12212
+ message.logo = StringValue.decode(reader, reader.uint32()).value;
12051
12213
  continue;
12052
12214
  case 4:
12053
12215
  if (tag !== 34) {
@@ -12103,14 +12265,14 @@ export const UpdateClanDescRequest = {
12103
12265
  break;
12104
12266
  }
12105
12267
 
12106
- message.description = reader.string();
12268
+ message.description = StringValue.decode(reader, reader.uint32()).value;
12107
12269
  continue;
12108
12270
  case 12:
12109
12271
  if (tag !== 98) {
12110
12272
  break;
12111
12273
  }
12112
12274
 
12113
- message.about = reader.string();
12275
+ message.about = StringValue.decode(reader, reader.uint32()).value;
12114
12276
  continue;
12115
12277
  case 13:
12116
12278
  if (tag !== 106) {
@@ -12139,7 +12301,7 @@ export const UpdateClanDescRequest = {
12139
12301
  return {
12140
12302
  clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
12141
12303
  clan_name: isSet(object.clan_name) ? globalThis.String(object.clan_name) : "",
12142
- logo: isSet(object.logo) ? globalThis.String(object.logo) : "",
12304
+ logo: isSet(object.logo) ? String(object.logo) : undefined,
12143
12305
  banner: isSet(object.banner) ? String(object.banner) : undefined,
12144
12306
  status: isSet(object.status) ? globalThis.Number(object.status) : 0,
12145
12307
  is_onboarding: isSet(object.is_onboarding) ? Boolean(object.is_onboarding) : undefined,
@@ -12147,8 +12309,8 @@ export const UpdateClanDescRequest = {
12147
12309
  onboarding_banner: isSet(object.onboarding_banner) ? String(object.onboarding_banner) : undefined,
12148
12310
  is_community: isSet(object.is_community) ? Boolean(object.is_community) : undefined,
12149
12311
  community_banner: isSet(object.community_banner) ? String(object.community_banner) : undefined,
12150
- description: isSet(object.description) ? globalThis.String(object.description) : "",
12151
- about: isSet(object.about) ? globalThis.String(object.about) : "",
12312
+ description: isSet(object.description) ? String(object.description) : undefined,
12313
+ about: isSet(object.about) ? String(object.about) : undefined,
12152
12314
  short_url: isSet(object.short_url) ? String(object.short_url) : undefined,
12153
12315
  prevent_anonymous: isSet(object.prevent_anonymous) ? globalThis.Boolean(object.prevent_anonymous) : false,
12154
12316
  };
@@ -12162,7 +12324,7 @@ export const UpdateClanDescRequest = {
12162
12324
  if (message.clan_name !== "") {
12163
12325
  obj.clan_name = message.clan_name;
12164
12326
  }
12165
- if (message.logo !== "") {
12327
+ if (message.logo !== undefined) {
12166
12328
  obj.logo = message.logo;
12167
12329
  }
12168
12330
  if (message.banner !== undefined) {
@@ -12186,10 +12348,10 @@ export const UpdateClanDescRequest = {
12186
12348
  if (message.community_banner !== undefined) {
12187
12349
  obj.community_banner = message.community_banner;
12188
12350
  }
12189
- if (message.description !== "") {
12351
+ if (message.description !== undefined) {
12190
12352
  obj.description = message.description;
12191
12353
  }
12192
- if (message.about !== "") {
12354
+ if (message.about !== undefined) {
12193
12355
  obj.about = message.about;
12194
12356
  }
12195
12357
  if (message.short_url !== undefined) {
@@ -12208,7 +12370,7 @@ export const UpdateClanDescRequest = {
12208
12370
  const message = createBaseUpdateClanDescRequest();
12209
12371
  message.clan_id = object.clan_id ?? "";
12210
12372
  message.clan_name = object.clan_name ?? "";
12211
- message.logo = object.logo ?? "";
12373
+ message.logo = object.logo ?? undefined;
12212
12374
  message.banner = object.banner ?? undefined;
12213
12375
  message.status = object.status ?? 0;
12214
12376
  message.is_onboarding = object.is_onboarding ?? undefined;
@@ -12216,8 +12378,8 @@ export const UpdateClanDescRequest = {
12216
12378
  message.onboarding_banner = object.onboarding_banner ?? undefined;
12217
12379
  message.is_community = object.is_community ?? undefined;
12218
12380
  message.community_banner = object.community_banner ?? undefined;
12219
- message.description = object.description ?? "";
12220
- message.about = object.about ?? "";
12381
+ message.description = object.description ?? undefined;
12382
+ message.about = object.about ?? undefined;
12221
12383
  message.short_url = object.short_url ?? undefined;
12222
12384
  message.prevent_anonymous = object.prevent_anonymous ?? false;
12223
12385
  return message;
@@ -16442,7 +16604,7 @@ export const BanClanUsersRequest = {
16442
16604
  };
16443
16605
 
16444
16606
  function createBaseBannedUser(): BannedUser {
16445
- return { channel_id: "", banned_id: "", banned_avatar: "", banned_name: "", ban_time: 0, reason: "" };
16607
+ return { channel_id: "", banned_id: "", banner_id: "", ban_time: 0, reason: "" };
16446
16608
  }
16447
16609
 
16448
16610
  export const BannedUser = {
@@ -16453,17 +16615,14 @@ export const BannedUser = {
16453
16615
  if (message.banned_id !== "") {
16454
16616
  writer.uint32(18).string(message.banned_id);
16455
16617
  }
16456
- if (message.banned_avatar !== "") {
16457
- writer.uint32(26).string(message.banned_avatar);
16458
- }
16459
- if (message.banned_name !== "") {
16460
- writer.uint32(34).string(message.banned_name);
16618
+ if (message.banner_id !== "") {
16619
+ writer.uint32(26).string(message.banner_id);
16461
16620
  }
16462
16621
  if (message.ban_time !== 0) {
16463
- writer.uint32(40).int32(message.ban_time);
16622
+ writer.uint32(32).int32(message.ban_time);
16464
16623
  }
16465
16624
  if (message.reason !== "") {
16466
- writer.uint32(50).string(message.reason);
16625
+ writer.uint32(42).string(message.reason);
16467
16626
  }
16468
16627
  return writer;
16469
16628
  },
@@ -16494,24 +16653,17 @@ export const BannedUser = {
16494
16653
  break;
16495
16654
  }
16496
16655
 
16497
- message.banned_avatar = reader.string();
16656
+ message.banner_id = reader.string();
16498
16657
  continue;
16499
16658
  case 4:
16500
- if (tag !== 34) {
16501
- break;
16502
- }
16503
-
16504
- message.banned_name = reader.string();
16505
- continue;
16506
- case 5:
16507
- if (tag !== 40) {
16659
+ if (tag !== 32) {
16508
16660
  break;
16509
16661
  }
16510
16662
 
16511
16663
  message.ban_time = reader.int32();
16512
16664
  continue;
16513
- case 6:
16514
- if (tag !== 50) {
16665
+ case 5:
16666
+ if (tag !== 42) {
16515
16667
  break;
16516
16668
  }
16517
16669
 
@@ -16530,8 +16682,7 @@ export const BannedUser = {
16530
16682
  return {
16531
16683
  channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
16532
16684
  banned_id: isSet(object.banned_id) ? globalThis.String(object.banned_id) : "",
16533
- banned_avatar: isSet(object.banned_avatar) ? globalThis.String(object.banned_avatar) : "",
16534
- banned_name: isSet(object.banned_name) ? globalThis.String(object.banned_name) : "",
16685
+ banner_id: isSet(object.banner_id) ? globalThis.String(object.banner_id) : "",
16535
16686
  ban_time: isSet(object.ban_time) ? globalThis.Number(object.ban_time) : 0,
16536
16687
  reason: isSet(object.reason) ? globalThis.String(object.reason) : "",
16537
16688
  };
@@ -16545,11 +16696,8 @@ export const BannedUser = {
16545
16696
  if (message.banned_id !== "") {
16546
16697
  obj.banned_id = message.banned_id;
16547
16698
  }
16548
- if (message.banned_avatar !== "") {
16549
- obj.banned_avatar = message.banned_avatar;
16550
- }
16551
- if (message.banned_name !== "") {
16552
- obj.banned_name = message.banned_name;
16699
+ if (message.banner_id !== "") {
16700
+ obj.banner_id = message.banner_id;
16553
16701
  }
16554
16702
  if (message.ban_time !== 0) {
16555
16703
  obj.ban_time = Math.round(message.ban_time);
@@ -16567,8 +16715,7 @@ export const BannedUser = {
16567
16715
  const message = createBaseBannedUser();
16568
16716
  message.channel_id = object.channel_id ?? "";
16569
16717
  message.banned_id = object.banned_id ?? "";
16570
- message.banned_avatar = object.banned_avatar ?? "";
16571
- message.banned_name = object.banned_name ?? "";
16718
+ message.banner_id = object.banner_id ?? "";
16572
16719
  message.ban_time = object.ban_time ?? 0;
16573
16720
  message.reason = object.reason ?? "";
16574
16721
  return message;