@tgsnake/skema 2.8.0 → 2.9.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.
@@ -23,7 +23,7 @@ export var Raw;
23
23
  /**
24
24
  * The Telegram layer we using.
25
25
  */
26
- Raw.Layer = 232;
26
+ Raw.Layer = 233;
27
27
  /**
28
28
  * The highest telegram secret chat schema layer.
29
29
  */
@@ -4143,6 +4143,137 @@ export var Raw;
4143
4143
  }
4144
4144
  }
4145
4145
  Raw.InputMediaStakeDice = InputMediaStakeDice;
4146
+ class InputMediaWidget extends TLObject {
4147
+ allowQueries;
4148
+ sharedWidget;
4149
+ width;
4150
+ height;
4151
+ html;
4152
+ publicData;
4153
+ chatData;
4154
+ constructor(params) {
4155
+ super();
4156
+ this.classType = 'types';
4157
+ this.className = 'InputMediaWidget';
4158
+ this.constructorId = 0x44f6c04e;
4159
+ this.subclassOfId = 0xfaf846f4;
4160
+ this._slots = [
4161
+ 'allowQueries',
4162
+ 'sharedWidget',
4163
+ 'width',
4164
+ 'height',
4165
+ 'html',
4166
+ 'publicData',
4167
+ 'chatData',
4168
+ ];
4169
+ this.allowQueries = params.allowQueries;
4170
+ this.sharedWidget = params.sharedWidget;
4171
+ this.width = params.width;
4172
+ this.height = params.height;
4173
+ this.html = params.html;
4174
+ this.publicData = params.publicData;
4175
+ this.chatData = params.chatData;
4176
+ }
4177
+ /**
4178
+ * Generate the TLObject from buffer.
4179
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
4180
+ */
4181
+ static async read(_data, ..._args) {
4182
+ // @ts-ignore
4183
+ let flags = await Primitive.Int.read(_data);
4184
+ let allowQueries = flags & (1 << 0) ? true : false;
4185
+ let sharedWidget = flags & (1 << 1) ? true : false;
4186
+ let width = await Primitive.Int.read(_data);
4187
+ let height = await Primitive.Int.read(_data);
4188
+ let html = await Primitive.String.read(_data);
4189
+ let publicData = flags & (1 << 2) ? await Primitive.String.read(_data) : undefined;
4190
+ let chatData = flags & (1 << 3) ? await Primitive.String.read(_data) : undefined;
4191
+ return new Raw.InputMediaWidget({
4192
+ allowQueries: allowQueries,
4193
+ sharedWidget: sharedWidget,
4194
+ width: width,
4195
+ height: height,
4196
+ html: html,
4197
+ publicData: publicData,
4198
+ chatData: chatData,
4199
+ });
4200
+ }
4201
+ /**
4202
+ * Generate buffer from TLObject.
4203
+ */
4204
+ write() {
4205
+ const b = new BytesIO();
4206
+ b.write(Primitive.Int.write(this.constructorId, false));
4207
+ // @ts-ignore
4208
+ let flags = 0;
4209
+ flags |= this.allowQueries ? 1 << 0 : 0;
4210
+ flags |= this.sharedWidget ? 1 << 1 : 0;
4211
+ flags |= this.publicData !== undefined ? 1 << 2 : 0;
4212
+ flags |= this.chatData !== undefined ? 1 << 3 : 0;
4213
+ b.write(Primitive.Int.write(flags));
4214
+ if (this.width !== undefined) {
4215
+ b.write(Primitive.Int.write(this.width));
4216
+ }
4217
+ if (this.height !== undefined) {
4218
+ b.write(Primitive.Int.write(this.height));
4219
+ }
4220
+ if (this.html !== undefined) {
4221
+ b.write(Primitive.String.write(this.html));
4222
+ }
4223
+ if (this.publicData !== undefined) {
4224
+ b.write(Primitive.String.write(this.publicData));
4225
+ }
4226
+ if (this.chatData !== undefined) {
4227
+ b.write(Primitive.String.write(this.chatData));
4228
+ }
4229
+ return Buffer.from(b.buffer);
4230
+ }
4231
+ }
4232
+ Raw.InputMediaWidget = InputMediaWidget;
4233
+ class InputMediaWidgetId extends TLObject {
4234
+ widgetId;
4235
+ chatData;
4236
+ constructor(params) {
4237
+ super();
4238
+ this.classType = 'types';
4239
+ this.className = 'InputMediaWidgetId';
4240
+ this.constructorId = 0x7c855cb5;
4241
+ this.subclassOfId = 0xfaf846f4;
4242
+ this._slots = ['widgetId', 'chatData'];
4243
+ this.widgetId = params.widgetId;
4244
+ this.chatData = params.chatData;
4245
+ }
4246
+ /**
4247
+ * Generate the TLObject from buffer.
4248
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
4249
+ */
4250
+ static async read(_data, ..._args) {
4251
+ // @ts-ignore
4252
+ let flags = await Primitive.Int.read(_data);
4253
+ let widgetId = await Primitive.Long.read(_data);
4254
+ let chatData = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
4255
+ return new Raw.InputMediaWidgetId({ widgetId: widgetId, chatData: chatData });
4256
+ }
4257
+ /**
4258
+ * Generate buffer from TLObject.
4259
+ */
4260
+ write() {
4261
+ const b = new BytesIO();
4262
+ b.write(Primitive.Int.write(this.constructorId, false));
4263
+ // @ts-ignore
4264
+ let flags = 0;
4265
+ flags |= this.chatData !== undefined ? 1 << 0 : 0;
4266
+ b.write(Primitive.Int.write(flags));
4267
+ if (this.widgetId !== undefined) {
4268
+ b.write(Primitive.Long.write(this.widgetId));
4269
+ }
4270
+ if (this.chatData !== undefined) {
4271
+ b.write(Primitive.String.write(this.chatData));
4272
+ }
4273
+ return Buffer.from(b.buffer);
4274
+ }
4275
+ }
4276
+ Raw.InputMediaWidgetId = InputMediaWidgetId;
4146
4277
  class InputChatPhotoEmpty extends TLObject {
4147
4278
  constructor() {
4148
4279
  super();
@@ -5094,6 +5225,7 @@ export var Raw;
5094
5225
  botCanManageBots;
5095
5226
  botGuestchat;
5096
5227
  botGuard;
5228
+ botForumSidebar;
5097
5229
  id;
5098
5230
  accessHash;
5099
5231
  firstName;
@@ -5152,6 +5284,7 @@ export var Raw;
5152
5284
  'botCanManageBots',
5153
5285
  'botGuestchat',
5154
5286
  'botGuard',
5287
+ 'botForumSidebar',
5155
5288
  'id',
5156
5289
  'accessHash',
5157
5290
  'firstName',
@@ -5204,6 +5337,7 @@ export var Raw;
5204
5337
  this.botCanManageBots = params.botCanManageBots;
5205
5338
  this.botGuestchat = params.botGuestchat;
5206
5339
  this.botGuard = params.botGuard;
5340
+ this.botForumSidebar = params.botForumSidebar;
5207
5341
  this.id = params.id;
5208
5342
  this.accessHash = params.accessHash;
5209
5343
  this.firstName = params.firstName;
@@ -5265,6 +5399,7 @@ export var Raw;
5265
5399
  let botCanManageBots = flags2 & (1 << 18) ? true : false;
5266
5400
  let botGuestchat = flags2 & (1 << 19) ? true : false;
5267
5401
  let botGuard = flags2 & (1 << 20) ? true : false;
5402
+ let botForumSidebar = flags2 & (1 << 22) ? true : false;
5268
5403
  let id = await Primitive.Long.read(_data);
5269
5404
  let accessHash = flags & (1 << 0) ? await Primitive.Long.read(_data) : undefined;
5270
5405
  let firstName = flags & (1 << 1) ? await Primitive.String.read(_data) : undefined;
@@ -5317,6 +5452,7 @@ export var Raw;
5317
5452
  botCanManageBots: botCanManageBots,
5318
5453
  botGuestchat: botGuestchat,
5319
5454
  botGuard: botGuard,
5455
+ botForumSidebar: botForumSidebar,
5320
5456
  id: id,
5321
5457
  accessHash: accessHash,
5322
5458
  firstName: firstName,
@@ -5393,6 +5529,7 @@ export var Raw;
5393
5529
  flags2 |= this.botCanManageBots ? 1 << 18 : 0;
5394
5530
  flags2 |= this.botGuestchat ? 1 << 19 : 0;
5395
5531
  flags2 |= this.botGuard ? 1 << 20 : 0;
5532
+ flags2 |= this.botForumSidebar ? 1 << 22 : 0;
5396
5533
  flags2 |= this.usernames ? 1 << 0 : 0;
5397
5534
  flags2 |= this.storiesMaxId !== undefined ? 1 << 5 : 0;
5398
5535
  flags2 |= this.color !== undefined ? 1 << 8 : 0;
@@ -6010,6 +6147,7 @@ export var Raw;
6010
6147
  monoforum;
6011
6148
  forumTabs;
6012
6149
  inNews;
6150
+ forumSidebar;
6013
6151
  id;
6014
6152
  accessHash;
6015
6153
  title;
@@ -6069,6 +6207,7 @@ export var Raw;
6069
6207
  'monoforum',
6070
6208
  'forumTabs',
6071
6209
  'inNews',
6210
+ 'forumSidebar',
6072
6211
  'id',
6073
6212
  'accessHash',
6074
6213
  'title',
@@ -6122,6 +6261,7 @@ export var Raw;
6122
6261
  this.monoforum = params.monoforum;
6123
6262
  this.forumTabs = params.forumTabs;
6124
6263
  this.inNews = params.inNews;
6264
+ this.forumSidebar = params.forumSidebar;
6125
6265
  this.id = params.id;
6126
6266
  this.accessHash = params.accessHash;
6127
6267
  this.title = params.title;
@@ -6184,6 +6324,7 @@ export var Raw;
6184
6324
  let monoforum = flags2 & (1 << 17) ? true : false;
6185
6325
  let forumTabs = flags2 & (1 << 19) ? true : false;
6186
6326
  let inNews = flags2 & (1 << 21) ? true : false;
6327
+ let forumSidebar = flags2 & (1 << 23) ? true : false;
6187
6328
  let id = await Primitive.Long.read(_data);
6188
6329
  let accessHash = flags & (1 << 13) ? await Primitive.Long.read(_data) : undefined;
6189
6330
  let title = await Primitive.String.read(_data);
@@ -6237,6 +6378,7 @@ export var Raw;
6237
6378
  monoforum: monoforum,
6238
6379
  forumTabs: forumTabs,
6239
6380
  inNews: inNews,
6381
+ forumSidebar: forumSidebar,
6240
6382
  id: id,
6241
6383
  accessHash: accessHash,
6242
6384
  title: title,
@@ -6309,6 +6451,7 @@ export var Raw;
6309
6451
  flags2 |= this.monoforum ? 1 << 17 : 0;
6310
6452
  flags2 |= this.forumTabs ? 1 << 19 : 0;
6311
6453
  flags2 |= this.inNews ? 1 << 21 : 0;
6454
+ flags2 |= this.forumSidebar ? 1 << 23 : 0;
6312
6455
  flags2 |= this.usernames ? 1 << 0 : 0;
6313
6456
  flags2 |= this.storiesMaxId !== undefined ? 1 << 4 : 0;
6314
6457
  flags2 |= this.color !== undefined ? 1 << 7 : 0;
@@ -9703,6 +9846,117 @@ export var Raw;
9703
9846
  }
9704
9847
  }
9705
9848
  Raw.MessageMediaVideoStream = MessageMediaVideoStream;
9849
+ class MessageMediaWidget extends TLObject {
9850
+ isCopy;
9851
+ canQuery;
9852
+ backgroundQuery;
9853
+ width;
9854
+ height;
9855
+ payload;
9856
+ publicData;
9857
+ publicDataHash;
9858
+ chatData;
9859
+ widgetId;
9860
+ constructor(params) {
9861
+ super();
9862
+ this.classType = 'types';
9863
+ this.className = 'MessageMediaWidget';
9864
+ this.constructorId = 0x2238f214;
9865
+ this.subclassOfId = 0x476cbe32;
9866
+ this._slots = [
9867
+ 'isCopy',
9868
+ 'canQuery',
9869
+ 'backgroundQuery',
9870
+ 'width',
9871
+ 'height',
9872
+ 'payload',
9873
+ 'publicData',
9874
+ 'publicDataHash',
9875
+ 'chatData',
9876
+ 'widgetId',
9877
+ ];
9878
+ this.isCopy = params.isCopy;
9879
+ this.canQuery = params.canQuery;
9880
+ this.backgroundQuery = params.backgroundQuery;
9881
+ this.width = params.width;
9882
+ this.height = params.height;
9883
+ this.payload = params.payload;
9884
+ this.publicData = params.publicData;
9885
+ this.publicDataHash = params.publicDataHash;
9886
+ this.chatData = params.chatData;
9887
+ this.widgetId = params.widgetId;
9888
+ }
9889
+ /**
9890
+ * Generate the TLObject from buffer.
9891
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
9892
+ */
9893
+ static async read(_data, ..._args) {
9894
+ // @ts-ignore
9895
+ let flags = await Primitive.Int.read(_data);
9896
+ let isCopy = flags & (1 << 0) ? true : false;
9897
+ let canQuery = flags & (1 << 1) ? true : false;
9898
+ let backgroundQuery = flags & (1 << 2) ? true : false;
9899
+ let width = await Primitive.Int.read(_data);
9900
+ let height = await Primitive.Int.read(_data);
9901
+ let payload = await Primitive.Bytes.read(_data);
9902
+ let publicData = flags & (1 << 3) ? await Primitive.String.read(_data) : undefined;
9903
+ let publicDataHash = flags & (1 << 3) ? await Primitive.Long.read(_data) : undefined;
9904
+ let chatData = flags & (1 << 4) ? await Primitive.String.read(_data) : undefined;
9905
+ let widgetId = flags & (1 << 5) ? await Primitive.Long.read(_data) : undefined;
9906
+ return new Raw.MessageMediaWidget({
9907
+ isCopy: isCopy,
9908
+ canQuery: canQuery,
9909
+ backgroundQuery: backgroundQuery,
9910
+ width: width,
9911
+ height: height,
9912
+ payload: payload,
9913
+ publicData: publicData,
9914
+ publicDataHash: publicDataHash,
9915
+ chatData: chatData,
9916
+ widgetId: widgetId,
9917
+ });
9918
+ }
9919
+ /**
9920
+ * Generate buffer from TLObject.
9921
+ */
9922
+ write() {
9923
+ const b = new BytesIO();
9924
+ b.write(Primitive.Int.write(this.constructorId, false));
9925
+ // @ts-ignore
9926
+ let flags = 0;
9927
+ flags |= this.isCopy ? 1 << 0 : 0;
9928
+ flags |= this.canQuery ? 1 << 1 : 0;
9929
+ flags |= this.backgroundQuery ? 1 << 2 : 0;
9930
+ flags |= this.publicData !== undefined ? 1 << 3 : 0;
9931
+ flags |= this.publicDataHash !== undefined ? 1 << 3 : 0;
9932
+ flags |= this.chatData !== undefined ? 1 << 4 : 0;
9933
+ flags |= this.widgetId !== undefined ? 1 << 5 : 0;
9934
+ b.write(Primitive.Int.write(flags));
9935
+ if (this.width !== undefined) {
9936
+ b.write(Primitive.Int.write(this.width));
9937
+ }
9938
+ if (this.height !== undefined) {
9939
+ b.write(Primitive.Int.write(this.height));
9940
+ }
9941
+ if (this.payload !== undefined) {
9942
+ b.write(Primitive.Bytes.write(this.payload));
9943
+ }
9944
+ if (this.publicData !== undefined) {
9945
+ b.write(Primitive.String.write(this.publicData));
9946
+ }
9947
+ if (this.publicDataHash !== undefined) {
9948
+ b.write(Primitive.Long.write(this.publicDataHash));
9949
+ }
9950
+ if (this.chatData !== undefined) {
9951
+ b.write(Primitive.String.write(this.chatData));
9952
+ }
9953
+ if (this.widgetId !== undefined) {
9954
+ b.write(Primitive.Long.write(this.widgetId));
9955
+ }
9956
+ return Buffer.from(b.buffer);
9957
+ }
9958
+ }
9959
+ Raw.MessageMediaWidget = MessageMediaWidget;
9706
9960
  class MessageActionEmpty extends TLObject {
9707
9961
  constructor() {
9708
9962
  super();
@@ -24318,6 +24572,524 @@ export var Raw;
24318
24572
  }
24319
24573
  }
24320
24574
  Raw.UpdateWalletTonConnectPendingDisconnect = UpdateWalletTonConnectPendingDisconnect;
24575
+ class UpdateEditForumTopic extends TLObject {
24576
+ peer;
24577
+ topicId;
24578
+ title;
24579
+ iconEmojiId;
24580
+ closed;
24581
+ hidden;
24582
+ constructor(params) {
24583
+ super();
24584
+ this.classType = 'types';
24585
+ this.className = 'UpdateEditForumTopic';
24586
+ this.constructorId = 0x2366665c;
24587
+ this.subclassOfId = 0x9f89304e;
24588
+ this._slots = ['peer', 'topicId', 'title', 'iconEmojiId', 'closed', 'hidden'];
24589
+ this.peer = params.peer;
24590
+ this.topicId = params.topicId;
24591
+ this.title = params.title;
24592
+ this.iconEmojiId = params.iconEmojiId;
24593
+ this.closed = params.closed;
24594
+ this.hidden = params.hidden;
24595
+ }
24596
+ /**
24597
+ * Generate the TLObject from buffer.
24598
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
24599
+ */
24600
+ static async read(_data, ..._args) {
24601
+ // @ts-ignore
24602
+ let flags = await Primitive.Int.read(_data);
24603
+ let peer = await TLObject.read(_data);
24604
+ let topicId = await Primitive.Int.read(_data);
24605
+ let title = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
24606
+ let iconEmojiId = flags & (1 << 1) ? await Primitive.Long.read(_data) : undefined;
24607
+ let closed = flags & (1 << 2) ? await Primitive.Bool.read(_data) : undefined;
24608
+ let hidden = flags & (1 << 3) ? await Primitive.Bool.read(_data) : undefined;
24609
+ return new Raw.UpdateEditForumTopic({
24610
+ peer: peer,
24611
+ topicId: topicId,
24612
+ title: title,
24613
+ iconEmojiId: iconEmojiId,
24614
+ closed: closed,
24615
+ hidden: hidden,
24616
+ });
24617
+ }
24618
+ /**
24619
+ * Generate buffer from TLObject.
24620
+ */
24621
+ write() {
24622
+ const b = new BytesIO();
24623
+ b.write(Primitive.Int.write(this.constructorId, false));
24624
+ // @ts-ignore
24625
+ let flags = 0;
24626
+ flags |= this.title !== undefined ? 1 << 0 : 0;
24627
+ flags |= this.iconEmojiId !== undefined ? 1 << 1 : 0;
24628
+ flags |= this.closed !== undefined ? 1 << 2 : 0;
24629
+ flags |= this.hidden !== undefined ? 1 << 3 : 0;
24630
+ b.write(Primitive.Int.write(flags));
24631
+ if (this.peer !== undefined) {
24632
+ b.write(this.peer.write());
24633
+ }
24634
+ if (this.topicId !== undefined) {
24635
+ b.write(Primitive.Int.write(this.topicId));
24636
+ }
24637
+ if (this.title !== undefined) {
24638
+ b.write(Primitive.String.write(this.title));
24639
+ }
24640
+ if (this.iconEmojiId !== undefined) {
24641
+ b.write(Primitive.Long.write(this.iconEmojiId));
24642
+ }
24643
+ if (this.closed !== undefined) {
24644
+ b.write(Primitive.Bool.write(this.closed));
24645
+ }
24646
+ if (this.hidden !== undefined) {
24647
+ b.write(Primitive.Bool.write(this.hidden));
24648
+ }
24649
+ return Buffer.from(b.buffer);
24650
+ }
24651
+ }
24652
+ Raw.UpdateEditForumTopic = UpdateEditForumTopic;
24653
+ class UpdateBotWidgetQuery extends TLObject {
24654
+ queryId;
24655
+ queryType;
24656
+ userId;
24657
+ peer;
24658
+ msgId;
24659
+ chatInstance;
24660
+ chatType;
24661
+ data;
24662
+ widgetId;
24663
+ walletCard;
24664
+ constructor(params) {
24665
+ super();
24666
+ this.classType = 'types';
24667
+ this.className = 'UpdateBotWidgetQuery';
24668
+ this.constructorId = 0xb373fe68;
24669
+ this.subclassOfId = 0x9f89304e;
24670
+ this._slots = [
24671
+ 'queryId',
24672
+ 'queryType',
24673
+ 'userId',
24674
+ 'peer',
24675
+ 'msgId',
24676
+ 'chatInstance',
24677
+ 'chatType',
24678
+ 'data',
24679
+ 'widgetId',
24680
+ 'walletCard',
24681
+ ];
24682
+ this.queryId = params.queryId;
24683
+ this.queryType = params.queryType;
24684
+ this.userId = params.userId;
24685
+ this.peer = params.peer;
24686
+ this.msgId = params.msgId;
24687
+ this.chatInstance = params.chatInstance;
24688
+ this.chatType = params.chatType;
24689
+ this.data = params.data;
24690
+ this.widgetId = params.widgetId;
24691
+ this.walletCard = params.walletCard;
24692
+ }
24693
+ /**
24694
+ * Generate the TLObject from buffer.
24695
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
24696
+ */
24697
+ static async read(_data, ..._args) {
24698
+ // @ts-ignore
24699
+ let flags = await Primitive.Int.read(_data);
24700
+ let queryId = await Primitive.Long.read(_data);
24701
+ let queryType = await TLObject.read(_data);
24702
+ let userId = await Primitive.Long.read(_data);
24703
+ let peer = await TLObject.read(_data);
24704
+ let msgId = await Primitive.Int.read(_data);
24705
+ let chatInstance = await Primitive.Long.read(_data);
24706
+ let chatType = await Primitive.String.read(_data);
24707
+ let data = await Primitive.Bytes.read(_data);
24708
+ let widgetId = flags & (1 << 0) ? await Primitive.Long.read(_data) : undefined;
24709
+ let walletCard = flags & (1 << 1) ? await TLObject.read(_data) : undefined;
24710
+ return new Raw.UpdateBotWidgetQuery({
24711
+ queryId: queryId,
24712
+ queryType: queryType,
24713
+ userId: userId,
24714
+ peer: peer,
24715
+ msgId: msgId,
24716
+ chatInstance: chatInstance,
24717
+ chatType: chatType,
24718
+ data: data,
24719
+ widgetId: widgetId,
24720
+ walletCard: walletCard,
24721
+ });
24722
+ }
24723
+ /**
24724
+ * Generate buffer from TLObject.
24725
+ */
24726
+ write() {
24727
+ const b = new BytesIO();
24728
+ b.write(Primitive.Int.write(this.constructorId, false));
24729
+ // @ts-ignore
24730
+ let flags = 0;
24731
+ flags |= this.widgetId !== undefined ? 1 << 0 : 0;
24732
+ flags |= this.walletCard !== undefined ? 1 << 1 : 0;
24733
+ b.write(Primitive.Int.write(flags));
24734
+ if (this.queryId !== undefined) {
24735
+ b.write(Primitive.Long.write(this.queryId));
24736
+ }
24737
+ if (this.queryType !== undefined) {
24738
+ b.write(this.queryType.write());
24739
+ }
24740
+ if (this.userId !== undefined) {
24741
+ b.write(Primitive.Long.write(this.userId));
24742
+ }
24743
+ if (this.peer !== undefined) {
24744
+ b.write(this.peer.write());
24745
+ }
24746
+ if (this.msgId !== undefined) {
24747
+ b.write(Primitive.Int.write(this.msgId));
24748
+ }
24749
+ if (this.chatInstance !== undefined) {
24750
+ b.write(Primitive.Long.write(this.chatInstance));
24751
+ }
24752
+ if (this.chatType !== undefined) {
24753
+ b.write(Primitive.String.write(this.chatType));
24754
+ }
24755
+ if (this.data !== undefined) {
24756
+ b.write(Primitive.Bytes.write(this.data));
24757
+ }
24758
+ if (this.widgetId !== undefined) {
24759
+ b.write(Primitive.Long.write(this.widgetId));
24760
+ }
24761
+ if (this.walletCard !== undefined) {
24762
+ b.write(this.walletCard.write());
24763
+ }
24764
+ return Buffer.from(b.buffer);
24765
+ }
24766
+ }
24767
+ Raw.UpdateBotWidgetQuery = UpdateBotWidgetQuery;
24768
+ class UpdateInlineBotWidgetQuery extends TLObject {
24769
+ queryId;
24770
+ queryType;
24771
+ userId;
24772
+ inlineMessageId;
24773
+ chatInstance;
24774
+ chatType;
24775
+ data;
24776
+ widgetId;
24777
+ walletCard;
24778
+ constructor(params) {
24779
+ super();
24780
+ this.classType = 'types';
24781
+ this.className = 'UpdateInlineBotWidgetQuery';
24782
+ this.constructorId = 0xa5f07e08;
24783
+ this.subclassOfId = 0x9f89304e;
24784
+ this._slots = [
24785
+ 'queryId',
24786
+ 'queryType',
24787
+ 'userId',
24788
+ 'inlineMessageId',
24789
+ 'chatInstance',
24790
+ 'chatType',
24791
+ 'data',
24792
+ 'widgetId',
24793
+ 'walletCard',
24794
+ ];
24795
+ this.queryId = params.queryId;
24796
+ this.queryType = params.queryType;
24797
+ this.userId = params.userId;
24798
+ this.inlineMessageId = params.inlineMessageId;
24799
+ this.chatInstance = params.chatInstance;
24800
+ this.chatType = params.chatType;
24801
+ this.data = params.data;
24802
+ this.widgetId = params.widgetId;
24803
+ this.walletCard = params.walletCard;
24804
+ }
24805
+ /**
24806
+ * Generate the TLObject from buffer.
24807
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
24808
+ */
24809
+ static async read(_data, ..._args) {
24810
+ // @ts-ignore
24811
+ let flags = await Primitive.Int.read(_data);
24812
+ let queryId = await Primitive.Long.read(_data);
24813
+ let queryType = await TLObject.read(_data);
24814
+ let userId = await Primitive.Long.read(_data);
24815
+ let inlineMessageId = await TLObject.read(_data);
24816
+ let chatInstance = await Primitive.Long.read(_data);
24817
+ let chatType = await Primitive.String.read(_data);
24818
+ let data = await Primitive.Bytes.read(_data);
24819
+ let widgetId = flags & (1 << 0) ? await Primitive.Long.read(_data) : undefined;
24820
+ let walletCard = flags & (1 << 1) ? await TLObject.read(_data) : undefined;
24821
+ return new Raw.UpdateInlineBotWidgetQuery({
24822
+ queryId: queryId,
24823
+ queryType: queryType,
24824
+ userId: userId,
24825
+ inlineMessageId: inlineMessageId,
24826
+ chatInstance: chatInstance,
24827
+ chatType: chatType,
24828
+ data: data,
24829
+ widgetId: widgetId,
24830
+ walletCard: walletCard,
24831
+ });
24832
+ }
24833
+ /**
24834
+ * Generate buffer from TLObject.
24835
+ */
24836
+ write() {
24837
+ const b = new BytesIO();
24838
+ b.write(Primitive.Int.write(this.constructorId, false));
24839
+ // @ts-ignore
24840
+ let flags = 0;
24841
+ flags |= this.widgetId !== undefined ? 1 << 0 : 0;
24842
+ flags |= this.walletCard !== undefined ? 1 << 1 : 0;
24843
+ b.write(Primitive.Int.write(flags));
24844
+ if (this.queryId !== undefined) {
24845
+ b.write(Primitive.Long.write(this.queryId));
24846
+ }
24847
+ if (this.queryType !== undefined) {
24848
+ b.write(this.queryType.write());
24849
+ }
24850
+ if (this.userId !== undefined) {
24851
+ b.write(Primitive.Long.write(this.userId));
24852
+ }
24853
+ if (this.inlineMessageId !== undefined) {
24854
+ b.write(this.inlineMessageId.write());
24855
+ }
24856
+ if (this.chatInstance !== undefined) {
24857
+ b.write(Primitive.Long.write(this.chatInstance));
24858
+ }
24859
+ if (this.chatType !== undefined) {
24860
+ b.write(Primitive.String.write(this.chatType));
24861
+ }
24862
+ if (this.data !== undefined) {
24863
+ b.write(Primitive.Bytes.write(this.data));
24864
+ }
24865
+ if (this.widgetId !== undefined) {
24866
+ b.write(Primitive.Long.write(this.widgetId));
24867
+ }
24868
+ if (this.walletCard !== undefined) {
24869
+ b.write(this.walletCard.write());
24870
+ }
24871
+ return Buffer.from(b.buffer);
24872
+ }
24873
+ }
24874
+ Raw.UpdateInlineBotWidgetQuery = UpdateInlineBotWidgetQuery;
24875
+ class UpdateBotWidgetCopyQuery extends TLObject {
24876
+ queryId;
24877
+ queryType;
24878
+ userId;
24879
+ data;
24880
+ widgetId;
24881
+ walletCard;
24882
+ constructor(params) {
24883
+ super();
24884
+ this.classType = 'types';
24885
+ this.className = 'UpdateBotWidgetCopyQuery';
24886
+ this.constructorId = 0xfa89bef7;
24887
+ this.subclassOfId = 0x9f89304e;
24888
+ this._slots = ['queryId', 'queryType', 'userId', 'data', 'widgetId', 'walletCard'];
24889
+ this.queryId = params.queryId;
24890
+ this.queryType = params.queryType;
24891
+ this.userId = params.userId;
24892
+ this.data = params.data;
24893
+ this.widgetId = params.widgetId;
24894
+ this.walletCard = params.walletCard;
24895
+ }
24896
+ /**
24897
+ * Generate the TLObject from buffer.
24898
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
24899
+ */
24900
+ static async read(_data, ..._args) {
24901
+ // @ts-ignore
24902
+ let flags = await Primitive.Int.read(_data);
24903
+ let queryId = await Primitive.Long.read(_data);
24904
+ let queryType = await TLObject.read(_data);
24905
+ let userId = await Primitive.Long.read(_data);
24906
+ let data = await Primitive.Bytes.read(_data);
24907
+ let widgetId = await Primitive.Long.read(_data);
24908
+ let walletCard = flags & (1 << 1) ? await TLObject.read(_data) : undefined;
24909
+ return new Raw.UpdateBotWidgetCopyQuery({
24910
+ queryId: queryId,
24911
+ queryType: queryType,
24912
+ userId: userId,
24913
+ data: data,
24914
+ widgetId: widgetId,
24915
+ walletCard: walletCard,
24916
+ });
24917
+ }
24918
+ /**
24919
+ * Generate buffer from TLObject.
24920
+ */
24921
+ write() {
24922
+ const b = new BytesIO();
24923
+ b.write(Primitive.Int.write(this.constructorId, false));
24924
+ // @ts-ignore
24925
+ let flags = 0;
24926
+ flags |= this.walletCard !== undefined ? 1 << 1 : 0;
24927
+ b.write(Primitive.Int.write(flags));
24928
+ if (this.queryId !== undefined) {
24929
+ b.write(Primitive.Long.write(this.queryId));
24930
+ }
24931
+ if (this.queryType !== undefined) {
24932
+ b.write(this.queryType.write());
24933
+ }
24934
+ if (this.userId !== undefined) {
24935
+ b.write(Primitive.Long.write(this.userId));
24936
+ }
24937
+ if (this.data !== undefined) {
24938
+ b.write(Primitive.Bytes.write(this.data));
24939
+ }
24940
+ if (this.widgetId !== undefined) {
24941
+ b.write(Primitive.Long.write(this.widgetId));
24942
+ }
24943
+ if (this.walletCard !== undefined) {
24944
+ b.write(this.walletCard.write());
24945
+ }
24946
+ return Buffer.from(b.buffer);
24947
+ }
24948
+ }
24949
+ Raw.UpdateBotWidgetCopyQuery = UpdateBotWidgetCopyQuery;
24950
+ class UpdateMessageWidgetData extends TLObject {
24951
+ peer;
24952
+ msgId;
24953
+ publicData;
24954
+ publicDataHash;
24955
+ chatData;
24956
+ pts;
24957
+ ptsCount;
24958
+ constructor(params) {
24959
+ super();
24960
+ this.classType = 'types';
24961
+ this.className = 'UpdateMessageWidgetData';
24962
+ this.constructorId = 0xbbb078dd;
24963
+ this.subclassOfId = 0x9f89304e;
24964
+ this._slots = [
24965
+ 'peer',
24966
+ 'msgId',
24967
+ 'publicData',
24968
+ 'publicDataHash',
24969
+ 'chatData',
24970
+ 'pts',
24971
+ 'ptsCount',
24972
+ ];
24973
+ this.peer = params.peer;
24974
+ this.msgId = params.msgId;
24975
+ this.publicData = params.publicData;
24976
+ this.publicDataHash = params.publicDataHash;
24977
+ this.chatData = params.chatData;
24978
+ this.pts = params.pts;
24979
+ this.ptsCount = params.ptsCount;
24980
+ }
24981
+ /**
24982
+ * Generate the TLObject from buffer.
24983
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
24984
+ */
24985
+ static async read(_data, ..._args) {
24986
+ // @ts-ignore
24987
+ let flags = await Primitive.Int.read(_data);
24988
+ let peer = await TLObject.read(_data);
24989
+ let msgId = await Primitive.Int.read(_data);
24990
+ let publicData = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
24991
+ let publicDataHash = flags & (1 << 0) ? await Primitive.Long.read(_data) : undefined;
24992
+ let chatData = flags & (1 << 1) ? await Primitive.String.read(_data) : undefined;
24993
+ let pts = await Primitive.Int.read(_data);
24994
+ let ptsCount = await Primitive.Int.read(_data);
24995
+ return new Raw.UpdateMessageWidgetData({
24996
+ peer: peer,
24997
+ msgId: msgId,
24998
+ publicData: publicData,
24999
+ publicDataHash: publicDataHash,
25000
+ chatData: chatData,
25001
+ pts: pts,
25002
+ ptsCount: ptsCount,
25003
+ });
25004
+ }
25005
+ /**
25006
+ * Generate buffer from TLObject.
25007
+ */
25008
+ write() {
25009
+ const b = new BytesIO();
25010
+ b.write(Primitive.Int.write(this.constructorId, false));
25011
+ // @ts-ignore
25012
+ let flags = 0;
25013
+ flags |= this.publicData !== undefined ? 1 << 0 : 0;
25014
+ flags |= this.publicDataHash !== undefined ? 1 << 0 : 0;
25015
+ flags |= this.chatData !== undefined ? 1 << 1 : 0;
25016
+ b.write(Primitive.Int.write(flags));
25017
+ if (this.peer !== undefined) {
25018
+ b.write(this.peer.write());
25019
+ }
25020
+ if (this.msgId !== undefined) {
25021
+ b.write(Primitive.Int.write(this.msgId));
25022
+ }
25023
+ if (this.publicData !== undefined) {
25024
+ b.write(Primitive.String.write(this.publicData));
25025
+ }
25026
+ if (this.publicDataHash !== undefined) {
25027
+ b.write(Primitive.Long.write(this.publicDataHash));
25028
+ }
25029
+ if (this.chatData !== undefined) {
25030
+ b.write(Primitive.String.write(this.chatData));
25031
+ }
25032
+ if (this.pts !== undefined) {
25033
+ b.write(Primitive.Int.write(this.pts));
25034
+ }
25035
+ if (this.ptsCount !== undefined) {
25036
+ b.write(Primitive.Int.write(this.ptsCount));
25037
+ }
25038
+ return Buffer.from(b.buffer);
25039
+ }
25040
+ }
25041
+ Raw.UpdateMessageWidgetData = UpdateMessageWidgetData;
25042
+ class UpdateTranscribedAudioFile extends TLObject {
25043
+ pending;
25044
+ transcriptionId;
25045
+ text;
25046
+ constructor(params) {
25047
+ super();
25048
+ this.classType = 'types';
25049
+ this.className = 'UpdateTranscribedAudioFile';
25050
+ this.constructorId = 0x734c2e7b;
25051
+ this.subclassOfId = 0x9f89304e;
25052
+ this._slots = ['pending', 'transcriptionId', 'text'];
25053
+ this.pending = params.pending;
25054
+ this.transcriptionId = params.transcriptionId;
25055
+ this.text = params.text;
25056
+ }
25057
+ /**
25058
+ * Generate the TLObject from buffer.
25059
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
25060
+ */
25061
+ static async read(_data, ..._args) {
25062
+ // @ts-ignore
25063
+ let flags = await Primitive.Int.read(_data);
25064
+ let pending = flags & (1 << 0) ? true : false;
25065
+ let transcriptionId = await Primitive.Long.read(_data);
25066
+ let text = await Primitive.String.read(_data);
25067
+ return new Raw.UpdateTranscribedAudioFile({
25068
+ pending: pending,
25069
+ transcriptionId: transcriptionId,
25070
+ text: text,
25071
+ });
25072
+ }
25073
+ /**
25074
+ * Generate buffer from TLObject.
25075
+ */
25076
+ write() {
25077
+ const b = new BytesIO();
25078
+ b.write(Primitive.Int.write(this.constructorId, false));
25079
+ // @ts-ignore
25080
+ let flags = 0;
25081
+ flags |= this.pending ? 1 << 0 : 0;
25082
+ b.write(Primitive.Int.write(flags));
25083
+ if (this.transcriptionId !== undefined) {
25084
+ b.write(Primitive.Long.write(this.transcriptionId));
25085
+ }
25086
+ if (this.text !== undefined) {
25087
+ b.write(Primitive.String.write(this.text));
25088
+ }
25089
+ return Buffer.from(b.buffer);
25090
+ }
25091
+ }
25092
+ Raw.UpdateTranscribedAudioFile = UpdateTranscribedAudioFile;
24321
25093
  class UpdatesTooLong extends TLObject {
24322
25094
  constructor() {
24323
25095
  super();
@@ -33995,6 +34767,200 @@ export var Raw;
33995
34767
  }
33996
34768
  }
33997
34769
  Raw.InputBotInlineMessageRichMessage = InputBotInlineMessageRichMessage;
34770
+ class InputBotInlineMessageWidget extends TLObject {
34771
+ allowQueries;
34772
+ sharedWidget;
34773
+ invertMedia;
34774
+ width;
34775
+ height;
34776
+ html;
34777
+ publicData;
34778
+ chatData;
34779
+ replyMarkup;
34780
+ message;
34781
+ entities;
34782
+ constructor(params) {
34783
+ super();
34784
+ this.classType = 'types';
34785
+ this.className = 'InputBotInlineMessageWidget';
34786
+ this.constructorId = 0xf597a3f0;
34787
+ this.subclassOfId = 0x53fb4010;
34788
+ this._slots = [
34789
+ 'allowQueries',
34790
+ 'sharedWidget',
34791
+ 'invertMedia',
34792
+ 'width',
34793
+ 'height',
34794
+ 'html',
34795
+ 'publicData',
34796
+ 'chatData',
34797
+ 'replyMarkup',
34798
+ 'message',
34799
+ 'entities',
34800
+ ];
34801
+ this.allowQueries = params.allowQueries;
34802
+ this.sharedWidget = params.sharedWidget;
34803
+ this.invertMedia = params.invertMedia;
34804
+ this.width = params.width;
34805
+ this.height = params.height;
34806
+ this.html = params.html;
34807
+ this.publicData = params.publicData;
34808
+ this.chatData = params.chatData;
34809
+ this.replyMarkup = params.replyMarkup;
34810
+ this.message = params.message;
34811
+ this.entities = params.entities;
34812
+ }
34813
+ /**
34814
+ * Generate the TLObject from buffer.
34815
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
34816
+ */
34817
+ static async read(_data, ..._args) {
34818
+ // @ts-ignore
34819
+ let flags = await Primitive.Int.read(_data);
34820
+ let allowQueries = flags & (1 << 0) ? true : false;
34821
+ let sharedWidget = flags & (1 << 1) ? true : false;
34822
+ let invertMedia = flags & (1 << 6) ? true : false;
34823
+ let width = await Primitive.Int.read(_data);
34824
+ let height = await Primitive.Int.read(_data);
34825
+ let html = await Primitive.String.read(_data);
34826
+ let publicData = flags & (1 << 2) ? await Primitive.String.read(_data) : undefined;
34827
+ let chatData = flags & (1 << 3) ? await Primitive.String.read(_data) : undefined;
34828
+ let replyMarkup = flags & (1 << 4) ? await TLObject.read(_data) : undefined;
34829
+ let message = await Primitive.String.read(_data);
34830
+ let entities = flags & (1 << 5) ? await TLObject.read(_data) : [];
34831
+ return new Raw.InputBotInlineMessageWidget({
34832
+ allowQueries: allowQueries,
34833
+ sharedWidget: sharedWidget,
34834
+ invertMedia: invertMedia,
34835
+ width: width,
34836
+ height: height,
34837
+ html: html,
34838
+ publicData: publicData,
34839
+ chatData: chatData,
34840
+ replyMarkup: replyMarkup,
34841
+ message: message,
34842
+ entities: entities,
34843
+ });
34844
+ }
34845
+ /**
34846
+ * Generate buffer from TLObject.
34847
+ */
34848
+ write() {
34849
+ const b = new BytesIO();
34850
+ b.write(Primitive.Int.write(this.constructorId, false));
34851
+ // @ts-ignore
34852
+ let flags = 0;
34853
+ flags |= this.allowQueries ? 1 << 0 : 0;
34854
+ flags |= this.sharedWidget ? 1 << 1 : 0;
34855
+ flags |= this.invertMedia ? 1 << 6 : 0;
34856
+ flags |= this.publicData !== undefined ? 1 << 2 : 0;
34857
+ flags |= this.chatData !== undefined ? 1 << 3 : 0;
34858
+ flags |= this.replyMarkup !== undefined ? 1 << 4 : 0;
34859
+ flags |= this.entities ? 1 << 5 : 0;
34860
+ b.write(Primitive.Int.write(flags));
34861
+ if (this.width !== undefined) {
34862
+ b.write(Primitive.Int.write(this.width));
34863
+ }
34864
+ if (this.height !== undefined) {
34865
+ b.write(Primitive.Int.write(this.height));
34866
+ }
34867
+ if (this.html !== undefined) {
34868
+ b.write(Primitive.String.write(this.html));
34869
+ }
34870
+ if (this.publicData !== undefined) {
34871
+ b.write(Primitive.String.write(this.publicData));
34872
+ }
34873
+ if (this.chatData !== undefined) {
34874
+ b.write(Primitive.String.write(this.chatData));
34875
+ }
34876
+ if (this.replyMarkup !== undefined) {
34877
+ b.write(this.replyMarkup.write());
34878
+ }
34879
+ if (this.message !== undefined) {
34880
+ b.write(Primitive.String.write(this.message));
34881
+ }
34882
+ if (this.entities) {
34883
+ b.write(Primitive.Vector.write(this.entities));
34884
+ }
34885
+ return Buffer.from(b.buffer);
34886
+ }
34887
+ }
34888
+ Raw.InputBotInlineMessageWidget = InputBotInlineMessageWidget;
34889
+ class InputBotInlineMessageWidgetId extends TLObject {
34890
+ invertMedia;
34891
+ widgetId;
34892
+ chatData;
34893
+ replyMarkup;
34894
+ message;
34895
+ entities;
34896
+ constructor(params) {
34897
+ super();
34898
+ this.classType = 'types';
34899
+ this.className = 'InputBotInlineMessageWidgetId';
34900
+ this.constructorId = 0xfe8b792b;
34901
+ this.subclassOfId = 0x53fb4010;
34902
+ this._slots = ['invertMedia', 'widgetId', 'chatData', 'replyMarkup', 'message', 'entities'];
34903
+ this.invertMedia = params.invertMedia;
34904
+ this.widgetId = params.widgetId;
34905
+ this.chatData = params.chatData;
34906
+ this.replyMarkup = params.replyMarkup;
34907
+ this.message = params.message;
34908
+ this.entities = params.entities;
34909
+ }
34910
+ /**
34911
+ * Generate the TLObject from buffer.
34912
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
34913
+ */
34914
+ static async read(_data, ..._args) {
34915
+ // @ts-ignore
34916
+ let flags = await Primitive.Int.read(_data);
34917
+ let invertMedia = flags & (1 << 3) ? true : false;
34918
+ let widgetId = await Primitive.Long.read(_data);
34919
+ let chatData = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
34920
+ let replyMarkup = flags & (1 << 1) ? await TLObject.read(_data) : undefined;
34921
+ let message = await Primitive.String.read(_data);
34922
+ let entities = flags & (1 << 2) ? await TLObject.read(_data) : [];
34923
+ return new Raw.InputBotInlineMessageWidgetId({
34924
+ invertMedia: invertMedia,
34925
+ widgetId: widgetId,
34926
+ chatData: chatData,
34927
+ replyMarkup: replyMarkup,
34928
+ message: message,
34929
+ entities: entities,
34930
+ });
34931
+ }
34932
+ /**
34933
+ * Generate buffer from TLObject.
34934
+ */
34935
+ write() {
34936
+ const b = new BytesIO();
34937
+ b.write(Primitive.Int.write(this.constructorId, false));
34938
+ // @ts-ignore
34939
+ let flags = 0;
34940
+ flags |= this.invertMedia ? 1 << 3 : 0;
34941
+ flags |= this.chatData !== undefined ? 1 << 0 : 0;
34942
+ flags |= this.replyMarkup !== undefined ? 1 << 1 : 0;
34943
+ flags |= this.entities ? 1 << 2 : 0;
34944
+ b.write(Primitive.Int.write(flags));
34945
+ if (this.widgetId !== undefined) {
34946
+ b.write(Primitive.Long.write(this.widgetId));
34947
+ }
34948
+ if (this.chatData !== undefined) {
34949
+ b.write(Primitive.String.write(this.chatData));
34950
+ }
34951
+ if (this.replyMarkup !== undefined) {
34952
+ b.write(this.replyMarkup.write());
34953
+ }
34954
+ if (this.message !== undefined) {
34955
+ b.write(Primitive.String.write(this.message));
34956
+ }
34957
+ if (this.entities) {
34958
+ b.write(Primitive.Vector.write(this.entities));
34959
+ }
34960
+ return Buffer.from(b.buffer);
34961
+ }
34962
+ }
34963
+ Raw.InputBotInlineMessageWidgetId = InputBotInlineMessageWidgetId;
33998
34964
  class InputBotInlineResult extends TLObject {
33999
34965
  id;
34000
34966
  type;
@@ -34865,6 +35831,131 @@ export var Raw;
34865
35831
  }
34866
35832
  }
34867
35833
  Raw.BotInlineMessageRichMessage = BotInlineMessageRichMessage;
35834
+ class BotInlineMessageWidget extends TLObject {
35835
+ invertMedia;
35836
+ width;
35837
+ height;
35838
+ payload;
35839
+ publicData;
35840
+ publicDataHash;
35841
+ chatData;
35842
+ replyMarkup;
35843
+ widgetId;
35844
+ message;
35845
+ entities;
35846
+ constructor(params) {
35847
+ super();
35848
+ this.classType = 'types';
35849
+ this.className = 'BotInlineMessageWidget';
35850
+ this.constructorId = 0xbaa17834;
35851
+ this.subclassOfId = 0xc4910f88;
35852
+ this._slots = [
35853
+ 'invertMedia',
35854
+ 'width',
35855
+ 'height',
35856
+ 'payload',
35857
+ 'publicData',
35858
+ 'publicDataHash',
35859
+ 'chatData',
35860
+ 'replyMarkup',
35861
+ 'widgetId',
35862
+ 'message',
35863
+ 'entities',
35864
+ ];
35865
+ this.invertMedia = params.invertMedia;
35866
+ this.width = params.width;
35867
+ this.height = params.height;
35868
+ this.payload = params.payload;
35869
+ this.publicData = params.publicData;
35870
+ this.publicDataHash = params.publicDataHash;
35871
+ this.chatData = params.chatData;
35872
+ this.replyMarkup = params.replyMarkup;
35873
+ this.widgetId = params.widgetId;
35874
+ this.message = params.message;
35875
+ this.entities = params.entities;
35876
+ }
35877
+ /**
35878
+ * Generate the TLObject from buffer.
35879
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
35880
+ */
35881
+ static async read(_data, ..._args) {
35882
+ // @ts-ignore
35883
+ let flags = await Primitive.Int.read(_data);
35884
+ let invertMedia = flags & (1 << 5) ? true : false;
35885
+ let width = await Primitive.Int.read(_data);
35886
+ let height = await Primitive.Int.read(_data);
35887
+ let payload = await Primitive.Bytes.read(_data);
35888
+ let publicData = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
35889
+ let publicDataHash = flags & (1 << 0) ? await Primitive.Long.read(_data) : undefined;
35890
+ let chatData = flags & (1 << 1) ? await Primitive.String.read(_data) : undefined;
35891
+ let replyMarkup = flags & (1 << 2) ? await TLObject.read(_data) : undefined;
35892
+ let widgetId = flags & (1 << 3) ? await Primitive.Long.read(_data) : undefined;
35893
+ let message = await Primitive.String.read(_data);
35894
+ let entities = flags & (1 << 4) ? await TLObject.read(_data) : [];
35895
+ return new Raw.BotInlineMessageWidget({
35896
+ invertMedia: invertMedia,
35897
+ width: width,
35898
+ height: height,
35899
+ payload: payload,
35900
+ publicData: publicData,
35901
+ publicDataHash: publicDataHash,
35902
+ chatData: chatData,
35903
+ replyMarkup: replyMarkup,
35904
+ widgetId: widgetId,
35905
+ message: message,
35906
+ entities: entities,
35907
+ });
35908
+ }
35909
+ /**
35910
+ * Generate buffer from TLObject.
35911
+ */
35912
+ write() {
35913
+ const b = new BytesIO();
35914
+ b.write(Primitive.Int.write(this.constructorId, false));
35915
+ // @ts-ignore
35916
+ let flags = 0;
35917
+ flags |= this.invertMedia ? 1 << 5 : 0;
35918
+ flags |= this.publicData !== undefined ? 1 << 0 : 0;
35919
+ flags |= this.publicDataHash !== undefined ? 1 << 0 : 0;
35920
+ flags |= this.chatData !== undefined ? 1 << 1 : 0;
35921
+ flags |= this.replyMarkup !== undefined ? 1 << 2 : 0;
35922
+ flags |= this.widgetId !== undefined ? 1 << 3 : 0;
35923
+ flags |= this.entities ? 1 << 4 : 0;
35924
+ b.write(Primitive.Int.write(flags));
35925
+ if (this.width !== undefined) {
35926
+ b.write(Primitive.Int.write(this.width));
35927
+ }
35928
+ if (this.height !== undefined) {
35929
+ b.write(Primitive.Int.write(this.height));
35930
+ }
35931
+ if (this.payload !== undefined) {
35932
+ b.write(Primitive.Bytes.write(this.payload));
35933
+ }
35934
+ if (this.publicData !== undefined) {
35935
+ b.write(Primitive.String.write(this.publicData));
35936
+ }
35937
+ if (this.publicDataHash !== undefined) {
35938
+ b.write(Primitive.Long.write(this.publicDataHash));
35939
+ }
35940
+ if (this.chatData !== undefined) {
35941
+ b.write(Primitive.String.write(this.chatData));
35942
+ }
35943
+ if (this.replyMarkup !== undefined) {
35944
+ b.write(this.replyMarkup.write());
35945
+ }
35946
+ if (this.widgetId !== undefined) {
35947
+ b.write(Primitive.Long.write(this.widgetId));
35948
+ }
35949
+ if (this.message !== undefined) {
35950
+ b.write(Primitive.String.write(this.message));
35951
+ }
35952
+ if (this.entities) {
35953
+ b.write(Primitive.Vector.write(this.entities));
35954
+ }
35955
+ return Buffer.from(b.buffer);
35956
+ }
35957
+ }
35958
+ Raw.BotInlineMessageWidget = BotInlineMessageWidget;
34868
35959
  class BotInlineResult extends TLObject {
34869
35960
  id;
34870
35961
  type;
@@ -72391,6 +73482,183 @@ export var Raw;
72391
73482
  }
