mezon-js-protobuf 1.8.49 → 1.8.50

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
@@ -654,6 +654,8 @@ export interface ChannelUserList_ChannelUser {
654
654
  clan_id: string;
655
655
  /** added by */
656
656
  added_by: string;
657
+ /** is banned */
658
+ is_banned: boolean;
657
659
  }
658
660
 
659
661
  /** A list of users belonging to a channel, along with their role. */
@@ -1729,6 +1731,18 @@ export interface RemoveClanUsersRequest {
1729
1731
  user_ids: string[];
1730
1732
  }
1731
1733
 
1734
+ /** Ban a set of users from a channel. */
1735
+ export interface BanClanUsersRequest {
1736
+ /** The clan ID to kick from. */
1737
+ clan_id: string;
1738
+ /** The channel ID to ban */
1739
+ channel_id: string;
1740
+ /** The users to kick. */
1741
+ user_ids: string[];
1742
+ /** ban time */
1743
+ ban_time: number;
1744
+ }
1745
+
1732
1746
  /** Leave a channel. */
1733
1747
  export interface LeaveThreadRequest {
1734
1748
  clan_id: string;
@@ -7332,7 +7346,17 @@ export const ChannelUserList = {
7332
7346
  };
7333
7347
 
7334
7348
  function createBaseChannelUserList_ChannelUser(): ChannelUserList_ChannelUser {
7335
- return { user_id: "", role_id: [], id: "", thread_id: "", clan_nick: "", clan_avatar: "", clan_id: "", added_by: "" };
7349
+ return {
7350
+ user_id: "",
7351
+ role_id: [],
7352
+ id: "",
7353
+ thread_id: "",
7354
+ clan_nick: "",
7355
+ clan_avatar: "",
7356
+ clan_id: "",
7357
+ added_by: "",
7358
+ is_banned: false,
7359
+ };
7336
7360
  }
7337
7361
 
7338
7362
  export const ChannelUserList_ChannelUser = {
@@ -7361,6 +7385,9 @@ export const ChannelUserList_ChannelUser = {
7361
7385
  if (message.added_by !== "") {
7362
7386
  writer.uint32(66).string(message.added_by);
7363
7387
  }
7388
+ if (message.is_banned !== false) {
7389
+ writer.uint32(72).bool(message.is_banned);
7390
+ }
7364
7391
  return writer;
7365
7392
  },
7366
7393
 
@@ -7427,6 +7454,13 @@ export const ChannelUserList_ChannelUser = {
7427
7454
 
7428
7455
  message.added_by = reader.string();
7429
7456
  continue;
7457
+ case 9:
7458
+ if (tag !== 72) {
7459
+ break;
7460
+ }
7461
+
7462
+ message.is_banned = reader.bool();
7463
+ continue;
7430
7464
  }
7431
7465
  if ((tag & 7) === 4 || tag === 0) {
7432
7466
  break;
@@ -7446,6 +7480,7 @@ export const ChannelUserList_ChannelUser = {
7446
7480
  clan_avatar: isSet(object.clan_avatar) ? globalThis.String(object.clan_avatar) : "",
7447
7481
  clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
7448
7482
  added_by: isSet(object.added_by) ? globalThis.String(object.added_by) : "",
7483
+ is_banned: isSet(object.is_banned) ? globalThis.Boolean(object.is_banned) : false,
7449
7484
  };
7450
7485
  },
7451
7486
 
@@ -7475,6 +7510,9 @@ export const ChannelUserList_ChannelUser = {
7475
7510
  if (message.added_by !== "") {
7476
7511
  obj.added_by = message.added_by;
7477
7512
  }
7513
+ if (message.is_banned !== false) {
7514
+ obj.is_banned = message.is_banned;
7515
+ }
7478
7516
  return obj;
7479
7517
  },
7480
7518
 
@@ -7491,6 +7529,7 @@ export const ChannelUserList_ChannelUser = {
7491
7529
  message.clan_avatar = object.clan_avatar ?? "";
7492
7530
  message.clan_id = object.clan_id ?? "";
7493
7531
  message.added_by = object.added_by ?? "";
7532
+ message.is_banned = object.is_banned ?? false;
7494
7533
  return message;
7495
7534
  },
7496
7535
  };
@@ -16261,6 +16300,110 @@ export const RemoveClanUsersRequest = {
16261
16300
  },
16262
16301
  };
16263
16302
 
16303
+ function createBaseBanClanUsersRequest(): BanClanUsersRequest {
16304
+ return { clan_id: "", channel_id: "", user_ids: [], ban_time: 0 };
16305
+ }
16306
+
16307
+ export const BanClanUsersRequest = {
16308
+ encode(message: BanClanUsersRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
16309
+ if (message.clan_id !== "") {
16310
+ writer.uint32(10).string(message.clan_id);
16311
+ }
16312
+ if (message.channel_id !== "") {
16313
+ writer.uint32(18).string(message.channel_id);
16314
+ }
16315
+ for (const v of message.user_ids) {
16316
+ writer.uint32(26).string(v!);
16317
+ }
16318
+ if (message.ban_time !== 0) {
16319
+ writer.uint32(32).int32(message.ban_time);
16320
+ }
16321
+ return writer;
16322
+ },
16323
+
16324
+ decode(input: _m0.Reader | Uint8Array, length?: number): BanClanUsersRequest {
16325
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
16326
+ let end = length === undefined ? reader.len : reader.pos + length;
16327
+ const message = createBaseBanClanUsersRequest();
16328
+ while (reader.pos < end) {
16329
+ const tag = reader.uint32();
16330
+ switch (tag >>> 3) {
16331
+ case 1:
16332
+ if (tag !== 10) {
16333
+ break;
16334
+ }
16335
+
16336
+ message.clan_id = reader.string();
16337
+ continue;
16338
+ case 2:
16339
+ if (tag !== 18) {
16340
+ break;
16341
+ }
16342
+
16343
+ message.channel_id = reader.string();
16344
+ continue;
16345
+ case 3:
16346
+ if (tag !== 26) {
16347
+ break;
16348
+ }
16349
+
16350
+ message.user_ids.push(reader.string());
16351
+ continue;
16352
+ case 4:
16353
+ if (tag !== 32) {
16354
+ break;
16355
+ }
16356
+
16357
+ message.ban_time = reader.int32();
16358
+ continue;
16359
+ }
16360
+ if ((tag & 7) === 4 || tag === 0) {
16361
+ break;
16362
+ }
16363
+ reader.skipType(tag & 7);
16364
+ }
16365
+ return message;
16366
+ },
16367
+
16368
+ fromJSON(object: any): BanClanUsersRequest {
16369
+ return {
16370
+ clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
16371
+ channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
16372
+ user_ids: globalThis.Array.isArray(object?.user_ids) ? object.user_ids.map((e: any) => globalThis.String(e)) : [],
16373
+ ban_time: isSet(object.ban_time) ? globalThis.Number(object.ban_time) : 0,
16374
+ };
16375
+ },
16376
+
16377
+ toJSON(message: BanClanUsersRequest): unknown {
16378
+ const obj: any = {};
16379
+ if (message.clan_id !== "") {
16380
+ obj.clan_id = message.clan_id;
16381
+ }
16382
+ if (message.channel_id !== "") {
16383
+ obj.channel_id = message.channel_id;
16384
+ }
16385
+ if (message.user_ids?.length) {
16386
+ obj.user_ids = message.user_ids;
16387
+ }
16388
+ if (message.ban_time !== 0) {
16389
+ obj.ban_time = Math.round(message.ban_time);
16390
+ }
16391
+ return obj;
16392
+ },
16393
+
16394
+ create<I extends Exact<DeepPartial<BanClanUsersRequest>, I>>(base?: I): BanClanUsersRequest {
16395
+ return BanClanUsersRequest.fromPartial(base ?? ({} as any));
16396
+ },
16397
+ fromPartial<I extends Exact<DeepPartial<BanClanUsersRequest>, I>>(object: I): BanClanUsersRequest {
16398
+ const message = createBaseBanClanUsersRequest();
16399
+ message.clan_id = object.clan_id ?? "";
16400
+ message.channel_id = object.channel_id ?? "";
16401
+ message.user_ids = object.user_ids?.map((e) => e) || [];
16402
+ message.ban_time = object.ban_time ?? 0;
16403
+ return message;
16404
+ },
16405
+ };
16406
+
16264
16407
  function createBaseLeaveThreadRequest(): LeaveThreadRequest {
16265
16408
  return { clan_id: "", channel_id: "" };
16266
16409
  }
@@ -449,6 +449,8 @@ export interface ChannelUserList_ChannelUser {
449
449
  clan_id: string;
450
450
  /** added by */
451
451
  added_by: string;
452
+ /** is banned */
453
+ is_banned: boolean;
452
454
  }
453
455
  /** A list of users belonging to a channel, along with their role. */
454
456
  export interface VoiceChannelUser {
@@ -1332,6 +1334,17 @@ export interface RemoveClanUsersRequest {
1332
1334
  /** The users to kick. */
1333
1335
  user_ids: string[];
1334
1336
  }
1337
+ /** Ban a set of users from a channel. */
1338
+ export interface BanClanUsersRequest {
1339
+ /** The clan ID to kick from. */
1340
+ clan_id: string;
1341
+ /** The channel ID to ban */
1342
+ channel_id: string;
1343
+ /** The users to kick. */
1344
+ user_ids: string[];
1345
+ /** ban time */
1346
+ ban_time: number;
1347
+ }
1335
1348
  /** Leave a channel. */
1336
1349
  export interface LeaveThreadRequest {
1337
1350
  clan_id: string;
@@ -5323,6 +5336,7 @@ export declare const ChannelUserList: {
5323
5336
  clan_avatar?: string | undefined;
5324
5337
  clan_id?: string | undefined;
5325
5338
  added_by?: string | undefined;
5339
+ is_banned?: boolean | undefined;
5326
5340
  }[] | undefined;
5327
5341
  cursor?: string | undefined;
5328
5342
  channel_id?: string | undefined;
@@ -5336,6 +5350,7 @@ export declare const ChannelUserList: {
5336
5350
  clan_avatar?: string | undefined;
5337
5351
  clan_id?: string | undefined;
5338
5352
  added_by?: string | undefined;
5353
+ is_banned?: boolean | undefined;
5339
5354
  }[] & ({
5340
5355
  user_id?: string | undefined;
5341
5356
  role_id?: string[] | undefined;
@@ -5345,6 +5360,7 @@ export declare const ChannelUserList: {
5345
5360
  clan_avatar?: string | undefined;
5346
5361
  clan_id?: string | undefined;
5347
5362
  added_by?: string | undefined;
5363
+ is_banned?: boolean | undefined;
5348
5364
  } & {
5349
5365
  user_id?: string | undefined;
5350
5366
  role_id?: (string[] & string[] & { [K in Exclude<keyof I["channel_users"][number]["role_id"], keyof string[]>]: never; }) | undefined;
@@ -5354,6 +5370,7 @@ export declare const ChannelUserList: {
5354
5370
  clan_avatar?: string | undefined;
5355
5371
  clan_id?: string | undefined;
5356
5372
  added_by?: string | undefined;
5373
+ is_banned?: boolean | undefined;
5357
5374
  } & { [K_1 in Exclude<keyof I["channel_users"][number], keyof ChannelUserList_ChannelUser>]: never; })[] & { [K_2 in Exclude<keyof I["channel_users"], keyof {
5358
5375
  user_id?: string | undefined;
5359
5376
  role_id?: string[] | undefined;
@@ -5363,6 +5380,7 @@ export declare const ChannelUserList: {
5363
5380
  clan_avatar?: string | undefined;
5364
5381
  clan_id?: string | undefined;
5365
5382
  added_by?: string | undefined;
5383
+ is_banned?: boolean | undefined;
5366
5384
  }[]>]: never; }) | undefined;
5367
5385
  cursor?: string | undefined;
5368
5386
  channel_id?: string | undefined;
@@ -5377,6 +5395,7 @@ export declare const ChannelUserList: {
5377
5395
  clan_avatar?: string | undefined;
5378
5396
  clan_id?: string | undefined;
5379
5397
  added_by?: string | undefined;
5398
+ is_banned?: boolean | undefined;
5380
5399
  }[] | undefined;
5381
5400
  cursor?: string | undefined;
5382
5401
  channel_id?: string | undefined;
@@ -5390,6 +5409,7 @@ export declare const ChannelUserList: {
5390
5409
  clan_avatar?: string | undefined;
5391
5410
  clan_id?: string | undefined;
5392
5411
  added_by?: string | undefined;
5412
+ is_banned?: boolean | undefined;
5393
5413
  }[] & ({
5394
5414
  user_id?: string | undefined;
5395
5415
  role_id?: string[] | undefined;
@@ -5399,6 +5419,7 @@ export declare const ChannelUserList: {
5399
5419
  clan_avatar?: string | undefined;
5400
5420
  clan_id?: string | undefined;
5401
5421
  added_by?: string | undefined;
5422
+ is_banned?: boolean | undefined;
5402
5423
  } & {
5403
5424
  user_id?: string | undefined;
5404
5425
  role_id?: (string[] & string[] & { [K_4 in Exclude<keyof I_1["channel_users"][number]["role_id"], keyof string[]>]: never; }) | undefined;
@@ -5408,6 +5429,7 @@ export declare const ChannelUserList: {
5408
5429
  clan_avatar?: string | undefined;
5409
5430
  clan_id?: string | undefined;
5410
5431
  added_by?: string | undefined;
5432
+ is_banned?: boolean | undefined;
5411
5433
  } & { [K_5 in Exclude<keyof I_1["channel_users"][number], keyof ChannelUserList_ChannelUser>]: never; })[] & { [K_6 in Exclude<keyof I_1["channel_users"], keyof {
5412
5434
  user_id?: string | undefined;
5413
5435
  role_id?: string[] | undefined;
@@ -5417,6 +5439,7 @@ export declare const ChannelUserList: {
5417
5439
  clan_avatar?: string | undefined;
5418
5440
  clan_id?: string | undefined;
5419
5441
  added_by?: string | undefined;
5442
+ is_banned?: boolean | undefined;
5420
5443
  }[]>]: never; }) | undefined;
5421
5444
  cursor?: string | undefined;
5422
5445
  channel_id?: string | undefined;
@@ -5436,6 +5459,7 @@ export declare const ChannelUserList_ChannelUser: {
5436
5459
  clan_avatar?: string | undefined;
5437
5460
  clan_id?: string | undefined;
5438
5461
  added_by?: string | undefined;
5462
+ is_banned?: boolean | undefined;
5439
5463
  } & {
5440
5464
  user_id?: string | undefined;
5441
5465
  role_id?: (string[] & string[] & { [K in Exclude<keyof I["role_id"], keyof string[]>]: never; }) | undefined;
@@ -5445,6 +5469,7 @@ export declare const ChannelUserList_ChannelUser: {
5445
5469
  clan_avatar?: string | undefined;
5446
5470
  clan_id?: string | undefined;
5447
5471
  added_by?: string | undefined;
5472
+ is_banned?: boolean | undefined;
5448
5473
  } & { [K_1 in Exclude<keyof I, keyof ChannelUserList_ChannelUser>]: never; }>(base?: I | undefined): ChannelUserList_ChannelUser;
5449
5474
  fromPartial<I_1 extends {
5450
5475
  user_id?: string | undefined;
@@ -5455,6 +5480,7 @@ export declare const ChannelUserList_ChannelUser: {
5455
5480
  clan_avatar?: string | undefined;
5456
5481
  clan_id?: string | undefined;
5457
5482
  added_by?: string | undefined;
5483
+ is_banned?: boolean | undefined;
5458
5484
  } & {
5459
5485
  user_id?: string | undefined;
5460
5486
  role_id?: (string[] & string[] & { [K_2 in Exclude<keyof I_1["role_id"], keyof string[]>]: never; }) | undefined;
@@ -5464,6 +5490,7 @@ export declare const ChannelUserList_ChannelUser: {
5464
5490
  clan_avatar?: string | undefined;
5465
5491
  clan_id?: string | undefined;
5466
5492
  added_by?: string | undefined;
5493
+ is_banned?: boolean | undefined;
5467
5494
  } & { [K_3 in Exclude<keyof I_1, keyof ChannelUserList_ChannelUser>]: never; }>(object: I_1): ChannelUserList_ChannelUser;
5468
5495
  };
5469
5496
  export declare const VoiceChannelUser: {
@@ -11148,6 +11175,34 @@ export declare const RemoveClanUsersRequest: {
11148
11175
  user_ids?: (string[] & string[] & { [K_2 in Exclude<keyof I_1["user_ids"], keyof string[]>]: never; }) | undefined;
11149
11176
  } & { [K_3 in Exclude<keyof I_1, keyof RemoveClanUsersRequest>]: never; }>(object: I_1): RemoveClanUsersRequest;
11150
11177
  };
11178
+ export declare const BanClanUsersRequest: {
11179
+ encode(message: BanClanUsersRequest, writer?: _m0.Writer): _m0.Writer;
11180
+ decode(input: _m0.Reader | Uint8Array, length?: number): BanClanUsersRequest;
11181
+ fromJSON(object: any): BanClanUsersRequest;
11182
+ toJSON(message: BanClanUsersRequest): unknown;
11183
+ create<I extends {
11184
+ clan_id?: string | undefined;
11185
+ channel_id?: string | undefined;
11186
+ user_ids?: string[] | undefined;
11187
+ ban_time?: number | undefined;
11188
+ } & {
11189
+ clan_id?: string | undefined;
11190
+ channel_id?: string | undefined;
11191
+ user_ids?: (string[] & string[] & { [K in Exclude<keyof I["user_ids"], keyof string[]>]: never; }) | undefined;
11192
+ ban_time?: number | undefined;
11193
+ } & { [K_1 in Exclude<keyof I, keyof BanClanUsersRequest>]: never; }>(base?: I | undefined): BanClanUsersRequest;
11194
+ fromPartial<I_1 extends {
11195
+ clan_id?: string | undefined;
11196
+ channel_id?: string | undefined;
11197
+ user_ids?: string[] | undefined;
11198
+ ban_time?: number | undefined;
11199
+ } & {
11200
+ clan_id?: string | undefined;
11201
+ channel_id?: string | undefined;
11202
+ user_ids?: (string[] & string[] & { [K_2 in Exclude<keyof I_1["user_ids"], keyof string[]>]: never; }) | undefined;
11203
+ ban_time?: number | undefined;
11204
+ } & { [K_3 in Exclude<keyof I_1, keyof BanClanUsersRequest>]: never; }>(object: I_1): BanClanUsersRequest;
11205
+ };
11151
11206
  export declare const LeaveThreadRequest: {
11152
11207
  encode(message: LeaveThreadRequest, writer?: _m0.Writer): _m0.Writer;
11153
11208
  decode(input: _m0.Reader | Uint8Array, length?: number): LeaveThreadRequest;