Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@espcustomss/oauth

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@espcustomss/oauth - npm Package Compare versions

Comparing version 1.1.3 to 1.1.4

0

docs/assets/main.js

@@ -0,0 +0,0 @@ "use strict";

6

lib/client.d.ts

@@ -5,3 +5,3 @@ import User from './types/user';

import Collection from '@discordjs/collection';
export declare type Scope = 'activities.read' | 'activities.write' | 'applications.builds.upload' | 'applications.builds.read' | 'applications.commands' | 'applications.commands.update' | 'applications.commands.permissions.update' | 'applications.entitlements' | 'applications.store.update' | 'bot' | 'connections' | 'dm_channels.read' | 'email' | 'gdm.join' | 'guilds' | 'guilds.join' | 'guilds.members.read' | 'identify' | 'messages.read' | 'relationships.read' | 'role_connections.write' | 'rpc' | 'rpc.activities.write' | 'rpc.notifications.read' | 'rpc.voice.read' | 'rpc.voice.write' | 'voice' | 'webhook.incoming';
export type Scope = 'activities.read' | 'activities.write' | 'applications.builds.upload' | 'applications.builds.read' | 'applications.commands' | 'applications.commands.update' | 'applications.commands.permissions.update' | 'applications.entitlements' | 'applications.store.update' | 'bot' | 'connections' | 'dm_channels.read' | 'email' | 'gdm.join' | 'guilds' | 'guilds.join' | 'guilds.members.read' | 'identify' | 'messages.read' | 'relationships.read' | 'role_connections.write' | 'rpc' | 'rpc.activities.write' | 'rpc.notifications.read' | 'rpc.voice.read' | 'rpc.voice.write' | 'voice' | 'webhook.incoming';
export declare class Client {

@@ -29,3 +29,3 @@ private options;

}
/** Opciones requeridas para el cliente- https://discord.com/developers. */
/** Opciones requeridas para el cliente - https://discord.com/developers. */
export interface ClientOptions {

@@ -38,4 +38,4 @@ /** ID de cliente de Discord. */

redirectURI: string;
/** Alcances para el acceso de clientes. */
/** Scopes para el acceso de clientes. */
scopes: Scope[];
}
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("El generador ya se está ejecutando.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
var __values = (this && this.__values) || function(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "El objeto no es iterable." : "Symbol.iterator no está definido.");
};
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -54,116 +7,88 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