72392
73483
  }
72393
73484
  Raw.InputWalletCardSticker = InputWalletCardSticker;
73485
+ class UserWallet extends TLObject {
73486
+ address;
73487
+ balance;
73488
+ publicKey;
73489
+ stateInit;
73490
+ constructor(params) {
73491
+ super();
73492
+ this.classType = 'types';
73493
+ this.className = 'UserWallet';
73494
+ this.constructorId = 0x454d2737;
73495
+ this.subclassOfId = 0x5c63833d;
73496
+ this._slots = ['address', 'balance', 'publicKey', 'stateInit'];
73497
+ this.address = params.address;
73498
+ this.balance = params.balance;
73499
+ this.publicKey = params.publicKey;
73500
+ this.stateInit = params.stateInit;
73501
+ }
73502
+ /**
73503
+ * Generate the TLObject from buffer.
73504
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
73505
+ */
73506
+ static async read(_data, ..._args) {
73507
+ // @ts-ignore
73508
+ let flags = await Primitive.Int.read(_data);
73509
+ let address = await Primitive.String.read(_data);
73510
+ let balance = await Primitive.Long.read(_data);
73511
+ let publicKey = flags & (1 << 0) ? await Primitive.Bytes.read(_data) : undefined;
73512
+ let stateInit = flags & (1 << 0) ? await Primitive.Bytes.read(_data) : undefined;
73513
+ return new Raw.UserWallet({
73514
+ address: address,
73515
+ balance: balance,
73516
+ publicKey: publicKey,
73517
+ stateInit: stateInit,
73518
+ });
73519
+ }
73520
+ /**
73521
+ * Generate buffer from TLObject.
73522
+ */
73523
+ write() {
73524
+ const b = new BytesIO();
73525
+ b.write(Primitive.Int.write(this.constructorId, false));
73526
+ // @ts-ignore
73527
+ let flags = 0;
73528
+ flags |= this.publicKey !== undefined ? 1 << 0 : 0;
73529
+ flags |= this.stateInit !== undefined ? 1 << 0 : 0;
73530
+ b.write(Primitive.Int.write(flags));
73531
+ if (this.address !== undefined) {
73532
+ b.write(Primitive.String.write(this.address));
73533
+ }
73534
+ if (this.balance !== undefined) {
73535
+ b.write(Primitive.Long.write(this.balance));
73536
+ }
73537
+ if (this.publicKey !== undefined) {
73538
+ b.write(Primitive.Bytes.write(this.publicKey));
73539
+ }
73540
+ if (this.stateInit !== undefined) {
73541
+ b.write(Primitive.Bytes.write(this.stateInit));
73542
+ }
73543
+ return Buffer.from(b.buffer);
73544
+ }
73545
+ }
73546
+ Raw.UserWallet = UserWallet;
73547
+ class WidgetQueryTypeData extends TLObject {
73548
+ withWallet;
73549
+ constructor(params) {
73550
+ super();
73551
+ this.classType = 'types';
73552
+ this.className = 'WidgetQueryTypeData';
73553
+ this.constructorId = 0x16d8cf0b;
73554
+ this.subclassOfId = 0x4bf6128d;
73555
+ this._slots = ['withWallet'];
73556
+ this.withWallet = params.withWallet;
73557
+ }
73558
+ /**
73559
+ * Generate the TLObject from buffer.
73560
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
73561
+ */
73562
+ static async read(_data, ..._args) {
73563
+ // @ts-ignore
73564
+ let flags = await Primitive.Int.read(_data);
73565
+ let withWallet = flags & (1 << 0) ? true : false;
73566
+ return new Raw.WidgetQueryTypeData({ withWallet: withWallet });
73567
+ }
73568
+ /**
73569
+ * Generate buffer from TLObject.
73570
+ */
73571
+ write() {
73572
+ const b = new BytesIO();
73573
+ b.write(Primitive.Int.write(this.constructorId, false));
73574
+ // @ts-ignore
73575
+ let flags = 0;
73576
+ flags |= this.withWallet ? 1 << 0 : 0;
73577
+ b.write(Primitive.Int.write(flags));
73578
+ return Buffer.from(b.buffer);
73579
+ }
73580
+ }
73581
+ Raw.WidgetQueryTypeData = WidgetQueryTypeData;
73582
+ class WidgetQueryTypeSignData extends TLObject {
73583
+ wallet;
73584
+ signData;
73585
+ constructor(params) {
73586
+ super();
73587
+ this.classType = 'types';
73588
+ this.className = 'WidgetQueryTypeSignData';
73589
+ this.constructorId = 0x192047dc;
73590
+ this.subclassOfId = 0x4bf6128d;
73591
+ this._slots = ['wallet', 'signData'];
73592
+ this.wallet = params.wallet;
73593
+ this.signData = params.signData;
73594
+ }
73595
+ /**
73596
+ * Generate the TLObject from buffer.
73597
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
73598
+ */
73599
+ static async read(_data, ..._args) {
73600
+ // no flags
73601
+ let wallet = await TLObject.read(_data);
73602
+ let signData = await TLObject.read(_data);
73603
+ return new Raw.WidgetQueryTypeSignData({ wallet: wallet, signData: signData });
73604
+ }
73605
+ /**
73606
+ * Generate buffer from TLObject.
73607
+ */
73608
+ write() {
73609
+ const b = new BytesIO();
73610
+ b.write(Primitive.Int.write(this.constructorId, false));
73611
+ // no flags
73612
+ if (this.wallet !== undefined) {
73613
+ b.write(this.wallet.write());
73614
+ }
73615
+ if (this.signData !== undefined) {
73616
+ b.write(this.signData.write());
73617
+ }
73618
+ return Buffer.from(b.buffer);
73619
+ }
73620
+ }
73621
+ Raw.WidgetQueryTypeSignData = WidgetQueryTypeSignData;
73622
+ class WidgetQueryTypeSentTransaction extends TLObject {
73623
+ wallet;
73624
+ msgHash;
73625
+ constructor(params) {
73626
+ super();
73627
+ this.classType = 'types';
73628
+ this.className = 'WidgetQueryTypeSentTransaction';
73629
+ this.constructorId = 0xff3b33b4;
73630
+ this.subclassOfId = 0x4bf6128d;
73631
+ this._slots = ['wallet', 'msgHash'];
73632
+ this.wallet = params.wallet;
73633
+ this.msgHash = params.msgHash;
73634
+ }
73635
+ /**
73636
+ * Generate the TLObject from buffer.
73637
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
73638
+ */
73639
+ static async read(_data, ..._args) {
73640
+ // no flags
73641
+ let wallet = await TLObject.read(_data);
73642
+ let msgHash = await Primitive.String.read(_data);
73643
+ return new Raw.WidgetQueryTypeSentTransaction({ wallet: wallet, msgHash: msgHash });
73644
+ }
73645
+ /**
73646
+ * Generate buffer from TLObject.
73647
+ */
73648
+ write() {
73649
+ const b = new BytesIO();
73650
+ b.write(Primitive.Int.write(this.constructorId, false));
73651
+ // no flags
73652
+ if (this.wallet !== undefined) {
73653
+ b.write(this.wallet.write());
73654
+ }
73655
+ if (this.msgHash !== undefined) {
73656
+ b.write(Primitive.String.write(this.msgHash));
73657
+ }
73658
+ return Buffer.from(b.buffer);
73659
+ }
73660
+ }
73661
+ Raw.WidgetQueryTypeSentTransaction = WidgetQueryTypeSentTransaction;
72394
73662
  class InvokeAfterMsg extends TLObject {
72395
73663
  __response__;
72396
73664
  msgId;
@@ -87331,6 +88599,124 @@ export var Raw;
87331
88599
  }
87332
88600
  }
87333
88601
  messages_1.ComposedRichMessageWithAI = ComposedRichMessageWithAI;
