UNPKG

valorant-api-types

Version:

A collection of documented endpoints and return types for the unofficial Valorant API

45 lines 1.72 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.accountXPEndpoint = void 0; const zod_1 = require("zod"); const commonTypes_1 = require("../../commonTypes"); const progressSchema = zod_1.z.object({ Level: zod_1.z.number(), XP: zod_1.z.number() }); exports.accountXPEndpoint = { name: 'Account XP', description: 'Get the account level, XP, and XP history for the current player. This endpoint only works with the authenticated player\'s PUUID.', queryName: 'AccountXP_GetPlayer', category: 'PVP Endpoints', type: 'pd', suffix: 'account-xp/v1/players/{puuid}', riotRequirements: { token: true, entitlement: true, clientPlatform: true, clientVersion: true }, responses: { '200': zod_1.z.object({ Version: zod_1.z.number(), Subject: commonTypes_1.playerUUIDSchema, Progress: progressSchema, History: zod_1.z.array(zod_1.z.object({ ID: commonTypes_1.matchIDSchema, MatchStart: commonTypes_1.dateSchema, StartProgress: progressSchema, EndProgress: progressSchema, XPDelta: zod_1.z.number(), XPSources: zod_1.z.array(zod_1.z.object({ ID: zod_1.z.enum(['time-played', 'match-win', 'first-win-of-the-day']), Amount: zod_1.z.number() })), XPMultipliers: zod_1.z.array(zod_1.z.unknown()) })), LastTimeGrantedFirstWin: commonTypes_1.dateSchema, NextTimeFirstWinAvailable: commonTypes_1.dateSchema }) } }; //# sourceMappingURL=AccountXP.js.map