@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.
- package/dist/src/deps.d.ts +4 -3
- package/dist/src/deps.js +4 -4
- package/dist/src/raw/class/All.d.ts +1 -1
- package/dist/src/raw/class/All.js +2783 -2783
- package/dist/src/raw/class/Raw.d.ts +7601 -7601
- package/dist/src/raw/class/Raw.js +26781 -20676
- package/dist/src/raw/class/tl/account.d.ts +841 -841
- package/dist/src/raw/class/tl/account.js +1983 -1813
- package/dist/src/raw/class/tl/aicompose.d.ts +51 -51
- package/dist/src/raw/class/tl/aicompose.js +128 -117
- package/dist/src/raw/class/tl/auth.d.ts +296 -296
- package/dist/src/raw/class/tl/auth.js +849 -714
- package/dist/src/raw/class/tl/bots.d.ts +256 -256
- package/dist/src/raw/class/tl/bots.js +661 -607
- package/dist/src/raw/class/tl/channels.d.ts +336 -336
- package/dist/src/raw/class/tl/channels.js +836 -745
- package/dist/src/raw/class/tl/chatlists.d.ts +81 -81
- package/dist/src/raw/class/tl/chatlists.js +196 -183
- package/dist/src/raw/class/tl/communities.d.ts +56 -56
- package/dist/src/raw/class/tl/communities.js +159 -138
- package/dist/src/raw/class/tl/contacts.d.ts +216 -216
- package/dist/src/raw/class/tl/contacts.js +537 -492
- package/dist/src/raw/class/tl/ephemeral.d.ts +51 -51
- package/dist/src/raw/class/tl/ephemeral.js +204 -152
- package/dist/src/raw/class/tl/feed.d.ts +71 -71
- package/dist/src/raw/class/tl/feed.js +214 -179
- package/dist/src/raw/class/tl/folders.d.ts +6 -6
- package/dist/src/raw/class/tl/folders.js +11 -11
- package/dist/src/raw/class/tl/fragment.d.ts +11 -11
- package/dist/src/raw/class/tl/fragment.js +32 -25
- package/dist/src/raw/class/tl/help.d.ts +286 -286
- package/dist/src/raw/class/tl/help.js +686 -618
- package/dist/src/raw/class/tl/langpack.d.ts +26 -26
- package/dist/src/raw/class/tl/langpack.js +57 -57
- package/dist/src/raw/class/tl/messages.d.ts +1866 -1866
- package/dist/src/raw/class/tl/messages.js +5965 -4886
- package/dist/src/raw/class/tl/payments.d.ts +646 -646
- package/dist/src/raw/class/tl/payments.js +2254 -1766
- package/dist/src/raw/class/tl/phone.d.ts +256 -256
- package/dist/src/raw/class/tl/phone.js +779 -644
- package/dist/src/raw/class/tl/photos.d.ts +41 -41
- package/dist/src/raw/class/tl/photos.js +139 -116
- package/dist/src/raw/class/tl/premium.d.ts +41 -41
- package/dist/src/raw/class/tl/premium.js +133 -111
- package/dist/src/raw/class/tl/smsjobs.d.ts +46 -46
- package/dist/src/raw/class/tl/smsjobs.js +115 -97
- package/dist/src/raw/class/tl/stats.d.ts +71 -71
- package/dist/src/raw/class/tl/stats.js +268 -169
- package/dist/src/raw/class/tl/stickers.d.ts +61 -61
- package/dist/src/raw/class/tl/stickers.js +173 -144
- package/dist/src/raw/class/tl/storage.d.ts +51 -51
- package/dist/src/raw/class/tl/storage.js +71 -71
- package/dist/src/raw/class/tl/stories.d.ts +221 -221
- package/dist/src/raw/class/tl/stories.js +781 -622
- package/dist/src/raw/class/tl/toncenter.d.ts +21 -21
- package/dist/src/raw/class/tl/toncenter.js +52 -47
- package/dist/src/raw/class/tl/updates.d.ts +56 -56
- package/dist/src/raw/class/tl/updates.js +246 -175
- package/dist/src/raw/class/tl/upload.d.ts +66 -66
- package/dist/src/raw/class/tl/upload.js +178 -155
- package/dist/src/raw/class/tl/users.d.ts +61 -61
- package/dist/src/raw/class/tl/users.js +124 -124
- package/dist/src/raw/class/tl/wallet.d.ts +221 -221
- package/dist/src/raw/class/tl/wallet.js +624 -558
- package/dist/src/raw/class/types.d.ts +1 -1
- package/dist/src/raw/class/types.js +1 -1
- 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
|
// 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';
|
|
@@ -18,11 +18,11 @@ export class PeerLinkRequests extends TLObject {
|
|
|
18
18
|
users;
|
|
19
19
|
constructor(params) {
|
|
20
20
|
super();
|
|
21
|
-
this.classType =
|
|
22
|
-
this.className =
|
|
21
|
+
this.classType = 'types';
|
|
22
|
+
this.className = 'communities.PeerLinkRequests';
|
|
23
23
|
this.constructorId = 0x2244afad;
|
|
24
24
|
this.subclassOfId = 0x43aa06ef;
|
|
25
|
-
this._slots = [
|
|
25
|
+
this._slots = ['totalCount', 'requests', 'nextOffset', 'chats', 'users'];
|
|
26
26
|
this.totalCount = params.totalCount;
|
|
27
27
|
this.requests = params.requests;
|
|
28
28
|
this.nextOffset = params.nextOffset;
|
|
@@ -30,43 +30,49 @@ export class PeerLinkRequests extends TLObject {
|
|
|
30
30
|
this.users = params.users;
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
* Generate the TLObject from buffer.
|
|
34
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
35
|
+
*/
|
|
36
36
|
static async read(_data, ..._args) {
|
|
37
37
|
// @ts-ignore
|
|
38
38
|
let flags = await Primitive.Int.read(_data);
|
|
39
39
|
let totalCount = await Primitive.Int.read(_data);
|
|
40
40
|
let requests = await TLObject.read(_data);
|
|
41
|
-
let nextOffset =
|
|
41
|
+
let nextOffset = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
|
|
42
42
|
let chats = await TLObject.read(_data);
|
|
43
43
|
let users = await TLObject.read(_data);
|
|
44
|
-
return new PeerLinkRequests({
|
|
44
|
+
return new PeerLinkRequests({
|
|
45
|
+
totalCount: totalCount,
|
|
46
|
+
requests: requests,
|
|
47
|
+
nextOffset: nextOffset,
|
|
48
|
+
chats: chats,
|
|
49
|
+
users: users,
|
|
50
|
+
});
|
|
45
51
|
}
|
|
46
52
|
/**
|
|
47
|
-
|
|
48
|
-
|
|
53
|
+
* Generate buffer from TLObject.
|
|
54
|
+
*/
|
|
49
55
|
write() {
|
|
50
56
|
const b = new BytesIO();
|
|
51
57
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
52
58
|
// @ts-ignore
|
|
53
59
|
let flags = 0;
|
|
54
|
-
flags |= this.nextOffset !== undefined ?
|
|
55
|
-
b.write(
|
|
60
|
+
flags |= this.nextOffset !== undefined ? 1 << 0 : 0;
|
|
61
|
+
b.write(Primitive.Int.write(flags));
|
|
56
62
|
if (this.totalCount !== undefined) {
|
|
57
|
-
b.write(
|
|
63
|
+
b.write(Primitive.Int.write(this.totalCount));
|
|
58
64
|
}
|
|
59
65
|
if (this.requests) {
|
|
60
|
-
b.write(
|
|
66
|
+
b.write(Primitive.Vector.write(this.requests));
|
|
61
67
|
}
|
|
62
68
|
if (this.nextOffset !== undefined) {
|
|
63
|
-
b.write(
|
|
69
|
+
b.write(Primitive.String.write(this.nextOffset));
|
|
64
70
|
}
|
|
65
71
|
if (this.chats) {
|
|
66
|
-
b.write(
|
|
72
|
+
b.write(Primitive.Vector.write(this.chats));
|
|
67
73
|
}
|
|
68
74
|
if (this.users) {
|
|
69
|
-
b.write(
|
|
75
|
+
b.write(Primitive.Vector.write(this.users));
|
|
70
76
|
}
|
|
71
77
|
return b.buffer;
|
|
72
78
|
}
|
|
@@ -78,46 +84,51 @@ export class ParticipantJoinedChats extends TLObject {
|
|
|
78
84
|
users;
|
|
79
85
|
constructor(params) {
|
|
80
86
|
super();
|
|
81
|
-
this.classType =
|
|
82
|
-
this.className =
|
|
87
|
+
this.classType = 'types';
|
|
88
|
+
this.className = 'communities.ParticipantJoinedChats';
|
|
83
89
|
this.constructorId = 0x8d78512a;
|
|
84
90
|
this.subclassOfId = 0x86dab595;
|
|
85
|
-
this._slots = [
|
|
91
|
+
this._slots = ['creatorChatIds', 'joinedChatIds', 'chats', 'users'];
|
|
86
92
|
this.creatorChatIds = params.creatorChatIds;
|
|
87
93
|
this.joinedChatIds = params.joinedChatIds;
|
|
88
94
|
this.chats = params.chats;
|
|
89
95
|
this.users = params.users;
|
|
90
96
|
}
|
|
91
97
|
/**
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
98
|
+
* Generate the TLObject from buffer.
|
|
99
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
100
|
+
*/
|
|
95
101
|
static async read(_data, ..._args) {
|
|
96
102
|
// no flags
|
|
97
103
|
let creatorChatIds = await TLObject.read(_data, Primitive.Long);
|
|
98
104
|
let joinedChatIds = await TLObject.read(_data, Primitive.Long);
|
|
99
105
|
let chats = await TLObject.read(_data);
|
|
100
106
|
let users = await TLObject.read(_data);
|
|
101
|
-
return new ParticipantJoinedChats({
|
|
107
|
+
return new ParticipantJoinedChats({
|
|
108
|
+
creatorChatIds: creatorChatIds,
|
|
109
|
+
joinedChatIds: joinedChatIds,
|
|
110
|
+
chats: chats,
|
|
111
|
+
users: users,
|
|
112
|
+
});
|
|
102
113
|
}
|
|
103
114
|
/**
|
|
104
|
-
|
|
105
|
-
|
|
115
|
+
* Generate buffer from TLObject.
|
|
116
|
+
*/
|
|
106
117
|
write() {
|
|
107
118
|
const b = new BytesIO();
|
|
108
119
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
109
120
|
// no flags
|
|
110
121
|
if (this.creatorChatIds) {
|
|
111
|
-
b.write(
|
|
122
|
+
b.write(Primitive.Vector.write(this.creatorChatIds, Primitive.Long));
|
|
112
123
|
}
|
|
113
124
|
if (this.joinedChatIds) {
|
|
114
|
-
b.write(
|
|
125
|
+
b.write(Primitive.Vector.write(this.joinedChatIds, Primitive.Long));
|
|
115
126
|
}
|
|
116
127
|
if (this.chats) {
|
|
117
|
-
b.write(
|
|
128
|
+
b.write(Primitive.Vector.write(this.chats));
|
|
118
129
|
}
|
|
119
130
|
if (this.users) {
|
|
120
|
-
b.write(
|
|
131
|
+
b.write(Primitive.Vector.write(this.users));
|
|
121
132
|
}
|
|
122
133
|
return b.buffer;
|
|
123
134
|
}
|
|
@@ -130,45 +141,45 @@ export class Create extends TLObject {
|
|
|
130
141
|
peer;
|
|
131
142
|
constructor(params) {
|
|
132
143
|
super();
|
|
133
|
-
this.classType =
|
|
134
|
-
this.className =
|
|
144
|
+
this.classType = 'functions';
|
|
145
|
+
this.className = 'communities.Create';
|
|
135
146
|
this.constructorId = 0xa63859ec;
|
|
136
147
|
this.subclassOfId = 0x8af52aac;
|
|
137
|
-
this._slots = [
|
|
148
|
+
this._slots = ['hidden', 'title', 'about', 'peer'];
|
|
138
149
|
this.hidden = params.hidden;
|
|
139
150
|
this.title = params.title;
|
|
140
151
|
this.about = params.about;
|
|
141
152
|
this.peer = params.peer;
|
|
142
153
|
}
|
|
143
154
|
/**
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
155
|
+
* Generate the TLObject from buffer.
|
|
156
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
157
|
+
*/
|
|
147
158
|
static async read(_data, ..._args) {
|
|
148
159
|
// @ts-ignore
|
|
149
160
|
let flags = await Primitive.Int.read(_data);
|
|
150
|
-
let hidden =
|
|
161
|
+
let hidden = flags & (1 << 1) ? true : false;
|
|
151
162
|
let title = await Primitive.String.read(_data);
|
|
152
|
-
let about =
|
|
163
|
+
let about = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
|
|
153
164
|
let peer = await TLObject.read(_data);
|
|
154
|
-
return new Create({
|
|
165
|
+
return new Create({ hidden: hidden, title: title, about: about, peer: peer });
|
|
155
166
|
}
|
|
156
167
|
/**
|
|
157
|
-
|
|
158
|
-
|
|
168
|
+
* Generate buffer from TLObject.
|
|
169
|
+
*/
|
|
159
170
|
write() {
|
|
160
171
|
const b = new BytesIO();
|
|
161
172
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
162
173
|
// @ts-ignore
|
|
163
174
|
let flags = 0;
|
|
164
|
-
flags |= this.hidden ?
|
|
165
|
-
flags |= this.about !== undefined ?
|
|
166
|
-
b.write(
|
|
175
|
+
flags |= this.hidden ? 1 << 1 : 0;
|
|
176
|
+
flags |= this.about !== undefined ? 1 << 0 : 0;
|
|
177
|
+
b.write(Primitive.Int.write(flags));
|
|
167
178
|
if (this.title !== undefined) {
|
|
168
|
-
b.write(
|
|
179
|
+
b.write(Primitive.String.write(this.title));
|
|
169
180
|
}
|
|
170
181
|
if (this.about !== undefined) {
|
|
171
|
-
b.write(
|
|
182
|
+
b.write(Primitive.String.write(this.about));
|
|
172
183
|
}
|
|
173
184
|
if (this.peer !== undefined) {
|
|
174
185
|
b.write(this.peer.write());
|
|
@@ -185,11 +196,11 @@ export class TogglePeerLink extends TLObject {
|
|
|
185
196
|
peer;
|
|
186
197
|
constructor(params) {
|
|
187
198
|
super();
|
|
188
|
-
this.classType =
|
|
189
|
-
this.className =
|
|
199
|
+
this.classType = 'functions';
|
|
200
|
+
this.className = 'communities.TogglePeerLink';
|
|
190
201
|
this.constructorId = 0x736dcfea;
|
|
191
202
|
this.subclassOfId = 0xf5b399ac;
|
|
192
|
-
this._slots = [
|
|
203
|
+
this._slots = ['visible', 'hidden', 'deleted', 'community', 'peer'];
|
|
193
204
|
this.visible = params.visible;
|
|
194
205
|
this.hidden = params.hidden;
|
|
195
206
|
this.deleted = params.deleted;
|
|
@@ -197,31 +208,37 @@ export class TogglePeerLink extends TLObject {
|
|
|
197
208
|
this.peer = params.peer;
|
|
198
209
|
}
|
|
199
210
|
/**
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
211
|
+
* Generate the TLObject from buffer.
|
|
212
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
213
|
+
*/
|
|
203
214
|
static async read(_data, ..._args) {
|
|
204
215
|
// @ts-ignore
|
|
205
216
|
let flags = await Primitive.Int.read(_data);
|
|
206
|
-
let visible =
|
|
207
|
-
let hidden =
|
|
208
|
-
let deleted =
|
|
217
|
+
let visible = flags & (1 << 0) ? true : false;
|
|
218
|
+
let hidden = flags & (1 << 1) ? true : false;
|
|
219
|
+
let deleted = flags & (1 << 2) ? true : false;
|
|
209
220
|
let community = await TLObject.read(_data);
|
|
210
221
|
let peer = await TLObject.read(_data);
|
|
211
|
-
return new TogglePeerLink({
|
|
222
|
+
return new TogglePeerLink({
|
|
223
|
+
visible: visible,
|
|
224
|
+
hidden: hidden,
|
|
225
|
+
deleted: deleted,
|
|
226
|
+
community: community,
|
|
227
|
+
peer: peer,
|
|
228
|
+
});
|
|
212
229
|
}
|
|
213
230
|
/**
|
|
214
|
-
|
|
215
|
-
|
|
231
|
+
* Generate buffer from TLObject.
|
|
232
|
+
*/
|
|
216
233
|
write() {
|
|
217
234
|
const b = new BytesIO();
|
|
218
235
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
219
236
|
// @ts-ignore
|
|
220
237
|
let flags = 0;
|
|
221
|
-
flags |= this.visible ?
|
|
222
|
-
flags |= this.hidden ?
|
|
223
|
-
flags |= this.deleted ?
|
|
224
|
-
b.write(
|
|
238
|
+
flags |= this.visible ? 1 << 0 : 0;
|
|
239
|
+
flags |= this.hidden ? 1 << 1 : 0;
|
|
240
|
+
flags |= this.deleted ? 1 << 2 : 0;
|
|
241
|
+
b.write(Primitive.Int.write(flags));
|
|
225
242
|
if (this.community !== undefined) {
|
|
226
243
|
b.write(this.community.write());
|
|
227
244
|
}
|
|
@@ -235,23 +252,23 @@ export class GetJoinedCommunities extends TLObject {
|
|
|
235
252
|
__response__;
|
|
236
253
|
constructor() {
|
|
237
254
|
super();
|
|
238
|
-
this.classType =
|
|
239
|
-
this.className =
|
|
255
|
+
this.classType = 'functions';
|
|
256
|
+
this.className = 'communities.GetJoinedCommunities';
|
|
240
257
|
this.constructorId = 0xa663e830;
|
|
241
258
|
this.subclassOfId = 0x99d5cb14;
|
|
242
259
|
this._slots = [];
|
|
243
260
|
}
|
|
244
261
|
/**
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
262
|
+
* Generate the TLObject from buffer.
|
|
263
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
264
|
+
*/
|
|
248
265
|
static async read(_data, ..._args) {
|
|
249
266
|
// no flags
|
|
250
267
|
return new GetJoinedCommunities();
|
|
251
268
|
}
|
|
252
269
|
/**
|
|
253
|
-
|
|
254
|
-
|
|
270
|
+
* Generate buffer from TLObject.
|
|
271
|
+
*/
|
|
255
272
|
write() {
|
|
256
273
|
const b = new BytesIO();
|
|
257
274
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -265,35 +282,35 @@ export class ToggleCommunityCollapsedInDialogs extends TLObject {
|
|
|
265
282
|
community;
|
|
266
283
|
constructor(params) {
|
|
267
284
|
super();
|
|
268
|
-
this.classType =
|
|
269
|
-
this.className =
|
|
285
|
+
this.classType = 'functions';
|
|
286
|
+
this.className = 'communities.ToggleCommunityCollapsedInDialogs';
|
|
270
287
|
this.constructorId = 0xd766e3ea;
|
|
271
288
|
this.subclassOfId = 0x8af52aac;
|
|
272
|
-
this._slots = [
|
|
289
|
+
this._slots = ['collapsed', 'community'];
|
|
273
290
|
this.collapsed = params.collapsed;
|
|
274
291
|
this.community = params.community;
|
|
275
292
|
}
|
|
276
293
|
/**
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
294
|
+
* Generate the TLObject from buffer.
|
|
295
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
296
|
+
*/
|
|
280
297
|
static async read(_data, ..._args) {
|
|
281
298
|
// @ts-ignore
|
|
282
299
|
let flags = await Primitive.Int.read(_data);
|
|
283
|
-
let collapsed =
|
|
300
|
+
let collapsed = flags & (1 << 0) ? true : false;
|
|
284
301
|
let community = await TLObject.read(_data);
|
|
285
|
-
return new ToggleCommunityCollapsedInDialogs({
|
|
302
|
+
return new ToggleCommunityCollapsedInDialogs({ collapsed: collapsed, community: community });
|
|
286
303
|
}
|
|
287
304
|
/**
|
|
288
|
-
|
|
289
|
-
|
|
305
|
+
* Generate buffer from TLObject.
|
|
306
|
+
*/
|
|
290
307
|
write() {
|
|
291
308
|
const b = new BytesIO();
|
|
292
309
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
293
310
|
// @ts-ignore
|
|
294
311
|
let flags = 0;
|
|
295
|
-
flags |= this.collapsed ?
|
|
296
|
-
b.write(
|
|
312
|
+
flags |= this.collapsed ? 1 << 0 : 0;
|
|
313
|
+
b.write(Primitive.Int.write(flags));
|
|
297
314
|
if (this.community !== undefined) {
|
|
298
315
|
b.write(this.community.write());
|
|
299
316
|
}
|
|
@@ -307,29 +324,29 @@ export class GetPeerLinkRequests extends TLObject {
|
|
|
307
324
|
limit;
|
|
308
325
|
constructor(params) {
|
|
309
326
|
super();
|
|
310
|
-
this.classType =
|
|
311
|
-
this.className =
|
|
327
|
+
this.classType = 'functions';
|
|
328
|
+
this.className = 'communities.GetPeerLinkRequests';
|
|
312
329
|
this.constructorId = 0x93773344;
|
|
313
330
|
this.subclassOfId = 0x43aa06ef;
|
|
314
|
-
this._slots = [
|
|
331
|
+
this._slots = ['community', 'offset', 'limit'];
|
|
315
332
|
this.community = params.community;
|
|
316
333
|
this.offset = params.offset;
|
|
317
334
|
this.limit = params.limit;
|
|
318
335
|
}
|
|
319
336
|
/**
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
337
|
+
* Generate the TLObject from buffer.
|
|
338
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
339
|
+
*/
|
|
323
340
|
static async read(_data, ..._args) {
|
|
324
341
|
// no flags
|
|
325
342
|
let community = await TLObject.read(_data);
|
|
326
343
|
let offset = await Primitive.String.read(_data);
|
|
327
344
|
let limit = await Primitive.Int.read(_data);
|
|
328
|
-
return new GetPeerLinkRequests({
|
|
345
|
+
return new GetPeerLinkRequests({ community: community, offset: offset, limit: limit });
|
|
329
346
|
}
|
|
330
347
|
/**
|
|
331
|
-
|
|
332
|
-
|
|
348
|
+
* Generate buffer from TLObject.
|
|
349
|
+
*/
|
|
333
350
|
write() {
|
|
334
351
|
const b = new BytesIO();
|
|
335
352
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -338,10 +355,10 @@ export class GetPeerLinkRequests extends TLObject {
|
|
|
338
355
|
b.write(this.community.write());
|
|
339
356
|
}
|
|
340
357
|
if (this.offset !== undefined) {
|
|
341
|
-
b.write(
|
|
358
|
+
b.write(Primitive.String.write(this.offset));
|
|
342
359
|
}
|
|
343
360
|
if (this.limit !== undefined) {
|
|
344
|
-
b.write(
|
|
361
|
+
b.write(Primitive.Int.write(this.limit));
|
|
345
362
|
}
|
|
346
363
|
return b.buffer;
|
|
347
364
|
}
|
|
@@ -353,37 +370,37 @@ export class TogglePeerLinkRequestApproval extends TLObject {
|
|
|
353
370
|
peer;
|
|
354
371
|
constructor(params) {
|
|
355
372
|
super();
|
|
356
|
-
this.classType =
|
|
357
|
-
this.className =
|
|
373
|
+
this.classType = 'functions';
|
|
374
|
+
this.className = 'communities.TogglePeerLinkRequestApproval';
|
|
358
375
|
this.constructorId = 0x8c8219a8;
|
|
359
376
|
this.subclassOfId = 0xf5b399ac;
|
|
360
|
-
this._slots = [
|
|
377
|
+
this._slots = ['reject', 'community', 'peer'];
|
|
361
378
|
this.reject = params.reject;
|
|
362
379
|
this.community = params.community;
|
|
363
380
|
this.peer = params.peer;
|
|
364
381
|
}
|
|
365
382
|
/**
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
383
|
+
* Generate the TLObject from buffer.
|
|
384
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
385
|
+
*/
|
|
369
386
|
static async read(_data, ..._args) {
|
|
370
387
|
// @ts-ignore
|
|
371
388
|
let flags = await Primitive.Int.read(_data);
|
|
372
|
-
let reject =
|
|
389
|
+
let reject = flags & (1 << 0) ? true : false;
|
|
373
390
|
let community = await TLObject.read(_data);
|
|
374
391
|
let peer = await TLObject.read(_data);
|
|
375
|
-
return new TogglePeerLinkRequestApproval({
|
|
392
|
+
return new TogglePeerLinkRequestApproval({ reject: reject, community: community, peer: peer });
|
|
376
393
|
}
|
|
377
394
|
/**
|
|
378
|
-
|
|
379
|
-
|
|
395
|
+
* Generate buffer from TLObject.
|
|
396
|
+
*/
|
|
380
397
|
write() {
|
|
381
398
|
const b = new BytesIO();
|
|
382
399
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
383
400
|
// @ts-ignore
|
|
384
401
|
let flags = 0;
|
|
385
|
-
flags |= this.reject ?
|
|
386
|
-
b.write(
|
|
402
|
+
flags |= this.reject ? 1 << 0 : 0;
|
|
403
|
+
b.write(Primitive.Int.write(flags));
|
|
387
404
|
if (this.community !== undefined) {
|
|
388
405
|
b.write(this.community.write());
|
|
389
406
|
}
|
|
@@ -399,35 +416,35 @@ export class ToggleAllPeerLinkRequestApproval extends TLObject {
|
|
|
399
416
|
community;
|
|
400
417
|
constructor(params) {
|
|
401
418
|
super();
|
|
402
|
-
this.classType =
|
|
403
|
-
this.className =
|
|
419
|
+
this.classType = 'functions';
|
|
420
|
+
this.className = 'communities.ToggleAllPeerLinkRequestApproval';
|
|
404
421
|
this.constructorId = 0xbfe3dd3d;
|
|
405
422
|
this.subclassOfId = 0xf5b399ac;
|
|
406
|
-
this._slots = [
|
|
423
|
+
this._slots = ['reject', 'community'];
|
|
407
424
|
this.reject = params.reject;
|
|
408
425
|
this.community = params.community;
|
|
409
426
|
}
|
|
410
427
|
/**
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
428
|
+
* Generate the TLObject from buffer.
|
|
429
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
430
|
+
*/
|
|
414
431
|
static async read(_data, ..._args) {
|
|
415
432
|
// @ts-ignore
|
|
416
433
|
let flags = await Primitive.Int.read(_data);
|
|
417
|
-
let reject =
|
|
434
|
+
let reject = flags & (1 << 0) ? true : false;
|
|
418
435
|
let community = await TLObject.read(_data);
|
|
419
|
-
return new ToggleAllPeerLinkRequestApproval({
|
|
436
|
+
return new ToggleAllPeerLinkRequestApproval({ reject: reject, community: community });
|
|
420
437
|
}
|
|
421
438
|
/**
|
|
422
|
-
|
|
423
|
-
|
|
439
|
+
* Generate buffer from TLObject.
|
|
440
|
+
*/
|
|
424
441
|
write() {
|
|
425
442
|
const b = new BytesIO();
|
|
426
443
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
427
444
|
// @ts-ignore
|
|
428
445
|
let flags = 0;
|
|
429
|
-
flags |= this.reject ?
|
|
430
|
-
b.write(
|
|
446
|
+
flags |= this.reject ? 1 << 0 : 0;
|
|
447
|
+
b.write(Primitive.Int.write(flags));
|
|
431
448
|
if (this.community !== undefined) {
|
|
432
449
|
b.write(this.community.write());
|
|
433
450
|
}
|
|
@@ -441,37 +458,41 @@ export class ToggleParticipantBanned extends TLObject {
|
|
|
441
458
|
participant;
|
|
442
459
|
constructor(params) {
|
|
443
460
|
super();
|
|
444
|
-
this.classType =
|
|
445
|
-
this.className =
|
|
461
|
+
this.classType = 'functions';
|
|
462
|
+
this.className = 'communities.ToggleParticipantBanned';
|
|
446
463
|
this.constructorId = 0x9967ad0f;
|
|
447
464
|
this.subclassOfId = 0xf5b399ac;
|
|
448
|
-
this._slots = [
|
|
465
|
+
this._slots = ['unban', 'community', 'participant'];
|
|
449
466
|
this.unban = params.unban;
|
|
450
467
|
this.community = params.community;
|
|
451
468
|
this.participant = params.participant;
|
|
452
469
|
}
|
|
453
470
|
/**
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
471
|
+
* Generate the TLObject from buffer.
|
|
472
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
473
|
+
*/
|
|
457
474
|
static async read(_data, ..._args) {
|
|
458
475
|
// @ts-ignore
|
|
459
476
|
let flags = await Primitive.Int.read(_data);
|
|
460
|
-
let unban =
|
|
477
|
+
let unban = flags & (1 << 0) ? true : false;
|
|
461
478
|
let community = await TLObject.read(_data);
|
|
462
479
|
let participant = await TLObject.read(_data);
|
|
463
|
-
return new ToggleParticipantBanned({
|
|
480
|
+
return new ToggleParticipantBanned({
|
|
481
|
+
unban: unban,
|
|
482
|
+
community: community,
|
|
483
|
+
participant: participant,
|
|
484
|
+
});
|
|
464
485
|
}
|
|
465
486
|
/**
|
|
466
|
-
|
|
467
|
-
|
|
487
|
+
* Generate buffer from TLObject.
|
|
488
|
+
*/
|
|
468
489
|
write() {
|
|
469
490
|
const b = new BytesIO();
|
|
470
491
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
471
492
|
// @ts-ignore
|
|
472
493
|
let flags = 0;
|
|
473
|
-
flags |= this.unban ?
|
|
474
|
-
b.write(
|
|
494
|
+
flags |= this.unban ? 1 << 0 : 0;
|
|
495
|
+
b.write(Primitive.Int.write(flags));
|
|
475
496
|
if (this.community !== undefined) {
|
|
476
497
|
b.write(this.community.write());
|
|
477
498
|
}
|
|
@@ -487,27 +508,27 @@ export class GetParticipantJoinedChats extends TLObject {
|
|
|
487
508
|
participant;
|
|
488
509
|
constructor(params) {
|
|
489
510
|
super();
|
|
490
|
-
this.classType =
|
|
491
|
-
this.className =
|
|
511
|
+
this.classType = 'functions';
|
|
512
|
+
this.className = 'communities.GetParticipantJoinedChats';
|
|
492
513
|
this.constructorId = 0xf87eabab;
|
|
493
514
|
this.subclassOfId = 0x86dab595;
|
|
494
|
-
this._slots = [
|
|
515
|
+
this._slots = ['community', 'participant'];
|
|
495
516
|
this.community = params.community;
|
|
496
517
|
this.participant = params.participant;
|
|
497
518
|
}
|
|
498
519
|
/**
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
520
|
+
* Generate the TLObject from buffer.
|
|
521
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
522
|
+
*/
|
|
502
523
|
static async read(_data, ..._args) {
|
|
503
524
|
// no flags
|
|
504
525
|
let community = await TLObject.read(_data);
|
|
505
526
|
let participant = await TLObject.read(_data);
|
|
506
|
-
return new GetParticipantJoinedChats({
|
|
527
|
+
return new GetParticipantJoinedChats({ community: community, participant: participant });
|
|
507
528
|
}
|
|
508
529
|
/**
|
|
509
|
-
|
|
510
|
-
|
|
530
|
+
* Generate buffer from TLObject.
|
|
531
|
+
*/
|
|
511
532
|
write() {
|
|
512
533
|
const b = new BytesIO();
|
|
513
534
|
b.write(Primitive.Int.write(this.constructorId, false));
|