@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
|
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
|
-
|
|
25
|
-
|
|
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
|
-
|
|
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
|
-
|
|
54
|
-
|
|
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
|
-
|
|
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
|
-
|
|
67
|
-
|
|
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
|
-
|
|
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
|
-
|
|
80
|
-
|
|
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
|
-
|
|
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
|
-
|
|
93
|
-
|
|
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
|
-
|
|
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
|
-
|
|
109
|
-
|
|
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
|
-
|
|
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
|
-
|
|
122
|
-
|
|
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
|
-
|
|
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
|
-
|
|
138
|
-
|
|
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
|
-
|
|
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
|
-
|
|
156
|
-
|
|
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
|
-
|
|
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 =
|
|
19
|
-
this.className =
|
|
18
|
+
this.classType = "types";
|
|
19
|
+
this.className = "smsjobs.EligibleToJoin";
|
|
20
20
|
this.constructorId = 0xdc8b44cf;
|
|
21
21
|
this.subclassOfId = 0x5eb760a6;
|
|
22
|
-
this._slots = [
|
|
22
|
+
this._slots = ["termsUrl", "monthlySentSms"];
|
|
23
23
|
this.termsUrl = params.termsUrl;
|
|
24
24
|
this.monthlySentSms = params.monthlySentSms;
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
|
-
|
|
28
|
-
|
|
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
|
-
|
|
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,20 +60,11 @@ export class Status extends TLObject {
|
|
|
60
60
|
termsUrl;
|
|
61
61
|
constructor(params) {
|
|
62
62
|
super();
|
|
63
|
-
this.classType =
|
|
64
|
-
this.className =
|
|
63
|
+
this.classType = "types";
|
|
64
|
+
this.className = "smsjobs.Status";
|
|
65
65
|
this.constructorId = 0x2aee9191;
|
|
66
66
|
this.subclassOfId = 0xcd8f2b25;
|
|
67
|
-
this._slots = [
|
|
68
|
-
'allowInternational',
|
|
69
|
-
'recentSent',
|
|
70
|
-
'recentSince',
|
|
71
|
-
'recentRemains',
|
|
72
|
-
'totalSent',
|
|
73
|
-
'totalSince',
|
|
74
|
-
'lastGiftSlug',
|
|
75
|
-
'termsUrl',
|
|
76
|
-
];
|
|
67
|
+
this._slots = ["allowInternational", "recentSent", "recentSince", "recentRemains", "totalSent", "totalSince", "lastGiftSlug", "termsUrl"];
|
|
77
68
|
this.allowInternational = params.allowInternational;
|
|
78
69
|
this.recentSent = params.recentSent;
|
|
79
70
|
this.recentSince = params.recentSince;
|
|
@@ -84,62 +75,53 @@ export class Status extends TLObject {
|
|
|
84
75
|
this.termsUrl = params.termsUrl;
|
|
85
76
|
}
|
|
86
77
|
/**
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
78
|
+
* Generate the TLObject from buffer.
|
|
79
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
80
|
+
*/
|
|
90
81
|
static async read(_data, ..._args) {
|
|
91
82
|
// @ts-ignore
|
|
92
83
|
let flags = await Primitive.Int.read(_data);
|
|
93
|
-
let allowInternational = flags & (1 << 0) ? true : false;
|
|
84
|
+
let allowInternational = (flags & (1 << 0)) ? true : false;
|
|
94
85
|
let recentSent = await Primitive.Int.read(_data);
|
|
95
86
|
let recentSince = await Primitive.Int.read(_data);
|
|
96
87
|
let recentRemains = await Primitive.Int.read(_data);
|
|
97
88
|
let totalSent = await Primitive.Int.read(_data);
|
|
98
89
|
let totalSince = await Primitive.Int.read(_data);
|
|
99
|
-
let lastGiftSlug = flags & (1 << 1) ? await Primitive.String.read(_data) : undefined;
|
|
90
|
+
let lastGiftSlug = (flags & (1 << 1)) ? await Primitive.String.read(_data) : undefined;
|
|
100
91
|
let termsUrl = await Primitive.String.read(_data);
|
|
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
|
-
});
|
|
92
|
+
return new Status({ "allowInternational": allowInternational, "recentSent": recentSent, "recentSince": recentSince, "recentRemains": recentRemains, "totalSent": totalSent, "totalSince": totalSince, "lastGiftSlug": lastGiftSlug, "termsUrl": termsUrl });
|
|
111
93
|
}
|
|
112
94
|
/**
|
|
113
|
-
|
|
114
|
-
|
|
95
|
+
* Generate buffer from TLObject.
|
|
96
|
+
*/
|
|
115
97
|
write() {
|
|
116
98
|
const b = new BytesIO();
|
|
117
99
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
118
100
|
// @ts-ignore
|
|
119
101
|
let flags = 0;
|
|
120
|
-
flags |= this.allowInternational ? 1 << 0 : 0;
|
|
121
|
-
flags |= this.lastGiftSlug !== undefined ? 1 << 1 : 0;
|
|
122
|
-
b.write(Primitive.Int.write(flags));
|
|
102
|
+
flags |= this.allowInternational ? (1 << 0) : 0;
|
|
103
|
+
flags |= this.lastGiftSlug !== undefined ? (1 << 1) : 0;
|
|
104
|
+
b.write((Primitive.Int.write(flags)));
|
|
123
105
|
if (this.recentSent !== undefined) {
|
|
124
|
-
b.write(Primitive.Int.write(this.recentSent));
|
|
106
|
+
b.write((Primitive.Int.write(this.recentSent)));
|
|
125
107
|
}
|
|
126
108
|
if (this.recentSince !== undefined) {
|
|
127
|
-
b.write(Primitive.Int.write(this.recentSince));
|
|
109
|
+
b.write((Primitive.Int.write(this.recentSince)));
|
|
128
110
|
}
|
|
129
111
|
if (this.recentRemains !== undefined) {
|
|
130
|
-
b.write(Primitive.Int.write(this.recentRemains));
|
|
112
|
+
b.write((Primitive.Int.write(this.recentRemains)));
|
|
131
113
|
}
|
|
132
114
|
if (this.totalSent !== undefined) {
|
|
133
|
-
b.write(Primitive.Int.write(this.totalSent));
|
|
115
|
+
b.write((Primitive.Int.write(this.totalSent)));
|
|
134
116
|
}
|
|
135
117
|
if (this.totalSince !== undefined) {
|
|
136
|
-
b.write(Primitive.Int.write(this.totalSince));
|
|
118
|
+
b.write((Primitive.Int.write(this.totalSince)));
|
|
137
119
|
}
|
|
138
120
|
if (this.lastGiftSlug !== undefined) {
|
|
139
|
-
b.write(Primitive.String.write(this.lastGiftSlug));
|
|
121
|
+
b.write((Primitive.String.write(this.lastGiftSlug)));
|
|
140
122
|
}
|
|
141
123
|
if (this.termsUrl !== undefined) {
|
|
142
|
-
b.write(Primitive.String.write(this.termsUrl));
|
|
124
|
+
b.write((Primitive.String.write(this.termsUrl)));
|
|
143
125
|
}
|
|
144
126
|
return b.buffer;
|
|
145
127
|
}
|
|
@@ -148,23 +130,23 @@ export class IsEligibleToJoin extends TLObject {
|
|
|
148
130
|
__response__;
|
|
149
131
|
constructor() {
|
|
150
132
|
super();
|
|
151
|
-
this.classType =
|
|
152
|
-
this.className =
|
|
133
|
+
this.classType = "functions";
|
|
134
|
+
this.className = "smsjobs.IsEligibleToJoin";
|
|
153
135
|
this.constructorId = 0xedc39d0;
|
|
154
136
|
this.subclassOfId = 0x5eb760a6;
|
|
155
137
|
this._slots = [];
|
|
156
138
|
}
|
|
157
139
|
/**
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
140
|
+
* Generate the TLObject from buffer.
|
|
141
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
142
|
+
*/
|
|
161
143
|
static async read(_data, ..._args) {
|
|
162
144
|
// no flags
|
|
163
145
|
return new IsEligibleToJoin();
|
|
164
146
|
}
|
|
165
147
|
/**
|
|
166
|
-
|
|
167
|
-
|
|
148
|
+
* Generate buffer from TLObject.
|
|
149
|
+
*/
|
|
168
150
|
write() {
|
|
169
151
|
const b = new BytesIO();
|
|
170
152
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -176,23 +158,23 @@ export class Join extends TLObject {
|
|
|
176
158
|
__response__;
|
|
177
159
|
constructor() {
|
|
178
160
|
super();
|
|
179
|
-
this.classType =
|
|
180
|
-
this.className =
|
|
161
|
+
this.classType = "functions";
|
|
162
|
+
this.className = "smsjobs.Join";
|
|
181
163
|
this.constructorId = 0xa74ece2d;
|
|
182
164
|
this.subclassOfId = 0xf5b399ac;
|
|
183
165
|
this._slots = [];
|
|
184
166
|
}
|
|
185
167
|
/**
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
168
|
+
* Generate the TLObject from buffer.
|
|
169
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
170
|
+
*/
|
|
189
171
|
static async read(_data, ..._args) {
|
|
190
172
|
// no flags
|
|
191
173
|
return new Join();
|
|
192
174
|
}
|
|
193
175
|
/**
|
|
194
|
-
|
|
195
|
-
|
|
176
|
+
* Generate buffer from TLObject.
|
|
177
|
+
*/
|
|
196
178
|
write() {
|
|
197
179
|
const b = new BytesIO();
|
|
198
180
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -204,23 +186,23 @@ export class Leave extends TLObject {
|
|
|
204
186
|
__response__;
|
|
205
187
|
constructor() {
|
|
206
188
|
super();
|
|
207
|
-
this.classType =
|
|
208
|
-
this.className =
|
|
189
|
+
this.classType = "functions";
|
|
190
|
+
this.className = "smsjobs.Leave";
|
|
209
191
|
this.constructorId = 0x9898ad73;
|
|
210
192
|
this.subclassOfId = 0xf5b399ac;
|
|
211
193
|
this._slots = [];
|
|
212
194
|
}
|
|
213
195
|
/**
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
196
|
+
* Generate the TLObject from buffer.
|
|
197
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
198
|
+
*/
|
|
217
199
|
static async read(_data, ..._args) {
|
|
218
200
|
// no flags
|
|
219
201
|
return new Leave();
|
|
220
202
|
}
|
|
221
203
|
/**
|
|
222
|
-
|
|
223
|
-
|
|
204
|
+
* Generate buffer from TLObject.
|
|
205
|
+
*/
|
|
224
206
|
write() {
|
|
225
207
|
const b = new BytesIO();
|
|
226
208
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -233,33 +215,33 @@ export class UpdateSettings extends TLObject {
|
|
|
233
215
|
allowInternational;
|
|
234
216
|
constructor(params) {
|
|
235
217
|
super();
|
|
236
|
-
this.classType =
|
|
237
|
-
this.className =
|
|
218
|
+
this.classType = "functions";
|
|
219
|
+
this.className = "smsjobs.UpdateSettings";
|
|
238
220
|
this.constructorId = 0x93fa0bf;
|
|
239
221
|
this.subclassOfId = 0xf5b399ac;
|
|
240
|
-
this._slots = [
|
|
222
|
+
this._slots = ["allowInternational"];
|
|
241
223
|
this.allowInternational = params.allowInternational;
|
|
242
224
|
}
|
|
243
225
|
/**
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
226
|
+
* Generate the TLObject from buffer.
|
|
227
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
228
|
+
*/
|
|
247
229
|
static async read(_data, ..._args) {
|
|
248
230
|
// @ts-ignore
|
|
249
231
|
let flags = await Primitive.Int.read(_data);
|
|
250
|
-
let allowInternational = flags & (1 << 0) ? true : false;
|
|
251
|
-
return new UpdateSettings({ allowInternational: allowInternational });
|
|
232
|
+
let allowInternational = (flags & (1 << 0)) ? true : false;
|
|
233
|
+
return new UpdateSettings({ "allowInternational": allowInternational });
|
|
252
234
|
}
|
|
253
235
|
/**
|
|
254
|
-
|
|
255
|
-
|
|
236
|
+
* Generate buffer from TLObject.
|
|
237
|
+
*/
|
|
256
238
|
write() {
|
|
257
239
|
const b = new BytesIO();
|
|
258
240
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
259
241
|
// @ts-ignore
|
|
260
242
|
let flags = 0;
|
|
261
|
-
flags |= this.allowInternational ? 1 << 0 : 0;
|
|
262
|
-
b.write(Primitive.Int.write(flags));
|
|
243
|
+
flags |= this.allowInternational ? (1 << 0) : 0;
|
|
244
|
+
b.write((Primitive.Int.write(flags)));
|
|
263
245
|
return b.buffer;
|
|
264
246
|
}
|
|
265
247
|
}
|
|
@@ -267,23 +249,23 @@ export class GetStatus extends TLObject {
|
|
|
267
249
|
__response__;
|
|
268
250
|
constructor() {
|
|
269
251
|
super();
|
|
270
|
-
this.classType =
|
|
271
|
-
this.className =
|
|
252
|
+
this.classType = "functions";
|
|
253
|
+
this.className = "smsjobs.GetStatus";
|
|
272
254
|
this.constructorId = 0x10a698e8;
|
|
273
255
|
this.subclassOfId = 0xcd8f2b25;
|
|
274
256
|
this._slots = [];
|
|
275
257
|
}
|
|
276
258
|
/**
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
259
|
+
* Generate the TLObject from buffer.
|
|
260
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
261
|
+
*/
|
|
280
262
|
static async read(_data, ..._args) {
|
|
281
263
|
// no flags
|
|
282
264
|
return new GetStatus();
|
|
283
265
|
}
|
|
284
266
|
/**
|
|
285
|
-
|
|
286
|
-
|
|
267
|
+
* Generate buffer from TLObject.
|
|
268
|
+
*/
|
|
287
269
|
write() {
|
|
288
270
|
const b = new BytesIO();
|
|
289
271
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -296,31 +278,31 @@ export class GetSmsJob extends TLObject {
|
|
|
296
278
|
jobId;
|
|
297
279
|
constructor(params) {
|
|
298
280
|
super();
|
|
299
|
-
this.classType =
|
|
300
|
-
this.className =
|
|
281
|
+
this.classType = "functions";
|
|
282
|
+
this.className = "smsjobs.GetSmsJob";
|
|
301
283
|
this.constructorId = 0x778d902f;
|
|
302
284
|
this.subclassOfId = 0x1f24187e;
|
|
303
|
-
this._slots = [
|
|
285
|
+
this._slots = ["jobId"];
|
|
304
286
|
this.jobId = params.jobId;
|
|
305
287
|
}
|
|
306
288
|
/**
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
289
|
+
* Generate the TLObject from buffer.
|
|
290
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
291
|
+
*/
|
|
310
292
|
static async read(_data, ..._args) {
|
|
311
293
|
// no flags
|
|
312
294
|
let jobId = await Primitive.String.read(_data);
|
|
313
|
-
return new GetSmsJob({ jobId: jobId });
|
|
295
|
+
return new GetSmsJob({ "jobId": jobId });
|
|
314
296
|
}
|
|
315
297
|
/**
|
|
316
|
-
|
|
317
|
-
|
|
298
|
+
* Generate buffer from TLObject.
|
|
299
|
+
*/
|
|
318
300
|
write() {
|
|
319
301
|
const b = new BytesIO();
|
|
320
302
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
321
303
|
// no flags
|
|
322
304
|
if (this.jobId !== undefined) {
|
|
323
|
-
b.write(Primitive.String.write(this.jobId));
|
|
305
|
+
b.write((Primitive.String.write(this.jobId)));
|
|
324
306
|
}
|
|
325
307
|
return b.buffer;
|
|
326
308
|
}
|
|
@@ -331,40 +313,40 @@ export class FinishJob extends TLObject {
|
|
|
331
313
|
error;
|
|
332
314
|
constructor(params) {
|
|
333
315
|
super();
|
|
334
|
-
this.classType =
|
|
335
|
-
this.className =
|
|
316
|
+
this.classType = "functions";
|
|
317
|
+
this.className = "smsjobs.FinishJob";
|
|
336
318
|
this.constructorId = 0x4f1ebf24;
|
|
337
319
|
this.subclassOfId = 0xf5b399ac;
|
|
338
|
-
this._slots = [
|
|
320
|
+
this._slots = ["jobId", "error"];
|
|
339
321
|
this.jobId = params.jobId;
|
|
340
322
|
this.error = params.error;
|
|
341
323
|
}
|
|
342
324
|
/**
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
325
|
+
* Generate the TLObject from buffer.
|
|
326
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
327
|
+
*/
|
|
346
328
|
static async read(_data, ..._args) {
|
|
347
329
|
// @ts-ignore
|
|
348
330
|
let flags = await Primitive.Int.read(_data);
|
|
349
331
|
let jobId = await Primitive.String.read(_data);
|
|
350
|
-
let error = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
|
|
351
|
-
return new FinishJob({ jobId: jobId, error: error });
|
|
332
|
+
let error = (flags & (1 << 0)) ? await Primitive.String.read(_data) : undefined;
|
|
333
|
+
return new FinishJob({ "jobId": jobId, "error": error });
|
|
352
334
|
}
|
|
353
335
|
/**
|
|
354
|
-
|
|
355
|
-
|
|
336
|
+
* Generate buffer from TLObject.
|
|
337
|
+
*/
|
|
356
338
|
write() {
|
|
357
339
|
const b = new BytesIO();
|
|
358
340
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
359
341
|
// @ts-ignore
|
|
360
342
|
let flags = 0;
|
|
361
|
-
flags |= this.error !== undefined ? 1 << 0 : 0;
|
|
362
|
-
b.write(Primitive.Int.write(flags));
|
|
343
|
+
flags |= this.error !== undefined ? (1 << 0) : 0;
|
|
344
|
+
b.write((Primitive.Int.write(flags)));
|
|
363
345
|
if (this.jobId !== undefined) {
|
|
364
|
-
b.write(Primitive.String.write(this.jobId));
|
|
346
|
+
b.write((Primitive.String.write(this.jobId)));
|
|
365
347
|
}
|
|
366
348
|
if (this.error !== undefined) {
|
|
367
|
-
b.write(Primitive.String.write(this.error));
|
|
349
|
+
b.write((Primitive.String.write(this.error)));
|
|
368
350
|
}
|
|
369
351
|
return b.buffer;
|
|
370
352
|
}
|