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