@tgsnake/skema 3.2.0 → 3.2.1-browser.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 (67) hide show
  1. package/dist/src/deps.d.ts +4 -3
  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 +2783 -2783
  5. package/dist/src/raw/class/Raw.d.ts +7601 -7601
  6. package/dist/src/raw/class/Raw.js +26781 -20676
  7. package/dist/src/raw/class/tl/account.d.ts +841 -841
  8. package/dist/src/raw/class/tl/account.js +1983 -1813
  9. package/dist/src/raw/class/tl/aicompose.d.ts +51 -51
  10. package/dist/src/raw/class/tl/aicompose.js +128 -117
  11. package/dist/src/raw/class/tl/auth.d.ts +296 -296
  12. package/dist/src/raw/class/tl/auth.js +849 -714
  13. package/dist/src/raw/class/tl/bots.d.ts +256 -256
  14. package/dist/src/raw/class/tl/bots.js +661 -607
  15. package/dist/src/raw/class/tl/channels.d.ts +336 -336
  16. package/dist/src/raw/class/tl/channels.js +836 -745
  17. package/dist/src/raw/class/tl/chatlists.d.ts +81 -81
  18. package/dist/src/raw/class/tl/chatlists.js +196 -183
  19. package/dist/src/raw/class/tl/communities.d.ts +56 -56
  20. package/dist/src/raw/class/tl/communities.js +159 -138
  21. package/dist/src/raw/class/tl/contacts.d.ts +216 -216
  22. package/dist/src/raw/class/tl/contacts.js +537 -492
  23. package/dist/src/raw/class/tl/ephemeral.d.ts +51 -51
  24. package/dist/src/raw/class/tl/ephemeral.js +204 -152
  25. package/dist/src/raw/class/tl/feed.d.ts +71 -71
  26. package/dist/src/raw/class/tl/feed.js +214 -179
  27. package/dist/src/raw/class/tl/folders.d.ts +6 -6
  28. package/dist/src/raw/class/tl/folders.js +11 -11
  29. package/dist/src/raw/class/tl/fragment.d.ts +11 -11
  30. package/dist/src/raw/class/tl/fragment.js +32 -25
  31. package/dist/src/raw/class/tl/help.d.ts +286 -286
  32. package/dist/src/raw/class/tl/help.js +686 -618
  33. package/dist/src/raw/class/tl/langpack.d.ts +26 -26
  34. package/dist/src/raw/class/tl/langpack.js +57 -57
  35. package/dist/src/raw/class/tl/messages.d.ts +1866 -1866
  36. package/dist/src/raw/class/tl/messages.js +5965 -4886
  37. package/dist/src/raw/class/tl/payments.d.ts +646 -646
  38. package/dist/src/raw/class/tl/payments.js +2254 -1766
  39. package/dist/src/raw/class/tl/phone.d.ts +256 -256
  40. package/dist/src/raw/class/tl/phone.js +779 -644
  41. package/dist/src/raw/class/tl/photos.d.ts +41 -41
  42. package/dist/src/raw/class/tl/photos.js +139 -116
  43. package/dist/src/raw/class/tl/premium.d.ts +41 -41
  44. package/dist/src/raw/class/tl/premium.js +133 -111
  45. package/dist/src/raw/class/tl/smsjobs.d.ts +46 -46
  46. package/dist/src/raw/class/tl/smsjobs.js +115 -97
  47. package/dist/src/raw/class/tl/stats.d.ts +71 -71
  48. package/dist/src/raw/class/tl/stats.js +268 -169
  49. package/dist/src/raw/class/tl/stickers.d.ts +61 -61
  50. package/dist/src/raw/class/tl/stickers.js +173 -144
  51. package/dist/src/raw/class/tl/storage.d.ts +51 -51
  52. package/dist/src/raw/class/tl/storage.js +71 -71
  53. package/dist/src/raw/class/tl/stories.d.ts +221 -221
  54. package/dist/src/raw/class/tl/stories.js +781 -622
  55. package/dist/src/raw/class/tl/toncenter.d.ts +21 -21
  56. package/dist/src/raw/class/tl/toncenter.js +52 -47
  57. package/dist/src/raw/class/tl/updates.d.ts +56 -56
  58. package/dist/src/raw/class/tl/updates.js +246 -175
  59. package/dist/src/raw/class/tl/upload.d.ts +66 -66
  60. package/dist/src/raw/class/tl/upload.js +178 -155
  61. package/dist/src/raw/class/tl/users.d.ts +61 -61
  62. package/dist/src/raw/class/tl/users.js +124 -124
  63. package/dist/src/raw/class/tl/wallet.d.ts +221 -221
  64. package/dist/src/raw/class/tl/wallet.js +624 -558
  65. package/dist/src/raw/class/types.d.ts +1 -1
  66. package/dist/src/raw/class/types.js +1 -1
  67. package/package.json +6 -4