exports.Client = void 0;
var jsonwebtoken_1 = __importDefault(require("jsonwebtoken"));
var phin_1 = __importDefault(require("phin"));
var crypto_1 = __importDefault(require("crypto"));
var user_1 = __importDefault(require("./types/user"));
var api_1 = __importDefault(require("./errors/api"));
var guild_1 = __importDefault(require("./types/guild"));
var collection_1 = __importDefault(require("@discordjs/collection"));
var Client = /** @class */ (function () {
/** Create a new OAuth2 Client. */
function Client(options) {
const jsonwebtoken_1 = __importDefault(require("jsonwebtoken"));
const phin_1 = __importDefault(require("phin"));
const user_1 = __importDefault(require("./types/user"));
const api_1 = __importDefault(require("./errors/api"));
const guild_1 = __importDefault(require("./types/guild"));
const collection_1 = __importDefault(require("@discordjs/collection"));
const crypto_1 = __importDefault(require("crypto"));
class Client {
options;
baseURL = 'https://discord.com/api/';
/** Cree un nuevo cliente OAuth2. */
constructor(options) {
this.options = options;
this.baseURL = 'https://discord.com/api/';
}
Object.defineProperty(Client.prototype, "authCodeLink", {
/** Genera un enlace de código de autorización según los ámbitos y el conjunto de URI de redirección. */
get: function () {
if (this.options.scopes.length > 0) {
var state = crypto_1.default.randomBytes(16).toString('hex');
return {
url: "https://discord.com/api/oauth2/authorize?response_type=code&client_id=" + this.options.id + "&scope=" + this.options.scopes.join('%20') + "&state=" + state + "&redirect_uri=" + this.options.redirectURI + "&prompt=none",
state: state
};
/** Genera un enlace de código de autorización según los ámbitos y el conjunto de URI de redirección. */
get authCodeLink() {
if (this.options.scopes.length > 0) {
let state = crypto_1.default.randomBytes(16).toString('hex');
return {
url: `https://discord.com/api/oauth2/authorize?response_type=code&client_id=${this.options.id}&scope=${this.options.scopes.join('%20')}&state=${state}&redirect_uri=${this.options.redirectURI}&prompt=none`,
state
};
}
else if (this.options.scopes.length < 1)
throw new TypeError('Scopes are not defined.');
}
/** Obtiene el token de acceso para que el usuario realice más funciones. */
async getAccess(code) {
if (!code)
throw new TypeError('Código de autorización no proporcionado.');
const response = await (0, phin_1.default)({
method: 'POST',
url: `${this.baseURL}oauth2/token`,
parse: 'json',
form: {
client_id: this.options.id,
client_secret: this.options.secret,
grant_type: 'authorization_code',
code: code,
redirect_uri: this.options.redirectURI,
scope: this.options.scopes.join(' ')
}
else if (this.options.scopes.length < 1)
throw new TypeError('Scopes no están definidos.');
},
enumerable: false,
configurable: true
});
/** Obtiene el token de acceso para que el usuario realice más funciones. */
Client.prototype.getAccess = function (code) {
return __awaiter(this, void 0, void 0, function () {
var response, token;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
if (!code)
throw new TypeError('Código de autorización no proporcionado.');
return [4 /*yield*/, phin_1.default({
method: 'POST',
url: this.baseURL + "oauth2/token",
parse: 'json',
form: {
client_id: this.options.id,
client_secret: this.options.secret,
grant_type: 'authorization_code',
code: code,
redirect_uri: this.options.redirectURI,
scope: this.options.scopes.join(' ')
}
})];
case 1:
response = _a.sent();
if (response.statusCode === 200) {
token = response.body;
token['expireTimestamp'] = Date.now() + token['expires_in'] * 1000 - 10000;
return [2 /*return*/, jsonwebtoken_1.default.sign(token, this.options.secret, { expiresIn: token['expires_in'] })];
}
else
throw new api_1.default(response.statusCode);
return [2 /*return*/];
}
});
});
};
if (response.statusCode === 200) {
let token = response.body;
token['expireTimestamp'] = Date.now() + token['expires_in'] * 1000 - 10000;
return jsonwebtoken_1.default.sign(token, this.options.secret, { expiresIn: token['expires_in'] });
}
else
throw new api_1.default(response.statusCode);
}
/** Obtiene un nuevo token de acceso para el usuario cuyo token de acceso ha caducado. */
Client.prototype.refreshToken = function (key) {
var _a;
return __awaiter(this, void 0, void 0, function () {
var access, response, token, err_1;
return __generator(this, function (_b) {
switch (_b.label) {
case 0:
access = this.getAccessKey(key);
_b.label = 1;
case 1:
_b.trys.push([1, 3, , 4]);
return [4 /*yield*/, phin_1.default({
url: this.baseURL + "oauth2/token",
method: 'POST',
parse: 'json',
form: {
client_id: this.options.id,
client_secret: this.options.secret,
grant_type: 'refresh_token',
refresh_token: access.refresh_token,
redirect_uri: this.options.redirectURI,
scope: this.options.scopes.join(' ')
}
})];
case 2:
response = _b.sent();
if (response.statusCode !== 200)
throw new api_1.default(response.statusCode);
token = response.body;
token.expireTimestamp = Date.now() + token['expires_in'] * 1000 - 10000;
return [2 /*return*/, jsonwebtoken_1.default.sign(token, this.options.secret, { expiresIn: token.expires_in })];
case 3:
err_1 = _b.sent();
throw (err_1.error
? new TypeError(err_1.error)
: new api_1.default((_a = err_1.phinResponse) === null || _a === void 0 ? void 0 : _a.statusCode));
case 4: return [2 /*return*/];
async refreshToken(key) {
const access = this.getAccessKey(key);
try {
const response = await (0, phin_1.default)({
url: `${this.baseURL}oauth2/token`,
method: 'POST',
parse: 'json',
form: {
client_id: this.options.id,
client_secret: this.options.secret,
grant_type: 'refresh_token',
refresh_token: access.refresh_token,
redirect_uri: this.options.redirectURI,
scope: this.options.scopes.join(' ')
}
});
});
};
Client.prototype.getAccessKey = function (key) {
if (response.statusCode !== 200)
throw new api_1.default(response.statusCode);
let token = response.body;
token.expireTimestamp = Date.now() + token['expires_in'] * 1000 - 10000;
return jsonwebtoken_1.default.sign(token, this.options.secret, { expiresIn: token.expires_in });
}
catch (err) {
throw (err.error
? new TypeError(err.error)
: new api_1.default(err.phinResponse?.statusCode));
}
}
getAccessKey(key) {
try {
var decoded = jsonwebtoken_1.default.verify(key, this.options.secret);
const decoded = jsonwebtoken_1.default.verify(key, this.options.secret);
if (typeof decoded === 'string') {
throw new Error('Invalid access key');
}
return {

@@ -178,134 +103,70 @@ access_token: decoded.access_token,

}
};
}
/** Obtiene el usuario que ha autorizado el uso del flujo OAuth2. */
Client.prototype.getUser = function (key) {
var _a;
return __awaiter(this, void 0, void 0, function () {
var access, response, err_2;
return __generator(this, function (_b) {
switch (_b.label) {
case 0:
access = this.getAccessKey(key);
_b.label = 1;
case 1:
_b.trys.push([1, 3, , 4]);
return [4 /*yield*/, phin_1.default({
url: this.baseURL + "users/@me",
method: 'GET',
headers: { Authorization: access.token_type + " " + access.access_token },
parse: 'json'
})];
case 2:
response = _b.sent();
if (response.statusCode !== 200)
throw new api_1.default(response.statusCode);
return [2 /*return*/, new user_1.default(response.body)];
case 3:
err_2 = _b.sent();
throw (err_2.error
? new TypeError(err_2.error)
: new api_1.default((_a = err_2['phinResponse']) === null || _a === void 0 ? void 0 : _a.statusCode));
case 4: return [2 /*return*/];
}
async getUser(key) {
const access = this.getAccessKey(key);
try {
const response = await (0, phin_1.default)({
url: `${this.baseURL}users/@me`,
method: 'GET',
headers: { Authorization: `${access.token_type} ${access.access_token}` },
parse: 'json'
});
});
};
if (response.statusCode !== 200)
throw new api_1.default(response.statusCode);
return new user_1.default(response.body);
}
catch (err) {
throw (err.error
? new TypeError(err.error)
: new api_1.default(err['phinResponse']?.statusCode));
}
}
/** Obtiene los servidores de un usuario autorizado. */
Client.prototype.getGuilds = function (key) {
return __awaiter(this, void 0, void 0, function () {
var access, response, guilds, _a, _b, guild, err_3;
var e_1, _c;
return __generator(this, function (_d) {
switch (_d.label) {
case 0:
access = this.getAccessKey(key);
_d.label = 1;
case 1:
_d.trys.push([1, 3, , 4]);
return [4 /*yield*/, phin_1.default({
url: this.baseURL + "users/@me/guilds",
method: 'GET',
headers: { Authorization: access.token_type + " " + access.access_token },
parse: 'json'
})];
case 2:
response = _d.sent();
if (response.statusCode !== 200)
throw new api_1.default(response.statusCode);
guilds = new collection_1.default();
try {
for (_a = __values(response.body), _b = _a.next(); !_b.done; _b = _a.next()) {
guild = _b.value;
guilds.set(guild.id, new guild_1.default(guild));
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
}
finally { if (e_1) throw e_1.error; }
}
return [2 /*return*/, guilds];
case 3:
err_3 = _d.sent();
throw err_3;
case 4: return [2 /*return*/];
}
async getGuilds(key) {
const access = this.getAccessKey(key);
try {
const response = await (0, phin_1.default)({
url: `${this.baseURL}users/@me/guilds`,
method: 'GET',
headers: { Authorization: `${access.token_type} ${access.access_token}` },
parse: 'json'
});
});
};
if (response.statusCode !== 200)
throw new api_1.default(response.statusCode);
const guilds = new collection_1.default();
for (const guild of response.body)
guilds.set(guild.id, new guild_1.default(guild));
return guilds;
}
catch (err) {
throw err;
}
}
/** Obtiene las cuentas de terceros conectadas de un usuario autorizado. */
Client.prototype.getConnections = function (key) {
var _a;
return __awaiter(this, void 0, void 0, function () {
var access, response, connections, _b, _c, connection, err_4;
var e_2, _d;
return __generator(this, function (_e) {
switch (_e.label) {
case 0:
access = this.getAccessKey(key);
_e.label = 1;
case 1:
_e.trys.push([1, 3, , 4]);
return [4 /*yield*/, phin_1.default({
url: this.baseURL + "users/@me/connections",
method: 'GET',
headers: { Authorization: access['token_type'] + " " + access['access_token'] },
parse: 'json'
})];
case 2:
response = _e.sent();
if (response.statusCode !== 200)
throw new api_1.default(response.statusCode);
connections = new collection_1.default();
try {
for (_b = __values(response.body), _c = _b.next(); !_c.done; _c = _b.next()) {
connection = _c.value;
connections.set(connection.id, connection);
}
}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (_c && !_c.done && (_d = _b.return)) _d.call(_b);
}
finally { if (e_2) throw e_2.error; }
}
return [2 /*return*/, connections];
case 3:
err_4 = _e.sent();
throw (err_4.error
? new TypeError(err_4.error)
: new api_1.default((_a = err_4['phinResponse']) === null || _a === void 0 ? void 0 : _a.statusCode));
case 4: return [2 /*return*/];
}
async getConnections(key) {
const access = this.getAccessKey(key);
try {
const response = await (0, phin_1.default)({
url: `${this.baseURL}users/@me/connections`,
method: 'GET',
headers: { Authorization: `${access['token_type']} ${access['access_token']}` },
parse: 'json'
});
});
};
return Client;
}());
if (response.statusCode !== 200)
throw new api_1.default(response.statusCode);
const connections = new collection_1.default();
for (const connection of response.body)
connections.set(connection.id, connection);
return connections;
}
catch (err) {
throw (err.error
? new TypeError(err.error)
: new api_1.default(err['phinResponse']?.statusCode));
}
}
}
exports.Client = Client;
;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xpZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2NsaWVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLDhEQUErQjtBQUMvQiw4Q0FBd0I7QUFDeEIsNENBQXNCO0FBQ3RCLHNEQUFnQztBQUNoQyxxREFBb0M7QUFDcEMsd0RBQWtDO0FBRWxDLHFFQUErQztBQUkvQztJQUdFLGtDQUFrQztJQUNsQyxnQkFBb0IsT0FBc0I7UUFBdEIsWUFBTyxHQUFQLE9BQU8sQ0FBZTtRQUhsQyxZQUFPLEdBQUcsMEJBQTBCLENBQUM7SUFHQSxDQUFDO0lBRzlDLHNCQUFJLGdDQUFZO1FBRGhCLHdGQUF3RjthQUN4RjtZQUNFLElBQUksSUFBSSxDQUFDLE9BQU8sQ0FBQyxNQUFNLENBQUMsTUFBTSxHQUFHLENBQUMsRUFBRTtnQkFDbEMsSUFBSSxLQUFLLEdBQUcsYUFBRyxDQUFDLEVBQUUsQ0FBQyxDQUFDO2dCQUNwQixPQUFPO29CQUNMLEdBQUcsRUFBRSwyRUFBeUUsSUFBSSxDQUFDLE9BQU8sQ0FBQyxFQUFFLGVBQVUsSUFBSSxDQUFDLE9BQU8sQ0FBQyxNQUFNLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxlQUFVLEtBQUssc0JBQWlCLElBQUksQ0FBQyxPQUFPLENBQUMsV0FBVyxpQkFBYztvQkFDNU0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FDLE1BQU0sV0FBVyxHQUFHLElBQUksb0JBQVUsRUFBc0IsQ0FBQztZQUN6RCxLQUFLLE1BQU0sVUFBVSxJQUFJLFFBQVEsQ0FBQyxJQUFJO2dCQUNwQyxXQUFXLENBQUMsR0FBRyxDQUFDLFVBQVUsQ0FBQyxFQUFFLEVBQUUsVUFBVSxDQUFDLENBQUM7WUFFN0MsT0FBTyxXQUFXLENBQUM7UUFDckIsQ0FBQztRQUFDLE9BQU8sR0FBUSxFQUFFLENBQUM7WUFDbEIsTUFBTSxDQUFDLEdBQUcsQ0FBQyxLQUFLO2dCQUNkLENBQUMsQ0FBQyxJQUFJLFNBQVMsQ0FBQyxHQUFHLENBQUMsS0FBSyxDQUFDO2dCQUMxQixDQUFDLENBQUMsSUFBSSxhQUFRLENBQUMsR0FBRyxDQUFDLGNBQWMsQ0FBQyxFQUFFLFVBQVUsQ0FBQyxDQUFDLENBQUM7UUFDckQsQ0FBQztJQUNILENBQUM7Q0FDRjtBQXJLRCx3QkFxS0M7QUFBQSxDQUFDIn0=
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
var __spread = (this && this.__spread) || function () {
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
return ar;
};
Object.defineProperty(exports, "__esModule", { value: true });
/** Una lista de los errores más comunes. */
var errors = new Map([
const errors = new Map([
[400, 'Solicitud no válida realizada'],

@@ -46,20 +13,14 @@ [401, 'Token de acceso no válido'],

]);
var APIError = /** @class */ (function (_super) {
__extends(APIError, _super);
function APIError(statusCode) {
var params = [];
for (var _i = 1; _i < arguments.length; _i++) {
params[_i - 1] = arguments[_i];
}
var _this = _super.apply(this, __spread(params)) || this;
_this.statusCode = statusCode;
_this.message = errors.get(_this.statusCode)
|| _this.message
|| 'An error occurred';
return _this;
class APIError extends Error {
statusCode;
constructor(statusCode, ...params) {
super(...params);
this.statusCode = statusCode;
this.message = errors.get(this.statusCode)
|| this.message
|| 'Ocurrió un error';
}
return APIError;
}(Error));
}
exports.default = APIError;
;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBpLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2Vycm9ycy9hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSwrQ0FBK0M7QUFDL0MsSUFBTSxNQUFNLEdBQUcsSUFBSSxHQUFHLENBQWlCO0lBQ3JDLENBQUMsR0FBRyxFQUFFLHNCQUFzQixDQUFDO0lBQzdCLENBQUMsR0FBRyxFQUFFLHNCQUFzQixDQUFDO0lBQzdCLENBQUMsR0FBRyxFQUFFLHdCQUF3QixDQUFDO0lBQy9CLENBQUMsR0FBRyxFQUFFLG9CQUFvQixDQUFDO0lBQzNCLENBQUMsR0FBRyxFQUFFLG9CQUFvQixDQUFDO0lBQzNCLENBQUMsR0FBRyxFQUFFLDRCQUE0QixDQUFDO0lBQ25DLENBQUMsR0FBRyxFQUFFLGtDQUFrQyxDQUFDO0NBQzFDLENBQUMsQ0FBQztBQUVIO0lB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ixHQUFHLE1BQWE7UUFDaEIsS0FBSyxDQUFDLEdBQUcsTUFBTSxDQUFDLENBQUM7UUFGVixlQUFVLEdBQVYsVUFBVSxDQUFRO1FBSXpCLElBQUksQ0FBQyxPQUFPLEdBQUcsTUFBTSxDQUFDLEdBQUcsQ0FBQyxJQUFJLENBQUMsVUFBVSxDQUFDO2VBQ3JDLElBQUksQ0FBQyxPQUFPO2VBQ1osa0JBQWtCLENBQUM7SUFDMUIsQ0FBQztDQUNGO0FBVkQsMkJBVUM7QUFBQSxDQUFDIn0=

@@ -6,3 +6,3 @@ export default class Guild {

readonly name: string;
/** El hash del icono del servidor. */
/** El hash del icono del servidor.The guild's icon hash. */
readonly iconHash: string;

@@ -9,0 +9,0 @@ /** Una lista de las funciones habilitadas para discord del servidor. */

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var permissionConstants = {
const permissionConstants = {
1: 'CREATE_INSTANT_INVITE',

@@ -52,5 +52,23 @@ 2: 'KICK_MEMBERS',

};
var Guild = /** @class */ (function () {
function Guild(_a) {
var id = _a.id, name = _a.name, icon = _a.icon, _b = _a.features, features = _b === void 0 ? [] : _b, _c = _a.owner, owner = _c === void 0 ? false : _c, _d = _a.permissions, permissions = _d === void 0 ? 0 : _d;
class Guild {
/** El ID de Discord único del servidor. */
id;
/** Nombre del servidor. */
name;
/** El hash del icono del servidor.The guild's icon hash. */
iconHash;
/** Una lista de las funciones habilitadas para discord del servidor. */
features;
isOwner;
/** Una lista de permisos que tiene el usuario autorizado en este servidor. */
permissions;
/** La marca de tiempo de creación de la cuenta del usuario. */
get createdTimestamp() {
return parseInt((BigInt(this.id) >> BigInt(22)).toString()) + 1420070400000;
}
/** La hora de creación de la cuenta del usuario. */
get createdAt() {
return new Date(this.createdTimestamp);
}
constructor({ id, name, icon, features = [], owner = false, permissions = 0 }) {
this.id = id;

@@ -63,22 +81,6 @@ this.name = name;

}
Object.defineProperty(Guild.prototype, "createdTimestamp", {
/** La marca de tiempo de creación de la cuenta del usuario. */
get: function () {
return parseInt((BigInt(this.id) >> BigInt(22)).toString()) + 1420070400000;
},
enumerable: false,
configurable: true
});
Object.defineProperty(Guild.prototype, "createdAt", {
/** La hora de creación de la cuenta del usuario. */
get: function () {
return new Date(this.createdTimestamp);
},
enumerable: false,
configurable: true
});
Guild.prototype.parsePermissions = function (perms) {
var p = [];
for (var c in permissionConstants) {
var permNum = parseInt(c);
parsePermissions(perms) {
const p = [];
for (let c in permissionConstants) {
let permNum = parseInt(c);
if ((permNum & perms) === permNum)

@@ -88,3 +90,3 @@ p.push(permissionConstants[permNum]);

return p;
};
}
/**

@@ -94,11 +96,9 @@ * Devuelve una URL al icono del servidor.

*/
Guild.prototype.iconUrl = function (size) {
if (size === void 0) { size = 512; }
iconUrl(size = 512) {
return this.iconHash
? "https://cdn.discordapp.com/icons/" + this.id + "/" + this.iconHash + "." + (this.iconHash.startsWith('a_') ? 'gif' : 'png') + "?size=" + size
? `https://cdn.discordapp.com/icons/${this.id}/${this.iconHash}.${this.iconHash.startsWith('a_') ? 'gif' : 'png'}?size=${size}`
: 'https://i.imgur.com/rdvO6lD.png';
};
return Guild;
}());
}
}
exports.default = Guild;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ3VpbGQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdHlwZXMvZ3VpbGQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxJQUFNLG1CQUFtQixHQUFHO0lBQzFCLENBQUMsRUFBRSx1QkFBdUI7SUFDMUIsQ0FBQyxFQUFFLGNBQWM7SUFDakIsQ0FBQyxFQUFFLGFBQWE7SUFDaEIsQ0FBQyxFQUFFLGVBQWU7SUFDbEIsSUFBSSxFQUFFLGlCQUFpQjtJQUN2QixJQUFJLEVBQUUsY0FBYztJQUNwQixJQUFJLEVBQUUsY0FBYztJQUNwQixJQUFJLEVBQUUsZ0JBQWdCO0lB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QUFPLENBQUMsQ0FBQztJQUNYLENBQUM7SUFFRDs7O09BR0c7SUFDSCxPQUFPLENBQUMsSUFBSSxHQUFHLEdBQUc7UUFDaEIsT0FBTyxJQUFJLENBQUMsUUFBUTtZQUNsQixDQUFDLENBQUMsb0NBQW9DLElBQUksQ0FBQyxFQUFFLElBQUksSUFBSSxDQUFDLFFBQVEsSUFDMUQsSUFBSSxDQUFDLFFBQVEsQ0FBQyxVQUFVLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsS0FBSyxTQUFTLElBQUksRUFBRTtZQUNqRSxDQUFDLENBQUMsaUNBQWlDLENBQUM7SUFDeEMsQ0FBQztDQUNGO0FBcERELHdCQW9EQyJ9
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var User = /** @class */ (function () {
function User(_a) {
var username = _a.username, locale = _a.locale, mfa_enabled = _a.mfa_enabled, _b = _a.flags, flags = _b === void 0 ? 0 : _b, _c = _a.avatar, avatar = _c === void 0 ? null : _c, _d = _a.banner, banner = _d === void 0 ? null : _d, discriminator = _a.discriminator, id = _a.id, _e = _a.email, email = _e === void 0 ? undefined : _e, _f = _a.verified, verified = _f === void 0 ? undefined : _f, _g = _a.premium_type, premium_type = _g === void 0 ? 0 : _g, _h = _a.bot, bot = _h === void 0 ? false : _h;
class User {
/** El nombre de usuario de discord del usuario. */
username;
/** La configuración regional del usuario. */
locale;
/** Si el usuario ha habilitado la autenticación de 2 factores. */
isMFAEnabled;
/** El discriminador del usuario. (e.g. '0001'). */
discriminator;
/** El ID de Discord único del usuario. */
id;
/** El ID de correo electrónico del usuario. */
emailId;
/** Si se ha verificado el ID de correo electrónico del usuario. */
emailVerified;
/** Las banderas del perfil del usuario. */
userFlags;
/** El hash del avatar del usuario. */
avatarHash;
/** El hash del banner del usuario. */
bannerHash;
/** El tipo de suscripción premium. */
premiumType;
/** Si el usuario es un bot de Discord. */
bot;
/** Obtenga la URL del avatar de visualización de un usuario. */
displayAvatarURL;
/** Obtenga la URL del banner de visualización de un usuario. */
bannerURL;
/** Etiqueta del usuario (e.g. ! BLD Gobi#0001) */
tag;
constructor({ username, locale, mfa_enabled, flags = 0, avatar = null, banner = null, discriminator, id, email = undefined, verified = undefined, premium_type = 0, bot = false }) {
this.username = username;

@@ -20,6 +49,6 @@ this.locale = locale;

this.bannerURL = this.BannerURL({ forceStatic: false, size: 1024 });
this.tag = "".concat(this.username, "#").concat(this.discriminator);
this.tag = `${this.username}#${this.discriminator}`;
this.buildFlags(flags);
}
User.prototype.buildFlags = function (flags) {
buildFlags(flags) {
if ((flags & 1) === 1)

@@ -49,37 +78,24 @@ this.userFlags.push('Discord Employee');

this.userFlags.push('Verified Bot Developer');
};
Object.defineProperty(User.prototype, "createdTimestamp", {
/** La marca de tiempo de la creación de la cuenta del usuario. */
get: function () {
return parseInt((BigInt(this.id) >> BigInt(22)).toString()) + 1420070400000;
},
enumerable: false,
configurable: true
});
Object.defineProperty(User.prototype, "createdAt", {
/** La hora de creación de la cuenta del usuario. */
get: function () {
return new Date(this.createdTimestamp);
},
enumerable: false,
configurable: true
});
}
/** La marca de tiempo de la creación de la cuenta del usuario. */
get createdTimestamp() {
return parseInt((BigInt(this.id) >> BigInt(22)).toString()) + 1420070400000;
}
/** La hora de creación de la cuenta del usuario. */
get createdAt() {
return new Date(this.createdTimestamp);
}
/** Obtenga la URL del avatar de un usuario, con opciones. */
User.prototype.avatarURL = function (options) {
var _a;
if (options === void 0) { options = { size: 512 }; }
var extension = (((_a = this.avatarHash) === null || _a === void 0 ? void 0 : _a.startsWith('a_')) && options.forceStatic) ? 'gif' : 'webp';
return "https://cdn.discordapp.com/".concat(this.avatarHash ? '' : 'embed/', "avatars/").concat(this.avatarHash ? "".concat(this.id, "/").concat(this.avatarHash) : parseInt(this.discriminator) % 5, ".").concat((this.avatarHash) ? extension : 'webp', "?size=").concat(options.size);
};
avatarURL(options = { size: 512 }) {
const extension = (this.avatarHash?.startsWith('a_') && options.forceStatic) ? 'gif' : 'webp';
return `https://cdn.discordapp.com/${this.avatarHash ? '' : 'embed/'}avatars/${this.avatarHash ? `${this.id}/${this.avatarHash}` : parseInt(this.discriminator) % 5}.${(this.avatarHash) ? extension : 'webp'}?size=${options.size}`;
}
;
/** Obtenga la URL del banner de un usuario, con opciones. */
User.prototype.BannerURL = function (options) {
var _a;
if (options === void 0) { options = { size: 512 }; }
var extension = (((_a = this.avatarHash) === null || _a === void 0 ? void 0 : _a.startsWith('a_')) && options.forceStatic) ? 'gif' : 'png';
return "https://cdn.discordapp.com/".concat(this.bannerHash ? '' : 'embed/', "banners/").concat(this.bannerHash ? "".concat(this.id, "/").concat(this.bannerHash) : parseInt(this.discriminator) % 5, ".").concat((this.bannerHash) ? extension : 'png', "?size=").concat(options.size);
};
return User;
}());
BannerURL(options = { size: 512 }) {
const extension = (this.avatarHash?.startsWith('a_') && options.forceStatic) ? 'gif' : 'png';
return `https://cdn.discordapp.com/${this.bannerHash ? '' : 'embed/'}banners/${this.bannerHash ? `${this.id}/${this.bannerHash}` : parseInt(this.discriminator) % 5}.${(this.bannerHash) ? extension : 'png'}?size=${options.size}`;
}
}
exports.default = User;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy90eXBlcy91c2VyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBRUE7SUFnQ0UsY0FBWSxFQWFYO1lBWkMsUUFBUSxjQUFBLEVBQ1IsTUFBTSxZQUFBLEVBQ04sV0FBVyxpQkFBQSxFQUNYLGFBQVMsRUFBVCxLQUFLLG1CQUFHLENBQUMsS0FBQSxFQUNULGNBQWEsRUFBYixNQUFNLG1CQUFHLElBQUksS0FBQSxFQUNiLGNBQWEsRUFBYixNQUFNLG1CQUFHLElBQUksS0FBQSxFQUNiLGFBQWEsbUJBQUEsRUFDY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xhQUFhLENBQUMsR0FBRyxDQUNoSyxJQUFJLENBQUMsSUFBSSxDQUFDLFVBQVUsQ0FBQyxDQUFDLENBQUMsQ0FBQyxTQUFTLENBQUMsQ0FBQyxDQUFDLEtBQUssU0FBUyxPQUFPLENBQUMsSUFBSSxFQUFFLENBQUM7SUFDckUsQ0FBQztDQUNGO0FBbkhELHVCQW1IQyJ9
{
"name": "@espcustomss/oauth",
"version": "1.1.3",
"version": "1.1.4",
"description": "Simplemente haga solicitudes de Discord OAuth. Construido con TypeScript, utilizado por Esp Customs.",

@@ -8,3 +8,4 @@ "main": "lib/client.js",

"docs": "typedoc --entryPoints src --entryPointStrategy expand --out docs --plugin typedoc-theme-hierarchy --theme hierarchy",
"demo": "ts-node-dev demo/server.ts"
"demo": "ts-node-dev demo/server.ts",
"build": "tsc"
},

@@ -38,3 +39,3 @@ "repository": {

"@types/mocha": "^10.0.6",
"@types/node": "^20.10.8",
"@types/node": "^20.11.2",
"chai": "^5.0.0",

@@ -48,3 +49,3 @@ "cookie-parser": "^1.4.6",

"nodemon": "^3.0.2",
"prettier": "^3.1.1",
"prettier": "^3.2.2",
"ts-mocha": "^10.0.0",

@@ -51,0 +52,0 @@ "ts-node-dev": "^2.0.0",

@@ -7,3 +7,3 @@ import jwt from 'jsonwebtoken';

import Connection from './types/connection';
import { Collection } from '@discordjs/collection';
import Collection from '@discordjs/collection';
import crypto from 'crypto';

@@ -10,0 +10,0 @@

@@ -0,0 +0,0 @@ declare const ALLOWED_EXTENSIONS: readonly ["webp", "png", "jpg", "jpeg", "gif"];

@@ -0,0 +0,0 @@ /** Un usuario de Discord que ha autorizado su aplicación para tener acceso a sus datos. */

@@ -17,3 +17,3 @@ {

},
"include": ["src"],
"include": ["src"]
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc