@tgsnake/core
Version:
Pure Telegram MTProto library for nodejs
55 lines (54 loc) • 2.35 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.UserDeactivatedBan = exports.UserDeactivated = exports.SessionRevoked = exports.SessionPasswordNeeded = exports.SessionExpired = exports.AuthKeyUnregistered = exports.AuthKeyPermEmpty = exports.AuthKeyInvalid = exports.ActiveUserRequired = exports.Unauthorized = void 0;
const RpcError_js_1 = require("../RpcError.js");
class Unauthorized extends RpcError_js_1.RPCError {
code = 401;
name = 'UNAUTHORIZED';
}
exports.Unauthorized = Unauthorized;
class ActiveUserRequired extends Unauthorized {
id = 'ACTIVE_USER_REQUIRED';
message = 'The method is only available to already activated users';
}
exports.ActiveUserRequired = ActiveUserRequired;
class AuthKeyInvalid extends Unauthorized {
id = 'AUTH_KEY_INVALID';
message = 'The specified auth key is invalid.';
}
exports.AuthKeyInvalid = AuthKeyInvalid;
class AuthKeyPermEmpty extends Unauthorized {
id = 'AUTH_KEY_PERM_EMPTY';
message = 'The method is unavailable for temporary authorization keys, not bound to a permanent authorization key.';
}
exports.AuthKeyPermEmpty = AuthKeyPermEmpty;
class AuthKeyUnregistered extends Unauthorized {
id = 'AUTH_KEY_UNREGISTERED';
message = 'The specified authorization key is not registered in the system (for example, a PFS temporary key has expired).';
}
exports.AuthKeyUnregistered = AuthKeyUnregistered;
class SessionExpired extends Unauthorized {
id = 'SESSION_EXPIRED';
message = 'The session has expired.';
}
exports.SessionExpired = SessionExpired;
class SessionPasswordNeeded extends Unauthorized {
id = 'SESSION_PASSWORD_NEEDED';
message = '2FA is enabled, use a password to login.';
}
exports.SessionPasswordNeeded = SessionPasswordNeeded;
class SessionRevoked extends Unauthorized {
id = 'SESSION_REVOKED';
message = 'The session was revoked by the user.';
}
exports.SessionRevoked = SessionRevoked;
class UserDeactivated extends Unauthorized {
id = 'USER_DEACTIVATED';
message = 'The current account was deleted by the user.';
}
exports.UserDeactivated = UserDeactivated;
class UserDeactivatedBan extends Unauthorized {
id = 'USER_DEACTIVATED_BAN';
message = "The current account was deleted and banned by Telegram's antispam system.";
}
exports.UserDeactivatedBan = UserDeactivatedBan;