@tgsnake/skema 1.9.0 → 1.11.0

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/dist/raw/Raw.js CHANGED
@@ -5,7 +5,7 @@ const index_js_1 = require("@/raw/core/index.js");
5
5
  const deps_js_1 = require("@/deps.js");
6
6
  var Raw;
7
7
  (function (Raw) {
8
- Raw.Layer = 222;
8
+ Raw.Layer = 223;
9
9
  Raw.HighestSCLayer = 144;
10
10
  class ResPQ extends index_js_1.TLObject {
11
11
  nonce;
@@ -6014,26 +6014,38 @@ var Raw;
6014
6014
  userId;
6015
6015
  inviterId;
6016
6016
  date;
6017
+ rank;
6017
6018
  constructor(params) {
6018
6019
  super();
6019
6020
  this.classType = 'types';
6020
6021
  this.className = 'ChatParticipant';
6021
- this.constructorId = 0xc02d4007;
6022
+ this.constructorId = 0x38e79fde;
6022
6023
  this.subclassOfId = 0x7d7c6f86;
6023
- this._slots = ['userId', 'inviterId', 'date'];
6024
+ this._slots = ['userId', 'inviterId', 'date', 'rank'];
6024
6025
  this.userId = params.userId;
6025
6026
  this.inviterId = params.inviterId;
6026
6027
  this.date = params.date;
6028
+ this.rank = params.rank;
6027
6029
  }
6028
6030
  static async read(_data, ..._args) {
6031
+ let flags = await index_js_1.Primitive.Int.read(_data);
6029
6032
  let userId = await index_js_1.Primitive.Long.read(_data);
6030
6033
  let inviterId = await index_js_1.Primitive.Long.read(_data);
6031
6034
  let date = await index_js_1.Primitive.Int.read(_data);
6032
- return new Raw.ChatParticipant({ userId: userId, inviterId: inviterId, date: date });
6035
+ let rank = flags & (1 << 0) ? await index_js_1.Primitive.String.read(_data) : undefined;
6036
+ return new Raw.ChatParticipant({
6037
+ userId: userId,
6038
+ inviterId: inviterId,
6039
+ date: date,
6040
+ rank: rank,
6041
+ });
6033
6042
  }
6034
6043
  write() {
6035
6044
  const b = new deps_js_1.BytesIO();
6036
6045
  b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
6046
+ let flags = 0;
6047
+ flags |= this.rank !== undefined ? 1 << 0 : 0;
6048
+ b.write(index_js_1.Primitive.Int.write(flags));
6037
6049
  if (this.userId !== undefined) {
6038
6050
  b.write(index_js_1.Primitive.Long.write(this.userId));
6039
6051
  }
@@ -6043,31 +6055,44 @@ var Raw;
6043
6055
  if (this.date !== undefined) {
6044
6056
  b.write(index_js_1.Primitive.Int.write(this.date));
6045
6057
  }
6058
+ if (this.rank !== undefined) {
6059
+ b.write(index_js_1.Primitive.String.write(this.rank));
6060
+ }
6046
6061
  return deps_js_1.Buffer.from(b.buffer);
6047
6062
  }
6048
6063
  }
6049
6064
  Raw.ChatParticipant = ChatParticipant;
6050
6065
  class ChatParticipantCreator extends index_js_1.TLObject {
6051
6066
  userId;
6067
+ rank;
6052
6068
  constructor(params) {
6053
6069
  super();
6054
6070
  this.classType = 'types';
6055
6071
  this.className = 'ChatParticipantCreator';
6056
- this.constructorId = 0xe46bcee4;
6072
+ this.constructorId = 0xe1f867b8;
6057
6073
  this.subclassOfId = 0x7d7c6f86;
6058
- this._slots = ['userId'];
6074
+ this._slots = ['userId', 'rank'];
6059
6075
  this.userId = params.userId;
6076
+ this.rank = params.rank;
6060
6077
  }
6061
6078
  static async read(_data, ..._args) {
6079
+ let flags = await index_js_1.Primitive.Int.read(_data);
6062
6080
  let userId = await index_js_1.Primitive.Long.read(_data);
6063
- return new Raw.ChatParticipantCreator({ userId: userId });
6081
+ let rank = flags & (1 << 0) ? await index_js_1.Primitive.String.read(_data) : undefined;
6082
+ return new Raw.ChatParticipantCreator({ userId: userId, rank: rank });
6064
6083
  }
6065
6084
  write() {
6066
6085
  const b = new deps_js_1.BytesIO();
6067
6086
  b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
6087
+ let flags = 0;
6088
+ flags |= this.rank !== undefined ? 1 << 0 : 0;
6089
+ b.write(index_js_1.Primitive.Int.write(flags));
6068
6090
  if (this.userId !== undefined) {
6069
6091
  b.write(index_js_1.Primitive.Long.write(this.userId));
6070
6092
  }
6093
+ if (this.rank !== undefined) {
6094
+ b.write(index_js_1.Primitive.String.write(this.rank));
6095
+ }
6071
6096
  return deps_js_1.Buffer.from(b.buffer);
6072
6097
  }
6073
6098
  }
@@ -6076,26 +6101,38 @@ var Raw;
6076
6101
  userId;
6077
6102
  inviterId;
6078
6103
  date;
6104
+ rank;
6079
6105
  constructor(params) {
6080
6106
  super();
6081
6107
  this.classType = 'types';
6082
6108
  this.className = 'ChatParticipantAdmin';
6083
- this.constructorId = 0xa0933f5b;
6109
+ this.constructorId = 0x360d5d2;
6084
6110
  this.subclassOfId = 0x7d7c6f86;
6085
- this._slots = ['userId', 'inviterId', 'date'];
6111
+ this._slots = ['userId', 'inviterId', 'date', 'rank'];
6086
6112
  this.userId = params.userId;
6087
6113
  this.inviterId = params.inviterId;
6088
6114
  this.date = params.date;
6115
+ this.rank = params.rank;
6089
6116
  }
6090
6117
  static async read(_data, ..._args) {
6118
+ let flags = await index_js_1.Primitive.Int.read(_data);
6091
6119
  let userId = await index_js_1.Primitive.Long.read(_data);
6092
6120
  let inviterId = await index_js_1.Primitive.Long.read(_data);
6093
6121
  let date = await index_js_1.Primitive.Int.read(_data);
6094
- return new Raw.ChatParticipantAdmin({ userId: userId, inviterId: inviterId, date: date });
6122
+ let rank = flags & (1 << 0) ? await index_js_1.Primitive.String.read(_data) : undefined;
6123
+ return new Raw.ChatParticipantAdmin({
6124
+ userId: userId,
6125
+ inviterId: inviterId,
6126
+ date: date,
6127
+ rank: rank,
6128
+ });
6095
6129
  }
6096
6130
  write() {
6097
6131
  const b = new deps_js_1.BytesIO();
6098
6132
  b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
6133
+ let flags = 0;
6134
+ flags |= this.rank !== undefined ? 1 << 0 : 0;
6135
+ b.write(index_js_1.Primitive.Int.write(flags));
6099
6136
  if (this.userId !== undefined) {
6100
6137
  b.write(index_js_1.Primitive.Long.write(this.userId));
6101
6138
  }
@@ -6105,6 +6142,9 @@ var Raw;
6105
6142
  if (this.date !== undefined) {
6106
6143
  b.write(index_js_1.Primitive.Int.write(this.date));
6107
6144
  }
6145
+ if (this.rank !== undefined) {
6146
+ b.write(index_js_1.Primitive.String.write(this.rank));
6147
+ }
6108
6148
  return deps_js_1.Buffer.from(b.buffer);
6109
6149
  }
6110
6150
  }
@@ -6311,6 +6351,7 @@ var Raw;
6311
6351
  id;
6312
6352
  fromId;
6313
6353
  fromBoostsApplied;
6354
+ fromRank;
6314
6355
  peerId;
6315
6356
  savedPeerId;
6316
6357
  fwdFrom;
@@ -6343,7 +6384,7 @@ var Raw;
6343
6384
  super();
6344
6385
  this.classType = 'types';
6345
6386
  this.className = 'Message';
6346
- this.constructorId = 0x9cb490e9;
6387
+ this.constructorId = 0x3ae56482;
6347
6388
  this.subclassOfId = 0x790009e3;
6348
6389
  this._slots = [
6349
6390
  'out',
@@ -6364,6 +6405,7 @@ var Raw;
6364
6405
  'id',
6365
6406
  'fromId',
6366
6407
  'fromBoostsApplied',
6408
+ 'fromRank',
6367
6409
  'peerId',
6368
6410
  'savedPeerId',
6369
6411
  'fwdFrom',
@@ -6411,6 +6453,7 @@ var Raw;
6411
6453
  this.id = params.id;
6412
6454
  this.fromId = params.fromId;
6413
6455
  this.fromBoostsApplied = params.fromBoostsApplied;
6456
+ this.fromRank = params.fromRank;
6414
6457
  this.peerId = params.peerId;
6415
6458
  this.savedPeerId = params.savedPeerId;
6416
6459
  this.fwdFrom = params.fwdFrom;
@@ -6461,6 +6504,7 @@ var Raw;
6461
6504
  let id = await index_js_1.Primitive.Int.read(_data);
6462
6505
  let fromId = flags & (1 << 8) ? await index_js_1.TLObject.read(_data) : undefined;
6463
6506
  let fromBoostsApplied = flags & (1 << 29) ? await index_js_1.Primitive.Int.read(_data) : undefined;
6507
+ let fromRank = flags2 & (1 << 12) ? await index_js_1.Primitive.String.read(_data) : undefined;
6464
6508
  let peerId = await index_js_1.TLObject.read(_data);
6465
6509
  let savedPeerId = flags & (1 << 28) ? await index_js_1.TLObject.read(_data) : undefined;
6466
6510
  let fwdFrom = flags & (1 << 2) ? await index_js_1.TLObject.read(_data) : undefined;
@@ -6508,6 +6552,7 @@ var Raw;
6508
6552
  id: id,
6509
6553
  fromId: fromId,
6510
6554
  fromBoostsApplied: fromBoostsApplied,
6555
+ fromRank: fromRank,
6511
6556
  peerId: peerId,
6512
6557
  savedPeerId: savedPeerId,
6513
6558
  fwdFrom: fwdFrom,
@@ -6578,6 +6623,7 @@ var Raw;
6578
6623
  flags2 |= this.videoProcessingPending ? 1 << 4 : 0;
6579
6624
  flags2 |= this.paidSuggestedPostStars ? 1 << 8 : 0;
6580
6625
  flags2 |= this.paidSuggestedPostTon ? 1 << 9 : 0;
6626
+ flags2 |= this.fromRank !== undefined ? 1 << 12 : 0;
6581
6627
  flags2 |= this.viaBusinessBotId !== undefined ? 1 << 0 : 0;
6582
6628
  flags2 |= this.effect !== undefined ? 1 << 2 : 0;
6583
6629
  flags2 |= this.factcheck !== undefined ? 1 << 3 : 0;
@@ -6596,6 +6642,9 @@ var Raw;
6596
6642
  if (this.fromBoostsApplied !== undefined) {
6597
6643
  b.write(index_js_1.Primitive.Int.write(this.fromBoostsApplied));
6598
6644
  }
6645
+ if (this.fromRank !== undefined) {
6646
+ b.write(index_js_1.Primitive.String.write(this.fromRank));
6647
+ }
6599
6648
  if (this.peerId !== undefined) {
6600
6649
  b.write(this.peerId.write());
6601
6650
  }
@@ -10395,6 +10444,79 @@ var Raw;
10395
10444
  }
10396
10445
  }
