@tgsnake/skema 1.13.0 → 2.0.0-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/LICENSE +1 -1
- package/README.md +124 -15
- package/dist/mod.d.ts +10 -0
- package/dist/mod.js +10 -0
- package/dist/src/Logger.d.ts +20 -0
- package/dist/src/Logger.js +23 -0
- package/dist/src/deps.d.ts +29 -0
- package/dist/src/deps.js +34 -0
- package/dist/src/errors/Base.d.ts +53 -0
- package/dist/src/errors/Base.js +114 -0
- package/dist/src/errors/Client.d.ts +69 -0
- package/dist/src/errors/Client.js +69 -0
- package/dist/src/errors/File.d.ts +89 -0
- package/dist/src/errors/File.js +99 -0
- package/dist/src/errors/RpcError.d.ts +115 -0
- package/dist/src/errors/RpcError.js +226 -0
- package/dist/src/errors/SecretChat.d.ts +78 -0
- package/dist/src/errors/SecretChat.js +88 -0
- package/dist/src/errors/WebSocket.d.ts +70 -0
- package/dist/src/errors/WebSocket.js +80 -0
- package/dist/{errors → src/errors}/exceptions/All.d.ts +14 -0
- package/dist/{errors → src/errors}/exceptions/All.js +15 -5
- package/dist/{errors → src/errors}/exceptions/BadRequest400.d.ts +15 -1
- package/dist/src/errors/exceptions/BadRequest400.js +2683 -0
- package/dist/{errors → src/errors}/exceptions/Flood420.d.ts +15 -1
- package/dist/{errors → src/errors}/exceptions/Flood420.js +25 -24
- package/dist/{errors → src/errors}/exceptions/Forbidden403.d.ts +15 -1
- package/dist/src/errors/exceptions/Forbidden403.js +243 -0
- package/dist/{errors → src/errors}/exceptions/InternalServerError500.d.ts +15 -1
- package/dist/src/errors/exceptions/InternalServerError500.js +255 -0
- package/dist/{errors → src/errors}/exceptions/NotAcceptable406.d.ts +15 -1
- package/dist/{errors → src/errors}/exceptions/NotAcceptable406.js +51 -76
- package/dist/src/errors/exceptions/NotFound404.d.ts +27 -0
- package/dist/src/errors/exceptions/NotFound404.js +27 -0
- package/dist/src/errors/exceptions/SeeOther303.d.ts +39 -0
- package/dist/src/errors/exceptions/SeeOther303.js +39 -0
- package/dist/src/errors/exceptions/ServiceUnavailable503.d.ts +31 -0
- package/dist/src/errors/exceptions/ServiceUnavailable503.js +31 -0
- package/dist/{errors → src/errors}/exceptions/Unauthorized401.d.ts +15 -1
- package/dist/src/errors/exceptions/Unauthorized401.js +55 -0
- package/dist/src/errors/exceptions/index.d.ts +24 -0
- package/dist/src/errors/exceptions/index.js +24 -0
- package/dist/src/errors/index.d.ts +142 -0
- package/dist/src/errors/index.js +178 -0
- package/dist/src/helpers.d.ts +102 -0
- package/dist/src/helpers.js +176 -0
- package/dist/src/index.d.ts +12 -0
- package/dist/src/index.js +12 -0
- package/dist/{raw → src/raw}/All.d.ts +14 -0
- package/dist/{raw → src/raw}/All.js +15 -4
- package/dist/{raw → src/raw}/Raw.d.ts +17205 -3
- package/dist/{raw → src/raw}/Raw.js +44035 -21917
- package/dist/src/raw/UpdateSecretChat.d.ts +186 -0
- package/dist/src/raw/UpdateSecretChat.js +215 -0
- package/dist/src/raw/core/GzipPacked.d.ts +63 -0
- package/dist/src/raw/core/GzipPacked.js +76 -0
- package/dist/src/raw/core/Message.d.ts +68 -0
- package/dist/src/raw/core/Message.js +105 -0
- package/dist/src/raw/core/MsgContainer.d.ts +56 -0
- package/dist/src/raw/core/MsgContainer.js +77 -0
- package/dist/src/raw/core/TLObject.d.ts +108 -0
- package/dist/src/raw/core/TLObject.js +209 -0
- package/dist/src/raw/core/index.d.ts +19 -0
- package/dist/src/raw/core/index.js +19 -0
- package/dist/src/raw/core/primitive/Bool.d.ts +104 -0
- package/dist/src/raw/core/primitive/Bool.js +120 -0
- package/dist/src/raw/core/primitive/Bytes.d.ts +45 -0
- package/dist/src/raw/core/primitive/Bytes.js +76 -0
- package/dist/src/raw/core/primitive/Double.d.ts +37 -0
- package/dist/src/raw/core/primitive/Double.js +51 -0
- package/dist/src/raw/core/primitive/Float.d.ts +37 -0
- package/dist/src/raw/core/primitive/Float.js +51 -0
- package/dist/src/raw/core/primitive/Int.d.ts +144 -0
- package/dist/src/raw/core/primitive/Int.js +237 -0
- package/dist/src/raw/core/primitive/String.d.ts +37 -0
- package/dist/src/raw/core/primitive/String.js +42 -0
- package/dist/src/raw/core/primitive/Vector.d.ts +56 -0
- package/dist/src/raw/core/primitive/Vector.js +93 -0
- package/dist/src/raw/core/primitive/index.d.ts +20 -0
- package/dist/src/raw/core/primitive/index.js +20 -0
- package/dist/src/raw/index.d.ts +17 -0
- package/dist/src/raw/index.js +17 -0
- package/package.json +54 -50
- package/dist/Logger.d.ts +0 -3
- package/dist/Logger.js +0 -9
- package/dist/deps.d.ts +0 -8
- package/dist/deps.js +0 -19
- package/dist/errors/Base.d.ts +0 -9
- package/dist/errors/Base.js +0 -50
- package/dist/errors/Client.d.ts +0 -21
- package/dist/errors/Client.js +0 -29
- package/dist/errors/File.d.ts +0 -13
- package/dist/errors/File.js +0 -30
- package/dist/errors/RpcError.d.ts +0 -22
- package/dist/errors/RpcError.js +0 -120
- package/dist/errors/SecretChat.d.ts +0 -13
- package/dist/errors/SecretChat.js +0 -30
- package/dist/errors/WebSocket.d.ts +0 -13
- package/dist/errors/WebSocket.js +0 -30
- package/dist/errors/exceptions/BadRequest400.js +0 -3352
- package/dist/errors/exceptions/Forbidden403.js +0 -290
- package/dist/errors/exceptions/InternalServerError500.js +0 -305
- package/dist/errors/exceptions/NotFound404.d.ts +0 -13
- package/dist/errors/exceptions/NotFound404.js +0 -19
- package/dist/errors/exceptions/SeeOther303.d.ts +0 -25
- package/dist/errors/exceptions/SeeOther303.js +0 -34
- package/dist/errors/exceptions/ServiceUnavailable503.d.ts +0 -17
- package/dist/errors/exceptions/ServiceUnavailable503.js +0 -24
- package/dist/errors/exceptions/Unauthorized401.js +0 -54
- package/dist/errors/exceptions/index.d.ts +0 -10
- package/dist/errors/exceptions/index.js +0 -48
- package/dist/errors/index.d.ts +0 -31
- package/dist/errors/index.js +0 -111
- package/dist/helpers.d.ts +0 -6
- package/dist/helpers.js +0 -85
- package/dist/index.d.ts +0 -3
- package/dist/index.js +0 -34
- package/dist/raw/UpdateSecretChat.d.ts +0 -43
- package/dist/raw/UpdateSecretChat.js +0 -91
- package/dist/raw/core/GzipPacked.d.ts +0 -9
- package/dist/raw/core/GzipPacked.js +0 -59
- package/dist/raw/core/Message.d.ts +0 -12
- package/dist/raw/core/Message.js +0 -80
- package/dist/raw/core/MsgContainer.d.ts +0 -10
- package/dist/raw/core/MsgContainer.js +0 -68
- package/dist/raw/core/TLObject.d.ts +0 -18
- package/dist/raw/core/TLObject.js +0 -108
- package/dist/raw/core/index.d.ts +0 -6
- package/dist/raw/core/index.js +0 -46
- package/dist/raw/core/primitive/Bool.d.ts +0 -19
- package/dist/raw/core/primitive/Bool.js +0 -41
- package/dist/raw/core/primitive/Bytes.d.ts +0 -6
- package/dist/raw/core/primitive/Bytes.js +0 -41
- package/dist/raw/core/primitive/Double.d.ts +0 -6
- package/dist/raw/core/primitive/Double.js +0 -24
- package/dist/raw/core/primitive/Float.d.ts +0 -6
- package/dist/raw/core/primitive/Float.js +0 -24
- package/dist/raw/core/primitive/Int.d.ts +0 -22
- package/dist/raw/core/primitive/Int.js +0 -122
- package/dist/raw/core/primitive/String.d.ts +0 -6
- package/dist/raw/core/primitive/String.js +0 -15
- package/dist/raw/core/primitive/Vector.d.ts +0 -8
- package/dist/raw/core/primitive/Vector.js +0 -49
- package/dist/raw/core/primitive/index.d.ts +0 -7
- package/dist/raw/core/primitive/index.js +0 -22
- package/dist/raw/index.d.ts +0 -4
- package/dist/raw/index.js +0 -17
|
@@ -1,184 +1,159 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
/**
|
|
2
|
+
* tgsnake - Telegram MTProto library for javascript or typescript.
|
|
3
|
+
* Copyright (C) 2026 tgsnake <https://github.com/tgsnake>
|
|
4
|
+
*
|
|
5
|
+
* THIS FILE IS PART OF TGSNAKE
|
|
6
|
+
*
|
|
7
|
+
* tgsnake is a free software: you can redistribute it and/or modify
|
|
8
|
+
* it under the terms of the MIT License as published.
|
|
9
|
+
*/
|
|
10
|
+
/***********************************************************
|
|
11
|
+
* Warning!! *
|
|
12
|
+
* This file is auto generate. *
|
|
13
|
+
* All change made in this file will be lost! *
|
|
14
|
+
***********************************************************/
|
|
15
|
+
import { RPCError } from '../RpcError.js';
|
|
16
|
+
export class NotAcceptable extends RPCError {
|
|
6
17
|
code = 406;
|
|
7
18
|
name = 'NOT_ACCEPTABLE';
|
|
8
19
|
}
|
|
9
|
-
|
|
10
|
-
class AllowPaymentRequired extends NotAcceptable {
|
|
20
|
+
export class AllowPaymentRequired extends NotAcceptable {
|
|
11
21
|
id = 'ALLOW_PAYMENT_REQUIRED';
|
|
12
22
|
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
23
|
}
|
|
14
|
-
|
|
15
|
-
class ApiGiftRestrictedUpdateApp extends NotAcceptable {
|
|
24
|
+
export class ApiGiftRestrictedUpdateApp extends NotAcceptable {
|
|
16
25
|
id = 'API_GIFT_RESTRICTED_UPDATE_APP';
|
|
17
26
|
message = 'Please update the app to access the gift API.';
|
|
18
27
|
}
|
|
19
|
-
|
|
20
|
-
class AuthKeyDuplicated extends NotAcceptable {
|
|
28
|
+
export class AuthKeyDuplicated extends NotAcceptable {
|
|
21
29
|
id = 'AUTH_KEY_DUPLICATED';
|
|
22
30
|
message = 'Concurrent usage of the current session from multiple connections was detected, the current session was invalidated by the server for security reasons!';
|
|
23
31
|
}
|
|
24
|
-
|
|
25
|
-
class BannedRightsInvalid extends NotAcceptable {
|
|
32
|
+
export class BannedRightsInvalid extends NotAcceptable {
|
|
26
33
|
id = 'BANNED_RIGHTS_INVALID';
|
|
27
34
|
message = 'You provided some invalid flags in the banned rights.';
|
|
28
35
|
}
|
|
29
|
-
|
|
30
|
-
class BusinessAddressActive extends NotAcceptable {
|
|
36
|
+
export class BusinessAddressActive extends NotAcceptable {
|
|
31
37
|
id = 'BUSINESS_ADDRESS_ACTIVE';
|
|
32
38
|
message = 'The user is currently advertising a [Business Location](https://core.telegram.org/api/business#location), the location may only be changed (or removed) using [account.updateBusinessLocation »](https://core.telegram.org/method/account.updateBusinessLocation). .';
|
|
33
39
|
}
|
|
34
|
-
|
|
35
|
-
class CallProtocolCompatLayerInvalid extends NotAcceptable {
|
|
40
|
+
export class CallProtocolCompatLayerInvalid extends NotAcceptable {
|
|
36
41
|
id = 'CALL_PROTOCOL_COMPAT_LAYER_INVALID';
|
|
37
42
|
message = 'The other side of the call does not support any of the VoIP protocols supported by the local client, as specified by the `protocol.layer` and `protocol.library_versions` fields.';
|
|
38
43
|
}
|
|
39
|
-
|
|
40
|
-
class ChannelPrivate extends NotAcceptable {
|
|
44
|
+
export class ChannelPrivate extends NotAcceptable {
|
|
41
45
|
id = 'CHANNEL_PRIVATE';
|
|
42
46
|
message = "You haven't joined this channel/supergroup.";
|
|
43
47
|
}
|
|
44
|
-
|
|
45
|
-
class ChannelTooLarge extends NotAcceptable {
|
|
48
|
+
export class ChannelTooLarge extends NotAcceptable {
|
|
46
49
|
id = 'CHANNEL_TOO_LARGE';
|
|
47
50
|
message = 'Channel is too large to be deleted; this error is issued when trying to delete channels with more than 1000 members (subject to change).';
|
|
48
51
|
}
|
|
49
|
-
|
|
50
|
-
class ChatForwardsRestricted extends NotAcceptable {
|
|
52
|
+
export class ChatForwardsRestricted extends NotAcceptable {
|
|
51
53
|
id = 'CHAT_FORWARDS_RESTRICTED';
|
|
52
54
|
message = "You can't forward messages from a protected chat.";
|
|
53
55
|
}
|
|
54
|
-
|
|
55
|
-
class FilerefUpgradeNeeded extends NotAcceptable {
|
|
56
|
+
export class FilerefUpgradeNeeded extends NotAcceptable {
|
|
56
57
|
id = 'FILEREF_UPGRADE_NEEDED';
|
|
57
58
|
message = 'The client has to be updated in order to support [file references](https://core.telegram.org/api/file-references).';
|
|
58
59
|
}
|
|
59
|
-
|
|
60
|
-
class FreshChangeAdminsForbidden extends NotAcceptable {
|
|
60
|
+
export class FreshChangeAdminsForbidden extends NotAcceptable {
|
|
61
61
|
id = 'FRESH_CHANGE_ADMINS_FORBIDDEN';
|
|
62
62
|
message = "You were just elected admin, you can't add or modify other admins yet.";
|
|
63
63
|
}
|
|
64
|
-
|
|
65
|
-
class FreshChangePhoneForbidden extends NotAcceptable {
|
|
64
|
+
export class FreshChangePhoneForbidden extends NotAcceptable {
|
|
66
65
|
id = 'FRESH_CHANGE_PHONE_FORBIDDEN';
|
|
67
66
|
message = "You can't change phone number right after logging in, please wait at least 24 hours.";
|
|
68
67
|
}
|
|
69
|
-
|
|
70
|
-
class FreshResetAuthorisationForbidden extends NotAcceptable {
|
|
68
|
+
export class FreshResetAuthorisationForbidden extends NotAcceptable {
|
|
71
69
|
id = 'FRESH_RESET_AUTHORISATION_FORBIDDEN';
|
|
72
70
|
message = "You can't logout other sessions if less than 24 hours have passed since you logged on the current session.";
|
|
73
71
|
}
|
|
74
|
-
|
|
75
|
-
class GiftcodeNotAllowed extends NotAcceptable {
|
|
72
|
+
export class GiftcodeNotAllowed extends NotAcceptable {
|
|
76
73
|
id = 'GIFTCODE_NOT_ALLOWED';
|
|
77
74
|
message = '';
|
|
78
75
|
}
|
|
79
|
-
|
|
80
|
-
class InviteHashExpired extends NotAcceptable {
|
|
76
|
+
export class InviteHashExpired extends NotAcceptable {
|
|
81
77
|
id = 'INVITE_HASH_EXPIRED';
|
|
82
78
|
message = 'The invite link has expired.';
|
|
83
79
|
}
|
|
84
|
-
|
|
85
|
-
class PaymentUnsupported extends NotAcceptable {
|
|
80
|
+
export class PaymentUnsupported extends NotAcceptable {
|
|
86
81
|
id = 'PAYMENT_UNSUPPORTED';
|
|
87
82
|
message = 'A detailed description of the error will be received separately as described [here »](https://core.telegram.org/api/errors#406-not-acceptable).';
|
|
88
83
|
}
|
|
89
|
-
|
|
90
|
-
class PeerIdInvalid extends NotAcceptable {
|
|
84
|
+
export class PeerIdInvalid extends NotAcceptable {
|
|
91
85
|
id = 'PEER_ID_INVALID';
|
|
92
86
|
message = 'The provided peer id is invalid.';
|
|
93
87
|
}
|
|
94
|
-
|
|
95
|
-
class PhoneNumberInvalid extends NotAcceptable {
|
|
88
|
+
export class PhoneNumberInvalid extends NotAcceptable {
|
|
96
89
|
id = 'PHONE_NUMBER_INVALID';
|
|
97
90
|
message = 'The phone number is invalid.';
|
|
98
91
|
}
|
|
99
|
-
|
|
100
|
-
class PhonePasswordFlood extends NotAcceptable {
|
|
92
|
+
export class PhonePasswordFlood extends NotAcceptable {
|
|
101
93
|
id = 'PHONE_PASSWORD_FLOOD';
|
|
102
94
|
message = 'You have tried logging in too many times.';
|
|
103
95
|
}
|
|
104
|
-
|
|
105
|
-
class PrecheckoutFailed extends NotAcceptable {
|
|
96
|
+
export class PrecheckoutFailed extends NotAcceptable {
|
|
106
97
|
id = 'PRECHECKOUT_FAILED';
|
|
107
98
|
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
99
|
}
|
|
109
|
-
|
|
110
|
-
class PremiumCurrentlyUnavailable extends NotAcceptable {
|
|
100
|
+
export class PremiumCurrentlyUnavailable extends NotAcceptable {
|
|
111
101
|
id = 'PREMIUM_CURRENTLY_UNAVAILABLE';
|
|
112
102
|
message = 'You cannot currently purchase a Premium subscription.';
|
|
113
103
|
}
|
|
114
|
-
|
|
115
|
-
class PreviousChatImportActiveWaitmin extends NotAcceptable {
|
|
104
|
+
export class PreviousChatImportActiveWaitmin extends NotAcceptable {
|
|
116
105
|
id = 'PREVIOUS_CHAT_IMPORT_ACTIVE_WAIT_XMIN';
|
|
117
106
|
message = 'Import for this chat is already in progress, wait {value} minutes before starting a new one.';
|
|
118
107
|
}
|
|
119
|
-
|
|
120
|
-
class PrivacyPremiumRequired extends NotAcceptable {
|
|
108
|
+
export class PrivacyPremiumRequired extends NotAcceptable {
|
|
121
109
|
id = 'PRIVACY_PREMIUM_REQUIRED';
|
|
122
110
|
message = 'You need a [Telegram Premium subscription](https://core.telegram.org/api/premium) to send a message to this user.';
|
|
123
111
|
}
|
|
124
|
-
|
|
125
|
-
class SendCodeUnavailable extends NotAcceptable {
|
|
112
|
+
export class SendCodeUnavailable extends NotAcceptable {
|
|
126
113
|
id = 'SEND_CODE_UNAVAILABLE';
|
|
127
114
|
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).';
|
|
128
115
|
}
|
|
129
|
-
|
|
130
|
-
class StargiftExportInProgress extends NotAcceptable {
|
|
116
|
+
export class StargiftExportInProgress extends NotAcceptable {
|
|
131
117
|
id = 'STARGIFT_EXPORT_IN_PROGRESS';
|
|
132
118
|
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
119
|
}
|
|
134
|
-
|
|
135
|
-
class StarsFormAmountMismatch extends NotAcceptable {
|
|
120
|
+
export class StarsFormAmountMismatch extends NotAcceptable {
|
|
136
121
|
id = 'STARS_FORM_AMOUNT_MISMATCH';
|
|
137
122
|
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
123
|
}
|
|
139
|
-
|
|
140
|
-
class StickersetInvalid extends NotAcceptable {
|
|
124
|
+
export class StickersetInvalid extends NotAcceptable {
|
|
141
125
|
id = 'STICKERSET_INVALID';
|
|
142
126
|
message = 'The provided sticker set is invalid.';
|
|
143
127
|
}
|
|
144
|
-
|
|
145
|
-
class StickersetOwnerAnonymous extends NotAcceptable {
|
|
128
|
+
export class StickersetOwnerAnonymous extends NotAcceptable {
|
|
146
129
|
id = 'STICKERSET_OWNER_ANONYMOUS';
|
|
147
130
|
message = "Provided stickerset can't be installed as group stickerset to prevent admin deanonymization.";
|
|
148
131
|
}
|
|
149
|
-
|
|
150
|
-
class TopicClosed extends NotAcceptable {
|
|
132
|
+
export class TopicClosed extends NotAcceptable {
|
|
151
133
|
id = 'TOPIC_CLOSED';
|
|
152
134
|
message = "This topic was closed, you can't send messages to it anymore.";
|
|
153
135
|
}
|
|
154
|
-
|
|
155
|
-
class TopicDeleted extends NotAcceptable {
|
|
136
|
+
export class TopicDeleted extends NotAcceptable {
|
|
156
137
|
id = 'TOPIC_DELETED';
|
|
157
138
|
message = 'The specified topic was deleted.';
|
|
158
139
|
}
|
|
159
|
-
|
|
160
|
-
class TranslationsDisabled extends NotAcceptable {
|
|
140
|
+
export class TranslationsDisabled extends NotAcceptable {
|
|
161
141
|
id = 'TRANSLATIONS_DISABLED';
|
|
162
142
|
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
143
|
}
|
|
164
|
-
|
|
165
|
-
class UpdateAppToLogin extends NotAcceptable {
|
|
144
|
+
export class UpdateAppToLogin extends NotAcceptable {
|
|
166
145
|
id = 'UPDATE_APP_TO_LOGIN';
|
|
167
146
|
message = 'Please update your client to login.';
|
|
168
147
|
}
|
|
169
|
-
|
|
170
|
-
class UserpicPrivacyRequired extends NotAcceptable {
|
|
148
|
+
export class UserpicPrivacyRequired extends NotAcceptable {
|
|
171
149
|
id = 'USERPIC_PRIVACY_REQUIRED';
|
|
172
150
|
message = 'You need to disable privacy settings for your profile picture in order to make your geolocation public.';
|
|
173
151
|
}
|
|
174
|
-
|
|
175
|
-
class UserpicUploadRequired extends NotAcceptable {
|
|
152
|
+
export class UserpicUploadRequired extends NotAcceptable {
|
|
176
153
|
id = 'USERPIC_UPLOAD_REQUIRED';
|
|
177
154
|
message = 'You must have a profile picture to publish your geolocation.';
|
|
178
155
|
}
|
|
179
|
-
|
|
180
|
-
class UserRestricted extends NotAcceptable {
|
|
156
|
+
export class UserRestricted extends NotAcceptable {
|
|
181
157
|
id = 'USER_RESTRICTED';
|
|
182
158
|
message = "You're spamreported, you can't create channels or chats.";
|
|
183
159
|
}
|
|
184
|
-
exports.UserRestricted = UserRestricted;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* tgsnake - Telegram MTProto library for javascript or typescript.
|
|
3
|
+
* Copyright (C) 2026 tgsnake <https://github.com/tgsnake>
|
|
4
|
+
*
|
|
5
|
+
* THIS FILE IS PART OF TGSNAKE
|
|
6
|
+
*
|
|
7
|
+
* tgsnake is a free software: you can redistribute it and/or modify
|
|
8
|
+
* it under the terms of the MIT License as published.
|
|
9
|
+
*/
|
|
10
|
+
/***********************************************************
|
|
11
|
+
* Warning!! *
|
|
12
|
+
* This file is auto generate. *
|
|
13
|
+
* All change made in this file will be lost! *
|
|
14
|
+
***********************************************************/
|
|
15
|
+
import { RPCError } from '../RpcError.js';
|
|
16
|
+
export declare class NotFound extends RPCError {
|
|
17
|
+
code: number;
|
|
18
|
+
name: string;
|
|
19
|
+
}
|
|
20
|
+
export declare class MethodInvalid extends NotFound {
|
|
21
|
+
id: string;
|
|
22
|
+
message: string;
|
|
23
|
+
}
|
|
24
|
+
export declare class PeerIdInvalid extends NotFound {
|
|
25
|
+
id: string;
|
|
26
|
+
message: string;
|
|
27
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* tgsnake - Telegram MTProto library for javascript or typescript.
|
|
3
|
+
* Copyright (C) 2026 tgsnake <https://github.com/tgsnake>
|
|
4
|
+
*
|
|
5
|
+
* THIS FILE IS PART OF TGSNAKE
|
|
6
|
+
*
|
|
7
|
+
* tgsnake is a free software: you can redistribute it and/or modify
|
|
8
|
+
* it under the terms of the MIT License as published.
|
|
9
|
+
*/
|
|
10
|
+
/***********************************************************
|
|
11
|
+
* Warning!! *
|
|
12
|
+
* This file is auto generate. *
|
|
13
|
+
* All change made in this file will be lost! *
|
|
14
|
+
***********************************************************/
|
|
15
|
+
import { RPCError } from '../RpcError.js';
|
|
16
|
+
export class NotFound extends RPCError {
|
|
17
|
+
code = 404;
|
|
18
|
+
name = 'NOT_FOUND';
|
|
19
|
+
}
|
|
20
|
+
export class MethodInvalid extends NotFound {
|
|
21
|
+
id = 'METHOD_INVALID';
|
|
22
|
+
message = 'The specified method is invalid.';
|
|
23
|
+
}
|
|
24
|
+
export class PeerIdInvalid extends NotFound {
|
|
25
|
+
id = 'PEER_ID_INVALID';
|
|
26
|
+
message = 'The provided peer id is invalid.';
|
|
27
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* tgsnake - Telegram MTProto library for javascript or typescript.
|
|
3
|
+
* Copyright (C) 2026 tgsnake <https://github.com/tgsnake>
|
|
4
|
+
*
|
|
5
|
+
* THIS FILE IS PART OF TGSNAKE
|
|
6
|
+
*
|
|
7
|
+
* tgsnake is a free software: you can redistribute it and/or modify
|
|
8
|
+
* it under the terms of the MIT License as published.
|
|
9
|
+
*/
|
|
10
|
+
/***********************************************************
|
|
11
|
+
* Warning!! *
|
|
12
|
+
* This file is auto generate. *
|
|
13
|
+
* All change made in this file will be lost! *
|
|
14
|
+
***********************************************************/
|
|
15
|
+
import { RPCError } from '../RpcError.js';
|
|
16
|
+
export declare class SeeOther extends RPCError {
|
|
17
|
+
code: number;
|
|
18
|
+
name: string;
|
|
19
|
+
}
|
|
20
|
+
export declare class FileMigrate extends SeeOther {
|
|
21
|
+
id: string;
|
|
22
|
+
message: string;
|
|
23
|
+
}
|
|
24
|
+
export declare class NetworkMigrate extends SeeOther {
|
|
25
|
+
id: string;
|
|
26
|
+
message: string;
|
|
27
|
+
}
|
|
28
|
+
export declare class PhoneMigrate extends SeeOther {
|
|
29
|
+
id: string;
|
|
30
|
+
message: string;
|
|
31
|
+
}
|
|
32
|
+
export declare class StatsMigrate extends SeeOther {
|
|
33
|
+
id: string;
|
|
34
|
+
message: string;
|
|
35
|
+
}
|
|
36
|
+
export declare class UserMigrate extends SeeOther {
|
|
37
|
+
id: string;
|
|
38
|
+
message: string;
|
|
39
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* tgsnake - Telegram MTProto library for javascript or typescript.
|
|
3
|
+
* Copyright (C) 2026 tgsnake <https://github.com/tgsnake>
|
|
4
|
+
*
|
|
5
|
+
* THIS FILE IS PART OF TGSNAKE
|
|
6
|
+
*
|
|
7
|
+
* tgsnake is a free software: you can redistribute it and/or modify
|
|
8
|
+
* it under the terms of the MIT License as published.
|
|
9
|
+
*/
|
|
10
|
+
/***********************************************************
|
|
11
|
+
* Warning!! *
|
|
12
|
+
* This file is auto generate. *
|
|
13
|
+
* All change made in this file will be lost! *
|
|
14
|
+
***********************************************************/
|
|
15
|
+
import { RPCError } from '../RpcError.js';
|
|
16
|
+
export class SeeOther extends RPCError {
|
|
17
|
+
code = 303;
|
|
18
|
+
name = 'SEE_OTHER';
|
|
19
|
+
}
|
|
20
|
+
export class FileMigrate extends SeeOther {
|
|
21
|
+
id = 'FILE_MIGRATE_X';
|
|
22
|
+
message = 'The file to be accessed is currently stored in DC{value}';
|
|
23
|
+
}
|
|
24
|
+
export class NetworkMigrate extends SeeOther {
|
|
25
|
+
id = 'NETWORK_MIGRATE_X';
|
|
26
|
+
message = 'Your IP address is associated to DC {value}, please re-send the query to that DC.';
|
|
27
|
+
}
|
|
28
|
+
export class PhoneMigrate extends SeeOther {
|
|
29
|
+
id = 'PHONE_MIGRATE_X';
|
|
30
|
+
message = 'Your phone number is associated to DC {value}, please re-send the query to that DC.';
|
|
31
|
+
}
|
|
32
|
+
export class StatsMigrate extends SeeOther {
|
|
33
|
+
id = 'STATS_MIGRATE_X';
|
|
34
|
+
message = 'Channel statistics for the specified channel are stored on DC {value}, please re-send the query to that DC.';
|
|
35
|
+
}
|
|
36
|
+
export class UserMigrate extends SeeOther {
|
|
37
|
+
id = 'USER_MIGRATE_X';
|
|
38
|
+
message = 'Your account is associated to DC {value}, please re-send the query to that DC.';
|
|
39
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* tgsnake - Telegram MTProto library for javascript or typescript.
|
|
3
|
+
* Copyright (C) 2026 tgsnake <https://github.com/tgsnake>
|
|
4
|
+
*
|
|
5
|
+
* THIS FILE IS PART OF TGSNAKE
|
|
6
|
+
*
|
|
7
|
+
* tgsnake is a free software: you can redistribute it and/or modify
|
|
8
|
+
* it under the terms of the MIT License as published.
|
|
9
|
+
*/
|
|
10
|
+
/***********************************************************
|
|
11
|
+
* Warning!! *
|
|
12
|
+
* This file is auto generate. *
|
|
13
|
+
* All change made in this file will be lost! *
|
|
14
|
+
***********************************************************/
|
|
15
|
+
import { RPCError } from '../RpcError.js';
|
|
16
|
+
export declare class ServiceUnavailable extends RPCError {
|
|
17
|
+
code: number;
|
|
18
|
+
name: string;
|
|
19
|
+
}
|
|
20
|
+
export declare class ApiCallError extends ServiceUnavailable {
|
|
21
|
+
id: string;
|
|
22
|
+
message: string;
|
|
23
|
+
}
|
|
24
|
+
export declare class MsgWaitTimeout extends ServiceUnavailable {
|
|
25
|
+
id: string;
|
|
26
|
+
message: string;
|
|
27
|
+
}
|
|
28
|
+
export declare class Timeout extends ServiceUnavailable {
|
|
29
|
+
id: string;
|
|
30
|
+
message: string;
|
|
31
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* tgsnake - Telegram MTProto library for javascript or typescript.
|
|
3
|
+
* Copyright (C) 2026 tgsnake <https://github.com/tgsnake>
|
|
4
|
+
*
|
|
5
|
+
* THIS FILE IS PART OF TGSNAKE
|
|
6
|
+
*
|
|
7
|
+
* tgsnake is a free software: you can redistribute it and/or modify
|
|
8
|
+
* it under the terms of the MIT License as published.
|
|
9
|
+
*/
|
|
10
|
+
/***********************************************************
|
|
11
|
+
* Warning!! *
|
|
12
|
+
* This file is auto generate. *
|
|
13
|
+
* All change made in this file will be lost! *
|
|
14
|
+
***********************************************************/
|
|
15
|
+
import { RPCError } from '../RpcError.js';
|
|
16
|
+
export class ServiceUnavailable extends RPCError {
|
|
17
|
+
code = 503;
|
|
18
|
+
name = 'SERVICE_UNAVAILABLE';
|
|
19
|
+
}
|
|
20
|
+
export class ApiCallError extends ServiceUnavailable {
|
|
21
|
+
id = 'ApiCallError';
|
|
22
|
+
message = 'Telegram is having internal problems. Please try again later.';
|
|
23
|
+
}
|
|
24
|
+
export class MsgWaitTimeout extends ServiceUnavailable {
|
|
25
|
+
id = 'MSG_WAIT_TIMEOUT';
|
|
26
|
+
message = 'Spent too much time waiting for a previous query in the invokeAfterMsg request queue, aborting!';
|
|
27
|
+
}
|
|
28
|
+
export class Timeout extends ServiceUnavailable {
|
|
29
|
+
id = 'Timeout';
|
|
30
|
+
message = 'Timeout while fetching data.';
|
|
31
|
+
}
|
|
@@ -1,4 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* tgsnake - Telegram MTProto library for javascript or typescript.
|
|
3
|
+
* Copyright (C) 2026 tgsnake <https://github.com/tgsnake>
|
|
4
|
+
*
|
|
5
|
+
* THIS FILE IS PART OF TGSNAKE
|
|
6
|
+
*
|
|
7
|
+
* tgsnake is a free software: you can redistribute it and/or modify
|
|
8
|
+
* it under the terms of the MIT License as published.
|
|
9
|
+
*/
|
|
10
|
+
/***********************************************************
|
|
11
|
+
* Warning!! *
|
|
12
|
+
* This file is auto generate. *
|
|
13
|
+
* All change made in this file will be lost! *
|
|
14
|
+
***********************************************************/
|
|
15
|
+
import { RPCError } from '../RpcError.js';
|
|
2
16
|
export declare class Unauthorized extends RPCError {
|
|
3
17
|
code: number;
|
|
4
18
|
name: string;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* tgsnake - Telegram MTProto library for javascript or typescript.
|
|
3
|
+
* Copyright (C) 2026 tgsnake <https://github.com/tgsnake>
|
|
4
|
+
*
|
|
5
|
+
* THIS FILE IS PART OF TGSNAKE
|
|
6
|
+
*
|
|
7
|
+
* tgsnake is a free software: you can redistribute it and/or modify
|
|
8
|
+
* it under the terms of the MIT License as published.
|
|
9
|
+
*/
|
|
10
|
+
/***********************************************************
|
|
11
|
+
* Warning!! *
|
|
12
|
+
* This file is auto generate. *
|
|
13
|
+
* All change made in this file will be lost! *
|
|
14
|
+
***********************************************************/
|
|
15
|
+
import { RPCError } from '../RpcError.js';
|
|
16
|
+
export class Unauthorized extends RPCError {
|
|
17
|
+
code = 401;
|
|
18
|
+
name = 'UNAUTHORIZED';
|
|
19
|
+
}
|
|
20
|
+
export class ActiveUserRequired extends Unauthorized {
|
|
21
|
+
id = 'ACTIVE_USER_REQUIRED';
|
|
22
|
+
message = 'The method is only available to already activated users';
|
|
23
|
+
}
|
|
24
|
+
export class AuthKeyInvalid extends Unauthorized {
|
|
25
|
+
id = 'AUTH_KEY_INVALID';
|
|
26
|
+
message = 'The specified auth key is invalid.';
|
|
27
|
+
}
|
|
28
|
+
export class AuthKeyPermEmpty extends Unauthorized {
|
|
29
|
+
id = 'AUTH_KEY_PERM_EMPTY';
|
|
30
|
+
message = 'The method is unavailable for temporary authorization keys, not bound to a permanent authorization key.';
|
|
31
|
+
}
|
|
32
|
+
export class AuthKeyUnregistered extends Unauthorized {
|
|
33
|
+
id = 'AUTH_KEY_UNREGISTERED';
|
|
34
|
+
message = 'The specified authorization key is not registered in the system (for example, a PFS temporary key has expired).';
|
|
35
|
+
}
|
|
36
|
+
export class SessionExpired extends Unauthorized {
|
|
37
|
+
id = 'SESSION_EXPIRED';
|
|
38
|
+
message = 'The session has expired.';
|
|
39
|
+
}
|
|
40
|
+
export class SessionPasswordNeeded extends Unauthorized {
|
|
41
|
+
id = 'SESSION_PASSWORD_NEEDED';
|
|
42
|
+
message = '2FA is enabled, use a password to login.';
|
|
43
|
+
}
|
|
44
|
+
export class SessionRevoked extends Unauthorized {
|
|
45
|
+
id = 'SESSION_REVOKED';
|
|
46
|
+
message = 'The session was revoked by the user.';
|
|
47
|
+
}
|
|
48
|
+
export class UserDeactivated extends Unauthorized {
|
|
49
|
+
id = 'USER_DEACTIVATED';
|
|
50
|
+
message = 'The current account was deleted by the user.';
|
|
51
|
+
}
|
|
52
|
+
export class UserDeactivatedBan extends Unauthorized {
|
|
53
|
+
id = 'USER_DEACTIVATED_BAN';
|
|
54
|
+
message = "The current account was deleted and banned by Telegram's antispam system.";
|
|
55
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* tgsnake - Telegram MTProto library for javascript or typescript.
|
|
3
|
+
* Copyright (C) 2026 tgsnake <https://github.com/tgsnake>
|
|
4
|
+
*
|
|
5
|
+
* THIS FILE IS PART OF TGSNAKE
|
|
6
|
+
*
|
|
7
|
+
* tgsnake is a free software : you can redistribute it and/or modify
|
|
8
|
+
* it under the terms of the MIT License as published.
|
|
9
|
+
*/
|
|
10
|
+
/***********************************************************
|
|
11
|
+
* Warning!! *
|
|
12
|
+
* This file is auto generate. *
|
|
13
|
+
* All change made in this file will be lost! *
|
|
14
|
+
***********************************************************/
|
|
15
|
+
export { count, Exceptions } from './All.js';
|
|
16
|
+
export * as SeeOther from './SeeOther303.js';
|
|
17
|
+
export * as BadRequest from './BadRequest400.js';
|
|
18
|
+
export * as Unauthorized from './Unauthorized401.js';
|
|
19
|
+
export * as Forbidden from './Forbidden403.js';
|
|
20
|
+
export * as NotFound from './NotFound404.js';
|
|
21
|
+
export * as NotAcceptable from './NotAcceptable406.js';
|
|
22
|
+
export * as Flood from './Flood420.js';
|
|
23
|
+
export * as InternalServerError from './InternalServerError500.js';
|
|
24
|
+
export * as ServiceUnavailable from './ServiceUnavailable503.js';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* tgsnake - Telegram MTProto library for javascript or typescript.
|
|
3
|
+
* Copyright (C) 2026 tgsnake <https://github.com/tgsnake>
|
|
4
|
+
*
|
|
5
|
+
* THIS FILE IS PART OF TGSNAKE
|
|
6
|
+
*
|
|
7
|
+
* tgsnake is a free software : you can redistribute it and/or modify
|
|
8
|
+
* it under the terms of the MIT License as published.
|
|
9
|
+
*/
|
|
10
|
+
/***********************************************************
|
|
11
|
+
* Warning!! *
|
|
12
|
+
* This file is auto generate. *
|
|
13
|
+
* All change made in this file will be lost! *
|
|
14
|
+
***********************************************************/
|
|
15
|
+
export { count, Exceptions } from './All.js';
|
|
16
|
+
export * as SeeOther from './SeeOther303.js';
|
|
17
|
+
export * as BadRequest from './BadRequest400.js';
|
|
18
|
+
export * as Unauthorized from './Unauthorized401.js';
|
|
19
|
+
export * as Forbidden from './Forbidden403.js';
|
|
20
|
+
export * as NotFound from './NotFound404.js';
|
|
21
|
+
export * as NotAcceptable from './NotAcceptable406.js';
|
|
22
|
+
export * as Flood from './Flood420.js';
|
|
23
|
+
export * as InternalServerError from './InternalServerError500.js';
|
|
24
|
+
export * as ServiceUnavailable from './ServiceUnavailable503.js';
|