@@ -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 { Bool, int } from '../types.js';
@@ -21,13 +21,13 @@ export declare class EligibleToJoin extends TLObject {
21
21
  monthlySentSms: int;
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<EligibleToJoin>;
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 Status extends TLObject {
@@ -50,52 +50,52 @@ export declare class Status extends TLObject {
50
50
  termsUrl: string;
51
51
  });
52
52
  /**
53
- * Generate the TLObject from buffer.
54
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
55
- */
53
+ * Generate the TLObject from buffer.
54
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
55
+ */
56
56
  static read(_data: BytesIO, ..._args: Array<any>): Promise<Status>;
57
57
  /**
58
- * Generate buffer from TLObject.
59
- */
58
+ * Generate buffer from TLObject.
59
+ */
60
60
  write(): Buffer;
61
61
  }
62
62
  export declare class IsEligibleToJoin extends TLObject {
63
63
  __response__: TypeEligibilityToJoin;
64
64
  constructor();
65
65
  /**
66
- * Generate the TLObject from buffer.
67
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
68
- */
66
+ * Generate the TLObject from buffer.
67
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
68
+ */
69
69
  static read(_data: BytesIO, ..._args: Array<any>): Promise<IsEligibleToJoin>;
70
70
  /**
71
- * Generate buffer from TLObject.
72
- */
71
+ * Generate buffer from TLObject.
72
+ */
73
73
  write(): Buffer;
74
74
  }
75
75
  export declare class Join extends TLObject {
76
76
  __response__: Bool;
77
77
  constructor();
78
78
  /**
79
- * Generate the TLObject from buffer.
80
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
81
- */
79
+ * Generate the TLObject from buffer.
80
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
81
+ */
82
82
  static read(_data: BytesIO, ..._args: Array<any>): Promise<Join>;
83
83
  /**
84
- * Generate buffer from TLObject.
85
- */
84
+ * Generate buffer from TLObject.
85
+ */
86
86
  write(): Buffer;
87
87
  }
88
88
  export declare class Leave extends TLObject {
89
89
  __response__: Bool;
90
90
  constructor();
91
91
  /**
92
- * Generate the TLObject from buffer.
93
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
94
- */
92
+ * Generate the TLObject from buffer.
93
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
94
+ */
95
95
  static read(_data: BytesIO, ..._args: Array<any>): Promise<Leave>;
96
96
  /**
97
- * Generate buffer from TLObject.
98
- */
97
+ * Generate buffer from TLObject.
98
+ */
99
99
  write(): Buffer;
100
100
  }
101
101
  export declare class UpdateSettings extends TLObject {
@@ -105,26 +105,26 @@ export declare class UpdateSettings extends TLObject {
105
105
  allowInternational?: boolean;
106
106
  });
107
107
  /**
108
- * Generate the TLObject from buffer.
109
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
110
- */
108
+ * Generate the TLObject from buffer.
109
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
110
+ */
111
111
  static read(_data: BytesIO, ..._args: Array<any>): Promise<UpdateSettings>;
112
112
  /**
113
- * Generate buffer from TLObject.
114
- */
113
+ * Generate buffer from TLObject.
114
+ */
115
115
  write(): Buffer;
116
116
  }
117
117
  export declare class GetStatus extends TLObject {
118
118
  __response__: TypeStatus;
119
119
  constructor();
120
120
  /**
121
- * Generate the TLObject from buffer.
122
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
123
- */
121
+ * Generate the TLObject from buffer.
122
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
123
+ */
124
124
  static read(_data: BytesIO, ..._args: Array<any>): Promise<GetStatus>;
125
125
  /**
126
- * Generate buffer from TLObject.
127
- */
126
+ * Generate buffer from TLObject.
127
+ */
128
128
  write(): Buffer;
129
129
  }
130
130
  export declare class GetSmsJob extends TLObject {
@@ -134,13 +134,13 @@ export declare class GetSmsJob extends TLObject {
134
134
  jobId: string;
135
135
  });
136
136
  /**
137
- * Generate the TLObject from buffer.
138
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
139
- */
137
+ * Generate the TLObject from buffer.
138
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
139
+ */
140
140
  static read(_data: BytesIO, ..._args: Array<any>): Promise<GetSmsJob>;
141
141
  /**
142
- * Generate buffer from TLObject.
143
- */
142
+ * Generate buffer from TLObject.
143
+ */
144
144
  write(): Buffer;
145
145
  }
146
146
  export declare class FinishJob extends TLObject {
@@ -152,12 +152,12 @@ export declare class FinishJob extends TLObject {
152
152
  error?: string;
153
153
  });
154
154
  /**
155
- * Generate the TLObject from buffer.
156
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
157
- */
155
+ * Generate the TLObject from buffer.
156
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
157
+ */
158
158
  static read(_data: BytesIO, ..._args: Array<any>): Promise<FinishJob>;
159
159
  /**
160
- * Generate buffer from TLObject.
161
- */
160
+ * Generate buffer from TLObject.
161
+ */
162
162
  write(): Buffer;
163
163
  }
@@ -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 EligibleToJoin extends TLObject {
15
15
  monthlySentSms;
16
16
  constructor(params) {
17
17
  super();
18
- this.classType = "types";
19
- this.className = "smsjobs.EligibleToJoin";
18
+ this.classType = 'types';
19
+ this.className = 'smsjobs.EligibleToJoin';
20
20
  this.constructorId = 0xdc8b44cf;
21
21
  this.subclassOfId = 0x5eb760a6;
22
- this._slots = ["termsUrl", "monthlySentSms"];
22
+ this._slots = ['termsUrl', 'monthlySentSms'];
23
23
  this.termsUrl = params.termsUrl;
24
24
  this.monthlySentSms = params.monthlySentSms;
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 termsUrl = await Primitive.String.read(_data);
33
33
  let monthlySentSms = await Primitive.Int.read(_data);
34
- return new EligibleToJoin({ "termsUrl": termsUrl, "monthlySentSms": monthlySentSms });
34
+ return new EligibleToJoin({ termsUrl: termsUrl, monthlySentSms: monthlySentSms });
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.termsUrl !== undefined) {
44
- b.write((Primitive.String.write(this.termsUrl)));
44
+ b.write(Primitive.String.write(this.termsUrl));
45
45
  }
46
46
  if (this.monthlySentSms !== undefined) {
47
- b.write((Primitive.Int.write(this.monthlySentSms)));
47
+ b.write(Primitive.Int.write(this.monthlySentSms));
48
48
  }
49
49
  return b.buffer;
50
50
  }