10397
10446
  Raw.MessageActionChangeCreator = MessageActionChangeCreator;
10447
+ class MessageActionNoForwardsToggle extends index_js_1.TLObject {
10448
+ prevValue;
10449
+ newValue;
10450
+ constructor(params) {
10451
+ super();
10452
+ this.classType = 'types';
10453
+ this.className = 'MessageActionNoForwardsToggle';
10454
+ this.constructorId = 0xbf7d6572;
10455
+ this.subclassOfId = 0x8680d126;
10456
+ this._slots = ['prevValue', 'newValue'];
10457
+ this.prevValue = params.prevValue;
10458
+ this.newValue = params.newValue;
10459
+ }
10460
+ static async read(_data, ..._args) {
10461
+ let prevValue = await index_js_1.Primitive.Bool.read(_data);
10462
+ let newValue = await index_js_1.Primitive.Bool.read(_data);
10463
+ return new Raw.MessageActionNoForwardsToggle({ prevValue: prevValue, newValue: newValue });
10464
+ }
10465
+ write() {
10466
+ const b = new deps_js_1.BytesIO();
10467
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
10468
+ if (this.prevValue !== undefined) {
10469
+ b.write(index_js_1.Primitive.Bool.write(this.prevValue));
10470
+ }
10471
+ if (this.newValue !== undefined) {
10472
+ b.write(index_js_1.Primitive.Bool.write(this.newValue));
10473
+ }
10474
+ return deps_js_1.Buffer.from(b.buffer);
10475
+ }
10476
+ }
10477
+ Raw.MessageActionNoForwardsToggle = MessageActionNoForwardsToggle;
10478
+ class MessageActionNoForwardsRequest extends index_js_1.TLObject {
10479
+ expired;
10480
+ prevValue;
10481
+ newValue;
10482
+ constructor(params) {
10483
+ super();
10484
+ this.classType = 'types';
10485
+ this.className = 'MessageActionNoForwardsRequest';
10486
+ this.constructorId = 0x3e2793ba;
10487
+ this.subclassOfId = 0x8680d126;
10488
+ this._slots = ['expired', 'prevValue', 'newValue'];
10489
+ this.expired = params.expired;
10490
+ this.prevValue = params.prevValue;
10491
+ this.newValue = params.newValue;
10492
+ }
10493
+ static async read(_data, ..._args) {
10494
+ let flags = await index_js_1.Primitive.Int.read(_data);
10495
+ let expired = flags & (1 << 0) ? true : false;
10496
+ let prevValue = await index_js_1.Primitive.Bool.read(_data);
10497
+ let newValue = await index_js_1.Primitive.Bool.read(_data);
10498
+ return new Raw.MessageActionNoForwardsRequest({
10499
+ expired: expired,
10500
+ prevValue: prevValue,
10501
+ newValue: newValue,
10502
+ });
10503
+ }
10504
+ write() {
10505
+ const b = new deps_js_1.BytesIO();
10506
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
10507
+ let flags = 0;
10508
+ flags |= this.expired ? 1 << 0 : 0;
10509
+ b.write(index_js_1.Primitive.Int.write(flags));
10510
+ if (this.prevValue !== undefined) {
10511
+ b.write(index_js_1.Primitive.Bool.write(this.prevValue));
10512
+ }
10513
+ if (this.newValue !== undefined) {
10514
+ b.write(index_js_1.Primitive.Bool.write(this.newValue));
10515
+ }
10516
+ return deps_js_1.Buffer.from(b.buffer);
10517
+ }
10518
+ }
10519
+ Raw.MessageActionNoForwardsRequest = MessageActionNoForwardsRequest;
10398
10520
  class Dialog extends index_js_1.TLObject {
10399
10521
  pinned;
10400
10522
  unreadMark;
@@ -11865,6 +11987,8 @@ var Raw;
11865
11987
  canViewRevenue;
11866
11988
  botCanManageEmojiStatus;
11867
11989
  displayGiftsButton;
11990
+ noforwardsMyEnabled;
11991
+ noforwardsPeerEnabled;
11868
11992
  id;
11869
11993
  about;
11870
11994
  settings;
@@ -11926,6 +12050,8 @@ var Raw;
11926
12050
  'canViewRevenue',
11927
12051
  'botCanManageEmojiStatus',
11928
12052
  'displayGiftsButton',
12053
+ 'noforwardsMyEnabled',
12054
+ 'noforwardsPeerEnabled',
11929
12055
  'id',
11930
12056
  'about',
11931
12057
  'settings',
@@ -11981,6 +12107,8 @@ var Raw;
11981
12107
  this.canViewRevenue = params.canViewRevenue;
11982
12108
  this.botCanManageEmojiStatus = params.botCanManageEmojiStatus;
11983
12109
  this.displayGiftsButton = params.displayGiftsButton;
12110
+ this.noforwardsMyEnabled = params.noforwardsMyEnabled;
12111
+ this.noforwardsPeerEnabled = params.noforwardsPeerEnabled;
11984
12112
  this.id = params.id;
11985
12113
  this.about = params.about;
11986
12114
  this.settings = params.settings;
@@ -12039,6 +12167,8 @@ var Raw;
12039
12167
  let canViewRevenue = flags2 & (1 << 9) ? true : false;
12040
12168
  let botCanManageEmojiStatus = flags2 & (1 << 10) ? true : false;
12041
12169
  let displayGiftsButton = flags2 & (1 << 16) ? true : false;
12170
+ let noforwardsMyEnabled = flags2 & (1 << 23) ? true : false;
12171
+ let noforwardsPeerEnabled = flags2 & (1 << 24) ? true : false;
12042
12172
  let id = await index_js_1.Primitive.Long.read(_data);
12043
12173
  let about = flags & (1 << 1) ? await index_js_1.Primitive.String.read(_data) : undefined;
12044
12174
  let settings = await index_js_1.TLObject.read(_data);
@@ -12094,6 +12224,8 @@ var Raw;
12094
12224
  canViewRevenue: canViewRevenue,
12095
12225
  botCanManageEmojiStatus: botCanManageEmojiStatus,
12096
12226
  displayGiftsButton: displayGiftsButton,
12227
+ noforwardsMyEnabled: noforwardsMyEnabled,
12228
+ noforwardsPeerEnabled: noforwardsPeerEnabled,
12097
12229
  id: id,
12098
12230
  about: about,
12099
12231
  settings: settings,
@@ -12170,6 +12302,8 @@ var Raw;
12170
12302
  flags2 |= this.canViewRevenue ? 1 << 9 : 0;
12171
12303
  flags2 |= this.botCanManageEmojiStatus ? 1 << 10 : 0;
12172
12304
  flags2 |= this.displayGiftsButton ? 1 << 16 : 0;
12305
+ flags2 |= this.noforwardsMyEnabled ? 1 << 23 : 0;
12306
+ flags2 |= this.noforwardsPeerEnabled ? 1 << 24 : 0;
12173
12307
  flags2 |= this.businessWorkHours !== undefined ? 1 << 0 : 0;
12174
12308
  flags2 |= this.businessLocation !== undefined ? 1 << 1 : 0;
12175
12309
  flags2 |= this.businessGreetingMessage !== undefined ? 1 << 2 : 0;
@@ -18474,6 +18608,54 @@ var Raw;
18474
18608
  }
18475
18609
  }
18476
18610
  Raw.UpdateStarGiftCraftFail = UpdateStarGiftCraftFail;
18611
+ class UpdateChatParticipantRank extends index_js_1.TLObject {
18612
+ chatId;
18613
+ userId;
18614
+ rank;
18615
+ version;
18616
+ constructor(params) {
18617
+ super();
18618
+ this.classType = 'types';
18619
+ this.className = 'UpdateChatParticipantRank';
18620
+ this.constructorId = 0xbd8367b9;
18621
+ this.subclassOfId = 0x9f89304e;
18622
+ this._slots = ['chatId', 'userId', 'rank', 'version'];
18623
+ this.chatId = params.chatId;
18624
+ this.userId = params.userId;
18625
+ this.rank = params.rank;
18626
+ this.version = params.version;
18627
+ }
18628
+ static async read(_data, ..._args) {
18629
+ let chatId = await index_js_1.Primitive.Long.read(_data);
18630
+ let userId = await index_js_1.Primitive.Long.read(_data);
18631
+ let rank = await index_js_1.Primitive.String.read(_data);
18632
+ let version = await index_js_1.Primitive.Int.read(_data);
18633
+ return new Raw.UpdateChatParticipantRank({
18634
+ chatId: chatId,
18635
+ userId: userId,
18636
+ rank: rank,
18637
+ version: version,
18638
+ });
18639
+ }
18640
+ write() {
18641
+ const b = new deps_js_1.BytesIO();
18642
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
18643
+ if (this.chatId !== undefined) {
18644
+ b.write(index_js_1.Primitive.Long.write(this.chatId));
18645
+ }
18646
+ if (this.userId !== undefined) {
18647
+ b.write(index_js_1.Primitive.Long.write(this.userId));
18648
+ }
18649
+ if (this.rank !== undefined) {
18650
+ b.write(index_js_1.Primitive.String.write(this.rank));
18651
+ }
18652
+ if (this.version !== undefined) {
18653
+ b.write(index_js_1.Primitive.Int.write(this.version));
18654
+ }
18655
+ return deps_js_1.Buffer.from(b.buffer);
18656
+ }
18657
+ }
18658
+ Raw.UpdateChatParticipantRank = UpdateChatParticipantRank;
18477
18659
  class UpdatesTooLong extends index_js_1.TLObject {
18478
18660
  constructor() {
18479
18661
  super();
@@ -25447,6 +25629,90 @@ var Raw;
25447
25629
  }
25448
25630
  }
25449
25631
  Raw.MessageEntityBlockquote = MessageEntityBlockquote;
