@tgsnake/skema 3.1.0-browser.0 → 3.1.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.
Files changed (65) hide show
  1. package/dist/src/deps.d.ts +3 -4
  2. package/dist/src/deps.js +4 -4
  3. package/dist/src/raw/class/All.d.ts +1 -1
  4. package/dist/src/raw/class/All.js +2739 -2739
  5. package/dist/src/raw/class/Raw.d.ts +7516 -7516
  6. package/dist/src/raw/class/Raw.js +20426 -26448
  7. package/dist/src/raw/class/tl/account.d.ts +841 -841
  8. package/dist/src/raw/class/tl/account.js +1813 -1983
  9. package/dist/src/raw/class/tl/aicompose.d.ts +51 -51
  10. package/dist/src/raw/class/tl/aicompose.js +117 -128
  11. package/dist/src/raw/class/tl/auth.d.ts +296 -296
  12. package/dist/src/raw/class/tl/auth.js +714 -849
  13. package/dist/src/raw/class/tl/bots.d.ts +231 -231
  14. package/dist/src/raw/class/tl/bots.js +504 -524
  15. package/dist/src/raw/class/tl/channels.d.ts +331 -331
  16. package/dist/src/raw/class/tl/channels.js +732 -823
  17. package/dist/src/raw/class/tl/chatlists.d.ts +81 -81
  18. package/dist/src/raw/class/tl/chatlists.js +183 -196
  19. package/dist/src/raw/class/tl/communities.d.ts +56 -56
  20. package/dist/src/raw/class/tl/communities.js +138 -159
  21. package/dist/src/raw/class/tl/contacts.d.ts +216 -216
  22. package/dist/src/raw/class/tl/contacts.js +492 -537
  23. package/dist/src/raw/class/tl/ephemeral.d.ts +51 -51
  24. package/dist/src/raw/class/tl/ephemeral.js +152 -204
  25. package/dist/src/raw/class/tl/folders.d.ts +6 -6
  26. package/dist/src/raw/class/tl/folders.js +11 -11
  27. package/dist/src/raw/class/tl/fragment.d.ts +11 -11
  28. package/dist/src/raw/class/tl/fragment.js +25 -32
  29. package/dist/src/raw/class/tl/help.d.ts +286 -286
  30. package/dist/src/raw/class/tl/help.js +618 -686
  31. package/dist/src/raw/class/tl/langpack.d.ts +26 -26
  32. package/dist/src/raw/class/tl/langpack.js +57 -57
  33. package/dist/src/raw/class/tl/messages.d.ts +1851 -1851
  34. package/dist/src/raw/class/tl/messages.js +4854 -5924
  35. package/dist/src/raw/class/tl/payments.d.ts +641 -641
  36. package/dist/src/raw/class/tl/payments.js +1734 -2198
  37. package/dist/src/raw/class/tl/phone.d.ts +256 -256
  38. package/dist/src/raw/class/tl/phone.js +644 -779
  39. package/dist/src/raw/class/tl/photos.d.ts +41 -41
  40. package/dist/src/raw/class/tl/photos.js +116 -139
  41. package/dist/src/raw/class/tl/premium.d.ts +41 -41
  42. package/dist/src/raw/class/tl/premium.js +111 -133
  43. package/dist/src/raw/class/tl/smsjobs.d.ts +46 -46
  44. package/dist/src/raw/class/tl/smsjobs.js +97 -115
  45. package/dist/src/raw/class/tl/stats.d.ts +71 -71
  46. package/dist/src/raw/class/tl/stats.js +169 -268
  47. package/dist/src/raw/class/tl/stickers.d.ts +61 -61
  48. package/dist/src/raw/class/tl/stickers.js +144 -173
  49. package/dist/src/raw/class/tl/storage.d.ts +51 -51
  50. package/dist/src/raw/class/tl/storage.js +71 -71
  51. package/dist/src/raw/class/tl/stories.d.ts +221 -221
  52. package/dist/src/raw/class/tl/stories.js +622 -781
  53. package/dist/src/raw/class/tl/toncenter.d.ts +21 -21
  54. package/dist/src/raw/class/tl/toncenter.js +47 -52
  55. package/dist/src/raw/class/tl/updates.d.ts +56 -56
  56. package/dist/src/raw/class/tl/updates.js +175 -246
  57. package/dist/src/raw/class/tl/upload.d.ts +66 -66
  58. package/dist/src/raw/class/tl/upload.js +155 -178
  59. package/dist/src/raw/class/tl/users.d.ts +61 -61
  60. package/dist/src/raw/class/tl/users.js +124 -124
  61. package/dist/src/raw/class/tl/wallet.d.ts +206 -206
  62. package/dist/src/raw/class/tl/wallet.js +525 -591
  63. package/dist/src/raw/class/types.d.ts +1 -1
  64. package/dist/src/raw/class/types.js +1 -1
  65. package/package.json +4 -6
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * tgsnake is a free software: you can redistribute it and/or modify
8
8
  * it under the terms of the MIT License as published.
