@tgsnake/skema 1.7.0 → 1.10.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/LICENSE +0 -0
- package/README.md +1 -1
- package/dist/errors/exceptions/All.d.ts +101 -1
- package/dist/errors/exceptions/All.js +101 -1
- package/dist/errors/exceptions/BadRequest400.d.ts +320 -0
- package/dist/errors/exceptions/BadRequest400.js +422 -20
- package/dist/errors/exceptions/Flood420.d.ts +4 -0
- package/dist/errors/exceptions/Flood420.js +6 -1
- package/dist/errors/exceptions/Forbidden403.d.ts +24 -0
- package/dist/errors/exceptions/Forbidden403.js +32 -2
- package/dist/errors/exceptions/InternalServerError500.d.ts +20 -0
- package/dist/errors/exceptions/InternalServerError500.js +27 -2
- package/dist/errors/exceptions/NotAcceptable406.d.ts +28 -0
- package/dist/errors/exceptions/NotAcceptable406.js +37 -2
- package/dist/errors/exceptions/NotFound404.d.ts +4 -0
- package/dist/errors/exceptions/NotFound404.js +6 -1
- package/dist/raw/All.d.ts +48 -28
- package/dist/raw/All.js +48 -28
- package/dist/raw/Raw.d.ts +263 -13
- package/dist/raw/Raw.js +988 -89
- package/package.json +1 -1
|
@@ -23,6 +23,10 @@ export declare class FloodWait extends Flood {
|
|
|
23
23
|
id: string;
|
|
24
24
|
message: string;
|
|
25
25
|
}
|
|
26
|
+
export declare class FrozenMethodInvalid extends Flood {
|
|
27
|
+
id: string;
|
|
28
|
+
message: string;
|
|
29
|
+
}
|
|
26
30
|
export declare class PremiumSubActiveUntil extends Flood {
|
|
27
31
|
id: string;
|
|
28
32
|
message: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TakeoutInitDelay = exports.SlowmodeWait = exports.PremiumSubActiveUntil = exports.FloodWait = exports.FloodTestPhoneWait = exports.FloodPremiumWait = exports.AddressInvalid = exports.TwoFaConfirmWait = exports.Flood = void 0;
|
|
3
|
+
exports.TakeoutInitDelay = exports.SlowmodeWait = exports.PremiumSubActiveUntil = exports.FrozenMethodInvalid = exports.FloodWait = exports.FloodTestPhoneWait = exports.FloodPremiumWait = exports.AddressInvalid = exports.TwoFaConfirmWait = exports.Flood = void 0;
|
|
4
4
|
const RpcError_js_1 = require("@/errors/RpcError.js");
|
|
5
5
|
class Flood extends RpcError_js_1.RPCError {
|
|
6
6
|
code = 420;
|
|
@@ -32,6 +32,11 @@ class FloodWait extends Flood {
|
|
|
32
32
|
message = 'Please wait {value} seconds before repeating the action.';
|
|
33
33
|
}
|
|
34
34
|
exports.FloodWait = FloodWait;
|
|
35
|
+
class FrozenMethodInvalid extends Flood {
|
|
36
|
+
id = 'FROZEN_METHOD_INVALID';
|
|
37
|
+
message = 'The current account is [frozen](https://core.telegram.org/api/auth#frozen-accounts), and thus cannot execute the specified action.';
|
|
38
|
+
}
|
|
39
|
+
exports.FrozenMethodInvalid = FrozenMethodInvalid;
|
|
35
40
|
class PremiumSubActiveUntil extends Flood {
|
|
36
41
|
id = 'PREMIUM_SUB_ACTIVE_UNTIL_X';
|
|
37
42
|
message = 'You already have a premium subscription active until unixtime {value} .';
|
|
@@ -3,10 +3,26 @@ export declare class Forbidden extends RPCError {
|
|
|
3
3
|
code: number;
|
|
4
4
|
name: string;
|
|
5
5
|
}
|
|
6
|
+
export declare class AccessDenied extends Forbidden {
|
|
7
|
+
id: string;
|
|
8
|
+
message: string;
|
|
9
|
+
}
|
|
10
|
+
export declare class AllowPaymentRequired extends Forbidden {
|
|
11
|
+
id: string;
|
|
12
|
+
message: string;
|
|
13
|
+
}
|
|
6
14
|
export declare class AnonymousReactionsDisabled extends Forbidden {
|
|
7
15
|
id: string;
|
|
8
16
|
message: string;
|
|
9
17
|
}
|
|
18
|
+
export declare class BotAccessForbidden extends Forbidden {
|
|
19
|
+
id: string;
|
|
20
|
+
message: string;
|
|
21
|
+
}
|
|
22
|
+
export declare class BotVerifierForbidden extends Forbidden {
|
|
23
|
+
id: string;
|
|
24
|
+
message: string;
|
|
25
|
+
}
|
|
10
26
|
export declare class BroadcastForbidden extends Forbidden {
|
|
11
27
|
id: string;
|
|
12
28
|
message: string;
|
|
@@ -87,6 +103,10 @@ export declare class ChatSendVoicesForbidden extends Forbidden {
|
|
|
87
103
|
id: string;
|
|
88
104
|
message: string;
|
|
89
105
|
}
|
|
106
|
+
export declare class ChatSendWebpageForbidden extends Forbidden {
|
|
107
|
+
id: string;
|
|
108
|
+
message: string;
|
|
109
|
+
}
|
|
90
110
|
export declare class ChatTypeInvalid extends Forbidden {
|
|
91
111
|
id: string;
|
|
92
112
|
message: string;
|
|
@@ -187,6 +207,10 @@ export declare class UserNotParticipant extends Forbidden {
|
|
|
187
207
|
id: string;
|
|
188
208
|
message: string;
|
|
189
209
|
}
|
|
210
|
+
export declare class UserPermissionDenied extends Forbidden {
|
|
211
|
+
id: string;
|
|
212
|
+
message: string;
|
|
213
|
+
}
|
|
190
214
|
export declare class UserPrivacyRestricted extends Forbidden {
|
|
191
215
|
id: string;
|
|
192
216
|
message: string;
|
|
@@ -1,18 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.YourPrivacyRestricted = void 0;
|
|
3
|
+
exports.UserIsBlocked = exports.UserInvalid = exports.UserDeleted = exports.UserChannelsTooMuch = exports.UserBotInvalid = exports.TakeoutRequired = exports.SensitiveChangeForbidden = exports.RightForbidden = exports.PublicChannelMissing = exports.PrivacyPremiumRequired = exports.PremiumAccountRequired = exports.PollVoteRequired = exports.PeerIdInvalid = exports.ParticipantJoinMissing = exports.NotEligible = exports.MessageDeleteForbidden = exports.MessageAuthorRequired = exports.InlineBotRequired = exports.GroupcallForbidden = exports.GroupcallAlreadyStarted = exports.EditBotInviteForbidden = exports.ChatWriteForbidden = exports.ChatTypeInvalid = exports.ChatSendWebpageForbidden = exports.ChatSendVoicesForbidden = exports.ChatSendVideosForbidden = exports.ChatSendStickersForbidden = exports.ChatSendRoundvideosForbidden = exports.ChatSendPollForbidden = exports.ChatSendPlainForbidden = exports.ChatSendPhotosForbidden = exports.ChatSendMediaForbidden = exports.ChatSendInlineForbidden = exports.ChatSendGifsForbidden = exports.ChatSendGameForbidden = exports.ChatSendDocsForbidden = exports.ChatSendAudiosForbidden = exports.ChatGuestSendForbidden = exports.ChatForbidden = exports.ChatAdminRequired = exports.ChatAdminInviteRequired = exports.ChatActionForbidden = exports.ChannelPublicGroupNa = exports.BroadcastForbidden = exports.BotVerifierForbidden = exports.BotAccessForbidden = exports.AnonymousReactionsDisabled = exports.AllowPaymentRequired = exports.AccessDenied = exports.Forbidden = void 0;
|
|
4
|
+
exports.YourPrivacyRestricted = exports.VoiceMessagesForbidden = exports.UserRestricted = exports.UserPrivacyRestricted = exports.UserPermissionDenied = exports.UserNotParticipant = exports.UserNotMutualContact = void 0;
|
|
5
5
|
const RpcError_js_1 = require("@/errors/RpcError.js");
|
|
6
6
|
class Forbidden extends RpcError_js_1.RPCError {
|
|
7
7
|
code = 403;
|
|
8
8
|
name = 'FORBIDDEN';
|
|
9
9
|
}
|
|
10
10
|
exports.Forbidden = Forbidden;
|
|
11
|
+
class AccessDenied extends Forbidden {
|
|
12
|
+
id = 'ACCESS_DENIED';
|
|
13
|
+
message = '';
|
|
14
|
+
}
|
|
15
|
+
exports.AccessDenied = AccessDenied;
|
|
16
|
+
class AllowPaymentRequired extends Forbidden {
|
|
17
|
+
id = 'ALLOW_PAYMENT_REQUIRED_X';
|
|
18
|
+
message = 'This peer charges {value} [Telegram Stars](https://core.telegram.org/api/stars) per message, but the `allow_paid_stars` was not set or its value is smaller than {value}.';
|
|
19
|
+
}
|
|
20
|
+
exports.AllowPaymentRequired = AllowPaymentRequired;
|
|
11
21
|
class AnonymousReactionsDisabled extends Forbidden {
|
|
12
22
|
id = 'ANONYMOUS_REACTIONS_DISABLED';
|
|
13
23
|
message = 'Sorry, anonymous administrators cannot leave reactions or participate in polls.';
|
|
14
24
|
}
|
|
15
25
|
exports.AnonymousReactionsDisabled = AnonymousReactionsDisabled;
|
|
26
|
+
class BotAccessForbidden extends Forbidden {
|
|
27
|
+
id = 'BOT_ACCESS_FORBIDDEN';
|
|
28
|
+
message = 'The specified method *can* be used over a [business connection](https://core.telegram.org/api/bots/connected-business-bots) for some operations, but the specified query attempted an operation that is not allowed over a business connection.';
|
|
29
|
+
}
|
|
30
|
+
exports.BotAccessForbidden = BotAccessForbidden;
|
|
31
|
+
class BotVerifierForbidden extends Forbidden {
|
|
32
|
+
id = 'BOT_VERIFIER_FORBIDDEN';
|
|
33
|
+
message = 'This bot cannot assign [verification icons](https://core.telegram.org/api/bots/verification).';
|
|
34
|
+
}
|
|
35
|
+
exports.BotVerifierForbidden = BotVerifierForbidden;
|
|
16
36
|
class BroadcastForbidden extends Forbidden {
|
|
17
37
|
id = 'BROADCAST_FORBIDDEN';
|
|
18
38
|
message = 'Channel poll voters and reactions cannot be fetched to prevent deanonymization.';
|
|
@@ -113,6 +133,11 @@ class ChatSendVoicesForbidden extends Forbidden {
|
|
|
113
133
|
message = "You can't send voice recordings in this chat.";
|
|
114
134
|
}
|
|
115
135
|
exports.ChatSendVoicesForbidden = ChatSendVoicesForbidden;
|
|
136
|
+
class ChatSendWebpageForbidden extends Forbidden {
|
|
137
|
+
id = 'CHAT_SEND_WEBPAGE_FORBIDDEN';
|
|
138
|
+
message = "You can't send webpage previews to this chat.";
|
|
139
|
+
}
|
|
140
|
+
exports.ChatSendWebpageForbidden = ChatSendWebpageForbidden;
|
|
116
141
|
class ChatTypeInvalid extends Forbidden {
|
|
117
142
|
id = 'CHAT_TYPE_INVALID';
|
|
118
143
|
message = 'The specified user type is invalid.';
|
|
@@ -238,6 +263,11 @@ class UserNotParticipant extends Forbidden {
|
|
|
238
263
|
message = "You're not a member of this supergroup/channel.";
|
|
239
264
|
}
|
|
240
265
|
exports.UserNotParticipant = UserNotParticipant;
|
|
266
|
+
class UserPermissionDenied extends Forbidden {
|
|
267
|
+
id = 'USER_PERMISSION_DENIED';
|
|
268
|
+
message = "The user hasn't granted or has revoked the bot's access to change their emoji status using [bots.toggleUserEmojiStatusPermission](https://core.telegram.org/method/bots.toggleUserEmojiStatusPermission).";
|
|
269
|
+
}
|
|
270
|
+
exports.UserPermissionDenied = UserPermissionDenied;
|
|
241
271
|
class UserPrivacyRestricted extends Forbidden {
|
|
242
272
|
id = 'USER_PRIVACY_RESTRICTED';
|
|
243
273
|
message = "The user's privacy settings do not allow you to do this.";
|
|
@@ -51,6 +51,10 @@ export declare class ChpCallFail extends InternalServerError {
|
|
|
51
51
|
id: string;
|
|
52
52
|
message: string;
|
|
53
53
|
}
|
|
54
|
+
export declare class EncryptionDeclineAdminFailed extends InternalServerError {
|
|
55
|
+
id: string;
|
|
56
|
+
message: string;
|
|
57
|
+
}
|
|
54
58
|
export declare class EncryptionOccupyAdminFailed extends InternalServerError {
|
|
55
59
|
id: string;
|
|
56
60
|
message: string;
|
|
@@ -131,6 +135,10 @@ export declare class NeedChatInvalid extends InternalServerError {
|
|
|
131
135
|
id: string;
|
|
132
136
|
message: string;
|
|
133
137
|
}
|
|
138
|
+
export declare class NeedDocInvalid extends InternalServerError {
|
|
139
|
+
id: string;
|
|
140
|
+
message: string;
|
|
141
|
+
}
|
|
134
142
|
export declare class NeedMemberInvalid extends InternalServerError {
|
|
135
143
|
id: string;
|
|
136
144
|
message: string;
|
|
@@ -143,6 +151,10 @@ export declare class ParticipantCallFailed extends InternalServerError {
|
|
|
143
151
|
id: string;
|
|
144
152
|
message: string;
|
|
145
153
|
}
|
|
154
|
+
export declare class PasskeyAuthRestart extends InternalServerError {
|
|
155
|
+
id: string;
|
|
156
|
+
message: string;
|
|
157
|
+
}
|
|
146
158
|
export declare class PersistentTimestampOutdated extends InternalServerError {
|
|
147
159
|
id: string;
|
|
148
160
|
message: string;
|
|
@@ -199,6 +211,10 @@ export declare class TranslateReqFailed extends InternalServerError {
|
|
|
199
211
|
id: string;
|
|
200
212
|
message: string;
|
|
201
213
|
}
|
|
214
|
+
export declare class TranslationTimeout extends InternalServerError {
|
|
215
|
+
id: string;
|
|
216
|
+
message: string;
|
|
217
|
+
}
|
|
202
218
|
export declare class UnknownMethod extends InternalServerError {
|
|
203
219
|
id: string;
|
|
204
220
|
message: string;
|
|
@@ -211,6 +227,10 @@ export declare class VolumeLocNotFound extends InternalServerError {
|
|
|
211
227
|
id: string;
|
|
212
228
|
message: string;
|
|
213
229
|
}
|
|
230
|
+
export declare class VolumeMoveInvalid extends InternalServerError {
|
|
231
|
+
id: string;
|
|
232
|
+
message: string;
|
|
233
|
+
}
|
|
214
234
|
export declare class WorkerBusyTooLongRetry extends InternalServerError {
|
|
215
235
|
id: string;
|
|
216
236
|
message: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.WpIdGenerateFailed = exports.WorkerBusyTooLongRetry = exports.VolumeLocNotFound = exports.UploadNoVolume = exports.UnknownMethod = void 0;
|
|
3
|
+
exports.SignInFailed = exports.SendMediaInvalid = exports.RpcMcgetFail = exports.RpcConnectFailed = exports.RpcCallFail = exports.RegIdGenerateFailed = exports.RandomIdDuplicate = exports.PtsChangeEmpty = exports.PostponedTimeout = exports.PhotoCreateFailed = exports.PersistentTimestampOutdated = exports.PasskeyAuthRestart = exports.ParticipantCallFailed = exports.NoWorkersRunning = exports.NeedMemberInvalid = exports.NeedDocInvalid = exports.NeedChatInvalid = exports.MtSendQueueTooLong = exports.MsgWaitFailed = exports.MsgRangeUnsync = exports.MsgidDecreaseRetry = exports.MemberOccupyUsernameFailed = exports.MemberOccupyPrimaryLocFailed = exports.MemberNoLocation = exports.MemberNotFound = exports.MemberFetchFailed = exports.MemberChatAddFailed = exports.InterdcCallRichError = exports.InterdcCallError = exports.ImageEngineDown = exports.HistoryGetFailed = exports.GroupedIdOccupyFailed = exports.GroupcallAddParticipantsFailed = exports.FolderDeacAutofixAll = exports.EncryptionOccupyFailed = exports.EncryptionOccupyAdminFailed = exports.EncryptionDeclineAdminFailed = exports.ChpCallFail = exports.ChatOccupyUsernameFailed = exports.ChatOccupyLocFailed = exports.ChatInvalid = exports.ChatIdGenerateFailed = exports.CdnUploadTimeout = exports.CdnSaltsEmpty = exports.CallOccupyFailed = exports.AuthRestartX = exports.AuthRestart = exports.AuthKeyUnsynchronized = exports.ApiCallError = exports.InternalServerError = void 0;
|
|
4
|
+
exports.WpIdGenerateFailed = exports.WorkerBusyTooLongRetry = exports.VolumeMoveInvalid = exports.VolumeLocNotFound = exports.UploadNoVolume = exports.UnknownMethod = exports.TranslationTimeout = exports.TranslateReqFailed = exports.StoreInvalidScalarType = exports.StorageCheckFailed = void 0;
|
|
5
5
|
const RpcError_js_1 = require("@/errors/RpcError.js");
|
|
6
6
|
class InternalServerError extends RpcError_js_1.RPCError {
|
|
7
7
|
code = 500;
|
|
@@ -68,6 +68,11 @@ class ChpCallFail extends InternalServerError {
|
|
|
68
68
|
message = 'Telegram is having internal problems. Please try again later';
|
|
69
69
|
}
|
|
70
70
|
exports.ChpCallFail = ChpCallFail;
|
|
71
|
+
class EncryptionDeclineAdminFailed extends InternalServerError {
|
|
72
|
+
id = 'ENCRYPTION_DECLINE_ADMIN_FAILED';
|
|
73
|
+
message = '';
|
|
74
|
+
}
|
|
75
|
+
exports.EncryptionDeclineAdminFailed = EncryptionDeclineAdminFailed;
|
|
71
76
|
class EncryptionOccupyAdminFailed extends InternalServerError {
|
|
72
77
|
id = 'ENCRYPTION_OCCUPY_ADMIN_FAILED';
|
|
73
78
|
message = 'Failed occupying memory for admin info due to Telegram having internal problems. Please try again later';
|
|
@@ -168,6 +173,11 @@ class NeedChatInvalid extends InternalServerError {
|
|
|
168
173
|
message = 'The provided chat is invalid';
|
|
169
174
|
}
|
|
170
175
|
exports.NeedChatInvalid = NeedChatInvalid;
|
|
176
|
+
class NeedDocInvalid extends InternalServerError {
|
|
177
|
+
id = 'NEED_DOC_INVALID';
|
|
178
|
+
message = '';
|
|
179
|
+
}
|
|
180
|
+
exports.NeedDocInvalid = NeedDocInvalid;
|
|
171
181
|
class NeedMemberInvalid extends InternalServerError {
|
|
172
182
|
id = 'NEED_MEMBER_INVALID';
|
|
173
183
|
message = 'The provided member is invalid or does not exist';
|
|
@@ -183,6 +193,11 @@ class ParticipantCallFailed extends InternalServerError {
|
|
|
183
193
|
message = 'Failure while making call due to Telegram having internal problems. Please try again later';
|
|
184
194
|
}
|
|
185
195
|
exports.ParticipantCallFailed = ParticipantCallFailed;
|
|
196
|
+
class PasskeyAuthRestart extends InternalServerError {
|
|
197
|
+
id = 'PASSKEY_AUTH_RESTART';
|
|
198
|
+
message = '';
|
|
199
|
+
}
|
|
200
|
+
exports.PasskeyAuthRestart = PasskeyAuthRestart;
|
|
186
201
|
class PersistentTimestampOutdated extends InternalServerError {
|
|
187
202
|
id = 'PERSISTENT_TIMESTAMP_OUTDATED';
|
|
188
203
|
message = 'Channel internal replication issues, try again later (treat this like an RPC_CALL_FAIL).';
|
|
@@ -253,6 +268,11 @@ class TranslateReqFailed extends InternalServerError {
|
|
|
253
268
|
message = 'Translation failed, please try again later.';
|
|
254
269
|
}
|
|
255
270
|
exports.TranslateReqFailed = TranslateReqFailed;
|
|
271
|
+
class TranslationTimeout extends InternalServerError {
|
|
272
|
+
id = 'TRANSLATION_TIMEOUT';
|
|
273
|
+
message = 'A timeout occurred while translating the specified text.';
|
|
274
|
+
}
|
|
275
|
+
exports.TranslationTimeout = TranslationTimeout;
|
|
256
276
|
class UnknownMethod extends InternalServerError {
|
|
257
277
|
id = 'UNKNOWN_METHOD';
|
|
258
278
|
message = 'The method you tried to call cannot be called on non-CDN DCs';
|
|
@@ -268,6 +288,11 @@ class VolumeLocNotFound extends InternalServerError {
|
|
|
268
288
|
message = 'Telegram is having internal problems. Please try again later';
|
|
269
289
|
}
|
|
270
290
|
exports.VolumeLocNotFound = VolumeLocNotFound;
|
|
291
|
+
class VolumeMoveInvalid extends InternalServerError {
|
|
292
|
+
id = 'VOLUME_MOVE_INVALID';
|
|
293
|
+
message = '';
|
|
294
|
+
}
|
|
295
|
+
exports.VolumeMoveInvalid = VolumeMoveInvalid;
|
|
271
296
|
class WorkerBusyTooLongRetry extends InternalServerError {
|
|
272
297
|
id = 'WORKER_BUSY_TOO_LONG_RETRY';
|
|
273
298
|
message = 'Server workers are too busy right now due to Telegram having internal problems. Please try again later';
|
|
@@ -3,6 +3,14 @@ export declare class NotAcceptable extends RPCError {
|
|
|
3
3
|
code: number;
|
|
4
4
|
name: string;
|
|
5
5
|
}
|
|
6
|
+
export declare class AllowPaymentRequired extends NotAcceptable {
|
|
7
|
+
id: string;
|
|
8
|
+
message: string;
|
|
9
|
+
}
|
|
10
|
+
export declare class ApiGiftRestrictedUpdateApp extends NotAcceptable {
|
|
11
|
+
id: string;
|
|
12
|
+
message: string;
|
|
13
|
+
}
|
|
6
14
|
export declare class AuthKeyDuplicated extends NotAcceptable {
|
|
7
15
|
id: string;
|
|
8
16
|
message: string;
|
|
@@ -59,6 +67,10 @@ export declare class PaymentUnsupported extends NotAcceptable {
|
|
|
59
67
|
id: string;
|
|
60
68
|
message: string;
|
|
61
69
|
}
|
|
70
|
+
export declare class PeerIdInvalid extends NotAcceptable {
|
|
71
|
+
id: string;
|
|
72
|
+
message: string;
|
|
73
|
+
}
|
|
62
74
|
export declare class PhoneNumberInvalid extends NotAcceptable {
|
|
63
75
|
id: string;
|
|
64
76
|
message: string;
|
|
@@ -67,6 +79,10 @@ export declare class PhonePasswordFlood extends NotAcceptable {
|
|
|
67
79
|
id: string;
|
|
68
80
|
message: string;
|
|
69
81
|
}
|
|
82
|
+
export declare class PrecheckoutFailed extends NotAcceptable {
|
|
83
|
+
id: string;
|
|
84
|
+
message: string;
|
|
85
|
+
}
|
|
70
86
|
export declare class PremiumCurrentlyUnavailable extends NotAcceptable {
|
|
71
87
|
id: string;
|
|
72
88
|
message: string;
|
|
@@ -83,6 +99,14 @@ export declare class SendCodeUnavailable extends NotAcceptable {
|
|
|
83
99
|
id: string;
|
|
84
100
|
message: string;
|
|
85
101
|
}
|
|
102
|
+
export declare class StargiftExportInProgress extends NotAcceptable {
|
|
103
|
+
id: string;
|
|
104
|
+
message: string;
|
|
105
|
+
}
|
|
106
|
+
export declare class StarsFormAmountMismatch extends NotAcceptable {
|
|
107
|
+
id: string;
|
|
108
|
+
message: string;
|
|
109
|
+
}
|
|
86
110
|
export declare class StickersetInvalid extends NotAcceptable {
|
|
87
111
|
id: string;
|
|
88
112
|
message: string;
|
|
@@ -99,6 +123,10 @@ export declare class TopicDeleted extends NotAcceptable {
|
|
|
99
123
|
id: string;
|
|
100
124
|
message: string;
|
|
101
125
|
}
|
|
126
|
+
export declare class TranslationsDisabled extends NotAcceptable {
|
|
127
|
+
id: string;
|
|
128
|
+
message: string;
|
|
129
|
+
}
|
|
102
130
|
export declare class UpdateAppToLogin extends NotAcceptable {
|
|
103
131
|
id: string;
|
|
104
132
|
message: string;
|
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UserRestricted = exports.UserpicUploadRequired = exports.UserpicPrivacyRequired = exports.UpdateAppToLogin = exports.TopicDeleted = exports.TopicClosed = exports.StickersetOwnerAnonymous = exports.StickersetInvalid = exports.SendCodeUnavailable = exports.PrivacyPremiumRequired = exports.PreviousChatImportActiveWaitmin = exports.PremiumCurrentlyUnavailable = exports.PhonePasswordFlood = exports.PhoneNumberInvalid = exports.PaymentUnsupported = exports.InviteHashExpired = exports.GiftcodeNotAllowed = exports.FreshResetAuthorisationForbidden = exports.FreshChangePhoneForbidden = exports.FreshChangeAdminsForbidden = exports.FilerefUpgradeNeeded = exports.ChatForwardsRestricted = exports.ChannelTooLarge = exports.ChannelPrivate = exports.CallProtocolCompatLayerInvalid = exports.BusinessAddressActive = exports.BannedRightsInvalid = exports.AuthKeyDuplicated = exports.NotAcceptable = void 0;
|
|
3
|
+
exports.UserRestricted = exports.UserpicUploadRequired = exports.UserpicPrivacyRequired = exports.UpdateAppToLogin = exports.TranslationsDisabled = exports.TopicDeleted = exports.TopicClosed = exports.StickersetOwnerAnonymous = exports.StickersetInvalid = exports.StarsFormAmountMismatch = exports.StargiftExportInProgress = exports.SendCodeUnavailable = exports.PrivacyPremiumRequired = exports.PreviousChatImportActiveWaitmin = exports.PremiumCurrentlyUnavailable = exports.PrecheckoutFailed = exports.PhonePasswordFlood = exports.PhoneNumberInvalid = exports.PeerIdInvalid = exports.PaymentUnsupported = exports.InviteHashExpired = exports.GiftcodeNotAllowed = exports.FreshResetAuthorisationForbidden = exports.FreshChangePhoneForbidden = exports.FreshChangeAdminsForbidden = exports.FilerefUpgradeNeeded = exports.ChatForwardsRestricted = exports.ChannelTooLarge = exports.ChannelPrivate = exports.CallProtocolCompatLayerInvalid = exports.BusinessAddressActive = exports.BannedRightsInvalid = exports.AuthKeyDuplicated = exports.ApiGiftRestrictedUpdateApp = exports.AllowPaymentRequired = exports.NotAcceptable = void 0;
|
|
4
4
|
const RpcError_js_1 = require("@/errors/RpcError.js");
|
|
5
5
|
class NotAcceptable extends RpcError_js_1.RPCError {
|
|
6
6
|
code = 406;
|
|
7
7
|
name = 'NOT_ACCEPTABLE';
|
|
8
8
|
}
|
|
9
9
|
exports.NotAcceptable = NotAcceptable;
|
|
10
|
+
class AllowPaymentRequired extends NotAcceptable {
|
|
11
|
+
id = 'ALLOW_PAYMENT_REQUIRED';
|
|
12
|
+
message = 'This peer only accepts [paid messages »](https://core.telegram.org/api/paid-messages): this error is only emitted for older layers without paid messages support, so the client must be updated in order to use paid messages. .';
|
|
13
|
+
}
|
|
14
|
+
exports.AllowPaymentRequired = AllowPaymentRequired;
|
|
15
|
+
class ApiGiftRestrictedUpdateApp extends NotAcceptable {
|
|
16
|
+
id = 'API_GIFT_RESTRICTED_UPDATE_APP';
|
|
17
|
+
message = 'Please update the app to access the gift API.';
|
|
18
|
+
}
|
|
19
|
+
exports.ApiGiftRestrictedUpdateApp = ApiGiftRestrictedUpdateApp;
|
|
10
20
|
class AuthKeyDuplicated extends NotAcceptable {
|
|
11
21
|
id = 'AUTH_KEY_DUPLICATED';
|
|
12
22
|
message = 'Concurrent usage of the current session from multiple connections was detected, the current session was invalidated by the server for security reasons!';
|
|
@@ -44,7 +54,7 @@ class ChatForwardsRestricted extends NotAcceptable {
|
|
|
44
54
|
exports.ChatForwardsRestricted = ChatForwardsRestricted;
|
|
45
55
|
class FilerefUpgradeNeeded extends NotAcceptable {
|
|
46
56
|
id = 'FILEREF_UPGRADE_NEEDED';
|
|
47
|
-
message = 'The client has to be updated in order to support [file references](https://core.telegram.org/api/
|
|
57
|
+
message = 'The client has to be updated in order to support [file references](https://core.telegram.org/api/file-references).';
|
|
48
58
|
}
|
|
49
59
|
exports.FilerefUpgradeNeeded = FilerefUpgradeNeeded;
|
|
50
60
|
class FreshChangeAdminsForbidden extends NotAcceptable {
|
|
@@ -77,6 +87,11 @@ class PaymentUnsupported extends NotAcceptable {
|
|
|
77
87
|
message = 'A detailed description of the error will be received separately as described [here »](https://core.telegram.org/api/errors#406-not-acceptable).';
|
|
78
88
|
}
|
|
79
89
|
exports.PaymentUnsupported = PaymentUnsupported;
|
|
90
|
+
class PeerIdInvalid extends NotAcceptable {
|
|
91
|
+
id = 'PEER_ID_INVALID';
|
|
92
|
+
message = 'The provided peer id is invalid.';
|
|
93
|
+
}
|
|
94
|
+
exports.PeerIdInvalid = PeerIdInvalid;
|
|
80
95
|
class PhoneNumberInvalid extends NotAcceptable {
|
|
81
96
|
id = 'PHONE_NUMBER_INVALID';
|
|
82
97
|
message = 'The phone number is invalid.';
|
|
@@ -87,6 +102,11 @@ class PhonePasswordFlood extends NotAcceptable {
|
|
|
87
102
|
message = 'You have tried logging in too many times.';
|
|
88
103
|
}
|
|
89
104
|
exports.PhonePasswordFlood = PhonePasswordFlood;
|
|
105
|
+
class PrecheckoutFailed extends NotAcceptable {
|
|
106
|
+
id = 'PRECHECKOUT_FAILED';
|
|
107
|
+
message = 'Precheckout failed, a detailed and localized description for the error will be emitted via an [updateServiceNotification as specified here »](https://core.telegram.org/api/errors#406-not-acceptable).';
|
|
108
|
+
}
|
|
109
|
+
exports.PrecheckoutFailed = PrecheckoutFailed;
|
|
90
110
|
class PremiumCurrentlyUnavailable extends NotAcceptable {
|
|
91
111
|
id = 'PREMIUM_CURRENTLY_UNAVAILABLE';
|
|
92
112
|
message = 'You cannot currently purchase a Premium subscription.';
|
|
@@ -107,6 +127,16 @@ class SendCodeUnavailable extends NotAcceptable {
|
|
|
107
127
|
message = 'Returned when all available options for this type of number were already used (e.g. flash-call, then SMS, then this error might be returned to trigger a second resend).';
|
|
108
128
|
}
|
|
109
129
|
exports.SendCodeUnavailable = SendCodeUnavailable;
|
|
130
|
+
class StargiftExportInProgress extends NotAcceptable {
|
|
131
|
+
id = 'STARGIFT_EXPORT_IN_PROGRESS';
|
|
132
|
+
message = 'A gift export is in progress, a detailed and localized description for the error will be emitted via an [updateServiceNotification as specified here »](https://core.telegram.org/api/errors#406-not-acceptable).';
|
|
133
|
+
}
|
|
134
|
+
exports.StargiftExportInProgress = StargiftExportInProgress;
|
|
135
|
+
class StarsFormAmountMismatch extends NotAcceptable {
|
|
136
|
+
id = 'STARS_FORM_AMOUNT_MISMATCH';
|
|
137
|
+
message = 'The form amount has changed, please fetch the new form using [payments.getPaymentForm](https://core.telegram.org/method/payments.getPaymentForm) and restart the process.';
|
|
138
|
+
}
|
|
139
|
+
exports.StarsFormAmountMismatch = StarsFormAmountMismatch;
|
|
110
140
|
class StickersetInvalid extends NotAcceptable {
|
|
111
141
|
id = 'STICKERSET_INVALID';
|
|
112
142
|
message = 'The provided sticker set is invalid.';
|
|
@@ -127,6 +157,11 @@ class TopicDeleted extends NotAcceptable {
|
|
|
127
157
|
message = 'The specified topic was deleted.';
|
|
128
158
|
}
|
|
129
159
|
exports.TopicDeleted = TopicDeleted;
|
|
160
|
+
class TranslationsDisabled extends NotAcceptable {
|
|
161
|
+
id = 'TRANSLATIONS_DISABLED';
|
|
162
|
+
message = 'Translations are unavailable, a detailed and localized description for the error will be emitted via an [updateServiceNotification as specified here »](https://core.telegram.org/api/errors#406-not-acceptable).';
|
|
163
|
+
}
|
|
164
|
+
exports.TranslationsDisabled = TranslationsDisabled;
|
|
130
165
|
class UpdateAppToLogin extends NotAcceptable {
|
|
131
166
|
id = 'UPDATE_APP_TO_LOGIN';
|
|
132
167
|
message = 'Please update your client to login.';
|
|
@@ -3,6 +3,10 @@ export declare class NotFound extends RPCError {
|
|
|
3
3
|
code: number;
|
|
4
4
|
name: string;
|
|
5
5
|
}
|
|
6
|
+
export declare class MethodInvalid extends NotFound {
|
|
7
|
+
id: string;
|
|
8
|
+
message: string;
|
|
9
|
+
}
|
|
6
10
|
export declare class PeerIdInvalid extends NotFound {
|
|
7
11
|
id: string;
|
|
8
12
|
message: string;
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PeerIdInvalid = exports.NotFound = void 0;
|
|
3
|
+
exports.PeerIdInvalid = exports.MethodInvalid = exports.NotFound = void 0;
|
|
4
4
|
const RpcError_js_1 = require("@/errors/RpcError.js");
|
|
5
5
|
class NotFound extends RpcError_js_1.RPCError {
|
|
6
6
|
code = 404;
|
|
7
7
|
name = 'NOT_FOUND';
|
|
8
8
|
}
|
|
9
9
|
exports.NotFound = NotFound;
|
|
10
|
+
class MethodInvalid extends NotFound {
|
|
11
|
+
id = 'METHOD_INVALID';
|
|
12
|
+
message = 'The specified method is invalid.';
|
|
13
|
+
}
|
|
14
|
+
exports.MethodInvalid = MethodInvalid;
|
|
10
15
|
class PeerIdInvalid extends NotFound {
|
|
11
16
|
id = 'PEER_ID_INVALID';
|
|
12
17
|
message = 'The provided peer id is invalid.';
|
package/dist/raw/All.d.ts
CHANGED
|
@@ -90,6 +90,7 @@ export declare const AllTLObject: {
|
|
|
90
90
|
3256584265: string;
|
|
91
91
|
3289396102: string;
|
|
92
92
|
2680512478: string;
|
|
93
|
+
4087948362: string;
|
|
93
94
|
480546647: string;
|
|
94
95
|
3184373440: string;
|
|
95
96
|
2303962423: string;
|
|
@@ -145,7 +146,7 @@ export declare const AllTLObject: {
|
|
|
145
146
|
935395612: string;
|
|
146
147
|
476978193: string;
|
|
147
148
|
2426849924: string;
|
|
148
|
-
|
|
149
|
+
2629079273: string;
|
|
149
150
|
2055212554: string;
|
|
150
151
|
1038967584: string;
|
|
151
152
|
1766936791: string;
|
|
@@ -159,7 +160,7 @@ export declare const AllTLObject: {
|
|
|
159
160
|
4138027219: string;
|
|
160
161
|
3108030054: string;
|
|
161
162
|
1272375192: string;
|
|
162
|
-
|
|
163
|
+
147581959: string;
|
|
163
164
|
1758159491: string;
|
|
164
165
|
2852600811: string;
|
|
165
166
|
3467263649: string;
|
|
@@ -213,7 +214,7 @@ export declare const AllTLObject: {
|
|
|
213
214
|
1171632161: string;
|
|
214
215
|
2953594786: string;
|
|
215
216
|
3928764883: string;
|
|
216
|
-
|
|
217
|
+
3871544610: string;
|
|
217
218
|
2887720909: string;
|
|
218
219
|
2226685304: string;
|
|
219
220
|
805187450: string;
|
|
@@ -226,6 +227,8 @@ export declare const AllTLObject: {
|
|
|
226
227
|
747579941: string;
|
|
227
228
|
2000845012: string;
|
|
228
229
|
1940760427: string;
|
|
230
|
+
2961100933: string;
|
|
231
|
+
3783807035: string;
|
|
229
232
|
3582593222: string;
|
|
230
233
|
1908216652: string;
|
|
231
234
|
590459437: string;
|
|
@@ -451,6 +454,8 @@ export declare const AllTLObject: {
|
|
|
451
454
|
1048963372: string;
|
|
452
455
|
1222788802: string;
|
|
453
456
|
3696816926: string;
|
|
457
|
+
4221326458: string;
|
|
458
|
+
2886149188: string;
|
|
454
459
|
2775329342: string;
|
|
455
460
|
1567990072: string;
|
|
456
461
|
16030880: string;
|
|
@@ -623,24 +628,24 @@ export declare const AllTLObject: {
|
|
|
623
628
|
3556320491: string;
|
|
624
629
|
3262826695: string;
|
|
625
630
|
1300890265: string;
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
631
|
+
2098662655: string;
|
|
632
|
+
3624674796: string;
|
|
633
|
+
3861629280: string;
|
|
634
|
+
1098841487: string;
|
|
635
|
+
2856384845: string;
|
|
636
|
+
2568198652: string;
|
|
637
|
+
2311426297: string;
|
|
638
|
+
1067792645: string;
|
|
639
|
+
4111468281: string;
|
|
640
|
+
1744911986: string;
|
|
641
|
+
2047989634: string;
|
|
642
|
+
2103314375: string;
|
|
643
|
+
3237829897: string;
|
|
644
|
+
3896947104: string;
|
|
645
|
+
3780920176: string;
|
|
646
|
+
1527715317: string;
|
|
647
|
+
45580630: string;
|
|
648
|
+
3167006480: string;
|
|
644
649
|
2002815875: string;
|
|
645
650
|
2688441221: string;
|
|
646
651
|
2259946248: string;
|
|
@@ -1055,8 +1060,8 @@ export declare const AllTLObject: {
|
|
|
1055
1060
|
4224893590: string;
|
|
1056
1061
|
3921323624: string;
|
|
1057
1062
|
3896830975: string;
|
|
1058
|
-
|
|
1059
|
-
|
|
1063
|
+
855293722: string;
|
|
1064
|
+
1648005024: string;
|
|
1060
1065
|
2849430303: string;
|
|
1061
1066
|
3216354699: string;
|
|
1062
1067
|
547062491: string;
|
|
@@ -1463,7 +1468,7 @@ export declare const AllTLObject: {
|
|
|
1463
1468
|
2496562474: string;
|
|
1464
1469
|
1411605001: string;
|
|
1465
1470
|
825922887: string;
|
|
1466
|
-
|
|
1471
|
+
2247141837: string;
|
|
1467
1472
|
2743640936: string;
|
|
1468
1473
|
785918357: string;
|
|
1469
1474
|
2030298073: string;
|
|
@@ -1483,16 +1488,16 @@ export declare const AllTLObject: {
|
|
|
1483
1488
|
2194268816: string;
|
|
1484
1489
|
2966251031: string;
|
|
1485
1490
|
4181513308: string;
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1491
|
+
1448235490: string;
|
|
1492
|
+
1315997162: string;
|
|
1493
|
+
2670003428: string;
|
|
1489
1494
|
3770675820: string;
|
|
1490
1495
|
1038213101: string;
|
|
1491
1496
|
1658259128: string;
|
|
1492
1497
|
828000628: string;
|
|
1493
1498
|
1097619176: string;
|
|
1494
1499
|
2358937772: string;
|
|
1495
|
-
|
|
1500
|
+
1105150972: string;
|
|
1496
1501
|
2515765681: string;
|
|
1497
1502
|
1764202389: string;
|
|
1498
1503
|
4043418239: string;
|
|
@@ -1572,10 +1577,20 @@ export declare const AllTLObject: {
|
|
|
1572
1577
|
1046713180: string;
|
|
1573
1578
|
3273638218: string;
|
|
1574
1579
|
1009235855: string;
|
|
1580
|
+
1528613672: string;
|
|
1575
1581
|
2952094616: string;
|
|
1576
1582
|
984483112: string;
|
|
1577
1583
|
178266597: string;
|
|
1578
1584
|
1187439471: string;
|
|
1585
|
+
3660240455: string;
|
|
1586
|
+
1508266805: string;
|
|
1587
|
+
1155883043: string;
|
|
1588
|
+
910391095: string;
|
|
1589
|
+
3687736201: string;
|
|
1590
|
+
4035793259: string;
|
|
1591
|
+
2029777832: string;
|
|
1592
|
+
3472353192: string;
|
|
1593
|
+
1339896880: string;
|
|
1579
1594
|
3416209197: string;
|
|
1580
1595
|
1036301552: string;
|
|
1581
1596
|
3251461801: string;
|
|
@@ -2008,6 +2023,8 @@ export declare const AllTLObject: {
|
|
|
2008
2023
|
242762224: string;
|
|
2009
2024
|
798540757: string;
|
|
2010
2025
|
3531697936: string;
|
|
2026
|
+
4219374759: string;
|
|
2027
|
+
2638284002: string;
|
|
2011
2028
|
3990128682: string;
|
|
2012
2029
|
432207715: string;
|
|
2013
2030
|
51854712: string;
|
|
@@ -2108,6 +2125,7 @@ export declare const AllTLObject: {
|
|
|
2108
2125
|
3974275302: string;
|
|
2109
2126
|
576090389: string;
|
|
2110
2127
|
897842353: string;
|
|
2128
|
+
2684950703: string;
|
|
2111
2129
|
2854709741: string;
|
|
2112
2130
|
3860938573: string;
|
|
2113
2131
|
85399130: string;
|
|
@@ -2201,6 +2219,8 @@ export declare const AllTLObject: {
|
|
|
2201
2219
|
3922622492: string;
|
|
2202
2220
|
2411227969: string;
|
|
2203
2221
|
1828948824: string;
|
|
2222
|
+
4245019904: string;
|
|
2223
|
+
2969135183: string;
|
|
2204
2224
|
2418125671: string;
|
|
2205
2225
|
4151709521: string;
|
|
2206
2226
|
4290172106: string;
|