88602
+ class BotWidgetQueryAnswer extends TLObject {
88603
+ result;
88604
+ constructor(params) {
88605
+ super();
88606
+ this.classType = 'types';
88607
+ this.className = 'messages.BotWidgetQueryAnswer';
88608
+ this.constructorId = 0x95b73023;
88609
+ this.subclassOfId = 0xa7b102a;
88610
+ this._slots = ['result'];
88611
+ this.result = params.result;
88612
+ }
88613
+ /**
88614
+ * Generate the TLObject from buffer.
88615
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
88616
+ */
88617
+ static async read(_data, ..._args) {
88618
+ // @ts-ignore
88619
+ let flags = await Primitive.Int.read(_data);
88620
+ let result = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
88621
+ return new Raw.messages.BotWidgetQueryAnswer({ result: result });
88622
+ }
88623
+ /**
88624
+ * Generate buffer from TLObject.
88625
+ */
88626
+ write() {
88627
+ const b = new BytesIO();
88628
+ b.write(Primitive.Int.write(this.constructorId, false));
88629
+ // @ts-ignore
88630
+ let flags = 0;
88631
+ flags |= this.result !== undefined ? 1 << 0 : 0;
88632
+ b.write(Primitive.Int.write(flags));
88633
+ if (this.result !== undefined) {
88634
+ b.write(Primitive.String.write(this.result));
88635
+ }
88636
+ return Buffer.from(b.buffer);
88637
+ }
88638
+ }
88639
+ messages_1.BotWidgetQueryAnswer = BotWidgetQueryAnswer;
88640
+ class WidgetPublicDataNotModified extends TLObject {
88641
+ period;
88642
+ constructor(params) {
88643
+ super();
88644
+ this.classType = 'types';
88645
+ this.className = 'messages.WidgetPublicDataNotModified';
88646
+ this.constructorId = 0xb9196e57;
88647
+ this.subclassOfId = 0x30e16d71;
88648
+ this._slots = ['period'];
88649
+ this.period = params.period;
88650
+ }
88651
+ /**
88652
+ * Generate the TLObject from buffer.
88653
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
88654
+ */
88655
+ static async read(_data, ..._args) {
88656
+ // no flags
88657
+ let period = await Primitive.Int.read(_data);
88658
+ return new Raw.messages.WidgetPublicDataNotModified({ period: period });
88659
+ }
88660
+ /**
88661
+ * Generate buffer from TLObject.
88662
+ */
88663
+ write() {
88664
+ const b = new BytesIO();
88665
+ b.write(Primitive.Int.write(this.constructorId, false));
88666
+ // no flags
88667
+ if (this.period !== undefined) {
88668
+ b.write(Primitive.Int.write(this.period));
88669
+ }
88670
+ return Buffer.from(b.buffer);
88671
+ }
88672
+ }
88673
+ messages_1.WidgetPublicDataNotModified = WidgetPublicDataNotModified;
88674
+ class WidgetPublicData extends TLObject {
88675
+ hash;
88676
+ data;
88677
+ period;
88678
+ constructor(params) {
88679
+ super();
88680
+ this.classType = 'types';
88681
+ this.className = 'messages.WidgetPublicData';
88682
+ this.constructorId = 0x4493bff;
88683
+ this.subclassOfId = 0x30e16d71;
88684
+ this._slots = ['hash', 'data', 'period'];
88685
+ this.hash = params.hash;
88686
+ this.data = params.data;
88687
+ this.period = params.period;
88688
+ }
88689
+ /**
88690
+ * Generate the TLObject from buffer.
88691
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
88692
+ */
88693
+ static async read(_data, ..._args) {
88694
+ // no flags
88695
+ let hash = await Primitive.Long.read(_data);
88696
+ let data = await Primitive.String.read(_data);
88697
+ let period = await Primitive.Int.read(_data);
88698
+ return new Raw.messages.WidgetPublicData({ hash: hash, data: data, period: period });
88699
+ }
88700
+ /**
88701
+ * Generate buffer from TLObject.
88702
+ */
88703
+ write() {
88704
+ const b = new BytesIO();
88705
+ b.write(Primitive.Int.write(this.constructorId, false));
88706
+ // no flags
88707
+ if (this.hash !== undefined) {
88708
+ b.write(Primitive.Long.write(this.hash));
88709
+ }
88710
+ if (this.data !== undefined) {
88711
+ b.write(Primitive.String.write(this.data));
88712
+ }
88713
+ if (this.period !== undefined) {
88714
+ b.write(Primitive.Int.write(this.period));
88715
+ }
88716
+ return Buffer.from(b.buffer);
88717
+ }
88718
+ }
88719
+ messages_1.WidgetPublicData = WidgetPublicData;
87334
88720
  class GetMessages extends TLObject {
87335
88721
  __response__;
87336
88722
  id;
@@ -101288,6 +102674,404 @@ export var Raw;
101288
102674
  }
101289
102675
  }
101290
102676
  messages_1.GetShareThemeBackdrops = GetShareThemeBackdrops;
102677
+ class GetBotWidgetQueryAnswer extends TLObject {
102678
+ __response__;
102679
+ peer;
102680
+ msgId;
102681
+ queryType;
102682
+ data;
102683
+ constructor(params) {
102684
+ super();
102685
+ this.classType = 'functions';
102686
+ this.className = 'messages.GetBotWidgetQueryAnswer';
102687
+ this.constructorId = 0x5c550579;
102688
+ this.subclassOfId = 0xa7b102a;
102689
+ this._slots = ['peer', 'msgId', 'queryType', 'data'];
102690
+ this.peer = params.peer;
102691
+ this.msgId = params.msgId;
102692
+ this.queryType = params.queryType;
102693
+ this.data = params.data;
102694
+ }
102695
+ /**
102696
+ * Generate the TLObject from buffer.
102697
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
102698
+ */
102699
+ static async read(_data, ..._args) {
102700
+ // no flags
102701
+ let peer = await TLObject.read(_data);
102702
+ let msgId = await Primitive.Int.read(_data);
102703
+ let queryType = await TLObject.read(_data);
102704
+ let data = await Primitive.Bytes.read(_data);
102705
+ return new Raw.messages.GetBotWidgetQueryAnswer({
102706
+ peer: peer,
102707
+ msgId: msgId,
102708
+ queryType: queryType,
102709
+ data: data,
102710
+ });
102711
+ }
102712
+ /**
102713
+ * Generate buffer from TLObject.
102714
+ */
102715
+ write() {
102716
+ const b = new BytesIO();
102717
+ b.write(Primitive.Int.write(this.constructorId, false));
102718
+ // no flags
102719
+ if (this.peer !== undefined) {
102720
+ b.write(this.peer.write());
102721
+ }
102722
+ if (this.msgId !== undefined) {
102723
+ b.write(Primitive.Int.write(this.msgId));
102724
+ }
102725
+ if (this.queryType !== undefined) {
102726
+ b.write(this.queryType.write());
102727
+ }
102728
+ if (this.data !== undefined) {
102729
+ b.write(Primitive.Bytes.write(this.data));
102730
+ }
102731
+ return Buffer.from(b.buffer);
102732
+ }
102733
+ }
102734
+ messages_1.GetBotWidgetQueryAnswer = GetBotWidgetQueryAnswer;
102735
+ class SetBotWidgetQueryAnswer extends TLObject {
102736
+ __response__;
102737
+ queryId;
102738
+ result;
102739
+ constructor(params) {
102740
+ super();
102741
+ this.classType = 'functions';
102742
+ this.className = 'messages.SetBotWidgetQueryAnswer';
102743
+ this.constructorId = 0xf8cdec6a;
102744
+ this.subclassOfId = 0xf5b399ac;
102745
+ this._slots = ['queryId', 'result'];
102746
+ this.queryId = params.queryId;
102747
+ this.result = params.result;
102748
+ }
102749
+ /**
102750
+ * Generate the TLObject from buffer.
102751
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
102752
+ */
102753
+ static async read(_data, ..._args) {
102754
+ // @ts-ignore
102755
+ let flags = await Primitive.Int.read(_data);
102756
+ let queryId = await Primitive.Long.read(_data);
102757
+ let result = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
102758
+ return new Raw.messages.SetBotWidgetQueryAnswer({ queryId: queryId, result: result });
102759
+ }
102760
+ /**
102761
+ * Generate buffer from TLObject.
102762
+ */
102763
+ write() {
102764
+ const b = new BytesIO();
102765
+ b.write(Primitive.Int.write(this.constructorId, false));
102766
+ // @ts-ignore
102767
+ let flags = 0;
102768
+ flags |= this.result !== undefined ? 1 << 0 : 0;
102769
+ b.write(Primitive.Int.write(flags));
102770
+ if (this.queryId !== undefined) {
102771
+ b.write(Primitive.Long.write(this.queryId));
102772
+ }
102773
+ if (this.result !== undefined) {
102774
+ b.write(Primitive.String.write(this.result));
102775
+ }
102776
+ return Buffer.from(b.buffer);
102777
+ }
102778
+ }
102779
+ messages_1.SetBotWidgetQueryAnswer = SetBotWidgetQueryAnswer;
102780
+ class EditMessageWidgetData extends TLObject {
102781
+ __response__;
102782
+ peer;
102783
+ id;
102784
+ publicData;
102785
+ chatData;
102786
+ constructor(params) {
102787
+ super();
102788
+ this.classType = 'functions';
102789
+ this.className = 'messages.EditMessageWidgetData';
102790
+ this.constructorId = 0xf624bc1e;
102791
+ this.subclassOfId = 0x8af52aac;
102792
+ this._slots = ['peer', 'id', 'publicData', 'chatData'];
102793
+ this.peer = params.peer;
102794
+ this.id = params.id;
102795
+ this.publicData = params.publicData;
102796
+ this.chatData = params.chatData;
102797
+ }
102798
+ /**
102799
+ * Generate the TLObject from buffer.
102800
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
102801
+ */
102802
+ static async read(_data, ..._args) {
102803
+ // @ts-ignore
102804
+ let flags = await Primitive.Int.read(_data);
102805
+ let peer = await TLObject.read(_data);
102806
+ let id = await Primitive.Int.read(_data);
102807
+ let publicData = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
102808
+ let chatData = flags & (1 << 1) ? await Primitive.String.read(_data) : undefined;
102809
+ return new Raw.messages.EditMessageWidgetData({
102810
+ peer: peer,
102811
+ id: id,
102812
+ publicData: publicData,
102813
+ chatData: chatData,
102814
+ });
102815
+ }
102816
+ /**
102817
+ * Generate buffer from TLObject.
102818
+ */
102819
+ write() {
102820
+ const b = new BytesIO();
102821
+ b.write(Primitive.Int.write(this.constructorId, false));
102822
+ // @ts-ignore
102823
+ let flags = 0;
102824
+ flags |= this.publicData !== undefined ? 1 << 0 : 0;
102825
+ flags |= this.chatData !== undefined ? 1 << 1 : 0;
102826
+ b.write(Primitive.Int.write(flags));
102827
+ if (this.peer !== undefined) {
102828
+ b.write(this.peer.write());
102829
+ }
102830
+ if (this.id !== undefined) {
102831
+ b.write(Primitive.Int.write(this.id));
102832
+ }
102833
+ if (this.publicData !== undefined) {
102834
+ b.write(Primitive.String.write(this.publicData));
102835
+ }
102836
+ if (this.chatData !== undefined) {
102837
+ b.write(Primitive.String.write(this.chatData));
102838
+ }
102839
+ return Buffer.from(b.buffer);
102840
+ }
102841
+ }
102842
+ messages_1.EditMessageWidgetData = EditMessageWidgetData;
102843
+ class EditInlineBotMessageWidgetData extends TLObject {
102844
+ __response__;
102845
+ id;
102846
+ publicData;
102847
+ chatData;
102848
+ constructor(params) {
102849
+ super();
102850
+ this.classType = 'functions';
102851
+ this.className = 'messages.EditInlineBotMessageWidgetData';
102852
+ this.constructorId = 0x6396ce2b;
102853
+ this.subclassOfId = 0xf5b399ac;
102854
+ this._slots = ['id', 'publicData', 'chatData'];
102855
+ this.id = params.id;
102856
+ this.publicData = params.publicData;
102857
+ this.chatData = params.chatData;
102858
+ }
102859
+ /**
102860
+ * Generate the TLObject from buffer.
102861
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
102862
+ */
102863
+ static async read(_data, ..._args) {
102864
+ // @ts-ignore
102865
+ let flags = await Primitive.Int.read(_data);
102866
+ let id = await TLObject.read(_data);
102867
+ let publicData = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
102868
+ let chatData = flags & (1 << 1) ? await Primitive.String.read(_data) : undefined;
102869
+ return new Raw.messages.EditInlineBotMessageWidgetData({
102870
+ id: id,
102871
+ publicData: publicData,
102872
+ chatData: chatData,
102873
+ });
102874
+ }
102875
+ /**
102876
+ * Generate buffer from TLObject.
102877
+ */
102878
+ write() {
102879
+ const b = new BytesIO();
102880
+ b.write(Primitive.Int.write(this.constructorId, false));
102881
+ // @ts-ignore
102882
+ let flags = 0;
102883
+ flags |= this.publicData !== undefined ? 1 << 0 : 0;
102884
+ flags |= this.chatData !== undefined ? 1 << 1 : 0;
102885
+ b.write(Primitive.Int.write(flags));
102886
+ if (this.id !== undefined) {
102887
+ b.write(this.id.write());
102888
+ }
102889
+ if (this.publicData !== undefined) {
102890
+ b.write(Primitive.String.write(this.publicData));
102891
+ }
102892
+ if (this.chatData !== undefined) {
102893
+ b.write(Primitive.String.write(this.chatData));
102894
+ }
102895
+ return Buffer.from(b.buffer);
102896
+ }
102897
+ }
102898
+ messages_1.EditInlineBotMessageWidgetData = EditInlineBotMessageWidgetData;
102899
+ class EditWidgetData extends TLObject {
102900
+ __response__;
102901
+ widgetId;
102902
+ publicData;
102903
+ cacheTime;
102904
+ constructor(params) {
102905
+ super();
102906
+ this.classType = 'functions';
102907
+ this.className = 'messages.EditWidgetData';
102908
+ this.constructorId = 0xeac343c0;
102909
+ this.subclassOfId = 0xf5b399ac;
102910
+ this._slots = ['widgetId', 'publicData', 'cacheTime'];
102911
+ this.widgetId = params.widgetId;
102912
+ this.publicData = params.publicData;
102913
+ this.cacheTime = params.cacheTime;
102914
+ }
102915
+ /**
102916
+ * Generate the TLObject from buffer.
102917
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
102918
+ */
102919
+ static async read(_data, ..._args) {
102920
+ // @ts-ignore
102921
+ let flags = await Primitive.Int.read(_data);
102922
+ let widgetId = await Primitive.Long.read(_data);
102923
+ let publicData = await Primitive.String.read(_data);
102924
+ let cacheTime = flags & (1 << 0) ? await Primitive.Int.read(_data) : undefined;
102925
+ return new Raw.messages.EditWidgetData({
102926
+ widgetId: widgetId,
102927
+ publicData: publicData,
102928
+ cacheTime: cacheTime,
102929
+ });
102930
+ }
102931
+ /**
102932
+ * Generate buffer from TLObject.
102933
+ */
102934
+ write() {
102935
+ const b = new BytesIO();
102936
+ b.write(Primitive.Int.write(this.constructorId, false));
102937
+ // @ts-ignore
102938
+ let flags = 0;
102939
+ flags |= this.cacheTime !== undefined ? 1 << 0 : 0;
102940
+ b.write(Primitive.Int.write(flags));
102941
+ if (this.widgetId !== undefined) {
102942
+ b.write(Primitive.Long.write(this.widgetId));
102943
+ }
102944
+ if (this.publicData !== undefined) {
102945
+ b.write(Primitive.String.write(this.publicData));
102946
+ }
102947
+ if (this.cacheTime !== undefined) {
102948
+ b.write(Primitive.Int.write(this.cacheTime));
102949
+ }
102950
+ return Buffer.from(b.buffer);
102951
+ }
102952
+ }
102953
+ messages_1.EditWidgetData = EditWidgetData;
102954
+ class GetWidgetPublicData extends TLObject {
102955
+ __response__;
102956
+ peer;
102957
+ msgId;
102958
+ hash;
102959
+ constructor(params) {
102960
+ super();
102961
+ this.classType = 'functions';
102962
+ this.className = 'messages.GetWidgetPublicData';
102963
+ this.constructorId = 0x6fc53181;
102964
+ this.subclassOfId = 0x30e16d71;
102965
+ this._slots = ['peer', 'msgId', 'hash'];
102966
+ this.peer = params.peer;
102967
+ this.msgId = params.msgId;
102968
+ this.hash = params.hash;
102969
+ }
102970
+ /**
102971
+ * Generate the TLObject from buffer.
102972
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
102973
+ */
102974
+ static async read(_data, ..._args) {
102975
+ // no flags
102976
+ let peer = await TLObject.read(_data);
102977
+ let msgId = await Primitive.Int.read(_data);
102978
+ let hash = await Primitive.Long.read(_data);
102979
+ return new Raw.messages.GetWidgetPublicData({ peer: peer, msgId: msgId, hash: hash });
102980
+ }
102981
+ /**
102982
+ * Generate buffer from TLObject.
102983
+ */
102984
+ write() {
102985
+ const b = new BytesIO();
102986
+ b.write(Primitive.Int.write(this.constructorId, false));
102987
+ // no flags
102988
+ if (this.peer !== undefined) {
102989
+ b.write(this.peer.write());
102990
+ }
102991
+ if (this.msgId !== undefined) {
102992
+ b.write(Primitive.Int.write(this.msgId));
102993
+ }
102994
+ if (this.hash !== undefined) {
102995
+ b.write(Primitive.Long.write(this.hash));
102996
+ }
102997
+ return Buffer.from(b.buffer);
102998
+ }
102999
+ }
103000
+ messages_1.GetWidgetPublicData = GetWidgetPublicData;
103001
+ class TranscribeAudioFile extends TLObject {
103002
+ __response__;
103003
+ file;
103004
+ constructor(params) {
103005
+ super();
103006
+ this.classType = 'functions';
103007
+ this.className = 'messages.TranscribeAudioFile';
103008
+ this.constructorId = 0x72d2ef7;
103009
+ this.subclassOfId = 0x21b24936;
103010
+ this._slots = ['file'];
103011
+ this.file = params.file;
103012
+ }
103013
+ /**
103014
+ * Generate the TLObject from buffer.
103015
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
103016
+ */
103017
+ static async read(_data, ..._args) {
103018
+ // no flags
103019
+ let file = await TLObject.read(_data);
103020
+ return new Raw.messages.TranscribeAudioFile({ file: file });
103021
+ }
103022
+ /**
103023
+ * Generate buffer from TLObject.
103024
+ */
103025
+ write() {
103026
+ const b = new BytesIO();
103027
+ b.write(Primitive.Int.write(this.constructorId, false));
103028
+ // no flags
103029
+ if (this.file !== undefined) {
103030
+ b.write(this.file.write());
103031
+ }
103032
+ return Buffer.from(b.buffer);
103033
+ }
103034
+ }
103035
+ messages_1.TranscribeAudioFile = TranscribeAudioFile;
103036
+ class GetTranscriptionLangs extends TLObject {
103037
+ __response__;
103038
+ peer;
103039
+ constructor(params) {
103040
+ super();
103041
+ this.classType = 'functions';
103042
+ this.className = 'messages.GetTranscriptionLangs';
103043
+ this.constructorId = 0xba6cd9aa;
103044
+ this.subclassOfId = 0x1d97512;
103045
+ this._slots = ['peer'];
103046
+ this.peer = params.peer;
103047
+ }
103048
+ /**
103049
+ * Generate the TLObject from buffer.
103050
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
103051
+ */
103052
+ static async read(_data, ..._args) {
103053
+ // @ts-ignore
103054
+ let flags = await Primitive.Int.read(_data);
103055
+ let peer = flags & (1 << 0) ? await TLObject.read(_data) : undefined;
103056
+ return new Raw.messages.GetTranscriptionLangs({ peer: peer });
103057
+ }
103058
+ /**
103059
+ * Generate buffer from TLObject.
103060
+ */
103061
+ write() {
103062
+ const b = new BytesIO();
103063
+ b.write(Primitive.Int.write(this.constructorId, false));
103064
+ // @ts-ignore
103065
+ let flags = 0;
103066
+ flags |= this.peer !== undefined ? 1 << 0 : 0;
103067
+ b.write(Primitive.Int.write(flags));
103068
+ if (this.peer !== undefined) {
103069
+ b.write(this.peer.write());
103070
+ }
103071
+ return Buffer.from(b.buffer);
103072
+ }
103073
+ }
103074
+ messages_1.GetTranscriptionLangs = GetTranscriptionLangs;
101291
103075
  })(messages = Raw.messages || (Raw.messages = {}));
101292
103076
  let updates;
101293
103077
  (function (updates) {
@@ -112103,16 +113887,18 @@ export var Raw;
112103
113887
  channel;
112104
113888
  enabled;
112105
113889
  tabs;
113890
+ sidebar;
112106
113891
  constructor(params) {
112107
113892
  super();
112108
113893
  this.classType = 'functions';
112109
113894
  this.className = 'channels.ToggleForum';
112110
- this.constructorId = 0x3ff75734;
113895
+ this.constructorId = 0xa2952b54;
112111
113896
  this.subclassOfId = 0x8af52aac;
112112
- this._slots = ['channel', 'enabled', 'tabs'];
113897
+ this._slots = ['channel', 'enabled', 'tabs', 'sidebar'];
112113
113898
  this.channel = params.channel;
112114
113899
  this.enabled = params.enabled;
112115
113900
  this.tabs = params.tabs;
113901
+ this.sidebar = params.sidebar;
112116
113902
  }
112117
113903
  /**
112118
113904
  * Generate the TLObject from buffer.
@@ -112123,7 +113909,13 @@ export var Raw;
112123
113909
  let channel = await TLObject.read(_data);
112124
113910
  let enabled = await Primitive.Bool.read(_data);
112125
113911
  let tabs = await Primitive.Bool.read(_data);
112126
- return new Raw.channels.ToggleForum({ channel: channel, enabled: enabled, tabs: tabs });
113912
+ let sidebar = await Primitive.Bool.read(_data);
113913
+ return new Raw.channels.ToggleForum({
113914
+ channel: channel,
113915
+ enabled: enabled,
113916
+ tabs: tabs,
113917
+ sidebar: sidebar,
113918
+ });
112127
113919
  }
112128
113920
  /**
112129
113921
  * Generate buffer from TLObject.
@@ -112141,6 +113933,9 @@ export var Raw;
112141
113933
  if (this.tabs !== undefined) {
112142
113934
  b.write(Primitive.Bool.write(this.tabs));
112143
113935
  }
113936
+ if (this.sidebar !== undefined) {
113937
+ b.write(Primitive.Bool.write(this.sidebar));
113938
+ }
112144
113939
  return Buffer.from(b.buffer);
112145
113940
  }
112146
113941
  }