mezon-js-protobuf 1.8.71 → 1.8.73

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
@@ -293,9 +293,7 @@ export interface ChannelMessage {
293
293
  /** The unique ID of this message. */
294
294
  message_id: string;
295
295
  /** The code representing a message type or category. */
296
- code:
297
- | number
298
- | undefined;
296
+ code: number;
299
297
  /** Message sender, usually a user ID. */
300
298
  sender_id: string;
301
299
  /** The username of the message sender, if any. */
@@ -1516,7 +1514,7 @@ export interface ChannelMessageHeader {
1516
1514
  }
1517
1515
 
1518
1516
  /** Channel description record */
1519
- export interface ChannelDescription {
1517
+ export interface ChannelDescriptionOld {
1520
1518
  /** The clan of this channel */
1521
1519
  clan_id: string;
1522
1520
  /** The parent channel this message belongs to. */
@@ -1587,6 +1585,76 @@ export interface ChannelDescription {
1587
1585
  member_count: number;
1588
1586
  }
1589
1587
 
1588
+ /** Channel description record */
1589
+ export interface ChannelDescription {
1590
+ /** The clan of this channel */
1591
+ clan_id: string;
1592
+ /** The parent channel this message belongs to. */
1593
+ parent_id: string;
1594
+ /** The channel this message belongs to. */
1595
+ channel_id: string;
1596
+ /** The category of channel */
1597
+ category_id: string;
1598
+ /** The category name */
1599
+ category_name: string;
1600
+ /** The channel type. */
1601
+ type: number;
1602
+ /** creator ID. */
1603
+ creator_id: string;
1604
+ /** The channel lable */
1605
+ channel_label: string;
1606
+ /** The channel private */
1607
+ channel_private: number;
1608
+ /** DM avatars */
1609
+ avatars: string[];
1610
+ /** List DM user ids */
1611
+ user_ids: string[];
1612
+ /** last message id */
1613
+ last_sent_message:
1614
+ | ChannelMessageHeader
1615
+ | undefined;
1616
+ /** last seen message id */
1617
+ last_seen_message:
1618
+ | ChannelMessageHeader
1619
+ | undefined;
1620
+ /** DM status */
1621
+ onlines: boolean[];
1622
+ /** meeting code */
1623
+ meeting_code: string;
1624
+ /** count message unread */
1625
+ count_mess_unread: number;
1626
+ /** active channel */
1627
+ active: number;
1628
+ /** last pin message */
1629
+ last_pin_message: string;
1630
+ /** List DM usernames */
1631
+ usernames: string[];
1632
+ /** creator name */
1633
+ creator_name: string;
1634
+ /** create time ms */
1635
+ create_time_seconds: number;
1636
+ /** update time ms */
1637
+ update_time_seconds: number;
1638
+ /** List DM diplay names */
1639
+ display_names: string[];
1640
+ /** channel avatar */
1641
+ channel_avatar: string;
1642
+ /** clan_name */
1643
+ clan_name: string;
1644
+ /** app id */
1645
+ app_id: string;
1646
+ /** channel all message */
1647
+ is_mute: boolean;
1648
+ /** age restricted */
1649
+ age_restricted: number;
1650
+ /** channel description topic */
1651
+ topic: string;
1652
+ /** e2ee */
1653
+ e2ee: number;
1654
+ /** channel member count */
1655
+ member_count: number;
1656
+ }
1657
+
1590
1658
  /** A list of channel description, usually a result of a list operation. */
1591
1659
  export interface ChannelDescList {
1592
1660
  /** A list of channel. */
@@ -2589,6 +2657,10 @@ export interface App {
2589
2657
  disable_time:
2590
2658
  | Date
2591
2659
  | undefined;
2660
+ /** The UNIX time when the app was created */
2661
+ create_time:
2662
+ | Date
2663
+ | undefined;
2592
2664
  /** string token */
2593
2665
  token: string;
2594
2666
  /** role */
@@ -3772,6 +3844,22 @@ export interface ReportMessageAbuseReqest {
3772
3844
  abuse_type: string;
3773
3845
  }
3774
3846
 
3847
+ export interface LogedDeviceList {
3848
+ devices: LogedDevice[];
3849
+ }
3850
+
3851
+ export interface LogedDevice {
3852
+ device_id: string;
3853
+ device_name: string;
3854
+ login_at: Date | undefined;
3855
+ status: number;
3856
+ platform: string;
3857
+ ip: string;
3858
+ last_active: Date | undefined;
3859
+ location: string;
3860
+ is_current: boolean;
3861
+ }
3862
+
3775
3863
  function createBaseAccount(): Account {
3776
3864
  return {
3777
3865
  user: undefined,
@@ -4943,7 +5031,7 @@ function createBaseChannelMessage(): ChannelMessage {
4943
5031
  clan_id: "",
4944
5032
  channel_id: "",
4945
5033
  message_id: "",
4946
- code: undefined,
5034
+ code: 0,
4947
5035
  sender_id: "",
4948
5036
  username: "",
4949
5037
  avatar: "",
@@ -4981,8 +5069,8 @@ export const ChannelMessage = {
4981
5069
  if (message.message_id !== "") {
4982
5070
  writer.uint32(26).string(message.message_id);
4983
5071
  }
4984
- if (message.code !== undefined) {
4985
- Int32Value.encode({ value: message.code! }, writer.uint32(34).fork()).ldelim();
5072
+ if (message.code !== 0) {
5073
+ writer.uint32(32).int32(message.code);
4986
5074
  }
4987
5075
  if (message.sender_id !== "") {
4988
5076
  writer.uint32(42).string(message.sender_id);
@@ -5085,11 +5173,11 @@ export const ChannelMessage = {
5085
5173
  message.message_id = reader.string();
5086
5174
  continue;
5087
5175
  case 4:
5088
- if (tag !== 34) {
5176
+ if (tag !== 32) {
5089
5177
  break;
5090
5178
  }
5091
5179
 
5092
- message.code = Int32Value.decode(reader, reader.uint32()).value;
5180
+ message.code = reader.int32();
5093
5181
  continue;
5094
5182
  case 5:
5095
5183
  if (tag !== 42) {
@@ -5266,7 +5354,7 @@ export const ChannelMessage = {
5266
5354
  clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
5267
5355
  channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
5268
5356
  message_id: isSet(object.message_id) ? globalThis.String(object.message_id) : "",
5269
- code: isSet(object.code) ? Number(object.code) : undefined,
5357
+ code: isSet(object.code) ? globalThis.Number(object.code) : 0,
5270
5358
  sender_id: isSet(object.sender_id) ? globalThis.String(object.sender_id) : "",
5271
5359
  username: isSet(object.username) ? globalThis.String(object.username) : "",
5272
5360
  avatar: isSet(object.avatar) ? globalThis.String(object.avatar) : "",
@@ -5304,8 +5392,8 @@ export const ChannelMessage = {
5304
5392
  if (message.message_id !== "") {
5305
5393
  obj.message_id = message.message_id;
5306
5394
  }
5307
- if (message.code !== undefined) {
5308
- obj.code = message.code;
5395
+ if (message.code !== 0) {
5396
+ obj.code = Math.round(message.code);
5309
5397
  }
5310
5398
  if (message.sender_id !== "") {
5311
5399
  obj.sender_id = message.sender_id;
@@ -5387,7 +5475,7 @@ export const ChannelMessage = {
5387
5475
  message.clan_id = object.clan_id ?? "";
5388
5476
  message.channel_id = object.channel_id ?? "";
5389
5477
  message.message_id = object.message_id ?? "";
5390
- message.code = object.code ?? undefined;
5478
+ message.code = object.code ?? 0;
5391
5479
  message.sender_id = object.sender_id ?? "";
5392
5480
  message.username = object.username ?? "";
5393
5481
  message.avatar = object.avatar ?? "";
@@ -14612,7 +14700,7 @@ export const ChannelMessageHeader = {
14612
14700
  },
14613
14701
  };
14614
14702
 
14615
- function createBaseChannelDescription(): ChannelDescription {
14703
+ function createBaseChannelDescriptionOld(): ChannelDescriptionOld {
14616
14704
  return {
14617
14705
  clan_id: "",
14618
14706
  parent_id: "",
@@ -14648,8 +14736,8 @@ function createBaseChannelDescription(): ChannelDescription {
14648
14736
  };
14649
14737
  }
14650
14738
 
14651
- export const ChannelDescription = {
14652
- encode(message: ChannelDescription, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
14739
+ export const ChannelDescriptionOld = {
14740
+ encode(message: ChannelDescriptionOld, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
14653
14741
  if (message.clan_id !== "") {
14654
14742
  writer.uint32(10).string(message.clan_id);
14655
14743
  }
@@ -14748,10 +14836,10 @@ export const ChannelDescription = {
14748
14836
  return writer;
14749
14837
  },
14750
14838
 
14751
- decode(input: _m0.Reader | Uint8Array, length?: number): ChannelDescription {
14839
+ decode(input: _m0.Reader | Uint8Array, length?: number): ChannelDescriptionOld {
14752
14840
  const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
14753
14841
  let end = length === undefined ? reader.len : reader.pos + length;
14754
- const message = createBaseChannelDescription();
14842
+ const message = createBaseChannelDescriptionOld();
14755
14843
  while (reader.pos < end) {
14756
14844
  const tag = reader.uint32();
14757
14845
  switch (tag >>> 3) {
@@ -14991,7 +15079,7 @@ export const ChannelDescription = {
14991
15079
  return message;
14992
15080
  },
14993
15081
 
14994
- fromJSON(object: any): ChannelDescription {
15082
+ fromJSON(object: any): ChannelDescriptionOld {
14995
15083
  return {
14996
15084
  clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
14997
15085
  parent_id: isSet(object.parent_id) ? globalThis.String(object.parent_id) : "",
@@ -15035,7 +15123,7 @@ export const ChannelDescription = {
15035
15123
  };
15036
15124
  },
15037
15125
 
15038
- toJSON(message: ChannelDescription): unknown {
15126
+ toJSON(message: ChannelDescriptionOld): unknown {
15039
15127
  const obj: any = {};
15040
15128
  if (message.clan_id !== "") {
15041
15129
  obj.clan_id = message.clan_id;
@@ -15133,6 +15221,571 @@ export const ChannelDescription = {
15133
15221
  return obj;
15134
15222
  },
15135
15223
 
15224
+ create<I extends Exact<DeepPartial<ChannelDescriptionOld>, I>>(base?: I): ChannelDescriptionOld {
15225
+ return ChannelDescriptionOld.fromPartial(base ?? ({} as any));
15226
+ },
15227
+ fromPartial<I extends Exact<DeepPartial<ChannelDescriptionOld>, I>>(object: I): ChannelDescriptionOld {
15228
+ const message = createBaseChannelDescriptionOld();
15229
+ message.clan_id = object.clan_id ?? "";
15230
+ message.parent_id = object.parent_id ?? "";
15231
+ message.channel_id = object.channel_id ?? "";
15232
+ message.category_id = object.category_id ?? "";
15233
+ message.category_name = object.category_name ?? "";
15234
+ message.type = object.type ?? undefined;
15235
+ message.creator_id = object.creator_id ?? "";
15236
+ message.channel_label = object.channel_label ?? "";
15237
+ message.channel_private = object.channel_private ?? 0;
15238
+ message.avatars = object.avatars?.map((e) => e) || [];
15239
+ message.user_ids = object.user_ids?.map((e) => e) || [];
15240
+ message.last_sent_message = (object.last_sent_message !== undefined && object.last_sent_message !== null)
15241
+ ? ChannelMessageHeader.fromPartial(object.last_sent_message)
15242
+ : undefined;
15243
+ message.last_seen_message = (object.last_seen_message !== undefined && object.last_seen_message !== null)
15244
+ ? ChannelMessageHeader.fromPartial(object.last_seen_message)
15245
+ : undefined;
15246
+ message.onlines = object.onlines?.map((e) => e) || [];
15247
+ message.meeting_code = object.meeting_code ?? "";
15248
+ message.count_mess_unread = object.count_mess_unread ?? 0;
15249
+ message.active = object.active ?? 0;
15250
+ message.last_pin_message = object.last_pin_message ?? "";
15251
+ message.usernames = object.usernames?.map((e) => e) || [];
15252
+ message.creator_name = object.creator_name ?? "";
15253
+ message.create_time_seconds = object.create_time_seconds ?? 0;
15254
+ message.update_time_seconds = object.update_time_seconds ?? 0;
15255
+ message.display_names = object.display_names?.map((e) => e) || [];
15256
+ message.channel_avatar = object.channel_avatar ?? "";
15257
+ message.clan_name = object.clan_name ?? "";
15258
+ message.app_id = object.app_id ?? "";
15259
+ message.is_mute = object.is_mute ?? false;
15260
+ message.age_restricted = object.age_restricted ?? 0;
15261
+ message.topic = object.topic ?? "";
15262
+ message.e2ee = object.e2ee ?? 0;
15263
+ message.member_count = object.member_count ?? 0;
15264
+ return message;
15265
+ },
15266
+ };
15267
+
15268
+ function createBaseChannelDescription(): ChannelDescription {
15269
+ return {
15270
+ clan_id: "",
15271
+ parent_id: "",
15272
+ channel_id: "",
15273
+ category_id: "",
15274
+ category_name: "",
15275
+ type: 0,
15276
+ creator_id: "",
15277
+ channel_label: "",
15278
+ channel_private: 0,
15279
+ avatars: [],
15280
+ user_ids: [],
15281
+ last_sent_message: undefined,
15282
+ last_seen_message: undefined,
15283
+ onlines: [],
15284
+ meeting_code: "",
15285
+ count_mess_unread: 0,
15286
+ active: 0,
15287
+ last_pin_message: "",
15288
+ usernames: [],
15289
+ creator_name: "",
15290
+ create_time_seconds: 0,
15291
+ update_time_seconds: 0,
15292
+ display_names: [],
15293
+ channel_avatar: "",
15294
+ clan_name: "",
15295
+ app_id: "",
15296
+ is_mute: false,
15297
+ age_restricted: 0,
15298
+ topic: "",
15299
+ e2ee: 0,
15300
+ member_count: 0,
15301
+ };
15302
+ }
15303
+
15304
+ export const ChannelDescription = {
15305
+ encode(message: ChannelDescription, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
15306
+ if (message.clan_id !== "") {
15307
+ writer.uint32(10).string(message.clan_id);
15308
+ }
15309
+ if (message.parent_id !== "") {
15310
+ writer.uint32(18).string(message.parent_id);
15311
+ }
15312
+ if (message.channel_id !== "") {
15313
+ writer.uint32(26).string(message.channel_id);
15314
+ }
15315
+ if (message.category_id !== "") {
15316
+ writer.uint32(34).string(message.category_id);
15317
+ }
15318
+ if (message.category_name !== "") {
15319
+ writer.uint32(42).string(message.category_name);
15320
+ }
15321
+ if (message.type !== 0) {
15322
+ writer.uint32(48).int32(message.type);
15323
+ }
15324
+ if (message.creator_id !== "") {
15325
+ writer.uint32(58).string(message.creator_id);
15326
+ }
15327
+ if (message.channel_label !== "") {
15328
+ writer.uint32(66).string(message.channel_label);
15329
+ }
15330
+ if (message.channel_private !== 0) {
15331
+ writer.uint32(72).int32(message.channel_private);
15332
+ }
15333
+ for (const v of message.avatars) {
15334
+ writer.uint32(82).string(v!);
15335
+ }
15336
+ for (const v of message.user_ids) {
15337
+ writer.uint32(90).string(v!);
15338
+ }
15339
+ if (message.last_sent_message !== undefined) {
15340
+ ChannelMessageHeader.encode(message.last_sent_message, writer.uint32(98).fork()).ldelim();
15341
+ }
15342
+ if (message.last_seen_message !== undefined) {
15343
+ ChannelMessageHeader.encode(message.last_seen_message, writer.uint32(106).fork()).ldelim();
15344
+ }
15345
+ writer.uint32(114).fork();
15346
+ for (const v of message.onlines) {
15347
+ writer.bool(v);
15348
+ }
15349
+ writer.ldelim();
15350
+ if (message.meeting_code !== "") {
15351
+ writer.uint32(122).string(message.meeting_code);
15352
+ }
15353
+ if (message.count_mess_unread !== 0) {
15354
+ writer.uint32(128).int32(message.count_mess_unread);
15355
+ }
15356
+ if (message.active !== 0) {
15357
+ writer.uint32(136).int32(message.active);
15358
+ }
15359
+ if (message.last_pin_message !== "") {
15360
+ writer.uint32(146).string(message.last_pin_message);
15361
+ }
15362
+ for (const v of message.usernames) {
15363
+ writer.uint32(154).string(v!);
15364
+ }
15365
+ if (message.creator_name !== "") {
15366
+ writer.uint32(162).string(message.creator_name);
15367
+ }
15368
+ if (message.create_time_seconds !== 0) {
15369
+ writer.uint32(168).uint32(message.create_time_seconds);
15370
+ }
15371
+ if (message.update_time_seconds !== 0) {
15372
+ writer.uint32(176).uint32(message.update_time_seconds);
15373
+ }
15374
+ for (const v of message.display_names) {
15375
+ writer.uint32(186).string(v!);
15376
+ }
15377
+ if (message.channel_avatar !== "") {
15378
+ writer.uint32(194).string(message.channel_avatar);
15379
+ }
15380
+ if (message.clan_name !== "") {
15381
+ writer.uint32(202).string(message.clan_name);
15382
+ }
15383
+ if (message.app_id !== "") {
15384
+ writer.uint32(210).string(message.app_id);
15385
+ }
15386
+ if (message.is_mute !== false) {
15387
+ writer.uint32(216).bool(message.is_mute);
15388
+ }
15389
+ if (message.age_restricted !== 0) {
15390
+ writer.uint32(224).int32(message.age_restricted);
15391
+ }
15392
+ if (message.topic !== "") {
15393
+ writer.uint32(234).string(message.topic);
15394
+ }
15395
+ if (message.e2ee !== 0) {
15396
+ writer.uint32(240).int32(message.e2ee);
15397
+ }
15398
+ if (message.member_count !== 0) {
15399
+ writer.uint32(248).int32(message.member_count);
15400
+ }
15401
+ return writer;
15402
+ },
15403
+
15404
+ decode(input: _m0.Reader | Uint8Array, length?: number): ChannelDescription {
15405
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
15406
+ let end = length === undefined ? reader.len : reader.pos + length;
15407
+ const message = createBaseChannelDescription();
15408
+ while (reader.pos < end) {
15409
+ const tag = reader.uint32();
15410
+ switch (tag >>> 3) {
15411
+ case 1:
15412
+ if (tag !== 10) {
15413
+ break;
15414
+ }
15415
+
15416
+ message.clan_id = reader.string();
15417
+ continue;
15418
+ case 2:
15419
+ if (tag !== 18) {
15420
+ break;
15421
+ }
15422
+
15423
+ message.parent_id = reader.string();
15424
+ continue;
15425
+ case 3:
15426
+ if (tag !== 26) {
15427
+ break;
15428
+ }
15429
+
15430
+ message.channel_id = reader.string();
15431
+ continue;
15432
+ case 4:
15433
+ if (tag !== 34) {
15434
+ break;
15435
+ }
15436
+
15437
+ message.category_id = reader.string();
15438
+ continue;
15439
+ case 5:
15440
+ if (tag !== 42) {
15441
+ break;
15442
+ }
15443
+
15444
+ message.category_name = reader.string();
15445
+ continue;
15446
+ case 6:
15447
+ if (tag !== 48) {
15448
+ break;
15449
+ }
15450
+
15451
+ message.type = reader.int32();
15452
+ continue;
15453
+ case 7:
15454
+ if (tag !== 58) {
15455
+ break;
15456
+ }
15457
+
15458
+ message.creator_id = reader.string();
15459
+ continue;
15460
+ case 8:
15461
+ if (tag !== 66) {
15462
+ break;
15463
+ }
15464
+
15465
+ message.channel_label = reader.string();
15466
+ continue;
15467
+ case 9:
15468
+ if (tag !== 72) {
15469
+ break;
15470
+ }
15471
+
15472
+ message.channel_private = reader.int32();
15473
+ continue;
15474
+ case 10:
15475
+ if (tag !== 82) {
15476
+ break;
15477
+ }
15478
+
15479
+ message.avatars.push(reader.string());
15480
+ continue;
15481
+ case 11:
15482
+ if (tag !== 90) {
15483
+ break;
15484
+ }
15485
+
15486
+ message.user_ids.push(reader.string());
15487
+ continue;
15488
+ case 12:
15489
+ if (tag !== 98) {
15490
+ break;
15491
+ }
15492
+
15493
+ message.last_sent_message = ChannelMessageHeader.decode(reader, reader.uint32());
15494
+ continue;
15495
+ case 13:
15496
+ if (tag !== 106) {
15497
+ break;
15498
+ }
15499
+
15500
+ message.last_seen_message = ChannelMessageHeader.decode(reader, reader.uint32());
15501
+ continue;
15502
+ case 14:
15503
+ if (tag === 112) {
15504
+ message.onlines.push(reader.bool());
15505
+
15506
+ continue;
15507
+ }
15508
+
15509
+ if (tag === 114) {
15510
+ const end2 = reader.uint32() + reader.pos;
15511
+ while (reader.pos < end2) {
15512
+ message.onlines.push(reader.bool());
15513
+ }
15514
+
15515
+ continue;
15516
+ }
15517
+
15518
+ break;
15519
+ case 15:
15520
+ if (tag !== 122) {
15521
+ break;
15522
+ }
15523
+
15524
+ message.meeting_code = reader.string();
15525
+ continue;
15526
+ case 16:
15527
+ if (tag !== 128) {
15528
+ break;
15529
+ }
15530
+
15531
+ message.count_mess_unread = reader.int32();
15532
+ continue;
15533
+ case 17:
15534
+ if (tag !== 136) {
15535
+ break;
15536
+ }
15537
+
15538
+ message.active = reader.int32();
15539
+ continue;
15540
+ case 18:
15541
+ if (tag !== 146) {
15542
+ break;
15543
+ }
15544
+
15545
+ message.last_pin_message = reader.string();
15546
+ continue;
15547
+ case 19:
15548
+ if (tag !== 154) {
15549
+ break;
15550
+ }
15551
+
15552
+ message.usernames.push(reader.string());
15553
+ continue;
15554
+ case 20:
15555
+ if (tag !== 162) {
15556
+ break;
15557
+ }
15558
+
15559
+ message.creator_name = reader.string();
15560
+ continue;
15561
+ case 21:
15562
+ if (tag !== 168) {
15563
+ break;
15564
+ }
15565
+
15566
+ message.create_time_seconds = reader.uint32();
15567
+ continue;
15568
+ case 22:
15569
+ if (tag !== 176) {
15570
+ break;
15571
+ }
15572
+
15573
+ message.update_time_seconds = reader.uint32();
15574
+ continue;
15575
+ case 23:
15576
+ if (tag !== 186) {
15577
+ break;
15578
+ }
15579
+
15580
+ message.display_names.push(reader.string());
15581
+ continue;
15582
+ case 24:
15583
+ if (tag !== 194) {
15584
+ break;
15585
+ }
15586
+
15587
+ message.channel_avatar = reader.string();
15588
+ continue;
15589
+ case 25:
15590
+ if (tag !== 202) {
15591
+ break;
15592
+ }
15593
+
15594
+ message.clan_name = reader.string();
15595
+ continue;
15596
+ case 26:
15597
+ if (tag !== 210) {
15598
+ break;
15599
+ }
15600
+
15601
+ message.app_id = reader.string();
15602
+ continue;
15603
+ case 27:
15604
+ if (tag !== 216) {
15605
+ break;
15606
+ }
15607
+
15608
+ message.is_mute = reader.bool();
15609
+ continue;
15610
+ case 28:
15611
+ if (tag !== 224) {
15612
+ break;
15613
+ }
15614
+
15615
+ message.age_restricted = reader.int32();
15616
+ continue;
15617
+ case 29:
15618
+ if (tag !== 234) {
15619
+ break;
15620
+ }
15621
+
15622
+ message.topic = reader.string();
15623
+ continue;
15624
+ case 30:
15625
+ if (tag !== 240) {
15626
+ break;
15627
+ }
15628
+
15629
+ message.e2ee = reader.int32();
15630
+ continue;
15631
+ case 31:
15632
+ if (tag !== 248) {
15633
+ break;
15634
+ }
15635
+
15636
+ message.member_count = reader.int32();
15637
+ continue;
15638
+ }
15639
+ if ((tag & 7) === 4 || tag === 0) {
15640
+ break;
15641
+ }
15642
+ reader.skipType(tag & 7);
15643
+ }
15644
+ return message;
15645
+ },
15646
+
15647
+ fromJSON(object: any): ChannelDescription {
15648
+ return {
15649
+ clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
15650
+ parent_id: isSet(object.parent_id) ? globalThis.String(object.parent_id) : "",
15651
+ channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
15652
+ category_id: isSet(object.category_id) ? globalThis.String(object.category_id) : "",
15653
+ category_name: isSet(object.category_name) ? globalThis.String(object.category_name) : "",
15654
+ type: isSet(object.type) ? globalThis.Number(object.type) : 0,
15655
+ creator_id: isSet(object.creator_id) ? globalThis.String(object.creator_id) : "",
15656
+ channel_label: isSet(object.channel_label) ? globalThis.String(object.channel_label) : "",
15657
+ channel_private: isSet(object.channel_private) ? globalThis.Number(object.channel_private) : 0,
15658
+ avatars: globalThis.Array.isArray(object?.avatars) ? object.avatars.map((e: any) => globalThis.String(e)) : [],
15659
+ user_ids: globalThis.Array.isArray(object?.user_ids) ? object.user_ids.map((e: any) => globalThis.String(e)) : [],
15660
+ last_sent_message: isSet(object.last_sent_message)
15661
+ ? ChannelMessageHeader.fromJSON(object.last_sent_message)
15662
+ : undefined,
15663
+ last_seen_message: isSet(object.last_seen_message)
15664
+ ? ChannelMessageHeader.fromJSON(object.last_seen_message)
15665
+ : undefined,
15666
+ onlines: globalThis.Array.isArray(object?.onlines) ? object.onlines.map((e: any) => globalThis.Boolean(e)) : [],
15667
+ meeting_code: isSet(object.meeting_code) ? globalThis.String(object.meeting_code) : "",
15668
+ count_mess_unread: isSet(object.count_mess_unread) ? globalThis.Number(object.count_mess_unread) : 0,
15669
+ active: isSet(object.active) ? globalThis.Number(object.active) : 0,
15670
+ last_pin_message: isSet(object.last_pin_message) ? globalThis.String(object.last_pin_message) : "",
15671
+ usernames: globalThis.Array.isArray(object?.usernames)
15672
+ ? object.usernames.map((e: any) => globalThis.String(e))
15673
+ : [],
15674
+ creator_name: isSet(object.creator_name) ? globalThis.String(object.creator_name) : "",
15675
+ create_time_seconds: isSet(object.create_time_seconds) ? globalThis.Number(object.create_time_seconds) : 0,
15676
+ update_time_seconds: isSet(object.update_time_seconds) ? globalThis.Number(object.update_time_seconds) : 0,
15677
+ display_names: globalThis.Array.isArray(object?.display_names)
15678
+ ? object.display_names.map((e: any) => globalThis.String(e))
15679
+ : [],
15680
+ channel_avatar: isSet(object.channel_avatar) ? globalThis.String(object.channel_avatar) : "",
15681
+ clan_name: isSet(object.clan_name) ? globalThis.String(object.clan_name) : "",
15682
+ app_id: isSet(object.app_id) ? globalThis.String(object.app_id) : "",
15683
+ is_mute: isSet(object.is_mute) ? globalThis.Boolean(object.is_mute) : false,
15684
+ age_restricted: isSet(object.age_restricted) ? globalThis.Number(object.age_restricted) : 0,
15685
+ topic: isSet(object.topic) ? globalThis.String(object.topic) : "",
15686
+ e2ee: isSet(object.e2ee) ? globalThis.Number(object.e2ee) : 0,
15687
+ member_count: isSet(object.member_count) ? globalThis.Number(object.member_count) : 0,
15688
+ };
15689
+ },
15690
+
15691
+ toJSON(message: ChannelDescription): unknown {
15692
+ const obj: any = {};
15693
+ if (message.clan_id !== "") {
15694
+ obj.clan_id = message.clan_id;
15695
+ }
15696
+ if (message.parent_id !== "") {
15697
+ obj.parent_id = message.parent_id;
15698
+ }
15699
+ if (message.channel_id !== "") {
15700
+ obj.channel_id = message.channel_id;
15701
+ }
15702
+ if (message.category_id !== "") {
15703
+ obj.category_id = message.category_id;
15704
+ }
15705
+ if (message.category_name !== "") {
15706
+ obj.category_name = message.category_name;
15707
+ }
15708
+ if (message.type !== 0) {
15709
+ obj.type = Math.round(message.type);
15710
+ }
15711
+ if (message.creator_id !== "") {
15712
+ obj.creator_id = message.creator_id;
15713
+ }
15714
+ if (message.channel_label !== "") {
15715
+ obj.channel_label = message.channel_label;
15716
+ }
15717
+ if (message.channel_private !== 0) {
15718
+ obj.channel_private = Math.round(message.channel_private);
15719
+ }
15720
+ if (message.avatars?.length) {
15721
+ obj.avatars = message.avatars;
15722
+ }
15723
+ if (message.user_ids?.length) {
15724
+ obj.user_ids = message.user_ids;
15725
+ }
15726
+ if (message.last_sent_message !== undefined) {
15727
+ obj.last_sent_message = ChannelMessageHeader.toJSON(message.last_sent_message);
15728
+ }
15729
+ if (message.last_seen_message !== undefined) {
15730
+ obj.last_seen_message = ChannelMessageHeader.toJSON(message.last_seen_message);
15731
+ }
15732
+ if (message.onlines?.length) {
15733
+ obj.onlines = message.onlines;
15734
+ }
15735
+ if (message.meeting_code !== "") {
15736
+ obj.meeting_code = message.meeting_code;
15737
+ }
15738
+ if (message.count_mess_unread !== 0) {
15739
+ obj.count_mess_unread = Math.round(message.count_mess_unread);
15740
+ }
15741
+ if (message.active !== 0) {
15742
+ obj.active = Math.round(message.active);
15743
+ }
15744
+ if (message.last_pin_message !== "") {
15745
+ obj.last_pin_message = message.last_pin_message;
15746
+ }
15747
+ if (message.usernames?.length) {
15748
+ obj.usernames = message.usernames;
15749
+ }
15750
+ if (message.creator_name !== "") {
15751
+ obj.creator_name = message.creator_name;
15752
+ }
15753
+ if (message.create_time_seconds !== 0) {
15754
+ obj.create_time_seconds = Math.round(message.create_time_seconds);
15755
+ }
15756
+ if (message.update_time_seconds !== 0) {
15757
+ obj.update_time_seconds = Math.round(message.update_time_seconds);
15758
+ }
15759
+ if (message.display_names?.length) {
15760
+ obj.display_names = message.display_names;
15761
+ }
15762
+ if (message.channel_avatar !== "") {
15763
+ obj.channel_avatar = message.channel_avatar;
15764
+ }
15765
+ if (message.clan_name !== "") {
15766
+ obj.clan_name = message.clan_name;
15767
+ }
15768
+ if (message.app_id !== "") {
15769
+ obj.app_id = message.app_id;
15770
+ }
15771
+ if (message.is_mute !== false) {
15772
+ obj.is_mute = message.is_mute;
15773
+ }
15774
+ if (message.age_restricted !== 0) {
15775
+ obj.age_restricted = Math.round(message.age_restricted);
15776
+ }
15777
+ if (message.topic !== "") {
15778
+ obj.topic = message.topic;
15779
+ }
15780
+ if (message.e2ee !== 0) {
15781
+ obj.e2ee = Math.round(message.e2ee);
15782
+ }
15783
+ if (message.member_count !== 0) {
15784
+ obj.member_count = Math.round(message.member_count);
15785
+ }
15786
+ return obj;
15787
+ },
15788
+
15136
15789
  create<I extends Exact<DeepPartial<ChannelDescription>, I>>(base?: I): ChannelDescription {
15137
15790
  return ChannelDescription.fromPartial(base ?? ({} as any));
15138
15791
  },
@@ -15143,7 +15796,7 @@ export const ChannelDescription = {
15143
15796
  message.channel_id = object.channel_id ?? "";
15144
15797
  message.category_id = object.category_id ?? "";
15145
15798
  message.category_name = object.category_name ?? "";
15146
- message.type = object.type ?? undefined;
15799
+ message.type = object.type ?? 0;
15147
15800
  message.creator_id = object.creator_id ?? "";
15148
15801
  message.channel_label = object.channel_label ?? "";
15149
15802
  message.channel_private = object.channel_private ?? 0;
@@ -25755,6 +26408,7 @@ function createBaseApp(): App {
25755
26408
  applogo: "",
25756
26409
  is_shadow: false,
25757
26410
  disable_time: undefined,
26411
+ create_time: undefined,
25758
26412
  token: "",
25759
26413
  role: 0,
25760
26414
  about: "",
@@ -25782,17 +26436,20 @@ export const App = {
25782
26436
  if (message.disable_time !== undefined) {
25783
26437
  Timestamp.encode(toTimestamp(message.disable_time), writer.uint32(50).fork()).ldelim();
25784
26438
  }
26439
+ if (message.create_time !== undefined) {
26440
+ Timestamp.encode(toTimestamp(message.create_time), writer.uint32(58).fork()).ldelim();
26441
+ }
25785
26442
  if (message.token !== "") {
25786
- writer.uint32(58).string(message.token);
26443
+ writer.uint32(66).string(message.token);
25787
26444
  }
25788
26445
  if (message.role !== 0) {
25789
- writer.uint32(64).int32(message.role);
26446
+ writer.uint32(72).int32(message.role);
25790
26447
  }
25791
26448
  if (message.about !== "") {
25792
- writer.uint32(74).string(message.about);
26449
+ writer.uint32(82).string(message.about);
25793
26450
  }
25794
26451
  if (message.app_url !== "") {
25795
- writer.uint32(82).string(message.app_url);
26452
+ writer.uint32(90).string(message.app_url);
25796
26453
  }
25797
26454
  return writer;
25798
26455
  },
@@ -25851,27 +26508,34 @@ export const App = {
25851
26508
  break;
25852
26509
  }
25853
26510
 
25854
- message.token = reader.string();
26511
+ message.create_time = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
25855
26512
  continue;
25856
26513
  case 8:
25857
- if (tag !== 64) {
26514
+ if (tag !== 66) {
25858
26515
  break;
25859
26516
  }
25860
26517
 
25861
- message.role = reader.int32();
26518
+ message.token = reader.string();
25862
26519
  continue;
25863
26520
  case 9:
25864
- if (tag !== 74) {
26521
+ if (tag !== 72) {
25865
26522
  break;
25866
26523
  }
25867
26524
 
25868
- message.about = reader.string();
26525
+ message.role = reader.int32();
25869
26526
  continue;
25870
26527
  case 10:
25871
26528
  if (tag !== 82) {
25872
26529
  break;
25873
26530
  }
25874
26531
 
26532
+ message.about = reader.string();
26533
+ continue;
26534
+ case 11:
26535
+ if (tag !== 90) {
26536
+ break;
26537
+ }
26538
+
25875
26539
  message.app_url = reader.string();
25876
26540
  continue;
25877
26541
  }
@@ -25891,6 +26555,7 @@ export const App = {
25891
26555
  applogo: isSet(object.applogo) ? globalThis.String(object.applogo) : "",
25892
26556
  is_shadow: isSet(object.is_shadow) ? globalThis.Boolean(object.is_shadow) : false,
25893
26557
  disable_time: isSet(object.disable_time) ? fromJsonTimestamp(object.disable_time) : undefined,
26558
+ create_time: isSet(object.create_time) ? fromJsonTimestamp(object.create_time) : undefined,
25894
26559
  token: isSet(object.token) ? globalThis.String(object.token) : "",
25895
26560
  role: isSet(object.role) ? globalThis.Number(object.role) : 0,
25896
26561
  about: isSet(object.about) ? globalThis.String(object.about) : "",
@@ -25918,6 +26583,9 @@ export const App = {
25918
26583
  if (message.disable_time !== undefined) {
25919
26584
  obj.disable_time = message.disable_time.toISOString();
25920
26585
  }
26586
+ if (message.create_time !== undefined) {
26587
+ obj.create_time = message.create_time.toISOString();
26588
+ }
25921
26589
  if (message.token !== "") {
25922
26590
  obj.token = message.token;
25923
26591
  }
@@ -25944,6 +26612,7 @@ export const App = {
25944
26612
  message.applogo = object.applogo ?? "";
25945
26613
  message.is_shadow = object.is_shadow ?? false;
25946
26614
  message.disable_time = object.disable_time ?? undefined;
26615
+ message.create_time = object.create_time ?? undefined;
25947
26616
  message.token = object.token ?? "";
25948
26617
  message.role = object.role ?? 0;
25949
26618
  message.about = object.about ?? "";
@@ -38790,6 +39459,254 @@ export const ReportMessageAbuseReqest = {
38790
39459
  },
38791
39460
  };
38792
39461
 
39462
+ function createBaseLogedDeviceList(): LogedDeviceList {
39463
+ return { devices: [] };
39464
+ }
39465
+
39466
+ export const LogedDeviceList = {
39467
+ encode(message: LogedDeviceList, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
39468
+ for (const v of message.devices) {
39469
+ LogedDevice.encode(v!, writer.uint32(10).fork()).ldelim();
39470
+ }
39471
+ return writer;
39472
+ },
39473
+
39474
+ decode(input: _m0.Reader | Uint8Array, length?: number): LogedDeviceList {
39475
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
39476
+ let end = length === undefined ? reader.len : reader.pos + length;
39477
+ const message = createBaseLogedDeviceList();
39478
+ while (reader.pos < end) {
39479
+ const tag = reader.uint32();
39480
+ switch (tag >>> 3) {
39481
+ case 1:
39482
+ if (tag !== 10) {
39483
+ break;
39484
+ }
39485
+
39486
+ message.devices.push(LogedDevice.decode(reader, reader.uint32()));
39487
+ continue;
39488
+ }
39489
+ if ((tag & 7) === 4 || tag === 0) {
39490
+ break;
39491
+ }
39492
+ reader.skipType(tag & 7);
39493
+ }
39494
+ return message;
39495
+ },
39496
+
39497
+ fromJSON(object: any): LogedDeviceList {
39498
+ return {
39499
+ devices: globalThis.Array.isArray(object?.devices) ? object.devices.map((e: any) => LogedDevice.fromJSON(e)) : [],
39500
+ };
39501
+ },
39502
+
39503
+ toJSON(message: LogedDeviceList): unknown {
39504
+ const obj: any = {};
39505
+ if (message.devices?.length) {
39506
+ obj.devices = message.devices.map((e) => LogedDevice.toJSON(e));
39507
+ }
39508
+ return obj;
39509
+ },
39510
+
39511
+ create<I extends Exact<DeepPartial<LogedDeviceList>, I>>(base?: I): LogedDeviceList {
39512
+ return LogedDeviceList.fromPartial(base ?? ({} as any));
39513
+ },
39514
+ fromPartial<I extends Exact<DeepPartial<LogedDeviceList>, I>>(object: I): LogedDeviceList {
39515
+ const message = createBaseLogedDeviceList();
39516
+ message.devices = object.devices?.map((e) => LogedDevice.fromPartial(e)) || [];
39517
+ return message;
39518
+ },
39519
+ };
39520
+
39521
+ function createBaseLogedDevice(): LogedDevice {
39522
+ return {
39523
+ device_id: "",
39524
+ device_name: "",
39525
+ login_at: undefined,
39526
+ status: 0,
39527
+ platform: "",
39528
+ ip: "",
39529
+ last_active: undefined,
39530
+ location: "",
39531
+ is_current: false,
39532
+ };
39533
+ }
39534
+
39535
+ export const LogedDevice = {
39536
+ encode(message: LogedDevice, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
39537
+ if (message.device_id !== "") {
39538
+ writer.uint32(10).string(message.device_id);
39539
+ }
39540
+ if (message.device_name !== "") {
39541
+ writer.uint32(18).string(message.device_name);
39542
+ }
39543
+ if (message.login_at !== undefined) {
39544
+ Timestamp.encode(toTimestamp(message.login_at), writer.uint32(26).fork()).ldelim();
39545
+ }
39546
+ if (message.status !== 0) {
39547
+ writer.uint32(32).int32(message.status);
39548
+ }
39549
+ if (message.platform !== "") {
39550
+ writer.uint32(42).string(message.platform);
39551
+ }
39552
+ if (message.ip !== "") {
39553
+ writer.uint32(50).string(message.ip);
39554
+ }
39555
+ if (message.last_active !== undefined) {
39556
+ Timestamp.encode(toTimestamp(message.last_active), writer.uint32(58).fork()).ldelim();
39557
+ }
39558
+ if (message.location !== "") {
39559
+ writer.uint32(66).string(message.location);
39560
+ }
39561
+ if (message.is_current !== false) {
39562
+ writer.uint32(72).bool(message.is_current);
39563
+ }
39564
+ return writer;
39565
+ },
39566
+
39567
+ decode(input: _m0.Reader | Uint8Array, length?: number): LogedDevice {
39568
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
39569
+ let end = length === undefined ? reader.len : reader.pos + length;
39570
+ const message = createBaseLogedDevice();
39571
+ while (reader.pos < end) {
39572
+ const tag = reader.uint32();
39573
+ switch (tag >>> 3) {
39574
+ case 1:
39575
+ if (tag !== 10) {
39576
+ break;
39577
+ }
39578
+
39579
+ message.device_id = reader.string();
39580
+ continue;
39581
+ case 2:
39582
+ if (tag !== 18) {
39583
+ break;
39584
+ }
39585
+
39586
+ message.device_name = reader.string();
39587
+ continue;
39588
+ case 3:
39589
+ if (tag !== 26) {
39590
+ break;
39591
+ }
39592
+
39593
+ message.login_at = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
39594
+ continue;
39595
+ case 4:
39596
+ if (tag !== 32) {
39597
+ break;
39598
+ }
39599
+
39600
+ message.status = reader.int32();
39601
+ continue;
39602
+ case 5:
39603
+ if (tag !== 42) {
39604
+ break;
39605
+ }
39606
+
39607
+ message.platform = reader.string();
39608
+ continue;
39609
+ case 6:
39610
+ if (tag !== 50) {
39611
+ break;
39612
+ }
39613
+
39614
+ message.ip = reader.string();
39615
+ continue;
39616
+ case 7:
39617
+ if (tag !== 58) {
39618
+ break;
39619
+ }
39620
+
39621
+ message.last_active = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
39622
+ continue;
39623
+ case 8:
39624
+ if (tag !== 66) {
39625
+ break;
39626
+ }
39627
+
39628
+ message.location = reader.string();
39629
+ continue;
39630
+ case 9:
39631
+ if (tag !== 72) {
39632
+ break;
39633
+ }
39634
+
39635
+ message.is_current = reader.bool();
39636
+ continue;
39637
+ }
39638
+ if ((tag & 7) === 4 || tag === 0) {
39639
+ break;
39640
+ }
39641
+ reader.skipType(tag & 7);
39642
+ }
39643
+ return message;
39644
+ },
39645
+
39646
+ fromJSON(object: any): LogedDevice {
39647
+ return {
39648
+ device_id: isSet(object.device_id) ? globalThis.String(object.device_id) : "",
39649
+ device_name: isSet(object.device_name) ? globalThis.String(object.device_name) : "",
39650
+ login_at: isSet(object.login_at) ? fromJsonTimestamp(object.login_at) : undefined,
39651
+ status: isSet(object.status) ? globalThis.Number(object.status) : 0,
39652
+ platform: isSet(object.platform) ? globalThis.String(object.platform) : "",
39653
+ ip: isSet(object.ip) ? globalThis.String(object.ip) : "",
39654
+ last_active: isSet(object.last_active) ? fromJsonTimestamp(object.last_active) : undefined,
39655
+ location: isSet(object.location) ? globalThis.String(object.location) : "",
39656
+ is_current: isSet(object.is_current) ? globalThis.Boolean(object.is_current) : false,
39657
+ };
39658
+ },
39659
+
39660
+ toJSON(message: LogedDevice): unknown {
39661
+ const obj: any = {};
39662
+ if (message.device_id !== "") {
39663
+ obj.device_id = message.device_id;
39664
+ }
39665
+ if (message.device_name !== "") {
39666
+ obj.device_name = message.device_name;
39667
+ }
39668
+ if (message.login_at !== undefined) {
39669
+ obj.login_at = message.login_at.toISOString();
39670
+ }
39671
+ if (message.status !== 0) {
39672
+ obj.status = Math.round(message.status);
39673
+ }
39674
+ if (message.platform !== "") {
39675
+ obj.platform = message.platform;
39676
+ }
39677
+ if (message.ip !== "") {
39678
+ obj.ip = message.ip;
39679
+ }
39680
+ if (message.last_active !== undefined) {
39681
+ obj.last_active = message.last_active.toISOString();
39682
+ }
39683
+ if (message.location !== "") {
39684
+ obj.location = message.location;
39685
+ }
39686
+ if (message.is_current !== false) {
39687
+ obj.is_current = message.is_current;
39688
+ }
39689
+ return obj;
39690
+ },
39691
+
39692
+ create<I extends Exact<DeepPartial<LogedDevice>, I>>(base?: I): LogedDevice {
39693
+ return LogedDevice.fromPartial(base ?? ({} as any));
39694
+ },
39695
+ fromPartial<I extends Exact<DeepPartial<LogedDevice>, I>>(object: I): LogedDevice {
39696
+ const message = createBaseLogedDevice();
39697
+ message.device_id = object.device_id ?? "";
39698
+ message.device_name = object.device_name ?? "";
39699
+ message.login_at = object.login_at ?? undefined;
39700
+ message.status = object.status ?? 0;
39701
+ message.platform = object.platform ?? "";
39702
+ message.ip = object.ip ?? "";
39703
+ message.last_active = object.last_active ?? undefined;
39704
+ message.location = object.location ?? "";
39705
+ message.is_current = object.is_current ?? false;
39706
+ return message;
39707
+ },
39708
+ };
39709
+
38793
39710
  function bytesFromBase64(b64: string): Uint8Array {
38794
39711
  if ((globalThis as any).Buffer) {
38795
39712
  return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));