25632
+ class MessageEntityFormattedDate extends index_js_1.TLObject {
25633
+ relative;
25634
+ shortTime;
25635
+ longTime;
25636
+ shortDate;
25637
+ longDate;
25638
+ dayOfWeek;
25639
+ offset;
25640
+ length;
25641
+ date;
25642
+ constructor(params) {
25643
+ super();
25644
+ this.classType = 'types';
25645
+ this.className = 'MessageEntityFormattedDate';
25646
+ this.constructorId = 0x904ac7c7;
25647
+ this.subclassOfId = 0xcf6419dc;
25648
+ this._slots = [
25649
+ 'relative',
25650
+ 'shortTime',
25651
+ 'longTime',
25652
+ 'shortDate',
25653
+ 'longDate',
25654
+ 'dayOfWeek',
25655
+ 'offset',
25656
+ 'length',
25657
+ 'date',
25658
+ ];
25659
+ this.relative = params.relative;
25660
+ this.shortTime = params.shortTime;
25661
+ this.longTime = params.longTime;
25662
+ this.shortDate = params.shortDate;
25663
+ this.longDate = params.longDate;
25664
+ this.dayOfWeek = params.dayOfWeek;
25665
+ this.offset = params.offset;
25666
+ this.length = params.length;
25667
+ this.date = params.date;
25668
+ }
25669
+ static async read(_data, ..._args) {
25670
+ let flags = await index_js_1.Primitive.Int.read(_data);
25671
+ let relative = flags & (1 << 0) ? true : false;
25672
+ let shortTime = flags & (1 << 1) ? true : false;
25673
+ let longTime = flags & (1 << 2) ? true : false;
25674
+ let shortDate = flags & (1 << 3) ? true : false;
25675
+ let longDate = flags & (1 << 4) ? true : false;
25676
+ let dayOfWeek = flags & (1 << 5) ? true : false;
25677
+ let offset = await index_js_1.Primitive.Int.read(_data);
25678
+ let length = await index_js_1.Primitive.Int.read(_data);
25679
+ let date = await index_js_1.Primitive.Int.read(_data);
25680
+ return new Raw.MessageEntityFormattedDate({
25681
+ relative: relative,
25682
+ shortTime: shortTime,
25683
+ longTime: longTime,
25684
+ shortDate: shortDate,
25685
+ longDate: longDate,
25686
+ dayOfWeek: dayOfWeek,
25687
+ offset: offset,
25688
+ length: length,
25689
+ date: date,
25690
+ });
25691
+ }
25692
+ write() {
25693
+ const b = new deps_js_1.BytesIO();
25694
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
25695
+ let flags = 0;
25696
+ flags |= this.relative ? 1 << 0 : 0;
25697
+ flags |= this.shortTime ? 1 << 1 : 0;
25698
+ flags |= this.longTime ? 1 << 2 : 0;
25699
+ flags |= this.shortDate ? 1 << 3 : 0;
25700
+ flags |= this.longDate ? 1 << 4 : 0;
25701
+ flags |= this.dayOfWeek ? 1 << 5 : 0;
25702
+ b.write(index_js_1.Primitive.Int.write(flags));
25703
+ if (this.offset !== undefined) {
25704
+ b.write(index_js_1.Primitive.Int.write(this.offset));
25705
+ }
25706
+ if (this.length !== undefined) {
25707
+ b.write(index_js_1.Primitive.Int.write(this.length));
25708
+ }
25709
+ if (this.date !== undefined) {
25710
+ b.write(index_js_1.Primitive.Int.write(this.date));
25711
+ }
25712
+ return deps_js_1.Buffer.from(b.buffer);
25713
+ }
25714
+ }
25715
+ Raw.MessageEntityFormattedDate = MessageEntityFormattedDate;
25450
25716
  class InputChannelEmpty extends index_js_1.TLObject {
25451
25717
  constructor() {
25452
25718
  super();
@@ -25623,26 +25889,30 @@ var Raw;
25623
25889
  userId;
25624
25890
  date;
25625
25891
  subscriptionUntilDate;
25892
+ rank;
25626
25893
  constructor(params) {
25627
25894
  super();
25628
25895
  this.classType = 'types';
25629
25896
  this.className = 'ChannelParticipant';
25630
- this.constructorId = 0xcb397619;
25897
+ this.constructorId = 0x1bd54456;
25631
25898
  this.subclassOfId = 0xd9c7fc18;
25632
- this._slots = ['userId', 'date', 'subscriptionUntilDate'];
25899
+ this._slots = ['userId', 'date', 'subscriptionUntilDate', 'rank'];
25633
25900
  this.userId = params.userId;
25634
25901
  this.date = params.date;
25635
25902
  this.subscriptionUntilDate = params.subscriptionUntilDate;
25903
+ this.rank = params.rank;
25636
25904
  }
25637
25905
  static async read(_data, ..._args) {
25638
25906
  let flags = await index_js_1.Primitive.Int.read(_data);
25639
25907
  let userId = await index_js_1.Primitive.Long.read(_data);
25640
25908
  let date = await index_js_1.Primitive.Int.read(_data);
25641
25909
  let subscriptionUntilDate = flags & (1 << 0) ? await index_js_1.Primitive.Int.read(_data) : undefined;
25910
+ let rank = flags & (1 << 2) ? await index_js_1.Primitive.String.read(_data) : undefined;
25642
25911
  return new Raw.ChannelParticipant({
25643
25912
  userId: userId,
25644
25913
  date: date,
25645
25914
  subscriptionUntilDate: subscriptionUntilDate,
25915
+ rank: rank,
25646
25916
  });
25647
25917
  }
25648
25918
  write() {
@@ -25650,6 +25920,7 @@ var Raw;
25650
25920
  b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
25651
25921
  let flags = 0;
25652
25922
  flags |= this.subscriptionUntilDate !== undefined ? 1 << 0 : 0;
25923
+ flags |= this.rank !== undefined ? 1 << 2 : 0;
25653
25924
  b.write(index_js_1.Primitive.Int.write(flags));
25654
25925
  if (this.userId !== undefined) {
25655
25926
  b.write(index_js_1.Primitive.Long.write(this.userId));
@@ -25660,6 +25931,9 @@ var Raw;
25660
25931
  if (this.subscriptionUntilDate !== undefined) {
25661
25932
  b.write(index_js_1.Primitive.Int.write(this.subscriptionUntilDate));
25662
25933
  }
25934
+ if (this.rank !== undefined) {
25935
+ b.write(index_js_1.Primitive.String.write(this.rank));
25936
+ }
25663
25937
  return deps_js_1.Buffer.from(b.buffer);
25664
25938
  }
25665
25939
  }
@@ -25670,18 +25944,20 @@ var Raw;
25670
25944
  inviterId;
25671
25945
  date;
25672
25946
  subscriptionUntilDate;
25947
+ rank;
25673
25948
  constructor(params) {
25674
25949
  super();
25675
25950
  this.classType = 'types';
25676
25951
  this.className = 'ChannelParticipantSelf';
25677
- this.constructorId = 0x4f607bef;
25952
+ this.constructorId = 0xa9478a1a;
25678
25953
  this.subclassOfId = 0xd9c7fc18;
25679
- this._slots = ['viaRequest', 'userId', 'inviterId', 'date', 'subscriptionUntilDate'];
25954
+ this._slots = ['viaRequest', 'userId', 'inviterId', 'date', 'subscriptionUntilDate', 'rank'];
25680
25955
  this.viaRequest = params.viaRequest;
25681
25956
  this.userId = params.userId;
25682
25957
  this.inviterId = params.inviterId;
25683
25958
  this.date = params.date;
25684
25959
  this.subscriptionUntilDate = params.subscriptionUntilDate;
25960
+ this.rank = params.rank;
25685
25961
  }
25686
25962
  static async read(_data, ..._args) {
25687
25963
  let flags = await index_js_1.Primitive.Int.read(_data);
@@ -25690,12 +25966,14 @@ var Raw;
25690
25966
  let inviterId = await index_js_1.Primitive.Long.read(_data);
25691
25967
  let date = await index_js_1.Primitive.Int.read(_data);
25692
25968
  let subscriptionUntilDate = flags & (1 << 1) ? await index_js_1.Primitive.Int.read(_data) : undefined;
25969
+ let rank = flags & (1 << 2) ? await index_js_1.Primitive.String.read(_data) : undefined;
25693
25970
  return new Raw.ChannelParticipantSelf({
25694
25971
  viaRequest: viaRequest,
25695
25972
  userId: userId,
25696
25973
  inviterId: inviterId,
25697
25974
  date: date,
25698
25975
  subscriptionUntilDate: subscriptionUntilDate,
25976
+ rank: rank,
25699
25977
  });
25700
25978
  }
25701
25979
  write() {
@@ -25704,6 +25982,7 @@ var Raw;
25704
25982
  let flags = 0;
25705
25983
  flags |= this.viaRequest ? 1 << 0 : 0;
25706
25984
  flags |= this.subscriptionUntilDate !== undefined ? 1 << 1 : 0;
25985
+ flags |= this.rank !== undefined ? 1 << 2 : 0;
25707
25986
  b.write(index_js_1.Primitive.Int.write(flags));
25708
25987
  if (this.userId !== undefined) {
25709
25988
  b.write(index_js_1.Primitive.Long.write(this.userId));
@@ -25717,6 +25996,9 @@ var Raw;
25717
25996
  if (this.subscriptionUntilDate !== undefined) {
25718
25997
  b.write(index_js_1.Primitive.Int.write(this.subscriptionUntilDate));
25719
25998
  }
25999
+ if (this.rank !== undefined) {
26000
+ b.write(index_js_1.Primitive.String.write(this.rank));
26001
+ }
25720
26002
  return deps_js_1.Buffer.from(b.buffer);
25721
26003
  }
25722
26004
  }
@@ -25858,18 +26140,20 @@ var Raw;
25858
26140
  kickedBy;
25859
26141
  date;
25860
26142
  bannedRights;
26143
+ rank;
25861
26144
  constructor(params) {
25862
26145
  super();
25863
26146
  this.classType = 'types';
25864
26147
  this.className = 'ChannelParticipantBanned';
25865
- this.constructorId = 0x6df8014e;
26148
+ this.constructorId = 0xd5f0ad91;
25866
26149
  this.subclassOfId = 0xd9c7fc18;
25867
- this._slots = ['left', 'peer', 'kickedBy', 'date', 'bannedRights'];
26150
+ this._slots = ['left', 'peer', 'kickedBy', 'date', 'bannedRights', 'rank'];
25868
26151
  this.left = params.left;
25869
26152
  this.peer = params.peer;
25870
26153
  this.kickedBy = params.kickedBy;
25871
26154
  this.date = params.date;
25872
26155
  this.bannedRights = params.bannedRights;
26156
+ this.rank = params.rank;
25873
26157
  }
25874
26158
  static async read(_data, ..._args) {
25875
26159
  let flags = await index_js_1.Primitive.Int.read(_data);
@@ -25878,12 +26162,14 @@ var Raw;
25878
26162
  let kickedBy = await index_js_1.Primitive.Long.read(_data);
25879
26163
  let date = await index_js_1.Primitive.Int.read(_data);
25880
26164
  let bannedRights = await index_js_1.TLObject.read(_data);
26165
+ let rank = flags & (1 << 2) ? await index_js_1.Primitive.String.read(_data) : undefined;
25881
26166
  return new Raw.ChannelParticipantBanned({
25882
26167
  left: left,
25883
26168
  peer: peer,
25884
26169
  kickedBy: kickedBy,
25885
26170
  date: date,
25886
26171
  bannedRights: bannedRights,
26172
+ rank: rank,
25887
26173
  });
25888
26174
  }
25889
26175
  write() {
@@ -25891,6 +26177,7 @@ var Raw;
25891
26177
  b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
25892
26178
  let flags = 0;
25893
26179
  flags |= this.left ? 1 << 0 : 0;
26180
+ flags |= this.rank !== undefined ? 1 << 2 : 0;
25894
26181
  b.write(index_js_1.Primitive.Int.write(flags));
25895
26182
  if (this.peer !== undefined) {
25896
26183
  b.write(this.peer.write());
@@ -25904,6 +26191,9 @@ var Raw;
25904
26191
  if (this.bannedRights !== undefined) {
25905
26192
  b.write(this.bannedRights.write());
25906
26193
  }
26194
+ if (this.rank !== undefined) {
26195
+ b.write(index_js_1.Primitive.String.write(this.rank));
26196
+ }
25907
26197
  return deps_js_1.Buffer.from(b.buffer);
25908
26198
  }
25909
26199
  }
@@ -33508,6 +33798,47 @@ var Raw;
33508
33798
  }
33509
33799
  }
33510
33800
  Raw.ChannelAdminLogEventActionToggleAutotranslation = ChannelAdminLogEventActionToggleAutotranslation;