9
- */
9
+ */
10
10
  import { TLObject } from '../../core/index.js';
11
11
  import { Buffer, BytesIO } from '../../../deps.js';
12
12
  import type { Vector, double, int, long } from '../types.js';
@@ -21,13 +21,13 @@ export declare class Photos extends TLObject {
21
21
  users: Vector<raw.TypeUser>;
22
22
  });
23
23
  /**
24
- * Generate the TLObject from buffer.
25
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
26
- */
24
+ * Generate the TLObject from buffer.
25
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
26
+ */
27
27
  static read(_data: BytesIO, ..._args: Array<any>): Promise<Photos>;
28
28
  /**
29
- * Generate buffer from TLObject.
30
- */
29
+ * Generate buffer from TLObject.
30
+ */
31
31
  write(): Buffer;
32
32
  }
33
33
  export declare class PhotosSlice extends TLObject {
@@ -40,13 +40,13 @@ export declare class PhotosSlice extends TLObject {
40
40
  users: Vector<raw.TypeUser>;
41
41
  });
42
42
  /**
43
- * Generate the TLObject from buffer.
44
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
45
- */
43
+ * Generate the TLObject from buffer.
44
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
45
+ */
46
46
  static read(_data: BytesIO, ..._args: Array<any>): Promise<PhotosSlice>;
47
47
  /**
48
- * Generate buffer from TLObject.
49
- */
48
+ * Generate buffer from TLObject.
49
+ */
50
50
  write(): Buffer;
51
51
  }
52
52
  export declare class Photo extends TLObject {
@@ -57,13 +57,13 @@ export declare class Photo extends TLObject {
57
57
  users: Vector<raw.TypeUser>;
58
58
  });
59
59
  /**
60
- * Generate the TLObject from buffer.
61
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
62
- */
60
+ * Generate the TLObject from buffer.
61
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
62
+ */
63
63
  static read(_data: BytesIO, ..._args: Array<any>): Promise<Photo>;
64
64
  /**
65
- * Generate buffer from TLObject.
66
- */
65
+ * Generate buffer from TLObject.
66
+ */
67
67
  write(): Buffer;
68
68
  }
69
69
  export declare class UpdateProfilePhoto extends TLObject {
@@ -77,13 +77,13 @@ export declare class UpdateProfilePhoto extends TLObject {
77
77
  id: raw.TypeInputPhoto;
78
78
  });
79
79
  /**
80
- * Generate the TLObject from buffer.
81
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
82
- */
80
+ * Generate the TLObject from buffer.
81
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
82
+ */
83
83
  static read(_data: BytesIO, ..._args: Array<any>): Promise<UpdateProfilePhoto>;
84
84
  /**
85
- * Generate buffer from TLObject.
86
- */
85
+ * Generate buffer from TLObject.
86
+ */
87
87
  write(): Buffer;
88
88
  }
89
89
  export declare class UploadProfilePhoto extends TLObject {
@@ -103,13 +103,13 @@ export declare class UploadProfilePhoto extends TLObject {
103
103
  videoEmojiMarkup?: raw.TypeVideoSize;
104
104
  });
105
105
  /**
106
- * Generate the TLObject from buffer.
107
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
108
- */
106
+ * Generate the TLObject from buffer.
107
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
108
+ */
109
109
  static read(_data: BytesIO, ..._args: Array<any>): Promise<UploadProfilePhoto>;