@@ -60,11 +60,20 @@ export class Status extends TLObject {
60
60
  termsUrl;
61
61
  constructor(params) {
62
62
  super();
63
- this.classType = "types";
64
- this.className = "smsjobs.Status";
63
+ this.classType = 'types';
64
+ this.className = 'smsjobs.Status';
65
65
  this.constructorId = 0x2aee9191;
66
66
  this.subclassOfId = 0xcd8f2b25;
67
- this._slots = ["allowInternational", "recentSent", "recentSince", "recentRemains", "totalSent", "totalSince", "lastGiftSlug", "termsUrl"];
67
+ this._slots = [
68
+ 'allowInternational',
69
+ 'recentSent',
70
+ 'recentSince',
71
+ 'recentRemains',
72
+ 'totalSent',
73
+ 'totalSince',
74
+ 'lastGiftSlug',
75
+ 'termsUrl',
76
+ ];
68
77
  this.allowInternational = params.allowInternational;
69
78
  this.recentSent = params.recentSent;
70
79
  this.recentSince = params.recentSince;
@@ -75,53 +84,62 @@ export class Status extends TLObject {
75
84
  this.termsUrl = params.termsUrl;
76
85
  }
77
86
  /**
78
- * Generate the TLObject from buffer.
79
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
80
- */
87
+ * Generate the TLObject from buffer.
88
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
89
+ */
81
90
  static async read(_data, ..._args) {
82
91
  // @ts-ignore
83
92
  let flags = await Primitive.Int.read(_data);
84
- let allowInternational = (flags & (1 << 0)) ? true : false;
93
+ let allowInternational = flags & (1 << 0) ? true : false;
85
94
  let recentSent = await Primitive.Int.read(_data);
86
95
  let recentSince = await Primitive.Int.read(_data);
87
96
  let recentRemains = await Primitive.Int.read(_data);
88
97
  let totalSent = await Primitive.Int.read(_data);
89
98
  let totalSince = await Primitive.Int.read(_data);
90
- let lastGiftSlug = (flags & (1 << 1)) ? await Primitive.String.read(_data) : undefined;
99
+ let lastGiftSlug = flags & (1 << 1) ? await Primitive.String.read(_data) : undefined;
91
100
  let termsUrl = await Primitive.String.read(_data);
92
- return new Status({ "allowInternational": allowInternational, "recentSent": recentSent, "recentSince": recentSince, "recentRemains": recentRemains, "totalSent": totalSent, "totalSince": totalSince, "lastGiftSlug": lastGiftSlug, "termsUrl": termsUrl });
101
+ return new Status({
102
+ allowInternational: allowInternational,
103
+ recentSent: recentSent,
104
+ recentSince: recentSince,
105
+ recentRemains: recentRemains,
106
+ totalSent: totalSent,
107
+ totalSince: totalSince,
108
+ lastGiftSlug: lastGiftSlug,
109
+ termsUrl: termsUrl,
110
+ });
93
111
  }
94
112
  /**
95
- * Generate buffer from TLObject.
96
- */
113
+ * Generate buffer from TLObject.
114
+ */
97
115
  write() {
98
116
  const b = new BytesIO();
99
117
  b.write(Primitive.Int.write(this.constructorId, false));
100
118
  // @ts-ignore
101
119
  let flags = 0;
102
- flags |= this.allowInternational ? (1 << 0) : 0;
103
- flags |= this.lastGiftSlug !== undefined ? (1 << 1) : 0;
104
- b.write((Primitive.Int.write(flags)));
120
+ flags |= this.allowInternational ? 1 << 0 : 0;
121
+ flags |= this.lastGiftSlug !== undefined ? 1 << 1 : 0;
122
+ b.write(Primitive.Int.write(flags));
105
123
  if (this.recentSent !== undefined) {
106
- b.write((Primitive.Int.write(this.recentSent)));
124
+ b.write(Primitive.Int.write(this.recentSent));
107
125
  }
108
126
  if (this.recentSince !== undefined) {
109
- b.write((Primitive.Int.write(this.recentSince)));
127
+ b.write(Primitive.Int.write(this.recentSince));
110
128
  }
111
129
  if (this.recentRemains !== undefined) {
112
- b.write((Primitive.Int.write(this.recentRemains)));
130
+ b.write(Primitive.Int.write(this.recentRemains));
113
131
  }
114
132
  if (this.totalSent !== undefined) {
115
- b.write((Primitive.Int.write(this.totalSent)));
133
+ b.write(Primitive.Int.write(this.totalSent));
116
134
  }
117
135
  if (this.totalSince !== undefined) {
118
- b.write((Primitive.Int.write(this.totalSince)));
136
+ b.write(Primitive.Int.write(this.totalSince));
119
137
  }
120
138
  if (this.lastGiftSlug !== undefined) {
121
- b.write((Primitive.String.write(this.lastGiftSlug)));
139
+ b.write(Primitive.String.write(this.lastGiftSlug));
122
140
  }
123
141
  if (this.termsUrl !== undefined) {
124
- b.write((Primitive.String.write(this.termsUrl)));
142
+ b.write(Primitive.String.write(this.termsUrl));
125
143
  }
126
144
  return b.buffer;
127
145
  }
@@ -130,23 +148,23 @@ export class IsEligibleToJoin extends TLObject {
130
148
  __response__;
131
149
  constructor() {
132
150
  super();
133
- this.classType = "functions";
134
- this.className = "smsjobs.IsEligibleToJoin";
151
+ this.classType = 'functions';
152
+ this.className = 'smsjobs.IsEligibleToJoin';
135
153
  this.constructorId = 0xedc39d0;
136
154
  this.subclassOfId = 0x5eb760a6;
137
155
  this._slots = [];
138
156
  }
139
157
  /**
140
- * Generate the TLObject from buffer.
141
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
142
- */
158
+ * Generate the TLObject from buffer.
159
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
160
+ */
143
161
  static async read(_data, ..._args) {
144
162
  // no flags
145
163
  return new IsEligibleToJoin();
146
164
  }
147
165
  /**
148
- * Generate buffer from TLObject.
149
- */
166
+ * Generate buffer from TLObject.
167
+ */
150
168
  write() {
151
169
  const b = new BytesIO();
152
170
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -158,23 +176,23 @@ export class Join extends TLObject {
158
176
  __response__;
159
177
  constructor() {
160
178
  super();
161
- this.classType = "functions";
162
- this.className = "smsjobs.Join";
179
+ this.classType = 'functions';
180
+ this.className = 'smsjobs.Join';
163
181
  this.constructorId = 0xa74ece2d;
164
182
  this.subclassOfId = 0xf5b399ac;
165
183
  this._slots = [];
166
184
  }
167
185
  /**
168
- * Generate the TLObject from buffer.
169
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
170
- */
186
+ * Generate the TLObject from buffer.
187
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
188
+ */
171
189
  static async read(_data, ..._args) {
172
190
  // no flags
173
191
  return new Join();
174
192
  }
175
193
  /**
176
- * Generate buffer from TLObject.
177
- */
194
+ * Generate buffer from TLObject.
195
+ */
178
196
  write() {
179
197
  const b = new BytesIO();
180
198
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -186,23 +204,23 @@ export class Leave extends TLObject {
186
204
  __response__;
187
205
  constructor() {
188
206
  super();
189
- this.classType = "functions";
190
- this.className = "smsjobs.Leave";
207
+ this.classType = 'functions';
208
+ this.className = 'smsjobs.Leave';
191
209
  this.constructorId = 0x9898ad73;
192
210
  this.subclassOfId = 0xf5b399ac;
193
211
  this._slots = [];
194
212
  }
195
213
  /**
196
- * Generate the TLObject from buffer.
197
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
198
- */
214
+ * Generate the TLObject from buffer.
215
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
216
+ */
199
217
  static async read(_data, ..._args) {
200
218
  // no flags
201
219
  return new Leave();
202
220
  }
203
221
  /**
204
- * Generate buffer from TLObject.
205
- */
222
+ * Generate buffer from TLObject.
223
+ */
206
224
  write() {
207
225
  const b = new BytesIO();
208
226
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -215,33 +233,33 @@ export class UpdateSettings extends TLObject {
215
233
  allowInternational;
216
234
  constructor(params) {
217
235
  super();
218
- this.classType = "functions";
219
- this.className = "smsjobs.UpdateSettings";
236
+ this.classType = 'functions';
237
+ this.className = 'smsjobs.UpdateSettings';
220
238
  this.constructorId = 0x93fa0bf;
221
239
  this.subclassOfId = 0xf5b399ac;
222
- this._slots = ["allowInternational"];
240
+ this._slots = ['allowInternational'];
223
241
  this.allowInternational = params.allowInternational;
224
242
  }
225
243
  /**
226
- * Generate the TLObject from buffer.
227
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
228
- */
244
+ * Generate the TLObject from buffer.
245
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
246
+ */
229
247
  static async read(_data, ..._args) {
230
248
  // @ts-ignore
231
249
  let flags = await Primitive.Int.read(_data);
232
- let allowInternational = (flags & (1 << 0)) ? true : false;
233
- return new UpdateSettings({ "allowInternational": allowInternational });
250
+ let allowInternational = flags & (1 << 0) ? true : false;
251
+ return new UpdateSettings({ allowInternational: allowInternational });
234
252
  }
235
253
  /**
236
- * Generate buffer from TLObject.
237
- */
254
+ * Generate buffer from TLObject.
255
+ */
238
256
  write() {
239
257
  const b = new BytesIO();
240
258
  b.write(Primitive.Int.write(this.constructorId, false));
241
259
  // @ts-ignore
242
260
  let flags = 0;
243
- flags |= this.allowInternational ? (1 << 0) : 0;
244
- b.write((Primitive.Int.write(flags)));
261
+ flags |= this.allowInternational ? 1 << 0 : 0;
262
+ b.write(Primitive.Int.write(flags));
245
263
  return b.buffer;
246
264
  }
247
265
  }
@@ -249,23 +267,23 @@ export class GetStatus extends TLObject {
249
267
  __response__;
250
268
  constructor() {
251
269
  super();
252
- this.classType = "functions";
253
- this.className = "smsjobs.GetStatus";
270
+ this.classType = 'functions';
271
+ this.className = 'smsjobs.GetStatus';
254
272
  this.constructorId = 0x10a698e8;
255
273
  this.subclassOfId = 0xcd8f2b25;
256
274
  this._slots = [];
257
275
  }
258
276
  /**
259
- * Generate the TLObject from buffer.
260
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
261
- */
277
+ * Generate the TLObject from buffer.
278
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
279
+ */
262
280
  static async read(_data, ..._args) {
263
281
  // no flags
264
282
  return new GetStatus();
265
283
  }
266
284
  /**
267
- * Generate buffer from TLObject.
268
- */
285
+ * Generate buffer from TLObject.
286
+ */
269
287
  write() {
270
288
  const b = new BytesIO();
271
289
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -278,31 +296,31 @@ export class GetSmsJob extends TLObject {
278
296
  jobId;
279
297
  constructor(params) {
280
298
  super();
281
- this.classType = "functions";
282
- this.className = "smsjobs.GetSmsJob";
299
+ this.classType = 'functions';
300
+ this.className = 'smsjobs.GetSmsJob';
283
301
  this.constructorId = 0x778d902f;
284
302
  this.subclassOfId = 0x1f24187e;
285
- this._slots = ["jobId"];
303
+ this._slots = ['jobId'];
286
304
  this.jobId = params.jobId;
287
305
  }
288
306
  /**
289
- * Generate the TLObject from buffer.
290
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
291
- */
307
+ * Generate the TLObject from buffer.
308
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
309
+ */
292
310
  static async read(_data, ..._args) {
293
311
  // no flags
294
312
  let jobId = await Primitive.String.read(_data);
295
- return new GetSmsJob({ "jobId": jobId });
313
+ return new GetSmsJob({ jobId: jobId });
296
314
  }
297
315
  /**
298
- * Generate buffer from TLObject.
299
- */
316
+ * Generate buffer from TLObject.
317
+ */
300
318
  write() {
301
319
  const b = new BytesIO();
302
320
  b.write(Primitive.Int.write(this.constructorId, false));
303
321
  // no flags
304
322
  if (this.jobId !== undefined) {
305
- b.write((Primitive.String.write(this.jobId)));
323
+ b.write(Primitive.String.write(this.jobId));
306
324
  }
307
325
  return b.buffer;
308
326
  }
@@ -313,40 +331,40 @@ export class FinishJob extends TLObject {
313
331
  error;
314
332
  constructor(params) {
315
333
  super();
316
- this.classType = "functions";
317
- this.className = "smsjobs.FinishJob";
334
+ this.classType = 'functions';
335
+ this.className = 'smsjobs.FinishJob';
318
336
  this.constructorId = 0x4f1ebf24;
319
337
  this.subclassOfId = 0xf5b399ac;
320
- this._slots = ["jobId", "error"];
338
+ this._slots = ['jobId', 'error'];
321
339
  this.jobId = params.jobId;
322
340
  this.error = params.error;
323
341
  }
324
342
  /**
325
- * Generate the TLObject from buffer.
326
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
327
- */
343
+ * Generate the TLObject from buffer.
344
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
345
+ */
328
346
  static async read(_data, ..._args) {
329
347
  // @ts-ignore
330
348
  let flags = await Primitive.Int.read(_data);
331
349
  let jobId = await Primitive.String.read(_data);
332
- let error = (flags & (1 << 0)) ? await Primitive.String.read(_data) : undefined;
333
- return new FinishJob({ "jobId": jobId, "error": error });
350
+ let error = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
351
+ return new FinishJob({ jobId: jobId, error: error });
334
352
  }
335
353
  /**
336
- * Generate buffer from TLObject.
337
- */
354
+ * Generate buffer from TLObject.
355
+ */
338
356
  write() {
339
357
  const b = new BytesIO();
340
358
  b.write(Primitive.Int.write(this.constructorId, false));
341
359
  // @ts-ignore
342
360
  let flags = 0;
343
- flags |= this.error !== undefined ? (1 << 0) : 0;
344
- b.write((Primitive.Int.write(flags)));
361
+ flags |= this.error !== undefined ? 1 << 0 : 0;
362
+ b.write(Primitive.Int.write(flags));
345
363
  if (this.jobId !== undefined) {
346
- b.write((Primitive.String.write(this.jobId)));
364
+ b.write(Primitive.String.write(this.jobId));
347
365
  }
348
366
  if (this.error !== undefined) {
349
- b.write((Primitive.String.write(this.error)));
367
+ b.write(Primitive.String.write(this.error));
350
368
  }
351
369
  return b.buffer;
352
370
  }