33801
+ class ChannelAdminLogEventActionParticipantEditRank extends index_js_1.TLObject {
33802
+ userId;
33803
+ prevRank;
33804
+ newRank;
33805
+ constructor(params) {
33806
+ super();
33807
+ this.classType = 'types';
33808
+ this.className = 'ChannelAdminLogEventActionParticipantEditRank';
33809
+ this.constructorId = 0x5806b4ec;
33810
+ this.subclassOfId = 0xb2b987f3;
33811
+ this._slots = ['userId', 'prevRank', 'newRank'];
33812
+ this.userId = params.userId;
33813
+ this.prevRank = params.prevRank;
33814
+ this.newRank = params.newRank;
33815
+ }
33816
+ static async read(_data, ..._args) {
33817
+ let userId = await index_js_1.Primitive.Long.read(_data);
33818
+ let prevRank = await index_js_1.Primitive.String.read(_data);
33819
+ let newRank = await index_js_1.Primitive.String.read(_data);
33820
+ return new Raw.ChannelAdminLogEventActionParticipantEditRank({
33821
+ userId: userId,
33822
+ prevRank: prevRank,
33823
+ newRank: newRank,
33824
+ });
33825
+ }
33826
+ write() {
33827
+ const b = new deps_js_1.BytesIO();
33828
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
33829
+ if (this.userId !== undefined) {
33830
+ b.write(index_js_1.Primitive.Long.write(this.userId));
33831
+ }
33832
+ if (this.prevRank !== undefined) {
33833
+ b.write(index_js_1.Primitive.String.write(this.prevRank));
33834
+ }
33835
+ if (this.newRank !== undefined) {
33836
+ b.write(index_js_1.Primitive.String.write(this.newRank));
33837
+ }
33838
+ return deps_js_1.Buffer.from(b.buffer);
33839
+ }
33840
+ }
33841
+ Raw.ChannelAdminLogEventActionParticipantEditRank = ChannelAdminLogEventActionParticipantEditRank;
33511
33842
  class ChannelAdminLogEvent extends index_js_1.TLObject {
33512
33843
  id;
33513
33844
  date;
@@ -33571,6 +33902,7 @@ var Raw;
33571
33902
  send;
33572
33903
  forums;
33573
33904
  subExtend;
33905
+ editRank;
33574
33906
  constructor(params) {
33575
33907
  super();
33576
33908
  this.classType = 'types';
@@ -33597,6 +33929,7 @@ var Raw;
33597
33929
  'send',
33598
33930
  'forums',
33599
33931
  'subExtend',
33932
+ 'editRank',
33600
33933
  ];
33601
33934
  this.join = params.join;
33602
33935
  this.leave = params.leave;
@@ -33617,6 +33950,7 @@ var Raw;
33617
33950
  this.send = params.send;
33618
33951
  this.forums = params.forums;
33619
33952
  this.subExtend = params.subExtend;
33953
+ this.editRank = params.editRank;
33620
33954
  }
33621
33955
  static async read(_data, ..._args) {
33622
33956
  let flags = await index_js_1.Primitive.Int.read(_data);
@@ -33639,6 +33973,7 @@ var Raw;
33639
33973
  let send = flags & (1 << 16) ? true : false;
33640
33974
  let forums = flags & (1 << 17) ? true : false;
33641
33975
  let subExtend = flags & (1 << 18) ? true : false;
33976
+ let editRank = flags & (1 << 19) ? true : false;
33642
33977
  return new Raw.ChannelAdminLogEventsFilter({
33643
33978
  join: join,
33644
33979
  leave: leave,
@@ -33659,6 +33994,7 @@ var Raw;
33659
33994
  send: send,
33660
33995
  forums: forums,
33661
33996
  subExtend: subExtend,
33997
+ editRank: editRank,
33662
33998
  });
33663
33999
  }
33664
34000
  write() {
@@ -33684,6 +34020,7 @@ var Raw;
33684
34020
  flags |= this.send ? 1 << 16 : 0;
33685
34021
  flags |= this.forums ? 1 << 17 : 0;
33686
34022
  flags |= this.subExtend ? 1 << 18 : 0;
34023
+ flags |= this.editRank ? 1 << 19 : 0;
33687
34024
  b.write(index_js_1.Primitive.Int.write(flags));
33688
34025
  return deps_js_1.Buffer.from(b.buffer);
33689
34026
  }
@@ -36695,6 +37032,7 @@ var Raw;
36695
37032
  editStories;
36696
37033
  deleteStories;
36697
37034
  manageDirectMessages;
37035
+ manageRanks;
36698
37036
  constructor(params) {
36699
37037
  super();
36700
37038
  this.classType = 'types';
@@ -36718,6 +37056,7 @@ var Raw;
36718
37056
  'editStories',
36719
37057
  'deleteStories',
36720
37058
  'manageDirectMessages',
37059
+ 'manageRanks',
36721
37060
  ];
36722
37061
  this.changeInfo = params.changeInfo;
36723
37062
  this.postMessages = params.postMessages;
@@ -36735,6 +37074,7 @@ var Raw;
36735
37074
  this.editStories = params.editStories;
36736
37075
  this.deleteStories = params.deleteStories;
36737
37076
  this.manageDirectMessages = params.manageDirectMessages;
37077
+ this.manageRanks = params.manageRanks;
36738
37078
  }
36739
37079
  static async read(_data, ..._args) {
36740
37080
  let flags = await index_js_1.Primitive.Int.read(_data);
@@ -36754,6 +37094,7 @@ var Raw;
36754
37094
  let editStories = flags & (1 << 15) ? true : false;
36755
37095
  let deleteStories = flags & (1 << 16) ? true : false;
36756
37096
  let manageDirectMessages = flags & (1 << 17) ? true : false;
37097
+ let manageRanks = flags & (1 << 18) ? true : false;
36757
37098
  return new Raw.ChatAdminRights({
36758
37099
  changeInfo: changeInfo,
36759
37100
  postMessages: postMessages,
@@ -36771,6 +37112,7 @@ var Raw;
36771
37112
  editStories: editStories,
36772
37113
  deleteStories: deleteStories,
36773
37114
  manageDirectMessages: manageDirectMessages,
37115
+ manageRanks: manageRanks,
36774
37116
  });
36775
37117
  }
36776
37118
  write() {
@@ -36793,6 +37135,7 @@ var Raw;
36793
37135
  flags |= this.editStories ? 1 << 15 : 0;
36794
37136
  flags |= this.deleteStories ? 1 << 16 : 0;
36795
37137
  flags |= this.manageDirectMessages ? 1 << 17 : 0;
37138
+ flags |= this.manageRanks ? 1 << 18 : 0;
36796
37139
  b.write(index_js_1.Primitive.Int.write(flags));
36797
37140
  return deps_js_1.Buffer.from(b.buffer);
36798
37141
  }
@@ -36819,6 +37162,7 @@ var Raw;
36819
37162
  sendVoices;
36820
37163
  sendDocs;
36821
37164
  sendPlain;
37165
+ editRank;
36822
37166
  untilDate;
36823
37167
  constructor(params) {
36824
37168
  super();
@@ -36847,6 +37191,7 @@ var Raw;
36847
37191
  'sendVoices',
36848
37192
  'sendDocs',
36849
37193
  'sendPlain',
37194
+ 'editRank',
36850
37195
  'untilDate',
36851
37196
  ];
36852
37197
  this.viewMessages = params.viewMessages;
@@ -36869,6 +37214,7 @@ var Raw;
36869
37214
  this.sendVoices = params.sendVoices;
36870
37215
  this.sendDocs = params.sendDocs;
36871
37216
  this.sendPlain = params.sendPlain;
37217
+ this.editRank = params.editRank;
36872
37218
  this.untilDate = params.untilDate;
36873
37219
  }
36874
37220
  static async read(_data, ..._args) {
@@ -36893,6 +37239,7 @@ var Raw;
36893
37239
  let sendVoices = flags & (1 << 23) ? true : false;
36894
37240
  let sendDocs = flags & (1 << 24) ? true : false;
36895
37241
  let sendPlain = flags & (1 << 25) ? true : false;
37242
+ let editRank = flags & (1 << 26) ? true : false;
36896
37243
  let untilDate = await index_js_1.Primitive.Int.read(_data);
36897
37244
  return new Raw.ChatBannedRights({
36898
37245
  viewMessages: viewMessages,
@@ -36915,6 +37262,7 @@ var Raw;
36915
37262
  sendVoices: sendVoices,
36916
37263
  sendDocs: sendDocs,
36917
37264
  sendPlain: sendPlain,
37265
+ editRank: editRank,
36918
37266
  untilDate: untilDate,
36919
37267
  });
36920
37268
  }
@@ -36942,6 +37290,7 @@ var Raw;
36942
37290
  flags |= this.sendVoices ? 1 << 23 : 0;
36943
37291
  flags |= this.sendDocs ? 1 << 24 : 0;
36944
37292
  flags |= this.sendPlain ? 1 << 25 : 0;
37293
+ flags |= this.editRank ? 1 << 26 : 0;
36945
37294
  b.write(index_js_1.Primitive.Int.write(flags));