110
110
  /**
111
- * Generate buffer from TLObject.
112
- */
111
+ * Generate buffer from TLObject.
112
+ */
113
113
  write(): Buffer;
114
114
  }
115
115
  export declare class DeletePhotos extends TLObject {
@@ -119,13 +119,13 @@ export declare class DeletePhotos extends TLObject {
119
119
  id: Vector<raw.TypeInputPhoto>;
120
120
  });
121
121
  /**
122
- * Generate the TLObject from buffer.
123
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
124
- */
122
+ * Generate the TLObject from buffer.
123
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
124
+ */
125
125
  static read(_data: BytesIO, ..._args: Array<any>): Promise<DeletePhotos>;
126
126
  /**
127
- * Generate buffer from TLObject.
128
- */
127
+ * Generate buffer from TLObject.
128
+ */
129
129
  write(): Buffer;
130
130
  }
131
131
  export declare class GetUserPhotos extends TLObject {
@@ -141,13 +141,13 @@ export declare class GetUserPhotos extends TLObject {
141
141
  limit: int;
142
142
  });
143
143
  /**
144
- * Generate the TLObject from buffer.
145
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
146
- */
144
+ * Generate the TLObject from buffer.
145
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
146
+ */
147
147
  static read(_data: BytesIO, ..._args: Array<any>): Promise<GetUserPhotos>;
148
148
  /**
149
- * Generate buffer from TLObject.
150
- */
149
+ * Generate buffer from TLObject.
150
+ */
151
151
  write(): Buffer;
152
152
  }
153
153
  export declare class UploadContactProfilePhoto extends TLObject {
@@ -169,12 +169,12 @@ export declare class UploadContactProfilePhoto extends TLObject {
169
169
  videoEmojiMarkup?: raw.TypeVideoSize;
170
170
  });
171
171
  /**
172
- * Generate the TLObject from buffer.
173
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
174
- */
172
+ * Generate the TLObject from buffer.
173
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
174
+ */
175
175
  static read(_data: BytesIO, ..._args: Array<any>): Promise<UploadContactProfilePhoto>;
176
176
  /**
177
- * Generate buffer from TLObject.
178
- */
177
+ * Generate buffer from TLObject.
178
+ */
179
179
  write(): Buffer;
180
180
  }
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * tgsnake is a free software: you can redistribute it and/or modify
8
8
  * it under the terms of the MIT License as published.
9
- */
9
+ */
10
10
  // This file is auto generate. All change made in this file will be lost!
11
11
  import { TLObject, Primitive } from '../../core/index.js';
12
12
  import { BytesIO } from '../../../deps.js';
