valorant-api-types
Version:
A collection of documented endpoints and return types for the unofficial Valorant API
58 lines • 2.05 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.rsoUserInfoEndpoint = void 0;
const zod_1 = require("zod");
const commonTypes_1 = require("../../commonTypes");
const userInfoSchema = zod_1.z.object({
acct: zod_1.z.object({
adm: zod_1.z.boolean(),
created_at: commonTypes_1.millisSchema,
game_name: zod_1.z.string(),
state: zod_1.z.string(),
tag_line: zod_1.z.string(),
type: zod_1.z.number()
}),
ban: zod_1.z.object({
code: zod_1.z.unknown().nullable().optional(),
desc: zod_1.z.string().optional(),
exp: zod_1.z.unknown().nullable().optional(),
restrictions: zod_1.z.array(zod_1.z.unknown())
}),
country: zod_1.z.string(),
country_at: commonTypes_1.millisSchema,
email_verified: zod_1.z.boolean(),
jti: zod_1.z.string(),
lol: zod_1.z.unknown().nullable(),
lol_region: zod_1.z.array(zod_1.z.unknown()),
original_account_id: zod_1.z.unknown().nullable(),
original_platform_id: zod_1.z.unknown().nullable(),
phone_number_verified: zod_1.z.boolean(),
player_locale: zod_1.z.string(),
player_plocale: zod_1.z.unknown().nullable(),
ppid: zod_1.z.unknown().nullable(),
preferred_username: zod_1.z.string(),
pvpnet_account_id: zod_1.z.unknown().nullable(),
pw: zod_1.z.object({
cng_at: commonTypes_1.millisSchema,
must_reset: zod_1.z.boolean(),
reset: zod_1.z.boolean()
}).describe('Password info'),
sub: commonTypes_1.playerUUIDSchema,
username: zod_1.z.string()
});
exports.rsoUserInfoEndpoint = {
name: 'RSO User Info',
description: 'Get RSO user info',
category: 'Local Endpoints',
type: 'local',
suffix: 'rso-auth/v1/authorization/userinfo',
riotRequirements: {
localAuth: true
},
responses: {
'200': zod_1.z.object({
userInfo: zod_1.z.string().transform((str) => userInfoSchema.parse(JSON.parse(str)))
})
}
};
//# sourceMappingURL=RSOUserInfo.js.map