36946
37295
  if (this.untilDate !== undefined) {
36947
37296
  b.write(index_js_1.Primitive.Int.write(this.untilDate));
@@ -37611,56 +37960,71 @@ var Raw;
37611
37960
  class UrlAuthResultRequest extends index_js_1.TLObject {
37612
37961
  requestWriteAccess;
37613
37962
  requestPhoneNumber;
37963
+ matchCodesFirst;
37614
37964
  bot;
37615
37965
  domain;
37616
37966
  browser;
37617
37967
  platform;
37618
37968
  ip;
37619
37969
  region;
37970
+ matchCodes;
37971
+ userIdHint;
37620
37972
  constructor(params) {
37621
37973
  super();
37622
37974
  this.classType = 'types';
37623
37975
  this.className = 'UrlAuthResultRequest';
37624
- this.constructorId = 0x32fabf1a;
37976
+ this.constructorId = 0xf8f8eb1e;
37625
37977
  this.subclassOfId = 0x7765cb1e;
37626
37978
  this._slots = [
37627
37979
  'requestWriteAccess',
37628
37980
  'requestPhoneNumber',
37981
+ 'matchCodesFirst',
37629
37982
  'bot',
37630
37983
  'domain',
37631
37984
  'browser',
37632
37985
  'platform',
37633
37986
  'ip',
37634
37987
  'region',
37988
+ 'matchCodes',
37989
+ 'userIdHint',
37635
37990
  ];
37636
37991
  this.requestWriteAccess = params.requestWriteAccess;
37637
37992
  this.requestPhoneNumber = params.requestPhoneNumber;
37993
+ this.matchCodesFirst = params.matchCodesFirst;
37638
37994
  this.bot = params.bot;
37639
37995
  this.domain = params.domain;
37640
37996
  this.browser = params.browser;
37641
37997
  this.platform = params.platform;
37642
37998
  this.ip = params.ip;
37643
37999
  this.region = params.region;
38000
+ this.matchCodes = params.matchCodes;
38001
+ this.userIdHint = params.userIdHint;
37644
38002
  }
37645
38003
  static async read(_data, ..._args) {
37646
38004
  let flags = await index_js_1.Primitive.Int.read(_data);
37647
38005
  let requestWriteAccess = flags & (1 << 0) ? true : false;
37648
38006
  let requestPhoneNumber = flags & (1 << 1) ? true : false;
38007
+ let matchCodesFirst = flags & (1 << 5) ? true : false;
37649
38008
  let bot = await index_js_1.TLObject.read(_data);
37650
38009
  let domain = await index_js_1.Primitive.String.read(_data);
37651
38010
  let browser = flags & (1 << 2) ? await index_js_1.Primitive.String.read(_data) : undefined;
37652
38011
  let platform = flags & (1 << 2) ? await index_js_1.Primitive.String.read(_data) : undefined;
37653
38012
  let ip = flags & (1 << 2) ? await index_js_1.Primitive.String.read(_data) : undefined;
37654
38013
  let region = flags & (1 << 2) ? await index_js_1.Primitive.String.read(_data) : undefined;
38014
+ let matchCodes = flags & (1 << 3) ? await index_js_1.TLObject.read(_data, index_js_1.Primitive.String) : [];
38015
+ let userIdHint = flags & (1 << 4) ? await index_js_1.Primitive.Long.read(_data) : undefined;
37655
38016
  return new Raw.UrlAuthResultRequest({
37656
38017
  requestWriteAccess: requestWriteAccess,
37657
38018
  requestPhoneNumber: requestPhoneNumber,
38019
+ matchCodesFirst: matchCodesFirst,
37658
38020
  bot: bot,
37659
38021
  domain: domain,
37660
38022
  browser: browser,
37661
38023
  platform: platform,
37662
38024
  ip: ip,
37663
38025
  region: region,
38026
+ matchCodes: matchCodes,
38027
+ userIdHint: userIdHint,
37664
38028
  });
37665
38029
  }
37666
38030
  write() {
@@ -37669,10 +38033,13 @@ var Raw;
37669
38033
  let flags = 0;
37670
38034
  flags |= this.requestWriteAccess ? 1 << 0 : 0;
37671
38035
  flags |= this.requestPhoneNumber ? 1 << 1 : 0;
38036
+ flags |= this.matchCodesFirst ? 1 << 5 : 0;
37672
38037
  flags |= this.browser !== undefined ? 1 << 2 : 0;
37673
38038
  flags |= this.platform !== undefined ? 1 << 2 : 0;
37674
38039
  flags |= this.ip !== undefined ? 1 << 2 : 0;
37675
38040
  flags |= this.region !== undefined ? 1 << 2 : 0;
38041
+ flags |= this.matchCodes ? 1 << 3 : 0;
38042
+ flags |= this.userIdHint !== undefined ? 1 << 4 : 0;
37676
38043
  b.write(index_js_1.Primitive.Int.write(flags));
37677
38044
  if (this.bot !== undefined) {
37678
38045
  b.write(this.bot.write());
@@ -37692,6 +38059,12 @@ var Raw;
37692
38059
  if (this.region !== undefined) {
37693
38060
  b.write(index_js_1.Primitive.String.write(this.region));
37694
38061
  }
38062
+ if (this.matchCodes) {
38063
+ b.write(index_js_1.Primitive.Vector.write(this.matchCodes, index_js_1.Primitive.String));
38064
+ }
38065
+ if (this.userIdHint !== undefined) {
38066
+ b.write(index_js_1.Primitive.Long.write(this.userIdHint));
38067
+ }
37695
38068
  return deps_js_1.Buffer.from(b.buffer);
37696
38069
  }
37697
38070
  }
@@ -69991,17 +70364,19 @@ var Raw;
69991
70364
  msgId;
69992
70365
  buttonId;
69993
70366
  url;
70367
+ inAppOrigin;
69994
70368
  constructor(params) {
69995
70369
  super();
69996
70370
  this.classType = 'functions';
69997
70371
  this.className = 'messages.RequestUrlAuth';
69998
- this.constructorId = 0x198fb446;
70372
+ this.constructorId = 0x894cc99c;
69999
70373
  this.subclassOfId = 0x7765cb1e;
70000
- this._slots = ['peer', 'msgId', 'buttonId', 'url'];
70374
+ this._slots = ['peer', 'msgId', 'buttonId', 'url', 'inAppOrigin'];
70001
70375
  this.peer = params.peer;
70002
70376
  this.msgId = params.msgId;
70003
70377
  this.buttonId = params.buttonId;
70004
70378
  this.url = params.url;
70379
+ this.inAppOrigin = params.inAppOrigin;
70005
70380
  }
70006
70381
  static async read(_data, ..._args) {
70007
70382
  let flags = await index_js_1.Primitive.Int.read(_data);
@@ -70009,11 +70384,13 @@ var Raw;
70009
70384
  let msgId = flags & (1 << 1) ? await index_js_1.Primitive.Int.read(_data) : undefined;
70010
70385
  let buttonId = flags & (1 << 1) ? await index_js_1.Primitive.Int.read(_data) : undefined;
70011
70386
  let url = flags & (1 << 2) ? await index_js_1.Primitive.String.read(_data) : undefined;
70387
+ let inAppOrigin = flags & (1 << 3) ? await index_js_1.Primitive.String.read(_data) : undefined;
70012
70388
  return new Raw.messages.RequestUrlAuth({
70013
70389
  peer: peer,
70014
70390
  msgId: msgId,
70015
70391
  buttonId: buttonId,
70016
70392
  url: url,
70393
+ inAppOrigin: inAppOrigin,
70017
70394
  });
70018
70395
  }
70019
70396
  write() {
@@ -70024,6 +70401,7 @@ var Raw;
70024
70401
  flags |= this.msgId !== undefined ? 1 << 1 : 0;
70025
70402
  flags |= this.buttonId !== undefined ? 1 << 1 : 0;
70026
70403
  flags |= this.url !== undefined ? 1 << 2 : 0;
70404
+ flags |= this.inAppOrigin !== undefined ? 1 << 3 : 0;
70027
70405
  b.write(index_js_1.Primitive.Int.write(flags));
70028
70406
  if (this.peer !== undefined) {
70029
70407
  b.write(this.peer.write());
@@ -70037,6 +70415,9 @@ var Raw;
70037
70415
  if (this.url !== undefined) {
70038
70416
  b.write(index_js_1.Primitive.String.write(this.url));
70039
70417
  }
70418
+ if (this.inAppOrigin !== undefined) {
70419
+ b.write(index_js_1.Primitive.String.write(this.inAppOrigin));
70420
+ }
70040
70421
  return deps_js_1.Buffer.from(b.buffer);
70041
70422
  }
70042
70423
  }
@@ -70049,19 +70430,29 @@ var Raw;
70049
70430
  msgId;
70050
70431
  buttonId;
70051
70432
  url;
70433
+ matchCode;
70052
70434
  constructor(params) {
70053
70435
  super();
70054
70436
  this.classType = 'functions';
70055
70437
  this.className = 'messages.AcceptUrlAuth';
70056
- this.constructorId = 0xb12c7125;
70438
+ this.constructorId = 0x67a3f0de;
70057
70439
  this.subclassOfId = 0x7765cb1e;
70058
- this._slots = ['writeAllowed', 'sharePhoneNumber', 'peer', 'msgId', 'buttonId', 'url'];
70440
+ this._slots = [
70441
+ 'writeAllowed',
70442
+ 'sharePhoneNumber',
70443
+ 'peer',
70444
+ 'msgId',
70445
+ 'buttonId',
70446
+ 'url',
70447
+ 'matchCode',
70448
+ ];
70059
70449
  this.writeAllowed = params.writeAllowed;
70060
70450
  this.sharePhoneNumber = params.sharePhoneNumber;
70061
70451
  this.peer = params.peer;
70062
70452
  this.msgId = params.msgId;
70063
70453
  this.buttonId = params.buttonId;
70064
70454
  this.url = params.url;
70455
+ this.matchCode = params.matchCode;
70065
70456
  }
70066
70457
  static async read(_data, ..._args) {
70067
70458
  let flags = await index_js_1.Primitive.Int.read(_data);
@@ -70071,6 +70462,7 @@ var Raw;
70071
70462
  let msgId = flags & (1 << 1) ? await index_js_1.Primitive.Int.read(_data) : undefined;
70072
70463
  let buttonId = flags & (1 << 1) ? await index_js_1.Primitive.Int.read(_data) : undefined;
70073
70464
  let url = flags & (1 << 2) ? await index_js_1.Primitive.String.read(_data) : undefined;
70465
+ let matchCode = flags & (1 << 4) ? await index_js_1.Primitive.String.read(_data) : undefined;
70074
70466
  return new Raw.messages.AcceptUrlAuth({
70075
70467
  writeAllowed: writeAllowed,
70076
70468
  sharePhoneNumber: sharePhoneNumber,
@@ -70078,6 +70470,7 @@ var Raw;
70078
70470
  msgId: msgId,
70079
70471
  buttonId: buttonId,
70080
70472
  url: url,
70473
+ matchCode: matchCode,
70081
70474
  });
70082
70475
  }
70083
70476
  write() {
@@ -70090,6 +70483,7 @@ var Raw;
70090
70483
  flags |= this.msgId !== undefined ? 1 << 1 : 0;
70091
70484
  flags |= this.buttonId !== undefined ? 1 << 1 : 0;
70092
70485
  flags |= this.url !== undefined ? 1 << 2 : 0;
70486
+ flags |= this.matchCode !== undefined ? 1 << 4 : 0;
70093
70487
  b.write(index_js_1.Primitive.Int.write(flags));
70094
70488
  if (this.peer !== undefined) {
70095
70489
  b.write(this.peer.write());
@@ -70103,6 +70497,9 @@ var Raw;
70103
70497
  if (this.url !== undefined) {
70104
70498
  b.write(index_js_1.Primitive.String.write(this.url));
70105
70499
  }
70500
+ if (this.matchCode !== undefined) {
70501
+ b.write(index_js_1.Primitive.String.write(this.matchCode));
70502
+ }
70106
70503
  return deps_js_1.Buffer.from(b.buffer);
70107
70504
  }
70108
70505
  }
@@ -71616,30 +72013,44 @@ var Raw;
71616
72013
  __response__;
71617
72014
  peer;
71618
72015
  enabled;
72016
+ requestMsgId;
71619
72017
  constructor(params) {
71620
72018
  super();
71621
72019
  this.classType = 'functions';
71622
72020
  this.className = 'messages.ToggleNoForwards';
71623
- this.constructorId = 0xb11eafa2;
72021
+ this.constructorId = 0xb2081a35;
71624
72022
  this.subclassOfId = 0x8af52aac;
71625
- this._slots = ['peer', 'enabled'];
72023
+ this._slots = ['peer', 'enabled', 'requestMsgId'];
71626
72024
  this.peer = params.peer;
71627
72025
  this.enabled = params.enabled;
72026
+ this.requestMsgId = params.requestMsgId;
71628
72027
  }
71629
72028
  static async read(_data, ..._args) {
72029
+ let flags = await index_js_1.Primitive.Int.read(_data);
71630
72030
  let peer = await index_js_1.TLObject.read(_data);
71631
72031
  let enabled = await index_js_1.Primitive.Bool.read(_data);
71632
- return new Raw.messages.ToggleNoForwards({ peer: peer, enabled: enabled });
72032
+ let requestMsgId = flags & (1 << 0) ? await index_js_1.Primitive.Int.read(_data) : undefined;
72033
+ return new Raw.messages.ToggleNoForwards({
72034
+ peer: peer,
72035
+ enabled: enabled,
72036
+ requestMsgId: requestMsgId,
72037
+ });
71633
72038
  }
71634
72039
  write() {
71635
72040
  const b = new deps_js_1.BytesIO();
71636
72041
  b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
72042
+ let flags = 0;
72043
+ flags |= this.requestMsgId !== undefined ? 1 << 0 : 0;
72044
+ b.write(index_js_1.Primitive.Int.write(flags));
71637
72045
  if (this.peer !== undefined) {
71638
72046
  b.write(this.peer.write());
71639
72047
  }
71640
72048
  if (this.enabled !== undefined) {
71641
72049
  b.write(index_js_1.Primitive.Bool.write(this.enabled));
71642
72050
  }
72051
+ if (this.requestMsgId !== undefined) {
72052
+ b.write(index_js_1.Primitive.Int.write(this.requestMsgId));
72053
+ }
71643
72054
  return deps_js_1.Buffer.from(b.buffer);
71644
72055
  }
71645
72056
  }
@@ -75500,6 +75911,170 @@ var Raw;
75500
75911
  }
75501
75912
  }
75502
75913
  messages_1.SummarizeText = SummarizeText;
75914
+ class EditChatCreator extends index_js_1.TLObject {
75915
+ __response__;
75916
+ peer;
75917
+ userId;
75918
+ password;
75919
+ constructor(params) {
75920
+ super();
75921
+ this.classType = 'functions';
75922
+ this.className = 'messages.EditChatCreator';
75923
+ this.constructorId = 0xf743b857;
75924
+ this.subclassOfId = 0x8af52aac;
75925
+ this._slots = ['peer', 'userId', 'password'];
75926
+ this.peer = params.peer;
75927
+ this.userId = params.userId;
75928
+ this.password = params.password;
75929
+ }
75930
+ static async read(_data, ..._args) {
75931
+ let peer = await index_js_1.TLObject.read(_data);
75932
+ let userId = await index_js_1.TLObject.read(_data);
75933
+ let password = await index_js_1.TLObject.read(_data);
75934
+ return new Raw.messages.EditChatCreator({ peer: peer, userId: userId, password: password });
75935
+ }
75936
+ write() {
75937
+ const b = new deps_js_1.BytesIO();
75938
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
75939
+ if (this.peer !== undefined) {
75940
+ b.write(this.peer.write());
75941
+ }
75942
+ if (this.userId !== undefined) {
75943
+ b.write(this.userId.write());
75944
+ }
75945
+ if (this.password !== undefined) {
75946
+ b.write(this.password.write());
75947
+ }
75948
+ return deps_js_1.Buffer.from(b.buffer);
75949
+ }
75950
+ }
75951
+ messages_1.EditChatCreator = EditChatCreator;
75952
+ class GetFutureChatCreatorAfterLeave extends index_js_1.TLObject {
75953
+ __response__;
75954
+ peer;
75955
+ constructor(params) {
75956
+ super();
75957
+ this.classType = 'functions';
75958
+ this.className = 'messages.GetFutureChatCreatorAfterLeave';
75959
+ this.constructorId = 0x3b7d0ea6;
75960
+ this.subclassOfId = 0x2da17977;
75961
+ this._slots = ['peer'];
75962
+ this.peer = params.peer;
75963
+ }
75964
+ static async read(_data, ..._args) {
75965
+ let peer = await index_js_1.TLObject.read(_data);
75966
+ return new Raw.messages.GetFutureChatCreatorAfterLeave({ peer: peer });
75967
+ }
75968
+ write() {
75969
+ const b = new deps_js_1.BytesIO();
75970
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
75971
+ if (this.peer !== undefined) {
75972
+ b.write(this.peer.write());
75973
+ }
75974
+ return deps_js_1.Buffer.from(b.buffer);
75975
+ }
75976
+ }
75977
+ messages_1.GetFutureChatCreatorAfterLeave = GetFutureChatCreatorAfterLeave;
75978
+ class EditChatParticipantRank extends index_js_1.TLObject {
75979
+ __response__;
75980
+ peer;
75981
+ participant;
75982
+ rank;
75983
+ constructor(params) {
75984
+ super();
75985
+ this.classType = 'functions';
75986
+ this.className = 'messages.EditChatParticipantRank';
75987
+ this.constructorId = 0xa00f32b0;
75988
+ this.subclassOfId = 0x8af52aac;
75989
+ this._slots = ['peer', 'participant', 'rank'];
75990
+ this.peer = params.peer;
75991
+ this.participant = params.participant;
75992
+ this.rank = params.rank;
75993
+ }
75994
+ static async read(_data, ..._args) {
75995
+ let peer = await index_js_1.TLObject.read(_data);
75996
+ let participant = await index_js_1.TLObject.read(_data);
75997
+ let rank = await index_js_1.Primitive.String.read(_data);
75998
+ return new Raw.messages.EditChatParticipantRank({
75999
+ peer: peer,
76000
+ participant: participant,
76001
+ rank: rank,
76002
+ });
76003
+ }
76004
+ write() {
76005
+ const b = new deps_js_1.BytesIO();
76006
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
76007
+ if (this.peer !== undefined) {
76008
+ b.write(this.peer.write());
76009
+ }
76010
+ if (this.participant !== undefined) {
76011
+ b.write(this.participant.write());
76012
+ }
76013
+ if (this.rank !== undefined) {
76014
+ b.write(index_js_1.Primitive.String.write(this.rank));
76015
+ }
76016
+ return deps_js_1.Buffer.from(b.buffer);
76017
+ }
76018
+ }
76019
+ messages_1.EditChatParticipantRank = EditChatParticipantRank;
76020
+ class DeclineUrlAuth extends index_js_1.TLObject {
76021
+ __response__;
76022
+ url;
76023
+ constructor(params) {
76024
+ super();
76025
+ this.classType = 'functions';
76026
+ this.className = 'messages.DeclineUrlAuth';
76027
+ this.constructorId = 0x35436bbc;
76028
+ this.subclassOfId = 0xf5b399ac;
76029
+ this._slots = ['url'];
76030
+ this.url = params.url;
76031
+ }
76032
+ static async read(_data, ..._args) {
76033
+ let url = await index_js_1.Primitive.String.read(_data);
76034
+ return new Raw.messages.DeclineUrlAuth({ url: url });
76035
+ }
76036
+ write() {
76037
+ const b = new deps_js_1.BytesIO();
76038
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
76039
+ if (this.url !== undefined) {
76040
+ b.write(index_js_1.Primitive.String.write(this.url));
76041
+ }
76042
+ return deps_js_1.Buffer.from(b.buffer);
76043
+ }
76044
+ }
76045
+ messages_1.DeclineUrlAuth = DeclineUrlAuth;
76046
+ class CheckUrlAuthMatchCode extends index_js_1.TLObject {
76047
+ __response__;
76048
+ url;
76049
+ matchCode;
76050
+ constructor(params) {
76051
+ super();
76052
+ this.classType = 'functions';
76053
+ this.className = 'messages.CheckUrlAuthMatchCode';
76054
+ this.constructorId = 0xc9a47b0b;
76055
+ this.subclassOfId = 0xf5b399ac;
76056
+ this._slots = ['url', 'matchCode'];
76057
+ this.url = params.url;
76058
+ this.matchCode = params.matchCode;
76059
+ }
76060
+ static async read(_data, ..._args) {
76061
+ let url = await index_js_1.Primitive.String.read(_data);
76062
+ let matchCode = await index_js_1.Primitive.String.read(_data);
76063
+ return new Raw.messages.CheckUrlAuthMatchCode({ url: url, matchCode: matchCode });
76064
+ }
76065
+ write() {
76066
+ const b = new deps_js_1.BytesIO();
76067
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
76068
+ if (this.url !== undefined) {
76069
+ b.write(index_js_1.Primitive.String.write(this.url));
76070
+ }
76071
+ if (this.matchCode !== undefined) {
76072
+ b.write(index_js_1.Primitive.String.write(this.matchCode));
76073
+ }
76074
+ return deps_js_1.Buffer.from(b.buffer);
76075
+ }
76076
+ }
76077
+ messages_1.CheckUrlAuthMatchCode = CheckUrlAuthMatchCode;
75503
76078
  })(messages = Raw.messages || (Raw.messages = {}));
75504
76079
  let updates;
75505
76080
  (function (updates) {
@@ -82713,7 +83288,7 @@ var Raw;
82713
83288
  super();
82714
83289
  this.classType = 'functions';
82715
83290
  this.className = 'channels.EditAdmin';
82716
- this.constructorId = 0xd33c8902;
83291
+ this.constructorId = 0x9a98ad68;
82717
83292
  this.subclassOfId = 0x8af52aac;
82718
83293
  this._slots = ['channel', 'userId', 'adminRights', 'rank'];
82719
83294
  this.channel = params.channel;
@@ -82722,10 +83297,11 @@ var Raw;
82722
83297
  this.rank = params.rank;
82723
83298
  }
82724
83299
  static async read(_data, ..._args) {
83300
+ let flags = await index_js_1.Primitive.Int.read(_data);
82725
83301
  let channel = await index_js_1.TLObject.read(_data);
82726
83302
  let userId = await index_js_1.TLObject.read(_data);
82727
83303
  let adminRights = await index_js_1.TLObject.read(_data);
82728
- let rank = await index_js_1.Primitive.String.read(_data);
83304
+ let rank = flags & (1 << 0) ? await index_js_1.Primitive.String.read(_data) : undefined;
82729
83305
  return new Raw.channels.EditAdmin({
82730
83306
  channel: channel,
82731
83307
  userId: userId,
@@ -82736,6 +83312,9 @@ var Raw;
82736
83312
  write() {
82737
83313
  const b = new deps_js_1.BytesIO();
82738
83314
  b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
83315
+ let flags = 0;
83316
+ flags |= this.rank !== undefined ? 1 << 0 : 0;
83317
+ b.write(index_js_1.Primitive.Int.write(flags));
82739
83318
  if (this.channel !== undefined) {
82740
83319
  b.write(this.channel.write());
82741
83320
  }
@@ -83452,48 +84031,6 @@ var Raw;
83452
84031
  }
83453
84032
  }
83454
84033
  channels.SetDiscussionGroup = SetDiscussionGroup;
83455
- class EditCreator extends index_js_1.TLObject {
83456
- __response__;
83457
- channel;
83458
- userId;
83459
- password;
83460
- constructor(params) {
83461
- super();
83462
- this.classType = 'functions';
83463
- this.className = 'channels.EditCreator';
83464
- this.constructorId = 0x8f38cd1f;
83465
- this.subclassOfId = 0x8af52aac;
83466
- this._slots = ['channel', 'userId', 'password'];
83467
- this.channel = params.channel;
83468
- this.userId = params.userId;
83469
- this.password = params.password;
83470
- }
83471
- static async read(_data, ..._args) {
83472
- let channel = await index_js_1.TLObject.read(_data);
83473
- let userId = await index_js_1.TLObject.read(_data);
83474
- let password = await index_js_1.TLObject.read(_data);
83475
- return new Raw.channels.EditCreator({
83476
- channel: channel,
83477
- userId: userId,
83478
- password: password,
83479
- });
83480
- }
83481
- write() {
83482
- const b = new deps_js_1.BytesIO();
83483
- b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
83484
- if (this.channel !== undefined) {
83485
- b.write(this.channel.write());
83486
- }
83487
- if (this.userId !== undefined) {
83488
- b.write(this.userId.write());
83489
- }
83490
- if (this.password !== undefined) {
83491
- b.write(this.password.write());
83492
- }
83493
- return deps_js_1.Buffer.from(b.buffer);
83494
- }
83495
- }
83496
- channels.EditCreator = EditCreator;
83497
84034
  class EditLocation extends index_js_1.TLObject {
83498
84035
  __response__;
83499
84036
  channel;
@@ -84489,32 +85026,6 @@ var Raw;
84489
85026
  }
84490
85027
  }
84491
85028
  channels.SetMainProfileTab = SetMainProfileTab;
84492
- class GetFutureCreatorAfterLeave extends index_js_1.TLObject {
84493
- __response__;
84494
- channel;
84495
- constructor(params) {
84496
- super();
84497
- this.classType = 'functions';
84498
- this.className = 'channels.GetFutureCreatorAfterLeave';
84499
- this.constructorId = 0xa00918af;
84500
- this.subclassOfId = 0x2da17977;
84501
- this._slots = ['channel'];
84502
- this.channel = params.channel;
84503
- }
84504
- static async read(_data, ..._args) {
84505
- let channel = await index_js_1.TLObject.read(_data);
84506
- return new Raw.channels.GetFutureCreatorAfterLeave({ channel: channel });
84507
- }
84508
- write() {
84509
- const b = new deps_js_1.BytesIO();
84510
- b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
84511
- if (this.channel !== undefined) {
84512
- b.write(this.channel.write());
84513
- }
84514
- return deps_js_1.Buffer.from(b.buffer);
84515
- }
84516
- }
84517
- channels.GetFutureCreatorAfterLeave = GetFutureCreatorAfterLeave;
84518
85029
  })(channels = Raw.channels || (Raw.channels = {}));
84519
85030
  let payments;
84520
85031
  (function (payments) {