@@ -15,36 +15,36 @@ export class Photos extends TLObject {
15
15
  users;
16
16
  constructor(params) {
17
17
  super();
18
- this.classType = 'types';
19
- this.className = 'photos.Photos';
18
+ this.classType = "types";
19
+ this.className = "photos.Photos";
20
20
  this.constructorId = 0x8dca6aa5;
21
21
  this.subclassOfId = 0x27cfb967;
22
- this._slots = ['photos', 'users'];
22
+ this._slots = ["photos", "users"];
23
23
  this.photos = params.photos;
24
24
  this.users = params.users;
25
25
  }
26
26
  /**
27
- * Generate the TLObject from buffer.
28
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
29
- */
27
+ * Generate the TLObject from buffer.
28
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
29
+ */
30
30
  static async read(_data, ..._args) {
31
31
  // no flags
32
32
  let photos = await TLObject.read(_data);
33
33
  let users = await TLObject.read(_data);
34
- return new Photos({ photos: photos, users: users });
34
+ return new Photos({ "photos": photos, "users": users });
35
35
  }
36
36
  /**
37
- * Generate buffer from TLObject.
38
- */
37
+ * Generate buffer from TLObject.
38
+ */
39
39
  write() {
40
40
  const b = new BytesIO();
41
41
  b.write(Primitive.Int.write(this.constructorId, false));
42
42
  // no flags
43
43
  if (this.photos) {
44
- b.write(Primitive.Vector.write(this.photos));
44
+ b.write((Primitive.Vector.write(this.photos)));
45
45
  }
46
46
  if (this.users) {
47
- b.write(Primitive.Vector.write(this.users));
47
+ b.write((Primitive.Vector.write(this.users)));
48
48
  }
49
49
  return b.buffer;
50
50
  }
@@ -55,41 +55,41 @@ export class PhotosSlice extends TLObject {
55
55
  users;
56
56
  constructor(params) {
57
57
  super();
58
- this.classType = 'types';
59
- this.className = 'photos.PhotosSlice';
58
+ this.classType = "types";
59
+ this.className = "photos.PhotosSlice";
60
60
  this.constructorId = 0x15051f54;
61
61
  this.subclassOfId = 0x27cfb967;
62
- this._slots = ['count', 'photos', 'users'];
62
+ this._slots = ["count", "photos", "users"];
63
63
  this.count = params.count;
64
64
  this.photos = params.photos;
65
65
  this.users = params.users;
66
66
  }
67
67
  /**
68
- * Generate the TLObject from buffer.
69
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
70
- */
68
+ * Generate the TLObject from buffer.
69
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
70
+ */
71
71
  static async read(_data, ..._args) {
72
72
  // no flags
73
73
  let count = await Primitive.Int.read(_data);
74
74
  let photos = await TLObject.read(_data);
75
75
  let users = await TLObject.read(_data);
76
- return new PhotosSlice({ count: count, photos: photos, users: users });
76
+ return new PhotosSlice({ "count": count, "photos": photos, "users": users });
77
77
  }
78
78
  /**
79
- * Generate buffer from TLObject.
80
- */
79
+ * Generate buffer from TLObject.
80
+ */
81
81
  write() {
82
82
  const b = new BytesIO();
83
83
  b.write(Primitive.Int.write(this.constructorId, false));
84
84
  // no flags
85
85
  if (this.count !== undefined) {
86
- b.write(Primitive.Int.write(this.count));
86
+ b.write((Primitive.Int.write(this.count)));
87
87
  }
88
88
  if (this.photos) {
89
- b.write(Primitive.Vector.write(this.photos));
89
+ b.write((Primitive.Vector.write(this.photos)));
90
90
  }
91
91
  if (this.users) {
92
- b.write(Primitive.Vector.write(this.users));
92
+ b.write((Primitive.Vector.write(this.users)));
93
93
  }
94
94
  return b.buffer;
95
95
  }
@@ -99,27 +99,27 @@ export class Photo extends TLObject {
99
99
  users;
100
100
  constructor(params) {
101
101
  super();
102
- this.classType = 'types';
103
- this.className = 'photos.Photo';
102
+ this.classType = "types";
103
+ this.className = "photos.Photo";
104
104
  this.constructorId = 0x20212ca8;
105
105
  this.subclassOfId = 0xc292bd24;
106
- this._slots = ['photo', 'users'];
106
+ this._slots = ["photo", "users"];
107
107
  this.photo = params.photo;
108
108
  this.users = params.users;
109
109
  }
110
110
  /**
111
- * Generate the TLObject from buffer.
112
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
113
- */
111
+ * Generate the TLObject from buffer.
112
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
113
+ */
114
114
  static async read(_data, ..._args) {
115
115
  // no flags
116
116
  let photo = await TLObject.read(_data);
117
117
  let users = await TLObject.read(_data);
118
- return new Photo({ photo: photo, users: users });
118
+ return new Photo({ "photo": photo, "users": users });
119
119
  }
120
120
  /**
121
- * Generate buffer from TLObject.
122
- */
121
+ * Generate buffer from TLObject.
122
+ */
123
123
  write() {
124
124
  const b = new BytesIO();
125
125
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -128,7 +128,7 @@ export class Photo extends TLObject {
128
128
  b.write(this.photo.write());
129
129
  }
130
130
  if (this.users) {
131
- b.write(Primitive.Vector.write(this.users));
131
+ b.write((Primitive.Vector.write(this.users)));
132
132
  }
133
133
  return b.buffer;
134
134
  }
@@ -140,38 +140,38 @@ export class UpdateProfilePhoto extends TLObject {
140
140
  id;
141
141
  constructor(params) {
142
142
  super();
143
- this.classType = 'functions';
144
- this.className = 'photos.UpdateProfilePhoto';
143
+ this.classType = "functions";
144
+ this.className = "photos.UpdateProfilePhoto";
145
145
  this.constructorId = 0x9e82039;
146
146
  this.subclassOfId = 0xc292bd24;
147
- this._slots = ['fallback', 'bot', 'id'];
147
+ this._slots = ["fallback", "bot", "id"];
148
148
  this.fallback = params.fallback;
149
149
  this.bot = params.bot;
150
150
  this.id = params.id;
151
151
  }
152
152
  /**
153
- * Generate the TLObject from buffer.
154
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
155
- */
153
+ * Generate the TLObject from buffer.
154
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
155
+ */
156
156
  static async read(_data, ..._args) {
157
157
  // @ts-ignore
158
158
  let flags = await Primitive.Int.read(_data);
159
- let fallback = flags & (1 << 0) ? true : false;
160
- let bot = flags & (1 << 1) ? await TLObject.read(_data) : undefined;
159
+ let fallback = (flags & (1 << 0)) ? true : false;
160
+ let bot = (flags & (1 << 1)) ? await TLObject.read(_data) : undefined;
161
161
  let id = await TLObject.read(_data);
162
- return new UpdateProfilePhoto({ fallback: fallback, bot: bot, id: id });
162
+ return new UpdateProfilePhoto({ "fallback": fallback, "bot": bot, "id": id });
163
163
  }
164
164
  /**
165
- * Generate buffer from TLObject.
166
- */
165
+ * Generate buffer from TLObject.
166
+ */
167
167
  write() {
168
168
  const b = new BytesIO();
169
169
  b.write(Primitive.Int.write(this.constructorId, false));
170
170
  // @ts-ignore
171
171
  let flags = 0;
172
- flags |= this.fallback ? 1 << 0 : 0;
173
- flags |= this.bot !== undefined ? 1 << 1 : 0;
174
- b.write(Primitive.Int.write(flags));
172
+ flags |= this.fallback ? (1 << 0) : 0;
173
+ flags |= this.bot !== undefined ? (1 << 1) : 0;
174
+ b.write((Primitive.Int.write(flags)));
175
175
  if (this.bot !== undefined) {
176
176
  b.write(this.bot.write());
177
177
  }
@@ -191,11 +191,11 @@ export class UploadProfilePhoto extends TLObject {
191
191
  videoEmojiMarkup;
192
192
  constructor(params) {
193
193
  super();
194
- this.classType = 'functions';
195
- this.className = 'photos.UploadProfilePhoto';
194
+ this.classType = "functions";
195
+ this.className = "photos.UploadProfilePhoto";
196
196
  this.constructorId = 0x388a3b5;
197
197
  this.subclassOfId = 0xc292bd24;
198
- this._slots = ['fallback', 'bot', 'file', 'video', 'videoStartTs', 'videoEmojiMarkup'];
198
+ this._slots = ["fallback", "bot", "file", "video", "videoStartTs", "videoEmojiMarkup"];
199
199
  this.fallback = params.fallback;
200
200
  this.bot = params.bot;
201
201
  this.file = params.file;
@@ -204,42 +204,35 @@ export class UploadProfilePhoto extends TLObject {
204
204
  this.videoEmojiMarkup = params.videoEmojiMarkup;
205
205
  }
206
206
  /**
207
- * Generate the TLObject from buffer.
208
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
209
- */
207
+ * Generate the TLObject from buffer.
208
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
209
+ */
210
210
  static async read(_data, ..._args) {
211
211
  // @ts-ignore
212
212
  let flags = await Primitive.Int.read(_data);
213
- let fallback = flags & (1 << 3) ? true : false;
214
- let bot = flags & (1 << 5) ? await TLObject.read(_data) : undefined;
215
- let file = flags & (1 << 0) ? await TLObject.read(_data) : undefined;
216
- let video = flags & (1 << 1) ? await TLObject.read(_data) : undefined;
217
- let videoStartTs = flags & (1 << 2) ? await Primitive.Double.read(_data) : undefined;
218
- let videoEmojiMarkup = flags & (1 << 4) ? await TLObject.read(_data) : undefined;
219
- return new UploadProfilePhoto({
220
- fallback: fallback,
221
- bot: bot,
222
- file: file,
223
- video: video,
224
- videoStartTs: videoStartTs,
225
- videoEmojiMarkup: videoEmojiMarkup,
226
- });
213
+ let fallback = (flags & (1 << 3)) ? true : false;
214
+ let bot = (flags & (1 << 5)) ? await TLObject.read(_data) : undefined;
215
+ let file = (flags & (1 << 0)) ? await TLObject.read(_data) : undefined;
216
+ let video = (flags & (1 << 1)) ? await TLObject.read(_data) : undefined;
217
+ let videoStartTs = (flags & (1 << 2)) ? await Primitive.Double.read(_data) : undefined;
218
+ let videoEmojiMarkup = (flags & (1 << 4)) ? await TLObject.read(_data) : undefined;
219
+ return new UploadProfilePhoto({ "fallback": fallback, "bot": bot, "file": file, "video": video, "videoStartTs": videoStartTs, "videoEmojiMarkup": videoEmojiMarkup });
227
220
  }
228
221
  /**
229
- * Generate buffer from TLObject.
230
- */
222
+ * Generate buffer from TLObject.
223
+ */
231
224
  write() {
232
225
  const b = new BytesIO();
233
226
  b.write(Primitive.Int.write(this.constructorId, false));
234
227
  // @ts-ignore
235
228
  let flags = 0;
236
- flags |= this.fallback ? 1 << 3 : 0;
237
- flags |= this.bot !== undefined ? 1 << 5 : 0;
238
- flags |= this.file !== undefined ? 1 << 0 : 0;
239
- flags |= this.video !== undefined ? 1 << 1 : 0;
240
- flags |= this.videoStartTs !== undefined ? 1 << 2 : 0;
241
- flags |= this.videoEmojiMarkup !== undefined ? 1 << 4 : 0;
242
- b.write(Primitive.Int.write(flags));
229
+ flags |= this.fallback ? (1 << 3) : 0;
230
+ flags |= this.bot !== undefined ? (1 << 5) : 0;
231
+ flags |= this.file !== undefined ? (1 << 0) : 0;
232
+ flags |= this.video !== undefined ? (1 << 1) : 0;
233
+ flags |= this.videoStartTs !== undefined ? (1 << 2) : 0;
234
+ flags |= this.videoEmojiMarkup !== undefined ? (1 << 4) : 0;
235
+ b.write((Primitive.Int.write(flags)));
243
236
  if (this.bot !== undefined) {
244
237
  b.write(this.bot.write());
245
238
  }
@@ -250,7 +243,7 @@ export class UploadProfilePhoto extends TLObject {
250
243
  b.write(this.video.write());
251
244
  }
252
245
  if (this.videoStartTs !== undefined) {
253
- b.write(Primitive.Double.write(this.videoStartTs));
246
+ b.write((Primitive.Double.write(this.videoStartTs)));
254
247
  }
255
248
  if (this.videoEmojiMarkup !== undefined) {
256
249
  b.write(this.videoEmojiMarkup.write());
@@ -263,31 +256,31 @@ export class DeletePhotos extends TLObject {
263
256
  id;
264
257
  constructor(params) {
265
258
  super();
266
- this.classType = 'functions';
267
- this.className = 'photos.DeletePhotos';
259
+ this.classType = "functions";
260
+ this.className = "photos.DeletePhotos";
268
261
  this.constructorId = 0x87cf7f2f;
269
262
  this.subclassOfId = 0x8918e168;
270
- this._slots = ['id'];
263
+ this._slots = ["id"];
271
264
  this.id = params.id;
272
265
  }
273
266
  /**
274
- * Generate the TLObject from buffer.
275
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
276
- */
267
+ * Generate the TLObject from buffer.
268
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
269
+ */
277
270
  static async read(_data, ..._args) {
278
271
  // no flags
279
272
  let id = await TLObject.read(_data);
280
- return new DeletePhotos({ id: id });
273
+ return new DeletePhotos({ "id": id });
281
274
  }
282
275
  /**
283
- * Generate buffer from TLObject.
284
- */
276
+ * Generate buffer from TLObject.
277
+ */
285
278
  write() {
286
279
  const b = new BytesIO();
287
280
  b.write(Primitive.Int.write(this.constructorId, false));
288
281
  // no flags
289
282
  if (this.id) {
290
- b.write(Primitive.Vector.write(this.id));
283
+ b.write((Primitive.Vector.write(this.id)));
291
284
  }
292
285
  return b.buffer;
293
286
  }
@@ -300,31 +293,31 @@ export class GetUserPhotos extends TLObject {
300
293
  limit;
301
294
  constructor(params) {
302
295
  super();
303
- this.classType = 'functions';
304
- this.className = 'photos.GetUserPhotos';
296
+ this.classType = "functions";
297
+ this.className = "photos.GetUserPhotos";
305
298
  this.constructorId = 0x91cd32a8;
306
299
  this.subclassOfId = 0x27cfb967;
307
- this._slots = ['userId', 'offset', 'maxId', 'limit'];
300
+ this._slots = ["userId", "offset", "maxId", "limit"];
308
301
  this.userId = params.userId;
309
302
  this.offset = params.offset;
310
303
  this.maxId = params.maxId;
311
304
  this.limit = params.limit;
312
305
  }
313
306
  /**
314
- * Generate the TLObject from buffer.
315
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
316
- */
307
+ * Generate the TLObject from buffer.
308
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
309
+ */
317
310
  static async read(_data, ..._args) {
318
311
  // no flags
319
312
  let userId = await TLObject.read(_data);
320
313
  let offset = await Primitive.Int.read(_data);
321
314
  let maxId = await Primitive.Long.read(_data);
322
315
  let limit = await Primitive.Int.read(_data);
323
- return new GetUserPhotos({ userId: userId, offset: offset, maxId: maxId, limit: limit });
316
+ return new GetUserPhotos({ "userId": userId, "offset": offset, "maxId": maxId, "limit": limit });
324
317
  }
325
318
  /**
326
- * Generate buffer from TLObject.
327
- */
319
+ * Generate buffer from TLObject.
320
+ */
328
321
  write() {
329
322
  const b = new BytesIO();
330
323
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -333,13 +326,13 @@ export class GetUserPhotos extends TLObject {
333
326
  b.write(this.userId.write());
334
327
  }
335
328
  if (this.offset !== undefined) {
336
- b.write(Primitive.Int.write(this.offset));
329
+ b.write((Primitive.Int.write(this.offset)));
337
330
  }
338
331
  if (this.maxId !== undefined) {
339
- b.write(Primitive.Long.write(this.maxId));
332
+ b.write((Primitive.Long.write(this.maxId)));
340
333
  }
341
334
  if (this.limit !== undefined) {
342
- b.write(Primitive.Int.write(this.limit));
335
+ b.write((Primitive.Int.write(this.limit)));
343
336
  }
344
337
  return b.buffer;
345
338
  }
@@ -355,19 +348,11 @@ export class UploadContactProfilePhoto extends TLObject {
355
348
  videoEmojiMarkup;
356
349
  constructor(params) {
357
350
  super();
358
- this.classType = 'functions';
359
- this.className = 'photos.UploadContactProfilePhoto';
351
+ this.classType = "functions";
352
+ this.className = "photos.UploadContactProfilePhoto";
360
353
  this.constructorId = 0xe14c4a71;
361
354
  this.subclassOfId = 0xc292bd24;
362
- this._slots = [
363
- 'suggest',
364
- 'save',
365
- 'userId',
366
- 'file',
367
- 'video',
368
- 'videoStartTs',
369
- 'videoEmojiMarkup',
370
- ];
355
+ this._slots = ["suggest", "save", "userId", "file", "video", "videoStartTs", "videoEmojiMarkup"];
371
356
  this.suggest = params.suggest;
372
357
  this.save = params.save;
373
358
  this.userId = params.userId;
@@ -377,44 +362,36 @@ export class UploadContactProfilePhoto extends TLObject {
377
362
  this.videoEmojiMarkup = params.videoEmojiMarkup;
378
363
  }
379
364
  /**
380
- * Generate the TLObject from buffer.
381
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
382
- */
365
+ * Generate the TLObject from buffer.
366
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
367
+ */
383
368
  static async read(_data, ..._args) {
384
369
  // @ts-ignore
385
370
  let flags = await Primitive.Int.read(_data);
386
- let suggest = flags & (1 << 3) ? true : false;
387
- let save = flags & (1 << 4) ? true : false;
371
+ let suggest = (flags & (1 << 3)) ? true : false;
372
+ let save = (flags & (1 << 4)) ? true : false;
388
373
  let userId = await TLObject.read(_data);
389
- let file = flags & (1 << 0) ? await TLObject.read(_data) : undefined;
390
- let video = flags & (1 << 1) ? await TLObject.read(_data) : undefined;
391
- let videoStartTs = flags & (1 << 2) ? await Primitive.Double.read(_data) : undefined;
392
- let videoEmojiMarkup = flags & (1 << 5) ? await TLObject.read(_data) : undefined;
393
- return new UploadContactProfilePhoto({
394
- suggest: suggest,
395
- save: save,
396
- userId: userId,
397
- file: file,
398
- video: video,
399
- videoStartTs: videoStartTs,
400
- videoEmojiMarkup: videoEmojiMarkup,
401
- });
374
+ let file = (flags & (1 << 0)) ? await TLObject.read(_data) : undefined;
375
+ let video = (flags & (1 << 1)) ? await TLObject.read(_data) : undefined;
376
+ let videoStartTs = (flags & (1 << 2)) ? await Primitive.Double.read(_data) : undefined;
377
+ let videoEmojiMarkup = (flags & (1 << 5)) ? await TLObject.read(_data) : undefined;
378
+ return new UploadContactProfilePhoto({ "suggest": suggest, "save": save, "userId": userId, "file": file, "video": video, "videoStartTs": videoStartTs, "videoEmojiMarkup": videoEmojiMarkup });
402
379
  }
403
380
  /**
404
- * Generate buffer from TLObject.
405
- */
381
+ * Generate buffer from TLObject.
382
+ */
406
383
  write() {
407
384
  const b = new BytesIO();
408
385
  b.write(Primitive.Int.write(this.constructorId, false));
409
386
  // @ts-ignore
410
387
  let flags = 0;
411
- flags |= this.suggest ? 1 << 3 : 0;
412
- flags |= this.save ? 1 << 4 : 0;
413
- flags |= this.file !== undefined ? 1 << 0 : 0;
414
- flags |= this.video !== undefined ? 1 << 1 : 0;
415
- flags |= this.videoStartTs !== undefined ? 1 << 2 : 0;
416
- flags |= this.videoEmojiMarkup !== undefined ? 1 << 5 : 0;
417
- b.write(Primitive.Int.write(flags));
388
+ flags |= this.suggest ? (1 << 3) : 0;
389
+ flags |= this.save ? (1 << 4) : 0;
390
+ flags |= this.file !== undefined ? (1 << 0) : 0;
391
+ flags |= this.video !== undefined ? (1 << 1) : 0;
392
+ flags |= this.videoStartTs !== undefined ? (1 << 2) : 0;
393
+ flags |= this.videoEmojiMarkup !== undefined ? (1 << 5) : 0;
394
+ b.write((Primitive.Int.write(flags)));
418
395
  if (this.userId !== undefined) {
419
396
  b.write(this.userId.write());
420
397
  }
@@ -425,7 +402,7 @@ export class UploadContactProfilePhoto extends TLObject {
425
402
  b.write(this.video.write());
426
403
  }
427
404
  if (this.videoStartTs !== undefined) {
428
- b.write(Primitive.Double.write(this.videoStartTs));
405
+ b.write((Primitive.Double.write(this.videoStartTs)));
429
406
  }
430
407
  if (this.videoEmojiMarkup !== undefined) {
431
408
  b.write(this.videoEmojiMarkup.write());